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:
Diffstat (limited to 'bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/wsdl_result_content.jsp')
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/wsdl_result_content.jsp72
1 files changed, 0 insertions, 72 deletions
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/wsdl_result_content.jsp b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/wsdl_result_content.jsp
deleted file mode 100644
index 74e79f642..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/wsdl_result_content.jsp
+++ /dev/null
@@ -1,72 +0,0 @@
-<%
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-%>
-<%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.*,
- org.eclipse.wst.ws.internal.explorer.platform.wsdl.constants.*" %>
-
-<jsp:useBean id="controller" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller" scope="session"/>
-<%
- WSDLPerspective wsdlPerspective = controller.getWSDLPerspective();
- int viewID = wsdlPerspective.getStatusContentType();
-%>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title><%=wsdlPerspective.getMessage("FRAME_TITLE_STATUS_CONTENT")%></title>
- <link rel="stylesheet" type="text/css" href="<%=response.encodeURL(controller.getPathWithContext("css/windows.css"))%>">
-<jsp:include page="/scripts/tables.jsp" flush="true"/>
-<jsp:include page="/scripts/panes.jsp" flush="true"/>
-<script language="javascript">
- function switchReadOnlyFragmentsView() {
- perspectiveWorkArea.location = "<%=response.encodeURL(controller.getPathWithContext("wsdl/actions/SwitchReadOnlyFragmentViewsActionJSP.jsp"))%>";
- }
-</script>
-</head>
-<body dir="<%=org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils.getDir()%>" class="contentbodymargin">
-<div id="contentborder">
- <table width="95%" border=0 cellpadding=3 cellspacing=0>
- <tr>
- <td align="right" class="labels">
-<%
- if (viewID == wsdlPerspective.STATUS_CONTENT_RESULT_SOURCE)
- {
-%>
- <a href="javascript:switchReadOnlyFragmentsView()" title="<%=wsdlPerspective.getMessage("ALT_SWITCH_TO_FORM_VIEW")%>"><%=wsdlPerspective.getMessage("FORM_LINK_FORM")%></a>
-<%
- }
- else
- {
-%>
- <a href="javascript:switchReadOnlyFragmentsView()" title="<%=wsdlPerspective.getMessage("ALT_SWITCH_TO_SOURCE_VIEW")%>"><%=wsdlPerspective.getMessage("FORM_LINK_SOURCE")%></a>
-<%
- }
-%>
- </td>
- </tr>
- </table>
-<%
- if (viewID == wsdlPerspective.STATUS_CONTENT_RESULT_SOURCE)
- {
-%>
- <jsp:include page="/wsdl/forms/ReadOnlyFragmentsSoapView.jsp" flush="true"/>
-<%
- }
- else
- {
-%>
- <jsp:include page="/wsdl/forms/ReadOnlyFragmentsFormView.jsp" flush="true"/>
-<%
- }
-%>
-</div>
-</body>
-</html>

Back to the top

2.png rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/plugin.properties rse/features/org.eclipse.rse.useractions-feature/.project rse/features/org.eclipse.rse.useractions-feature/build.properties rse/features/org.eclipse.rse.useractions-feature/eclipse_update_120.jpg rse/features/org.eclipse.rse.useractions-feature/epl-v10.html rse/features/org.eclipse.rse.useractions-feature/feature.properties rse/features/org.eclipse.rse.useractions-feature/feature.xml rse/features/org.eclipse.rse.useractions-feature/license.html rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/epl-v10.html rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/feature.properties rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/license.html rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.html rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.ini rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.mappings rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.properties rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/build.properties rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/eclipse32.png rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/plugin.properties rse/features/readme.txt rse/plugins/org.eclipse.dstore.core/.classpath rse/plugins/org.eclipse.dstore.core/.cvsignore rse/plugins/org.eclipse.dstore.core/.project rse/plugins/org.eclipse.dstore.core/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.dstore.core/META-INF/MANIFEST.MF rse/plugins/org.eclipse.dstore.core/about.html rse/plugins/org.eclipse.dstore.core/build.properties rse/plugins/org.eclipse.dstore.core/export.jardesc rse/plugins/org.eclipse.dstore.core/plugin.properties rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/Activator.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ConnectionStatus.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandlerRegistry.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassInstanceOutputStream.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassRequest.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/LocalObjectInputStream.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteObjectInputStream.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/Miner.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandlerRegistry.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DE.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreAttributes.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreSchema.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Handler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteConverter.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteStreamHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreCompatibilityHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreConstants.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStorePreferenceListener.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreProvider.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IExternalLoader.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISSLProperties.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaExtender.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaRegistry.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ISystemService.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SecuredThread.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/Server.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SystemServiceManager.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/CommandGenerator.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/StringCompare.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreKeyStore.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/IDataStoreTrustManager.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientAttributes.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientCommandHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientReceiver.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientSSLProperties.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientUpdateHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/DefaultByteConverter.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/SchemaRegistry.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/MinerLoader.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerAttributes.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerReturnCodes.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerSSLProperties.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/DataElementRemover.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ExternalLoader.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ISender.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/MemoryManager.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Pattern.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sender.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sorter.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLgenerator.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLparser.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreSSLContext.java rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DataStoreTrustManager.java rse/plugins/org.eclipse.dstore.extra/.classpath rse/plugins/org.eclipse.dstore.extra/.cvsignore rse/plugins/org.eclipse.dstore.extra/.project rse/plugins/org.eclipse.dstore.extra/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.dstore.extra/META-INF/MANIFEST.MF rse/plugins/org.eclipse.dstore.extra/about.html rse/plugins/org.eclipse.dstore.extra/build.properties rse/plugins/org.eclipse.dstore.extra/plugin.properties rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/DomainEvent.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDataElement.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainListener.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainNotifier.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IElement.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DataElementActionFilter.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DesktopElement.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DomainNotifier.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IDesktopElement.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IPropertySource.java rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/PropertySource.java rse/plugins/org.eclipse.dstore.extra/serverruntime/.cvsignore rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/Activator.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/DomainEvent.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDataElement.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainListener.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainNotifier.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IElement.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DataElementActionFilter.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DesktopElement.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDataElementActionFilter.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDesktopElement.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IPropertySource.java rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/PropertySource.java rse/plugins/org.eclipse.rse.connectorservice.dstore/.classpath rse/plugins/org.eclipse.rse.connectorservice.dstore/.cvsignore rse/plugins/org.eclipse.rse.connectorservice.dstore/.project rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/.api_filters rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.connectorservice.dstore/about.html rse/plugins/org.eclipse.rse.connectorservice.dstore/build.properties rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.xml rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreConstants.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreMessages.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreSubSystem.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalSubSystemConfiguration.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnostic.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnosticFactory.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitorFactory.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/Activator.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.properties rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IConnectorServiceMessageIds.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ui/propertypages/DStorePreferencePage.java rse/plugins/org.eclipse.rse.core/.classpath rse/plugins/org.eclipse.rse.core/.cvsignore rse/plugins/org.eclipse.rse.core/.project rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.ui.prefs rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.core/about.html rse/plugins/org.eclipse.rse.core/about.ini rse/plugins/org.eclipse.rse.core/about.mappings rse/plugins/org.eclipse.rse.core/about.properties rse/plugins/org.eclipse.rse.core/build.properties rse/plugins/org.eclipse.rse.core/eclipse32.png rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinux_obj.gif rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinuxlive_obj.gif rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocal_obj.gif rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocallive_obj.gif rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunix_obj.gif rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunixlive_obj.gif rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwin_obj.gif rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwinlive_obj.gif rse/plugins/org.eclipse.rse.core/plugin.properties rse/plugins/org.eclipse.rse.core/plugin.xml rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd rse/plugins/org.eclipse.rse.core/schema/persistenceProviders.exsd rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd rse/plugins/org.eclipse.rse.core/schema/systemTypeProviders.exsd rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreStatusCodes.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInitListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInteractionProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEModelInitializer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSERunnableWithProgress.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/ISystemResourceListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemRemoteObjectMatcher.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceHelpers.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemTypeMatcher.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemRemoteChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemResourceChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterUtil.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/AbstractSystemResourceSet.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ILabeledObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSECallback.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEPersistableContainer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurator.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModifiableContainer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Property.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyList.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySet.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySetContainer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEPersistableObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemChildrenContentsType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemEscapeCharHelper.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemFilterStringContentsType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemMessageObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemRemoteResourceSet.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemWorkspaceResourceSet.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferenceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencingObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencingObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObjectHelper.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObjectHelper.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractCredentialsProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractResource.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/BasicConnectorService.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/CommunicationsEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICacheManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICommunicationsListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentials.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentialsProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteContainer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteLineReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemotePropertyHolder.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteServerLauncher.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemDragDropAdapter.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemRemoteObjectMatchProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteChildrenContentsType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLauncher.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemHelpers.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/IRemoteSystemsProject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreMessages.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreRegistry.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSELocalConnectionInitializer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEPreferenceInitializer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSESystemType.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RemoteSystemsProject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/HostOwnedFilterPoolPattern.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/ISystemFilterConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilter.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerCommonMethods.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerReferenceCommonMethods.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPool.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReferenceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapper.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapperInformation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterSimple.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterString.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStringReference.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/messages.properties rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/ISystemProfileOperation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/RemoteObjectId.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemHostPool.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEventManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPostableEventNotifier.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeEvent.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRemoteChangeEventManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemResourceChangeManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/AbstractCacheManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxyComparator.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LogListener.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/IRSEImportExportProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemAnchor.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemJob.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemLocation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceAnchor.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceLocation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceAnchor.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceJob.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceLocation.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEEnvelope.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/SerializingProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMExporter.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMImporter.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferenceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObjectHelper.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObject.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObjectHelper.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/Logger.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/LoggerFactory.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceManager.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceProvider.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOM.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNode.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/package.html rse/plugins/org.eclipse.rse.efs/.classpath rse/plugins/org.eclipse.rse.efs/.cvsignore rse/plugins/org.eclipse.rse.efs/.project rse/plugins/org.eclipse.rse.efs/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.efs/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.efs/about.html rse/plugins/org.eclipse.rse.efs/build.properties rse/plugins/org.eclipse.rse.efs/plugin.properties rse/plugins/org.eclipse.rse.efs/plugin.xml rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Activator.java rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Messages.java rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStore.java rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileSystem.java rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RemoteEditorManager.java rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/messages.properties rse/plugins/org.eclipse.rse.files.ui/.classpath rse/plugins/org.eclipse.rse.files.ui/.cvsignore rse/plugins/org.eclipse.rse.files.ui/.project rse/plugins/org.eclipse.rse.files.ui/.settings/.api_filters rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.pde.prefs rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.files.ui/about.html rse/plugins/org.eclipse.rse.files.ui/build.properties rse/plugins/org.eclipse.rse.files.ui/icons/full/elcl16/synced.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/system_search.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfile.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfiles_obj.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfileslive_obj.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfolder.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdrive.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdriveopen.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemsearchresult.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/archive_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/binary_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_binary_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exscript_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/shared_objunix_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/sharedlib_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/symblclnk_ovr.gif rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/virtual_tsk.gif rse/plugins/org.eclipse.rse.files.ui/plugin.properties rse/plugins/org.eclipse.rse.files.ui/plugin.xml rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileMessages.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/FileDialogFactory.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/ISaveAsDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemCachedRemoteResource.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemMountPathMapper.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResource.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResourceManager.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteManager.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarker.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarkerSetElement.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemotePath.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteResource.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditor.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemSafeFileOutputStream.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/ISystemRemoteFolderBrowseCompleteListener.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileWidgetHelpers.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/ISystemFileConstants.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SynchronizeCacheActionDelegate.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareFilesAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareWithEditionAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCreateEditActions.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDoubleClickEditAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDownloadConflictAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileInPlaceAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileLineAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilePlatformAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditionAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemFileUpdateFilterAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterFromFolderAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFolderAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemReplaceWithEditionAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SaveAsDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/DefaultMountPathMapper.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/ISystemRemoteCoreConstants.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemFileNameHelper.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarker.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerInfo.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerManager.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerSet.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinition.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemotePath.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResource.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceInfo.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceManager.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemOpenSearchPageAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteObjectAPIProvider.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesDialog.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/DownloadAndOpenJob.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewFileAdapterFactory.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultAdapterFactory.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultSetAdapterFactory.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/widgets/SystemFileTreeAndListGroup.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemFileNewConnectionWizardPage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizardMainPage.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizardMainPage.java rse/plugins/org.eclipse.rse.importexport/.classpath rse/plugins/org.eclipse.rse.importexport/.cvsignore rse/plugins/org.eclipse.rse.importexport/.project rse/plugins/org.eclipse.rse.importexport/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.importexport/HelpContexts.xml rse/plugins/org.eclipse.rse.importexport/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.importexport/about.html rse/plugins/org.eclipse.rse.importexport/build.properties rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_export.gif rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_import.gif rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/export_wiz.gif rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/import_wiz.gif rse/plugins/org.eclipse.rse.importexport/plugin.properties rse/plugins/org.eclipse.rse.importexport/plugin.xml rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/IRemoteImportExportConstants.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportDescriptionFilesViewerFilter.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportPlugin.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportProblemDialog.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.properties rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportRunnable.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportUtil.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.properties rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Debug.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemElement.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemStructureProvider.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IImportStructureProvider.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionReader.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionWriter.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionReader.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionWriter.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/MinimizedFileSystemElement.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizard.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizardPage1.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportData.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionReader.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionWriter.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportFromProjectActionDelegate.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportOperation.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportData.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportExportActionDelegate.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportToProjectActionDelegate.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenExportWizardActionDelegate.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenImportWizardActionDelegate.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOverwriteQuery.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizard.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizardPage1.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeExpandDropListener.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeScrollDropListener.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java rse/plugins/org.eclipse.rse.processes.ui/.classpath rse/plugins/org.eclipse.rse.processes.ui/.cvsignore rse/plugins/org.eclipse.rse.processes.ui/.project rse/plugins/org.eclipse.rse.processes.ui/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.processes.ui/HelpContexts.xml rse/plugins/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.processes.ui/about.html rse/plugins/org.eclipse.rse.processes.ui/build.properties rse/plugins/org.eclipse.rse.processes.ui/icons/full/dlcl16/killprocessj.gif rse/plugins/org.eclipse.rse.processes.ui/icons/full/elcl16/killprocessj.gif rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess.gif rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess_obj.gif rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/inactiveprocess_obj.gif rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystem_obj.gif rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystemlive_obj.gif rse/plugins/org.eclipse.rse.processes.ui/messageFile.dtd rse/plugins/org.eclipse.rse.processes.ui/plugin.properties rse/plugins/org.eclipse.rse.processes.ui/plugin.xml rse/plugins/org.eclipse.rse.processes.ui/processmessages.xml rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.properties rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemProcessUpdateFilterAction.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillDialog.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableProvider.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableRow.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/ISystemProcessPropertyConstants.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessStatesContentProvider.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.properties rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewProcessAdapterFactory.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java rse/plugins/org.eclipse.rse.sdk/.classpath rse/plugins/org.eclipse.rse.sdk/.project rse/plugins/org.eclipse.rse.sdk/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.sdk/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.sdk/about.html rse/plugins/org.eclipse.rse.sdk/about.ini rse/plugins/org.eclipse.rse.sdk/about.mappings rse/plugins/org.eclipse.rse.sdk/about.properties rse/plugins/org.eclipse.rse.sdk/build.properties rse/plugins/org.eclipse.rse.sdk/eclipse32.png rse/plugins/org.eclipse.rse.sdk/plugin.properties rse/plugins/org.eclipse.rse.sdk/src/readme.txt rse/plugins/org.eclipse.rse.services.dstore/.classpath rse/plugins/org.eclipse.rse.services.dstore/.cvsignore rse/plugins/org.eclipse.rse.services.dstore/.project rse/plugins/org.eclipse.rse.services.dstore/.settings/.api_filters rse/plugins/org.eclipse.rse.services.dstore/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.services.dstore/about.html rse/plugins/org.eclipse.rse.services.dstore/about.ini rse/plugins/org.eclipse.rse.services.dstore/about.mappings rse/plugins/org.eclipse.rse.services.dstore/about.properties rse/plugins/org.eclipse.rse.services.dstore/build.properties rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc rse/plugins/org.eclipse.rse.services.dstore/eclipse32.png rse/plugins/org.eclipse.rse.services.dstore/export.jardesc rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/EnvironmentMiner.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ICancellableHandler.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalDataStoreConstants.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalProcessDataStoreConstants.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalByteStreamHandler.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalProcessMiner.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/QueryPathThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/CommandPattern.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/OutputPattern.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/ParsedOutput.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/Patterns.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ClassFileParser.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyBatchThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopySingleThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFileThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFolderThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileClassifier.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileDescriptors.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileQueryThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/QueryThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/RenameThread.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalDownloadHandler.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalSearchHandler.java rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/processes/ProcessDEComparator.java rse/plugins/org.eclipse.rse.services.dstore/plugin.properties rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/minerFile.dat rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/patterns.dat rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/rsecomm.properties rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/ssl.properties rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/auth.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/auth.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/check.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/daemon.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/daemon.bat rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/server.bat rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/Activator.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/IDStoreMessageIds.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.properties rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreInputStream.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreOutputStream.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreVirtualHostFile.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreHostProcess.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/rmtservice/DStoreRemoteServiceService.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchResultConfiguration.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostOutput.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostShell.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellOutputReader.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/IDStoreService.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/FileSystemMessageUtil.java rse/plugins/org.eclipse.rse.services.local/.classpath rse/plugins/org.eclipse.rse.services.local/.cvsignore rse/plugins/org.eclipse.rse.services.local/.project rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.core.resources.prefs rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.services.local/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.services.local/about.html rse/plugins/org.eclipse.rse.services.local/about.ini rse/plugins/org.eclipse.rse.services.local/about.mappings rse/plugins/org.eclipse.rse.services.local/about.properties rse/plugins/org.eclipse.rse.services.local/build.properties rse/plugins/org.eclipse.rse.services.local/eclipse32.png rse/plugins/org.eclipse.rse.services.local/plugin.properties rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/Activator.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalMessageIds.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalService.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.properties rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalHostFile.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalVirtualHostFile.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/processes/LocalProcessService.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchHandler.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchResult.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchService.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalHostShell.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellOutputReader.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellService.java rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java rse/plugins/org.eclipse.rse.services/.classpath rse/plugins/org.eclipse.rse.services/.cvsignore rse/plugins/org.eclipse.rse.services/.options rse/plugins/org.eclipse.rse.services/.project rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.core.resources.prefs rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.ui.prefs rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.services/about.html rse/plugins/org.eclipse.rse.services/build.properties rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ITarConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemArchiveUtil.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemUniversalZipEntry.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/TgzFile.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract4ByteNumericInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract8ByteNumericInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractAttributeInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCPInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCommonInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractRefInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassFileUTF8Reader.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/DoubleInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedClassLoader.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedDataInputStream.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldRefInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FloatInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IClassFileConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IntegerInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/InterfaceMethodRefInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/LongInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodRefInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/NameAndTypeInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/StringInfo.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/UTF8Info.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/FileTypeMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClassifierConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISearchPatternMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IServiceConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemFileTypes.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemOperationMonitor.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/NamePatternMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemOperationMonitor.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemReentrantMutex.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemJarHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTgzHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemZipHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarEntry.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarFile.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarOutputStream.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/VirtualChild.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/BasicClassFileParser.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUtil.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/IndicatorException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SimpleSystemMessage.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemElementNotFoundException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationCancelledException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationFailedException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteMessageException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteSecurityException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnexpectedErrorException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnsupportedOperationException.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/HostProcessFilterImpl.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcess.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcessFilter.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteTypes.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/IRemoteServerProcess.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessComparator.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalAIXProcessHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalLinuxProcessHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalMacOSXProcessHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalServerProcessImpl.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchConstants.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemNonRegexMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchFileNameMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchLineMatch.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchMatch.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatchLocator.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatcher.java rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchUtil.java rse/plugins/org.eclipse.rse.services/patterns.dat rse/plugins/org.eclipse.rse.services/plugin.properties rse/plugins/org.eclipse.rse.services/plugin.xml rse/plugins/org.eclipse.rse.services/schema/archivehandlers.exsd rse/plugins/org.eclipse.rse.services/schema/codePageConverters.exsd rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/Activator.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/RSEServicesMessages.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/messages.properties rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/CommandPattern.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/OutputPattern.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/AbstractTerminalService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/AbstractTerminalShell.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/BaseShellDecorator.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/IBaseShell.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ITerminalService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ITerminalShell.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ProcessBaseShell.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/TerminalShellDecorator.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/package.html rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/AbstractService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Mutex.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/RemoteUtil.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/CodePageConverterManager.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/DefaultFileServiceCodePageConverter.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/HostFilePermissions.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFilePermissionsService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileServiceCodePageConverter.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFile.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissions.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissionsContainer.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/PendingHostFilePermissions.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/package.html rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResult.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResultConfiguration.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/HostSearchResultSet.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchConstants.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResult.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfiguration.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfigurationFactory.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultSet.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchHandler.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractShellService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellChangeEvent.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellOutputStream.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostOutput.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShell.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellChangeEvent.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputListener.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputNotifier.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputReader.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/ParsedOutput.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/Patterns.java rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/SimpleHostOutput.java rse/plugins/org.eclipse.rse.shells.ui/.classpath rse/plugins/org.eclipse.rse.shells.ui/.cvsignore rse/plugins/org.eclipse.rse.shells.ui/.project rse/plugins/org.eclipse.rse.shells.ui/.settings/.api_filters rse/plugins/org.eclipse.rse.shells.ui/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.shells.ui/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.shells.ui/about.html rse/plugins/org.eclipse.rse.shells.ui/build.properties rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/commands_view.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshellhistory.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshelloutput.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/removeshell.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/commands_view.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommands_obj.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommandslive_obj.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvar.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarlibpath.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarpath.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshell.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshelllive.gif rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/commands_view.gif rse/plugins/org.eclipse.rse.shells.ui/plugin.properties rse/plugins/org.eclipse.rse.shells.ui/plugin.xml rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.properties rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellsUIPlugin.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemBaseShellAction.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellHistoryAction.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellOutputAction.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemShowInShellViewAction.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateRemoveShellAction.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/handlers/LaunchShellCommandHandler.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewWorkbook.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsUI.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewProvider.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewOutputAdapterFactory.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewRemoteErrorAdapter.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryViewerConfiguration.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ISystemCommandTextModifyListener.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/TabFolderLayout.java rse/plugins/org.eclipse.rse.subsystems.files.core/.classpath rse/plugins/org.eclipse.rse.subsystems.files.core/.cvsignore rse/plugins/org.eclipse.rse.subsystems.files.core/.project rse/plugins/org.eclipse.rse.subsystems.files.core/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.subsystems.files.core/about.html rse/plugins/org.eclipse.rse.subsystems.files.core/build.properties rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.properties rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.xml rse/plugins/org.eclipse.rse.subsystems.files.core/schema/remoteFileTypes.exsd rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractJavaLanguageUtility.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtility.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtilityFactory.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/Activator.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/IJavaLanguageUtility.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFileMessageIds.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFilePreferencesConstants.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemRemoteEditConstants.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemTextEditorConstants.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePermissionsAdapterFactory.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePropertyTester.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.properties rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemAPIProviderImpl.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemConfigurationAPIProviderImpl.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemRemoteDirectoryMatcher.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePath.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePathUtil.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeMapping.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeRegistry.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtility.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtilityFactory.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemIFileProperties.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/IRemotePath.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileAPIProvider.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileRemoteTypes.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeMapping.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeRegistry.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommand.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommandMessage.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileFilterString.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileUtility.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemInputStream.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemOutputStream.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/OutputRefresh.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IHostFileToRemoteFileAdapter.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileContext.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionCodes.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionMessages.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileFactory.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileWrapper.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchConstants.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchResult.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IVirtualRemoteFile.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileChildrenContentsType.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCodeException.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileContext.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEmpty.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEncodingManager.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileRoot.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSchedulingRule.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderChildrenContentsType.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResult.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultsContentsType.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/SystemRemoteFileMatcher.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileFilterString.java rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/.classpath rse/plugins/org.eclipse.rse.subsystems.files.dstore/.cvsignore rse/plugins/org.eclipse.rse.subsystems.files.dstore/.project rse/plugins/org.eclipse.rse.subsystems.files.dstore/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.subsystems.files.dstore/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.subsystems.files.dstore/about.html rse/plugins/org.eclipse.rse.subsystems.files.dstore/build.properties rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfiles_obj.gif rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfileslive_obj.gif rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.properties rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.xml rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/Activator.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileAdapter.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreJavaLanguageUtility.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreLanguageUtilityFactory.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreSearchResult.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreVirtualFile.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/RemoteFilePropertyChangeListener.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreWindowsFileSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/package.html rse/plugins/org.eclipse.rse.subsystems.files.local/.classpath rse/plugins/org.eclipse.rse.subsystems.files.local/.cvsignore rse/plugins/org.eclipse.rse.subsystems.files.local/.project rse/plugins/org.eclipse.rse.subsystems.files.local/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.subsystems.files.local/about.html rse/plugins/org.eclipse.rse.subsystems.files.local/build.properties rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfiles_obj.gif rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfileslive_obj.gif rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.properties rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.xml rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/Activator.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalJavaLanguageUtility.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalLanguageUtilityFactory.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFile.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFileAdapter.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalVirtualFile.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/package.html rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore rse/plugins/org.eclipse.rse.subsystems.processes.core/.project rse/plugins/org.eclipse.rse.subsystems.processes.core/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/Activator.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.shells.core/.classpath rse/plugins/org.eclipse.rse.subsystems.shells.core/.cvsignore rse/plugins/org.eclipse.rse.subsystems.shells.core/.project rse/plugins/org.eclipse.rse.subsystems.shells.core/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.subsystems.shells.core/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.subsystems.shells.core/about.html rse/plugins/org.eclipse.rse.subsystems.shells.core/build.properties rse/plugins/org.eclipse.rse.subsystems.shells.core/plugin.properties rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/Activator.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.properties rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/CandidateCommand.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommand.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommandMessage.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperationManager.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteError.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteOutput.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/ICandidateCommand.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IServiceCommandShell.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.classpath rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.cvsignore rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.project rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.subsystems.shells.dstore/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.subsystems.shells.dstore/about.html rse/plugins/org.eclipse.rse.subsystems.shells.dstore/build.properties rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommands_obj.gif rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommandslive_obj.gif rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.properties rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/Activator.java rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/package.html rse/plugins/org.eclipse.rse.terminals.ui/.classpath rse/plugins/org.eclipse.rse.terminals.ui/.cvsignore rse/plugins/org.eclipse.rse.terminals.ui/.project rse/plugins/org.eclipse.rse.terminals.ui/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.terminals.ui/about.html rse/plugins/org.eclipse.rse.terminals.ui/about.ini rse/plugins/org.eclipse.rse.terminals.ui/about.mappings rse/plugins/org.eclipse.rse.terminals.ui/about.properties rse/plugins/org.eclipse.rse.terminals.ui/build.properties rse/plugins/org.eclipse.rse.terminals.ui/eclipse32.png rse/plugins/org.eclipse.rse.terminals.ui/icons/removeterminal.gif rse/plugins/org.eclipse.rse.terminals.ui/icons/terminal_view.gif rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommands_obj.gif rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommandslive_obj.gif rse/plugins/org.eclipse.rse.terminals.ui/plugin.properties rse/plugins/org.eclipse.rse.terminals.ui/plugin.xml rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/Activator.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalServiceHelper.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/RemoveTerminalAction.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/ShowInTerminalViewAction.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/TerminalElementBaseAction.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapter.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapterFactory.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/handlers/LaunchTerminalCommandHandler.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectionThread.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectorImpl.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementsAdapterFactory.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewTab.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalsUI.java rse/plugins/org.eclipse.rse.ui/.classpath rse/plugins/org.eclipse.rse.ui/.cvsignore rse/plugins/org.eclipse.rse.ui/.options rse/plugins/org.eclipse.rse.ui/.project rse/plugins/org.eclipse.rse.ui/.settings/.api_filters rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.ui/HelpContexts.xml rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/DefaultUIInteractionProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.properties rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/PreferencesMapper.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSEImageMap.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSESystemTypeAdapterFactory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSEUIInitJob.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemProfileForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResourceListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemSortableSelection.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemTabFolderLayout.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingBrowseWithAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingCompareWithAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingExpandToAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingGoToAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingNewAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingOpenWithAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingPulldownMenuAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServerBaseAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServersAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingReplaceWithAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingViewAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingWorkWithAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionCopyString.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionDeleteString.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringDown.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringUp.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionPasteString.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearAllPasswordsAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearPasswordAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonRenameAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonSelectAllAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAllSubSystemsAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExpandAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExportConnectionAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterPoolReferenceAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterPoolReferenceAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterPoolReferenceSelectAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterRemoveFilterPoolReferenceAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemImportConnectionAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveDownConnectionAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveUpConnectionAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemNewProfileAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenExplorerPerspectiveAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenRSEPerspectiveAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceRestoreStateAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceShowFilterPoolsAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameSelectAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStartAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStopAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemResolveFilterStringAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRunAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSeparatorAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInMonitorAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInTableAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowPreferencesPageAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemStringPromptAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManagerForTesting.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTeamReloadAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTestFilterStringAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToAllAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToBaseAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkWithProfilesAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/CopyRunnable.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyProfileDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableRow.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableRow.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableRow.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemResolveFilterStringDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemTestFilterStringDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemWorkWithHistoryDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolManagerUIProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWizardDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemUnNamedFilterDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.properties rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferencePage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/RemoteSystemsPreferencePage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerConnectionSecurityPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerLauncherPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectorServicesPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolReferencePropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemLoggingPreferencePage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemPreferenceInitializer.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewProfilePropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ContextObjectWithViewer.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ElementComparer.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ISystemMementoConstants.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SubSystemConfigurationAdapterFactory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxCellEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxPropertyDescriptor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDecoratingLabelProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDeferredTableTreeContentManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritablePropertyData.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextCellEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextPropertyDescriptor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveHelpers.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveLayout.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPropertySheetForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResolveFilterStringAPIProviderImpl.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewFilter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewSorter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAdapterFactory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewCompositeActionGroup.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterStringAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewLabelAndContentProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMenuListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMessageAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewNewConnectionPromptAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartFrameSource.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartGotoActionGroup.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPromptableAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.properties rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewRootInputAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewScratchpadAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/BrowseAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearSelectedAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorUI.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/TabFolderLayout.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/BrowseAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchClearHistoryAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchCopyToClipboardAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchHistoryAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveAllMatchesAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableView.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableViewProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchUI.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewContentProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewLabelProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemResourceAdaptableProfile.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamView.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryNode.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewContentProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewInputProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewLabelProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeActiveProfileAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetNode.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewRefreshAllAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewResourceAdapterFactory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/SSLForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/ServerConnectionSecurityForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemConnectionFormCaller.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemContextMenuConstants.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemDeleteTarget.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMassager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPageCompleteListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemRenameTarget.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemStringsInputAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemThemeConstants.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemVerifyListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemViewSupplier.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerAddQuotes.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCase.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerRemoveQuotes.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/Mnemonics.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemActionViewerFilter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemMenuManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplaySystemMessageAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemCopyTargetSelectionCallback.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDialogAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemViewMenuListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemWizardAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/LazyDownloadJob.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDialogAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDummyAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseWizardAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/EnvironmentVariablesPromptDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ICredentialsValidator.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPasswordPromptDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPromptDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemTypedObject.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPromptDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleSelectDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemFilterStringEditPaneListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/ISystemNewFilterActionConfigurator.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolWizardAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterWizardAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemFilterWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemNewFilterWizardConfigurator.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInputs.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInterface.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogOutputs.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardConfigurator.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardInfoPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLine.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLineTarget.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/StatusLineManagerAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageStatus.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPageContainer.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemOpenQuickOpenDialogAction.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenDialog.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenPageDescriptor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUI.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUtil.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/ISystemRunnableContext.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/Policy.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemDeferredTreeContentManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemJobRunnableContext.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemProgressDialogRunnableContext.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemSchedulingRule.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardErrorUpdater.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemSubSystemPropertyPageCoreForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBooleanFieldEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemComboBoxFieldEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemIntegerFieldEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemKeyValueFieldEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemStringFieldEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCore.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewCategoryPropertyPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidator.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/SystemNumericVerifyListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFileName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFolderName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerInput.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerRangeInput.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLocalPath.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongInput.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongRangeInput.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPathName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPortInput.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSourceType.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSpecialChar.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserId.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ContextObject.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IContextObject.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IRSEViewPart.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemLongRunningRequestListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemPropertyConstants.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoveElementAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemResourceSelectionInputProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectAllTarget.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProviderCaller.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTableViewColumnManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTree.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewDropDestination.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewRunnableObject.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IViewLinker.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAdapterHelpers.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemLongRunningRequestEvent.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/GridUtil.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IInheritableEntryFieldStateChangeListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IServerLauncherForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemAddListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCollapsableSectionListener.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCombo.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemEditPaneStates.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritButton.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControl.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControlLayout.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteBaseServerLauncherForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteServerLauncherForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemCollapsableSection.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHistoryCombo.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServicesForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertyElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertySetServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RSEModelServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RootServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceServiceElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableContentProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableLabelProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizardPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDialogPageMessageLine.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizardMainPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSEDynamicNewConnectionWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSENewConnectionWizardDescriptor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/ISystemNewConnectionWizardPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEAbstractNewConnectionWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardRegistry.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardCategory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardDescriptor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardRegistryElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardRegistry.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardSelectionTreeDataManager.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardCategory.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardDescriptor.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardRegistryElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeContentProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeLabelProvider.java rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreePatternFilter.java rse/plugins/org.eclipse.rse.ui/about.html rse/plugins/org.eclipse.rse.ui/build.properties rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/new.gif rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newconnection_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfile_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilter_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpool_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpoolref_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfolder_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newprofile_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/cview16/commands_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_persp.gif rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/cview16/team_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clear.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearall.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearselected.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/deletereference.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/down.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/editfilter.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/lock.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeProfileActive.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeprofileinactive.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/monitor_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/move.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/rename.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/run.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremovealll.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremoveselected.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectpool.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectprofile.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/stop.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/systemprofile.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/up.gif rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithfilterpools.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/new.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newconnection_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfile_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilter_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpool_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpoolref_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfolder_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newprofile_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/systemshowintable.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clear.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearall.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearselected.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/deletereference.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/down.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/editfilter.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/lock.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileactive.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileinactive.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/monitor_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/move.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/refresh_nav.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/rename.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/run.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveall.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveselected.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectpool.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectprofile.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/stop.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemprofile.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemshowintable.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/up.gif rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithfilterpools.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/new.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newconnection_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfile_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilter_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpool_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpoolref_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfolder_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newprofile_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/etool16/systemshowintable.gif rse/plugins/org.eclipse.rse.ui/icons/full/eview16/commands_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_persp.gif rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/eview16/team_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowdown_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowup_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/connectorservice_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/error.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/info.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/key.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/launcher_config_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/properties_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/service_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/ssl_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_persp.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_search.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemblank.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcancel.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommands_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommandslive_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnection.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnectionlive.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemempty.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfile.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfiles_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfileslive_obj.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilter.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterpool.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterstring.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfolder.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemhelp.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systeminfo.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemok.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprocess.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile_active.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdrive.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdriveopen.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemsearchresult.gif rse/plugins/org.eclipse.rse.ui/icons/full/obj16/warning.gif rse/plugins/org.eclipse.rse.ui/icons/full/ovr16/error_ovr.gif rse/plugins/org.eclipse.rse.ui/icons/full/view16/commands_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/view16/scratchpad_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_persp.gif rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/view16/team_view.gif rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newconnection_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfile_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilter_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilterpool_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfolder_wiz.gif rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newprofile_wiz.gif rse/plugins/org.eclipse.rse.ui/messageFile.dtd rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRunnableContextWrapper.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemScratchpad.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemPromptableObject.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemRegistryUI.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemShellProvider.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemRemoteElementResourceSet.java rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemResourceChangeEventUI.java rse/plugins/org.eclipse.rse.ui/plugin.properties rse/plugins/org.eclipse.rse.ui/plugin.xml rse/plugins/org.eclipse.rse.ui/schema/mountPathMappers.exsd rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizards.exsd rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapter.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapterFactory.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemPropertyTester.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/ISubSystemConfigurationAdapter.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardConnectorService.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardCredentialsProvider.java rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/package.html rse/plugins/org.eclipse.rse.ui/systemmessages.xml rse/plugins/org.eclipse.rse.useractions/.classpath rse/plugins/org.eclipse.rse.useractions/.cvsignore rse/plugins/org.eclipse.rse.useractions/.project rse/plugins/org.eclipse.rse.useractions/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse.useractions/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse.useractions/about.html rse/plugins/org.eclipse.rse.useractions/about.ini rse/plugins/org.eclipse.rse.useractions/about.mappings rse/plugins/org.eclipse.rse.useractions/about.properties rse/plugins/org.eclipse.rse.useractions/build.properties rse/plugins/org.eclipse.rse.useractions/eclipse32.png rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/compile.gif rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithcompilecmds.gif rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithnamedtypes.gif rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithuseractions.gif rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/compile.gif rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithcompilecmds.gif rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithnamedtypes.gif rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithuseractions.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibm_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibmuser_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_new_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_user_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_user_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_new_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_new_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_user_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_new_obj.gif rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_obj.gif rse/plugins/org.eclipse.rse.useractions/plugin.properties rse/plugins/org.eclipse.rse.useractions/plugin.xml rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionContext.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionModel.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionContext.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionModel.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionRegistry.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.properties rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/ISystemCompileManagerAdapter.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/UniversalCompileManagerAdapter.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/ISystemUDActionSubsystemAdapter.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/UniversalSystemUDActionSubsystemAdapter.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCascadingCompileAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCompileAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompileMenu.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemWorkWithCompileCommandsAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/uda/SystemDynamicUserActionMenu.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileProfile.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompilableSource.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileProfile.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstitutor.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommand.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommands.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemLocalFiles.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemUniversalFiles.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditPaneFiles.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemCommandTextAdditionalGUIProvider.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemSubstitutor.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVar.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVarList.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandTextField.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandViewerConfiguration.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemEditCommandDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemPromptCommandDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneHoster.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneListener.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandSubstitutor.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileXMLConstants.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompilableSource.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommand.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionCopy.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionDelete.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveDown.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveUp.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionPaste.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionRestoreDefaults.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandContentProvider.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributor.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorReader.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileMultipleSelectAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileProfile.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileRemoteObjectMatcher.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileType.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommand.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommands.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemNewCompileSrcTypeDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemPromptCompileCommandDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAConstants.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAEditPaneHoster.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDSelectTypeListener.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTreeView.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTypeEditPaneTypesSelector.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDWorkWithDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemXMLElementWrapperFactory.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemPromptUDADialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeByProfileAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAFileTypesForName.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResolvedTypes.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.properties rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDARestoreDefaultsActions.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionElement.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAsBaseAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeViewLabelProvider.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSelectTypesForm.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionCopy.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionDelete.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveDown.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveUp.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionPaste.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeViewNewItem.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeElement.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtension.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtensionManager.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDAsDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDTypeDialog.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemXMLElementWrapper.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/MatchStr.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAFileTypesForName.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAResolvedTypes.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java rse/plugins/org.eclipse.rse/.classpath rse/plugins/org.eclipse.rse/.project rse/plugins/org.eclipse.rse/.settings/org.eclipse.jdt.core.prefs rse/plugins/org.eclipse.rse/META-INF/MANIFEST.MF rse/plugins/org.eclipse.rse/about.html rse/plugins/org.eclipse.rse/about.ini rse/plugins/org.eclipse.rse/about.mappings rse/plugins/org.eclipse.rse/about.properties rse/plugins/org.eclipse.rse/build.properties rse/plugins/org.eclipse.rse/eclipse32.png rse/plugins/org.eclipse.rse/plugin.properties rse/plugins/org.eclipse.rse/src/readme.txt rse/plugins/readme.txt rse/readme.txt rse/tests/readme.txt terminal/org.eclipse.tm.terminal-feature/.project terminal/org.eclipse.tm.terminal-feature/build.properties terminal/org.eclipse.tm.terminal-feature/epl-v10.html terminal/org.eclipse.tm.terminal-feature/feature.properties terminal/org.eclipse.tm.terminal-feature/feature.xml terminal/org.eclipse.tm.terminal-feature/license.html terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/eclipse32.png terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties terminal/org.eclipse.tm.terminal.sdk-feature/.project terminal/org.eclipse.tm.terminal.sdk-feature/build.properties terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpg terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml terminal/org.eclipse.tm.terminal.sdk-feature/license.html terminal/org.eclipse.tm.terminal/.classpath terminal/org.eclipse.tm.terminal/.cvsignore terminal/org.eclipse.tm.terminal/.options terminal/org.eclipse.tm.terminal/.project terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs terminal/org.eclipse.tm.terminal/HelpContexts.xml terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF terminal/org.eclipse.tm.terminal/README.txt terminal/org.eclipse.tm.terminal/about.html terminal/org.eclipse.tm.terminal/about.ini terminal/org.eclipse.tm.terminal/about.mappings terminal/org.eclipse.tm.terminal/about.properties terminal/org.eclipse.tm.terminal/build.properties terminal/org.eclipse.tm.terminal/eclipse32.png terminal/org.eclipse.tm.terminal/icons/clcl16/clear_co.gif terminal/org.eclipse.tm.terminal/icons/dlcl16/clear_co.gif terminal/org.eclipse.tm.terminal/icons/elcl16/clear_co.gif terminal/org.eclipse.tm.terminal/plugin.properties terminal/org.eclipse.tm.terminal/plugin.xml terminal/org.eclipse.tm.terminal/schema/terminalConnectors.exsd terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStream.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ICommandInputField.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalListener.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalViewControl.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/TerminalViewControlFactory.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/AbstractTerminalAction.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.properties terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ImageConsts.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionClearAll.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCopy.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCut.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionSelectAll.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/ITerminalControlForText.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalInputStream.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.properties terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalPlugin.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/IVT100EmulatorBackend.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/LoggingOutputStream.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100BackendTraceDecorator.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/ISnapshotChanges.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SnapshotChanges.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextData.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextData.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScroll.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshot.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStore.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindow.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsPage.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsStore.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalControl.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/LayeredSettingsStore.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/PreferenceSettingStore.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalState.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/provider/TerminalConnectorImpl.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/GridCanvas.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ILinelRenderer.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModel.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModelListener.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStream.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PollingTextCanvasModel.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/StyleMap.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/VirtualCanvas.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextData.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataReadOnly.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataSnapshot.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/LineSegment.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/Style.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/StyleColor.java terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/TerminalTextDataFactory.java terminal/readme.txt wince/readme.txt
Diffstat
-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.txt78
-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.sh154
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/doit_nightly.sh87
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/make_signed.sh105
-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.pl110
-rw-r--r--releng/org.eclipse.rse.build/build.properties53
-rw-r--r--releng/org.eclipse.rse.build/build.rb91
-rw-r--r--releng/org.eclipse.rse.build/customTargets.xml677
-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.sh66
-rw-r--r--releng/org.eclipse.rse.build/maps/discovery.map10
-rw-r--r--releng/org.eclipse.rse.build/maps/rse.map67
-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.map7
-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.sh83
-rwxr-xr-xreleng/org.eclipse.rse.build/setup.sh275
-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.php225
-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.php337
-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/addSites.sh21
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/doit_nightly.sh28
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/infocenter.sh36
-rw-r--r--releng/org.eclipse.rse.releng.infocenter/readme.txt31
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/setup.sh70
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/update.sh117
-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.xml572
-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.xml62
-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.xml187
-rw-r--r--releng/org.eclipse.tm.releng/builder/examples/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/examples/customTargets.xml187
-rw-r--r--releng/org.eclipse.tm.releng/builder/runtime/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml188
-rw-r--r--releng/org.eclipse.tm.releng/builder/sdk/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml187
-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.xml275
-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/wince.map5
-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
-rw-r--r--rse/doc/readme.txt2
-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.xml69
-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.xml142
-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/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/epl-v10.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/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.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.xml71
-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/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.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.xml79
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/license.html79
-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.xml65
-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/eclipse32.pngbin4594 -> 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.xml56
-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/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/plugin.properties13
-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/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.java922
-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.java55
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java28
-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.java506
-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.java271
-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.java1688
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java4552
-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.java518
-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.java227
-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/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.java392
-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.java591
-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.java477
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/DataElementRemover.java239
-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.java156
-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.java1088
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreSSLContext.java95
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DataStoreTrustManager.java151
-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.java43
-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.java96
-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.java1560
-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.properties76
-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.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/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.properties28
-rw-r--r--rse/plugins/org.eclipse.rse.core/eclipse32.pngbin4594 -> 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.xml163
-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.java57
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreStatusCodes.java57
-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.java81
-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.java356
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java25
-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.java53
-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.java107
-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.java48
-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.java176
-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.java355
-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.java650
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java132
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java88
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java307
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java642
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java146
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java78
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java257
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java105
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java43
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java37
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java69
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java105
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java60
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java100
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java61
-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.java273
-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.java107
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java180
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java102
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java62
-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.java32
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEPersistableContainer.java127
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java42
-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.java61
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java38
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java240
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java77
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModifiableContainer.java31
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java160
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java145
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java984
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java97
-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.java158
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java51
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java57
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java55
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java58
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java28
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencingObject.java66
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencingObject.java35
-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.java508
-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.java425
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java33
-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.java74
-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.java689
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java743
-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.java57
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java204
-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.java211
-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.java3134
-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.java581
-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.java663
-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.java149
-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.java101
-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.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.java337
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java780
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileSystem.java111
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RemoteEditorManager.java288
-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.properties57
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/plugin.xml480
-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.java56
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteResource.java176
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditor.java31
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java2006
-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.java451
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java3035
-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.java156
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java426
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties414
-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.java524
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SynchronizeCacheActionDelegate.java233
-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.java122
-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.java591
-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.java180
-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.java206
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditionAction.java385
-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.java69
-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.java68
-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.java495
-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.java44
-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.java673
-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.java650
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java495
-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.java1062
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/DefaultMountPathMapper.java54
-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.java812
-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.java1585
-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.java3659
-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.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/HelpContexts.xml32
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/META-INF/MANIFEST.MF23
-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/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.properties48
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/plugin.xml129
-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.java89
-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.java71
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.properties86
-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.java928
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java157
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java166
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportData.java174
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionReader.java203
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionWriter.java170
-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.java558
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java173
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportData.java219
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java194
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java172
-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.java642
-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.java1563
-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.java387
-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.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.java116
-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.java176
-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.java507
-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/eclipse32.pngbin4594 -> 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/dstore_miners.rmtjardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/export.jardesc18
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/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.java2112
-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.java1496
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java330
-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.java285
-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.java246
-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.java386
-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.java484
-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.pl77
-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.pl78
-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.java2437
-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.java190
-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.java91
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellOutputReader.java185
-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.java275
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java468
-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.java394
-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.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/eclipse32.pngbin4594 -> 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.java1837
-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.java508
-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/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.MF29
-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.java63
-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.java256
-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.java332
-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.java153
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java139
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java619
-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.java80
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties70
-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.java738
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java76
-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.java107
-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.java49
-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/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.xml7
-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.java38
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/messages.properties31
-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/terminals/AbstractTerminalService.java40
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/AbstractTerminalShell.java108
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/BaseShellDecorator.java85
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/IBaseShell.java167
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ITerminalService.java91
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ITerminalShell.java101
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ProcessBaseShell.java150
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/TerminalShellDecorator.java59
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/package.html72
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/AbstractService.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java80
-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.java304
-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.java80
-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.java638
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileServiceCodePageConverter.java66
-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.java115
-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.java169
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostOutput.java20
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShell.java32
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellChangeEvent.java25
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputListener.java22
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputNotifier.java23
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputReader.java26
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.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.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.xml186
-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.java737
-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.java138
-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.java976
-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.java1194
-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.properties23
-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.xml74
-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.java57
-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.java27
-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.java116
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java215
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java1229
-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.java1222
-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.java317
-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.java1494
-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.java106
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java190
-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.java310
-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.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.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.java195
-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.java201
-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.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.java209
-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.java197
-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.java1254
-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.java255
-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.java258
-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.terminals.ui/.classpath11
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/.project28
-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/eclipse32.pngbin4594 -> 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.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/plugin.xml104
-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.java33
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties23
-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/views/RSETerminalConnectionThread.java110
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java44
-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.java182
-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.java457
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java232
-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/.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.prefs5
-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/RSEImageMap.java49
-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.java1051
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties1093
-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/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.java72
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java408
-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.java296
-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.java202
-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.java874
-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.java280
-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.java646
-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.java2058
-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.java160
-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.java1994
-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.java6665
-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.java734
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java436
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java414
-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.java498
-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.java2014
-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/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.java281
-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.java1134
-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.java418
-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.java1705
-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.java296
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemDeleteTarget.java43
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java333
-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.java723
-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.java810
-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.java564
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java1527
-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.java337
-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.java360
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java180
-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.java311
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java754
-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.java35
-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.java1440
-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.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPage.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPageContainer.java46
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemOpenQuickOpenDialogAction.java126
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenDialog.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.java575
-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.java100
-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.java2354
-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.java52
-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.java2116
-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.java610
-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.java109
-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.java107
-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.java103
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceServiceElement.java103
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableContentProvider.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.java434
-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.java389
-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.java162
-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.properties28
-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.java549
-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.java154
-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.properties104
-rw-r--r--rse/plugins/org.eclipse.rse.ui/plugin.xml517
-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.java3434
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java2889
-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.java55
-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.java422
-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.xml613
-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.MF37
-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/eclipse32.pngbin4594 -> 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.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/plugin.xml46
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java86
-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.properties158
-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.java158
-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.java141
-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.java183
-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.java1159
-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.java1350
-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.properties22
-rw-r--r--rse/plugins/org.eclipse.rse/eclipse32.pngbin4594 -> 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/readme.txt2
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.properties142
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.xml37
-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/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/build.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.xml76
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal/.options8
-rw-r--r--terminal/org.eclipse.tm.terminal/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs75
-rw-r--r--terminal/org.eclipse.tm.terminal/HelpContexts.xml18
-rw-r--r--terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF34
-rw-r--r--terminal/org.eclipse.tm.terminal/README.txt17
-rw-r--r--terminal/org.eclipse.tm.terminal/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal/build.properties39
-rw-r--r--terminal/org.eclipse.tm.terminal/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/icons/clcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/icons/dlcl16/clear_co.gifbin364 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/icons/elcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/plugin.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal/plugin.xml109
-rw-r--r--terminal/org.eclipse.tm.terminal/schema/terminalConnectors.exsd98
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java214
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStream.java163
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java308
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ICommandInputField.java35
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalListener.java33
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalViewControl.java108
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/TerminalViewControlFactory.java22
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/AbstractTerminalAction.java101
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.java34
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.properties22
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ImageConsts.java31
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionClearAll.java55
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCopy.java64
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCut.java55
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java62
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionSelectAll.java52
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/ITerminalControlForText.java34
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalInputStream.java334
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.java26
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.properties21
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalPlugin.java84
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/IVT100EmulatorBackend.java172
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/LoggingOutputStream.java48
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100BackendTraceDecorator.java144
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java1173
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java407
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java1005
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/ISnapshotChanges.java90
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SnapshotChanges.java391
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextData.java100
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextData.java265
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScroll.java250
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshot.java299
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStore.java333
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindow.java198
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsPage.java51
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsStore.java45
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java141
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalControl.java117
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/LayeredSettingsStore.java62
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java198
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/PreferenceSettingStore.java59
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java95
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalState.java56
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/provider/TerminalConnectorImpl.java161
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java347
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/GridCanvas.java197
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ILinelRenderer.java24
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModel.java84
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModelListener.java24
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStream.java309
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PollingTextCanvasModel.java35
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/StyleMap.java245
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java309
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java163
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/VirtualCanvas.java345
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextData.java152
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataReadOnly.java72
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataSnapshot.java223
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/LineSegment.java35
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/Style.java154
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/StyleColor.java54
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/TerminalTextDataFactory.java20
-rw-r--r--terminal/readme.txt4
-rw-r--r--wince/readme.txt5
2398 files changed, 0 insertions, 400159 deletions
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 2db2e153d..000000000
--- a/releng/org.eclipse.rse.build/README_build.txt
+++ /dev/null
@@ -1,78 +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 `pws` $HOME/ws_30x
-ln -s /home/data/httpd/download.eclipse.org/dsdp/tm $HOME/downloads-tm
-cp -R ../ws_30x/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/ws_30x
-./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 ws_30x
-./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 ws_30x
-./doit_irsbuild.sh S 2.0RC3
-
-3b) Promote an S-build to official
-----------------------------------
-After testing the "invisible" S-build:
-ssh build.eclipse.org
-cd ws_30x/publish/S-2.0RC3*
-mv package.count.orig package.count
-
-3c) Promote an S-build to Europa
---------------------------------
-After S-build has been prepared (on signedUpdates)
-On local Eclipse client, checkout Europa projects according to
- http://wiki.eclipse.org/Europa_Build
-Open file
- org.eclipse.europa.tools/build-home/features-dsdp-tm.xml
-ssh build.eclipse.org
-cd downloads-tm/updates/milestones
-rm -rf features.prev plugins.prev
-mv features features.prev
-mv plugins plugins.prev
-cp -R ../../signedUpdates/features .
-cp -R ../../signedUpdates/plugins .
-cd bin
-./mkTestUpdates.sh
-From the shell where the build is ongoing, copy & Paste the
- version numbers of the features listed in feature-dsdp-tm.xml
- into features-dsdp-tm.xml
-Commit features-dsdp-tm.xml
-
-
-ssh build.eclipse.org
-
-
-
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 900d5d691..000000000
--- a/releng/org.eclipse.rse.build/bin/batch_sign.sh
+++ /dev/null
@@ -1,86 +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
-#*******************************************************************************
-#:#
-#:# 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/webtools/apps/IBMJava2-ppc64-142/bin:$PATH
-export PATH=/shared/webtools/apps/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 04c1a39b7..000000000
--- a/releng/org.eclipse.rse.build/bin/doit_irsbuild.sh
+++ /dev/null
@@ -1,154 +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 testLegacyUpdates 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/webtools/apps/IBMJava2-ppc64-142/bin:$PATH
-#export PATH=/shared/webtools/apps/IBMJava2-ppc-142/bin:$PATH
-export PATH=${HOME}/ws_30x/IBMJava2-ppc-142/bin:$PATH
-
-#Get parameters
-mapTag=HEAD
-buildType=$1
-buildId=$2
-case x$buildType in
- xP|xN|xI|xS) ok=1 ;;
- xJ) mapTag=R3_1_maintenance ; ok=1 ;;
- xM|xK|xL|xR) 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/ws_30x
-#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/ws_30x/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/ws_30x/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
- cp -f RSE-remotecdt-*.zip ../N.latest/RSE-remotecdt-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 testLegacyUpdates site
- echo "Refreshing update site"
- cd $HOME/downloads-tm/testLegacyUpdates/bin
- cvs update
- ./mkTestUpdates.sh
- #Update the signedLegacyUpdates site
- echo "Refreshing signedLegacyUpdates site"
- cd $HOME/downloads-tm/signedLegacyUpdates/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 d0f9d6ff3..000000000
--- a/releng/org.eclipse.rse.build/bin/doit_nightly.sh
+++ /dev/null
@@ -1,87 +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
-#*******************************************************************************
-#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/webtools/apps/IBMJava2-ppc64-142/bin:$PATH
-#export PATH=/shared/webtools/apps/IBMJava2-ppc-142/bin:$PATH
-export PATH=${HOME}/ws_30x/IBMJava2-ppc-142/bin:$PATH
-
-curdir=`pwd`
-
-#Remove old logs and builds
-echo "Removing old logs and builds..."
-cd $HOME/ws_30x
-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/ws_30x/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/ws_30x/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
- cp -f RSE-remotecdt-*.zip ../N.latest/RSE-remotecdt-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/ws_30x/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 0bec3b0b1..000000000
--- a/releng/org.eclipse.rse.build/bin/make_signed.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# 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
-#*******************************************************************************
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-cd "${curdir}"
-
-SIGNED_JAR_SOURCE=${mydir}/eclipse_ext/tm
-##SIGNED_JAR_SOURCE=${mydir}/eclipse_ext
-OUTPUT=${curdir}/output.$$
-RESULT=${curdir}/result.$$
-TMP=${curdir}/tmp.$$
-
-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/update_global_cvs_tags.sh b/releng/org.eclipse.rse.build/bin/update_global_cvs_tags.sh
deleted file mode 100755
index 979d321df..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 R3_0_1 .
- cvs tag -b R3_0_maintenance .
- ##cvs update -l -A .
- ##cvs update -l -r R3_0_maintenance .
- cvs tag R3_0_2
- 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 5af4628e5..000000000
--- a/releng/org.eclipse.rse.build/bootstrap.sh
+++ /dev/null
@@ -1,242 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# 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) - 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 147fc5fe5..000000000
--- a/releng/org.eclipse.rse.build/build.pl
+++ /dev/null
@@ -1,110 +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);
-
-$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 ";
-}
-
-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 6adf854b5..000000000
--- a/releng/org.eclipse.rse.build/build.properties
+++ /dev/null
@@ -1,53 +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
-# 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 8cd67ca9b..000000000
--- a/releng/org.eclipse.rse.build/build.rb
+++ /dev/null
@@ -1,91 +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)
-
-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
-
-puts(command)
-
-system(command) \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/customTargets.xml b/releng/org.eclipse.rse.build/customTargets.xml
deleted file mode 100644
index 157bbaf6a..000000000
--- a/releng/org.eclipse.rse.build/customTargets.xml
+++ /dev/null
@@ -1,677 +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.core" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.dstore" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.ftp" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.local" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.ssh" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.telnet" />
- </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.remotecdt" />
- </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>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.terminals" />
- </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.core">
- <property name="archiveName" value="RSE-runtime-core-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.dstore">
- <property name="archiveName" value="RSE-runtime-dstore-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.ftp">
- <property name="archiveName" value="RSE-runtime-ftp-${buildId}.zip"/>
- <property name="copyOrbit" value="true"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.local">
- <property name="archiveName" value="RSE-runtime-local-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.ssh">
- <property name="archiveName" value="RSE-runtime-ssh-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.telnet">
- <property name="archiveName" value="RSE-runtime-telnet-${buildId}.zip"/>
- <property name="copyOrbit" value="true"/>
- <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.remotecdt">
- <property name="archiveName" value="RSE-remotecdt-${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="assemble.org.eclipse.rse.terminals">
- <property name="archiveName" value="RSE-terminals-incubation-${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"/>
- <include name="org.apache.oro_*.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"/>
- <include name="org.apache.oro.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.oro"
- buildDirectory="${buildDirectory}"
- directory="${buildDirectory}/directory.txt"
- fetchTag=""
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- />
- <!-- Run generated fetch script -->
- <ant antfile="${buildDirectory}/fetch_org.apache.oro.xml">
- <property name="featureOnly" value="true"/>
- <property name="featureAndPlugins" value="true"/>
- </ant>
- <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.oro.source"
- buildDirectory="${buildDirectory}"
- directory="${buildDirectory}/directory.txt"
- fetchTag=""
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- />
- <!-- Run generated fetch script -->
- <ant antfile="${buildDirectory}/fetch_org.apache.oro.source.xml">
- <property name="featureOnly" value="true"/>
- <property name="featureAndPlugins" value="true"/>
- </ant>
- <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="**/*.bin.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 7c0f74c02..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.1.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 a54100dcc..000000000
--- a/releng/org.eclipse.rse.build/go.sh
+++ /dev/null
@@ -1,66 +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
-#*******************************************************************************
-# 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}"
-
-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 -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 5c596b495..000000000
--- a/releng/org.eclipse.rse.build/maps/discovery.map
+++ /dev/null
@@ -1,10 +0,0 @@
-feature@org.eclipse.tm.discovery=v20080530,: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=v20080331,: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.rse.build/maps/rse.map b/releng/org.eclipse.rse.build/maps/rse.map
deleted file mode 100644
index 2d36dea7d..000000000
--- a/releng/org.eclipse.rse.build/maps/rse.map
+++ /dev/null
@@ -1,67 +0,0 @@
-!*************** PROJECT CONTRIBUTION ********************************************************
-!*** Project's plugins, features and fragments
-feature@org.eclipse.rse=v200903242127,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse-feature
-feature@org.eclipse.rse.core=v200903242127,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
-feature@org.eclipse.rse.dstore=v200903242127,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
-feature@org.eclipse.rse.examples=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
-feature@org.eclipse.rse.ftp=v200809171630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
-feature@org.eclipse.rse.local=v200906161709,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
-feature@org.eclipse.rse.remotecdt=v200809041200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.remotecdt-feature
-!!feature@org.eclipse.rse.remotecdt.wrapper=v20080609a,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.remotecdt.wrapper-feature
-feature@org.eclipse.rse.sdk=v200903242127,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
-feature@org.eclipse.rse.ssh=v20080714,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
-feature@org.eclipse.rse.telnet=v200809181500,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.telnet-feature
-feature@org.eclipse.rse.terminals=v200902181600,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.terminals-feature
-feature@org.eclipse.rse.tests=v200809041200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests-feature
-feature@org.eclipse.rse.useractions=v200812041720,: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=v200911161433,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.core
-plugin@org.eclipse.dstore.doc.isv=v200809041200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.dstore.doc.isv
-plugin@org.eclipse.dstore.extra=v200907242059,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.extra
-plugin@org.eclipse.rse=v200903311347,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse
-plugin@org.eclipse.rse.connectorservice.dstore=v200907312035,: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=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.ssh
-plugin@org.eclipse.rse.connectorservice.telnet=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.telnet
-plugin@org.eclipse.rse.core=v200907091254,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.core
-plugin@org.eclipse.rse.doc.isv=v200809041200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.isv
-plugin@org.eclipse.rse.doc.user=v200809041200,: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=v20100217114,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs
-plugin@org.eclipse.rse.efs.ui=v200911161433,: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=v201001201835,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui
-plugin@org.eclipse.rse.importexport=v200911092132,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.importexport
-plugin@org.eclipse.rse.processes.ui=v201002102117,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
-plugin@org.eclipse.rse.remotecdt=v200808191815,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.remotecdt
-plugin@org.eclipse.rse.sdk=v200902042310,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
-plugin@org.eclipse.rse.services.dstore=v20100217114,: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=v200808191815,: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=v201001201835,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
-plugin@org.eclipse.rse.services.ssh=v20080714,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
-plugin@org.eclipse.rse.services.telnet=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
-plugin@org.eclipse.rse.services=v200809091230,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
-plugin@org.eclipse.rse.shells.ui=v200911061604,: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=v200909151108,: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=v200909190850,: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=v20080609,: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=v200907091414,: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=v20080604,: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=v201002181244,: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=v201002181244,: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=v20080604,: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=v20080604,: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=v20080714,: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=v20080604,: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=v200902181600,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.terminals.ui
-plugin@org.eclipse.rse.tests=v20080825,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests
-plugin@org.eclipse.rse.tests.framework=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests.framework
-plugin@org.eclipse.rse.ui=v201001212253,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.ui
-plugin@org.eclipse.rse.useractions=v200812041720,: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 2c972ccb6..000000000
--- a/releng/org.eclipse.rse.build/maps/terminal.map
+++ /dev/null
@@ -1,13 +0,0 @@
-feature@org.eclipse.tm.terminal=v200902181600,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal-feature
-feature@org.eclipse.tm.terminal.sdk=v200902181600,: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=v20080715,: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=v200811110900,: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=v20080715,: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=v20080530,: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=v20080715,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view-feature
-plugin@org.eclipse.tm.terminal=v200902181600,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal
-plugin@org.eclipse.tm.terminal.serial=v20080715,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial
-plugin@org.eclipse.tm.terminal.ssh=v200811110900,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh
-plugin@org.eclipse.tm.terminal.telnet=v20080715,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet
-plugin@org.eclipse.tm.terminal.test=v20080610,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test
-plugin@org.eclipse.tm.terminal.view=v20080715,: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 6ef4354c7..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=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.rse.build/maps/tmcore.map b/releng/org.eclipse.rse.build/maps/tmcore.map
deleted file mode 100644
index 745290f37..000000000
--- a/releng/org.eclipse.rse.build/maps/tmcore.map
+++ /dev/null
@@ -1,7 +0,0 @@
-plugin@org.apache.commons.net,1.4.1=GET,http://archive.eclipse.org/tools/orbit/downloads/drops/R20080807152315/bundles/org.apache.commons.net_1.4.1.v200803071935.jar
-plugin@org.apache.commons.net.source,1.4.1=GET,http://archive.eclipse.org/tools/orbit/downloads/drops/R20080807152315/bundles/org.apache.commons.net.source_1.4.1.v200803071935.jar
-plugin@org.apache.oro,2.0.8=GET,http://archive.eclipse.org/tools/orbit/downloads/drops/R20080807152315/bundles/org.apache.oro_2.0.8.v200803061811.jar
-plugin@org.apache.oro.source,2.0.8=GET,http://archive.eclipse.org/tools/orbit/downloads/drops/R20080807152315/bundles/org.apache.oro.source_2.0.8.v200803061811.jar
-
-! plugin@org.apache.commons.net=v200803061811,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/tools,,org.eclipse.orbit/org.apache.commons.net
-! plugin@org.apache.oro=v200803061811,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/tools,,org.eclipse.orbit/org.apache.oro \ No newline at end of file
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 29f0b8450..000000000
--- a/releng/org.eclipse.rse.build/maps/wince.map
+++ /dev/null
@@ -1,6 +0,0 @@
-feature@org.eclipse.rse.wince=v20080626,: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=v20080626,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.rse.subsystems.wince
-plugin@org.eclipse.tm.rapi=v20080606,: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.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 a6244be1b..000000000
--- a/releng/org.eclipse.rse.build/nightly.sh
+++ /dev/null
@@ -1,83 +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
-#*******************************************************************************
-#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}"
-
-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 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 3d2c8d54d..000000000
--- a/releng/org.eclipse.rse.build/setup.sh
+++ /dev/null
@@ -1,275 +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/ws_30x 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 R3_0_maintenance 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?root=DSDP_Project&revision=1.53.2.3&content-type=text%2Fplain&pathrev=R3_0_maintenance"
-# sh setup.sh
-# ./doit_ibuild.sh
-# cd testLegacyUpdates/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=R
-ep_ver=3.4
-ep_date=200806172000
-P2_disabled=false
-P2_no_dropins=false
-if [ ! -f eclipse/plugins/org.eclipse.swt_3.4.0.v3448f.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.4.1
-EMFBRANCH=2.4.1
-EMFREL=R
-EMFDATE=200808251517
-EMFVER=2.4.1
-if [ ! -f ${DROPIN}/eclipse/plugins/org.eclipse.emf.doc_${EMFVER}.v${EMFDATE}.jar ]; then
- # Need EMF 2.4 SDK for Service Discovery ISV Docs Backlinks
- echo "Getting EMF SDK..."
- cd ${DROPIN}
- wget "http://archive.eclipse.org/modeling/emf/emf/downloads/drops/${EMFBRANCH}/${EMFREL}${EMFDATE}/emf-sdo-xsd-SDK-${EMFVER}.zip"
- unzip -o emf-sdo-xsd-SDK-${EMFVER}.zip
- rm emf-sdo-xsd-SDK-${EMFVER}.zip
- cd ${DROPUP}
-fi
-if [ ! -f eclipse/plugins/org.junit_3.8.2.v20080602-1318/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
-
-# CDT Runtime
-CDTREL=5.0.2
-CDTVER=200902130801
-CDTNAME=cdt-master-${CDTREL}-I${CDTVER}.zip
-CDTLOC=builds/${CDTREL}/I.I${CDTVER}/${CDTNAME}
-if [ ! -f eclipse/plugins/org.eclipse.cdt.core_${CDTREL}.${CDTVER}.jar ]; then
- echo "Getting CDT Runtime..."
- wget "http://download.eclipse.org/tools/cdt/${CDTLOC}"
- CDTTMP=`pwd`/tmp.$$
- mkdir ${CDTTMP}
- cd ${CDTTMP}
- unzip ../${CDTNAME}
- cd ..
- #java -jar eclipse/startup.jar \
- java -jar eclipse/plugins/org.eclipse.equinox.launcher_1.0.*.jar \
- -application org.eclipse.update.core.standaloneUpdate \
- -command install \
- -from file://${CDTTMP} \
- -featureId org.eclipse.cdt.platform \
- -version ${CDTREL}.${CDTVER}
- java -jar eclipse/plugins/org.eclipse.equinox.launcher_1.0.*.jar \
- -application org.eclipse.update.core.standaloneUpdate \
- -command install \
- -from file://${CDTTMP} \
- -featureId org.eclipse.cdt \
- -version ${CDTREL}.${CDTVER}
- rm -rf ${CDTTMP}
- rm ${CDTNAME}
-fi
-
-# checkout the basebuilder
-baseBuilderTag=r342_v20090210
-if [ ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.core_3.4.0.v20090202.jar \
- -o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.build_3.4.1.R34x_v20081217/pdebuild.jar \
- -o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.p2.metadata.generator_1.0.4.v20081217.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 -r R3_0_maintenance -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 -r R3_0_maintenance -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 testLegacyUpdates ]; then
- D=/home/data/httpd/download.eclipse.org/dsdp/tm/testLegacyUpdates
- if [ -d ${D} ]; then ln -s ${D} testLegacyUpdates; else mkdir testLegacyUpdates; 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 testLegacyUpdates, then copy them to updates:"
-echo "cd updates"
-echo "rm -rf plugins features"
-echo "cp -R ../testLegacyUpdates/plugins ."
-echo "cp -R ../testLegacyUpdates/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 ad7254534..000000000
--- a/releng/org.eclipse.rse.build/template/buildNotes.php
+++ /dev/null
@@ -1,225 +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.3 or later for the SSH component</b>.
- Other components may work with earlier Eclipse versions, but these have not been tested.
- Platform Runtime is the minimum requirement for core RSE and Terminal.
- Discovery needs EMF, and the RemoteCDT integration needs CDT.<br>
- <b>Building</b> the RSE SSH service requires <b>Eclipse 3.4</b> or later for the fix
- of <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=224799">bug 224799</a>;
- the fix also requires 3.4 at runtime, but the code contains a backward
- compatibility fallback to also run on Eclipse 3.3 if that particular fix
- is not required.</li>
-<li>Highlights of Bugs fixed since <a href="http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.2-200812050230/buildNotes.php">TM 3.0.2</a>:
-<ul>
- <li><b>DStore based Products</b> can now use their own Keystores with their own kind of encryption algorithm
- [<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=260256">260256</a>]</li>
- <li><b>DStore remote search</b> got some big improvements, including performance and scalability
- [<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=261646">261646</a>]</li>
- <li><b>DStoreHostShell#exit()</b> now also terminates child processes
- [<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=263669">263669</a>]</li>
- <li><b>Terminal Fonts</b> can now be changed in the RSE-Terminals-View
- even if the TM Terminal View is not installed. Use the "Remote Shell" font or
- the "Text Editor" font to customize
- [<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=247700">247700</a>]</li>
- <li><b>Source encoding</b> The workstation encoding rather than UTF-8 is now
- used as the source encoding when uploading from an editor save
- [<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=268218">268218</a>][/li>
-</ul></li>
-<li>At least 11 bugs were fixed in total: Use
- <!-- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&classification=DSDP&product=Target+Management&component=Core&component=RSE&component=Terminal&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&resolution=FIXED&resolution=WONTFIX&resolution=WORKSFORME&chfieldfrom=2008-12-05&chfieldto=2009-02-27&chfield=resolution&cmdtype=doit&negate0=1&field0-0-0=target_milestone&type0-0-0=substring&value0-0-0=2.0&field0-0-1=target_milestone&type0-0-1=regexp&value0-0-1=3.1%20M%5B234567%5D"> -->
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&classification=DSDP&product=Target+Management&component=Core&component=RSE&component=Terminal&target_milestone=3.0.3&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&resolution=FIXED&resolution=WORKSFORME&cmdtype=doit">
- this query</a> to show the list of bugs fixed since <!-- the last milestone, -->
- <a href="http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.2-200812050230/">
- TM 3.0.2</a>
- [<a href="http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.2-200812050230/buildNotes.php">build notes</a>].</li>
-<li>Following plug-ins were changed compared to TM 3.0.2:<ul>
- <li>org.eclipse.dstore.core (<a href="https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=260256%2C258993%2C260256%2C261646">258993,260256,261646</a>)</li>
- <li>org.eclipse.rse.files.ui (<a href="https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=262775%2C268218">262775,268218</a>)</li>
- <li>org.eclipse.rse.services.dstore (<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=261376">261376</a>)</li>
- <li>org.eclipse.rse.subsystems.files.dstore (<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=261646">261646</a>)</li>
- <li>org.eclipse.rse.subsystems.processes.core (<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262931">262931</a>)</li>
- <li>org.eclipse.rse.terminals.ui (<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=247700">247700</a>)</li>
- <li>org.eclipse.rse.ui (<a href="https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=260331%2C260414%2C261053%2C262931">260331,260414,261053,262931</a>)</li>
- <li>org.eclipse.tm.terminal (<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=247700">247700</a>)</li>
- </ul></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/TM_3.0_Known_Issues_and_Workarounds">
- TM 3.0 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 now 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,<br/>
-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>No API changes are allowed in the TM 3.0.x maintenance stream.
-Therefore, <b>TM 3.0.x is fully upward and backward compatible with TM 3.0</b>,
-and can be fully exchanged for TM 3.0 in any product based on it.
-Take care of API specification updates though, where the TM 3.0.x API Docs
-have been updated to add clarifications or missing information compared
-to 3.0.</p>
-
-<p>For the upcoming TM 3.1 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.0</font></b></td>
- </tr>
-</table>
-<table><tbody><tr><td>
-The following lists amendments to API specifications that are worth noticing.
-More information can be found in the associated bugzilla items.
-
-<ul>
-<li>TM @buildId@ API Specification Updates
-<ul>
- <li>None.</li>
-</ul></li>
-<li>TM 3.0.2 API Specification Updates
-<ul>
- <li>None.</li>
-</ul></li>
-<li>TM 3.0.1 API Specification Updates
-<ul>
-<li><b><a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/api/org/eclipse/rse/services/files/IFileService.html#createFolder(java.lang.String,%20java.lang.String,%20org.eclipse.core.runtime.IProgressMonitor)">
- IFileService#createFolder()</a></b>
- now specifies that parent folders <i>may</i> be created by
- the implementation. Note that this clarification required additional code in
- FileServiceSubSystem in order to make <tt>
- <a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/api/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.html#createFolder(org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile,%20org.eclipse.core.runtime.IProgressMonitor)">
- IRemoteFileSubSystem.createFolder()</a></tt> and <tt>
- <a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/api/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.html#createFolders(org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile,%20org.eclipse.core.runtime.IProgressMonitor)">
- IRemoteFileSubSystem.createFolders()</a></tt>
- behave as expected for both parent folders created or not.<br/>
- Service implementations that need to be compatible with both TM 3.0 and TM 3.0.1 <b><i>should</i></b>
- create parent folders in the file service. Subsystem clients that need to be compatible with both
- TM 3.0 and TM 3.0.1 <b><i>should not</i></b> expect that parent folders are created
- [<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=234026">234026</a>].</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=2008-06-20&chfieldto=2008-09-20&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.0.1&cmdtype=doit">
- this query</a> to show the full list of API related updates since TM 3.0
- <!--
- , 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.0
- -->
- .
-</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=245260">bug 245260</a> - maj - Different user's connections on a single ftp host are mapped to the same temp files cache</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=236443">bug 236443</a> - maj - [releng] Using P2 to install "remotecdt" only from update site creates an unusable installation</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>
-</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/TM_3.0_Known_Issues_and_Workarounds">
-TM 3.0 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 719f77b46..000000000
--- a/releng/org.eclipse.rse.build/template/index.php
+++ /dev/null
@@ -1,337 +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.0/tm-news-3.0.html">TM 3.0 New and Noteworthy</a></p>
- <p><a href="http://www.eclipse.org/dsdp/tm/development/relnotes/3.0/readme_tm_3.0.html">TM 3.0.3 Readme / Release Notes</a></p>
- <p><a href="buildNotes.php">Build Notes</a></p>
- </strong></font></p>
-
- <!-- <p>To get started, see the <a href="buildNotes.php">build notes</a>.<br>
- -->
- 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>.</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://archive.eclipse.org/eclipse/downloads/">
- Eclipse 3.3</a> or later for the SSH component; the SSH encoding fix
- (<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=224799">bug 224799</a>)
- requires <a href="http://download.eclipse.org/eclipse/downloads/">Eclipse 3.4</a>
- or later.
- </b></td></tr>
- <tr><td>
- Other components may work with earlier Eclipse versions, but these have not been tested.<br/>
- For core RSE and TM-Terminal, the
- <a href="http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#PlatformRuntime">
- Eclipse Platform Runtime Binary</a> is sufficient. Of course you can also use the popular
- <a href="http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#EclipseSDK">SDK</a>.
- </td></tr>
- <tr><td>
- Prerequisites for the remotecdt and discovery add-ons (CDT, EMF) can be retrieved from the
- <a href="http://download.eclipse.org/releases/europa/">Europa Discovery Site</a>.
- </td></tr>
-<!--
- <tr><td>
- Earlier versions (e.g. Eclipse 3.2.x, Eclipse 3.3M5) will <b>not</b> work!
- </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"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">SDK (includes client runtime, user and ISV documentation, and source)</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><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@/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>
- <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-remotecdt-@buildId@.zip">RSE-remotecdt-@buildId@.zip</a></td>
- <td><small>&nbsp;</small><br/>
- A Launch Configuration for running and debugging C/C++
- programs on a remote host through RSE-provided shell
- and file services, and gdbserver. Requires CDT 3.0 or later.
- 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@/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>
-</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">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>
- <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-terminals-incubation-@buildId@.zip">RSE-terminals-incubation-@buildId@.zip</a></td>
- <td><small>&nbsp;</small><br/>
- Integration of the TM Terminal Widget into RSE, such that an SSH Terminals
- Subsystem is provided to show a tabbed view of Terminals similar to the
- Remote Command View. This component is already included in the RSE-SDK
- download. It requires RSE core runtime and RSE ssh installed.
- </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 align="LEFT" valign="TOP" colspan="3" bgcolor="#808080"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">Client Runtime Binaries</font></b></td>
- </tr>
- <tr>
- <td>The runtime binaries do not include source and developer documentation,
- and they are available in a more fine-grained packaging for re-use in
- other products.<br/>
- <b>RSE-runtime-core is required</b>, and includes the user documentation.
- All other runtime packages are optional.</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-core-@buildId@.zip">RSE-runtime-core-@buildId@.zip</a></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-dstore-@buildId@.zip">RSE-runtime-dstore-@buildId@.zip</a></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-ftp-@buildId@.zip">RSE-runtime-ftp-@buildId@.zip</a></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-local-@buildId@.zip">RSE-runtime-local-@buildId@.zip</a></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-ssh-@buildId@.zip">RSE-runtime-ssh-@buildId@.zip</a></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-telnet-@buildId@.zip">RSE-runtime-telnet-@buildId@.zip</a> (<i>Experimental</i>)</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 d6b24041c..000000000
--- a/releng/org.eclipse.rse.build/template/package.count
+++ /dev/null
@@ -1 +0,0 @@
-19
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/addSites.sh b/releng/org.eclipse.rse.releng.infocenter/addSites.sh
deleted file mode 100755
index e2f6eff45..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/addSites.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# 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
-#*******************************************************************************
-#
-# Add new Eclipse "extension locations" to the infocenter
-#
-IHOME=/home/infocenter/latest
-$IHOME/bin/infocenter.sh addSite -from $IHOME/plugins/rse/eclipse
-$IHOME/bin/infocenter.sh addSite -from $IHOME/plugins/dd.dsf/eclipse
-$IHOME/bin/infocenter.sh addSite -from $IHOME/plugins/nab/eclipse
-$IHOME/bin/infocenter.sh addSite -from $IHOME/plugins/ercp/eclipse
-$IHOME/bin/infocenter.sh addSite -from $IHOME/plugins/mtj/eclipse
-$IHOME/bin/infocenter.sh apply
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 fd7dce0f3..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/infocenter.sh
+++ /dev/null
@@ -1,36 +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
-#*******************************************************************************
-umask 022
-
-PATH=/opt/j2sdk1.4.2_12/bin:$PATH
-export PATH
-
-EHOME=/home/infocenter/eclipse3.2/eclipse
-if [ "$IHOME" = "" ]; then
- IHOME=/home/infocenter/latest
-fi
-
-if [ "$1" = "" -o "$1" = "help" ]; then
- echo "Usage: infocenter.sh [start|shutdown|addSite -from dir|apply]"
- exit 1
-fi
-
-java \
- -classpath $EHOME/plugins/org.eclipse.help.base_3.2.0.v20060601.jar \
- org.eclipse.help.standalone.Infocenter \
- -command $* \
- -eclipsehome $EHOME \
- -data $IHOME/workspace \
- -port 27127 \
- -nl en -locales en \
- -configuration file://$IHOME/config
-
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 27799ef28..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/readme.txt
+++ /dev/null
@@ -1,31 +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
-
-Prerequisites:
-* Eclipse 3.2 installed at /home/infocenter/eclipse3.2/eclipse
-* Infocenter home (IHOME) at /home/infocenter/latest
- - Scripts checked out at $IHOME/bin
- - Deployable doc plugins at $IHOME/deploy
-* 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/help32/index.jsp?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 778072f12..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/setup.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# 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 - initial API and implementation
-#*******************************************************************************
-umask 022
-
-curdir=`pwd`
-PATH=/opt/j2sdk1.4.2_12/bin:$PATH
-export PATH
-
-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"
-ECL_DIR=$HOME/eclipse3.5
-ep_rel=S
-ep_ver=3.5M4
-ep_date=200812111908
-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 \ No newline at end of file
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 ef418ca90..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/update.sh
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# 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
-#*******************************************************************************
-umask 022
-echo "Infocenter Update: running as"
-id
-if [ "$IHOME" = "" ]; then
- IHOME=/home/infocenter/latest
-fi
-curdir=`pwd`
-NEED_RESTART=0
-
-#update RSE into deployment directory
-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
- NEED_RESTART=1
- fi
-else
- echo "Error downloading RSE-SDK-latest.zip"
-fi
-
-#update MTJ into deployment directory
-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" ]; then
- echo "Doc plugins got successfully, installing from plugins.tmp into plugins..."
- if [ -e plugins ]; then
- rm -rf plugins
- fi
- mv plugins.tmp plugins
- NEED_RESTART=1
- fi
-else
- echo "Error downloading dsdp-mtj-SDK-incubation-latest.zip"
-fi
-
-#update Infocenter with latest deployable plug-ins
-if [ "$NEED_RESTART" != "0" ]; then
- echo "Shutting down infocenter..."
- $IHOME/bin/infocenter.sh shutdown
-
- echo "Deploying new plug-ins..."
- ######################### Deploy RSE #############################
- rm $IHOME/plugins/rse/eclipse/plugins/*
- cp -p $IHOME/deploy/rse/plugins/* $IHOME/plugins/rse/eclipse/plugins/
- ####################### Deploy dd.dsf ############################
- rm $IHOME/plugins/dd.dsf/eclipse/plugins/*
- cp -p $IHOME/deploy/dd.dsf/plugins/* $IHOME/plugins/dd.dsf/eclipse/plugins/
- ####################### Deploy nab ###############################
- rm -rf $IHOME/plugins/nab/eclipse/plugins/*
- cp -Rp $IHOME/deploy/nab/plugins/* $IHOME/plugins/nab/eclipse/plugins/
- ####################### Deploy ercp ##############################
- rm -rf $IHOME/plugins/ercp/eclipse/plugins/*
- cp -Rp $IHOME/deploy/ercp/*.jar $IHOME/plugins/ercp/eclipse/plugins/
- ####################### Deploy ercp ##############################
- rm -rf $IHOME/plugins/mtj/eclipse/plugins/*
- cp -Rp $IHOME/deploy/mtj/plugins/*.jar $IHOME/plugins/mtj/eclipse/plugins/
-
- #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 b94584eee..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 "testLegacyUpdates"
-#
-# Prerequisites:
-# - Eclipse 3.3Mx installed in $HOME/ws_30x/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}/ws_30x/org.eclipse.releng.basebuilder
-basebuilder=${HOME}/org.eclipse.releng.basebuilder
-baseBuilderTag=R35_M4
-
-# checkout the basebuilder
-if [ ! -f "${basebuilder}/plugins/org.eclipse.pde.core_3.5.0.v20081210-1800.jar" \
- -o ! -f "${basebuilder}/plugins/org.eclipse.pde.build_3.5.0.v20081210/pdebuild.jar" \
- -o ! -f "${basebuilder}/plugins/org.eclipse.equinox.p2.metadata.generator_1.0.100.v20081208-2132.jar" ]; then
- if [ -d "${basebuilder}" ]; then
- echo "Re-getting basebuilder from CVS..."
- rm -rf "${basebuilder}"
- else
- echo "Getting basebuilder from CVS..."
- fi
- bb_base=`dirname "${basebuilder}"`
- if [ ! -d "${bb_base}" ]; then
- mkdir -p "${bb_base}"
- if [ ! -d "${bb_base}" ]; then
- echo "ERROR: could not create ${bb_base}"
- exit 1
- fi
- fi
- cd "${bb_base}"
- cvs -Q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co -r ${baseBuilderTag} org.eclipse.releng.basebuilder
- cd "${mydir}"
-fi
-
-# 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.0.3+"
-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
-if [ ${TYPE} = test ]; then
- echo "Working on test legacy update site"
- TPTYPE="${VERSION} Test"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- REL=`ls $HOME/ws_30x/working/package | sort | tail -1`
- if [ "$REL" != "" ]; then
- echo "Checking new Updates from $REL"
- DIR="$HOME/ws_30x/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.0/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.0/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_0_3 -->/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/ws_30x/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/ws_30x/jarprocessor/jarprocessor.jar \
- # -outputDir $SITE -processAll -repack $SITE
-elif [ ${TYPE} = testSigned ]; then
- echo "Working on signed legacy update site"
- TPTYPE="${VERSION} Signed Test Legacy"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- echo "Signing jars from test legacy 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}/../testLegacyUpdates ]; then
- #get jars from testLegacyUpdates, sign them and put them here
- mkdir ${SITE}/features.${stamp}
- mkdir -p ${STAGING}/updates.${stamp}/features
- cp -R ${SITE}/../testLegacyUpdates/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}/../testLegacyUpdates/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 testLegacyUpdates 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_0_3 -->/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 Ganymede coordinated release train (Eclipse 3.4.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_0_3 -->/d' \
- -e '/<!-- BEGIN_3_1 -->/,/<!-- 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_0_3 -->/d' \
- -e '/<!-- BEGIN_3_1 -->/,/<!-- 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.x).' \
- 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' \
- site.xml > site.xml.new1
- sed -e '/<!-- BEGIN_3_0_4 -->/,/<!-- END_3_0_4 -->/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
- 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_3 -->/,/<!-- END_3_0_3 -->/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/ws_30x/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/ws_30x/jarprocessor/jarprocessor.jar \
- # -outputDir $SITE -processAll -pack $SITE
- ;;
-esac
-
-#Create the digest
-echo "Creating digest..."
-#java -jar $HOME/ws_30x/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 204140e4b..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/ws_30x/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}/ws_30x/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/ws_30x/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 b32c5750b..000000000
--- a/releng/org.eclipse.rse.updatesite/bin/stageMilestones.sh
+++ /dev/null
@@ -1,67 +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
-#*******************************************************************************
-#!/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}/ws_30x/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 ../../signedLegacyUpdates/features/*_2.0.1.v* features
-cp ../../signedLegacyUpdates/features/*_1.0.1.v* features
-cp ../../signedLegacyUpdates/plugins/*_2.0.1.v* plugins
-cp ../../signedLegacyUpdates/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 9b1566b52..000000000
--- a/releng/org.eclipse.rse.updatesite/site.xml
+++ /dev/null
@@ -1,572 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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_0_3+ -->
- <feature url="features/org.eclipse.rse.core_3.0.4.qualifier.jar" id="org.eclipse.rse.core" version="3.0.4.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.0.4.qualifier.jar" id="org.eclipse.rse.dstore" version="3.0.4.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.1.qualifier.jar" id="org.eclipse.rse.ftp" version="3.0.1.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.2.qualifier.jar" id="org.eclipse.rse.local" version="2.1.2.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.0.4.qualifier.jar" id="org.eclipse.rse" version="3.0.4.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.0.4.qualifier.jar" id="org.eclipse.rse.sdk" version="3.0.4.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.1.1.qualifier.jar" id="org.eclipse.rse.ssh" version="2.1.1.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.1.1.qualifier.jar" id="org.eclipse.rse.telnet" version="2.1.1.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.0.0.qualifier.jar" id="org.eclipse.rse.examples" version="3.0.0.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.1.1.qualifier.jar" id="org.eclipse.rse.remotecdt" version="2.1.1.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_0.1.3.qualifier.jar" id="org.eclipse.rse.terminals" version="0.1.3.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.2.qualifier.jar" id="org.eclipse.rse.useractions" version="1.1.2.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.1.1.qualifier.jar" id="org.eclipse.rse.wince" version="0.1.1.qualifier" os="win32" arch="x86">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.0.qualifier.jar" id="org.eclipse.tm.discovery" version="3.0.0.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_2.0.3.qualifier.jar" id="org.eclipse.tm.terminal.sdk" version="2.0.3.qualifier">
- <category name="TM and RSE 3.0.3+"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.0.1.qualifier.jar" id="org.eclipse.rse.tests" version="3.0.1.qualifier">
- <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+ -->
-</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 73043707a..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/feature.properties
+++ /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
-#
-# 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
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2008 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 4ee573731..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/feature.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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.remotecdt.wrapper"
- 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 51a258078..000000000
--- a/releng/org.eclipse.tm.releng/builder/doc/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.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.oro*.jar"/>
- <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 2690068bc..000000000
--- a/releng/org.eclipse.tm.releng/builder/examples/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.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.oro*.jar"/>
- <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 b481075a9..000000000
--- a/releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml
+++ /dev/null
@@ -1,188 +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.oro*.jar"/>
- <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 4588cd036..000000000
--- a/releng/org.eclipse.tm.releng/builder/sdk/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.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.oro*.jar"/>
- <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 7fa3c3a3e..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/customTargets.xml
+++ /dev/null
@@ -1,275 +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.oro*.jar" />
- <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 5c596b495..000000000
--- a/releng/org.eclipse.tm.releng/maps/discovery.map
+++ /dev/null
@@ -1,10 +0,0 @@
-feature@org.eclipse.tm.discovery=v20080530,: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=v20080331,: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 4087c3200..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=v20080605,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse-feature
-feature@org.eclipse.rse.core=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
-feature@org.eclipse.rse.dstore=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
-feature@org.eclipse.rse.examples=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
-feature@org.eclipse.rse.ftp=v20080605,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
-feature@org.eclipse.rse.local=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
-feature@org.eclipse.rse.remotecdt=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.remotecdt-feature
-feature@org.eclipse.rse.sdk=v20080605,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
-feature@org.eclipse.rse.ssh=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
-feature@org.eclipse.rse.telnet=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.telnet-feature
-feature@org.eclipse.rse.terminals=v20080605,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.terminals-feature
-feature@org.eclipse.rse.tests=v20080605,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests-feature
-feature@org.eclipse.rse.useractions=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.useractions-feature
-plugin@org.eclipse.dstore.core=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.core
-plugin@org.eclipse.dstore.doc.isv=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.dstore.doc.isv
-plugin@org.eclipse.dstore.extra=v20080406,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.extra
-plugin@org.eclipse.rse=v20080529,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse
-plugin@org.eclipse.rse.connectorservice.dstore=v20080526,: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=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.ssh
-plugin@org.eclipse.rse.connectorservice.telnet=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.telnet
-plugin@org.eclipse.rse.core=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.core
-plugin@org.eclipse.rse.doc.isv=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.isv
-plugin@org.eclipse.rse.doc.user=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.user
-plugin@org.eclipse.rse.dstore.security=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.dstore.security
-plugin@org.eclipse.rse.efs=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs
-plugin@org.eclipse.rse.efs.ui=v20080604,: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=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui
-plugin@org.eclipse.rse.importexport=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.importexport
-plugin@org.eclipse.rse.processes.ui=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
-plugin@org.eclipse.rse.remotecdt=v20080602,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.remotecdt
-plugin@org.eclipse.rse.sdk=v20080529,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
-plugin@org.eclipse.rse.services.dstore=v20080604,: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=v20080605,: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=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
-plugin@org.eclipse.rse.services.ssh=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
-plugin@org.eclipse.rse.services.telnet=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
-plugin@org.eclipse.rse.services=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
-plugin@org.eclipse.rse.shells.ui=v20080602,: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=v20080604,: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=v20080604,: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=v20080605,: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=v20080604,: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=v20080529,: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=v20080604,: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=v20080604,: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=v20080604,: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=v20080604,: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=v20080505,: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=v20080604,: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=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.terminals.ui
-plugin@org.eclipse.rse.tests=v20080605,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests
-plugin@org.eclipse.rse.tests.framework=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests.framework
-plugin@org.eclipse.rse.ui=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.ui
-plugin@org.eclipse.rse.useractions=v20080604,: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 cb38bb733..000000000
--- a/releng/org.eclipse.tm.releng/maps/terminal.map
+++ /dev/null
@@ -1,13 +0,0 @@
-feature@org.eclipse.tm.terminal=v20080505,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal-feature
-feature@org.eclipse.tm.terminal.sdk=v20080530,: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=v20080506,: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=v20080530,: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=v20080530,: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=v20080530,: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=v20080507,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view-feature
-plugin@org.eclipse.tm.terminal=v20080505,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal
-plugin@org.eclipse.tm.terminal.serial=v20080506,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial
-plugin@org.eclipse.tm.terminal.ssh=v20080529,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh
-plugin@org.eclipse.tm.terminal.telnet=v20080521,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet
-plugin@org.eclipse.tm.terminal.test=v20080416,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test
-plugin@org.eclipse.tm.terminal.view=v20080507,: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/wince.map b/releng/org.eclipse.tm.releng/maps/wince.map
deleted file mode 100644
index b0e0b2678..000000000
--- a/releng/org.eclipse.tm.releng/maps/wince.map
+++ /dev/null
@@ -1,5 +0,0 @@
-feature@org.eclipse.rse.wince=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.rse.wince-feature
-plugin@org.eclipse.rse.subsystems.wince=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.rse.subsystems.wince
-plugin@org.eclipse.tm.rapi=v20080522,: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/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/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 85f5b38e2..000000000
--- a/rse/features/org.eclipse.rse-feature/build.properties
+++ /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 - 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 86bf8a8e9..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
-
-# "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 ca68ddb49..000000000
--- a/rse/features/org.eclipse.rse-feature/feature.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse"
- label="%featureName"
- version="3.0.4.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 2138a90a3..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=Remote System Explorer 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
-
-# "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 ed3e5b6f8..000000000
--- a/rse/features/org.eclipse.rse.core-feature/feature.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.core"
- label="%featureName"
- version="3.0.4.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 0f09c40dd..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=Remote System Explorer Core 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
-
-# "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 fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 3ec5c22aa..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=Remote System Explorer 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 a93d3149a..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index e70df071f..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-pluginName=Remote System Explorer Core Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.dstore-feature/.project b/rse/features/org.eclipse.rse.dstore-feature/.project
deleted file mode 100644
index 06a332465..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.dstore-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.dstore-feature/build.properties b/rse/features/org.eclipse.rse.dstore-feature/build.properties
deleted file mode 100644
index 92101e808..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html
diff --git a/rse/features/org.eclipse.rse.dstore-feature/epl-v10.html b/rse/features/org.eclipse.rse.dstore-feature/epl-v10.html
deleted file mode 100644
index 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 8abd5e937..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
-
-# "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 0a6a97d27..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/feature.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.dstore"
- label="%featureName"
- version="3.0.4.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.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 7ba20dad8..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
-
-# "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 fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 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 a93d3149a..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index b5881fb6f..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-pluginName=RSE DStore Services Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.local-feature/.project b/rse/features/org.eclipse.rse.local-feature/.project
deleted file mode 100644
index ff8964653..000000000
--- a/rse/features/org.eclipse.rse.local-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.local-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.local-feature/build.properties b/rse/features/org.eclipse.rse.local-feature/build.properties
deleted file mode 100644
index 8ed560ec8..000000000
--- a/rse/features/org.eclipse.rse.local-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html
diff --git a/rse/features/org.eclipse.rse.local-feature/epl-v10.html b/rse/features/org.eclipse.rse.local-feature/epl-v10.html
deleted file mode 100644
index 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 5c9b5cf24..000000000
--- a/rse/features/org.eclipse.rse.local-feature/feature.properties
+++ /dev/null
@@ -1,141 +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
-###############################################################################
-
-# 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
-
-# "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, 2008 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 9e920120d..000000000
--- a/rse/features/org.eclipse.rse.local-feature/feature.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.local"
- label="%featureName"
- version="2.1.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.services.local">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%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 46a803901..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/feature.properties
+++ /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
-#
-# 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
-
-# "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, 2008 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 fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 6b24c001e..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +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
-###############################################################################
-# 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, 2008. 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 a93d3149a..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 67dfc6911..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-pluginName=RSE Local Services Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.sdk-feature/.project b/rse/features/org.eclipse.rse.sdk-feature/.project
deleted file mode 100644
index 18a5f73e2..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.sdk-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.sdk-feature/build.properties b/rse/features/org.eclipse.rse.sdk-feature/build.properties
deleted file mode 100644
index 60e92e0fc..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/build.properties
+++ /dev/null
@@ -1,22 +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
-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
-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 096ec0799..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
-
-# "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 09b1ab24b..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/feature.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.sdk"
- label="%featureName"
- version="3.0.4.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.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 db24c7329..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 (Incubation)
-
-# "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=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 6b07456c4..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/feature.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.terminals"
- label="%featureName"
- version="0.1.3.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.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.services.ssh" version="2.1.0" match="equivalent"/>
- <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.connectorservice.ssh" version="2.1.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.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 c2aa5016b..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 (Incubation)
-
-# "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=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 fdd61ff0d..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=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.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 d376d5e07..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 (Incubation)\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 c218c8e65..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/eclipse32.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 5b01a1af0..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/plugin.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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=RSE Terminals UI Source (Incubation)
-providerName=Eclipse.org
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 43d254a86..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/feature.properties
+++ /dev/null
@@ -1,140 +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) - ongoing maintenance
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE User Actions
-
-# "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=A framework for contributing user-defined actions and compile commands to RSE.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2008 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 a7eeb0867..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/feature.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.useractions"
- label="%featureName"
- version="1.1.2.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"/>
-
-</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 9d14673d0..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/feature.properties
+++ /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
-#
-# 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=RSE User Actions 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
-
-# "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, 2008 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 fdd61ff0d..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=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.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 56695a268..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +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) - 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=RSE User Actions Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2008. 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 ee08dc353..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +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) - Adapted from rse.dstore-feature
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/eclipse32.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 3fef7349c..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,13 +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) - Adapted from rse.dstore-feature
-###############################################################################
-pluginName=RSE User Actions Source
-providerName=Eclipse.org
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/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 4be2c3341..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.0.4.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 f1ea22c2b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/plugin.properties
+++ /dev/null
@@ -1,16 +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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Core
-providerName = Eclipse.org
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 b84949a0b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java
+++ /dev/null
@@ -1,922 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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.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)
- {
- return 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);
- }
-}
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 ec7a7565c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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;
-
-/**
- * <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.
- */
-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 e600bbbee..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.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 McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.Serializable;
-
-/**
- * @noimplement This interface is not intended to be implemented 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 5995bdd54..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java
+++ /dev/null
@@ -1,506 +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) - [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())
- {
- System.out.println("request is not loaded");
- // the class has been requested before, but it has not yet been received
- // System.out.println(className + " already requested but not loaded. Waiting for request to load.");
-
- System.out.println("waiting for response...");
- request.waitForResponse(); // just wait until the class is received
- System.out.println("...finished waiting for response");
-
- // 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 680d2f7b4..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 47bc8f9f1..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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)
- {
- 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)
- {
- System.out.println(e);
- if (status == null)
- return;
- status.setAttribute(DE.A_VALUE, FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, "failed"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- catch (Exception e)
- {
- System.out.println(e);
- if (status == null)
- return;
- status.setAttribute(DE.A_VALUE, FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, "failed"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- }
- }
-
- /**
- * Append a bytes to a file at a specified location. This method is called by the
- * DataStore when the communication layer receives a file transfer append.
- *
- * @param remotePath the path where to save the file
- * @param buffer the bytes to append in the file
- * @param size the number of bytes to append in the file
- * @param binary indicates whether to save the bytes as binary or text
- */
- public void receiveAppendedBytes(String remotePath, byte[] buffer, int size, boolean binary)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
- DataElement status = findStatusFor(remotePath);
- String fileName = _dataStore.mapToLocalPath(remotePath);
-
- if (fileName != null)
- {
- try
- {
- // need to create directories as well
- File file = new File(fileName);
- if (!file.exists())
- {
- File parent = new File(file.getParent());
- parent.mkdirs();
-
- File newFile = new File(fileName);
- FileOutputStream fileStream = new FileOutputStream(newFile);
-
- if (binary)
- {
- fileStream.write(buffer, 0, size);
- }
- else
- {
- IByteConverter byteConverter = _dataStore.getByteConverter();
- byteConverter.setContext(file);
-
- byte[] convertedBytes = byteConverter.convertClientBytesToHostBytes(buffer, 0, size);
- fileStream.write(convertedBytes, 0, convertedBytes.length);
- }
-
- fileStream.close();
- }
- else
- {
- FileOutputStream outStream = new FileOutputStream(fileName, true);
-
- 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)
- {
- System.out.println(e);
- if (status == null)
- return;
- status.setAttribute(DE.A_VALUE, FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, "failed"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- }
- }
-
-
-
- /**
- * Called by <code>sendBytes</code> to either save the bytes to a local file or transmit
- * them to a remote file.
- * @param path the path of the file
- * @param bytes the bytes of the file
- * @param size the size of the file
- * @param binary indicates whether the bytes are to be sent as binary or text
- */
- protected void internalSendBytes(String path, byte[] bytes, int size, boolean binary)
- {
- if (_dataStore.isVirtual())
- {
- _dataStore.replaceFile(path, bytes, size, binary);
- }
- else
- {
- _dataStore.updateFile(path, bytes, size, binary);
- }
- }
-
- /**
- * Called by <code>sendBytes</code> to either append the bytes to a local file or transmit
- * them and append them to a remote file.
- * @param path the path of the file
- * @param bytes the bytes of the file
- * @param size the size of the file
- * @param binary indicates whether the bytes are to be sent as binary or text
- */
- protected void internalSendAppendBytes(String path, byte[] bytes, int size, boolean binary)
- {
- if (_dataStore.isVirtual())
- {
- _dataStore.replaceAppendFile(path, bytes, size, binary);
- }
- else
- {
- _dataStore.updateAppendFile(path, bytes, size, binary);
- }
- }
-
- protected DataElement findStatusFor(String remotePath)
- {
- if (_log != null)
- {
- for (int i = 0; i < _log.getNestedSize(); i++)
- {
- DataElement child = _log.get(i);
- if (child.getName().equals(remotePath))
- {
- return child;
- }
- }
- }
- return null;
- }
-
-}
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 099c1c618..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java
+++ /dev/null
@@ -1,1688 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @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 334f01e1c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java
+++ /dev/null
@@ -1,4552 +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) - [282599] [dstore] log folder that is not a hidden one
- * David McKnight (IBM) - [282634] [dstore] IndexOutOfBoundsException on Disconnect
- * 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) - [289891] [dstore] StringIndexOutOfBoundsException in getUserPreferencesDirectory when DSTORE_LOG_DIRECTORY is ""
- * David McKnight (IBM) - [294933] [dstore] RSE goes into loop
- *******************************************************************************/
-
-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>
- * @noextend This class is not intended to be subclassed by clients.
- * @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()
- {
- synchronized (_hashMap){
- 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();
- synchronized (_hashMap){
- _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();
- synchronized (_hashMap){
- _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();
- synchronized (_hashMap){
- _hashMap.put(toId, toReference);
- }
-
- // reference with "from" relationship
- DataElement fromReference = createElement();
-
- fromReference.reInit(realObject, parent, fromRelation);
-
- realObject.addNestedData(fromReference, false);
-
- String fromId = fromReference.getId();
- synchronized (_hashMap){
- _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();
- synchronized (_hashMap){
- _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();
- synchronized (_hashMap){
- _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)
- {
- synchronized (_hashMap){
- 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)
- {
- synchronized (_hashMap){
- 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.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)
- {
- boolean containsKey = false;
- synchronized (_hashMap){
- containsKey = _hashMap.containsKey(id);
- }
-
- if (!containsKey)
- {
- 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 (contains(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
- {
- _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 16641e356..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java
+++ /dev/null
@@ -1,518 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- * 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)
- {
- e.printStackTrace();
- }
- }
- else
- {
- serverSocket = new ServerSocket(i);
- }
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- if (serverSocket != null && serverSocket.getLocalPort() > 0)
- {
- return serverSocket;
- }
- }
- }
- else
- {
- port = Integer.parseInt(portStr);
-
-
- // create server socket from port
- if (_dataStore.usingSSL() && sslContext != null)
- {
- try
- {
- serverSocket = sslContext.getServerSocketFactory().createServerSocket(port);
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- }
- else
- {
- try
- {
- serverSocket = new ServerSocket(port);
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- }
- }
- return serverSocket;
- }
-
- /**
- * Create the DataStore and initializes it's handlers and communications.
- *
- * @param portStr the number of the socket port
- * @param timeoutStr the idle duration to wait before shutting down
- * @param ticketStr validation id required by the client to access the DataStore
- */
- private void setup(String portStr, String timeoutStr, String ticketStr)
- {
- _maxConnections = 1;
-
-
- ArrayList loaders = new ArrayList();
- loaders.add(new ExternalLoader(getClass().getClassLoader(), "*")); //$NON-NLS-1$
- _commandHandler = new ServerCommandHandler(loaders);
- _updateHandler = new ServerUpdateHandler();
-
- ISSLProperties sslProperties = new ServerSSLProperties();
-
- _dataStore = new DataStore(_serverAttributes, _commandHandler, _updateHandler, null);
- _dataStore.setSSLProperties(sslProperties);
-
- DataElement ticket = _dataStore.getTicket();
- 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)
- {
- System.err.println(ServerReturnCodes.RC_BIND_ERROR);
- _msg = ServerReturnCodes.RC_BIND_ERROR;
- _continue = false;
- }
- else
- {
- // timeout
- if (timeoutStr != null)
- {
- _timeout = Integer.parseInt(timeoutStr);
- }
- else
- {
- _timeout = 120000;
- }
-
- if (_timeout > 0)
- {
- _serverSocket.setSoTimeout(_timeout);
- }
-
- System.err.println(ServerReturnCodes.RC_SUCCESS);
- System.err.println(_serverSocket.getLocalPort());
- _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);
- _msg = ServerReturnCodes.RC_UNKNOWN_HOST_ERROR;
- _continue = false;
- }
- catch (BindException e)
- {
- System.err.println(ServerReturnCodes.RC_BIND_ERROR);
- _msg = ServerReturnCodes.RC_BIND_ERROR;
- _continue = false;
- }
- catch (IOException e)
- {
- System.err.println(ServerReturnCodes.RC_GENERAL_IO_ERROR);
- _msg = ServerReturnCodes.RC_GENERAL_IO_ERROR;
- _continue = false;
- }
- catch (SecurityException e)
- {
- System.err.println(ServerReturnCodes.RC_SECURITY_ERROR);
- _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 f60b8c836..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java
+++ /dev/null
@@ -1,227 +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
- * 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
- ********************************************************************************/
-
-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 = new File(logPathName, "rsecomm.log"); //$NON-NLS-1$
-
- if (!_logFile.exists()) {
- _logFile.createNewFile();
- }
-
- _logFileStream = new PrintWriter(new FileOutputStream(_logFile));
-
- } catch (IOException e) {
- System.out.println("Error opening log file " + logPathName + "rsecomm.log"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- }
-
-
- /**
- * 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();
- 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();
- 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 c0f9ab94e..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, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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) - [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 98079e565..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, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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");
- 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/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 434b2cf34..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientCommandHandler.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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;
- notifyInput();
- }
-
- public void sendKeepAliveRequest()
- {
- DataElement document = _keepAliveDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, "request"); //$NON-NLS-1$
- document.setAttribute(DE.A_VALUE, "request"); //$NON-NLS-1$
- document.setParent(null);
- _pendingKeepAliveRequest = document;
- notifyInput();
- }
-
- public synchronized void waitForInput()
- {
- if (_commands.size() == 0 && _classesToSend.size() == 0 && _pendingKeepAliveConfirmation == null && _pendingKeepAliveRequest == null)
- {
- super.waitForInput();
- }
- }
-
- /**
- * 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 aa5423599..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, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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");
- }
- }
- }
- 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 1ceaed9d0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java
+++ /dev/null
@@ -1,591 +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
- * David McKnight (IBM) - [294933] [dstore] RSE goes into loop
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.core.server;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-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();
- HashMap map = _dataStore.getHashMap();
- synchronized (map){
- map.remove(host.getId());
- }
- host.setAttribute(DE.A_ID, "host." + serverTicket.getName()); //$NON-NLS-1$
-
- synchronized (map){
- map.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 84a721f61..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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;
- notifyInput();
- }
-
- public void sendKeepAliveConfirmation()
- {
- DataElement document = _confirmKeepAliveDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, "confirm"); //$NON-NLS-1$
- document.setAttribute(DE.A_VALUE, "confirm"); //$NON-NLS-1$
- document.setParent(null);
- _pendingKeepAliveConfirmation = document;
- notifyInput();
- }
-
- public synchronized void waitForInput()
- {
- if (_dataObjects.size() == 0 && _classesToSend.size() == 0 && _pendingKeepAliveConfirmation == null && _pendingKeepAliveRequest == null)
- {
- super.waitForInput();
- }
- }
-
- /**
- * 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 fa37a8dd5..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/DataElementRemover.java
+++ /dev/null
@@ -1,239 +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] checking for memory
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- * David McKnight (IBM) - [294933] [dstore] RSE goes into loop
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.core.util;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-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)
- {
- HashMap map = _dataStore.getHashMap();
- synchronized (map){
- map.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 c54f31ca0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/MemoryManager.java
+++ /dev/null
@@ -1,156 +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) - [268258] [dstore] ClassNotFound Exception is visible when using Java 1.4
- ********************************************************************************/
-
-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$
-
- Boolean usageThresholdSupported = (Boolean)getSupportedMethod.invoke(mbObj, null);
- if (usageThresholdSupported.booleanValue()){
-
- Method getTypeMethod = mbClass.getDeclaredMethod("getType", new Class[0]); //$NON-NLS-1$
-
- 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$
- Object usageObj = getUsageMethod.invoke(mbObj, null);
-
- Class usageClass = usageObj.getClass();
- Method getMaxMethod = usageClass.getDeclaredMethod("getMax", new Class[0]); //$NON-NLS-1$
- 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.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 0f1b8bf9c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLparser.java
+++ /dev/null
@@ -1,1088 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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);
- _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);
- }
- 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);
- 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;
-
- public KeepAliveRequestThread(long timeout)
- {
- _timeout = timeout;
- _failed = false;
- }
-
- public void run()
- {
- _dataStore.sendKeepAliveRequest();
- try
- {
- sleep(_timeout);
- }
- catch (InterruptedException e)
- {
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive thread interrupted."); //$NON-NLS-1$
- return;
- }
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive thread failed to be interrupted."); //$NON-NLS-1$
- _failed = true;
- }
-
- public boolean failed()
- {
- return _failed;
- }
- }
-
-}
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 cc48fd964..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreSSLContext.java
+++ /dev/null
@@ -1,95 +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) - [225507][api][breaking] RSE dstore API leaks non-API types
- * Noriaki Takatsu (IBM) - [259905][api] Provide a facility to use its own keystore
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.core.util.ssl;
-
-import java.security.KeyStore;
-
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-
-import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
-import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
-
-
-public class DStoreSSLContext
-{
- private static KeyManager[] _keyManager;
-
- public static void setKeyManager(KeyManager[] keyManager)
- {
- _keyManager = keyManager;
- }
-
- public static SSLContext getServerSSLContext(String filePath, String password)
- {
- SSLContext serverContext = null;
-
- try
- {
- if (_keyManager == 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$
- serverContext.init(kmf.getKeyManagers(), null, null);
- }
- else
- {
- serverContext = SSLContext.getInstance("SSL"); //$NON-NLS-1$
- serverContext.init(_keyManager, 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;
-
-
- clientContext.init(_keyManager, 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 3ba6a3f66..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DataStoreTrustManager.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) - [225507][api][breaking] RSE dstore API leaks non-API types
- *******************************************************************************/
-
-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
- {
- 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 f107e7760..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.2.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 e6ca40d61..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/plugin.properties
+++ /dev/null
@@ -1,16 +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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Platform Support
-providerName = Eclipse.org
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 2aff9a051..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainNotifier.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) - [225507][api][breaking] RSE dstore API leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.dstore.extra;
-
-/**
- * For DataStore domain notification
- *
- * @noimplement This interface is not intended to be implemented 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 5da3a3843..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java
+++ /dev/null
@@ -1,96 +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 803b7dfdf..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.0.2.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 faff66f5a..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties
+++ /dev/null
@@ -1,20 +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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Connector Service
-providerName = Eclipse.org
-
-# 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 20dddc174..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java
+++ /dev/null
@@ -1,1560 +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
- *******************************************************************************/
-
-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 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);
- }
-
-
-
- /*
- * Set the subsystem, when its not known at constructor time
- *
- public void setSubSystem(SubSystem ss)
- {
- super.setSubSystem(ss);
- setDaemonLaunchEnabled((SubSystemImpl)ss, false);
- }*/
-
-
- public int getServerVersion()
- {
- return clientConnection.getServerVersion();
- }
-
- public int getServerMinor()
- {
- return clientConnection.getServerMinor();
- }
-
- /**
- * Retrieve the value of a property which is contained in the environment miners
- * system info child. Currently supported properties:
- * <ul>
- * <li>os.name
- * <li>os.version
- * <li>user.home
- * <li>temp.dir
- * </ul>
- * @return The String value of the property or "" if the property was not found.
- */
- private String getSystemInfoProperty(String propertyName)
- {
- // System properties require a connection
- if (!isConnected())
- {
- try
- {
- 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();
- }
-
-// /**
-// * Specify if you support connecting to a running daemon
-// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
-// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public void setDaemonLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
-// enableServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL, enable);
-// }
-
-// /**
-// * Return if you support connecting to a running daemon
-// * @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)}
-// * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public boolean getDaemonLaunchEnabled(SubSystem subsystemImpl) {
-// return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL);
-// }
-
-// /**
-// * Specify if you support remotely launching a server script
-// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
-// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public void setRexecLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
-// enableServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL, enable);
-// }
-
- /**
- * Return if you support remotely launching a server script
- * @deprecated Use instead {@link #isServerLaunchTypeEnabled(ISubSystem, ServerLaunchType)}
- * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
- */
- public boolean getRexecLaunchEnabled(SubSystem subsystemImpl) {
- return isServerLaunchTypeEnabled(subsystemImpl, ServerLaunchType.REXEC_LITERAL);
- }
-
-// /**
-// * Specify if you support connecting to a server already running
-// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
-// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public void setNoLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
-// enableServerLaunchType(subsystemImpl, ServerLaunchType.RUNNING_LITERAL, enable);
-// }
-
- /**
- * Return if you support connecting to a server already running
- * @deprecated Use instead {@link #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);
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(IProgressMonitor)
- */
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- if (isConnected() || _isConnecting) {
- return;
- }
-
- _isConnecting = true;
- boolean alertedNONSSL = 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()));
-
-// ISubSystem ss = getPrimarySubSystem();
- getPrimarySubSystem();
- IRemoteServerLauncher serverLauncher = getDStoreServerLauncher();
-
- ServerLaunchType serverLauncherType = null;
- boolean autoDetectSSL = true;
- if (serverLauncher != null)
- {
- serverLauncherType = serverLauncher.getServerLaunchType();
- autoDetectSSL = serverLauncher.getAutoDetectSSL();
- }
- else
- {
- // System.out.println("server launcher is null");
- }
-
- //long t1 = System.currentTimeMillis();
- SystemMessage msg = null;
- boolean launchFailed = false;
-
- // get Socket Timeout Value Preference
- int timeout = getSocketTimeOutValue();
-
- if (serverLauncherType == ServerLaunchType.REXEC_LITERAL)
- {
- if (monitor != null)
- {
- String cmsg = ConnectorServiceResources.MSG_STARTING_SERVER_VIA_REXEC;
- monitor.subTask(cmsg);
- }
-
- SystemSignonInformation info = getSignonInformation();
-
- // GC: - if failed to get a connection in another way, try
- // starting the datastore server with rexec
- IServerLauncher starter = getRemoteServerLauncher();
- starter.setSignonInformation(info);
- starter.setServerLauncherProperties(serverLauncher);
- if (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
- {
- launchFailed = true;
- connectStatus = new ConnectionStatus(false);
- 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);
- }
- }
- // Start the server via the daemon
- else if (serverLauncherType == ServerLaunchType.DAEMON_LITERAL)
- {
- if (monitor != null)
- {
- String cmsg = ConnectorServiceResources.MSG_STARTING_SERVER_VIA_DAEMON;
- monitor.subTask(cmsg);
- }
-
- // DY: getLocalUserId() may return null for Windows connections because
- // we no longer prompt for userid / pwd. But for other connections the userid
- // should be the same as the one stored in the password info (and for Windows
- // this will be the temp remoteuser userid.
- //launchStatus = clientConnection.launchServer(getLocalUserId(), getPassword(getPasswordInformation()));
- SystemSignonInformation info = getSignonInformation();
- if (info == null)
- {
- SystemBasePlugin.logError("password info = null!"); //$NON-NLS-1$
- }
-
- int daemonPort = 0;
- if (serverLauncher != null)
- daemonPort = serverLauncher.getDaemonPort();
-
- /* String daemonPortStr = getSubSystem().getVendorAttribute("Remote", "DAEMON_PORT");
- if (daemonPortStr != null && daemonPortStr.length() > 0)
- {
- daemonPort = Integer.parseInt(daemonPortStr);
- }*/
-
- // 205986] FIRST TRY SSL, THEN NON-SECURE!
- boolean usedSSL = true;
- setSSLProperties(true);
-
- 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)
- {
- _isConnecting = false;
- if (provider.importCertificates(certs, getHostName()))
- {
- internalConnect(monitor);
- return;
- }
- else
- {
- 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());
- 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 = true;
- }
- }
- if (allowNonSSL){
- launchStatus = launchServer(clientConnection, info, daemonPort, monitor, timeout);
- }
- else {
- _isConnecting = false;
- clientConnection = null;
-
- throw new OperationCanceledException();
- }
- }
- }
-
- if (!launchStatus.isConnected())
- {
- 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))
- {
- _isConnecting = false;
- internalConnect(monitor);
- return;
- }
- }
- else if (launchMsg != null && isPortOutOfRange(launchMsg))
- {
- _isConnecting = false;
- launchFailed = true;
-
-
- 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);
-
- ShowConnectMessage msgAction = new ShowConnectMessage(message);
- Display.getDefault().asyncExec(msgAction);
- return;
- }
- else
- {
- launchFailed = true;
- SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); //$NON-NLS-1$
- }
- }
- if (launchStatus.isConnected())
- {
- if (monitor != null)
- {
- 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
- )
- )
- {
- _isConnecting = false;
- if (conE instanceof SSLHandshakeException)
- {
- List certs = connectStatus.getUntrustedCertificates();
- if (certs != null && certs.size() > 0)
- {
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null)
- {
-
- if (provider.importCertificates(certs, getHostName()))
- {
- internalConnect(monitor);
- return;
- }
- else
- {
- throw new InterruptedException();
- }
- }
- }
-
- }
- launchStatus = launchServer(clientConnection, info, daemonPort, monitor);
- if (!launchStatus.isConnected())
- {
- launchFailed = true;
- }
- else
- {
- if (setSSLProperties(!usedSSL))
- {
- connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout);
- }
- }
- }
- if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
- {
- _isConnecting = false;
- importCertsAndReconnect(connectStatus, monitor);
- return;
- }
-
- /*
- if (connectStatus != null && connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_UPDATE))
- {
- // offer to update it
- clientConnection.getDataStore().queryInstall();
- }
- */
- }
- else
- {
- connectStatus = new ConnectionStatus(false);
-
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
- connectStatus.setMessage(cmsg);
- }
- }
- else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL)
- {
- if (monitor != null)
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort());
- monitor.subTask(cmsg);
- }
- // connection directly
- boolean useSSL = isUsingSSL();
- setSSLProperties(useSSL);
- connectStatus = clientConnection.connect(null, timeout);
- }
- // server launcher type is unknown
- else
- {
- SystemSignonInformation info = getSignonInformation();
- connectStatus = launchServer(clientConnection, info, serverLauncher, monitor);
- if (!connectStatus.isConnected() && !clientConnection.isKnownStatus(connectStatus.getMessage()))
- {
- if (setSSLProperties(true))
- {
- connectStatus = launchServer(clientConnection, info, serverLauncher, monitor);
- if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
- {
- _isConnecting = false;
- importCertsAndReconnect(connectStatus, monitor);
- return;
- }
- }
- }
-
- }
-
- // if connected
- if (connectStatus != null && connectStatus.isConnected())
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- if (clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_SSL))
- {
- 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){ // 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);
-
-
-
- // DKM: dataStore needs a miners location
- // for now, I'll use dstore.miners as default location
- // (I've inserted the universal miner in it's minerFile.dat file)
-
- // DY: defect 46811 The minerFile.dat does not exist in this directory which causes a
- // java.io.FileNotFoundException to be printed to the console (not very
- // encouraging for the end user.) So I'm setting it to the current directory (.)
- // which should be where the code is run from
- //dataStore.addMinersLocation("org.eclipse.dstore.miners");
-
-
- StatusMonitor statusMonitor = StatusMonitorFactory.getInstance().getStatusMonitorFor(this, dataStore);
-
- if (launchStatus != null && launchStatus.isConnected())
- {
- //dataStore.showTicket(launchStatus.getTicket()); // send security token to server, this must be done first
- DataElement ticket = dataStore.createTicket(launchStatus.getTicket());
- dataStore.queryShowTicket(ticket);
- //statusMonitor.waitForUpdate(ticketStatus);
- }
- else
- {
- dataStore.showTicket(null);
- }
-
- // if (dataStore.isDoSpirit()) dataStore.queryServerSpiritState();
- 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);
- }
- //long t2 = System.currentTimeMillis();
- //System.out.println("connect time = "+(t2 - t1));
- }
- else
- {
- // if daemon launch failed because of an SSL problem
- if (launchFailed && launchStatus != null && launchStatus.isSLLProblem())
- {
- if (launchStatus.isSLLProblem())
- {
- launchStatus.getException();
-
- List certs = launchStatus.getUntrustedCertificates();
- if (certs.size() > 0)
- {
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null)
- {
- if (provider.importCertificates(certs, getHostName()))
- {
- _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());
- _isConnecting = false;
-
- // 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);
- }
- }
- }
-
- // 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);
- }
- _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 7bb8eb424..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties
+++ /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
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-DStore_ConnectorService_Label=DStore Connector Service
-DStore_ConnectorService_Description=The DStore Connector Service uses RSE's DataStore protocol to connect to the host. You must have a DataStore daemon or server running on the remote machine.
-
-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.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/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index a426e828d..000000000
--- a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Apr 25 15:35:14 CEST 2007
-eclipse.preferences.version=1
-encoding//src/org/eclipse/rse/internal/core/messages.properties=8859_1
diff --git a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 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 1831384d0..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.0.4.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 fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.core/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/about.mappings b/rse/plugins/org.eclipse.rse.core/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.core/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/about.properties b/rse/plugins/org.eclipse.rse.core/about.properties
deleted file mode 100644
index 8a09f9861..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=Remote System Explorer 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 6d217bc3d..000000000
--- a/rse/plugins/org.eclipse.rse.core/build.properties
+++ /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
-#
-# 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,\
- eclipse32.png,\
- icons/
-source.. = src/
-output.. = bin/
-
-javacSource=1.4
-javacTarget=1.4
-src.includes = about.html,\
- schema/
diff --git a/rse/plugins/org.eclipse.rse.core/eclipse32.png b/rse/plugins/org.eclipse.rse.core/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.core/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/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 6976c8852..000000000
--- a/rse/plugins/org.eclipse.rse.core/plugin.properties
+++ /dev/null
@@ -1,41 +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) - [186525] Move keystoreProviders to core
-# Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = Remote System Explorer Core
-providerName = Eclipse.org
-
-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 62411e53b..000000000
--- a/rse/plugins/org.eclipse.rse.core/plugin.xml
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<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 07a03cc33..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.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:
- * Uwe Stieber (Wind River) - Added system types provider extension.
- *******************************************************************************/
-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.
- */
-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 b082ee2a3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreStatusCodes.java
+++ /dev/null
@@ -1,57 +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) - [225988] need API to mark persisted profiles as migrated
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *********************************************************************************/
-
-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
- */
-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 720192e28..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java
+++ /dev/null
@@ -1,81 +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 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
- ********************************************************************************/
-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.
- */
-
-/*
- * 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 e27eaa09c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java
+++ /dev/null
@@ -1,356 +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) - 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()
- ********************************************************************************/
-
-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.
- * 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 1501e39e7..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java
+++ /dev/null
@@ -1,25 +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.
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- ********************************************************************************/
-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.
- */
-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 3965bf400..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java
+++ /dev/null
@@ -1,53 +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:
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- ********************************************************************************/
-
-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.
- */
-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 391c85f61..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.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) - [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
- ********************************************************************************/
-
-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.
- */
-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 e8a0a7cd5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- ********************************************************************************/
-
-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.
- */
-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 a18d35ae1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.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) - [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
- ********************************************************************************/
-
-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.
- */
-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 c07fb130b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- ********************************************************************************/
-
-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.
- */
-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 and it's parent RSE object are the expected parameters
- */
- 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 fc7017112..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java
+++ /dev/null
@@ -1,650 +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:
- * 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
- *******************************************************************************/
-
-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.
- */
-
-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 beb582b31..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- *******************************************************************************/
-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.
- */
-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 a1d00bd11..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.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) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- */
-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 521f1f2cb..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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.
- */
-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 1734aa44a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java
+++ /dev/null
@@ -1,642 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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.
- */
-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 4965bdf03..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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.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.
- */
-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 08bef1567..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.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) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- */
-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 e1a69ad49..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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.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.
- */
-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 b5471a456..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- */
-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 d47db9deb..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.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 Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- *
- * @noimplement This interface is not intended to be implemented 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 efdf03d80..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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.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.
- */
-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 ead44d69a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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.
- */
-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 1c5b8cca8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.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:
- * 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.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.
- */
-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 940fc5a1d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.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
- *
- * 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
- *******************************************************************************/
-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.
- */
-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 10362d2f8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.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) - Cleanup Javadoc.
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- */
-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 32770f657..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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.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.
- */
-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 912f64afa..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java
+++ /dev/null
@@ -1,273 +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) - [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
- *******************************************************************************/
-
-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.
- */
-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 99b99d8ac..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java
+++ /dev/null
@@ -1,107 +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;
-
-/**
- * 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.
- * 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 e270c3b33..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java
+++ /dev/null
@@ -1,180 +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.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.
- * 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 d19416f1f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.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
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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
- *******************************************************************************/
-
-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.
- */
-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 983280717..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java
+++ /dev/null
@@ -1,62 +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) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-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.
- * 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 f490fe1d3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java
+++ /dev/null
@@ -1,32 +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;
-
-
-/**
- * IRSEModelObject is the root type of all objects in the RSE model.
- * @noimplement This interface is not intended to be implemented 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 dc24359c3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEPersistableContainer.java
+++ /dev/null
@@ -1,127 +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) - adding new persistence support
- * 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;
-
-/**
- * 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.
- */
-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 a8a7ac0c0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java
+++ /dev/null
@@ -1,42 +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) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-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)}.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * This is a constant interface. The individual items should be
- * referenced directly.
- */
-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 20fedfacd..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java
+++ /dev/null
@@ -1,61 +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;
-
-/**
- * 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 can 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 2ec0698d1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.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 Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-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.
- */
-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 a778552e3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- ********************************************************************************/
-
-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.
- */
-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 11e9d6dd6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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;
-
-/**
- * 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.
- * 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 2afd3de49..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModifiableContainer.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
- *
- * 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
- *********************************************************************************/
-
-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.
- *
- * @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 8f20539c9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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.
- * 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 688d7b400..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-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.
- * 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 ac1d54787..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
+++ /dev/null
@@ -1,984 +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) - [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
- ********************************************************************************/
-
-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.
- * 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 factory proxies registered by extension points.
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies();
-
- /**
- * Return all subsystem factory proxies matching a subsystem factory category.
- * @see ISubSystemConfigurationCategories
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory);
-
- /**
- * Return all subsystem factories.
- *
- * Be careful when you call this, as it activates all subsystem 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 80d5b96c4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.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 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.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.
- */
-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 6558e0165..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferenceManager.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 Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- *******************************************************************************/
-
-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.
- */
-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 8e024144d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java
+++ /dev/null
@@ -1,51 +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) - [226561] Add API markup for noextend / noimplement where needed
- ********************************************************************************/
-
-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.
- */
-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 f01dbdae0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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.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.
- */
-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 d9e1728a7..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.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) - Cleanup Javadoc.
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- ********************************************************************************/
-
-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.
- */
-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 6fb93c2f6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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.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.
- */
-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 1610d2640..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java
+++ /dev/null
@@ -1,28 +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) - [226561] Add API markup for noextend / noimplement where needed
- ********************************************************************************/
-
-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.
- */
-
-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 b018a2941..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencingObject.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) - [226561] Add API markup for noextend / noimplement where needed
- *******************************************************************************/
-
-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.
- */
-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 e51907bf6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java
+++ /dev/null
@@ -1,33 +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) - [226561] Add API markup for noextend / noimplement where needed
- ********************************************************************************/
-
-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.
- */
-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 bd22ed2b1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencingObject.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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.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.
- */
-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 dc33b5a20..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- ********************************************************************************/
-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;
-
-/**
- * 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) {
- 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;
- }
-
-
-
-} \ 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 7d8eda577..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java
+++ /dev/null
@@ -1,425 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- ********************************************************************************/
-
-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.
- */
-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 33619c855..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.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:
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- *******************************************************************************/
-
-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.
- */
-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 43bc023cf..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.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) - [cleanup] Add API "since" Javadoc tags
- *******************************************************************************/
-
-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.
- */
-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 f3c5ce798..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
+++ /dev/null
@@ -1,689 +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) - [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
- ********************************************************************************/
-
-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.
- */
- public void initializeSubSystem(IProgressMonitor monitor);
-
- /**
- * 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 4514c8b40..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
+++ /dev/null
@@ -1,743 +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()
- * 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 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;
-
- /**
- * <i><b>Private</b>. Do not call or use.</i><br>
- * @generated This field/method will be replaced during code generation
- * @return The list of SubSystemList references
- */
- java.util.List getSubSystemList();
-
- /**
- * <i><b>Private</b>. Do not call or use.</i><br>
- * @generated This field/method will be replaced during code generation
- * @return The list of FilterPoolManagerList references
- */
- java.util.List getFilterPoolManagerList();
-
- public ISystemFilterPool getDefaultFilterPool(ISystemProfile profile, String oldProfileName);
-
- public ISystemProfile getSystemProfile(String name);
-
- public void renameFilterPoolManager(ISystemProfile profile);
-
- // /**
- // * Return the validator for the userId.
- // * A default is supplied.
- // * Note this is only used for the subsystem's properties, so will not
- // * be used by the connection's default. Thus, is only of limited value.
- // * <p>
- // * This must be castable to ICellEditorValidator for the property sheet support.
- // */
- // public ISystemValidator getUserIdValidator();
- // /**
- // * Return the validator for the password which is prompted for at runtime.
- // * No default is supplied.
- // */
- // public ISystemValidator getPasswordValidator();
- // /**
- // * Return the validator for the port.
- // * A default is supplied.
- // * This must be castable to ICellEditorValidator for the property sheet support.
- // */
- // public ISystemValidator getPortValidator();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java
deleted file mode 100644
index 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 c088fa549..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 4fcd70c34..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- ********************************************************************************/
-
-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.
- */
-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 477fe15b1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java
+++ /dev/null
@@ -1,204 +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.
- *
- * @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 #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 1aab62b79..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreRegistry.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:
- * 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.
- */
-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 4ce5b4c26..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, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core;
-
-
-/**
- * Constants related to project and folder names.
- *
- * @noimplement This interface is not intended to be implemented 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 be5b7e25c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java
+++ /dev/null
@@ -1,3134 +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:
- * 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
- ********************************************************************************/
-
-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;
- }
-
- /**
- * 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);
-
- // 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)
- {
- //System.out.println("INSIDE CONNECTEDSTATUSCHANGE: "+connected+" vs "+wasConnected);
- IHost conn = subsystem.getHost();
- //int eventId = ISystemResourceChangeEvent.EVENT_CHANGE;
- //int eventId = ISystemResourceChangeEvent.EVENT_PROPERTY_CHANGE;
- if (connected != wasConnected)
- {
- int eventId = ISystemResourceChangeEvents.EVENT_ICON_CHANGE;
- fireEvent(new SystemResourceChangeEvent(conn, eventId, this));
-
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(subsystem, eventId, conn);
- fireEvent(event);
-
- // DKM
- // fire for each subsystem
- ISubSystem[] sses = getSubSystems(conn);
- for (int i = 0; i < sses.length; i++)
- {
- ISubSystem ss = sses[i];
- if (ss != subsystem)
- {
- SystemResourceChangeEvent sevent = new SystemResourceChangeEvent(ss, eventId, conn);
- fireEvent(sevent);
-
- sevent.setType(ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE); // update vrm
- fireEvent(sevent);
- }
- }
-
-
- // DY: Conditioning of property change event type has been removed so
- // that the connected property is updated on a disconnect.
- //if (connected)
- event.setType(ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE); // update vrm
-
- fireEvent(event);
- }
- if (!connected && wasConnected && collapseTree)
- {
- invalidateFiltersFor(subsystem);
- fireEvent(new SystemResourceChangeEvent(subsystem, ISystemResourceChangeEvents.EVENT_MUST_COLLAPSE, this));
-
- ISubSystem[] sses = getSubSystems(conn);
- for (int i = 0; i < sses.length; i++)
- {
- ISubSystem ss = sses[i];
- if (ss != subsystem && !ss.isConnected())
- {
- invalidateFiltersFor(ss);
- SystemResourceChangeEvent sevent = new SystemResourceChangeEvent(ss, ISystemResourceChangeEvents.EVENT_MUST_COLLAPSE, conn);
- fireEvent(sevent);
- }
- }
- }
- }
-
- // ----------------------------
- // RESOURCE EVENT METHODS...
- // ----------------------------
-
- /**
- * Register your interest in being told when a system resource such as a connection is changed.
- */
- public void addSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- listenerManager.addSystemResourceChangeListener(l);
- }
- /**
- * 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 1662f1b8c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
+++ /dev/null
@@ -1,581 +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
- * 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.
- ********************************************************************************/
-
-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.Preferences;
-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.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
- */
- private String getDefaultPersistenceProviderId() {
- Preferences preferences = RSECorePlugin.getDefault().getPluginPreferences();
- String providerId = preferences.getString(IRSEPreferenceNames.DEFAULT_PERSISTENCE_PROVIDER);
- 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 c6e536413..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
+++ /dev/null
@@ -1,663 +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
- ********************************************************************************/
-
-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];
- if (ss.getSubSystemConfiguration() == config){
- 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();
- 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 8fa40f014..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceManager.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:
- * 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
- *******************************************************************************/
-
-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
- */
-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 2314e12f3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.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) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - add attribute name for filter type
- *******************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-/**
- * Constants used in RSE DOMs.
- *
- * @noimplement This interface is not intended to be implemented 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.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 c42b5baa6..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.2.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 3fa050312..000000000
--- a/rse/plugins/org.eclipse.rse.efs/plugin.properties
+++ /dev/null
@@ -1,21 +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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Eclipse Filesystem (EFS) Provider
-providerName = Eclipse.org
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 258291ea0..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) -[241315] [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 114f48524..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStore.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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) - [291738] [efs] repeated queries to RSEFileStoreImpl.fetchInfo() in short time-span should be reduced
- * Szymon Brandys (IBM) - [303092] [efs] RSE portion to deal with FileSystemResourceManager makes second call to efs provider on exception due to cancel
- ********************************************************************************/
-
-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.OperationCanceledException;
-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 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$
- }
- }
- }
-
- /**
- * 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();
- store = new RSEFileStore(hostName, path);
- 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;
- }
-
- /**
- * 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 {
- try {
- return getImpl().openInputStream(options, monitor);
- } catch (OperationCanceledException ex) {
- monitor.setCanceled(true);
- return null; //empty input stream
- }
- }
-
- /*
- * (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 fdae615f9..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java
+++ /dev/null
@@ -1,780 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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) - [291738] [efs] repeated queries to RSEFileStoreImpl.fetchInfo() in short time-span should be reduced
- * Szymon Brandys (IBM) - [303092] [efs] RSE portion to deal with FileSystemResourceManager makes second call to efs provider on exception due to cancel
- ********************************************************************************/
-
-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.OperationCanceledException;
-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 excessive 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.
- *
- * @param hostNameOrAddr IP address of requested host.
- * @return RSE connection object matching the given host name, or
- * <code>null</code> if no matching connection object was found.
- */
- public static IHost getConnectionFor(String hostNameOrAddr, IProgressMonitor monitor) {
- if (hostNameOrAddr==null) {
- return null;
- }
- if (!_initialized) {
- waitForRSEInit();
- }
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- IHost[] connections = sr.getHosts();
-
- IHost unconnected = null;
- 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 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, IProgressMonitor monitor) throws CoreException
- {
- IHost con = RSEFileStoreImpl.getConnectionFor(hostNameOrAddr, 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 (OperationCanceledException e) {
- throw e;
- }
- 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
- IRemoteFileSubSystem subSys = RSEFileStoreImpl.getConnectedFileSubSystem(_store.getHost(), 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 c8aca38b4..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileSystem.java
+++ /dev/null
@@ -1,111 +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 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
- ********************************************************************************/
-
-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);
- }
- }
-} \ 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 26742e05d..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RemoteEditorManager.java
+++ /dev/null
@@ -1,288 +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) -[241315] [efs] Cannot restore editors for RSE/EFS-backed resources
- * David McKnight (IBM) -[241315] [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 (uri != null && uri.getScheme() != null){
- 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) {
- RemoteEditorManager.getDefault().saveRemoteEditors();
- return RemoteEditorManager.getDefault().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 68d52d38e..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.0.4.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.0.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.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.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 22623b111..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/plugin.properties
+++ /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:
-# 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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Files UI
-providerName = Eclipse.org
-
-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
-VirtualObjectDecorator.label=Virtual Object 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
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 b85054997..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/plugin.xml
+++ /dev/null
@@ -1,480 +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
-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
--->
-<?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">
- </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>
-</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 3c2b0b7f9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemotePath.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-
-/**
- * This interface defines a remote path.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface ISystemRemotePath {
-
- /**
- * Get the profile name.
- * @return the profile name
- */
- public String getProfileName();
-
- /**
- * Get the connection name.
- * @return the connection name
- */
- public String getConnectionName();
-
- /**
- * Get the path of the resource on the server.
- * @return the path of the resource on the server
- */
- public String getPath();
-
- /**
- * Returns the complete string representation of the remote path.
- * @return complete string representation of the remote path
- */
- public String toString();
-
- /**
- * Returns whether this path equals the given object.
- * This is system dependent.
- */
- public boolean equals(Object obj);
-}
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 2c63e9150..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
+++ /dev/null
@@ -1,2006 +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.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 = 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;
- }
-
- 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 31b5929a6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- * David McKnight (IBM) - [249544] updated to match HEAD stream
- ********************************************************************************/
-
-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 6f847c96a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
+++ /dev/null
@@ -1,3035 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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
- * 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) - [282902] Variable was not set properly
- * David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
- * David McKnight (IBM) - [299140] Local Readonly file can't be copied/pasted twice
- * David McKnight (IBM) - [298440] jar files in a directory can't be pasted to another system properly
- *******************************************************************************/
-
-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.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.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)
- {
- // before we make the transfer to the temp file check whether a temp file already exists
- if (tempFile.exists() && ((Resource)tempFile).getPropertyManager() != null)
- {
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // compare timestamps
- if (storedModifiedStamp > 0)
- {
- // ;if they're the same, just use temp file
- long remoteModifiedStamp = 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
- * @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 = tempFileAvailable(tempFile, srcFileOrFolder);
- 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 (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.
- * @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 available = tempFileAvailable(tempFile, srcFileOrFolder);
- if (available){
- resultSet.addResource(tempFile);
- }
- else {
- 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))
- {
- // make sure children are not archives!
- ArrayList fcs = new ArrayList();
- for (int c = 0; c < children.length; c++){
- IRemoteFile child = children[c];
- if (!child.isArchive()){
- fcs.add(child);
- }
- }
- if (fcs.size() > 0){
-
- SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, fcs);
-
- //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)
- {
- e.printStackTrace();
- }
- }
- }
- }
-
- // 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++){
- destinations[t] = ((IFile)tempFilesForDownload.get(t)).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())
- {
- // deal with encoding properties
- if (storedEncoding == null || !storedEncoding.equals(currentEncoding)){
- 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);
- 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)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- //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();
- }
-
- // 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)
- {
- e.printStackTrace();
- }
- 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 = null;
- try
- {
- srcCharSet = ((IFile)srcFileOrFolder).getCharset(false);
- if (srcCharSet == null || srcCharSet.length() == 0)
- {
- srcCharSet = srcFileOrFolder.getWorkspace().getRoot().getDefaultCharset();
- }
- }
- catch (CoreException e)
- {
- srcCharSet = SystemEncodingUtil.ENCODING_UTF_8;
- }
-
-
- 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)
- {
- try
- {
- srcCharSet = ((IFile)srcFileOrFolder).getCharset(false);
- if (srcCharSet == null || srcCharSet.length() == 0)
- {
- srcCharSet = srcFileOrFolder.getWorkspace().getRoot().getDefaultCharset();
- }
- }
- catch (CoreException e)
- {
- srcCharSet = SystemEncodingUtil.ENCODING_UTF_8;
- }
- }
- 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)
- {
- 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);
- 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 66341b2e6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java
+++ /dev/null
@@ -1,156 +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
- * 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
- *******************************************************************************/
-
-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.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.files.ui.resources.SystemUniversalTempFileListener;
-import org.eclipse.rse.internal.files.ui.propertypages.SystemCachePreferencePage;
-import org.eclipse.rse.internal.files.ui.propertypages.UniversalPreferencePage;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin
-{
-
- //The shared instance.
- private static Activator plugin;
-
- 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();
- SystemCachePreferencePage.initDefaults(store);
- UniversalPreferencePage.initDefaults(store);
- }
-
- /**
- * 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 229996373..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java
+++ /dev/null
@@ -1,426 +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) - 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
- *******************************************************************************/
-
-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_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 ef7c99147..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties
+++ /dev/null
@@ -1,414 +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) - 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
-###############################################################################
-
-# 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_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= This file has changed on the remote system since it was opened.
-RESID_CONFLICT_SAVE_OVERWRITEREMOTE= Overwrite the remote file.
-RESID_CONFLICT_SAVE_REPLACELOCAL= Replace contents of editor with remote file. Pending changes will be lost.
-RESID_CONFLICT_SAVE_SAVETODIFFERENT= Save the contents of the editor to a different remote file.
-
-RESID_CONFLICT_DOWNLOAD_TITLE= Local Changes Pending
-RESID_CONFLICT_DOWNLOAD_MESSAGE_LOCALCHANGED= This file has pending changes that have not been saved to the remote system.
-RESID_CONFLICT_DOWNLOAD_MESSAGE_REMOTECHANGED= This file has pending changes that have not been saved to the remote system and the file has changed on the remote system.
-RESID_CONFLICT_DOWNLOAD_REPLACELOCAL= Replace pending changes with remote file
-RESID_CONFLICT_DOWNLOAD_OPENWITHLOCAL= Open editor with pending changes
-
-##################################################################################
-############################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 4c06ee0e7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java
+++ /dev/null
@@ -1,524 +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] Link with Editor action for System View
- * David McKnight (IBM) - [238294] ClassCastException using Link With Editor
- *******************************************************************************/
-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(false);
- 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();
- }
-
- 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/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 2d6ece1b0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SynchronizeCacheActionDelegate.java
+++ /dev/null
@@ -1,233 +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
- ********************************************************************************/
-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.SystemRemoteResourceSet;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-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;
-
- public SynchronizeCacheActionDelegate() {
- }
-
- public void run(IAction action) {
- errorStatus = 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;
- }
- }
-
- private void cacheRemoteFiles(IRemoteFile[] files, IProgressMonitor monitor)
- {
- SystemRemoteResourceSet[] sets = getResourceSetsFor(files);
- for (int i = 0; i < sets.length; i++){
- SystemRemoteResourceSet set = sets[i];
- set.getAdapter().doDrag(set, monitor);
- }
- }
-
- 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 f1b513cd8..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareFilesAction.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.files.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.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);
- 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 f56256189..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.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
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- ********************************************************************************/
-
-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;
- }
- 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 dbe38a6b6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.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:
- * 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
- *******************************************************************************/
-
-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.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 editableFile = new SystemEditableRemoteFile(remoteFile, _editorId);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell());
- */
- SystemEditableRemoteFile editable = new SystemEditableRemoteFile(remoteFile, _editorDescriptor);
- {
- 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 7f160bc28..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- *******************************************************************************/
-
-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.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 = new SystemEditableRemoteFile(remoteFile, des);
- {
- 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 204a94c77..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditionAction.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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 java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import org.eclipse.compare.EditionSelectionDialog;
-import org.eclipse.compare.HistoryItem;
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.ResourceNode;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-public class SystemEditionAction extends SystemBaseAction
-{
-
- /**
- * Implements the IStreamContentAccessor and ITypedElement protocols
- * for a Document.
- */
- class DocumentBufferNode implements ITypedElement, IStreamContentAccessor
- {
-
- private IDocument fDocument;
- private IFile fFile;
-
- DocumentBufferNode(IDocument document, IFile file)
- {
- fDocument = document;
- fFile = file;
- }
-
- public String getName()
- {
- return fFile.getName();
- }
-
- public String getType()
- {
- return fFile.getFileExtension();
- }
-
- public Image getImage()
- {
- return null;
- }
-
- public InputStream getContents()
- {
- return new ByteArrayInputStream(fDocument.get().getBytes());
- }
- }
-
- private List _selected;
- private boolean fReplaceMode;
- private String fBundleName;
- protected boolean fPrevious = false;
- protected String fHelpContextId;
-
- SystemEditionAction(Shell parent, String title, String tooltip, String bundleName, boolean replaceMode)
- {
- super(title, parent);
- setToolTipText(tooltip);
-
- fReplaceMode = replaceMode;
- fBundleName = bundleName;
- _selected = new ArrayList();
- }
-
-
- /**
- * Called when the selection changes in the systems view. This determines
- * the input object for the command and whether to enable or disable
- * the action.
- *
- * @param selection the current seleciton
- * @return whether to enable or disable the action
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = false;
- _selected.clear();
- Iterator e = selection.iterator();
- if (e.hasNext())
- {
- Object selected = e.next();
-
- if (selected != null && selected instanceof IRemoteFile)
- {
- RemoteFile file = (RemoteFile) selected;
- if (file.isFile())
- {
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter)file.getAdapter(ISystemRemoteElementAdapter.class);
- if (adapter != null)
- {
- ISystemEditableRemoteObject editable = adapter.getEditableRemoteObject(file);
- if (editable != null)
- {
- if (editable.getLocalResource().exists())
- {
- _selected.add(file);
- enable = true;
- }
- }
- }
-
-
- /** FIXME - no longer have a getCachedCopy() method
- try
- {
- if (file.getCachedCopy() != null)
- {
- _selected.add(file);
- enable = true;
- }
- }
- catch (SystemMessageException ex)
- {
- }
- */
- }
- }
- }
-
- return enable;
- }
-
- public void run()
- {
- // get cached file
- IFile[] files = getFiles(_selected, fReplaceMode);
- for (int i = 0; i < files.length; i++)
- doFromHistory(files[i]);
- }
-
- private void doFromHistory(final IFile file)
- {
- //DKM - hack - needed to use compare class loader to load bundle for current locale
- ResourceBundle bundle = ResourceBundle.getBundle(fBundleName, Locale.getDefault(), CompareUIPlugin.class.getClassLoader());
-
- String title = Utilities.getString(bundle, "title"); //$NON-NLS-1$
-
- Shell parentShell = CompareUIPlugin.getShell();
-
- IFileState states[] = null;
- try
- {
- states = file.getHistory(null);
- }
- catch (CoreException ex)
- {
- MessageDialog.openError(parentShell, title, ex.getMessage());
- return;
- }
-
- if (states == null || states.length <= 0)
- {
- String msg = Utilities.getString(bundle, "noLocalHistoryError"); //$NON-NLS-1$
- MessageDialog.openInformation(parentShell, title, msg);
- return;
- }
-
- ITypedElement base = new ResourceNode(file);
-
- IDocument document = getDocument(file);
- ITypedElement target = base;
- if (document != null)
- target = new DocumentBufferNode(document, file);
-
- ITypedElement[] editions = new ITypedElement[states.length + 1];
- editions[0] = base;
- for (int i = 0; i < states.length; i++)
- editions[i + 1] = new HistoryItem(base, states[i]);
-
- EditionSelectionDialog d = new EditionSelectionDialog(parentShell, bundle);
- d.setEditionTitleArgument(file.getName());
- d.setEditionTitleImage(CompareUIPlugin.getImage(file));
- //d.setHideIdenticalEntries(false);
- if (fHelpContextId != null)
- d.setHelpContextId(fHelpContextId);
-
- if (fReplaceMode)
- {
-
- ITypedElement ti = null;
- if (fPrevious)
- ti = d.selectPreviousEdition(target, editions, null);
- else
- ti = d.selectEdition(target, editions, null);
-
- if (ti instanceof IStreamContentAccessor)
- {
- IStreamContentAccessor sa = (IStreamContentAccessor) ti;
- try
- {
-
- if (document != null)
- updateDocument(document, sa);
- else
- updateWorkspace(bundle, parentShell, sa, file);
-
- }
- catch (InterruptedException x)
- {
- // Do nothing. Operation has been 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 text = Utilities.readString(is, SystemEncodingUtil.ENCODING_UTF_8);
- document.replace(0, document.getLength(), text);
- }
- catch (CoreException e)
- {
- throw new InvocationTargetException(e);
- }
- catch (BadLocationException e)
- {
- throw new InvocationTargetException(e);
- }
- catch (Exception e) // TODO in Eclipse 3.3 this should be changed to IOException
- {
- throw new InvocationTargetException(e);
- }
- }
-
- private IDocument getDocument(IFile file)
- {
- IWorkbench wb = PlatformUI.getWorkbench();
- if (wb == null)
- return null;
- IWorkbenchWindow[] ws = wb.getWorkbenchWindows();
- if (ws == null)
- return null;
-
- FileEditorInput test = new FileEditorInput(file);
-
- for (int i = 0; i < ws.length; i++)
- {
- IWorkbenchWindow w = ws[i];
- IWorkbenchPage[] wps = w.getPages();
- if (wps != null)
- {
- for (int j = 0; j < wps.length; j++)
- {
- IWorkbenchPage wp = wps[j];
- IEditorPart ep = wp.findEditor(test);
- if (ep instanceof ITextEditor)
- {
- ITextEditor te = (ITextEditor) ep;
- IDocumentProvider dp = te.getDocumentProvider();
- if (dp != null)
- {
- IDocument doc = dp.getDocument(ep);
- if (doc != null)
- return doc;
- }
- }
- }
- }
- }
- return null;
- }
-
- private IFile[] getFiles(List remoteFiles, boolean modifiable)
- {
- IFile[] result = new IFile[remoteFiles.size()];
- for (int i = 0; i < remoteFiles.size(); i++)
- {
- IRemoteFile remotefile = (IRemoteFile)remoteFiles.get(i);
- SystemEditableRemoteFile eFile = new SystemEditableRemoteFile(remotefile);
- try
- {
- eFile.download(getShell());
- eFile.addAsListener();
- eFile.setLocalResourceProperties();
- IFile localFile = eFile.getLocalResource();
- result[i] = localFile;
- }
- catch (Exception e)
- {
- }
- }
-
- return result;
- }
-
-}
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 cb8a8f412..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileAction.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.files.ui.actions;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-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.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;
- }
-
-}
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 078951ae5..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFolderAction.java
+++ /dev/null
@@ -1,68 +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.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-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.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;
- }
-
-}
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 783c1a472..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java
+++ /dev/null
@@ -1,495 +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) - [189873] DownloadJob changed to DownloadAndOpenJob
- * 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 java.util.Hashtable;
-
-import org.eclipse.core.resources.IFile;
-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.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.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.EditorSelectionDialog;
-import org.eclipse.ui.ide.IDE;
-
-
-/**
- * Open with menu class for remote files
- */
-public class SystemRemoteFileOpenWithMenu extends ContributionItem
-{
- protected IWorkbenchPage page;
- protected IRemoteFile _remoteFile;
- protected IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
-
- private static Hashtable imageCache = new Hashtable(11);
-
- /**
- * The id of this action.
- */
- public static final String ID = PlatformUI.PLUGIN_ID + ".OpenWithMenu";//$NON-NLS-1$
-
- /*
- * Compares the labels from two IEditorDescriptor objects
- */
- private static final Comparator comparer = new Comparator()
- {
- private Collator collator = Collator.getInstance();
-
- public int compare(Object arg0, Object arg1) {
- String s1 = ((IEditorDescriptor)arg0).getLabel();
- String s2 = ((IEditorDescriptor)arg1).getLabel();
- return collator.compare(s1, s2);
- }
- };
-
-
-/**
- * Constructs a new instance of <code>SystemOpenWithMenu</code>.
- */
-public SystemRemoteFileOpenWithMenu()
-{
- super(ID);
- this.page = null;
- _remoteFile = null;
-}
-
-/*
- * Initializes the IRemoteFile
- */
-public void updateSelection(IStructuredSelection selection)
-{
- if (selection.size() == 1)
- {
- _remoteFile = (IRemoteFile)selection.getFirstElement();
- }
-}
-
-/**
- * Returns an image to show for the corresponding editor descriptor.
- *
- * @param editorDesc the editor descriptor, or null for the system editor
- * @return the image or null
- */
-protected Image getImage(IEditorDescriptor editorDesc) {
- ImageDescriptor imageDesc = getImageDescriptor(editorDesc);
- if (imageDesc == null) {
- return null;
- }
- Image image = (Image) imageCache.get(imageDesc);
- if (image == null) {
- image = imageDesc.createImage();
- imageCache.put(imageDesc, image);
- }
- return image;
-}
-
-private String getFileName()
-{
- return _remoteFile.getName();
-}
-
-/**
- * Returns the image descriptor for the given editor descriptor,
- * or null if it has no image.
- */
-private ImageDescriptor getImageDescriptor(IEditorDescriptor editorDesc) {
- ImageDescriptor imageDesc = null;
- if (editorDesc == null) {
- imageDesc = registry.getImageDescriptor(getFileName());
- }
- else {
- imageDesc = editorDesc.getImageDescriptor();
- }
- if (imageDesc == null && 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 = null;
-
- if (descriptor == null)
- {
- editable = new SystemEditableRemoteFile(remoteFile);
- }
- else
- {
- editable = new SystemEditableRemoteFile(remoteFile, descriptor);
- }
-
- boolean systemEditor = descriptor != null && descriptor.getId().equals(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
-
- if (isFileCached(editable, remoteFile)) {
-
- try {
- if (systemEditor) {
- editable.openSystemEditor();
- }
- else {
- editable.openEditor();
- }
- }
- catch (Exception e) {}
- }
- else {
- DownloadAndOpenJob oJob = new DownloadAndOpenJob(editable, systemEditor);
- oJob.schedule();
- }
-}
-
-private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile remoteFile)
-{
- // DY: check if the file exists and is read-only (because it was previously opened
- // in the system editor)
- IFile file = editable.getLocalResource();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- boolean newFile = !file.exists();
-
- // detect whether there exists a temp copy already
- if (!newFile && file.exists())
- {
- // we have a local copy of this file, so we need to compare timestamps
-
- // get stored modification stamp
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // get updated remoteFile so we get the current remote timestamp
- //remoteFile.markStale(true);
- IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), 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 695df145a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchAction.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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-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.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);
- }
-} \ 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 36666970c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.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:
- * 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
- * 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.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.jface.window.Window;
-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.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.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.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
- {
- // copy temp file to remote system
- String srcEncoding = null;
-
- try {
- srcEncoding = _tempFile.getCharset(true);
- if (srcEncoding == null || srcEncoding.length() == 0)
- {
- srcEncoding = _tempFile.getWorkspace().getRoot().getDefaultCharset();
- }
- }
- catch (CoreException e){
- srcEncoding = SystemEncodingUtil.ENCODING_UTF_8;
- }
-
-
- 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);
-
-
-
- String srcEncoding = null;
-
- try {
- srcEncoding = _tempFile.getCharset(true);
- if (srcEncoding == null || srcEncoding.length() == 0)
- {
- srcEncoding = _tempFile.getWorkspace().getRoot().getDefaultCharset();
- }
- }
- catch (CoreException e){
- srcEncoding = SystemEncodingUtil.ENCODING_UTF_8;
- }
-
- // download remote version
- 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 = null;
-
- try {
- srcEncoding = _tempFile.getCharset(true);
- if (srcEncoding == null || srcEncoding.length() == 0)
- {
- srcEncoding = _tempFile.getWorkspace().getRoot().getDefaultCharset();
- }
- }
- catch (CoreException e){
- srcEncoding = SystemEncodingUtil.ENCODING_UTF_8;
- }
-
-
- 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(), new NullProgressMonitor());
-
- 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;
-
- /**
- * Constructor.
- * @param shell the parent shell of the dialog
- */
- public UploadConflictDialog(Shell shell)
- {
- super(shell, FileResources.RESID_CONFLICT_SAVE_TITLE);
- //pack();
- }
-
- /**
- * Called when a button is pressed in the dialog
- */
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
- _overwriteLocal = _overwriteLocalButton.getSelection();
- _overwriteRemote = _overwriteRemoteButton.getSelection();
- _saveas = _saveasButton.getSelection();
- close();
- }
-
- /**
- * Returns whether the user decided to overwrite the local file
- * @return whether the user decided to overwrite the local file
- */
- public boolean getOverwriteLocal()
- {
- return _overwriteLocal;
- }
-
- /**
- * Returns whether the user decided to overwrite the remote file
- * @return whether the user decided to overwrite the remote file
- */
- public boolean getOverwriteRemote()
- {
- return _overwriteRemote;
- }
-
- /**
- * Returns whether the user decided to save to a different location
- * @return whether the user decided to save to a different location
- */
- public boolean getSaveas()
- {
- return _saveas;
- }
-
- /**
- * Returns the location where the cached file should be saved to
- * @return the location where the cached file should be saved to
- */
- public IRemoteFile getSaveasLocation()
- {
- return _saveasLocation;
- }
-
- /**
- * Creates the dialog contents.
- */
- public Control createInner(Composite parent)
- {
- Image image = getShell().getDisplay().getSystemImage(SWT.ICON_QUESTION);
-
- Composite c = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- c.setLayout(layout);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite m = new Composite(c, SWT.NONE);
-
- GridLayout mlayout = new GridLayout();
- mlayout.numColumns = 2;
- m.setLayout(mlayout);
- m.setLayoutData(new GridData(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(FileResources.RESID_CONFLICT_SAVE_MESSAGE);
- 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());
- 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 a3b7d1711..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java
+++ /dev/null
@@ -1,650 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- ********************************************************************************/
-
-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.
- */
- public static void initDefaults(IPreferenceStore store)
- {
- store.setDefault(ISystemFilePreferencesConstants.LIMIT_CACHE, ISystemFilePreferencesConstants.DEFAULT_LIMIT_CACHE);
- store.setDefault(ISystemFilePreferencesConstants.MAX_CACHE_SIZE, ISystemFilePreferencesConstants.DEFAULT_MAX_CACHE_SIZE);
- }
-
- /**
- * @see FieldEditorPreferencePage#performOk()
- */
- public boolean performOk()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- String size = _maxCacheSize.getText();
-
- if (size == null || size.trim().equals("")) { //$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 965a6c155..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java
+++ /dev/null
@@ -1,495 +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.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.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 implements SelectionListener {
-
- 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);
- _userRead.addSelectionListener(this);
-
- _userWrite = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _userWrite.setLayoutData(data);
- _userWrite.addSelectionListener(this);
-
- _userExecute = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _userExecute.setLayoutData(data);
- _userExecute.addSelectionListener(this);
-
- 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);
- _groupRead.addSelectionListener(this);
-
- _groupWrite = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _groupWrite.setLayoutData(data);
- _groupWrite.addSelectionListener(this);
-
- _groupExecute = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _groupExecute.setLayoutData(data);
- _groupExecute.addSelectionListener(this);
-
- 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);
- _otherRead.addSelectionListener(this);
-
- _otherWrite = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _otherWrite.setLayoutData(data);
- _otherWrite.addSelectionListener(this);
-
- _otherExecute = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _otherExecute.setLayoutData(data);
- _otherExecute.addSelectionListener(this);
-
- 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)
- {
- setErrorMessage(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){
- setErrorMessage(e.getSystemMessage());
- performDefaults();
- }
- 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);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- public void widgetSelected(SelectionEvent e) {
- clearErrorMessage();
- }
-}
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 70774965b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java
+++ /dev/null
@@ -1,1062 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- ********************************************************************************/
-
-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.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);
-
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
-
- // 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);
-
-
- store.setDefault(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS, true);
-
-
- // 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);
-
- String initialArchiveType = store.getString(ISystemFilePreferencesConstants.SUPERTRANSFER_ARC_TYPE);
- if (initialArchiveType == null ||
- !ArchiveHandlerManager.getInstance().isRegisteredArchive("test." + initialArchiveType)) //$NON-NLS-1$
- {
- initialArchiveType = ISystemFilePreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE;
- }
- archiveTypeCombo.setText(initialArchiveType);
- archiveTypeCombo.setTextLimit(6);
- archiveTypeCombo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e)
- {
- setSuperTransferTypePreference(archiveTypeCombo.getText());
- }
- });
-
- archiveTypeCombo.setEnabled(doSuperTransfer);
-
-
-
-
- fillResourceTypeTable();
-
- if (resourceTypeTable.getItemCount() > 0) {
- resourceTypeTable.setSelection(0);
- resourceTypeTable.setFocus();
- }
-
- updateEnabledState();
-
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent);
-
- }
-
- public void init(IWorkbench workbench)
- {
- }
-
- public static void initDefaults(IPreferenceStore store)
- {
- store.setDefault(ISystemFilePreferencesConstants.SHOWHIDDEN, false);
- store.setDefault(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS, ISystemFilePreferencesConstants.DEFAULT_PRESERVETIMESTAMPS);
- store.setDefault(ISystemFilePreferencesConstants.DOSUPERTRANSFER, ISystemFilePreferencesConstants.DEFAULT_DOSUPERTRANSFER);
- store.setDefault(ISystemFilePreferencesConstants.SUPERTRANSFER_ARC_TYPE, ISystemFilePreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE);
- store.setDefault(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE, ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE);
- store.setDefault(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE, ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE);
- }
-
-
- /**
- * Fill the resource type table
- */
- protected void fillResourceTypeTable() {
-
-
-
- // Setup the columns (icon, type)
- TableLayout tableLayout = new TableLayout();
- resourceTypeTable.setLayout(tableLayout);
- resourceTypeTable.setHeaderVisible(true);
- 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);
-
- ISystemFileTransferModeMapping[] mappings = getModeMappings();
-
- for (int i = 0; i < mappings.length; i++) {
- newResourceTableItem(mappings[i], i, false);
- }
-
- int defaultFileTransferMode = getFileTransferModeDefaultPreference();
- if (defaultFileTransferMode == ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY)
- {
- defaultBinaryButton.setSelection(true);
- }
- else if (defaultFileTransferMode == ISystemFilePreferencesConstants.FILETRANSFERMODE_TEXT)
- {
- defaultTextButton.setSelection(true);
- }
- }
-
- 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);
-
- int defaultFileTransferMode = 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()
- {
- archiveTypeCombo.setText(ISystemFilePreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE);
- setSuperTransferTypePreference(ISystemFilePreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE);
- doSuperTransferButton.setSelection(ISystemFilePreferencesConstants.DEFAULT_DOSUPERTRANSFER);
- setDoSuperTransfer(ISystemFilePreferencesConstants.DEFAULT_DOSUPERTRANSFER);
- }
-
- protected void resetBufferSizePrefs()
- {
- downloadBufferSize.setText(ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE + ""); //$NON-NLS-1$
- uploadBufferSize.setText(ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE + ""); //$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 77e14ee92..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/DefaultMountPathMapper.java
+++ /dev/null
@@ -1,54 +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.
- * David McKnight (IBM) - [195285] mount path mapper changes
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.resources;
-
-import org.eclipse.rse.files.ui.resources.ISystemMountPathMapper;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-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)
- {
- 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 edd043fd9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java
+++ /dev/null
@@ -1,812 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- *******************************************************************************/
-
-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.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.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.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;
- }
- }
- }
- }
- 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$
- }
- }
-} \ 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 a6d555cd3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java
+++ /dev/null
@@ -1,1585 +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) - [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.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 fileNameRegexButton;
- private boolean initialFileNameRegex;
-
- // file name editor
- private FileNameEditor fileNameEditor;
-
- // folder name controls
- private Label folderNameLabel;
- private Combo folderNameCombo;
- private Button folderNameBrowseButton;
-
- // folder name editor
- private FolderNameEditor folderNameEditor;
-
- // advanced controls
- private Button searchArchivesButton;
- private Button searchSubfoldersButton;
- private boolean initialSearchArchives;
- private boolean initialSearchSubfolders;
-
- // constants for storing configuration
- private static final String REMOTE_SEARCH_PAGE_NAME = "RemoteSearchPage"; //$NON-NLS-1$
- private static final String STORE_CONFIG_CASE_SENSITIVE = "caseSensitive"; //$NON-NLS-1$
- private static final String STORE_CONFIG_STRING_REGEX = "stringRegex"; //$NON-NLS-1$
- private static final String STORE_CONFIG_FILENAME_REGEX = "fileNameRegex"; //$NON-NLS-1$
- private static final String STORE_CONFIG_INCLUDE_ARCHIVES = "includeArchives"; //$NON-NLS-1$
- private static final String STORE_CONFIG_INCLUDE_SUBFOLDERS = "includeSubfolders"; //$NON-NLS-1$
-
- private static final String STORE_CONFIG_DATA_SIZE = "dataSize"; //$NON-NLS-1$
-
- // constants for storing data
- private static final String STORE_DATA_PREFIX = REMOTE_SEARCH_PAGE_NAME + ".data"; //$NON-NLS-1$
- private static final String STORE_DATA_SEARCH_STRING = "searchString"; //$NON-NLS-1$
- private static final String STORE_DATA_CASE_SENSITIVE = "caseSensitive"; //$NON-NLS-1$
- private static final String STORE_DATA_STRING_REGEX = "stringRegex"; //$NON-NLS-1$
- private static final String STORE_DATA_FILE_NAMES = "fileNames"; //$NON-NLS-1$
- private static final String STORE_DATA_FILE_NAME_REGEX = "fileNameRegex"; //$NON-NLS-1$
- private static final String STORE_DATA_PROFILE_NAME = "profileName"; //$NON-NLS-1$
- private static final String STORE_DATA_CONNECTION_NAME = "connectionName"; //$NON-NLS-1$
- private static final String STORE_DATA_FOLDER_NAME = "folderName"; //$NON-NLS-1$
- private static final String STORE_DATA_INCLUDE_ARCHIVES = "includeArchives"; //$NON-NLS-1$
- private static final String STORE_DATA_INCLUDE_SUBFOLDERS = "includeSubfolders"; //$NON-NLS-1$
-
- // a list to hold previous searche data
- private List previousSearchData = new ArrayList();
-
- // maximum size of data list
- private static final int MAX_DATA_SIZE = 20;
-
- // inner class to hold search data
- private class RemoteSearchData {
-
- private String searchString;
- private boolean caseSensitive;
- private boolean stringRegex;
- private String fileNames;
- private boolean fileNameRegex;
- private String profileName;
- private String connectionName;
- private String folderName;
- private boolean includeArchives;
- private boolean includeSubfolders;
-
- /**
- * Constructor for search data.
- * @param searchString the search string.
- * @param caseSensitive <code>true</code> if case sensitive, <code>false</code> otherwise.
- * @param stringRegex <code>true</code> if search string is a regular expression, <code>false</code> otherwise.
- * @param fileNames set of file names.
- * @param fileNameRegex <code>true</code> if the file name is a regular expression, <code>false</code> otherwise.
- * @param profileName the profile name.
- * @param connectionName the connection name.
- * @param folderName the folder name.
- * @param includeArchives <code>true</code> if archives should also be searched, <code>false</code> otherwise.
- * @param includeSubfolders <code>true</code> if subfolders should also be searched, <code>false</code> otherwise.
- */
- private RemoteSearchData(String searchString, boolean caseSensitive, boolean stringRegex,
- String fileNames, boolean fileNameRegex, String profileName, String connectionName,
- String folderName, boolean includeArchives, boolean includeSubfolders) {
- this.searchString = searchString;
- this.caseSensitive = caseSensitive;
- this.stringRegex = stringRegex;
- this.fileNames = fileNames;
- this.fileNameRegex = fileNameRegex;
- this.profileName = profileName;
- this.connectionName = connectionName;
- this.folderName = folderName;
- this.includeArchives = includeArchives;
- this.includeSubfolders = includeSubfolders;
- }
- }
-
- // abstract inner class for handling a combo and browse button combination
- abstract private class CommonEditor extends SelectionAdapter implements DisposeListener {
-
- protected Combo nameCombo;
- protected Button browseButton;
-
- /**
- * Constructor for editor.
- * @param nameCombo the combo.
- * @param browseButton the browse button.
- */
- private CommonEditor(Combo nameCombo, Button browseButton) {
- this.nameCombo = nameCombo;
- this.browseButton = browseButton;
-
- // add dispose listeners to both the combo and the button
- // we make them null when they are disposed for cleanup to occur
- nameCombo.addDisposeListener(this);
- browseButton.addDisposeListener(this);
-
- // add selection listener to the browse button
- browseButton.addSelectionListener(this);
- }
-
- /**
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- */
- public void widgetDisposed(DisposeEvent e) {
-
- if (e.widget == nameCombo) {
- nameCombo = null;
- }
- else if (e.widget == browseButton) {
- browseButton = null;
- }
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
-
- if (e.widget == browseButton) {
- handleBrowseSelected();
- }
- }
-
- protected abstract void handleBrowseSelected();
- }
-
- // inner class to handle file name editing
- private class FileNameEditor extends CommonEditor {
-
- /**
- * Constructor for folder name editor.
- * @param fileCombo the file combo.
- * @param browseButton the file types browse button.
- */
- private FileNameEditor(Combo fileCombo, Button browseButton) {
- super(fileCombo, browseButton);
- }
-
- /**
- * @see org.eclipse.rse.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.fileNameRegex = fileNameRegexButton.getSelection();
- data.profileName = getProfileName();
- data.connectionName = getConnectionName();
- data.folderName = getFolderName();
- data.includeArchives = searchArchivesButton.getSelection();
- data.includeSubfolders = searchSubfoldersButton.getSelection();
-
- // remove data from the list because it will be later added
- // we want to basically move the data to the end of the list
- previousSearchData.remove(data);
- }
- // otherwise create new data
- else {
- data = new RemoteSearchData(searchString, caseButton.getSelection(), stringRegexButton.getSelection(),
- getFileNames(), fileNameRegexButton.getSelection(), getProfileName(), getConnectionName(),
- getFolderName(), searchArchivesButton.getSelection(), searchSubfoldersButton.getSelection());
- }
-
- // if the data size is the maximum size allowable,
- // remove the first entry from the list
- if (previousSearchData.size() == MAX_DATA_SIZE) {
- previousSearchData.remove(0);
- }
-
- // now add the data to the data list
- previousSearchData.add(data);
-
- return data;
- }
-
- /**
- * Gets the file names string.
- * @return the file names string.
- */
- private String getFileNames() {
- return fileNameEditor.getFileNamesText();
- }
-
- /**
- * Gets the profile name from the folder selection.
- * @return the profile name.
- */
- private String getProfileName() {
- return folderNameEditor.getProfileName();
- }
-
- /**
- * Gets the connection name from the folder selection.
- * @return the connection name.
- */
- private String getConnectionName() {
- return folderNameEditor.getConnectionName();
- }
-
- /**
- * Gets the folder name from the folder selection.
- * @return the folder name.
- */
- private String getFolderName() {
- return folderNameEditor.getFolderPath();
- }
-
- /**
- * @see org.eclipse.search.ui.ISearchPage#performAction()
- */
- public boolean performAction() {
-
- // if the string is a regex, check that the regular expression is valid
- // if not show error and return false
- if (stringRegexButton.getSelection()) {
- String searchString = stringCombo.getText();
-
- if (searchString != null && searchString.length() != 0) {
-
- if (!util.isValidRegex(searchString)) {
-
- 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.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);
- 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 regex
- fileNameRegexButton = new Button(comp, SWT.CHECK);
- fileNameRegexButton.setText(FileResources.RESID_SEARCH_FILENAME_REGEX_LABEL);
- fileNameRegexButton.setToolTipText(FileResources.RESID_SEARCH_FILENAME_REGEX_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- fileNameRegexButton.setLayoutData(gd);
- fileNameRegexButton.setSelection(initialFileNameRegex);
- fileNameHintLabel.setVisible(!fileNameRegexButton.getSelection());
-
- fileNameRegexButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fileNameHintLabel.setVisible(!fileNameRegexButton.getSelection());
- }
- });
- }
-
- /**
- * Creates controls to specify folder name.
- */
- private void createFolderControls(Composite comp) {
-
- // label introducing folder name combo
- folderNameLabel = new Label(comp, SWT.LEFT);
- folderNameLabel.setText(FileResources.RESID_SEARCH_FOLDERNAME_LABEL_LABEL);
- folderNameLabel.setToolTipText(FileResources.RESID_SEARCH_FOLDERNAME_LABEL_TOOLTIP);
-
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- folderNameLabel.setLayoutData(gd);
-
- // folder name combo
- folderNameCombo = new Combo(comp, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- folderNameCombo.setToolTipText(FileResources.RESID_SEARCH_FOLDERNAME_COMBO_TOOLTIP);
-
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- folderNameCombo.setLayoutData(gd);
-
- folderNameCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- container.setPerformActionEnabled(isValid());
- }
- });
-
- // browse types button
- folderNameBrowseButton = new Button(comp, SWT.PUSH);
- folderNameBrowseButton.setText(FileResources.RESID_SEARCH_FOLDERNAME_BROWSE_LABEL);
- folderNameBrowseButton.setToolTipText(FileResources.RESID_SEARCH_FOLDERNAME_BROWSE_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- folderNameBrowseButton.setLayoutData(gd);
-
- // create the folder name editor
- folderNameEditor = new FolderNameEditor(folderNameCombo, folderNameBrowseButton);
- }
-
- /**
- * Creates controls for advanced options.
- */
- private void createAdvancedControls(Composite comp) {
-
- // dummy label
- Label dummyLabel = new Label(comp, SWT.LEFT);
-
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- dummyLabel.setLayoutData(gd);
-
- // checkbox for search in archive files
- searchArchivesButton = new Button(comp, SWT.CHECK);
- searchArchivesButton.setText(FileResources.RESID_SEARCH_INCLUDE_ARCHIVES_LABEL);
- searchArchivesButton.setToolTipText(FileResources.RESID_SEARCH_INCLUDE_ARCHIVES_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 1;
- searchArchivesButton.setLayoutData(gd);
-
- searchArchivesButton.setSelection(initialSearchArchives);
-
- // checkbox for search in subfolders
- searchSubfoldersButton = new Button(comp, SWT.CHECK);
- searchSubfoldersButton.setText(FileResources.RESID_SEARCH_INCLUDE_SUBFOLDERS_LABEL);
- searchSubfoldersButton.setToolTipText(FileResources.RESID_SEARCH_INCLUDE_SUBFOLDERS_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 2;
- gd.horizontalIndent = 20;
- searchSubfoldersButton.setLayoutData(gd);
-
- searchSubfoldersButton.setSelection(initialSearchSubfolders);
- }
-
- /**
- * Returns whether the search string, file name and folder name are all valid.
- * @return <code>true</code> if all are valid, <code>false</code> otherwise.
- */
- private boolean isValid() {
-
- // note that we check folder name first for performance reasons (it is most likely to be
- // invalid since we do not allow empty folder name)
- return isFolderNameValid() && isSearchStringValid() && isFileNameValid();
-
- // TODO: error messages!! But are they even visible in the search dialog?
- }
-
- /**
- * Returns whether search string is valid. Note that search string is valid if empty (we assume empty
- * search string is the same as "*");
- * @return <code>true</code> if search string is not <code>null</code>, <code>false</code> otherwise.
- */
- private boolean isSearchStringValid() {
-
- String searchString = stringCombo.getText();
-
- if (searchString == null) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * Returns whether file name is valid. Note that file name is valid if empty (we assume empty file
- * name is the same as "*");
- * @return <code>true</code> if file name is not <code>null</code>, <code>false</code> otherwise.
- */
- private boolean isFileNameValid() {
-
- String fileNameString = fileNameCombo.getText();
-
- if (fileNameString == null) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * Returns whether folder name is valid.
- * @return <code>true</code> if folder name is not <code>null</code> or empty, <code>false</code> otherwise.
- */
- private boolean isFolderNameValid() {
-
- String folderName = folderNameCombo.getText();
-
- if (folderName == null || folderName.trim().length() == 0) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * Get plugin dialog settings.
- * @return the dialog settings of the plugin.
- */
- private IDialogSettings getPluginDialogSettings() {
- return RSEUIPlugin.getDefault().getDialogSettings();
- }
-
- /**
- * Returns the dialog settings for the remote search page.
- * @return the dialog settings used to store search page configuration.
- */
- private IDialogSettings getConfigDialogSettings() {
- IDialogSettings settings = getPluginDialogSettings();
- IDialogSettings dialogSettings = settings.getSection(REMOTE_SEARCH_PAGE_NAME);
-
- if (dialogSettings == null) {
- dialogSettings = settings.addNewSection(REMOTE_SEARCH_PAGE_NAME);
- }
-
- return dialogSettings;
- }
-
- /**
- * Retrieves the configuration from the dialog settings.
- */
- private void readConfiguration() {
- IDialogSettings s = getConfigDialogSettings();
- initialCaseSensitive = s.getBoolean(STORE_CONFIG_CASE_SENSITIVE);
- initialStringRegex = s.getBoolean(STORE_CONFIG_STRING_REGEX);
- initialFileNameRegex = s.getBoolean(STORE_CONFIG_FILENAME_REGEX);
- initialSearchArchives = s.getBoolean(STORE_CONFIG_INCLUDE_ARCHIVES);
- initialSearchSubfolders = s.getBoolean(STORE_CONFIG_INCLUDE_SUBFOLDERS);
- }
-
- /**
- * Stores the current configuration to the dialog settings.
- */
- private void writeConfiguration() {
- IDialogSettings s = getConfigDialogSettings();
- s.put(STORE_CONFIG_CASE_SENSITIVE, caseButton.getSelection());
- s.put(STORE_CONFIG_STRING_REGEX, stringRegexButton.getSelection());
- s.put(STORE_CONFIG_FILENAME_REGEX, fileNameRegexButton.getSelection());
- s.put(STORE_CONFIG_INCLUDE_ARCHIVES, searchArchivesButton.getSelection());
- s.put(STORE_CONFIG_INCLUDE_SUBFOLDERS, searchSubfoldersButton.getSelection());
- }
-
- /**
- * Reads the data.
- */
- private void readData() {
-
- // store the size
- int size = 0;
-
- try {
- size = getConfigDialogSettings().getInt(STORE_CONFIG_DATA_SIZE);
- }
- catch (NumberFormatException e) {
- // if a number format exception occurs, it doesn't mean there is an error
- // it simply means this is the first time the dialog is opened
- size = 0;
- }
-
- if (size > 0) {
- // take the minimum of stored size and the maximum size allowable
- // this is unnecessary, since the stored size should never be
- // more than the maximum size, but we check just in case
- size = Math.min(size, MAX_DATA_SIZE);
- previousSearchData = new ArrayList(size);
- }
-
- for (int i = 0; i < size; i++) {
- IDialogSettings dataSection = getPluginDialogSettings().getSection(STORE_DATA_PREFIX + i);
- String searchString = dataSection.get(STORE_DATA_SEARCH_STRING);
- boolean caseSensitive = dataSection.getBoolean(STORE_DATA_CASE_SENSITIVE);
- boolean stringRegex = dataSection.getBoolean(STORE_DATA_STRING_REGEX);
-
- String fileNamesString = dataSection.get(STORE_DATA_FILE_NAMES);
- boolean fileNameRegex = dataSection.getBoolean(STORE_DATA_FILE_NAME_REGEX);
-
- String profileName = dataSection.get(STORE_DATA_PROFILE_NAME);
- String connectionName = dataSection.get(STORE_DATA_CONNECTION_NAME);
- String folderName = dataSection.get(STORE_DATA_FOLDER_NAME);
-
- boolean searchArchives = dataSection.getBoolean(STORE_DATA_INCLUDE_ARCHIVES);
- boolean searchSubfolders = dataSection.getBoolean(STORE_DATA_INCLUDE_SUBFOLDERS);
-
- RemoteSearchData data = new RemoteSearchData(searchString, caseSensitive, stringRegex, fileNamesString, fileNameRegex, profileName, connectionName, folderName, searchArchives, searchSubfolders);
- previousSearchData.add(data);
- }
- }
-
- /**
- * Writes the data.
- */
- private void writeData() {
-
- // get the size of data
- int size = previousSearchData.size();
-
- // take the minimum of the data size and the maximum size allowable
- // this is unnecessary, since the data size should never be
- // more than the maximum size allowable, but we check just in case
- size = Math.min(size, MAX_DATA_SIZE);
-
- // store the size
- getConfigDialogSettings().put(STORE_CONFIG_DATA_SIZE, size);
-
- IDialogSettings pluginSettings = getPluginDialogSettings();
-
- for (int i = 0; i < size; i++) {
- IDialogSettings dataSection = pluginSettings.getSection(STORE_DATA_PREFIX + i);
-
- if (dataSection == null) {
- dataSection = pluginSettings.addNewSection(STORE_DATA_PREFIX + i);
- }
-
- RemoteSearchData data = (RemoteSearchData)previousSearchData.get(i);
-
- dataSection.put(STORE_DATA_SEARCH_STRING, data.searchString);
- dataSection.put(STORE_DATA_CASE_SENSITIVE, data.caseSensitive);
- dataSection.put(STORE_DATA_STRING_REGEX, data.stringRegex);
-
- dataSection.put(STORE_DATA_FILE_NAMES, data.fileNames);
- dataSection.put(STORE_DATA_FILE_NAME_REGEX, data.fileNameRegex);
-
- dataSection.put(STORE_DATA_PROFILE_NAME, data.profileName);
- dataSection.put(STORE_DATA_CONNECTION_NAME, data.connectionName);
- dataSection.put(STORE_DATA_FOLDER_NAME, data.folderName);
-
- dataSection.put(STORE_DATA_INCLUDE_ARCHIVES, data.includeArchives);
- dataSection.put(STORE_DATA_INCLUDE_SUBFOLDERS, data.includeSubfolders);
- }
- }
-}
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 59c56a0da..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
+++ /dev/null
@@ -1,3659 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- *******************************************************************************/
-
-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.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.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 ISystemViewElementAdapter, 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;
-
- // 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();
-
- supportsSearch = firstFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsSearch();
- supportsArchiveManagement = firstFile.getParentRemoteFileSubSystem().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 && canRead)
- {
- if (addNewFile == null)
- {
- addNewFile = new SystemNewFileAction(shell);
- }
- menu.add(ISystemContextMenuConstants.GROUP_NEW, addNewFile);
- }
- if (!filesOnly)
- {
- if (canRead)
- {
- if (addNewFolder == null)
- {
- addNewFolder = new SystemNewFolderAction(shell);
- }
- menu.add(ISystemContextMenuConstants.GROUP_NEW, addNewFolder);
- }
-
- if (addNewFilter == null)
- {
- addNewFilter = new SystemNewFileFilterFromFolderAction(shell);
- }
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_NEW, new Separator());
- menu.add(ISystemContextMenuConstants.GROUP_NEW, addNewFilter);
- }
-
- }
- else
- {
- if (canRead)
- {
- // open
- String label = SystemResources.ACTION_CASCADING_OPEN_LABEL;
- String tooltip = SystemResources.ACTION_CASCADING_OPEN_TOOLTIP;
- SystemEditFilesAction action = new SystemEditFilesAction(label, tooltip, shell);
- menu.add(ISystemContextMenuConstants.GROUP_OPEN, action);
-
- // open with ->
-
- MenuManager submenu =
- new MenuManager(FileResources.ResourceNavigator_openWith,
- ISystemContextMenuConstants.GROUP_OPENWITH);
-
- if (openWithMenu == null)
- {
- openWithMenu = new SystemRemoteFileOpenWithMenu();
- }
- openWithMenu.updateSelection(selection);
- submenu.add(openWithMenu);
- menu.getMenuManager().appendToGroup(ISystemContextMenuConstants.GROUP_OPENWITH, submenu);
-
-
-
- }
- }
-
-
- if (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 (canRead && supportsSearch)
- {
- //menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, addToArchiveAction);
-
- // add search action
- menu.add(ISystemContextMenuConstants.GROUP_SEARCH, searchAction);
- }
-
- if (!firstFile.isRoot() && canRead)
- {
- menu.add(menuGroup, copyClipboardAction);
- if (elementType == 0)
- {
- menu.add(ISystemContextMenuConstants.GROUP_COMPAREWITH, compareFilesAction);
- menu.add(ISystemContextMenuConstants.GROUP_COMPAREWITH, compareEditionAction);
- menu.add(ISystemContextMenuConstants.GROUP_REPLACEWITH, replaceEditionAction);
- }
- }
-
- if (elementType == 1 || (isArchive && supportsArchiveManagement))
- {
- if (canRead)
- {
- menu.add(menuGroup, pasteClipboardAction);
- }
- }
- if (!firstFile.isRoot() && canRead)
- {
- menu.add(menuGroup, moveAction);
- }
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (file.isFile() || file.isArchive()) // hack to show zips without folder icons
- {
- return getEditorRegistry().getImageDescriptor(file.getName());
- }
- else
- {
- boolean isOpen = false;
- if (getViewer() instanceof AbstractTreeViewer)
- {
- AbstractTreeViewer atv = (AbstractTreeViewer) getViewer();
- isOpen = atv.getExpandedState(element);
- if (!isOpen)
- {
- // if 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)
- {
- return ((IRemoteFile)element).canRead();
- }
- return true;
- }
-
- /**
- * Indicates whether the specified object can have another object copied to it
- * @param element the object we want to try to copy to
- * @return whether this object can be copied to or not
- */
- public boolean canDrop(Object element)
- {
- if (element instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) element;
- boolean supportsArchiveManagement = file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- return file.canRead() && file.canWrite() && (file.isDirectory() || file.isRoot() || (file.isArchive() && supportsArchiveManagement));
- }
-
- return false;
- }
-
- /**
- * Return true if it is valid for the src object to be dropped in the target
- * @param srcSet the objects to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(ISystemResourceSet srcSet, Object target, boolean sameSystem)
- {
- if (target instanceof IRemoteFile)
- {
- IRemoteFile targetFile = (IRemoteFile) target;
- boolean supportsArchiveManagement = targetFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- if (!targetFile.isFile() || (targetFile.isArchive() && supportsArchiveManagement))
- {
- targetFile.canWrite();
- }
- // all objects are of same type, so we only need to use first to validate
- Object first = srcSet.get(0);
- if (first instanceof IRemoteFile)
- {
- return true;
- }
- else if (first instanceof IResource)
- {
- return true;
- }
- else if (first instanceof ISystemFilterReference)
- {
- return true;
- }
- else // akh11: proposed modification -- 01/28/2005
- { // ask source adapter if it supports drop of its type on this target:
- ISystemViewDropDestination adapter = (ISystemViewDropDestination)Platform.getAdapterManager().getAdapter(first,ISystemViewDropDestination.class);
- if (adapter != null)
- return adapter.supportDropDestination(target);
- }
- }
- return false;
- }
-
- /**
- * Return true if it is valid for the src object to be dropped in the target
- * @param src the object to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- if (target instanceof IRemoteFile)
- {
- IRemoteFile targetFile = (IRemoteFile) target;
- boolean supportsArchiveManagement = targetFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- if (!targetFile.isFile() || (targetFile.isArchive() && supportsArchiveManagement))
- {
- // get properties
- // this is asynchronous so we call
- // it here to prepare for subsequent operation
- targetFile.canWrite();
-
- if (src instanceof IRemoteFile)
- {
- return true;
- }
- else if (src instanceof IResource)
- {
- return true;
- }
- else if (src instanceof String)
- {
- // check if this is a file
- java.io.File localFile = new java.io.File((String) src);
- if (localFile.exists())
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- else if (src instanceof ISystemFilterReference)
- {
- return true;
- }
-
- else // akh11: proposed modification -- 01/28/2005
- { // ask source adapter if it supports drop of its type on this target:
- ISystemViewDropDestination adapter = (ISystemViewDropDestination)Platform.getAdapterManager().getAdapter(src,ISystemViewDropDestination.class);
- if (adapter != null)
- return adapter.supportDropDestination(target);
- }
- }
- }
-
- return false;
- }
-
-
-
- /**
- * Performs a drag copy operation. The source object is uploaded to a temporary location so that it can
- * later be dropped on another remote system.
- * @param element the object which is being copied
- * @param sameSystem an indication whether a transfer is being made between the same types of systems.
- * @param monitor a progress monitor
- * @return the temporary object that was created after the upload
- */
- public Object doDrag(Object element, boolean sameSystem, IProgressMonitor monitor)
- {
-
- // copy all resources into temporary location
- if (element instanceof IRemoteFile)
- {
- IRemoteFile srcFileOrFolder = (IRemoteFile) element;
- return UniversalFileTransferUtility.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;
- //System.out.println("INSIDE CANDELETE FOR ADAPTER: RETURNING " + !file.isRoot());
- return !file.isRoot() && file.canRead();
- }
-
-
- /**
- * {@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);
- }
- catch (Exception e)
- {
- }
- }
-
- /*
-
- ISystemEditableRemoteObject editable = getEditableRemoteObject(file);
- if (editable != null)
- {
- try
- {
- if (editable.checkOpenInEditor() == ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE)
- {
- // for now, leave this
- }
- else
- {
- IFile localfile = editable.getLocalResource();
- if (localfile != null)
- {
- // delete this too
- localfile.delete(true, null);
- }
- }
- }
- catch (Exception e)
- {
-
- }
- }
- */
- 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;
- return !file.isRoot() && file.canRead();
- }
-
- private void moveTempResource(IResource localResource, IPath newLocalPath, IRemoteFileSubSystem ss, String newRemotePath)
- {
- if (localResource != null)
- {
- try
- {
- moveTempFileProperties(localResource, ss, newRemotePath);
- localResource.move(newLocalPath, true, null);
-
- }
- catch (Exception e)
- {
- }
-
- }
- }
-
- private void moveTempFileProperties(IResource localResource, IRemoteFileSubSystem ss, String remotePath)
- {
-
- if (localResource instanceof IContainer)
- {
- IContainer localContainer = (IContainer) localResource;
- try
- {
- IResource[] members = localContainer.members();
- for (int i = 0; i < members.length; i++)
- {
- IResource member = members[i];
- moveTempFileProperties(member, ss, remotePath + "/" + member.getName()); //$NON-NLS-1$
- }
- }
- catch (Exception e)
- {
- }
- }
- else if (localResource instanceof IFile)
- {
- IFile localFile = (IFile)localResource;
- try
- {
- SystemIFileProperties properties = new SystemIFileProperties(localFile);
- properties.setRemoteFilePath(remotePath);
-
- Object editableObj = properties.getRemoteFileObject();
- if (editableObj != null)
- {
- SystemEditableRemoteFile editable = (SystemEditableRemoteFile)editableObj;
- // there's an in-memory editable, so change the associated remote file
- IRemoteFile newRemoteFile = ss.getRemoteFileObject(remotePath, 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!
-
- // DKM - changed this so that we can take advantage of caching
- Object[] children = getChildren(file.getParentRemoteFile());
- if ((children == null) || (children.length == 0))
- return names;
-
- names = new String[children.length];
- for (int idx = 0; idx < names.length; idx++)
- {
- names[idx] = ((IRemoteFile) children[idx]).getName();
- }
-
- return names;
- }
-
- /**
- * User has double clicked on an object. We want to open the object in the applicable editor.
- * Return true to indicate that we are handling the double-click event.
- */
- public boolean handleDoubleClick(Object element)
- {
- IRemoteFile remoteFile = (IRemoteFile) element;
- if (!remoteFile.canRead())
- {
- return false;
- }
- /** FIXME commands now separate from this
- else if (testAttribute(remoteFile, "classification", "*executable*") ||
- testAttribute(remoteFile, "classification", "*script") ||
- testAttribute(remoteFile, "classification", "symbolic link(script)*")
- )
- {
- // instead of opening in editor
- // attempt to execute it
- return RemoteCommandHelpers.runUniversalCommand(getShell(), remoteFile.getName(), remoteFile.getParentPath(),
- remoteFile.getParentRemoteFileSubSystem().getCommandSubSystem());
- }
- */
- else if (!remoteFile.isArchive() || !remoteFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement())
- {
- // only handle double click if object is a file
- ISystemEditableRemoteObject editable = getEditableRemoteObject(remoteFile);
- if (editable != null)
- {
- try
- {
- 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 && 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();
- if (!subsystem.isOffline()){ // only do this check when online..if offline we assume the temp file is okay
- 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;
- }
-
- public boolean canEdit(Object element)
- {
- IRemoteFile remoteFile = (IRemoteFile) element;
- if (remoteFile.isFile())
- {
- return remoteFile.canRead();
- }
- return false;
- }
-
- public ISystemEditableRemoteObject getEditableRemoteObject(Object element)
- {
- RemoteFile remoteFile = (RemoteFile) element;
- if (remoteFile.isFile())
- {
- try
- {
- IFile file = getCachedCopy(remoteFile);
- if (file != null)
- {
- SystemIFileProperties properties = new SystemIFileProperties(file);
- Object obj = properties.getRemoteFileObject();
- if (obj != null && obj instanceof ISystemEditableRemoteObject)
- {
- ISystemEditableRemoteObject rmtObj = (ISystemEditableRemoteObject) obj;
- IAdaptable rmtFile = rmtObj.getRemoteObject();
- if (rmtFile instanceof IRemoteFile)
- {
- //((IRemoteFile)rmtFile).markStale(true);
- }
- return rmtObj;
- }
- }
-
- return new SystemEditableRemoteFile(remoteFile);
- }
- catch (Exception e)
- {
- }
- }
- return null;
- }
-
- public IFile getCachedCopy(IRemoteFile remoteFile) throws SystemMessageException
- {
- if (SystemRemoteEditManager.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 ce7393340..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="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.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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/.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.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 b23c65c33..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/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.importexport; singleton:=true
-Bundle-Version: 1.2.2.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
-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)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
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/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 fba6bb1c9..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/plugin.properties
+++ /dev/null
@@ -1,48 +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) - add providerName
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# Plugin name
-pluginName = RSE Import/Export
-providerName = Eclipse.org
-
-# Remote file import and export wizards
-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
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 93ffc78cd..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/plugin.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-<!-- ========================================================================= -->
-<!-- Remote File System import and export wizards. -->
-<!-- ========================================================================= -->
- <extension point="org.eclipse.ui.importWizards">
- <wizard
- name="%RemoteFileSystemImportWizard.label"
- icon="icons/full/etool16/file_import.gif"
- 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">
- <wizard
- name="%RemoteFileSystemExportWizard.label"
- icon="icons/full/etool16/file_export.gif"
- 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">
- </filter>
-
- <action
- label="%ImportToProject.label"
- tooltip="%ImportToProject.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileImportToProjectActionDelegate"
- menubarPath="group.importexport"
- enablesFor="1"
- id="importToProject">
- </action>
-
- <action
- label="%ExportFromProject.label"
- tooltip="%ExportFromProject.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileExportFromProjectActionDelegate"
- menubarPath="group.importexport"
- enablesFor="1"
- id="exportFromProject">
- </action>
- </objectContribution>
- </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 078205d6e..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportPlugin.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
- * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
- *******************************************************************************/
-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_EXPORTWIZARD_ROOT + ICON_EXT;
- public static final String ICON_IMPORTWIZARD_ID = PREFIX + ICON_EXPORTWIZARD_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 7c92cd42f..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.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) - [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 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_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_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;
-
- 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 696a2e865..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.properties
+++ /dev/null
@@ -1,86 +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) - [223204] [cleanup] fix broken nls strings in files.ui and others
-###############################################################################
-
-# 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_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_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
-
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 e6a2d8d93..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizardPage1.java
+++ /dev/null
@@ -1,928 +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) - [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
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.File;
-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.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.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 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_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) {
- 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);
- }
-
- /**
- * 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.setElements(resourcesToExport);
- data.setCreateDirectoryStructure(createDirectoryStructureButton.getSelection());
- data.setCreateSelectionOnly(createSelectionOnlyButton.getSelection());
- data.setOverWriteExistingFiles(overwriteExistingFilesCheckbox.getSelection());
- data.setSaveSettings(saveSettingsButton.getSelection());
- data.setDescriptionFilePath(getDescriptionLocation());
- data.setDestination(getDestinationValue());
- // execute export
- ret = executeExportOperation(new RemoteFileExportOperation(data, this));
- 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_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) {
- 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();
- 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 f442dbdbe..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java
+++ /dev/null
@@ -1,157 +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 09dfd07ea..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java
+++ /dev/null
@@ -1,166 +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) - [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
- *******************************************************************************/
-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.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) {
- IStatus status = null;
- for (int i = 0; i < exportDatas.length; i++) {
- 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 05154ec88..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportData.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
- *
- * 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.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 boolean overWriteExistingFiles;
- private boolean createDirectoryStructure;
- private boolean createSelectionOnly;
- private boolean saveSettings;
- private String descriptionFilePath;
- // export elements
- private List elements;
-
- /**
- * Constructor.
- */
- public RemoteFileExportData() {
- 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;
- }
-
- /**
- * @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;
- }
-
- /**
- * @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 fadf66653..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionReader.java
+++ /dev/null
@@ -1,203 +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) - [174945] split importexport icons from rse.ui
- *******************************************************************************/
-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$
- 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 8ea72985e..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionWriter.java
+++ /dev/null
@@ -1,170 +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) - [174945] split importexport icons from rse.ui
- *******************************************************************************/
-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("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 2648d76b8..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportOperation.java
+++ /dev/null
@@ -1,558 +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
- * 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
- *******************************************************************************/
-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;
- // 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());
- 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;
- }
- }
-}
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 eb7cfdc8b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java
+++ /dev/null
@@ -1,173 +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) - [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
- *******************************************************************************/
-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.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 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;
- }
-
- 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 ea93e4486..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportData.java
+++ /dev/null
@@ -1,219 +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.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;
-
- /**
- * 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;
- }
-
- /**
- * @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 cc02568f6..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java
+++ /dev/null
@@ -1,194 +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) - [174945] split importexport icons from rse.ui
- *******************************************************************************/
-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$
- 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 7e5d92190..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java
+++ /dev/null
@@ -1,172 +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) - [174945] split importexport icons from rse.ui
- *******************************************************************************/
-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("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 0ca4a7be8..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java
+++ /dev/null
@@ -1,642 +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) - [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
- *******************************************************************************/
-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.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;
-
- /**
- * 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());
- 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);
- }
-
- /**
- * 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$
- }
- 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;
- }
-}
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 63a066e6c..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizardPage1.java
+++ /dev/null
@@ -1,1563 +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
- * 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
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.File;
-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.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.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.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.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 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_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) {
- 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()) {
- String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_FAILED, status);
-
- 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());
- boolean ret = executeImportOperation(new RemoteFileImportOperation(data, FileSystemStructureProvider.INSTANCE, this));
- 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
- 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
- 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_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);
- }
- // 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 06491a25a..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java
+++ /dev/null
@@ -1,387 +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) - [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
- *******************************************************************************/
-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.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 File getParentFile() {
- IRemoteFile parent = remoteFile.getParentRemoteFile();
- if (parent != null) {
- return new File(parent.getAbsolutePath());
- //return parent.getFileWrapper();
- } 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 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().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 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;
- }
-}
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.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 b1bf6e54e..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.2.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 8a63e1913..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/plugin.properties
+++ /dev/null
@@ -1,26 +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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Processes UI
-providerName = Eclipse.org
-
-#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 688fa7623..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java
+++ /dev/null
@@ -1,116 +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 23b92ceaf..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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) - [302485] RemoteProcessesDialog doesn't check for null selection on okay
- *******************************************************************************/
-
-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();
- if (sel.getFirstElement() instanceof IRemoteProcess){
- 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 cbd50d605..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java
+++ /dev/null
@@ -1,507 +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) - [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.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, ISystemRemoteElementAdapter
-{
- 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 eaa9b9c82..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.0.3.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 fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/about.mappings b/rse/plugins/org.eclipse.rse.sdk/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/about.properties b/rse/plugins/org.eclipse.rse.sdk/about.properties
deleted file mode 100644
index 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 ad7de712e..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/build.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
-#
-# 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,\
- eclipse32.png,\
- plugin.properties
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.sdk/eclipse32.png b/rse/plugins/org.eclipse.rse.sdk/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.sdk/plugin.properties b/rse/plugins/org.eclipse.rse.sdk/plugin.properties
deleted file mode 100644
index 4096da451..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/plugin.properties
+++ /dev/null
@@ -1,16 +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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = Remote System Explorer Extender SDK
-providerName = Eclipse.org \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/src/readme.txt b/rse/plugins/org.eclipse.rse.sdk/src/readme.txt
deleted file mode 100644
index 170b5f81d..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/src/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file is present only for build purposes. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/.classpath b/rse/plugins/org.eclipse.rse.services.dstore/.classpath
deleted file mode 100644
index 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 ccc3e0023..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.0.4.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 fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/about.mappings b/rse/plugins/org.eclipse.rse.services.dstore/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/about.properties b/rse/plugins/org.eclipse.rse.services.dstore/about.properties
deleted file mode 100644
index 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 76a18cc7c..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/build.properties
+++ /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
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- about.properties,\
- plugin.properties,\
- dstore_miners.jar,\
- .,\
- about.ini,\
- about.mappings,\
- eclipse32.png
-source.. = src/,miners/
-output.. = bin/
-jars.compile.order = dstore_miners.jar,.
-source.dstore_miners.jar = miners/
-output.dstore_miners.jar = miners.bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc b/rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc
deleted file mode 100644
index e8ea4adf5..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<rmtjardesc>
-<jar path="mjberger.dmcknigh3:/opt/rseserver800/dstore_miners.jar"/>
-<options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc" exportErrors="true" exportWarnings="true" overwrite="false" saveDescription="true" useSourceFolders="false"/>
-<manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
-<sealing sealJar="false">
-<packagesToSeal/>
-<packagesToUnSeal/>
-</sealing>
-</manifest>
-<selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
-<javaElement handleIdentifier="=org.eclipse.rse.services.dstore/miners"/>
-</selectedElements>
-</rmtjardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/eclipse32.png b/rse/plugins/org.eclipse.rse.services.dstore/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/export.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/export.jardesc
deleted file mode 100644
index 5ca861055..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/export.jardesc
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/dstore_miners.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/export.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
- <refactoring deprecationInfo="true" structuralOnly="true"/>
- <selectedProjects>
- <project name="org.eclipse.rse.services.dstore"/>
- </selectedProjects>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.rse.services.dstore/miners"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc
deleted file mode 100644
index 99808fdaf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/dstore_core.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/exportDstore.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" useSourceFolders="false"/>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.dstore.core/src"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc
deleted file mode 100644
index d6cafaa7b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/dstore_miners.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" useSourceFolders="false"/>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.rse.services.dstore/miners"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc
deleted file mode 100644
index 1c52fb77f..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/clientserver.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/exportclientserver.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" useSourceFolders="false"/>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.rse.services/clientserver"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/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 5227027d6..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java
+++ /dev/null
@@ -1,2112 +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) - [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 fileNamesCaseSensitive) {
- File fileobj = null;
-
- DataElement subject = getCommandArgument(theElement, 0);
-
- // if the query type is against a folder, archive or a virtual folder,
- // we know to handle it
- if (queryType.equals(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);
-
- String textString = arg1.getType();
- boolean isCaseSensitive = Boolean.valueOf(arg1.getName()).booleanValue();
- boolean isTextRegex = Boolean.valueOf(arg1.getSource()).booleanValue();
-
- String fileNamesString = arg2.getType();
-
- boolean isFileNamesRegex = Boolean.valueOf(arg2.getName()).booleanValue();
- String classification = arg2.getSource();
-
- boolean isIncludeArchives = Boolean.valueOf(arg3.getType()).booleanValue();
- boolean isIncludeSubfolders = Boolean.valueOf(arg3.getName()).booleanValue();
-// boolean showHidden = Boolean.valueOf(arg3.getSource()).booleanValue();
- Boolean.valueOf(arg3.getSource()).booleanValue();
-
- SystemSearchString searchString = new SystemSearchString(
- textString, isCaseSensitive, isTextRegex, fileNamesString,
- isFileNamesRegex, isIncludeArchives, isIncludeSubfolders, classification);
-
- UniversalSearchHandler searchThread = new UniversalSearchHandler(
- _dataStore, this, searchString, !_isWindows, fileobj,
- status);
-
- searchThread.start();
-
- 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())
- {
- String threadName = (String) iter.next();
- ICancellableHandler theThread = (ICancellableHandler) _cancellableThreads.get(threadName);
- if ((theThread == null) ||
- theThread.isDone() || theThread.isCancelled())
- {
- _cancellableThreads.remove(threadName);
- }
- }
- }
- 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 5191c84a8..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java
+++ /dev/null
@@ -1,1496 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David 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[
- * Peter Wang (IBM) [299422] [dstore] OutputHandler.readLines() not compatible with servers that return max 1024bytes available to be read
- * David McKnight (IBM) [302174] [dstore] shell init command can potentially get called too late
- * David McKnight (IBM) [302724] problems with environment variable substitution
- * David McKnight (IBM) [302996] [dstore] null checks and performance issue with shell output
- *******************************************************************************/
-
-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
-{
- class InitRunnable implements Runnable
- {
- private boolean _done = false;
- private String _initCmd;
-
- public InitRunnable(String command){
- _initCmd = command;
- }
-
- public boolean isDone(){
- return _done;
- }
-
- public void run()
- {
- // wait a second so the profile can complete startup
- try {
- sleep(1000);
- }
- catch (Exception e)
- {
- }
-
- _done = true; // setting before the call so that sendInput doesn't wait on this
- sendInput(_initCmd);
- }
- }
-
- 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;
- private InitRunnable _initRunnable;
- private Thread _cdThread;
-
- 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
- _initRunnable = new InitRunnable(initCmd);
- _cdThread = new Thread(_initRunnable);
- _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;
-
- }
-
-
- public void sendInput(String input)
- {
- if (!_isDone)
- {
- if (_initRunnable != null && !_initRunnable.isDone()){
- try {
- _cdThread.join();
- }
- catch (InterruptedException e){}
- }
-
- String origInput = 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();
- try{
- writer.flush();
- }
- catch (Exception e){
- //TODO find actual cause of problem. This only fails on certain machines.
- }
-
- 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);
-
- if (nextIndex + 1 == theValue.length()){
- 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 != null)
- {
- _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 && projectEnvReference.size() > 0)
- {
- 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 8e292fe95..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal 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
- * Peter Wang (IBM) [299422] [dstore] OutputHandler.readLines() not compatible with servers that return max 1024bytes available to be read
- * David McKnight (IBM) [302996] [dstore] null checks and performance issue with shell output
- *******************************************************************************/
-
-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 = lines[i];
- _commandThread.interpretLine(line, _isStdError);
- }
-
- if (!_isTerminal){
- doPrompt();
- }
-
- _commandThread.refreshStatus();
- } else {
- finish();
- }
- }
-
- 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(){
- return checkAvailable(100);
- }
-
- private int checkAvailable(int time) {
- try
- {
- int available = _reader.available();
-
- // if there's none, wait a bit and return true to continue
- if (available <= 0) {
- sleep(time);
- available = _reader.available();
- }
- return available;
- }
- catch (Exception e)
- {
- _commandThread._dataStore.trace(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];
-
- boolean endLine = fullOutput.endsWith("\n") || fullOutput.endsWith("\r") || fullOutput.endsWith(">");
-
- if (!_endOfStream && !endLine)
- {
- // our last line may be cut off
- byte[] lastBytes = new byte[MAX_OFFSET];
-
- int lastIndex = 0;
- available = checkAvailable();
-
- if (available == 0){
- try {
- lookahead = _reader.read();
- }
- catch (IOException e){
- // pipe closed
- // allow to fall through
- }
- if (lookahead == -1) {
- // allow to fall through
- } else {
- available = _reader.available() + 1;
- }
- }
-
- if (available > 0)
- {
- while (!_endOfStream && lastIndex < MAX_OFFSET)
- {
-
- 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;
- if (lastBytes[lastIndex] == '\r' || lastBytes[lastIndex] == '\n'){
- // we've hit the end of line;
- String suffix = new String(lastBytes, 0, lastIndex + 1, encoding);
- output[index - 1] = lastLine + suffix.substring(0, suffix.length() - 1);
- return output;
- }
-
- lastIndex++;
- available = checkAvailable();
- }
-
- }
- }
-
- }
-
- 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 fdc132140..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyThread.java
+++ /dev/null
@@ -1,285 +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
- * David McKnight (IBM) - [290290] [dstore] Error message when copy a file from another user’s folder
- *******************************************************************************/
-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());
- }
-
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- boolean isZ = theOS.toLowerCase().startsWith("z"); //$NON-NLS-1$
- // special case for bug 290290 - which only occurs on z/OS
- if (isZ && err.startsWith("cp: FSUM8985")){ //$NON-NLS-1$
- // attempt against without the -p
- if (folderCopy) {
- command = "cp -R " + source + " " + tgt; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- command = "cp " + source + " " + tgt; //$NON-NLS-1$ //$NON-NLS-2$
- }
- 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);
-
- // wait for process to finish
- p.waitFor();
-
- // get the exit value of the process
- result = p.exitValue();
-
- // if the exit value is not 0, then the process did not terminate normally
- if (result == 0) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- return;
- }
- }
-
- // 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 a2440e04f..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java
+++ /dev/null
@@ -1,246 +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 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;
- if (!deleteObj.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 6f9ffb4af..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileQueryThread.java
+++ /dev/null
@@ -1,386 +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
- *******************************************************************************/
-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 9441ecfde..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalSearchHandler.java
+++ /dev/null
@@ -1,484 +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) - [250458] Backport [dstore] Remote search doesn't find the right result
- * David McKnight (IBM) - [255390] checking for memory
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- ********************************************************************************/
-
-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.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.HashSet;
-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.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();
-
- _fileNameMatcher = new SystemSearchFileNameMatcher(_searchString.getFileNamesString(), fsCaseSensitive, _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 6f664eede..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/plugin.properties
+++ /dev/null
@@ -1,16 +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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Services
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore
deleted file mode 100644
index 30b512fb7..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-rseserver.jar
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat
deleted file mode 100644
index 3ee3d7fdf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat
+++ /dev/null
@@ -1,2 +0,0 @@
-buildId=@build@
-version=@version@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/minerFile.dat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/minerFile.dat
deleted file mode 100644
index 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 068b4d946..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/auth.pl
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-use Shell;
-
-if (!defined($ARGV[0]) || !defined($ARGV[1]) || !defined($ARGV[2]) || !defined($ARGV[3]) || !defined($ARGV[4]))
-{
- print("command usage:\n");
- print("auth.pl USER, PATH, PORT, TIMEOUT, TICKET\n");
-}
-else
-{
- $userIN = $ARGV[0];
- $pathIN = $ARGV[1];
- $portIN = $ARGV[2];
- $timeoutIN = $ARGV[3];
- $ticketIN = $ARGV[4];
-
- if (defined($ARGV[5]))
- {
- $javaHome = $ARGV[5];
- $javaExe = "$javaHome/bin/java";
- }
- else
- {
- $javaExe = "java"
- }
-
- $pwdIN = <STDIN>;
- chomp($pwdIN);
-
-
- @passwdStruct = getpwnam($userIN);
-
- if (@passwdStruct == 0)
- {
- print("invalid user name\n");
- 0;
- }
- else
- {
- $passwd=$passwdStruct[1];
- $encryptedPWD = crypt($pwdIN, $passwd);
- $classpath=$ENV{CLASSPATH};
- $suOptions="-p";
-
- if ($passwd eq $encryptedPWD)
- {
- print("success\n");
-
- $os = uname();
- chomp($os);
-
- if (lc($os) eq "aix")
- {
- $suOptions="-";
- }
-
- system("su $suOptions $userIN -c '$javaExe -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
- 1;
- }
- else
- {
- print("incorrect password\n");
- 0;
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl
deleted file mode 100644
index cfe194ab8..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, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-$port = "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 67f8bc321..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, 2006 IBM Corporation, Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - Fix bug 149129 - Perl String compare with eq
-#*******************************************************************************
-
-$port = $ARGV[0];
-$timeout = $ARGV[1];
-$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 65154bfa8..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/daemon.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Arguments:
-# ARGV[0] is the port number for the daemon to listen on. Default is 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 a7f555f3a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl
+++ /dev/null
@@ -1,78 +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) - [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];
- $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="-";
- }
-
- system("su $suOptions $userIN -c '$javaExe -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
- 1;
- }
- else
- {
- print("incorrect password\n");
- 0;
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl
deleted file mode 100644
index ffb915d10..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, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-$port = "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 62f6d31a3..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, 2007 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 af2b8b99b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/server.bat
+++ /dev/null
@@ -1,61 +0,0 @@
-@echo off
-rem *******************************************************************************
-rem Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others.
-rem All rights reserved. This program and the accompanying materials
-rem are made available under the terms of the Eclipse Public License v1.0
-rem which accompanies this distribution, and is available at
-rem http://www.eclipse.org/legal/epl-v10.html
-rem
-rem Contributors:
-rem IBM Corporation - initial API and implementation
-rem Martin Oberhuber (Wind River) - Add usage print, support run by dbl click
-rem *******************************************************************************
-REM
-REM Start an RSE Windows Server
-REM Usage: server.bat [<port>] [<timeout>]
-REM
-
-setlocal
-
-set PORT=%1
-set TIMEOUT=%2
-set TICKET=%3
-if "%1" == "" set PORT=4033
-if "%2" == "" set TIMEOUT=120000
-REM set DSTORE_USER_PREFS=-Dclient.username=remoteuser
-
-if "%1" == "?" goto usage
-if "%1" == "/?" goto usage
-if "%1" == "/h" goto usage
-if "%1" == "help" goto usage
-if "%1" == "/help" goto usage
-
-IF NOT "%A_PLUGIN_PATH%"=="" GOTO doneSetup
-IF EXIST setup.bat GOTO HaveSetup
-ECHO.
-ECHO Please run setup.bat before running server.bat
-PAUSE
-GOTO done
-:HaveSetup
-CALL setup.bat
-
-:doneSetup
-if "%3" == "" goto runNoTicket
-REM The ticket parameter may be used internally by the daemon for starting a server
-@echo on
-java %DSTORE_USER_PREFS% -DA_PLUGIN_PATH=%A_PLUGIN_PATH% -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server %PORT% %TIMEOUT% %TICKET%
-@echo off
-goto done
-
-:runNoTicket
-@echo on
-java %DSTORE_USER_PREFS% -DA_PLUGIN_PATH=%A_PLUGIN_PATH% -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server %PORT% %TIMEOUT%
-@echo off
-goto done
-
-:usage
-@echo Usage: server.bat [^<port^>] [^<timeout^>]
-pause
-
-:done
-endlocal \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat
deleted file mode 100644
index cf7d05ede..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-rem *******************************************************************************
-rem Copyright (c) 2005, 2006 IBM Corporation and others.
-rem All rights reserved. This program and the accompanying materials
-rem are made available under the terms of the Eclipse Public License v1.0
-rem which accompanies this distribution, and is available at
-rem http://www.eclipse.org/legal/epl-v10.html
-rem
-rem Contributors:
-rem IBM Corporation - initial API and implementation
-rem *******************************************************************************
-@echo on
-set ECLIPSEDIR=.
-set CORE=%ECLIPSEDIR%\dstore_core.jar
-set MINERS=%ECLIPSEDIR%\dstore_miners.jar
-set EXTRA=%ECLIPSEDIR%\dstore_extra_server.jar
-set CLIENTSERVER=%ECLIPSEDIR%\clientserver.jar
-set A_PLUGIN_PATH=%ECLIPSEDIR%
-set CLASSPATH=%CORE%;%MINERS%;%UNIVERSAL%;%UNIVERSALJAR%;%CLIENTSERVER%;%EXTRA%;%CLASSPATH%
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/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 941ececb2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
+++ /dev/null
@@ -1,2437 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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) - [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) - [284420] nullprogressmonitor is needed
- * David McKnight (IBM) - [284056] Sychronize Cache causes the UI to hang with no way out
- * David McKnight (IBM) - [298440] jar files in a directory can't be pasted to another system properly
- *******************************************************************************/
-
-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.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;
- int numTransfers = 0;
- DataStore ds = getDataStore();
- DataElement result = ds.find(uploadLog, DE.A_NAME, remotePath,1);
- if (result == null)
- {
- result = ds.createObject(uploadLog, "uploadstatus", remotePath); //$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);
-
- codePageConverter.convertFileFromRemoteEncoding(remotePath, localFile, encoding, localEncoding, this);
- }
- }
- 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[j]){ // do standard conversion if this is text!
- String localEncoding = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
- IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(hostEncodings[j], this);
-
- codePageConverter.convertFileFromRemoteEncoding(remoteElement.getName(), localFile, hostEncodings[j], localEncoding, this);
- }
- }
- 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 590daad65..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, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, 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
- ********************************************************************************/
-
-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
-// TODO implements IDStoreService ?
-{
- 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)
- {
- 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 9bfd90270..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java
+++ /dev/null
@@ -1,190 +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
- *******************************************************************************/
-
-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 isFileNamesRegex = searchString.isFileNamesRegex();
- boolean includeArchives = searchString.isIncludeArchives();
- boolean includeSubfolders = searchString.isIncludeSubfolders();
- String classificationString = searchString.getClassificationString();
-
-
- DataElement deObj = searchTarget.getDataElement();
- DataStore ds = getDataStore();
-
- DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), "C_SEARCH"); //$NON-NLS-1$
-
- if (queryCmd != null)
- {
- ArrayList argList = setSearchAttributes(textString, isCaseSensitive, isTextRegex, fileNamesString, isFileNamesRegex, includeArchives, includeSubfolders, classificationString, true);
-
- DataElement status = ds.command(queryCmd, argList, deObj);
- DStoreSearchResultConfiguration config = (DStoreSearchResultConfiguration) searchConfig;
- config.setStatusObject(status);
-
- try
- {
- 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 isFileNamesRegex,
- boolean includeArchives,
- boolean includeSubfolders,
- String classificationString,
- boolean showHidden)
- {
-
- DataStore ds = getDataStore();
- DataElement universaltemp = getMinerElement();
-
- // create the argument data elements
- DataElement arg1 = ds.createObject(universaltemp, textString, String.valueOf(isCaseSensitive), String.valueOf(isTextRegex));
- DataElement arg2 = ds.createObject(universaltemp, fileNamesString, String.valueOf(isFileNamesRegex), classificationString);
- DataElement arg3 = ds.createObject(universaltemp, String.valueOf(includeArchives), String.valueOf(includeSubfolders), String.valueOf(showHidden));
-
- // add the arguments to the argument list
- ArrayList argList = new ArrayList();
- argList.add(arg1);
- argList.add(arg2);
- argList.add(arg3);
-
- return argList;
- }
-
- public void cancelSearch(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 71fc9c1b9..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostShell.java
+++ /dev/null
@@ -1,91 +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);
- }
- else {
- writeToShell("exit"); //$NON-NLS-1$
- }
- _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 fd2652ba9..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellOutputReader.java
+++ /dev/null
@@ -1,185 +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.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.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 505b19107..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java
+++ /dev/null
@@ -1,275 +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) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- *******************************************************************************/
-
-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)
- {
- DataElement commandDescriptor = getSendInputDescriptor(commandElement);
- if (commandDescriptor != null)
- {
- DataElement in = dataStore.createObject(null, "input", cmd); //$NON-NLS-1$
- dataStore.command(commandDescriptor, in, commandElement);
- }
- }
- }
- }
- }
-}
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 2c78c4784..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java
+++ /dev/null
@@ -1,468 +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) - [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
- *******************************************************************************/
-
-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.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)
- {
- 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 b60121c6f..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java
+++ /dev/null
@@ -1,394 +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) - [283157] [dstore] Remote search didn't end when the dstore server crashed
- * David McKnight (IBM) - [291612] [dstore] Remote Search looks like it is still going after disconnect
- *******************************************************************************/
-
-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.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 70de2e4ec..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.2.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 fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/about.mappings b/rse/plugins/org.eclipse.rse.services.local/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/about.properties b/rse/plugins/org.eclipse.rse.services.local/about.properties
deleted file mode 100644
index 2ff93b20f..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.properties
+++ /dev/null
@@ -1,29 +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
-# 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, 2008. 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 eb3c97571..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/build.properties
+++ /dev/null
@@ -1,23 +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) - 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,\
- eclipse32.png
-source.. = src/
-output.. = bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.services.local/eclipse32.png b/rse/plugins/org.eclipse.rse.services.local/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.services.local/plugin.properties b/rse/plugins/org.eclipse.rse.services.local/plugin.properties
deleted file mode 100644
index 50bd94dee..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/plugin.properties
+++ /dev/null
@@ -1,16 +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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Local Services
-providerName = Eclipse.org
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 c8a50096a..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
+++ /dev/null
@@ -1,1837 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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) - [279829] [local] Save conflict dialog keeps popping up on mounted drive
- * David McKnight (IBM) - [299140] Local Readonly file can't be copied/pasted twice
- *******************************************************************************/
-
-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
- boolean isEncodingConversionRequired = !isBinary;
-
- inputStream = new FileInputStream(file);
- bufInputStream = new BufferedInputStream(inputStream);
-
- boolean wasReadonly = destinationFile.exists() && !destinationFile.canWrite();
- if (wasReadonly){ // tempfile is readonly
- // since we're replacing the tempfile that represents the real file, the readonly bit should be removed for the transfer
- //destinationFile.setWritable(true);
- setReadOnly(destinationFile.getParent(), destinationFile.getName(), false, monitor);
- }
-
- 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);
- return convertToHostFiles(files, type);
- } else {
- return new IHostFile[0];
- }
- }
- }
-
- protected IHostFile[] convertToHostFiles(File[] files, int type)
- {
- List results = new ArrayList();
- if (files != null)
- {
- for (int i = 0; i < files.length; i++)
- {
- File file = files[i];
- if (file.isDirectory())
- {
- if (type == 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 66cce25e5..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.local.shells;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-
-/**
- * The LocalCommandThread class is used for running and interacting with a
- * local command shell.
- */
-public class LocalShellThread extends Thread
-{
-
- private volatile Thread _commandThread;
- protected boolean _isCancelled;
-
- private String _cwd;
- private String _invocation;
- private String[] _envVars;
- private String PSEUDO_TERMINAL;
-
-
- private boolean _isShell;
- private boolean _isDone;
-
- private Process _theProcess;
-
-
- private boolean _isTTY = false;
-
- private boolean _isWindows;
- private String _encoding;
-
- private BufferedReader _stdInput;
- private BufferedReader _stdError;
-
- /**
- * 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 = Platform.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
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- }
- String args[] = new String[1];
- args[0] = _invocation;
- //args[1] = "-i";
-
- _theProcess = Runtime.getRuntime().exec(args[0], envVars, theDirectory);
- }
- }
-
- }
- else
- {
- 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/.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/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 dc3d95fb9..000000000
--- a/rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.services;singleton:=true
-Bundle-Version: 3.0.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,
- 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
-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 695562aa7..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClassifierConstants.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-/**
- * This interface defines some constants for classifiers.
- */
-public interface IClassifierConstants {
-
- /**
- * Default type.
- */
- public static final String TYPE_DEFAULT = "file"; //$NON-NLS-1$
-
- /**
- * Link type, "link".
- */
- public static final String TYPE_LINK = "link"; //$NON-NLS-1$
-
- /**
- * Java executable type, "executable(java:*)".
- */
- public static final String TYPE_EXECUTABLE_JAVA = "executable(java:*)"; //$NON-NLS-1$
-
- /**
- * Binary executable type, "executable(binary)".
- */
- public static final String TYPE_EXECUTABLE_BINARY = "executable(binary)"; //$NON-NLS-1$
-
- /**
- * Script executable type, "executable(script)".
- */
- public static final String TYPE_EXECUTABLE_SCRIPT = "executable(script)"; //$NON-NLS-1$
-
- /**
- * Match java executable type, "*executable(java:*)*".
- */
- public static final String MATCH_EXECUTABLE_JAVA = "*executable(java:*)*"; //$NON-NLS-1$
-
- /**
- * Match binary executable type, "*executable(java:*)*".
- */
- public static final String MATCH_EXECUTABLE_BINARY = "*executable(binary)*"; //$NON-NLS-1$
-
- /**
- * Match script executable type, "*executable(java:*)*".
- */
- public static final String MATCH_EXECUTABLE_SCRIPT = "*executable(script)*"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java
deleted file mode 100644
index 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 8afdda6d8..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java
+++ /dev/null
@@ -1,256 +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 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
- ********************************************************************************/
-
-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 '\\':
- //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 '"':
- case '\'':
- case '`':
- case '\n':
- //just quote it. The newline will work in tcsh only -
- //bash replaces it by the empty string. But newlines
- //in filenames are an academic issue, hopefully.
- buf.append('\\');
- buf.append(c);
- break;
- default:
- buf.append(c);
- }
- }
- buf.append('"');
- return buf.toString();
- }
- }
- private static Pattern fValidShellPattern = Pattern.compile("[a-zA-Z0-9._/]*"); //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java
deleted file mode 100644
index fb6b27480..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A pattern matcher used for search that uses regex
- */
-public class RegexPatternMatcher implements ISearchPatternMatcher
-{
- private Pattern _regexPattern;
-
- public RegexPatternMatcher(String pattern)
- {
- _regexPattern = Pattern.compile(pattern);
- }
-
- public boolean stringMatches(String compareString)
- {
- Matcher matcher = _regexPattern.matcher(compareString);
- return matcher.matches();
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java
deleted file mode 100644
index 8ea884047..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-/**
- * Utility class for comparing a wildcard string to another string
- */
-public class StringCompare
-{
-
- /**
- * Constructor
- */
- public StringCompare()
- {
- }
-
- /**
- * Compare two strings
- *
- * @param pattern the pattern to match
- * @param compareStr the string to compare against the pattern
- * @param noCase indicates whether the strings should be compared based on case
- * @return true if the compare string matches the pattern
- */
- public static boolean compare(String pattern, String compareStr, boolean noCase)
- {
- if ((pattern == null) || (compareStr == null))
- return false;
-
- if (noCase)
- {
- pattern = pattern.toUpperCase();
- compareStr = compareStr.toUpperCase();
- }
-
- int iText = 0;
- int iPattern = 0;
- int lastStar = 0;
- int len = compareStr.length();
-
- int patternLen = pattern.length();
-
- while (iPattern < patternLen)
- {
- char p = pattern.charAt(iPattern++);
- if (p == '*')
- {
-
- if (iPattern >= patternLen)
- {
- while (iText < len)
- {
- iText++;
- }
- return true;
- }
- else
- {
- lastStar = iPattern;
- }
- }
- else
- {
- if (iText >= len)
- {
- return false;
- }
- else
- {
- char t = compareStr.charAt(iText++);
- if (p == t)
- {
- if ((lastStar > 0) && (iPattern >= patternLen) && (iText < len))
- {
- }
- else
- {
- continue;
- }
-
- }
- else
- {
- if (lastStar == 0)
- {
- return false;
- }
- }
-
- int matched = iPattern - lastStar - 1;
- iPattern = lastStar;
-
- iText -= matched;
- }
- }
- }
-
- if (iText >= len)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java
deleted file mode 100644
index 5929d4780..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-/*
- * A pattern matcher for search that uses wildcard based compares
- */
-public class StringComparePatternMatcher implements ISearchPatternMatcher
-{
- private String _pattern;
-
- public StringComparePatternMatcher(String pattern)
- {
- _pattern = pattern;
- }
-
- public boolean stringMatches(String compareString)
- {
- return StringCompare.compare(_pattern, compareString, true);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java
deleted file mode 100644
index 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 51a46e0b5..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.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:
- * 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
- ********************************************************************************/
-
-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("link")) { //$NON-NLS-1$
- String canonicalPath = file.getCanonicalPath();
- return type + "(" + classifyNonVirtual(canonicalPath) + ")" + ":" + canonicalPath; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- else {
- return type;
- }
- }
- }
- catch (UnsupportedEncodingException e) {
- // TODO: log it
- return type;
- }
- catch (IOException e) {
- // TODO: log it
- return type;
- }
-
- return type;
- }
-
- /**
- * Classifies from the given line of classification output.
- * @param absolutePath the absolute path of the file that was classified.
- * @param line the line of output to parse.
- * @return the classification.
- */
- protected String getClassification(String absolutePath, String line) {
-
- // default type
- String type = "file"; //$NON-NLS-1$
-
- String name = line;
- String fulltype = ""; //$NON-NLS-1$
-
- // Look for colon. Name appears before colon. Full type appears after the colon
- int colon = line.indexOf(':');
- if (colon >= 0) {
- name = line.substring(0, colon);
- fulltype = line.substring(colon + 1, line.length()).trim();
- }
-
- // if it is a *.class file, then we look for main method and qulaified class name
- // as part of the classification
- if (name.endsWith(".class")) { //$NON-NLS-1$
- type = classifyClassFile(absolutePath);
- }
-
- // check if it is a shared library
- boolean matchesLib = (fulltype.indexOf("shared object") > -1) || //$NON-NLS-1$
- (fulltype.indexOf("object module") > -1) || //$NON-NLS-1$
- (fulltype.indexOf("archive") > -1); //$NON-NLS-1$
-
- // check if it is an executable
- boolean matchesExe = (fulltype.indexOf("executable") > -1); //$NON-NLS-1$
-
- // check if it is a script
- boolean matchesScript = (fulltype.indexOf("script") > -1); //$NON-NLS-1$
-
- // shared library
- if (matchesLib) {
-
- // all *.a, *.so and *.so.* files are of type "module"
- if (name.endsWith(".a") || name.endsWith(".so") || (name.indexOf(".so.") > 0)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- type = "module"; //$NON-NLS-1$
- }
- }
-
- // a script file
- else if (matchesScript) {
-
- // an executable script file
- if (matchesExe) {
- type = "executable(script)"; //$NON-NLS-1$
- }
- // non-executable script file
- else {
- type = "script"; //$NON-NLS-1$
- }
- }
-
- // binary executable
- else if (matchesExe) {
- type = "executable(binary)"; //$NON-NLS-1$
- }
-
- // on iSeries we look for "OS/400 object" as a type
- else if (fulltype.indexOf("OS/400 object") > -1) { //$NON-NLS-1$
- type = "OS/400 object"; //$NON-NLS-1$
- }
-
- // finally, if the full type contains the symbolic link string, then type is simply "link"
- else if (fulltype.startsWith("symbolic link to")) { //$NON-NLS-1$
- type = "link"; //$NON-NLS-1$
- }
-
- return type;
- }
-
- /**
- * Classifies a class file.
- * @param absolutePath the absolute path of the class file.
- * @return the classification.
- */
- protected String classifyClassFile(String absolutePath) {
-
- // default type
- String type = "file"; //$NON-NLS-1$
-
- // input stream to file
- FileInputStream stream = null;
-
- // class file parser
- BasicClassFileParser parser = null;
-
- boolean isExecutable = false;
-
- try {
- stream = new FileInputStream(absolutePath);
-
- // use class file parser to parse the class file
- parser = new BasicClassFileParser(stream);
- parser.parse();
-
- // query if it is executable, i.e. whether it has main method
- isExecutable = parser.isExecutable();
- }
- catch (IOException e) {
- // TODO: log it
-
- // we assume not executable
- isExecutable = false;
- return type;
- }
-
- // if it is executable, then also get qualified class name
- if (isExecutable) {
- type = "executable(java"; //$NON-NLS-1$
-
- String qualifiedClassName = parser.getQualifiedClassName();
-
- if (qualifiedClassName != null) {
- type = type + ":" + qualifiedClassName; //$NON-NLS-1$
- }
-
- type = type + ")"; //$NON-NLS-1$
- }
-
- return type;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/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 b60cd152e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-
-/**
- * This class represents search string.
- */
-public class SystemSearchString {
-
- /**
- * Constant indicating that the depth is infinite, -1.
- */
- public static final int DEPTH_INFINITE = -1;
-
- protected String textString;
- protected boolean isCaseSensitive;
- protected boolean isTextStringRegex;
- protected String fileNamesString;
- protected boolean isFileNamesRegex;
- protected boolean includeArchives;
- protected boolean includeSubfolders;
- protected String classificationString;
-
- /**
- * Creates a new search string.
- * @param textString the text string.
- * @param isCaseSensitive <code>true</code> if the search should be case sensitive, <code>false</code> otherwise.
- * @param isTextStringRegex <code>true</code> if the text string is a regular expression, <code>false</code> otherwise.
- * @param fileNamesString the file names pattern.
- * @param isFileNamesRegex <code>true</code> if the file names string is a regular expression, <code>false</code> otherwise.
- * @param includeArchives <code>true</code> to search inside archives, <code>false</code> otherwise.
- * @param includeSubfolders <code>true</code> to search subfolders, <code>false</code> otherwise.
- */
- public SystemSearchString(String textString, boolean isCaseSensitive, boolean isTextStringRegex,
- String fileNamesString, boolean isFileNamesRegex, boolean includeArchives,
- boolean includeSubfolders) {
- this(textString, isCaseSensitive, isTextStringRegex, fileNamesString, isFileNamesRegex, includeArchives,
- includeSubfolders, ""); //$NON-NLS-1$
- }
-
- /**
- * Creates a new search string that allows search to be restricted to files with a certain classification.
- * @param textString the text string.
- * @param isCaseSensitive <code>true</code> if the search should be case sensitive, <code>false</code> otherwise.
- * @param isTextStringRegex <code>true</code> if the text string is a regular expression, <code>false</code> otherwise.
- * @param fileNamesString the file names pattern.
- * @param isFileNamesRegex <code>true</code> if the file names string is a regular expression, <code>false</code> otherwise.
- * @param includeArchives <code>true</code> to search inside archives, <code>false</code> otherwise.
- * @param includeSubfolders <code>true</code> to search subfolders, <code>false</code> otherwise.
- * @param classificationString the classification string that file classifications should match with.
- */
- public SystemSearchString(String textString, boolean isCaseSensitive, boolean isTextStringRegex,
- String fileNamesString, boolean isFileNamesRegex, boolean includeArchives,
- boolean includeSubfolders, String classificationString) {
- this.textString = textString;
- this.isCaseSensitive = isCaseSensitive;
- this.isTextStringRegex = isTextStringRegex;
- this.fileNamesString = fileNamesString;
- this.isFileNamesRegex = isFileNamesRegex;
- this.includeArchives = includeArchives;
- this.includeSubfolders = includeSubfolders;
- this.classificationString = classificationString;
- }
-
- /**
- * Returns the text string.
- * @return the text string.
- */
- public String getTextString() {
- return textString;
- }
-
- /**
- * Returns whether the search is case sensitive.
- * @return <code>true</code> if the search is case sensitive, <code>false</code> otherwise.
- */
- public boolean isCaseSensitive() {
- return isCaseSensitive;
- }
-
- /**
- * Returns whether the text string is a regular expression.
- * @return <code>true</code> if the text string is a regular expression, <code>false</code> otherwise.
- */
- public boolean isTextStringRegex() {
- return isTextStringRegex;
- }
-
- /**
- * Returns the file names string.
- * @return the file names string.
- */
- public String getFileNamesString() {
- return fileNamesString;
- }
-
- /**
- * Returns whether the file names string is a regular expression.
- * @return <code>true</code> if the file names string is a regular expression, <code>false</code> otherwise.
- */
- public boolean isFileNamesRegex() {
- return isFileNamesRegex;
- }
-
- /**
- * Returns whether archives should be searched.
- * @return <code>true</code> to search archives, <code>false</code> otherwise.
- */
- public boolean isIncludeArchives() {
- return includeArchives;
- }
-
- /**
- * Returns whether subfolders should be searched.
- * @return <code>true</code> to search subfolders, <code>false</code> otherwise.
- */
- public boolean isIncludeSubfolders() {
- return includeSubfolders;
- }
-
- /**
- * Returns the classification string that file classifications should match with.
- * @return the classification.
- */
- public String getClassificationString() {
- return classificationString;
- }
-
- /**
- * Writes the contents of the search string
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return textString + " - " + isCaseSensitive + " - " + isTextStringRegex + " - " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- fileNamesString + " - " + isFileNamesRegex + " - " + includeArchives + " - " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- includeSubfolders + " - " + classificationString; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java
deleted file mode 100644
index 10c1be35c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-
-/**
- * @author mjberger
- *
- * Represents a search result in a virtual file.
- */
-public final class VirtualSearchResult
-{
- private VirtualChild _virtualChild;
- private long _lineNumber;
- private String _matchingLine;
-
- public VirtualSearchResult(VirtualChild vc, long lineNumber, String matchingLine)
- {
- _virtualChild = vc;
- _lineNumber = lineNumber;
- _matchingLine = matchingLine;
- }
-
- public long getLineNumber()
- {
- return _lineNumber;
- }
-
- public String getMatchingLine() {
- return _matchingLine;
- }
-
- public VirtualChild getVirtualChild() {
- return _virtualChild;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java
deleted file mode 100644
index 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 f3052fe26..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java
+++ /dev/null
@@ -1,619 +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) - [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
- *******************************************************************************/
-
-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, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$
- }
- catch (Exception e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "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;