[SCM] eclipse-rse - Plug-in for eclipse - Debian package. branch, upstream, updated. f8b618641441a77c53875ea9c748b26f1ae0e8e5
Benjamin Drung
bdrung-guest at alioth.debian.org
Thu Jun 10 20:00:44 UTC 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse-rse - Plug-in for eclipse - Debian package.".
The branch, upstream has been updated
via f8b618641441a77c53875ea9c748b26f1ae0e8e5 (commit)
from 0bcda66b54ebb406b280dc9c1443a14720977faa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
featureVersions.properties | 22 --
org.eclipse.dstore.core/META-INF/MANIFEST.MF | 2 +-
.../eclipse/dstore/core/miners/MinerThread.java | 10 +
.../dstore/core/model/ByteStreamHandler.java | 8 +-
.../org/eclipse/dstore/core/model/DataStore.java | 61 +++++--
.../dstore/core/server/ConnectionEstablisher.java | 4 +
.../eclipse/dstore/core/server/ServerLogger.java | 3 +-
.../eclipse/dstore/core/server/ServerReceiver.java | 7 +
.../internal/core/server/ServerCommandHandler.java | 4 +
org.eclipse.dstore.extra/META-INF/MANIFEST.MF | 2 +-
.../dstore/internal/extra/DomainNotifier.java | 32 ++-
org.eclipse.rse-feature/feature.xml | 4 +-
.../META-INF/MANIFEST.MF | 2 +-
.../dstore/ConnectorServiceResources.properties | 3 +-
.../dstore/IDStoreDefaultPreferenceConstants.java | 5 +-
.../META-INF/MANIFEST.MF | 2 +-
.../telnet/TelnetConnectorService.java | 5 +-
org.eclipse.rse.core-feature/feature.xml | 4 +-
.../.settings/org.eclipse.core.resources.prefs | 4 +-
org.eclipse.rse.core/META-INF/MANIFEST.MF | 2 +-
.../rse/internal/core/model/SystemRegistry.java | 5 +
.../internal/persistence/dom/RSEDOMImporter.java | 10 +-
org.eclipse.rse.dstore-feature/feature.xml | 2 +-
org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF | 2 +-
.../internal/efs/ui/RSEFileSystemContributor.java | 10 +-
org.eclipse.rse.files.ui/META-INF/MANIFEST.MF | 2 +-
org.eclipse.rse.files.ui/plugin.properties | 1 -
.../ui/resources/SystemEditableRemoteFile.java | 11 +-
.../ui/resources/UniversalFileTransferUtility.java | 15 +-
.../files/ui/actions/LinkWithSystemViewAction.java | 12 +-
.../ui/actions/SystemRemoteFileOpenWithMenu.java | 76 +++++++-
.../files/ui/view/SystemViewRemoteFileAdapter.java | 42 +---
org.eclipse.rse.ftp-feature/feature.xml | 2 +-
org.eclipse.rse.importexport/META-INF/MANIFEST.MF | 2 +-
.../files/RemoteFileExportActionDelegate.java | 72 ++++---
org.eclipse.rse.local-feature/feature.xml | 4 +-
org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF | 2 +-
.../ui/actions/SystemNewProcessFilterAction.java | 50 +++++-
org.eclipse.rse.sdk-feature/feature.xml | 4 +-
.../META-INF/MANIFEST.MF | 2 +-
.../universal/miners/UniversalFileSystemMiner.java | 8 +
.../miners/command/CommandMinerThread.java | 45 ++++-
.../universal/miners/command/OutputHandler.java | 12 +-
.../services/dstore/files/DStoreFileService.java | 44 +++-
.../services/dstore/util/DStoreStatusMonitor.java | 6 +-
.../META-INF/MANIFEST.MF | 2 +-
.../internal/services/files/ftp/FTPService.java | 97 +++++----
.../META-INF/MANIFEST.MF | 2 +-
.../services/local/files/LocalFileService.java | 14 +-
org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF | 2 +-
.../services/ssh/files/SftpFileService.java | 41 ++++-
org.eclipse.rse.services/.settings/.api_filters | 76 ++++++--
org.eclipse.rse.services/META-INF/MANIFEST.MF | 2 +-
.../rse/services/clientserver/PathUtility.java | 6 +-
.../messages/SystemNetworkIOException.java | 7 +
.../processes/handlers/ProcessHandlerManager.java | 9 +-
...er.java => UniversalSolarisProcessHandler.java} | 135 +++++--------
.../rse/services/files/AbstractFileService.java | 20 +-
.../eclipse/rse/services/files/IFileService.java | 55 ++++--
.../rse/services/files/RemoteFileException.java | 45 ++++-
org.eclipse.rse.ssh-feature/feature.xml | 2 +-
.../META-INF/MANIFEST.MF | 2 +-
.../servicesubsystem/FileServiceSubSystem.java | 28 ++--
.../files/core/subsystems/RemoteFile.java | 9 +-
.../META-INF/MANIFEST.MF | 2 +-
.../local/LocalFileSubSystemConfiguration.java | 9 +-
.../META-INF/MANIFEST.MF | 2 +-
.../terminals/core/ITerminalServiceSubSystem.java | 13 +-
.../ITerminalServiceSubSystemConfiguration.java | 11 +-
.../terminals/core/TerminalServiceSubSystem.java | 8 +-
.../TerminalServiceSubSystemConfiguration.java | 9 +-
.../terminals/core/elements/TerminalElement.java | 15 +-
.../terminals/core/elements/package.html | 14 ++
.../META-INF/MANIFEST.MF | 2 +-
.../ssh/SshTerminalSubSystemConfiguration.java | 11 +-
org.eclipse.rse.telnet-feature/feature.xml | 2 +-
org.eclipse.rse.terminals-feature/feature.xml | 3 +-
.../.settings/.api_filters | 11 +
org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF | 4 +-
org.eclipse.rse.terminals.ui/plugin.xml | 1 +
.../internal/terminals/ui/TerminalUIResources.java | 10 +
.../terminals/ui/TerminalUIResources.properties | 3 +
.../terminals/ui/views/RSETerminalConnector.java | 7 +-
.../ui/views/TerminalViewElementAdapter.java | 11 +-
org.eclipse.rse.tests-feature/feature.xml | 2 +-
.../.settings/org.eclipse.core.resources.prefs | 3 +-
org.eclipse.rse.tests/META-INF/MANIFEST.MF | 2 +-
org.eclipse.rse.tests/plugin.xml | 9 +-
.../core/connection/IRSEConnectionProperties.java | 27 ++-
.../rse/tests/internal/RSEConnectionManager.java | 116 ++++++-----
.../tests/subsystems/files/FileServiceTest.java | 211 +++++++++++++++++++-
...tion.properties => ftpSshConnection.properties} | 12 +-
.../test.data/linuxConnection.properties | 21 ++-
.../test.data/sshTerminalConnection.properties | 8 +-
.../test.data/unixConnection.properties | 44 ++++
.../.settings/org.eclipse.core.resources.prefs | 6 +-
org.eclipse.rse.ui/META-INF/MANIFEST.MF | 4 +-
.../rse/internal/ui/SystemResources.properties | 9 +-
.../ui/actions/SystemCollapseAllAction.java | 23 ++-
.../eclipse/rse/internal/ui/view/SystemView.java | 68 +++++--
.../ui/view/SystemViewConnectionAdapter.java | 44 +++--
.../rse/internal/ui/view/SystemViewPart.java | 75 ++++----
.../ui/view/monitor/MonitorViewWorkbook.java | 21 ++-
.../ui/view/monitor/SystemMonitorViewPart.java | 10 +-
.../ui/view/search/SystemSearchViewPart.java | 4 +-
.../org/eclipse/rse/ui/ISystemIconConstants.java | 133 +++++++------
.../UI/org/eclipse/rse/ui/SystemBasePlugin.java | 57 ++++--
.../eclipse/rse/ui/SystemPreferencesManager.java | 49 ++---
.../UI/org/eclipse/rse/ui/SystemWidgetHelpers.java | 209 ++++++++++----------
.../ui/actions/SystemPasteFromClipboardAction.java | 7 +
.../rse/ui/actions/SystemRefreshAction.java | 9 +
.../rse/ui/operations/SystemFetchOperation.java | 91 +++++----
.../org/eclipse/rse/ui/view/SystemTableView.java | 39 ++--
.../rse/ui/view/SystemTableViewProvider.java | 13 +-
.../newconnection/RSEMainNewConnectionWizard.java | 2 +-
.../registries/RSEWizardSelectionTreeElement.java | 55 +++---
.../org/eclipse/rse/core/subsystems/SubSystem.java | 107 ++++++++---
org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dll | Bin 16384 -> 0 bytes
org.eclipse.tm.terminal-feature/feature.xml | 4 +-
org.eclipse.tm.terminal.sdk-feature/feature.xml | 4 +-
org.eclipse.tm.terminal.telnet-feature/feature.xml | 2 +-
.../META-INF/MANIFEST.MF | 2 +-
.../terminal/telnet/TelnetConnectWorker.java | 99 ++++++---
.../internal/terminal/telnet/TelnetConnection.java | 7 +-
.../internal/terminal/telnet/TelnetConnector.java | 5 +-
org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF | 4 +-
org.eclipse.tm.terminal.test/plugin.xml | 8 +-
.../connector/TerminalConnectorFactoryTest.java | 3 +-
.../connector/TerminalConnectorPluginTest.java | 9 +-
.../terminal/connector/TerminalConnectorTest.java | 27 ++--
org.eclipse.tm.terminal.view-feature/feature.xml | 9 +-
org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF | 4 +-
.../terminal/view/TerminalSettingsDlg.java | 5 +-
org.eclipse.tm.terminal/META-INF/MANIFEST.MF | 2 +-
.../schema/terminalConnectors.exsd | 35 +++-
.../terminal/connector/TerminalConnector.java | 13 +-
.../control/actions/TerminalActionPaste.java | 6 +-
.../provisional/api/ITerminalConnector.java | 8 +
.../api/TerminalConnectorExtension.java | 11 +-
.../internal/terminal/textcanvas/TextCanvas.java | 51 +++++-
pluginVersions.properties | 70 -------
141 files changed, 2063 insertions(+), 1144 deletions(-)
diff --git a/featureVersions.properties b/featureVersions.properties
deleted file mode 100644
index bcb0803..0000000
--- a/featureVersions.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-# Mo 19. Okt 22:49:31 CEST 2009
-org.eclipse.tm.discovery,0.0.0=v200905272300
-org.eclipse.rse,0.0.0=v200905272300
-org.eclipse.rse.core,0.0.0=v200905272300
-org.eclipse.rse.dstore,0.0.0=v200905272300
-org.eclipse.rse.examples,0.0.0=v200905272300
-org.eclipse.rse.ftp,0.0.0=v200905272300
-org.eclipse.rse.local,0.0.0=v200905272300
-org.eclipse.rse.sdk,0.0.0=v200905272300
-org.eclipse.rse.ssh,0.0.0=v200905272300
-org.eclipse.rse.telnet,0.0.0=v200905272300
-org.eclipse.rse.terminals,0.0.0=v200905272300
-org.eclipse.rse.tests,0.0.0=v200905272300
-org.eclipse.rse.useractions,0.0.0=v200905272300
-org.eclipse.tm.terminal,0.0.0=v200905272300
-org.eclipse.tm.terminal.sdk,0.0.0=v200905272300
-org.eclipse.tm.terminal.serial,0.0.0=v200905272300
-org.eclipse.tm.terminal.ssh,0.0.0=v200905272300
-org.eclipse.tm.terminal.telnet,0.0.0=v200905272300
-org.eclipse.tm.terminal.test,0.0.0=v200905272300
-org.eclipse.tm.terminal.view,0.0.0=v200905272300
-org.eclipse.rse.wince,0.0.0=v200905272300
diff --git a/org.eclipse.dstore.core/META-INF/MANIFEST.MF b/org.eclipse.dstore.core/META-INF/MANIFEST.MF
index ff9d0fc..d969f9e 100644
--- a/org.eclipse.dstore.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.dstore.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.dstore.core
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.dstore.core.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java
index 44ec418..79ff915 100644
--- a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java
+++ b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java
@@ -13,6 +13,7 @@
*
* 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;
@@ -64,6 +65,9 @@ public abstract class MinerThread extends SecuredThread
}
catch (Exception e)
{
+ if (_dataStore.getClient() != null) {
+ _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
+ }
System.out.println(e);
}
@@ -93,6 +97,9 @@ public abstract class MinerThread extends SecuredThread
}
catch (InterruptedException e)
{
+ if (_dataStore.getClient() != null) {
+ _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
+ }
System.out.println(e);
}
@@ -105,6 +112,9 @@ public abstract class MinerThread extends SecuredThread
}
catch (Exception e)
{
+ if (_dataStore.getClient() != null) {
+ _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
+ }
System.out.println(e);
}
}
diff --git a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java
index 54f946f..52a2db7 100644
--- a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java
+++ b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java
@@ -13,6 +13,7 @@
*
* 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;
@@ -178,8 +179,6 @@ public class ByteStreamHandler implements IByteStreamHandler
{
FileOutputStream outStream = new FileOutputStream(fileName, true);
- try
- {
if (binary)
{
outStream.write(buffer, 0, size);
@@ -191,11 +190,6 @@ public class ByteStreamHandler implements IByteStreamHandler
byte[] convertedBytes = byteConverter.convertClientBytesToHostBytes(buffer, 0, size);
outStream.write(convertedBytes, 0, convertedBytes.length);
}
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
outStream.close();
diff --git a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java
index 3e66fec..b12837d 100644
--- a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java
+++ b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * 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
@@ -26,6 +26,11 @@
* David McKnight (IBM) - [231639] [dstore] in single-process multi-client mode tracing shouldn't start until the client is set
* Noriaki Takatsu (IBM) - [239073] [dstore] [multithread] In multithread, the cache jar should be assigned after the client is set
* Noriaki Takatsu (IBM) - [245069] [dstore] dstoreTrace has no timestamp
+ * David McKnight (IBM) - [282634] [dstore] IndexOutOfBoundsException on Disconnect
+ * David McKnight (IBM) - [282599] [dstore] log folder that is not a hidden one
+ * David McKnight (IBM) - [285151] [dstore] Potential threading problem in DataStore (open call)
+ * David McKnight (IBM) - [285301] [dstore] 100% CPU if user does not have write access to $HOME
+ * David McKnight (IBM) - [287457] [dstore] problems with disconnect when readonly trace file
*******************************************************************************/
package org.eclipse.dstore.core.model;
@@ -2154,8 +2159,13 @@ public final class DataStore
}
// notify that preferences have changed
- for (int i = 0; i < _dataStorePreferenceListeners.size(); i++){
- IDataStorePreferenceListener listener = (IDataStorePreferenceListener)_dataStorePreferenceListeners.get(i);
+ 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);
}
}
@@ -2172,7 +2182,9 @@ public final class DataStore
* @since 3.0
*/
public void addDataStorePreferenceListener(IDataStorePreferenceListener listener){
- _dataStorePreferenceListeners.add(listener);
+ synchronized (_dataStorePreferenceListeners){
+ _dataStorePreferenceListeners.add(listener);
+ }
}
/**
@@ -2181,8 +2193,10 @@ public final class DataStore
* @param listener the listener to remove
* @since 3.0
*/
- public void removeDataStorePreferenceListener(IDataStorePreferenceListener listener){
- _dataStorePreferenceListeners.remove(listener);
+ public void removeDataStorePreferenceListener(IDataStorePreferenceListener listener){
+ synchronized (_dataStorePreferenceListeners){
+ _dataStorePreferenceListeners.remove(listener);
+ }
}
/**
@@ -2190,7 +2204,9 @@ public final class DataStore
* @since 3.0
*/
public void removeAllDataStorePreferenceListeners(){
- _dataStorePreferenceListeners.clear();
+ synchronized (_dataStorePreferenceListeners){
+ _dataStorePreferenceListeners.clear();
+ }
}
/**
@@ -3568,8 +3584,18 @@ public final class DataStore
_userPreferencesDirectory = _userPreferencesDirectory + File.separator;
}
- _userPreferencesDirectory = _userPreferencesDirectory + ".eclipse" + File.separator + //$NON-NLS-1$
- "RSE" + File.separator + clientUserID; //$NON-NLS-1$
+ // 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.charAt( logDirectory.length() -1 ) != File.separatorChar ) {
+ logDirectory = logDirectory + File.separator;
+ }
+
+ _userPreferencesDirectory = _userPreferencesDirectory + logDirectory + clientUserID;
+
File dirFile = new File(_userPreferencesDirectory);
if (!dirFile.exists()) {
dirFile.mkdirs();
@@ -3931,7 +3957,7 @@ public final class DataStore
_hashMap.remove(id);
}
- if (!isConnected())
+ if (!isConnected() && from != null)
{
from.removeNestedData(toDelete);
}
@@ -4113,16 +4139,19 @@ public final class DataStore
// which causes havoc for iSeries caching when switching between offline / online
//if (isVirtual())
// flush();
- if (_deRemover != null)
+ 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();
+ if (_traceFile != null){
+ _traceFile.writeBytes("Finished Tracing"); //$NON-NLS-1$
+ _traceFile.writeBytes(System.getProperty("line.separator")); //$NON-NLS-1$
+ _traceFile.close();
+ }
}
catch (IOException e)
{
@@ -4329,7 +4358,11 @@ public final class DataStore
return;
}
}
+
_cacheJar = cacheJar;
+ if (!_cacheJar.canWrite()){ // can't write this..don't bother with cache
+ _cacheJar = null;
+ }
}
protected String getCacheDirectory()
diff --git a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java
index 5cd6f43..4086267 100644
--- a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java
+++ b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java
@@ -23,6 +23,7 @@
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
* Noriaki Takatsu (IBM) - [242968] [multithread] serverSocket must be closed when an exception happens in Accept
* David McKnight (IBM) - [257321] [dstore] "Error binding socket" should include port of the failed socket
+ * Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
*******************************************************************************/
package org.eclipse.dstore.core.server;
@@ -517,6 +518,9 @@ public class ConnectionEstablisher
}
catch (IOException e)
{
+ if (_dataStore.getClient() != null) {
+ _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
+ }
System.out.println(e);
}
diff --git a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java
index 20e483e..f9c4545 100644
--- a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java
+++ b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java
@@ -19,6 +19,7 @@
* David McKnight (IBM) - [244876] [dstore] make DEBUG a non-final variable of the ServerLogger class
* David McKnight (IBM) - [271914] [dstore] Setting debug on/off dynamically
* David McKnight (IBM) - [269908] [dstore] rsecomm.log file management
+ * David McKnight (IBM) - [284787] [dstore] ability to disable RSECOMM_LOGFILE_MAX option
********************************************************************************/
package org.eclipse.dstore.core.server;
@@ -135,7 +136,7 @@ public class ServerLogger implements IServerLogger
else {
// if the file exists, check it's size
long fileSize = logFile.length();
- if (fileSize > logFileMax){
+ if (logFileMax > 0 && fileSize > logFileMax){ // if logFileMax is 0 or less, than always use the same file
// file too big, need a new one
suffix++;
}
diff --git a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java
index 2f37603..cf767d5 100644
--- a/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java
+++ b/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java
@@ -17,6 +17,7 @@
* 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;
@@ -90,6 +91,9 @@ public class ServerReceiver extends Receiver
socket().close();
}
catch (IOException e){
+ if (_dataStore.getClient() != null) {
+ _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
+ }
System.out.println(e);
}
}
@@ -99,6 +103,9 @@ public class ServerReceiver extends Receiver
*/
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);
diff --git a/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java b/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java
index 313c1ea..c10a990 100644
--- a/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java
+++ b/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java
@@ -15,6 +15,7 @@
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
* David McKnight (IBM) - [244388] [dstore] Connection hangs when a miner not installed
* David McKnight (IBM) - [278341] [dstore] Disconnect on idle causes the client hang
+ * Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
*******************************************************************************/
package org.eclipse.dstore.internal.core.server;
@@ -64,6 +65,9 @@ public class ServerCommandHandler extends CommandHandler
_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){
diff --git a/org.eclipse.dstore.extra/META-INF/MANIFEST.MF b/org.eclipse.dstore.extra/META-INF/MANIFEST.MF
index 4510856..f9dd6f8 100644
--- a/org.eclipse.dstore.extra/META-INF/MANIFEST.MF
+++ b/org.eclipse.dstore.extra/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.dstore.extra
-Bundle-Version: 2.1.100.qualifier
+Bundle-Version: 2.1.101.qualifier
Bundle-Activator: org.eclipse.dstore.extra.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java b/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java
index a644217..5a63796 100644
--- a/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java
+++ b/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * 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
@@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David McKnight (IBM) - [282634] [dstore] IndexOutOfBoundsException on Disconnect
*******************************************************************************/
package org.eclipse.dstore.internal.extra;
@@ -51,9 +51,11 @@ public class DomainNotifier implements IDomainNotifier
public void addDomainListener(IDomainListener listener)
{
- if (!_listeners.contains(listener))
- {
- _listeners.add(listener);
+ synchronized (_listeners){
+ if (!_listeners.contains(listener))
+ {
+ _listeners.add(listener);
+ }
}
}
@@ -62,24 +64,34 @@ public class DomainNotifier implements IDomainNotifier
{
if (_enabled)
{
- for (int i = 0; i < _listeners.size(); i++)
+ Object[] listeners = null;
+
+ synchronized (_listeners){
+ listeners = _listeners.toArray();
+ }
+
+ for (int i = 0; i < listeners.length; i++)
{
- IDomainListener listener = (IDomainListener) _listeners.get(i);
+ IDomainListener listener = (IDomainListener)listeners[i];
if ((listener != null) && listener.listeningTo(event))
{
listener.domainChanged(event);
}
- }
+ }
}
}
public boolean hasDomainListener(IDomainListener listener)
{
- return _listeners.contains(listener);
+ synchronized (_listeners){
+ return _listeners.contains(listener);
+ }
}
public void removeDomainListener(IDomainListener listener)
{
- _listeners.remove(listener);
+ synchronized (_listeners){
+ _listeners.remove(listener);
+ }
}
}
diff --git a/org.eclipse.rse-feature/feature.xml b/org.eclipse.rse-feature/feature.xml
index 034e159..db7ebf1 100644
--- a/org.eclipse.rse-feature/feature.xml
+++ b/org.eclipse.rse-feature/feature.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2005, 2008 IBM Corporation and others.
+ 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
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse"
label="%featureName"
- version="3.1.0.qualifier"
+ version="3.1.2.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse"
image="eclipse_update_120.jpg">
diff --git a/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF b/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF
index c8bf6e0..3b42c8a 100644
--- a/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.connectorservice.dstore;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.connectorservice.dstore.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties b/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties
index 7bb8eb4..1e45d49 100644
--- a/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties
+++ b/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties
@@ -15,9 +15,10 @@
# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
+# David McKnight (IBM) - [287135] TVT35:TCT652: FRA - RSE - Apostrophe issue in SSL message
###############################################################################
-# NLS_MESSAGEFORMAT_NONE
+# NLS_MESSAGEFORMAT_VAR
# NLS_ENCODING=UTF-8
DStore_ConnectorService_Label=DStore Connector Service
diff --git a/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java b/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java
index bdcdd37..8175248 100644
--- a/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java
+++ b/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
+ * 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
@@ -10,12 +10,13 @@
*
* 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 = 5000;
+ 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;
diff --git a/org.eclipse.rse.connectorservice.telnet/META-INF/MANIFEST.MF b/org.eclipse.rse.connectorservice.telnet/META-INF/MANIFEST.MF
index 5f88dd3..4b76e32 100644
--- a/org.eclipse.rse.connectorservice.telnet/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.connectorservice.telnet/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.connectorservice.telnet;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.connectorservice.telnet.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java b/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java
index fa175bf..bd51c8b 100644
--- a/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java
+++ b/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
@@ -20,6 +20,7 @@
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
* Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
+ * Anna Dushistova (MontaVista) - [198819] [telnet] TelnetConnectorService does not send CommunicationsEvent.BEFORE_CONNECT
*******************************************************************************/
package org.eclipse.rse.internal.connectorservice.telnet;
@@ -122,6 +123,8 @@ public class TelnetConnectorService extends StandardConnectorService implements
protected void internalConnect(IProgressMonitor monitor) throws Exception {
try {
+ // Fire comm event to signal state about to change
+ fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
TelnetClient client = makeNewTelnetClient(monitor);
if( client != null ) {
synchronized(this) {
diff --git a/org.eclipse.rse.core-feature/feature.xml b/org.eclipse.rse.core-feature/feature.xml
index db9345f..304898b 100644
--- a/org.eclipse.rse.core-feature/feature.xml
+++ b/org.eclipse.rse.core-feature/feature.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2005, 2008 IBM Corporation and others.
+ 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
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.core"
label="%featureName"
- version="3.1.0.qualifier"
+ version="3.1.1.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.core">
diff --git a/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs b/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
index a426e82..3c6fe4c 100644
--- a/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
+++ b/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,3 @@
-#Wed Apr 25 15:35:14 CEST 2007
+#Thu Aug 06 17:32:46 CEST 2009
eclipse.preferences.version=1
-encoding//src/org/eclipse/rse/internal/core/messages.properties=8859_1
+encoding/<project>=ISO-8859-1
diff --git a/org.eclipse.rse.core/META-INF/MANIFEST.MF b/org.eclipse.rse.core/META-INF/MANIFEST.MF
index 6ced30b..bdb469b 100644
--- a/org.eclipse.rse.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.core;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.core.RSECorePlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java b/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java
index 5b09d50..249f61f 100644
--- a/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java
+++ b/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java
@@ -59,6 +59,7 @@
* David McKnight (IBM) - [249247] Expand New Connections
* David McKnight (IBM) - [254590] When disconnecting a subsystem with COLLAPSE option, subsystems of other connector services also get collapsed
* Martin Oberhuber (Wind River) - [245154][api] add getSubSystemConfigurationProxiesBySystemType()
+ * Zhou Renjian (Kortide) - [282238] NPE when copying host and overwrite itself
********************************************************************************/
package org.eclipse.rse.internal.core.model;
@@ -2097,6 +2098,10 @@ public class SystemRegistry implements ISystemRegistry
{
// STEP 1: COPY CONNECTION ITSELF, MINUS ITS SUBSYSTEMS...
newConn = oldPool.cloneHost(targetPool, conn, newName);
+ // Fix bug#282238: NPE when copying host and overwrite itself
+ if (newConn == null) {
+ return null;
+ }
// STEP 2: COPY ALL SUBSYSTEMS FOR THE COPIED CONNECTION
msg = RSECoreMessages.MSG_COPYSUBSYSTEMS_PROGRESS;
diff --git a/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
index bcab937..4fb40f0 100644
--- a/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
+++ b/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
@@ -26,6 +26,7 @@
* David McKnight (IBM) - [245198] [dstore] ServerLauncherProperties not restored
* David McKnight (IBM) - [267052] need to be able to create subsystems-after-the-fact
* David McKnight (IBM) - [271243] [files] Switching service type brings up TWO file subsystems after restart
+ * Uwe Stieber (Wind River) - [283844] NPE on restoring property set if persistent data is corrupted
********************************************************************************/
package org.eclipse.rse.internal.persistence.dom;
@@ -559,8 +560,13 @@ public class RSEDOMImporter {
set.setDescription(attribute.getValue());
} else {
String typeStr = attribute.getType();
- IPropertyType type = PropertyType.fromString(typeStr);
- set.addProperty(attribute.getKey(), attribute.getValue(), type);
+ // We keep getting reports throwing NPE in PropertyType.fromString(...).
+ // If the data is corrupted and the type cannot be determined, it is better
+ // to just drop the single property than the whole property set
+ if (typeStr != null) {
+ IPropertyType type = PropertyType.fromString(typeStr);
+ set.addProperty(attribute.getKey(), attribute.getValue(), type);
+ }
}
}
// properties are now stored as children, get those next
diff --git a/org.eclipse.rse.dstore-feature/feature.xml b/org.eclipse.rse.dstore-feature/feature.xml
index 9fd7892..018dac5 100644
--- a/org.eclipse.rse.dstore-feature/feature.xml
+++ b/org.eclipse.rse.dstore-feature/feature.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, 2009 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Initial Contributors:
The following IBM employees contributed to the Remote System Explorer
component that contains this file: David McKnight, Kushal Munir,
Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
Contributors:
IBM Corporation - initial API and implementation
Martin Oberhuber (Wind River) - [189269] add version range specifiers
-->
<feature
id="org.eclipse.rse.dstore"
label="%featureName"
- version="3.1.0.qualifier"
+ version="3.1.1.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.services.dstore">
diff --git a/org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF b/org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF
index ec0ef54..9c96967 100644
--- a/org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.efs.ui;singleton:=true
-Bundle-Version: 2.1.100.qualifier
+Bundle-Version: 2.1.101.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
diff --git a/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java b/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java
index c2d81a1..313b507 100644
--- a/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java
+++ b/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
+ * 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
@@ -19,6 +19,7 @@
* Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
* Martin Oberhuber (Wind River) - [189441] fix EFS operations on Windows (Local) systems
* David Dykstal (IBM) - [235840] externalizing dialog title
+ * David McKnight (IBM) - [280763] [efs] Cannot pick a file when linking a resource (only folders)
********************************************************************************/
@@ -33,7 +34,7 @@ import org.eclipse.rse.core.filters.ISystemFilterReference;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
+import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
import org.eclipse.rse.internal.efs.RSEFileStoreImpl;
import org.eclipse.rse.services.clientserver.PathUtility;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
@@ -46,8 +47,9 @@ public class RSEFileSystemContributor extends FileSystemContributor {
public URI browseFileSystem(String initialPath, Shell shell) {
-
- SystemRemoteFolderDialog dlg = new SystemRemoteFolderDialog(shell);
+
+ SystemRemoteFileDialog dlg = new SystemRemoteFileDialog(shell);
+
if (!initialPath.equals("")) { //$NON-NLS-1$
diff --git a/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF b/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF
index b046def..6851533 100644
--- a/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.files.ui;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.files.ui.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.rse.files.ui/plugin.properties b/org.eclipse.rse.files.ui/plugin.properties
index bd2febd..860495a 100644
--- a/org.eclipse.rse.files.ui/plugin.properties
+++ b/org.eclipse.rse.files.ui/plugin.properties
@@ -44,7 +44,6 @@ 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
diff --git a/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
index 9123596..2290037 100644
--- a/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
+++ b/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
@@ -37,6 +37,7 @@
* 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;
@@ -723,7 +724,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
/**
* Upload the file
*/
- private void upload() throws Exception
+ private void upload(IProgressMonitor monitor) throws Exception
{
if (!subsystem.isConnected())
@@ -738,13 +739,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
IFile file = getLocalResource();
String srcEncoding = RemoteFileUtility.getSourceEncoding(file);
- subsystem.upload(localPath, remoteFile, srcEncoding, null);
+ subsystem.upload(localPath, remoteFile, srcEncoding, monitor);
// update timestamp
SystemIFileProperties properties = new SystemIFileProperties(file);
//DKM- saveAS fix
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
+ remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
}
@@ -1810,7 +1811,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
if (resource.getLocation().equals(getLocalResource().getLocation()))
{
- upload();
+ upload(new NullProgressMonitor());
}
}
catch (Exception e)
@@ -1924,7 +1925,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
try
{
this.setLocalResourceProperties();
- this.upload();
+ this.upload(progressMonitor);
} catch (SystemMessageException e) {
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), e.getSystemMessage());
dialog.open();
diff --git a/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java b/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
index a5f3e0d..1302b14 100644
--- a/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
+++ b/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
@@ -56,6 +56,8 @@
* David McKnight (IBM) - [251136] Error copying local file to remote system when temp file is readonly
* David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
* David McKnight (IBM) - [276534] Cache Conflict After Synchronization when Browsing Remote System with Case-Differentiated-Only Filenames
+ * David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
+ * David McKnight (IBM) - [234258] [dnd] Drag&Drop a folder silently ignores elements without permissions
*******************************************************************************/
package org.eclipse.rse.files.ui.resources;
@@ -255,7 +257,7 @@ public class UniversalFileTransferUtility {
boolean available = true;
try {
- tempFileAvailable(tempFile, srcFileOrFolder);
+ available = tempFileAvailable(tempFile, srcFileOrFolder);
}
catch (RemoteFileIOException e){
// this is the case where a temp file exists for a file of a different case
@@ -607,7 +609,8 @@ public class UniversalFileTransferUtility {
}
catch (SystemMessageException e)
{
- e.printStackTrace();
+ SystemBasePlugin.logError(e.getMessage(), e);
+ SystemMessageDialog.displayMessage(e);
}
}
}
@@ -882,7 +885,8 @@ public class UniversalFileTransferUtility {
}
catch (SystemMessageException e)
{
- e.printStackTrace();
+ SystemBasePlugin.logError(e.getMessage(), e);
+ SystemMessageDialog.displayMessage(e);
}
}
}
@@ -1385,7 +1389,8 @@ public class UniversalFileTransferUtility {
}
catch (SystemMessageException e)
{
- e.printStackTrace();
+ SystemBasePlugin.logError(e.getMessage(), e);
+ SystemMessageDialog.displayMessage(e);
}
IResource[] childResources = null;
@@ -1990,10 +1995,12 @@ public class UniversalFileTransferUtility {
catch (RemoteFileIOException e)
{
+ SystemMessageDialog.displayMessage(e);
return e.getSystemMessage();
}
catch (SystemMessageException e)
{
+ SystemMessageDialog.displayMessage(e);
return e.getSystemMessage();
}
}
diff --git a/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java b/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java
index 4c06ee0..40bad15 100644
--- a/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java
+++ b/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * 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
@@ -12,6 +12,7 @@
* Contributors:
* David McKnight (IBM) - [187711] Link with Editor action for System View
* David McKnight (IBM) - [238294] ClassCastException using Link With Editor
+ * David McKnight (IBM) - [281309] RSE Explorer View is not able to be sync with Editor in next Eclipse launched
*******************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@@ -403,7 +404,7 @@ public class LinkWithSystemViewAction implements IViewActionDelegate {
{
IEditorReference editorRef = editorRefs[i];
- IEditorPart editor = editorRef.getEditor(false);
+ IEditorPart editor = editorRef.getEditor(true);
if (editor != null)
{
IEditorInput input = editor.getEditorInput();
@@ -501,6 +502,13 @@ public class LinkWithSystemViewAction implements IViewActionDelegate {
public void init(IViewPart view) {
_systemViewPart = (SystemViewPart)view;
_linker = new ViewLinker();
+
+ boolean isLinkingEnabled = _systemViewPart.isLinkingEnabled();
+ if (isLinkingEnabled){
+ // set it here by default to true so that we have a _linker at the start
+ // and restore from memento will be able to use the linker
+ _systemViewPart.setLinkingEnabled(isLinkingEnabled, _linker);
+ }
}
public void run(IAction action) {
diff --git a/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java b/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java
index 6043727..3f7721a 100644
--- a/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java
+++ b/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java
@@ -17,6 +17,7 @@
* David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
* David McKnight (IBM) - [224377] "open with" menu does not have "other" option
* David McKnight (IBM) - [277141] System Editor Passed Incorrect Cache Information in Presence of Case-Differentiated-Only filenames
+ * David McKnight (IBM) - [284596] [regression] Open with-> problem when descriptor doesn't match previous
*******************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@@ -28,6 +29,7 @@ import java.util.Comparator;
import java.util.Hashtable;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourceAttributes;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.ContributionItem;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -44,6 +46,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin;
+import org.eclipse.rse.ui.messages.SystemMessageDialog;
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -52,12 +55,16 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.EditorSelectionDialog;
import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.part.FileEditorInput;
/**
@@ -238,8 +245,13 @@ protected void openEditor(IRemoteFile remoteFile, IEditorDescriptor descriptor)
if (systemEditor) {
editable.openSystemEditor();
}
- else {
- editable.openEditor();
+ else {
+ if (descriptor != null){
+ hackOpenEditor(editable, descriptor);
+ }
+ else {
+ editable.openEditor();
+ }
}
}
catch (Exception e) {}
@@ -250,6 +262,66 @@ protected void openEditor(IRemoteFile remoteFile, IEditorDescriptor descriptor)
}
}
+/**
+ * This method is a hack to deal with bug 284596 while no API exists to set the editor descriptor for a
+ * given SystemEditableRemoteFile. The code here is essentially a modified version of
+ * SystemEditableRemoteFile.openEditor()
+ */
+private void hackOpenEditor(SystemEditableRemoteFile editable, IEditorDescriptor descriptor) throws PartInitException
+{
+ IWorkbenchPage activePage = this.page;
+ IWorkbench wb = PlatformUI.getWorkbench();
+ if (activePage == null)
+ {
+ activePage = wb.getActiveWorkbenchWindow().getActivePage();
+ }
+ IFile file = editable.getLocalResource();
+
+ IRemoteFile remoteFile = editable.getRemoteFile();
+ // get fresh remote file object
+ remoteFile.markStale(true); // make sure we get the latest remote file (with proper permissions and all)
+ IRemoteFileSubSystem ss = remoteFile.getParentRemoteFileSubSystem();
+ if (!remoteFile.getParentRemoteFileSubSystem().isOffline()){
+ try{
+ remoteFile = ss.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
+ }
+ catch (Exception e){
+ SystemMessageDialog.displayExceptionMessage(SystemMessageDialog.getDefaultShell(), e);
+ return;
+ }
+ }
+ editable.setRemoteFile(remoteFile);
+
+ boolean readOnly = !remoteFile.canWrite();
+ ResourceAttributes attr = file.getResourceAttributes();
+ if (attr!=null) {
+ attr.setReadOnly(readOnly);
+ try {
+ file.setResourceAttributes(attr);
+ }
+ catch (Exception e)
+ {}
+ }
+
+ // set editor as preferred editor for this file
+ String editorId = descriptor.getId();
+ IDE.setDefaultEditor(file, editorId);
+
+ FileEditorInput finput = new FileEditorInput(file);
+
+ IEditorPart editor = null;
+ if (descriptor.isOpenExternal()){
+ editor = ((WorkbenchPage)activePage).openEditorFromDescriptor(new FileEditorInput(file), descriptor, true, null);
+ }
+ else {
+ editor = activePage.openEditor(finput, descriptor.getId());
+ }
+ editable.setEditor(editor);
+
+ SystemIFileProperties properties = new SystemIFileProperties(file);
+ properties.setRemoteFileObject(this);
+}
+
private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile remoteFile)
{
// DY: check if the file exists and is read-only (because it was previously opened
diff --git a/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
index 289fd41..0ac7364 100644
--- a/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
+++ b/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
@@ -63,6 +63,7 @@
* David McKnight (IBM) - [264607] Unable to delete a broken symlink
* David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
* David McKnight (IBM) - [276534] Cache Conflict After Synchronization when Browsing Remote System with Case-Differentiated-Only Filenames
+ * David McKnight (IBM) - [280466] File download keeps running in case sensitive case
*******************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@@ -2781,39 +2782,16 @@ public class SystemViewRemoteFileAdapter
try
{
tmp.delete(false, null);
+
+ // get rid of associated editable if there was one before
+ SystemIFileProperties properties = new SystemIFileProperties(tmp);
+ properties.setRemoteFileObject(null);
}
catch (Exception e)
{
}
}
- /*
-
- 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);
@@ -2941,9 +2919,13 @@ public class SystemViewRemoteFileAdapter
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);
+
+ // is this open?
+ if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN){
+ // there's an in-memory editable, so change the associated remote file
+ IRemoteFile newRemoteFile = ss.getRemoteFileObject(remotePath, new NullProgressMonitor());
+ editable.setRemoteFile(newRemoteFile);
+ }
}
}
catch (Exception e)
diff --git a/org.eclipse.rse.ftp-feature/feature.xml b/org.eclipse.rse.ftp-feature/feature.xml
index 988684a..f50f3cf 100644
--- a/org.eclipse.rse.ftp-feature/feature.xml
+++ b/org.eclipse.rse.ftp-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.ftp"
label="%featureName"
- version="3.0.100.qualifier"
+ version="3.0.101.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.services.files.ftp">
diff --git a/org.eclipse.rse.importexport/META-INF/MANIFEST.MF b/org.eclipse.rse.importexport/META-INF/MANIFEST.MF
index 26f9305..c046534 100644
--- a/org.eclipse.rse.importexport/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.importexport/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.importexport; singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.importexport.RemoteImportExportPlugin
Bundle-Localization: plugin
Export-Package: org.eclipse.rse.internal.importexport;x-internal:=true,
diff --git a/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java b/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java
index 832d73a..f04d953 100644
--- a/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java
+++ b/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java
@@ -12,9 +12,11 @@
* David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
* Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
+ * David McKnight (IBM) - [287946] Export, save in rexpfd does not work any more
*******************************************************************************/
package org.eclipse.rse.internal.importexport.files;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
@@ -26,6 +28,7 @@ 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;
@@ -33,6 +36,11 @@ import org.eclipse.rse.internal.synchronize.SynchronizeData;
import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeOperation;
import org.eclipse.rse.internal.synchronize.provisional.SynchronizeOperation;
import org.eclipse.rse.internal.synchronize.provisional.Synchronizer;
+import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.ui.SystemBasePlugin;
+import org.eclipse.rse.ui.messages.SystemMessageDialog;
+import org.eclipse.ui.PlatformUI;
/**
* This class is a remote file export action.
@@ -125,38 +133,40 @@ public class RemoteFileExportActionDelegate extends RemoteFileImportExportAction
}
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;
-
// Add re-running synchronize operation
- for (int i = 0; i < exportDatas.length; i++) {
- SynchronizeData data = new SynchronizeData(exportDatas[i]);
- data.setSynchronizeType(ISynchronizeOperation.SYNC_MODE_UI_REVIEW);
- new Synchronizer(data).run(new SynchronizeOperation());
+ for (int i = 0; i < exportDatas.length; i++) {
+ RemoteFileExportData exportData = exportDatas[i];
+ if (exportData.isReviewSynchronize()){
+
+ SynchronizeData data = new SynchronizeData(exportData);
+ data.setSynchronizeType(ISynchronizeOperation.SYNC_MODE_UI_REVIEW);
+ new Synchronizer(data).run(new SynchronizeOperation());
+ }
+ else {
+ IStatus status = null;
+ RemoteFileExportOperation op = new RemoteFileExportOperation(exportDatas[i], new RemoteFileOverwriteQuery());
+ try {
+ PlatformUI.getWorkbench().getProgressService().run(true, true, op);
+ status = op.getStatus();
+ } catch (InvocationTargetException e) {
+ SystemBasePlugin.logError("Error occured trying to export", e); //$NON-NLS-1$
+ status = new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
+ } catch (InterruptedException e) {
+ SystemBasePlugin.logError("Error occured trying to export", e); //$NON-NLS-1$
+ status = new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
+ }
+ if (!status.isOK()) {
+ String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_FAILED, status);
+
+ SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
+ IRemoteImportExportConstants.FILEMSG_EXPORT_FAILED,
+ IStatus.ERROR, msgTxt);
+
+ SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
+ dlg.openWithDetails();
+ return null;
+ }
+ }
}
return null;
}
diff --git a/org.eclipse.rse.local-feature/feature.xml b/org.eclipse.rse.local-feature/feature.xml
index f252894..697254c 100644
--- a/org.eclipse.rse.local-feature/feature.xml
+++ b/org.eclipse.rse.local-feature/feature.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2005, 2008 IBM Corporation and others.
+ 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
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.local"
label="%featureName"
- version="2.1.100.qualifier"
+ version="2.1.101.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.services.local">
diff --git a/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF b/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF
index 68c85f9..7007632 100644
--- a/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.processes.ui;singleton:=true
-Bundle-Version: 3.0.100.qualifier
+Bundle-Version: 3.0.101.qualifier
Bundle-Activator: org.eclipse.rse.internal.processes.ui.ProcessesPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java b/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java
index 3d76122..424bed7 100644
--- a/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java
+++ b/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
@@ -12,12 +12,17 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * 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;
@@ -26,10 +31,9 @@ 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
*/
@@ -69,4 +73,42 @@ public class SystemNewProcessFilterAction extends SystemNewFilterAction
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/org.eclipse.rse.sdk-feature/feature.xml b/org.eclipse.rse.sdk-feature/feature.xml
index 6643ae7..06996c8 100644
--- a/org.eclipse.rse.sdk-feature/feature.xml
+++ b/org.eclipse.rse.sdk-feature/feature.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2005, 2008 IBM Corporation and others.
+ 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
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.sdk"
label="%featureName"
- version="3.1.0.qualifier"
+ version="3.1.2.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg">
diff --git a/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF b/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF
index 38c534c..2b3c0d8 100644
--- a/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.services.dstore
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.services.dstore.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java b/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java
index 9200c82..8db5cb6 100644
--- a/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java
+++ b/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java
@@ -40,6 +40,7 @@
* David McKnight (IBM) - [250168] handleCommand should not blindly set the status to "done"
* David McKnight (IBM) - [251729][dstore] problems querying symbolic link folder
* David McKnight (IBM) - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
+ * David McKnight (IBM) - [283617] [dstore] UniversalFileSystemMiner.handleQueryGetRemoteObject does not return correct result when the queried file does not exist.
*******************************************************************************/
package org.eclipse.rse.dstore.universal.miners;
@@ -1097,6 +1098,13 @@ public class UniversalFileSystemMiner extends Miner {
// 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);
}
diff --git a/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java b/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java
index 4e89f2d..0f285ac 100644
--- a/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java
+++ b/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java
@@ -20,6 +20,7 @@
* 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
*******************************************************************************/
package org.eclipse.rse.internal.dstore.universal.miners.command;
@@ -78,6 +79,9 @@ public class CommandMinerThread extends MinerThread
private boolean _isTTY;
private boolean _didInitialCWDQuery = false;
+ private int _maxLineLength = 4096;
+
+
private CommandMiner.CommandMinerDescriptors _descriptors;
// default
@@ -94,6 +98,17 @@ public class CommandMinerThread extends MinerThread
_descriptors = descriptors;
_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();
@@ -1003,14 +1018,34 @@ public class CommandMinerThread extends MinerThread
public void interpretLine(String line, boolean stdError)
- {
- int maxLine = 100;
+ {
+ // 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/maxLine+1];
+ String[] lines = new String[num/_maxLineLength+1];
if(lines.length>1)
{
int beg=0;
- int end=maxLine;
+ int end=_maxLineLength;
for(int i=0;i<lines.length;i++)
{
//try/catch put in for testing purposes
@@ -1025,7 +1060,7 @@ public class CommandMinerThread extends MinerThread
lines[i]=line.substring(beg,end);
}
beg=end;
- end=end+maxLine;
+ end=end+_maxLineLength;
//}
//catch(Exception e)
//{
diff --git a/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java b/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java
index ccc6197..acf1f00 100644
--- a/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java
+++ b/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * 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
@@ -15,6 +15,7 @@
* 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
*******************************************************************************/
package org.eclipse.rse.internal.dstore.universal.miners.command;
@@ -165,7 +166,14 @@ public class OutputHandler extends Handler {
// re-determine available if none available now
if (available == 0) {
- lookahead = _reader.read();
+ try {
+ lookahead = _reader.read();
+ }
+ catch (IOException e){
+ // pipe closed
+ return null;
+ }
+
if (lookahead == -1) {
return null;
} else {
diff --git a/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java b/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
index 616fe0f..e0036e1 100644
--- a/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
+++ b/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
@@ -57,6 +57,10 @@
* David McKnight (IBM) - [272335] [dstore] not handling case where upload fails
* David McKnight (IBM) - [278411] [dstore] upload status needs to be created in standard form when using windows server
* David McKnight (IBM) - [279014] [dstore][encoding] text file corruption can occur when downloading from UTF8 to cp1252
+ * David McKnight (IBM) - [279695] [dstore] Connection file encoding is not refreshed from the host
+ * David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
+ * David McKnight (IBM) - [284056] Sychronize Cache causes the UI to hang with no way out
+ * David McKnight (IBM) - [284420] nullprogressmonitor is needed
*******************************************************************************/
package org.eclipse.rse.internal.services.dstore.files;
@@ -160,6 +164,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
_fileElementMap.clear();
_dstoreFileMap.clear();
_uploadLogElement = null;
+ remoteEncoding = null;
super.uninitService(monitor);
}
@@ -499,16 +504,17 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
// use standard remote path
String stdRemotePath = remotePath.replace('\\', '/');
- DataElement result = ds.find(uploadLog, DE.A_NAME, stdRemotePath,1);
+ int numTransfers = 0;
+ DataElement result = ds.find(uploadLog, DE.A_NAME, stdRemotePath,1);
if (result == null)
{
- result = ds.createObject(uploadLog, "uploadstatus", stdRemotePath);
- result.setAttribute(DE.A_SOURCE, "running");
- result.setAttribute(DE.A_VALUE, "");
+ result = ds.createObject(uploadLog, "uploadstatus", stdRemotePath); //$NON-NLS-1$
+ result.setAttribute(DE.A_SOURCE, "running"); //$NON-NLS-1$
+ result.setAttribute(DE.A_VALUE, ""); //$NON-NLS-1$
DataElement cmd = getDataStore().findCommandDescriptor(DataStoreSchema.C_SET);
- DataElement setstatus = ds.command(cmd, uploadLog, true);
+ ds.command(cmd, uploadLog, true);
}
try
@@ -557,10 +563,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
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);
@@ -689,19 +696,29 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
if (totalBytes > 0)
{
if (transferSuccessful)
- {
- String resultStr = result.getSource();
- while (!resultStr.equals("success"))
+ {
+ 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")){
+
+ 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);
@@ -1026,6 +1043,9 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
//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)
diff --git a/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java b/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java
index 9e73a57..e4fc92c 100644
--- a/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java
+++ b/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java
@@ -18,7 +18,8 @@
* David McKnight (IBM) - [209593] [api] check for existing query to avoid duplicates
* David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
* David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
+ * David McKnight (IBM) - [261644] [dstore] remote search improvements
+ * David McKnight (IBM) - [283157] [dstore] Remote search didn't end when the dstore server crashed
*******************************************************************************/
package org.eclipse.rse.services.dstore.util;
@@ -277,7 +278,8 @@ public class DStoreStatusMonitor implements IDomainListener
}
else
{
- if ((monitor != null) && (monitor.isCanceled()))
+ if ((monitor != null && monitor.isCanceled()) ||
+ !status.getDataStore().getStatus().getName().equals("okay")) // datastore not okay?
{
setCancelled(status);
throw new InterruptedException();
diff --git a/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF b/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF
index d9d5ea2..21fdfc3 100644
--- a/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.services.files.ftp;singleton:=true
-Bundle-Version: 3.0.100.qualifier
+Bundle-Version: 3.0.101.qualifier
Bundle-Activator: org.eclipse.rse.internal.services.files.ftp.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java b/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
index 03773ee..7965e50 100644
--- a/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
+++ b/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
@@ -81,6 +81,8 @@
* Martin Oberhuber (Wind River) - [240738][ftp] Incorrect behavior on getFile for non-existing folder
* David McKnight (IBM) - [243921] FTP subsystem timeout causes error when expanding folders
* Martin Oberhuber (Wind River) - [217472][ftp] Error copying files with very short filenames
+ * Martin Oberhuber (Wind River) - [285942] Throw exception when listing a non-folder
+ * Martin Oberhuber (Wind River) - [285948] Avoid recursive deletion over symbolic links
********************************************************************************/
package org.eclipse.rse.internal.services.files.ftp;
@@ -127,6 +129,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemElementNotFoundExcep
import org.eclipse.rse.services.clientserver.messages.SystemLockTimeoutException;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.services.clientserver.messages.SystemNetworkIOException;
import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
import org.eclipse.rse.services.files.AbstractFileService;
@@ -358,6 +361,16 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
}
}
+ private SystemMessageException makeSystemMessageException(Exception e) {
+ if (e instanceof SystemMessageException) {
+ // dont wrap SystemMessageException again
+ return (SystemMessageException) e;
+ } else if (e instanceof IOException) {
+ return new SystemNetworkIOException(e);
+ }
+ return new RemoteFileIOException(e);
+ }
+
public void connect() throws RemoteFileSecurityException,IOException
{
@@ -496,6 +509,24 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
}
+ private void chdir(FTPClient ftpClient, String remoteFolder) throws SystemMessageException {
+ // try to retrieve the file
+ try {
+ if (!ftpClient.changeWorkingDirectory(remoteFolder)) {
+ String reply = ftpClient.getReplyString();
+ if (reply != null && reply.startsWith("550")) { //$NON-NLS-1$
+ if (!reply.trim().endsWith("Not a directory.")) { //$NON-NLS-1$
+ // No such file or directory
+ throw new SystemElementNotFoundException(remoteFolder, "chdir"); //$NON-NLS-1$
+ }
+ }
+ throw new RemoteFileIOException(new Exception(reply + " (" + remoteFolder + ")")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } catch (IOException e) {
+ throw new SystemNetworkIOException(e);
+ }
+ }
+
/**
* Returns the commons.net FTPClient for this session.
*
@@ -639,18 +670,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
try {
//try to retrieve the file
_ftpClient = getFTPClient();
-
- if(!_ftpClient.changeWorkingDirectory(remoteParent))
- {
- String reply = _ftpClient.getReplyString();
- if (reply != null && reply.startsWith("550")) { //$NON-NLS-1$
- // No such file or directory
- throw new SystemElementNotFoundException(remoteParent, "chdir"); //$NON-NLS-1$
- } else {
- throw new RemoteFileIOException(new Exception(reply));
- }
- }
-
+ chdir(_ftpClient, remoteParent);
if(!listFiles(monitor))
{
throw new SystemOperationCancelledException();
@@ -684,7 +704,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
// Return non-existing file
file = new FTPHostFile(remoteParent, fileName, false, false, 0, 0, false);
} catch (Exception e) {
- throw new RemoteFileIOException(e);
+ throw makeSystemMessageException(e);
} finally {
_commandMutex.release();
}
@@ -749,11 +769,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
}
_ftpClient = getFTPClient();
- if(!_ftpClient.changeWorkingDirectory(parentPath))
- {
- throw new RemoteFileIOException(new Exception(_ftpClient.getReplyString()));
- }
-
+ chdir(_ftpClient, parentPath);
if(!listFiles(monitor))
{
throw new SystemOperationCancelledException();
@@ -794,7 +810,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
}
catch (Exception e)
{
- throw new RemoteFileIOException(e);
+ throw makeSystemMessageException(e);
} finally {
_commandMutex.release();
}
@@ -900,7 +916,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
try{
clearCache(remoteParent);
- ftpClient.changeWorkingDirectory(remoteParent);
+ chdir(ftpClient, remoteParent);
setFileType(isBinary);
input = new FileInputStream(localFile);
@@ -988,7 +1004,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
try{
FTPClient ftpClient = getFTPClient();
- ftpClient.changeWorkingDirectory(remoteParent);
+ chdir(ftpClient, remoteParent);
setFileType(isBinary);
input = ftpClient.retrieveFileStream(remoteFile);
@@ -1149,7 +1165,11 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
{
String newParentPath = concat(parentPath,fileName);
- ftpClient.changeWorkingDirectory(newParentPath);
+ try {
+ chdir(ftpClient, newParentPath);
+ } catch (SystemElementNotFoundException e) {
+ /* nothing to do since dir does not exist */
+ }
FTPFile[] fileNames = ftpClient.listFiles();
for (int i = 0; i < fileNames.length; i++) {
@@ -1157,11 +1177,11 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
if (curName == null || curName.equals(".") || curName.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
continue;
}
- internalDelete(ftpClient, newParentPath, curName, fileNames[i].isFile(), monitor);
+ internalDelete(ftpClient, newParentPath, curName, fileNames[i].isFile() || fileNames[i].isSymbolicLink(), monitor);
}
//remove empty folder
- ftpClient.changeWorkingDirectory(parentPath);
+ chdir(ftpClient, parentPath);
hasSucceeded = ftpClient.removeDirectory(fileName);
if (!hasSucceeded)
{
@@ -1185,12 +1205,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
try {
FTPClient ftpClient = getFTPClient();
clearCache(remoteParent);
-
- if(!ftpClient.changeWorkingDirectory(remoteParent))
- {
- throw new RemoteFileIOException(new Exception(ftpClient.getReplyString()));
- }
-
+ chdir(ftpClient, remoteParent);
boolean success = ftpClient.rename(oldName, newName);
if(!success)
@@ -1199,7 +1214,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
}
} catch (Exception e) {
- throw new RemoteFileIOException(e);
+ throw makeSystemMessageException(e);
}finally {
_commandMutex.release();
}
@@ -1264,11 +1279,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
{
FTPClient ftpClient = getFTPClient();
clearCache(remoteParent);
- if(!ftpClient.changeWorkingDirectory(remoteParent))
- {
- throw new Exception(ftpClient.getReplyString()+" ("+remoteParent+")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
+ chdir(ftpClient, remoteParent);
if(!ftpClient.makeDirectory(folderName))
{
throw new RemoteFileIOException(new Exception(ftpClient.getReplyString()+" ("+folderName+")")); //$NON-NLS-1$ //$NON-NLS-2$
@@ -1276,7 +1287,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
}
catch (Exception e) {
- throw new RemoteFileSecurityException(e);
+ throw makeSystemMessageException(e);
}finally {
_commandMutex.release();
}
@@ -1367,7 +1378,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
String newSrcParentPath = concat(srcParent,srcName);
String newTgtParentPath = concat(tgtParent,tgtName);
- ftpClient.changeWorkingDirectory(newSrcParentPath);
+ chdir(ftpClient, newSrcParentPath);
FTPFile[] fileNames = ftpClient.listFiles();
for (int i = 0; i < fileNames.length; i++) {
@@ -1385,7 +1396,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
File tempFile = null;
try {
- tempFile = File.createTempFile("ftpcp" + String.valueOf(srcParent.hashCode()), "temp");
+ tempFile = File.createTempFile("ftpcp" + String.valueOf(srcParent.hashCode()), "temp"); //$NON-NLS-1$ //$NON-NLS-2$
tempFile.deleteOnExit();
} catch (IOException e) {
throw new RemoteFileIOException(e);
@@ -1655,11 +1666,11 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
try {
FTPClient ftpClient = cloneFTPClient(isBinary);
- ftpClient.changeWorkingDirectory(remoteParent);
+ chdir(ftpClient, remoteParent);
stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient);
}
catch (Exception e) {
- throw new RemoteFileIOException(e);
+ throw makeSystemMessageException(e);
}
return stream;
@@ -1692,7 +1703,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
boolean isBinary = (options & IFileService.TEXT_MODE) == 0 ? true : false;
FTPClient ftpClient = cloneFTPClient(isBinary);
clearCache(remoteParent);
- ftpClient.changeWorkingDirectory(remoteParent);
+ chdir(ftpClient, remoteParent);
if ((options & IFileService.APPEND) == 0){
stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient);
} else {
@@ -1700,7 +1711,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
}
}
catch (Exception e) {
- throw new RemoteFileIOException(e);
+ throw makeSystemMessageException(e);
}
return stream;
diff --git a/org.eclipse.rse.services.local/META-INF/MANIFEST.MF b/org.eclipse.rse.services.local/META-INF/MANIFEST.MF
index 651cc76..a1dbeeb 100644
--- a/org.eclipse.rse.services.local/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.services.local/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.services.local;singleton:=true
-Bundle-Version: 2.1.100.qualifier
+Bundle-Version: 2.1.101.qualifier
Bundle-Activator: org.eclipse.rse.internal.services.local.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java b/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
index ffa9171..b29d098 100644
--- a/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
+++ b/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * 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
@@ -41,6 +41,9 @@
* Martin Oberhuber (Wind River) - [233993] Improve EFS error reporting
* Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
* David McKnight (IBM) - [238367] [regression] Error when deleting Archive Files
+ * David McKnight (IBM) - [280899] RSE can't open files in some directory, which give the RSEG1067 error me
+ * Martin Oberhuber (Wind River) - [285942] Throw exception when listing a non-folder
+ * Martin Oberhuber (Wind River) - [286129][api] RemoteFileException(String) violates API contract
*******************************************************************************/
package org.eclipse.rse.internal.services.local.files;
@@ -397,7 +400,8 @@ public class LocalFileService extends AbstractFileService implements ILocalServi
parentDir.mkdirs();
}
// encoding conversion required if it a text file but not an xml file
- boolean isEncodingConversionRequired = !isBinary;
+ String systemEncoding = SystemEncodingUtil.getInstance().getEnvironmentEncoding();
+ boolean isEncodingConversionRequired = !isBinary && !systemEncoding.equals(hostEncoding); // should not convert if both encodings are the same
inputStream = new FileInputStream(file);
bufInputStream = new BufferedInputStream(inputStream);
@@ -735,9 +739,13 @@ public class LocalFileService extends AbstractFileService implements ILocalServi
*/
if (localParent.exists()) {
File[] files = localParent.listFiles(fFilter);
+ if (files == null) {
+ //throw new RemoteFileException("Error listing: " + localParent.getAbsolutePath());
+ throw new RemoteFileIOException(new IOException("Error listing: " + localParent.getAbsolutePath()));
+ }
return convertToHostFiles(files, type);
} else {
- return new IHostFile[0];
+ throw new SystemElementNotFoundException(localParent.getAbsolutePath(), "list");
}
}
}
diff --git a/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF b/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF
index b27e8d3..14c8548 100644
--- a/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.services.ssh;singleton:=true
-Bundle-Version: 3.0.0.qualifier
+Bundle-Version: 3.0.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.services.ssh.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java b/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
index e31143b..3ce77d9 100644
--- a/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
+++ b/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
@@ -38,6 +38,9 @@
* Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
* David McKnight (IBM) - [271244] [sftp files] "My Home" filter not working
* David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
+ * Martin Oberhuber (Wind River) - [274568] Dont use SftpMonitor for Streams transfer
+ * Patrick Tassé (Ericsson) - [285226] Empty directory shown as an error message
+ * Martin Oberhuber (Wind River) - [286129][api] RemoteFileException(String) violates API contract
*******************************************************************************/
package org.eclipse.rse.internal.services.ssh.files;
@@ -94,6 +97,7 @@ import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.services.files.IHostFilePermissions;
import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
+import org.eclipse.rse.services.files.RemoteFileException;
import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
public class SftpFileService extends AbstractFileService implements ISshService, IFilePermissionsService
@@ -547,6 +551,16 @@ public class SftpFileService extends AbstractFileService implements ISshService,
//don't show the trivial names
continue;
}
+ if (vv.size() == 1 && fileName.equals(parentPath.substring(parentPath.lastIndexOf('/') + 1))) {
+ //If there is only one entry and it has the same name as the parent path, the parentPath could be a file.
+ //Check if the parentPath is a directory.
+ SftpATTRS attrs = getChannel("SftpFileService.internalFetch: " + parentPath).stat(parentPath); //$NON-NLS-1$
+ if (!attrs.isDir()) {
+ // parent was a file and not a folder
+ //throw new RemoteFileException("Not a folder: " + parentPath); //$NON-NLS-1$
+ throw new RemoteFileIOException(new IOException("Not a folder: " + parentPath)); //$NON-NLS-1$
+ }
+ }
if (filematcher.matches(fileName) || (lsEntry.getAttrs().isDir() && fileType!=IFileService.FILE_TYPE_FOLDERS)) {
//get ALL directory names (unless looking for folders only)
SftpHostFile node = makeHostFile(parentPath, fileName, lsEntry.getAttrs());
@@ -559,6 +573,22 @@ public class SftpFileService extends AbstractFileService implements ISshService,
}
Activator.trace("SftpFileService.internalFetch <--"); //$NON-NLS-1$
} catch(Exception e) {
+ if ( (e instanceof SftpException) && ((SftpException)e).id==ChannelSftp.SSH_FX_NO_SUCH_FILE) {
+ //We can get a "2: No such file" exception when the directory is empty.
+ try {
+ // Check if the parentPath exists and is a folder
+ SftpATTRS attrs = getChannel("SftpFileService.internalFetch: " + parentPath).stat(parentPath); //$NON-NLS-1$
+ if (attrs.isDir()) {
+ // We MUST NOT throw an exception here. Just return
+ // an empty IHostFile array.
+ return new IHostFile[0];
+ }
+ // else, fall through to exception handling -- will send
+ // SystemRemoteFileIOException
+ } catch (Exception ee) {
+ //Can't get the folder attributes so let the first exception be handled.
+ }
+ }
//TODO throw new SystemMessageException.
//We get a "2: No such file" exception when we try to get contents
//of a symbolic link that turns out to point to a file rather than
@@ -880,7 +910,7 @@ public class SftpFileService extends AbstractFileService implements ISshService,
public IHostFile[] getRoots(IProgressMonitor monitor) {
IHostFile root = null;
try {
- root = getFile(null, "/", monitor);
+ root = getFile(null, "/", monitor); //$NON-NLS-1$
}
catch (SystemMessageException e){
}
@@ -956,7 +986,7 @@ public class SftpFileService extends AbstractFileService implements ISshService,
try {
getChannel("SftpFileService.delete.rm").rm(fullPathRecoded); //$NON-NLS-1$
} catch (Exception e2) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, fullPath, "delete");
+ throw new SystemElementNotFoundException(Activator.PLUGIN_ID, fullPath, "delete"); //$NON-NLS-1$
}
} else {
//Security exception, or similar: will be wrapped in makeSystemMessageException()
@@ -1183,7 +1213,7 @@ public class SftpFileService extends AbstractFileService implements ISshService,
} catch (Exception e) {
Activator.trace("SftpFileService.setReadOnly "+path+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
if ((e instanceof SftpException) && ((SftpException) e).id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, path, "setReadOnly");
+ throw new SystemElementNotFoundException(Activator.PLUGIN_ID, path, "setReadOnly"); //$NON-NLS-1$
}
throw makeSystemMessageException(e);
} finally {
@@ -1247,7 +1277,6 @@ public class SftpFileService extends AbstractFileService implements ISshService,
}
try {
- SftpProgressMonitor sftpMonitor = new MyProgressMonitor(monitor);
int mode;
if ((options & IFileService.APPEND) == 0) {
mode = ChannelSftp.OVERWRITE;
@@ -1257,7 +1286,7 @@ public class SftpFileService extends AbstractFileService implements ISshService,
getChannel("SftpFileService.getOutputStream " + remoteFile); //check the session is healthy //$NON-NLS-1$
ChannelSftp channel = (ChannelSftp)fSessionProvider.getSession().openChannel("sftp"); //$NON-NLS-1$
channel.connect();
- stream = new SftpBufferedOutputStream(channel.put(recodeSafeForJsch(dst), sftpMonitor, mode), channel);
+ stream = new SftpBufferedOutputStream(channel.put(recodeSafeForJsch(dst), mode), channel);
Activator.trace("SftpFileService.getOutputStream " + remoteFile + " ok"); //$NON-NLS-1$ //$NON-NLS-2$
}
catch (Exception e) {
@@ -1298,7 +1327,7 @@ public class SftpFileService extends AbstractFileService implements ISshService,
} catch (Exception e) {
Activator.trace("SftpFileService.setFilePermissions " + path + " failed: " + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
if ((e instanceof SftpException) && ((SftpException) e).id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, path, "setFilePermissions");
+ throw new SystemElementNotFoundException(Activator.PLUGIN_ID, path, "setFilePermissions"); //$NON-NLS-1$
}
throw makeSystemMessageException(e);
} finally {
diff --git a/org.eclipse.rse.services/.settings/.api_filters b/org.eclipse.rse.services/.settings/.api_filters
index c6225b0..62a43f1 100644
--- a/org.eclipse.rse.services/.settings/.api_filters
+++ b/org.eclipse.rse.services/.settings/.api_filters
@@ -1,34 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.rse.services" version="2">
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.ITerminalShell">
+ <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.AbstractTerminalService">
<filter id="305324134">
<message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalShell"/>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalService"/>
<message_argument value="org.eclipse.rse.services_3.1.0"/>
</message_arguments>
</filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.AbstractTerminalService">
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalService"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
</message_arguments>
</filter>
</resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.ITerminalService">
+ <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.AbstractTerminalShell">
<filter id="305324134">
<message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalService"/>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalShell"/>
<message_argument value="org.eclipse.rse.services_3.1.0"/>
</message_arguments>
</filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.AbstractTerminalShell">
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
</message_arguments>
</filter>
</resource>
@@ -36,14 +32,12 @@
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.rse.internal.services.terminals.BaseShellDecorator"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
</message_arguments>
</filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator">
<filter id="305324134">
<message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator"/>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.BaseShellDecorator"/>
<message_argument value="org.eclipse.rse.services_3.1.0"/>
</message_arguments>
</filter>
@@ -52,6 +46,54 @@
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.rse.internal.services.terminals.IBaseShell"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
+ </message_arguments>
+ </filter>
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.IBaseShell"/>
+ <message_argument value="org.eclipse.rse.services_3.1.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.ITerminalService">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalService"/>
+ <message_argument value="org.eclipse.rse.services_3.1.0"/>
+ </message_arguments>
+ </filter>
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalService"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.ITerminalShell">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalShell"/>
+ <message_argument value="org.eclipse.rse.services_3.1.0"/>
+ </message_arguments>
+ </filter>
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalShell"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
+ </message_arguments>
+ </filter>
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator"/>
<message_argument value="org.eclipse.rse.services_3.1.0"/>
</message_arguments>
</filter>
@@ -60,6 +102,12 @@
<filter id="305365105">
<message_arguments>
<message_argument value="org.eclipse.rse.internal.services.terminals.ProcessBaseShell"/>
+ <message_argument value="org.eclipse.rse.services_3.1.1"/>
+ </message_arguments>
+ </filter>
+ <filter id="305365105">
+ <message_arguments>
+ <message_argument value="org.eclipse.rse.internal.services.terminals.ProcessBaseShell"/>
<message_argument value="org.eclipse.rse.services_3.1.0"/>
</message_arguments>
</filter>
diff --git a/org.eclipse.rse.services/META-INF/MANIFEST.MF b/org.eclipse.rse.services/META-INF/MANIFEST.MF
index 051683d..52a5a06 100644
--- a/org.eclipse.rse.services/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.services/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.services;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.services.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java
index 87c59cd..549ed71 100644
--- a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java
+++ b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
+ * 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
@@ -18,6 +18,7 @@
* Martin Oberhuber (Wind River) - Fix 183991 - handle windows C:/ paths for FTP
* Martin Oberhuber (Wind River) - [246710] Fix quoting backslashes in UNIX shells
* Martin Oberhuber (Wind River) - [164110] Fix quoting single-quotes in UNIX shells
+ * Martin Oberhuber (Wind River) - [285945] Fix quoting ! and " characters
********************************************************************************/
package org.eclipse.rse.services.clientserver;
@@ -229,6 +230,7 @@ public class PathUtility
case '\\':
case '\'':
case '`':
+ case '"':
//Need to treat specially to work in both bash and tcsh:
//close the quote, insert quoted $, reopen the quote
buf.append('"');
@@ -236,8 +238,8 @@ public class PathUtility
buf.append(c);
buf.append('"');
break;
- case '"':
case '\n':
+ case '!':
//just quote it. The newline will work in tcsh only -
//bash replaces it by the empty string. But newlines
//in filenames are an academic issue, hopefully.
diff --git a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java
index 005d892..5ff5c5f 100644
--- a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java
+++ b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java
@@ -55,6 +55,13 @@ public class SystemNetworkIOException extends SystemRemoteMessageException {
String message = remoteException.getMessage();
if (message == null) {
message = remoteException.getClass().getName();
+ } else {
+ // TODO Most remote messages like IOException don't have a message
+ // that's understandable without the class type. For full translated
+ // messages, code like in the Eclipse Team/CVS provider would need
+ // to translate into readable messages. See also
+ // o.e.tm.terminal.ssh/SshMessages#getMessageFor(Throwable).
+ message = remoteException.getClass().getName() + ": " + message; //$NON-NLS-1$
}
String msgTxt = NLS.bind(CommonMessages.MSG_COMM_NETWORK_ERROR, message);
diff --git a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java
index 13579be..7a5a24f 100644
--- a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java
+++ b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * 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
@@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David McKnight (IBM) - [175293] [dstore] Processes do not work on Dstore-UNIX connection to Solaris
*******************************************************************************/
package org.eclipse.rse.services.clientserver.processes.handlers;
@@ -40,10 +40,13 @@ public class ProcessHandlerManager
public ProcessHandler getNewProcessHandler()
{
String osName = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
+
if (osName.startsWith("linux")) return new UniversalLinuxProcessHandler(); //$NON-NLS-1$
else if (osName.startsWith("aix")) return new UniversalAIXProcessHandler(); //$NON-NLS-1$
else if (osName.startsWith("z/os")) return new UniversalZOSProcessHandler(); //$NON-NLS-1$
else if (osName.startsWith("mac os x")) return new UniversalMacOSXProcessHandler(); //$NON-NLS-1$
- else return null;
+ else if (osName.startsWith("sun")) return new UniversalSolarisProcessHandler(); //$NON-NLS-1$
+ return null;
+
}
}
diff --git a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalSolarisProcessHandler.java
similarity index 56%
copy from org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java
copy to org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalSolarisProcessHandler.java
index ee42b10..bd9cf2d 100644
--- a/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java
+++ b/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalSolarisProcessHandler.java
@@ -1,20 +1,16 @@
-/*******************************************************************************
- * 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
+/********************************************************************************
+ * 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, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
+ * component that contains this file: David McKnight.
+ *
* Contributors:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
+ * David McKnight (IBM) - [175293] [dstore] Processes do not work on Dstore-UNIX connection to Solaris
+ ********************************************************************************/
package org.eclipse.rse.services.clientserver.processes.handlers;
import java.io.BufferedReader;
@@ -23,39 +19,40 @@ import java.util.HashMap;
import java.util.SortedSet;
import java.util.TreeSet;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
+import org.eclipse.rse.services.clientserver.processes.IHostProcess;
+import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
+/**
+ * ProcessHandler implementation for Solaris. This is part of internal
+ * implementation, and should not be used by clients directly. Use
+ * {@link ProcessHandlerManager#getNewProcessHandler()} on a Solaris system
+ * instead.
+ *
+ * @since 3.1 (actually 3.1.1)
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class UniversalSolarisProcessHandler extends UniversalAIXProcessHandler {
-public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
-{
- private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","state"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","s"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
private static final String firstColumnHeader = "PID"; //$NON-NLS-1$
- private HashMap stateMap;
-
- /**
- * Creates a new ProcessHandler for z/OS platforms.
- */
- public UniversalZOSProcessHandler()
- {
- super();
- stateMap = new HashMap();
- for (int i = ISystemProcessRemoteConstants.STATE_ZOS_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ZOS_ENDING_INDEX; i++)
- {
- stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
- }
+
+
+ public IHostProcess kill(IHostProcess process, String type)
+ throws Exception {
+ return super.kill(process, type);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandler#lookupProcesses
*/
- public SortedSet lookupProcesses(HostProcessFilterImpl rpfs)
+ public SortedSet lookupProcesses(IHostProcessFilter rpfs)
throws Exception
{
SortedSet results = new TreeSet(new ProcessComparator());
-
- // create the remote command with the AIX specific attributes
- String cmdLine = "ps -A -o "; //$NON-NLS-1$
+
+ // create the remote command with the UNIX specific attributes
+ String cmdLine = "/usr/bin/ps -A -o "; //$NON-NLS-1$
for (int i = 0; i < processAttributes.length; i++)
{
cmdLine = cmdLine + processAttributes[i];
@@ -79,59 +76,59 @@ public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
nextLine = reader.readLine();
continue;
}
-
+
String pid = (String) psLineContents.get("pid"); //$NON-NLS-1$
statusLine = pid + "|"; //$NON-NLS-1$
-
+
// add the name to the status string
String name = (String) psLineContents.get("comm"); //$NON-NLS-1$
if (name == null) name = " "; //$NON-NLS-1$
statusLine = statusLine + name + "|"; //$NON-NLS-1$
-
+
// add the status letter to the status string
- String state = (String) psLineContents.get("state"); //$NON-NLS-1$
+ String state = (String) psLineContents.get("s"); //$NON-NLS-1$
if (state == null) state = " "; //$NON-NLS-1$
String stateCode = convertToStateCode(state);
statusLine = statusLine + stateCode + "|"; //$NON-NLS-1$
-
+
// add the Tgid
String tgid = (String) psLineContents.get("tgid"); //$NON-NLS-1$
if (tgid == null) tgid = " "; //$NON-NLS-1$
statusLine = statusLine + tgid + "|"; //$NON-NLS-1$
-
+
// add the Ppid
String pPid = (String) psLineContents.get("ppid"); //$NON-NLS-1$
if (pPid == null) pPid = " "; //$NON-NLS-1$
statusLine = statusLine + pPid + "|"; //$NON-NLS-1$
-
+
// add the TracerPid
String tracerpid = (String) psLineContents.get("tracerpid"); //$NON-NLS-1$
if (tracerpid == null) tracerpid = " "; //$NON-NLS-1$
statusLine = statusLine + tracerpid + "|"; //$NON-NLS-1$
-
+
String uid = (String) psLineContents.get("uid"); //$NON-NLS-1$
if (uid == null) uid = " "; //$NON-NLS-1$
statusLine = statusLine + uid + "|"; // add the uid to the status string //$NON-NLS-1$
-
+
String username = (String) psLineContents.get("user"); //$NON-NLS-1$
if (username == null) username = " "; //$NON-NLS-1$
statusLine = statusLine + username + "|"; // add the username to the status string //$NON-NLS-1$
-
+
// add the gid to the status string
String gid = (String) psLineContents.get("gid"); //$NON-NLS-1$
if (gid == null) gid = " "; //$NON-NLS-1$
statusLine = statusLine + gid + "|"; //$NON-NLS-1$
-
+
// add the VmSize to the status string
String vmsize = (String) psLineContents.get("vsz"); //$NON-NLS-1$
if (vmsize == null) vmsize = " "; //$NON-NLS-1$
statusLine = statusLine + vmsize +"|"; //$NON-NLS-1$
-
+
// add a dummy vmrss to the status string
// vmRss is not available on ZOS
String vmrss = " "; //$NON-NLS-1$
statusLine = statusLine + vmrss;
-
+
if (rpfs.allows(statusLine))
{
UniversalServerProcessImpl usp = new UniversalServerProcessImpl(statusLine);
@@ -145,44 +142,4 @@ public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
return results;
}
- /**
- * Parses one line of output from the ps command - placing the contents into
- * a hashmap, where the keys are the names of process attributes and the values
- * are the attribute values
- * @param nextLine a line of output from the ps command
- * @return a map of names-values of process attributes
- */
- protected HashMap getPSOutput(String nextLine)
- {
- HashMap contents = new HashMap();
- String[] values = nextLine.trim().split("\\s+"); //$NON-NLS-1$
- if (values == null || values.length < processAttributes.length) return null;
- for (int i = 0; i < processAttributes.length; i++)
- {
- contents.put(processAttributes[i], values[i]);
- }
- return contents;
- }
-
- /**
- * Return the unique state code assocated with the state given by
- * the ps listing on the z/OS machine.
- */
- protected String convertToStateCode(String state)
- {
- String stateCode = " "; //$NON-NLS-1$
- if (state == null) return stateCode;
- if (state.trim().equals("")) return stateCode; //$NON-NLS-1$
- for (int i = 0; i < state.length(); i++)
- {
- String nextState = (String) stateMap.get(new Character(state.charAt(i)));
- if (nextState != null)
- {
- stateCode = stateCode + nextState;
- if (i < state.length() - 1) stateCode = stateCode + ","; //$NON-NLS-1$
- }
- }
- if (stateCode.trim().equals("")) return " "; //$NON-NLS-1$ //$NON-NLS-2$
- else return stateCode.trim();
- }
}
diff --git a/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java b/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
index 43bf48c..3f8b4e5 100644
--- a/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
+++ b/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * 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
@@ -27,6 +27,7 @@
* Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
* David Dykstal (IBM) - [221211] fix IFileService API for batch operations
* Martin Oberhuber (Wind River) - [221211] Fix progress monitor and cancellation for multi operations
+ * Martin Oberhuber (Wind River) - [274568] Dont use SftpMonitor for Streams transfer
*******************************************************************************/
package org.eclipse.rse.services.files;
@@ -254,17 +255,19 @@ public abstract class AbstractFileService extends AbstractService implements IFi
}
/**
- * The default implementation returns <code>null</code>. Clients can override to return an input stream to the file.
- * @see org.eclipse.rse.services.files.IFileService#getInputStream(String, String, boolean, IProgressMonitor)
+ * {@inheritDoc} The default implementation returns <code>null</code>.
+ * Clients can override to return an input stream to the file.
+ *
+ * @see org.eclipse.rse.services.files.IFileService#getInputStream(String,
+ * String, boolean, IProgressMonitor)
*/
public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
return null;
}
/**
- * Gets the output stream to write/append to a remote file. The default
- * implementation returns <code>null</code>. Clients can override to
- * return an output stream to the file.
+ * {@inheritDoc} The default implementation returns <code>null</code>.
+ * Clients can override to return an output stream to the file.
*
* @deprecated use
* {@link #getOutputStream(String, String, int, IProgressMonitor)}
@@ -275,9 +278,8 @@ public abstract class AbstractFileService extends AbstractService implements IFi
}
/**
- * Gets the output stream to write/append to a remote file. The default
- * implementation returns <code>null</code>. Clients can override to return
- * an output stream to the file.
+ * {@inheritDoc} The default implementation returns <code>null</code>.
+ * Clients can override to return an output stream to the file.
*
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(String,
* String, int, IProgressMonitor)
diff --git a/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java b/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
index 4a79fa3..cab7f5d 100644
--- a/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
+++ b/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * 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
@@ -27,6 +27,8 @@
* David Dykstal (IBM) - [221211] fix IFileService API for batch operations
* Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
* Martin Oberhuber (Wind River) - [234026] Clarify IFileService#createFolder() Javadocs
+ * Martin Oberhuber (Wind River) - [274568] Dont use SftpMonitor for Streams transfer
+ * Martin Oberhuber (Wind River) - [285942][api] Throw exception if list() on a non-folder
*******************************************************************************/
package org.eclipse.rse.services.files;
@@ -261,7 +263,6 @@ public interface IFileService extends IService
*/
public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor) throws SystemMessageException;
-
/**
* List the contents of a remote folder.
*
@@ -275,7 +276,9 @@ public interface IFileService extends IService
* @param monitor the monitor for this potentially long running operation
* @return the list of host files.
* @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
+ * be one of those in the RemoteFileException family. Exceptions
+ * are particularly expected when the remoteParent does not
+ * exist, or is not a folder.
*
* @since org.eclipse.rse.services 3.0
*/
@@ -303,9 +306,11 @@ public interface IFileService extends IService
/**
* List the contents of multiple remote folders.
* <p>
- * If an error occurs during the retrieval of the contents of a folder, this operation stops on that folder and a {@link SystemMessageException} is thrown.
- * Items retrieved before that folder will be returned. Items in folders after that folder will not be retrieved.
- * The items in the folder on which the error occurs will not be returned.
+ * If an error occurs during the retrieval of the contents of a folder, this
+ * operation stops on that folder and a {@link SystemMessageException} is
+ * thrown. Items retrieved before that folder will be returned. Items in
+ * folders after that folder will not be retrieved. The items in the folder
+ * on which the error occurs will not be returned.
*
* @param remoteParents - the names of the parent directories on the remote
* file system from which to retrieve the collective child list.
@@ -318,10 +323,13 @@ public interface IFileService extends IService
* some other type. For each remoteParent, there must be a
* corresponding fileType. For the default list of available file
* types see <code>IFileServiceContants</code>
- * @param hostFiles a list to which the found {@link IHostFile} objects will be appended
+ * @param hostFiles a list to which the found {@link IHostFile} objects will
+ * be appended
* @param monitor the monitor for this potentially long running operation
* @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
+ * be one of those in the RemoteFileException family. Exceptions
+ * are particularly expected when a remoteParent does not exist,
+ * or is not a folder.
*
* @since org.eclipse.rse.services 3.0
*/
@@ -330,10 +338,12 @@ public interface IFileService extends IService
/**
* List the contents of multiple remote folders.
* <p>
- * If an error occurs during the retrieval of the contents of a folder, this operation stops on that folder and a {@link SystemMessageException} is thrown.
- * Items retrieved before that folder will be returned. Items in folders after that folder will not be retrieved.
- * The items in the folder on which the error occurs will not be returned.
- *
+ * If an error occurs during the retrieval of the contents of a folder, this
+ * operation stops on that folder and a {@link SystemMessageException} is
+ * thrown. Items retrieved before that folder will be returned. Items in
+ * folders after that folder will not be retrieved. The items in the folder
+ * on which the error occurs will not be returned.
+ *
* @param remoteParents - the names of the parent directories on the remote
* file system from which to retrieve the collective child list.
* @param fileFilters - a set of strings that can be used to filter the
@@ -345,11 +355,14 @@ public interface IFileService extends IService
* other type. All results will be of the specified type. For the
* default list of available file types see
* <code>IFileServiceContants</code>
- * @param hostFiles a list to which the found {@link IHostFile} objects will be appended
+ * @param hostFiles a list to which the found {@link IHostFile} objects will
+ * be appended
* @param monitor the monitor for this potentially long running operation
* @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
+ * be one of those in the RemoteFileException family. Exceptions
+ * are particularly expected when a remoteParent does not exist,
+ * or is not a folder.
+ *
* @since org.eclipse.rse.services 3.0
*/
public void listMultiple(String[] remoteParents, String[] fileFilters, int fileType, List hostFiles, IProgressMonitor monitor) throws SystemMessageException;
@@ -583,7 +596,9 @@ public interface IFileService extends IService
* @param remoteFile the name of the remote file.
* @param isBinary <code>true</code> if the file is a binary file,
* <code>false</code> otherwise.
- * @param monitor the progress monitor.
+ * @param monitor the progress monitor. Only used for the process of opening
+ * the Stream. Implementations are not expected to use or update
+ * the monitor for actual Stream transfer operations.
* @return the input stream to access the contents of the remote file.
* @throws SystemMessageException if an error occurs.
* @since org.eclipse.rse.services 2.0
@@ -598,7 +613,9 @@ public interface IFileService extends IService
* @param remoteFile the name of the remote file.
* @param isBinary <code>true</code> if the file is a binary file,
* <code>false</code> otherwise.
- * @param monitor the progress monitor.
+ * @param monitor the progress monitor. Only used for the process of opening
+ * the Stream. Implementations are not expected to use or update
+ * the monitor for actual Stream transfer operations.
* @return the input stream to access the contents of the remote file.
* @throws SystemMessageException if an error occurs.
* @since org.eclipse.rse.services 2.0
@@ -617,7 +634,9 @@ public interface IFileService extends IService
* @param options bit wise or of option constants. Valid constants are
* {@link IFileService#APPEND}, {@link IFileService#TEXT_MODE},
* and {@link IFileService#NONE}
- * @param monitor the progress monitor.
+ * @param monitor the progress monitor. Only used for the process of opening
+ * the Stream. Implementations are not expected to use or update
+ * the monitor for actual Stream transfer operations.
* @return the input stream to access the contents of the remote file.
* @throws SystemMessageException if an error occurs.
* @since org.eclipse.rse.services 3.0
diff --git a/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java b/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
index 94ff44e..046d770 100644
--- a/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
+++ b/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
@@ -13,11 +13,18 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [226374] [api] Need default SystemMessageException specialisations
+ * Martin Oberhuber (Wind River) - [286129][api] RemoteFileException(String) violates API contract
*******************************************************************************/
package org.eclipse.rse.services.files;
import java.util.ResourceBundle;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.osgi.util.NLS;
+
+import org.eclipse.rse.internal.services.Activator;
+import org.eclipse.rse.internal.services.RSEServicesMessages;
+import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemRemoteMessageException;
@@ -46,21 +53,32 @@ public class RemoteFileException extends SystemRemoteMessageException
private static final long serialVersionUID = 1L;
/**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
+ * Constructor for RemoteFileException with an error message for
+ * getMessage() to return.
+ *
* @param bundle The ResourceBundle containing the error message
* @param key The key to retrieve the message
+ * @deprecated this constructor violates the contract that all
+ * RemoteFileException instances must have an embedded remote
+ * exception for {@link #getRemoteException()} to return
*/
public RemoteFileException(ResourceBundle bundle, String key)
{
- this(getString(bundle,key), null);
+ this(getString(bundle, key));
}
+
/**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
+ * Constructor for RemoteFileException with an error message for
+ * getMessage() to return.
+ *
* @param msg The fully resolved message
+ * @deprecated this constructor violates the contract that all
+ * RemoteFileException instances must have an embedded remote
+ * exception for {@link #getRemoteException()} to return
*/
public RemoteFileException(String msg)
{
- this(msg, null);
+ this(msg, new Exception(msg));
}
/**
* Constructor for RemoteFileException with an error message for getMessage() to return,
@@ -82,15 +100,28 @@ public class RemoteFileException extends SystemRemoteMessageException
public RemoteFileException(String msg, Exception remoteException)
{
super(msg, remoteException);
+ String msgTxt = RSEServicesMessages.FILEMSG_OPERATION_FAILED;
+ if (remoteException != null && remoteException.getMessage() != null && !remoteException.getMessage().equals(msg)) {
+ msg = (msg == null) ? remoteException.getMessage() : msg + ": " + remoteException.getMessage();
+ }
+ String msgDetails = NLS.bind(RSEServicesMessages.FILEMSG_OPERATION_FAILED_DETAILS, msg);
+ SystemMessage myMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, "RSEF1002", //$NON-NLS-1$
+ IStatus.ERROR, msgTxt, msgDetails);
+ setSystemMessage(myMessage);
}
/**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
+ * Constructor for RemoteFileException with an error message for
+ * getMessage() to return.
+ *
* @param msg The fully resolved message
+ * @deprecated this constructor violates the contract that all
+ * RemoteFileException instances must have an embedded remote
+ * exception for {@link #getRemoteException()} to return
*/
public RemoteFileException(SystemMessage msg)
{
- this(msg, null);
+ this(msg, new Exception(msg.getLevelOneText()));
}
/**
* Constructor for RemoteFileException with an error message for getMessage() to return.
diff --git a/org.eclipse.rse.ssh-feature/feature.xml b/org.eclipse.rse.ssh-feature/feature.xml
index da7027b..1db1d4d 100644
--- a/org.eclipse.rse.ssh-feature/feature.xml
+++ b/org.eclipse.rse.ssh-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.ssh"
label="%featureName"
- version="3.0.0.qualifier"
+ version="3.0.1.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.services.ssh">
diff --git a/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF b/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF
index 73022b0..56f2512 100644
--- a/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.subsystems.files.core;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.subsystems.files.core.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
index 23cf86a..7cd3493 100644
--- a/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
+++ b/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
@@ -40,7 +40,7 @@
* David Dykstal (IBM) - [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
* Martin Oberhuber (Wind River) - [234038] Mark IRemoteFile stale when changing permissions
* Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
- * David McKnight (IBM) - [223461] [Refresh][api] Refresh expanded folder under filter refreshes Filter
+ * David McKnight (IBM) - [233461] [Refresh][api] Refresh expanded folder under filter refreshes Filter
* Martin Oberhuber (Wind River) - [240704] Protect against illegal API use of getRemoteFileObject() with relative path as name
* Martin Oberhuber (Wind River) - [234026] Clarify IFileService#createFolder() Javadocs
* David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
@@ -568,7 +568,7 @@ public class FileServiceSubSystem extends RemoteFileSubSystem implements IFileSe
// query children of the parent
IHostFile[] results = internalList(parentPath, fileNameFilter, fileType, monitor);
- // update the parent with it's latest properties
+ // Bug 233461: update the parent with it's latest properties
// null is passed for the second argument because we currently don't get the parent in our results query
updateRemoteFile(parent, null, monitor);
@@ -1012,19 +1012,19 @@ public class FileServiceSubSystem extends RemoteFileSubSystem implements IFileSe
String newPath = srcParent + folderOrFile.getSeparator() + newName;
String originalEncoding = folderOrFile.getEncoding();
-
+
service.rename(srcParent, oldName, newName, monitor);
folderOrFile.getHostFile().renameTo(newPath);
-
+
// for bug 244041 - need to set encoding to be the same as the original file
RemoteFileEncodingManager mgr = RemoteFileEncodingManager.getInstance();
String renamedEncoding = folderOrFile.getEncoding();
if (!renamedEncoding.equals(originalEncoding)){
mgr.setEncoding(getHostName(), newPath, originalEncoding);
- }
-
-
-
+ }
+
+
+
}
/**
@@ -1039,22 +1039,22 @@ public class FileServiceSubSystem extends RemoteFileSubSystem implements IFileSe
String tgtParent = targetFolder.getAbsolutePath();
removeCachedRemoteFile(sourceFolderOrFile);
- String newPath = tgtParent + targetFolder.getSeparator() + newName;
+ String newPath = tgtParent + targetFolder.getSeparator() + newName;
String originalEncoding = sourceFolderOrFile.getEncoding();
-
+
try {
service.move(srcParent, srcName, tgtParent, newName, monitor);
} finally {
sourceFolderOrFile.markStale(true);
targetFolder.markStale(true);
}
-
+
// for bug 244041 - need to set encoding to be the same as the original file
RemoteFileEncodingManager mgr = RemoteFileEncodingManager.getInstance();
- IRemoteFile movedFile = getRemoteFileObject(targetFolder, newName, monitor);
- if (movedFile != null && !movedFile.getEncoding().equals(originalEncoding)){
+ IRemoteFile movedFile = getRemoteFileObject(targetFolder, newName, monitor);
+ if (movedFile != null && !movedFile.getEncoding().equals(originalEncoding)){
mgr.setEncoding(getHostName(), newPath, originalEncoding);
- }
+ }
}
/**
diff --git a/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java b/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
index 3215fbc..c3b81f1 100644
--- a/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
+++ b/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
@@ -21,6 +21,7 @@
* Martin Oberhuber (Wind River) - [219975] Fix implementations of clone()
* David McKnight (IBM) - [231209] [api][breaking] IRemoteFile.getSystemConnection() should be changed to IRemoteFile.getHost()
* David McKnight (IBM) - [277911] cached results of remote file query need to be sorted
+ * David McKnight (IBM) - [289387] Remote Search does not return line nodes in result tree
*******************************************************************************/
package org.eclipse.rse.subsystems.files.core.subsystems;
@@ -784,7 +785,13 @@ public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable
results = calculatedResults.toArray();
}
- Arrays.sort(results);
+ if (!isFile()){
+ try { // search results aren't comparable so we need to catch exception
+ Arrays.sort(results);
+ }
+ catch (Exception e){
+ }
+ }
return results;
}
diff --git a/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF b/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF
index d68e910..ca2f7ae 100644
--- a/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.subsystems.files.local;singleton:=true
-Bundle-Version: 2.1.100.qualifier
+Bundle-Version: 2.1.101.qualifier
Bundle-Activator: org.eclipse.rse.internal.subsystems.files.local.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java b/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
index 71b5e36..bb61f72 100644
--- a/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
+++ b/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
+ * 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
@@ -16,6 +16,7 @@
* Kevin Doyle (IBM) - [199871] LocalFileService needs to implement getMessage()
* Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
* David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
+ * David McKnight (IBM) - [280605] SystemTextEditor.isLocal() returns false for LocalFileSubSystemConfiguration
********************************************************************************/
package org.eclipse.rse.subsystems.files.local;
@@ -257,4 +258,10 @@ public class LocalFileSubSystemConfiguration extends FileServiceSubSystemConfigu
{
return ILocalService.class;
}
+
+ public String getEditorProfileID()
+ {
+ return "universallocal"; //$NON-NLS-1$
+ }
+
}
\ No newline at end of file
diff --git a/org.eclipse.rse.subsystems.terminals.core/META-INF/MANIFEST.MF b/org.eclipse.rse.subsystems.terminals.core/META-INF/MANIFEST.MF
index 81d2e84..7dd7659 100644
--- a/org.eclipse.rse.subsystems.terminals.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.subsystems.terminals.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.subsystems.terminals.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
diff --git a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java
index fc8238a..481b609 100644
--- a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java
+++ b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java
@@ -1,13 +1,14 @@
/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, Inc.
+ * Copyright (c) 2008, 2009 MontaVista Software, Inc.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
+ * Yu-Fen Kuo (MontaVista) - initial API and implementation
+ * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
* Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
+ * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
********************************************************************************/
package org.eclipse.rse.subsystems.terminals.core;
@@ -17,12 +18,6 @@ import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
/**
* Specialized interface for remote terminal subsystems.
*
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
*/
public interface ITerminalServiceSubSystem extends ISubSystem {
public void addChild(TerminalElement element);
diff --git a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java
index 9f029a7..4e413e4 100644
--- a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java
+++ b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java
@@ -1,11 +1,12 @@
/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, Inc.
+ * Copyright (c) 2008, 2009 MontaVista Software, Inc.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
+ * Yu-Fen Kuo (MontaVista) - initial API and implementation
+ * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
********************************************************************************/
package org.eclipse.rse.subsystems.terminals.core;
@@ -18,12 +19,6 @@ import org.eclipse.rse.services.terminals.ITerminalService;
* An interface representing factories for creating TerminalServiceSubSystem
* objects.
*
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
*/
public interface ITerminalServiceSubSystemConfiguration extends
ISubSystemConfiguration {
diff --git a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java
index f791a1f..a5a0002 100644
--- a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java
+++ b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java
@@ -13,6 +13,7 @@
* Anna Dushistova (MontaVista) - [227569] [rseterminal][api] Provide a "generic" Terminal subsystem
* Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
* David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
+ * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
********************************************************************************/
package org.eclipse.rse.subsystems.terminals.core;
@@ -39,13 +40,8 @@ import org.eclipse.swt.widgets.Display;
/**
* A Subsystem that has terminal instances as children.
*
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
*/
+
public class TerminalServiceSubSystem extends SubSystem implements
ITerminalServiceSubSystem, ICommunicationsListener {
diff --git a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java
index 655d0c0..0465c55 100644
--- a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java
+++ b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java
@@ -7,6 +7,7 @@
* Contributors:
* Yu-Fen Kuo (MontaVista) - initial API and implementation
* Anna Dushistova (MontaVista) - [227569] [rseterminal][api] Provide a "generic" Terminal subsystem
+ * Anna Dushistova (MontaVista) - [240530] [rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
********************************************************************************/
package org.eclipse.rse.subsystems.terminals.core;
@@ -23,13 +24,7 @@ import org.eclipse.rse.services.terminals.ITerminalService;
* The implementation of the ITerminalServiceSubSystemConfiguration interface
* contains information about what features the subsystem supports, and creates
* TerminalServiceSubSystem instances.
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
+ *
*/
public abstract class TerminalServiceSubSystemConfiguration extends
SubSystemConfiguration implements
diff --git a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java
index 61ffb12..983053f 100644
--- a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java
+++ b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java
@@ -1,15 +1,16 @@
/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, Inc. and others.
+ * Copyright (c) 2008, 2009 MontaVista Software, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - initial API and implementation
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
+ * Yu-Fen Kuo (MontaVista) - initial API and implementation
+ * Anna Dushistova (MontaVista) - initial API and implementation
+ * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
* Martin Oberhuber (Wind River) - [228577] [rseterminal] Further cleanup
+ * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
********************************************************************************/
package org.eclipse.rse.subsystems.terminals.core.elements;
@@ -20,12 +21,6 @@ import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
/**
* An element in the RSE Tree that resembles a Terminal connection.
*
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
*/
public class TerminalElement extends AbstractResource {
private String name;
diff --git a/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/package.html b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/package.html
new file mode 100644
index 0000000..b6b516e
--- /dev/null
+++ b/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/package.html
@@ -0,0 +1,14 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="Author" content="Anna Dushistova (MontaVista)">
+ <title>Package-level Javadoc</title>
+</head>
+<body>
+Application programming interface for creating customized terminal subsystems.
+<h2>
+Package Specification</h2>
+This package contains supporting classes for RSE Terminal Integration.
+</body>
+</html>
diff --git a/org.eclipse.rse.subsystems.terminals.ssh/META-INF/MANIFEST.MF b/org.eclipse.rse.subsystems.terminals.ssh/META-INF/MANIFEST.MF
index adeeb14..83690d4 100644
--- a/org.eclipse.rse.subsystems.terminals.ssh/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.subsystems.terminals.ssh/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.subsystems.terminals.ssh;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
diff --git a/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java b/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java
index 3d91192..7a4ff70 100644
--- a/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java
+++ b/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java
@@ -1,12 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2008 MontaVista Software, Inc.
+ * Copyright (c) 2008, 2009 MontaVista Software, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Yu-Fen Kuo (MontaVista)- initial API and implementation
+ * Yu-Fen Kuo (MontaVista) - initial API and implementation
+ * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
*******************************************************************************/
package org.eclipse.rse.subsystems.terminals.ssh;
@@ -25,12 +26,6 @@ import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystemConfigu
/**
* An SSH Terminal Subsystem Factory.
*
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
*/
public class SshTerminalSubSystemConfiguration extends
TerminalServiceSubSystemConfiguration {
diff --git a/org.eclipse.rse.telnet-feature/feature.xml b/org.eclipse.rse.telnet-feature/feature.xml
index daae98e..a280a7f 100644
--- a/org.eclipse.rse.telnet-feature/feature.xml
+++ b/org.eclipse.rse.telnet-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.telnet"
label="%featureName"
- version="2.2.0.qualifier"
+ version="2.2.1.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.services.telnet">
diff --git a/org.eclipse.rse.terminals-feature/feature.xml b/org.eclipse.rse.terminals-feature/feature.xml
index 96ad85d..dfed25f 100644
--- a/org.eclipse.rse.terminals-feature/feature.xml
+++ b/org.eclipse.rse.terminals-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.terminals"
label="%featureName"
- version="1.0.0.qualifier"
+ version="1.0.2.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.terminals.ui"
image="eclipse_update_120.jpg">
@@ -49,7 +49,6 @@
<import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
<import plugin="org.eclipse.rse.ui" version="3.1.0" match="compatible"/>
<import plugin="org.eclipse.rse.connectorservice.ssh" version="2.1.0" match="compatible"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.rse.terminals.ui/.settings/.api_filters b/org.eclipse.rse.terminals.ui/.settings/.api_filters
new file mode 100644
index 0000000..d000db6
--- /dev/null
+++ b/org.eclipse.rse.terminals.ui/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.rse.terminals.ui" version="2">
+ <resource path="src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java" type="org.eclipse.rse.internal.terminals.ui.views.RSETerminalConnector">
+ <filter id="574619656">
+ <message_arguments>
+ <message_argument value="ITerminalConnector"/>
+ <message_argument value="RSETerminalConnector"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF b/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF
index b49de54..c08201d 100644
--- a/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.terminals.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.eclipse.rse.internal.terminals.ui.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.expressions,
@@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
org.eclipse.rse.ui;bundle-version="[3.1.0,4.0.0)",
org.eclipse.rse.subsystems.terminals.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)"
+ org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)"
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-Vendor: %providerName
diff --git a/org.eclipse.rse.terminals.ui/plugin.xml b/org.eclipse.rse.terminals.ui/plugin.xml
index 8896ae6..9fd7e00 100644
--- a/org.eclipse.rse.terminals.ui/plugin.xml
+++ b/org.eclipse.rse.terminals.ui/plugin.xml
@@ -20,6 +20,7 @@ Anna Dushistova (MontaVista) - [235934] Launch Shell/Terminal commands enabled
Anna Dushistova (MontaVista) - [251492] Launch Shell Action is enabled in Offline mode
Kevin Doyle (IBM) - [249320] Launch Shell action not available in Remote System Details/Monitor views
Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
+Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
-->
<?eclipse version="3.2"?>
<plugin>
diff --git a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java
index 6e1f991..4d09519 100644
--- a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java
+++ b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java
@@ -8,6 +8,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [235626] initial API and implementation
* Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views
+ * Zhou Renjian (Kortide) - [282256] "null:..." status message for launched terminal
*******************************************************************************/
package org.eclipse.rse.internal.terminals.ui;
@@ -26,8 +27,17 @@ public class TerminalUIResources extends NLS {
public static String TerminalViewer_text;
+ public static String TerminalViewElementAdapter_type;
+
static {
NLS.initializeMessages(BUNDLE_NAME, TerminalUIResources.class);
+ // FIXME Workaround for NLS added in TM 3.1.1 where some translations
+ // may no longer be possible. Fallback to hardcoded text in case the NLS
+ // can not be found.
+ // May be removed in TM 3.2 when a new NLS translation cycle starts.
+ if (TerminalViewElementAdapter_type.startsWith("NLS missing message: ")) { //$NON-NLS-1$
+ TerminalViewElementAdapter_type = "Terminal"; //$NON-NLS-1$
+ }
}
}
diff --git a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties
index 377e869..68ad213 100644
--- a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties
+++ b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties
@@ -9,6 +9,7 @@
# Yu-Fen Kuo (MontaVista) - initial API and implementation
# Martin Oberhuber (Wind River) - [235626] Convert terminals.ui to MessageBundle format
# Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views
+# Zhou Renjian (Kortide) - [282256] "null:..." status message for launched terminal
################################################################################
# NLS_MESSAGEFORMAT_VAR
@@ -21,3 +22,5 @@ ShowInTerminalViewAction_tooltip=Show current terminal in Terminals view
TerminalsUI_cannotOpenView_error=Can not open remote terminals view
TerminalViewer_text=To open a terminal, right-click the Terminal subsystem under the target. Then select 'Launch Terminal' from the context menu.
+
+TerminalViewElementAdapter_type=Terminal
diff --git a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java
index 8ec8dff..03ed679 100644
--- a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java
+++ b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java
@@ -1,11 +1,12 @@
/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, Inc.
+ * Copyright (c) 2008, 2009 MontaVista Software, Inc. and others
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Anna Dushistova (MontaVista) - initial API and implementation
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
********************************************************************************/
package org.eclipse.rse.internal.terminals.ui.views;
@@ -31,6 +32,10 @@ public class RSETerminalConnector extends RSETerminalConnectorImpl implements IT
return "rse_internal_connector";
}
+ public boolean isHidden() {
+ return true;
+ }
+
public boolean isInitialized() {
return true;
}
diff --git a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java
index cde0765..be36435 100644
--- a/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java
+++ b/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java
@@ -25,9 +25,10 @@
* David McKnight (IBM) - [189873] Improve remote shell editor open action with background jobs
* David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * Yu-Fen Kuo (MontaVista) - Adopted from SystemViewRemoteOutputAdapter
- * Anna Dushistova (MontaVista) - Adopted from SystemViewRemoteOutputAdapter
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
+ * Yu-Fen Kuo (MontaVista) - Adopted from SystemViewRemoteOutputAdapter
+ * Anna Dushistova (MontaVista) - Adopted from SystemViewRemoteOutputAdapter
+ * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
+ * Zhou Renjian (Kortide) - [282256] "null:..." status message for launched terminal
*******************************************************************************/
package org.eclipse.rse.internal.terminals.ui.views;
@@ -39,6 +40,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.internal.terminals.ui.Activator;
+import org.eclipse.rse.internal.terminals.ui.TerminalUIResources;
import org.eclipse.rse.internal.terminals.ui.actions.RemoveTerminalAction;
import org.eclipse.rse.internal.terminals.ui.actions.ShowInTerminalViewAction;
import org.eclipse.rse.services.terminals.ITerminalShell;
@@ -121,8 +123,7 @@ public class TerminalViewElementAdapter extends AbstractSystemViewAdapter
}
public String getType(Object element) {
- // TODO Auto-generated method stub
- return null;
+ return TerminalUIResources.TerminalViewElementAdapter_type;
}
public boolean hasChildren(IAdaptable element) {
diff --git a/org.eclipse.rse.tests-feature/feature.xml b/org.eclipse.rse.tests-feature/feature.xml
index c79f947..83ce051 100644
--- a/org.eclipse.rse.tests-feature/feature.xml
+++ b/org.eclipse.rse.tests-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.tests"
label="%featureName"
- version="3.1.0.qualifier"
+ version="3.1.1.qualifier"
provider-name="%providerName">
<description>
diff --git a/org.eclipse.rse.tests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.rse.tests/.settings/org.eclipse.core.resources.prefs
index 1eac112..418192e 100644
--- a/org.eclipse.rse.tests/.settings/org.eclipse.core.resources.prefs
+++ b/org.eclipse.rse.tests/.settings/org.eclipse.core.resources.prefs
@@ -1,6 +1,7 @@
-#Wed Mar 14 18:02:32 EDT 2007
+#Thu Aug 06 17:22:00 CEST 2009
eclipse.preferences.version=1
encoding//GVT/chs/test.txt=MS936
encoding//GVT/cht/test.txt=MS950
encoding//GVT/jpn/test.txt=MS932
encoding//GVT/kor/test.txt=MS949
+encoding/<project>=ISO-8859-1
diff --git a/org.eclipse.rse.tests/META-INF/MANIFEST.MF b/org.eclipse.rse.tests/META-INF/MANIFEST.MF
index 43c145e..ca32421 100644
--- a/org.eclipse.rse.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.tests;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.tests.RSETestsPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.rse.tests/plugin.xml b/org.eclipse.rse.tests/plugin.xml
index aeae0ce..b17c8b0 100644
--- a/org.eclipse.rse.tests/plugin.xml
+++ b/org.eclipse.rse.tests/plugin.xml
@@ -108,11 +108,18 @@
</systemType>
<systemType
description="Linux without shells subsystem"
- id="org.eclipse.rse.tests.sshTerminal"
+ id="org.eclipse.rse.tests.systemType.sshTerminal"
label="Ssh without shells"
name="Ssh without shells"
subsystemConfigurationIds="ssh.terminals;ssh.files;processes.shell.linux">
</systemType>
+ <systemType
+ description="FTP with SSH Shell"
+ id="org.eclipse.rse.tests.systemType.ftpSsh"
+ label="FTP with SSH shell"
+ name="FTP with SSH shell"
+ subsystemConfigurationIds="ssh.shells;ftp.files">
+ </systemType>
</extension>
<extension point="org.eclipse.rse.core.modelInitializers">
diff --git a/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java b/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java
index 2eeeae9..6e449bb 100644
--- a/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java
+++ b/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * 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:
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
* Uwe Stieber (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
+ * Martin Oberhuber (Wind River) - Support REXEC launch type for dstore
*******************************************************************************/
package org.eclipse.rse.tests.core.connection;
@@ -24,20 +25,24 @@ public interface IRSEConnectionProperties {
public final String ATTR_USERID = "userid"; //$NON-NLS-1$
public final String ATTR_PASSWORD = "password"; //$NON-NLS-1$
public final String ATTR_DAEMON_PORT = "daemon_port"; //$NON-NLS-1$
-
+ public final String ATTR_REXEC_PORT = "rexec_port"; //$NON-NLS-1$
+ public final String ATTR_SERVER_LAUNCH_TYPE = "launch_type"; //$NON-NLS-1$
+ public final String ATTR_SERVER_PATH = "dstore_server_path"; //$NON-NLS-1$
+ public final String ATTR_SERVER_SCRIPT = "dstore_server_script"; //$NON-NLS-1$
+
/**
* Returns the associated property stored under the specified key.
- *
+ *
* @param key The property key. Must be not <code>null</code>.
* @return The properties value or <code>null</code> if not set.
*/
public String getProperty(String key);
-
+
/**
* Set the property, given by the specified key, to the specified
* property value. If the specified value is <code>null</code>, the
* property will be removed.
- *
+ *
* @param key The property key. Must be not <code>null</code>.
* @param value The property value or <code>null</code>
*/
diff --git a/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java b/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
index 729a46d..82f3364 100644
--- a/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
+++ b/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * 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
@@ -16,6 +16,7 @@
* David Dykstal (IBM) - [217556] remove service subsystem types
* Martin Oberhuber (Wind River) - [219086] flush event queue to shield tests from each other
* David Dykstal (IBM) - [210474] Deny save password function missing
+ * Martin Oberhuber (Wind River) - Support REXEC launch type for dstore
*******************************************************************************/
package org.eclipse.rse.tests.internal;
@@ -32,7 +33,6 @@ import junit.framework.Assert;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.IRSEUserIdConstants;
import org.eclipse.rse.core.PasswordPersistenceManager;
@@ -47,6 +47,7 @@ import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+import org.eclipse.rse.core.subsystems.ServerLaunchType;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
@@ -54,8 +55,6 @@ import org.eclipse.rse.tests.RSETestsPlugin;
import org.eclipse.rse.tests.core.connection.IRSEConnectionManager;
import org.eclipse.rse.tests.core.connection.IRSEConnectionProperties;
import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.swt.widgets.Display;
import org.osgi.framework.Bundle;
@@ -82,13 +81,13 @@ public class RSEConnectionManager implements IRSEConnectionManager {
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.rse.tests.core.connection.IRSEConnectionManager#loadConnectionProperties(org.eclipse.core.runtime.IPath, boolean)
*/
public IRSEConnectionProperties loadConnectionProperties(IPath path, boolean allowDefaults) {
assert path != null;
-
+
Properties defaults = null;
if (allowDefaults && connectionDefaultsLocation != null
&& connectionDefaultsLocation.toFile().isFile()
@@ -105,11 +104,11 @@ public class RSEConnectionManager implements IRSEConnectionManager {
try { if (stream != null) stream.close(); } catch (IOException e) { /* ignored */ }
}
}
-
-
+
+
Properties properties = null;
if (path.toFile().isFile() && path.toFile().canRead()) {
- InputStream stream = null;
+ InputStream stream = null;
try {
stream = new FileInputStream(path.toFile());
properties = defaults != null ? new Properties(defaults) : new Properties();
@@ -122,7 +121,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
try { if (stream != null) stream.close(); } catch (IOException e) { /* ignored */ }
}
}
-
+
return properties != null ? new RSEConnectionProperties(properties) : (IRSEConnectionProperties)null;
}
@@ -131,7 +130,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
*/
public IRSEConnectionProperties loadConnectionProperties(Properties properties, boolean allowDefaults) {
assert properties != null;
-
+
Properties defaults = null;
if (allowDefaults && connectionDefaultsLocation != null
&& connectionDefaultsLocation.toFile().isFile()
@@ -148,7 +147,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
try { if (stream != null) stream.close(); } catch (IOException e) { /* ignored */ }
}
}
-
+
// Unfortunately, we cannot use the given properties directly (as
// we cannot associate the defaults). We must copy everything from
// the given properties object.
@@ -177,10 +176,10 @@ public class RSEConnectionManager implements IRSEConnectionManager {
*/
public void removeConnection(String profileName, String name) {
assert profileName != null && name != null;
-
+
ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
Assert.assertNotNull("FAILED(findOrCreateConnection): RSE system registry unavailable!", systemRegistry); //$NON-NLS-1$
-
+
ISystemProfile profile = systemRegistry.getSystemProfile(profileName);
if (profile != null) {
IHost connection = systemRegistry.getHost(profile, name);
@@ -196,7 +195,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
*/
public IHost findOrCreateConnection(IRSEConnectionProperties properties) {
assert properties != null;
-
+
IHost connection = null;
ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
@@ -204,7 +203,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
Exception exception = null;
String cause = null;
-
+
// First lookup and create the profile
String profileName = properties.getProperty(IRSEConnectionProperties.ATTR_PROFILE_NAME);
//Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid system profile name!", "unknown", profileName); //$NON-NLS-1$ //$NON-NLS-2$
@@ -220,47 +219,64 @@ public class RSEConnectionManager implements IRSEConnectionManager {
}
profileName = profile.getName();
Assert.assertNotNull("FAILED(findOrCreateConnection): Failed to find and/or create system profile '" + profileName + "'!", profile); //$NON-NLS-1$ //$NON-NLS-2$
-
+
String name = properties.getProperty(IRSEConnectionProperties.ATTR_NAME);
Assert.assertFalse("FAILED(findOrCreateConnection): Invalid host name!", "unknown".equals(name)); //$NON-NLS-1$ //$NON-NLS-2$
connection = systemRegistry.getHost(profile, name);
if (connection == null) {
- String userId = properties.getProperty(IRSEConnectionProperties.ATTR_USERID);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid user id name!", "unknown".equals(userId)); //$NON-NLS-1$ //$NON-NLS-2$
- String password = properties.getProperty(IRSEConnectionProperties.ATTR_PASSWORD);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid user password name!", "unknown".equals(password)); //$NON-NLS-1$ //$NON-NLS-2$
- String address = properties.getProperty(IRSEConnectionProperties.ATTR_ADDRESS);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid remote system ip address or dns name!", "unknown".equals(address)); //$NON-NLS-1$ //$NON-NLS-2$
- String systemTypeId = properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid system type!", "unknown".equals(systemTypeId)); //$NON-NLS-1$ //$NON-NLS-2$
- IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
- String daemonPort = properties.getProperty(IRSEConnectionProperties.ATTR_DAEMON_PORT);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid port!", "unknown".equals(daemonPort)); //$NON-NLS-1$ //$NON-NLS-2$
-
- exception = null;
- cause = null;
-
- try {
- connection = systemRegistry.createHost(profileName, systemType, name, address, null, userId, IRSEUserIdConstants.USERID_LOCATION_HOST, null);
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- Assert.assertNull("FAILED(findOrCreateConnection): Failed to create connection IHost object! Possible cause: " + cause, exception); //$NON-NLS-1$
+ String userId = properties.getProperty(IRSEConnectionProperties.ATTR_USERID);
+ Assert.assertFalse("FAILED(findOrCreateConnection): Invalid user id name!", "unknown".equals(userId)); //$NON-NLS-1$ //$NON-NLS-2$
+ String password = properties.getProperty(IRSEConnectionProperties.ATTR_PASSWORD);
+ Assert.assertFalse("FAILED(findOrCreateConnection): Invalid user password name!", "unknown".equals(password)); //$NON-NLS-1$ //$NON-NLS-2$
+ String address = properties.getProperty(IRSEConnectionProperties.ATTR_ADDRESS);
+ Assert.assertFalse("FAILED(findOrCreateConnection): Invalid remote system ip address or dns name!", "unknown".equals(address)); //$NON-NLS-1$ //$NON-NLS-2$
+ String systemTypeId = properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID);
+ Assert.assertFalse("FAILED(findOrCreateConnection): Invalid system type!", "unknown".equals(systemTypeId)); //$NON-NLS-1$ //$NON-NLS-2$
+ IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
+ String daemonPort = properties.getProperty(IRSEConnectionProperties.ATTR_DAEMON_PORT);
+ Assert.assertFalse("FAILED(findOrCreateConnection): Invalid port!", "unknown".equals(daemonPort)); //$NON-NLS-1$ //$NON-NLS-2$
+ String rexecPort = properties.getProperty(IRSEConnectionProperties.ATTR_REXEC_PORT);
+ String serverLaunchType = properties.getProperty(IRSEConnectionProperties.ATTR_SERVER_LAUNCH_TYPE);
+ String serverPath = properties.getProperty(IRSEConnectionProperties.ATTR_SERVER_PATH);
+ String serverScript = properties.getProperty(IRSEConnectionProperties.ATTR_SERVER_SCRIPT);
- if (userId != null && password != null) {
- SystemSignonInformation info = new SystemSignonInformation(address, userId, password, systemType);
- PasswordPersistenceManager.getInstance().add(info, true, false);
- }
-
+ exception = null;
+ cause = null;
+
+ try {
+ connection = systemRegistry.createHost(profileName, systemType, name, address, null, userId, IRSEUserIdConstants.USERID_LOCATION_HOST, null);
+ } catch (Exception e) {
+ exception = e;
+ cause = e.getLocalizedMessage();
+ }
+ Assert.assertNull("FAILED(findOrCreateConnection): Failed to create connection IHost object! Possible cause: " + cause, exception); //$NON-NLS-1$
+
+ if (userId != null && password != null) {
+ SystemSignonInformation info = new SystemSignonInformation(address, userId, password, systemType);
+ PasswordPersistenceManager.getInstance().add(info, true, false);
+ }
+
+ IServerLauncherProperties connProperties = connection.getConnectorServices()[0].getRemoteServerLauncherProperties();
+ if (connProperties instanceof IRemoteServerLauncher) {
+ IRemoteServerLauncher launcher = (IRemoteServerLauncher) connProperties;
if (daemonPort != null) {
int daemonPortNum = Integer.parseInt(daemonPort);
- IServerLauncherProperties connProperties = connection.getConnectorServices()[0].getRemoteServerLauncherProperties();
- if (connProperties instanceof IRemoteServerLauncher) {
- IRemoteServerLauncher launcher = (IRemoteServerLauncher) connProperties;
- launcher.setDaemonPort(daemonPortNum);
- }
+ launcher.setDaemonPort(daemonPortNum);
+ }
+ if (serverLaunchType != null) {
+ launcher.setServerLaunchType(ServerLaunchType.get(serverLaunchType));
+ }
+ if (rexecPort != null) {
+ int rexecPortNum = Integer.parseInt(rexecPort);
+ launcher.setRexecPort(rexecPortNum);
+ }
+ if (serverPath != null) {
+ launcher.setServerPath(serverPath);
}
+ if (serverScript != null) {
+ launcher.setServerScript(serverScript);
+ }
+ }
}
Assert.assertNotNull("FAILED(findOrCreateConnection): Failed to find and/or create connection IHost object!", connection); //$NON-NLS-1$
final Display display = Display.getCurrent();
@@ -269,7 +285,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
//running on main thread: wait until all async events are fired
}
}
-
+
return connection;
}
diff --git a/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java b/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
index 5c9995e..de0a6f9 100644
--- a/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
+++ b/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
@@ -12,6 +12,7 @@
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - organize, enable and tag test cases
* Martin Oberhuber (Wind River) - [235360][ftp][ssh] Return proper "Root" IHostFile
+ * Patrick Tassé (Ericsson) - [285226] Empty directory shown as an error message
*******************************************************************************/
package org.eclipse.rse.tests.subsystems.files;
@@ -24,13 +25,22 @@ import junit.framework.TestSuite;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.IService;
+import org.eclipse.rse.services.clientserver.PathUtility;
+import org.eclipse.rse.services.clientserver.messages.SystemElementNotFoundException;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.files.IHostFile;
+import org.eclipse.rse.services.files.RemoteFileException;
+import org.eclipse.rse.services.shells.IHostOutput;
+import org.eclipse.rse.services.shells.IHostShell;
+import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
+import org.eclipse.rse.tests.subsystems.shells.ShellOutputListener;
public class FileServiceTest extends RSEBaseConnectionTestCase {
@@ -75,7 +85,8 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
TestSuite suite = new TestSuite(baseName);
// // Add a test suite for each connection type
- String[] connTypes = { "local", "ssh", "ftpWindows", "ftp", "linux", "windows" };
+ String[] connTypes = { "local", "ssh", "ftpWindows", "ftpSsh", "linux", "windows", "unix" };
+ //String[] connTypes = { "unix" };
//String[] connTypes = { "local" };
// String[] connTypes = { "ssh" };
@@ -121,7 +132,12 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
//Return a filename for testing that exposes all characters valid on the file system
if (!isWindows()) {
//UNIX TODO: test embedded newlines
- return "a !@#${a}\"\' fi\tle\b\\%^&*()?_ =[]~+-'`;:,.|<>"; //$NON-NLS-1$
+ String testName = "a !@#${a}\"\' fi\tle\b\\%^&*()?_ =[]~+-'`;:,.|<>"; //$NON-NLS-1$
+ // Bug 235492: DStore is designed to treat '\' and '/' the same way, so do not
+ // test this.
+ if (fss.getSubSystemConfiguration().getServiceImplType().getName().equals("org.eclipse.rse.services.dstore.IDStoreService")) { //$NON-NLS-1$
+ testName.replace('\\', ' ');
+ }
}
//Fallback: Windows TODO: test unicode
//Note: The trailing dot ('.') is really unfair on Windows because the file
@@ -130,6 +146,32 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
return "a !@#${a}'` file%^&()_ =[]~+-;.,"; //$NON-NLS-1$
}
+ /**
+ * Find the first IShellServiceSubSystem service associated with the host.
+ *
+ * @return shell service subsystem, or <code>null</code> if not found.
+ */
+ public IShellService getRelatedShellService() {
+ IHost host = fss.getHost();
+ ISubSystem[] subSystems = host.getSubSystems();
+ IShellService ssvc = null;
+ for (int i = 0; subSystems != null && i < subSystems.length; i++) {
+ IService svc = subSystems[i].getSubSystemConfiguration().getService(host);
+ if (svc != null) {
+ ssvc = (IShellService) svc.getAdapter(IShellService.class);
+ if (ssvc != null) {
+ try {
+ subSystems[i].checkIsConnected(getDefaultProgressMonitor());
+ return ssvc;
+ } catch (SystemMessageException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ return null;
+ }
+
public void testGetRootProperties() throws Exception {
//-test-author-:MartinOberhuber
if (isTestDisabled()) return;
@@ -139,11 +181,10 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
for (int i = 0; i < roots.length; i++) {
assertTrue(roots[i].isRoot());
assertTrue(roots[i].exists());
- assertNull(roots[i].getParentPath()); //dstore: bug 235471
+ assertNull(roots[i].getParentPath());
String rootName = roots[i].getName();
assertNotNull(rootName);
System.out.println(rootName);
- // DStore: NPE, bug 240710
IHostFile newHf = fs.getFile(null, rootName, new NullProgressMonitor());
assertTrue(newHf.isRoot());
assertTrue(newHf.exists());
@@ -175,7 +216,7 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
if (isTestDisabled()) return;
String testName = getTestFileName();
- IHostFile hf = fs.createFile(tempDirPath, testName, mon); //dstore-linux: bug 235492
+ IHostFile hf = fs.createFile(tempDirPath, testName, mon);
assertTrue(hf.exists());
assertTrue(hf.canRead());
assertTrue(hf.canWrite());
@@ -231,4 +272,162 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
}
}
+ public String[] runRemoteCommand(IShellService shellService, String workingDirectory, String cmd) throws SystemMessageException, InterruptedException {
+ IHostShell hostShell = null;
+ hostShell = shellService.runCommand(workingDirectory, cmd, null, mon);
+ ShellOutputListener outputListener = new ShellOutputListener();
+ hostShell.addOutputListener(outputListener);
+ hostShell.writeToShell("exit");
+ assertNotNull(hostShell);
+ assertNotNull(hostShell.getStandardOutputReader());
+ while (hostShell.isActive()) {
+ Thread.sleep(1000);
+ }
+ Object[] allOutput = outputListener.getAllOutput();
+ if (allOutput!=null) {
+ String[] sOutput = new String[allOutput.length];
+ for (int i = 0; i < allOutput.length; i++) {
+ if (allOutput[i] instanceof IHostOutput) {
+ sOutput[i] = ((IHostOutput) allOutput[i]).getString();
+ } else {
+ sOutput[i] = allOutput[i].toString();
+ }
+ }
+ return sOutput;
+ }
+ return null;
+ }
+
+ /**
+ * Create a symbolic link in the context of tempDirPath.
+ *
+ * @param source source file to link from
+ * @param target target file to link to
+ * @return <code>true</code> if link was successfully created.
+ */
+ public boolean mkSymLink(String source, String target) {
+ if (!fss.getHost().getSystemType().isWindows()) {
+ IShellService ss = getRelatedShellService();
+ if (ss != null) {
+ String[] allOutput;
+ try {
+ String src = PathUtility.enQuoteUnix(source);
+ String tgt = PathUtility.enQuoteUnix(target);
+ String cmd = "ln -s " + src + " " + tgt;
+ allOutput = runRemoteCommand(ss, tempDirPath, cmd);
+ IHostFile hf = fs.getFile(tempDirPath, target, mon);
+ if (hf.exists()) {
+ return true;
+ }
+ allOutput = new String[] { "Failed to symlink: " + cmd };
+ } catch (Exception e) {
+ allOutput = new String[] { "Exception thrown: " + e };
+ }
+ System.out.println("WARNING: Could not create symlink");
+ if (allOutput != null) {
+ for (int i = 0; i < allOutput.length; i++) {
+ System.out.println(allOutput[i]);
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public void testListEmptyFolder() throws SystemMessageException {
+ // -test-author-:PatrickTassé
+ if (isTestDisabled()) return;
+
+ String testName = "empty";
+ IHostFile hf = fs.createFolder(tempDirPath, testName, mon);
+ assertTrue(hf.exists());
+ assertTrue(hf.isDirectory());
+ assertTrue(hf.canRead());
+ assertTrue(hf.canWrite());
+ assertEquals(testName, hf.getName());
+ assertEquals(tempDirPath, hf.getParentPath());
+ long modDate = hf.getModifiedDate();
+ assertTrue(modDate > 0);
+ if (fss.getHost().getSystemType().isLocal()) {
+ File theFile = new File(remoteTempDir.getAbsolutePath(), testName);
+ assertTrue(theFile.exists());
+ assertTrue(modDate == theFile.lastModified());
+ }
+ IHostFile[] hfa = fs.list(hf.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
+ assertEquals(0, hfa.length);
+ // check for symlink-to-empty-folder case
+ if (mkSymLink(testName, "lto" + testName)) {
+ IHostFile hf2 = fs.getFile(tempDirPath, "lto" + testName, mon);
+ assertTrue(hf2.isDirectory());
+ hfa = fs.list(hf2.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
+ assertEquals(0, hfa.length);
+ }
+ }
+
+ public void testListNonExistentFolder() throws SystemMessageException, InterruptedException {
+ // -test-author-:PatrickTassé
+ if (isTestDisabled()) return;
+
+ String testPath = tempDirPath + "/non/existent";
+ try {
+ IHostFile[] hfa = fs.list(testPath, "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
+ // Bug 285942: LocalFileService and DStoreFileService return empty array today
+ // Assert something impossible since an exception is expected
+ assertEquals("Exception expected on list nonexistent", -1, hfa.length);
+ } catch (SystemMessageException e) {
+ assertTrue(e instanceof SystemElementNotFoundException);
+ }
+ // check for symlink-to-non-existent case
+ if (mkSymLink("non/existent", "ltononex")) {
+ IHostFile hf2 = fs.getFile(tempDirPath, "ltononex", mon);
+ try {
+ IHostFile[] hfa = fs.list(hf2.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
+ assertEquals("Exception expected on list broken symlink", -1, hfa.length);
+ } catch (SystemMessageException e) {
+ assertTrue(e instanceof SystemElementNotFoundException);
+ }
+ }
+ }
+
+ public void testListNotAFolder() throws SystemMessageException {
+ // -test-author-:PatrickTassé
+ if (isTestDisabled()) return;
+
+ String testName = getTestFileName();
+ IHostFile hf = fs.createFile(tempDirPath, testName, mon);
+ assertTrue(hf.exists());
+ assertTrue(hf.canRead());
+ assertTrue(hf.canWrite());
+ assertEquals(hf.getName(), testName);
+ assertEquals(hf.getParentPath(), tempDirPath);
+ assertEquals(hf.getSize(), 0);
+ long modDate = hf.getModifiedDate();
+ assertTrue(modDate > 0);
+ if (fss.getHost().getSystemType().isLocal()) {
+ File theFile = new File(remoteTempDir.getAbsolutePath(), testName);
+ assertTrue(theFile.exists());
+ assertTrue(modDate == theFile.lastModified());
+ }
+ try {
+ IHostFile[] hfa = fs.list(hf.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
+ // Bug 285942: LocalFileService and DStoreFileService return empty array today
+ // Assert something impossible since an exception is expected
+ assertEquals("Exception expected on list not-a-folder", -1, hfa.length);
+ } catch (SystemMessageException e) {
+ assertTrue(e instanceof RemoteFileException);
+ }
+ // check for symlink-to-not-a-folder case
+ if (mkSymLink(testName, "lto" + testName)) {
+ try {
+ IHostFile hf2 = fs.getFile(tempDirPath, "lto" + testName, mon);
+ assertTrue(hf2.isFile());
+ IHostFile[] hfa = fs.list(hf2.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
+ // Assert something impossible since an exception is expected
+ assertEquals("Exception expected on list symlink-to-folder", -1, hfa.length);
+ } catch (SystemMessageException e) {
+ assertTrue(e instanceof RemoteFileException);
+ }
+ }
+ }
+
}
diff --git a/org.eclipse.rse.tests/test.data/ftpConnection.properties b/org.eclipse.rse.tests/test.data/ftpSshConnection.properties
similarity index 72%
copy from org.eclipse.rse.tests/test.data/ftpConnection.properties
copy to org.eclipse.rse.tests/test.data/ftpSshConnection.properties
index 23cb2e2..9e62a72 100644
--- a/org.eclipse.rse.tests/test.data/ftpConnection.properties
+++ b/org.eclipse.rse.tests/test.data/ftpSshConnection.properties
@@ -1,28 +1,28 @@
###############################################################################
-# Copyright (c) 2008 IBM Corporation and others. All rights reserved.
+# Copyright (c) 2009 Wind River Systems, Inc. others. All rights reserved.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
-# IBM Corporation - initial API and implementation
+# Martin Oberhuber (Wind River) - initial API and implementation
###############################################################################
# name/label for this ftp connection
-name = test_ftp_only
+name = test_ftp_with_ssh
# profile name this connection should be created for
profile_name = junit_test_profile
# FTP system ID
-system_type_id = org.eclipse.rse.systemtype.ftp
+system_type_id = org.eclipse.rse.tests.systemType.ftpSsh
# Address of ftp connection
address = unknown
# userid to connect to ftp connection
-#userid =
+userid = unknown
# password to connect to ftp connection
-#password =
\ No newline at end of file
+password = unknown
\ No newline at end of file
diff --git a/org.eclipse.rse.tests/test.data/linuxConnection.properties b/org.eclipse.rse.tests/test.data/linuxConnection.properties
index 90eee48..cc22636 100644
--- a/org.eclipse.rse.tests/test.data/linuxConnection.properties
+++ b/org.eclipse.rse.tests/test.data/linuxConnection.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008 IBM Corporation and others. All rights reserved.
+# Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
#
# Contributors:
# IBM Corporation - initial API and implementation
+# Martin Oberhuber (Wind River) - Support REXEC launch type for dstore
###############################################################################
# name/label for this linux connection
@@ -22,10 +23,22 @@ system_type_id = org.eclipse.rse.systemtype.linux
address = unknown
# userid to connect to linux connection
-#userid =
+userid = unknown
# password to connect to linux connection
-#password =
+password = unknown
# daemon port used for connecting to this linux connection
-#daemon_port =
\ No newline at end of file
+#daemon_port =
+
+# REXEC port used in case of REXEC server launcher
+#rexec_port =
+
+# DStore launch type: one of Daemon, Rexec, Running, Telnet, SSH, FTP, HTTP
+#launch_type = Rexec
+
+# Path to the dstore server.sh on the remote host (for REXEC)
+#dstore_server_path = /folk/mober/RSETest/I20090806-1212/server-unix
+
+# Script to use for launching server.sh on the remote host (need to find a JVM!)
+#dstore_server_script = sh ./server.sh
diff --git a/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties b/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties
index 4677424..3208d4c 100644
--- a/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties
+++ b/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008 IBM Corporation and others. All rights reserved.
+# Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -16,13 +16,13 @@ name = test_ssh_terminals_only
profile_name = junit_test_profile
# SSH system ID
-system_type_id = org.eclipse.rse.tests.sshTerminal
+system_type_id = org.eclipse.rse.tests.systemType.sshTerminal
# Address of ssh connection
address = unknown
# userid to connect to ssh connection
-#userid =
+userid = unknown
# password to connect to ssh connection
-#password =
+#password =
diff --git a/org.eclipse.rse.tests/test.data/unixConnection.properties b/org.eclipse.rse.tests/test.data/unixConnection.properties
new file mode 100644
index 0000000..35b20f5
--- /dev/null
+++ b/org.eclipse.rse.tests/test.data/unixConnection.properties
@@ -0,0 +1,44 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# Martin Oberhuber (Wind River) - adapted from Linux
+###############################################################################
+
+# name/label for this dstore-unix connection
+name = test_unix
+
+# profile name this connection should be created for
+profile_name = junit_test_profile
+
+# UNIX system ID
+system_type_id = org.eclipse.rse.systemtype.unix
+
+# Address of unix connection
+address = unknown
+
+# userid to connect to unix connection
+userid = unknown
+
+# password to connect to unix connection
+password = unknown
+
+# daemon port used for connecting to this unix connection
+#daemon_port =
+
+# REXEC port used in case of REXEC server launcher
+#rexec_port =
+
+# DStore launch type: one of Daemon, Rexec, Running, Telnet, SSH, FTP, HTTP
+launch_type = Rexec
+
+# Path to the dstore server.sh on the remote host (for REXEC)
+dstore_server_path = /folk/mober/RSETest/I20090806-1212/server-unix
+
+# Script to use for launching server.sh on the remote host (need to find a JVM!)
+dstore_server_script = sh ./server.sh
diff --git a/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs
index 39fccfd..5abac85 100644
--- a/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs
+++ b/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs
@@ -1,5 +1,3 @@
-#Mon Feb 19 16:11:24 EST 2007
+#Thu Aug 06 17:28:09 CEST 2009
eclipse.preferences.version=1
-encoding//UI/org/eclipse/rse/ui/SystemWidgetHelpers.java=UTF-8
-encoding//UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java=UTF-8
-encoding//UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java=UTF-8
+encoding/<project>=ISO-8859-1
diff --git a/org.eclipse.rse.ui/META-INF/MANIFEST.MF b/org.eclipse.rse.ui/META-INF/MANIFEST.MF
index f28d5ef..ba7e5c2 100644
--- a/org.eclipse.rse.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.rse.ui/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.ui;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Activator: org.eclipse.rse.ui.RSEUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.expressions,
org.eclipse.core.resources,
org.eclipse.jface.text,
- org.eclipse.ui,
+ org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui.forms,
org.eclipse.ui.ide,
org.eclipse.ui.views,
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties
index 9271d79..d73c50a 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties
@@ -27,6 +27,7 @@
# David Dykstal (IBM) - [188150] adding "go up one level" tooltip
# David Dykstal (IBM) - [233678] title string is constructed by concatenation, should be substituted
# David McKnight (IBM) - [248922] [dnd] Remote to local overwrite copy does not work
+# David McKnight (IBM) - [287066] TVT35:TCT635: PLK: dots at ends of tooltips
################################################################################
# NLS_MESSAGEFORMAT_VAR
@@ -355,13 +356,13 @@ RESID_PROP_SERVERLAUNCHER_MEANS=Indicate how the remote server should be launche
RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON=Remote daemon
RESID_PROP_SERVERLAUNCHER_RADIO_REXEC=REXEC
RESID_PROP_SERVERLAUNCHER_RADIO_NONE=Connect to running server
-RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON_TOOLTIP=Launch the server using a daemon running on the host.
-RESID_PROP_SERVERLAUNCHER_RADIO_REXEC_TOOLTIP=Launch the server using REXEC.
-RESID_PROP_SERVERLAUNCHER_RADIO_NONE_TOOLTIP=Manually launch the server and then connect to it from RSE.
+RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON_TOOLTIP=Launch the server using a daemon running on the host
+RESID_PROP_SERVERLAUNCHER_RADIO_REXEC_TOOLTIP=Launch the server using REXEC
+RESID_PROP_SERVERLAUNCHER_RADIO_NONE_TOOLTIP=Manually launch the server and then connect to it from RSE
RESID_PROP_SERVERLAUNCHER_PATH=Path to installed server on host
RESID_PROP_SERVERLAUNCHER_PATH_TOOLTIP=Specify where the installed server is located on the host.
RESID_PROP_SERVERLAUNCHER_INVOCATION=Server launch command
-RESID_PROP_SERVERLAUNCHER_INVOCATION_TOOLTIP=Specify the name of the command that invokes the server.
+RESID_PROP_SERVERLAUNCHER_INVOCATION_TOOLTIP=Specify the name of the command that invokes the server
#=============================================================
# NEW FILTERPOOL WIZARD...
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java
index 4f21f73..0ec7375 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java
@@ -1,15 +1,15 @@
/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
+ * 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
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, 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
@@ -25,11 +25,12 @@ import org.eclipse.rse.core.events.SystemResourceChangeEvent;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
/**
* The action allows users to collapse the entire Remote System Explorer tree view.
@@ -40,11 +41,13 @@ public class SystemCollapseAllAction extends SystemBaseAction {
* @param parent the shell that is employing this action
*/
public SystemCollapseAllAction(Shell parent) {
- super(SystemResources.ACTION_COLLAPSE_ALL_LABEL, SystemResources.ACTION_COLLAPSE_ALL_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_COLLAPSEALL_ID), // D54577
+ super(SystemResources.ACTION_COLLAPSE_ALL_LABEL, SystemResources.ACTION_COLLAPSE_ALL_TOOLTIP, PlatformUI.getWorkbench().getSharedImages()
+ .getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL), // D54577
parent);
- setHoverImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptorFromIDE("elcl16/collapseall.gif")); //$NON-NLS-1$
+ //setHoverImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptorFromIDE("elcl16/collapseall.gif")); //$NON-NLS-1$
+ setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL));
allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_EXPAND); // should never be used
+ setContextMenuGroup(ISystemContextMenuConstants.GROUP_EXPAND); // should never be used
setSelectionSensitive(false);
setHelp(RSEUIPlugin.HELPPREFIX + "actn0023"); //$NON-NLS-1$
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
index 3cf3d24..8f4a26d 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
@@ -71,6 +71,7 @@
* David McKnight (IBM) - [190001] [refresh] Avoid unnecessary duplicate queries during drag&drop to filter
* Martin Oberhuber (Wind River) - [276195] Avoid unnecessary selectionChanged when restoring connections
* David McKnight (IBM) - [277328] Unhandled Event Loop Exception When Right-Clicking on "Pending..." Message
+ * David McKnight (IBM) - [283793] [dstore] Expansion indicator(+) does not reset after no connect
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -6286,9 +6287,9 @@ public class SystemView extends SafeTreeViewer
}
- public void add(Object parentElementOrTreePath, Object[] childElements) {
-
+ public void add(Object parentElementOrTreePath, Object[] childElements) {
assertElementsNotNull(childElements);
+
IContextObject contextObject = null;
ISystemFilterReference originalFilter = null;
if (parentElementOrTreePath instanceof IContextObject)
@@ -6299,6 +6300,7 @@ public class SystemView extends SafeTreeViewer
}
+
List matches = new Vector();
findAllRemoteItemReferences(parentElementOrTreePath, parentElementOrTreePath, matches);
@@ -6309,34 +6311,58 @@ public class SystemView extends SafeTreeViewer
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
if (adapter != null)
{
- IHost parentHost = adapter.getSubSystem(parentElementOrTreePath).getHost();
+ ISubSystem subSystem = adapter.getSubSystem(parentElementOrTreePath);
+
+ boolean unexpandContainer = false;
+ // if the subsystem is not connected, then need to keep the widget expandable
+ if (childElements.length == 0 && !subSystem.isConnected()){
+ unexpandContainer = true;
+ }
+
+
+ IHost parentHost = subSystem.getHost();
for (int i = 0; i < matches.size(); i++)
{
Widget match = (Widget) matches.get(i);
- Object data = null;
- try {
- data = match.getData();
- }
- catch (SWTException e){
- // not sure why this occurs -logging it for now
- // this is reported in bug 251625
- SystemBasePlugin.logError("Exception in SystemView.add() with " + match); //$NON-NLS-1$
- SystemBasePlugin.logError(e.getMessage());
+
+ // for bug 283793
+ if (match instanceof TreeItem && unexpandContainer){
+ TreeItem titem = ((TreeItem)match);
+ if (titem.getExpanded()){
+ setExpanded(titem, false);
+ }
}
-
- if (data instanceof IAdaptable)
- {
- ISystemViewElementAdapter madapter = (ISystemViewElementAdapter)((IAdaptable)data).getAdapter(ISystemViewElementAdapter.class);
- if (madapter != null)
+ else {
+ Object data = null;
+ try {
+ data = match.getData();
+ }
+ catch (SWTException e){
+ // not sure why this occurs -logging it for now
+ // this is reported in bug 251625
+ SystemBasePlugin.logError("Exception in SystemView.add() with " + match); //$NON-NLS-1$
+ SystemBasePlugin.logError(e.getMessage());
+ }
+
+ if (data instanceof IAdaptable)
{
- IHost mHost = madapter.getSubSystem(data).getHost();
- if (mHost != parentHost)
+ ISystemViewElementAdapter madapter = (ISystemViewElementAdapter)((IAdaptable)data).getAdapter(ISystemViewElementAdapter.class);
+ if (madapter != null)
{
- invalidMatches.add(match);
+ IHost mHost = madapter.getSubSystem(data).getHost();
+ if (mHost != parentHost)
+ {
+ invalidMatches.add(match);
+ }
}
}
}
}
+ if (unexpandContainer){
+ // brings back the + icon
+ refresh(parentElementOrTreePath);
+ return;
+ }
}
if (invalidMatches.size() > 0)
@@ -6379,7 +6405,7 @@ public class SystemView extends SafeTreeViewer
}
}
else
- {
+ {
internalAdd(match, parentElementOrTreePath, childElements);
// refresh parent in this case because the parentElementOrTreePath may no longer exist
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
index d1e6fb9..1f33986 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
+ * 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
@@ -35,6 +35,7 @@
* David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
* David McKnight (IBM) - [226324] Default user ID from preferences not inherited
* David McKnight (IBM) - [196166] [usability][dnd] Changing the sort order of hosts in the SystemView should work by drag & drop
+ * David McKnight (IBM) - [286230] [dnd] Dropping resources on host nodes leads to classcast exception
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -701,25 +702,28 @@ public class SystemViewConnectionAdapter
public Object doDrop(Object from, Object to, boolean sameSystemType,
boolean sameSystem, int srcType, IProgressMonitor monitor) {
- IHost srcHost = (IHost)from;
- IHost tgtHost = (IHost)to;
- if (srcHost != null && tgtHost != null && srcHost != tgtHost){
- ISystemProfile profile = tgtHost.getSystemProfile();
- ISystemHostPool pool = tgtHost.getHostPool();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
-
- int tgtPosition = pool.getHostPosition(tgtHost);
- int srcPosition = pool.getHostPosition(srcHost);
-
- int delta = tgtPosition - srcPosition;
-
- IHost[] conns = new IHost[1];
- conns[0] = srcHost;
-
- sr.moveHosts(profile.getName(),conns,delta);
- }
- return srcHost;
+ if (from instanceof IHost){
+ IHost srcHost = (IHost)from;
+ IHost tgtHost = (IHost)to;
+ if (srcHost != null && tgtHost != null && srcHost != tgtHost){
+ ISystemProfile profile = tgtHost.getSystemProfile();
+ ISystemHostPool pool = tgtHost.getHostPool();
+ ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
+
+
+ int tgtPosition = pool.getHostPosition(tgtHost);
+ int srcPosition = pool.getHostPosition(srcHost);
+
+ int delta = tgtPosition - srcPosition;
+
+ IHost[] conns = new IHost[1];
+ conns[0] = srcHost;
+
+ sr.moveHosts(profile.getName(),conns,delta);
+ }
+ return srcHost;
+ }
+ return null;
}
/**
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
index 2435da8..1f660aa 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
@@ -37,6 +37,9 @@
* Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
* Li Ding (IBM) - [256135] Subsystem not restored in system view tree if subsystem configuration does not support filter
* David McKnight (IBM) - [257721] Doubleclick doing special handling and expanding
+ * David McKnight (IBM) - [250417] Restore from memento flag set to false during restore on startup
+ * Martin Oberhuber (Wind River) - [286122] Avoid NPE when restoring memento
+ * David McKnight (IBM) - [286670] TVT35:TCT586: CHS: English Strings Found
*******************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -1298,12 +1301,12 @@ public class SystemViewPart
break;
// filter pool or filter (depends on showFilterPools)
case 3 :
-
+
if (subsystem != null && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
remoteObject = new RemoteObject(token, subsystem, null, null);
break;
}
-
+
if (showFilterPools)
{
if (subsystem != null)
@@ -1348,12 +1351,12 @@ public class SystemViewPart
break;
// filter or filter string (depends on showFilterPools) or remote object (depends on showFilterStrings)
case 4 :
-
- if (!(subsystem.getSubSystemConfiguration().supportsFilters())) {
+
+ if (subsystem != null && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
remoteObject = new RemoteObject(token, subsystem, null, null);
break;
}
-
+
if (showFilterPools) // definitely a filter
{
index = token.indexOf('=');
@@ -1390,12 +1393,12 @@ public class SystemViewPart
break;
// filter string (depends on showFilterStrings) or remote object
case 5 :
-
- if (!(subsystem.getSubSystemConfiguration().supportsFilters())) {
+
+ if (subsystem!=null && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
remoteObject = new RemoteObject(token, subsystem, null, null);
break;
}
-
+
if (showFilterPools && showFilterStrings) // definitely a filter string
{
// at this point we know the parent filter reference as that was parsed in case 4
@@ -1416,12 +1419,12 @@ public class SystemViewPart
break;
default : // definitely a remote object
-
- if (!(subsystem.getSubSystemConfiguration().supportsFilters())) {
+
+ if (subsystem!=null && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
remoteObject = new RemoteObject(token, subsystem, null, null);
break;
}
-
+
if ((subsystem != null) && (fRef != null))
remoteObject = new RemoteObject(token, subsystem, fRef, fsRef);
}
@@ -1506,14 +1509,13 @@ public class SystemViewPart
protected class RestoreRemoteObjects extends Job
{
private Vector _remoteObjectsToRestore;
- private List _cacheSubSystemList;
private Vector _remoteObjectsToSelect;
- public RestoreRemoteObjects(Vector remoteObjects, List cacheSubSystemList, Vector remoteObjectsToSelect)
+ public RestoreRemoteObjects(Vector remoteObjects, Vector remoteObjectsToSelect)
{
super("Restore Remote Objects"); //$NON-NLS-1$
+ setSystem(true);
_remoteObjectsToRestore = remoteObjects;
- _cacheSubSystemList = cacheSubSystemList;
_remoteObjectsToSelect = remoteObjectsToSelect;
}
@@ -1548,6 +1550,8 @@ public class SystemViewPart
protected IStatus doRestore(IProgressMonitor monitor)
{
+ boolean restoreFromCache = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE);
+
for (int i = 0; i < _remoteObjectsToRestore.size(); i++){
if (monitor.isCanceled()){
@@ -1563,8 +1567,7 @@ public class SystemViewPart
// yantzi: artemis 6.0: notify subsystems that this is a restore from memento so they
// can optionally use the cache if desired
- if (ss != null && ss.supportsCaching())
- {
+ if (ss != null && restoreFromCache && ss.supportsCaching()){
ss.getCacheManager().setRestoreFromMemento(true);
}
@@ -1592,26 +1595,29 @@ public class SystemViewPart
}
}
- catch (Exception e)
- {
+ catch (Exception e){
// unexpected
}
+ }
- // yantzi: artemis 6.0: reset restore from memento flag
- if (ss != null && ss.supportsCaching())
- {
- ss.getCacheManager().setRestoreFromMemento(false);
- }
+ // yantzi: artemis 6.0: reset restore from memento flag
+ if (ss != null && restoreFromCache && ss.supportsCaching()){
+ ss.getCacheManager().setRestoreFromMemento(false);
}
}
else if (object instanceof ISystemFilterReference)
{
-
+
ISystemFilterReference fref = (ISystemFilterReference)object;
ISubSystem ss = fref.getSubSystem();
-
+
+ // yantzi: artemis 6.0: notify subsystems that this is a restore from memento so they
+ // can optionally use the cache if desired
+ if (ss != null && restoreFromCache && ss.supportsCaching()){
+ ss.getCacheManager().setRestoreFromMemento(true);
+ }
boolean isRestoringCache = ss.getCacheManager() != null && ss.getCacheManager().isRestoreFromMemento();
-
+
if (!ss.isOffline()){
if (!ss.isConnected() && !isRestoringCache){
try
@@ -1637,17 +1643,14 @@ public class SystemViewPart
Display.getDefault().asyncExec(showRunnable);
}
}
+
+ // yantzi: artemis 6.0: reset restore from memento flag
+ if (ss != null && restoreFromCache && ss.supportsCaching()){
+ ss.getCacheManager().setRestoreFromMemento(false);
+ }
}
}
- boolean restoreFromCache = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE);
- // yantzi: artemis 6.0, restore memento flag for affected subsystems
- if (restoreFromCache)
- {
- for (int i = 0; i < _cacheSubSystemList.size(); i++)
- {
- ((ISubSystem) _cacheSubSystemList.get(i)).getCacheManager().setRestoreFromMemento(false);
- }
- }
+
return Status.OK_STATUS;
}
@@ -1833,7 +1836,7 @@ public class SystemViewPart
if (remoteElementsToRestore.size() > 0)
{
- RestoreRemoteObjects restoreRemoteJob = new RestoreRemoteObjects(remoteElementsToRestore, cacheSubSystemList, remoteElementsToSelect);
+ RestoreRemoteObjects restoreRemoteJob = new RestoreRemoteObjects(remoteElementsToRestore, remoteElementsToSelect);
restoreRemoteJob.schedule();
}
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java
index 6f0b15f..ee99afa 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * 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
@@ -15,6 +15,7 @@
* {Name} (company) - description of contribution.
* Kevin Doyle (IBM) - [177587] createTabItem sets the wrapped selection provider
* Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
+ * Zhou Renjian (Kortide) - [282239] Monitor view does not update icon according to connection status
*******************************************************************************/
package org.eclipse.rse.internal.ui.view.monitor;
@@ -281,4 +282,22 @@ public class MonitorViewWorkbook extends Composite
}
}
}
+
+ // Fix bug#282239: Monitor view does not update icon according to connection status
+ public void updateTitleIcon(IAdaptable root)
+ {
+ for (int i = 0; i < _folder.getItemCount(); i++)
+ {
+ CTabItem item = _folder.getItem(i);
+ if (!item.isDisposed())
+ {
+ MonitorViewPage page = (MonitorViewPage) item.getData();
+ if (page != null && page.getInput() == root)
+ {
+ setTabTitle(root, item);
+ break;
+ }
+ }
+ }
+ }
}
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java
index ff70aa0..c27d80a 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
+ * 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
@@ -20,6 +20,7 @@
* Kevin Doyle (IBM) - [212940] Duplicate Help Context Identifiers
* David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
+ * Zhou Renjian (Kortide) - [282239] Monitor view does not update icon according to connection status
********************************************************************************/
package org.eclipse.rse.internal.ui.view.monitor;
@@ -898,6 +899,13 @@ class SubSetAction extends BrowseAction
updateActionStates();
}
break;
+
+ // Fix bug#282239: Monitor view does not update icon according to connection status
+ case ISystemResourceChangeEvents.EVENT_ICON_CHANGE:
+ {
+ _folder.updateTitleIcon((IAdaptable)child);
+ }
+ break;
case ISystemResourceChangeEvents.EVENT_RENAME:
{
if (child == input)
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java
index d79706e..4e8a2bf 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java
@@ -17,6 +17,7 @@
* Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
* David McKnight (IBM) - [250169] Problems with extending the menu's of results in Remote Search View
* David McKnight (IBM) - [214395] Properties View not updated when clicking on Search Results
+ * David McKnight (IBM) - [190015] [performance] Remove All Match's from Search Results Takes a while
*******************************************************************************/
package org.eclipse.rse.internal.ui.view.search;
@@ -888,7 +889,8 @@ public class SystemSearchViewPart extends ViewPart
// but flush cache of the provider first for an accurate refresh
SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider)(tableView.getContentProvider());
provider.flushCache();
- tableView.refresh();
+ Tree tree = tableView.getTree();
+ tree.removeAll();
}
// other search
else if (currentViewer instanceof TreeViewer){
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
index 9dd6314..2ad9588 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
@@ -1,15 +1,15 @@
/********************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved.
+ * 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
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
+ *
* Contributors:
* Michael Berger (IBM) - 146339 Added refresh action graphic.
* Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
@@ -23,42 +23,42 @@ package org.eclipse.rse.ui;
/**
* Constants used throughout the System plugin.
*/
-public interface ISystemIconConstants
+public interface ISystemIconConstants
{
public static final String PLUGIN_ID ="org.eclipse.rse.ui"; //$NON-NLS-1$
public static final String PREFIX = PLUGIN_ID + "."; //$NON-NLS-1$
-
+
// Icons
public static final String ICON_SUFFIX = "Icon"; //$NON-NLS-1$
public static final String ICON_BANNER_SUFFIX = "BannerIcon"; //$NON-NLS-1$
public static final String ICON_EXT = ".gif"; //$NON-NLS-1$
-
- // WIZARD ICONS...
+
+ // WIZARD ICONS...
public static final String ICON_WIZARD_DIR = "full/wizban/"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWPROFILEWIZARD_ROOT = "newprofile_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWPROFILEWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWPROFILEWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWPROFILEWIZARD_ID = PREFIX + ICON_SYSTEM_NEWPROFILEWIZARD_ROOT + ICON_BANNER_SUFFIX;
+ public static final String ICON_SYSTEM_NEWPROFILEWIZARD_ID = PREFIX + ICON_SYSTEM_NEWPROFILEWIZARD_ROOT + ICON_BANNER_SUFFIX;
public static final String ICON_SYSTEM_NEWCONNECTIONWIZARD_ROOT = "newconnection_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWCONNECTIONWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWCONNECTIONWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWCONNECTIONWIZARD_ID = PREFIX + ICON_SYSTEM_NEWCONNECTIONWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
+ public static final String ICON_SYSTEM_NEWCONNECTIONWIZARD_ID = PREFIX + ICON_SYSTEM_NEWCONNECTIONWIZARD_ROOT + ICON_BANNER_SUFFIX;
+
public static final String ICON_SYSTEM_NEWFILTERWIZARD_ROOT = "newfilter_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWFILTERWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFILTERWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILTERWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILTERWIZARD_ROOT + ICON_BANNER_SUFFIX;
+ public static final String ICON_SYSTEM_NEWFILTERWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILTERWIZARD_ROOT + ICON_BANNER_SUFFIX;
public static final String ICON_SYSTEM_NEWFILTERPOOLWIZARD_ROOT = "newfilterpool_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWFILTERPOOLWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFILTERPOOLWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILTERPOOLWIZARD_ROOT + ICON_BANNER_SUFFIX;
+ public static final String ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILTERPOOLWIZARD_ROOT + ICON_BANNER_SUFFIX;
public static final String ICON_SYSTEM_NEWFILEWIZARD_ROOT = "newfile_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWFILEWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFILEWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILEWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILEWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
+ public static final String ICON_SYSTEM_NEWFILEWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILEWIZARD_ROOT + ICON_BANNER_SUFFIX;
+
public static final String ICON_SYSTEM_NEWFOLDERWIZARD_ROOT = "newfolder_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWFOLDERWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFOLDERWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFOLDERWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFOLDERWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
+ public static final String ICON_SYSTEM_NEWFOLDERWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFOLDERWIZARD_ROOT + ICON_BANNER_SUFFIX;
+
// THING ICONS...
public static final String ICON_MODEL_DIR = "full/obj16/"; //$NON-NLS-1$
@@ -82,23 +82,23 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_FILTERPOOL_ROOT = "systemfilterpool"; //$NON-NLS-1$
public static final String ICON_SYSTEM_FILTERPOOL = ICON_MODEL_DIR + ICON_SYSTEM_FILTERPOOL_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_FILTERPOOL_ID = PREFIX+ICON_SYSTEM_FILTERPOOL_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_FILTER_ROOT = "systemfilter"; //$NON-NLS-1$
public static final String ICON_SYSTEM_FILTER_ID = PREFIX + ICON_SYSTEM_FILTER_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_FILTER = ICON_MODEL_DIR + ICON_SYSTEM_FILTER_ROOT + ICON_EXT;
-
+ public static final String ICON_SYSTEM_FILTER = ICON_MODEL_DIR + ICON_SYSTEM_FILTER_ROOT + ICON_EXT;
+
public static final String ICON_SYSTEM_FILTERSTRING_ROOT = "systemfilterstring"; //$NON-NLS-1$
public static final String ICON_SYSTEM_FILTERSTRING_ID = PREFIX + ICON_SYSTEM_FILTERSTRING_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_FILTERSTRING = ICON_MODEL_DIR + ICON_SYSTEM_FILTERSTRING_ROOT + ICON_EXT;
+ public static final String ICON_SYSTEM_FILTERSTRING = ICON_MODEL_DIR + ICON_SYSTEM_FILTERSTRING_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_ROOTDRIVE_ROOT = "systemrootdrive"; //$NON-NLS-1$
public static final String ICON_SYSTEM_ROOTDRIVE = ICON_MODEL_DIR + ICON_SYSTEM_ROOTDRIVE_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_ROOTDRIVE_ID = PREFIX+ICON_SYSTEM_ROOTDRIVE_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_ROOTDRIVEOPEN_ROOT = "systemrootdriveopen"; //$NON-NLS-1$
public static final String ICON_SYSTEM_ROOTDRIVEOPEN = ICON_MODEL_DIR + ICON_SYSTEM_ROOTDRIVEOPEN_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_ROOTDRIVEOPEN_ID = PREFIX+ICON_SYSTEM_ROOTDRIVEOPEN_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_FOLDER_ROOT = "systemfolder"; //$NON-NLS-1$
public static final String ICON_SYSTEM_FOLDER = ICON_MODEL_DIR + ICON_SYSTEM_FOLDER_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_FOLDER_ID = PREFIX+ICON_SYSTEM_FOLDER_ROOT+ICON_SUFFIX;
@@ -141,13 +141,13 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_NEWFILE_ROOT = "newfile_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWFILE = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWFILE_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_NEWFILE_ID = PREFIX+ICON_SYSTEM_NEWFILE_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_NEWFOLDER_ROOT = "newfolder_wiz"; //$NON-NLS-1$
public static final String ICON_SYSTEM_NEWFOLDER = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWFOLDER_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_NEWFOLDER_ID = PREFIX+ICON_SYSTEM_NEWFOLDER_ROOT+ICON_SUFFIX;
-
-
- // OTHER ACTION ICONS...
+
+
+ // OTHER ACTION ICONS...
public static final String ICON_ACTIONS_DIR = "full/elcl16/"; //$NON-NLS-1$
public static final String ICON_SYSTEM_LOCK_ROOT = "lock"; //$NON-NLS-1$
@@ -157,7 +157,7 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_MOVEUP_ROOT = "up"; //$NON-NLS-1$
public static final String ICON_SYSTEM_MOVEUP = ICON_ACTIONS_DIR + ICON_SYSTEM_MOVEUP_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_MOVEUP_ID = PREFIX+ICON_SYSTEM_MOVEUP_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_MOVEDOWN_ROOT = "down"; //$NON-NLS-1$
public static final String ICON_SYSTEM_MOVEDOWN = ICON_ACTIONS_DIR + ICON_SYSTEM_MOVEDOWN_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_MOVEDOWN_ID = PREFIX+ICON_SYSTEM_MOVEDOWN_ROOT+ICON_SUFFIX;
@@ -169,11 +169,11 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_CLEAR_ROOT = "clear"; //$NON-NLS-1$
public static final String ICON_SYSTEM_CLEAR = ICON_ACTIONS_DIR + ICON_SYSTEM_CLEAR_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_CLEAR_ID = PREFIX+ICON_SYSTEM_CLEAR_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_CLEAR_ALL_ROOT = "clearall"; //$NON-NLS-1$
public static final String ICON_SYSTEM_CLEAR_ALL = ICON_ACTIONS_DIR + ICON_SYSTEM_CLEAR_ALL_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_CLEAR_ALL_ID = PREFIX+ICON_SYSTEM_CLEAR_ALL_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_CLEAR_SELECTED_ROOT = "clearselected"; //$NON-NLS-1$
public static final String ICON_SYSTEM_CLEAR_SELECTED = ICON_ACTIONS_DIR + ICON_SYSTEM_CLEAR_SELECTED_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_CLEAR_SELECTED_ID = PREFIX+ICON_SYSTEM_CLEAR_SELECTED_ROOT+ICON_SUFFIX;
@@ -185,27 +185,32 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_RUN_ROOT = "run"; //$NON-NLS-1$
public static final String ICON_SYSTEM_RUN = ICON_ACTIONS_DIR + ICON_SYSTEM_RUN_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_RUN_ID = PREFIX+ICON_SYSTEM_RUN_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_STOP_ROOT = "stop"; //$NON-NLS-1$
public static final String ICON_SYSTEM_STOP = ICON_ACTIONS_DIR + ICON_SYSTEM_STOP_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_STOP_ID = PREFIX+ICON_SYSTEM_STOP_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_RENAME_ROOT = "rename"; //$NON-NLS-1$
public static final String ICON_SYSTEM_RENAME = ICON_ACTIONS_DIR + ICON_SYSTEM_RENAME_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_RENAME_ID = PREFIX+ICON_SYSTEM_RENAME_ROOT+ICON_SUFFIX;
public static final String ICON_IDE_REFRESH_ID = "elcl16/refresh_nav.gif"; //$NON-NLS-1$
- public static final String ICON_IDE_COLLAPSEALL_ID = "elcl16/collapseall.gif"; //$NON-NLS-1$
public static final String ICON_IDE_LINKTOEDITOR_ID = "elcl16/synced.gif"; //$NON-NLS-1$
public static final String ICON_IDE_FILTER_ID = "elcl16/filter_ps.gif"; //$NON-NLS-1$
+ /**
+ * @deprecated use {@link org.eclipse.ui.ISharedImages} via
+ * PlatformUI.getWorkbench().getSharedImages()
+ */
+ public static final String ICON_IDE_COLLAPSEALL_ID = "elcl16/collapseall.gif"; //$NON-NLS-1$
+
public static final String ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT = "makeprofileactive"; //$NON-NLS-1$
public static final String ICON_SYSTEM_MAKEPROFILEACTIVE = ICON_ACTIONS_DIR + ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_MAKEPROFILEACTIVE_ID = PREFIX+ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT+ICON_SUFFIX;
+ public static final String ICON_SYSTEM_MAKEPROFILEACTIVE_ID = PREFIX+ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT+ICON_SUFFIX;
public static final String ICON_SYSTEM_MAKEPROFILEINACTIVE_ROOT = "makeprofileinactive"; //$NON-NLS-1$
public static final String ICON_SYSTEM_MAKEPROFILEINACTIVE = ICON_ACTIONS_DIR + ICON_SYSTEM_MAKEPROFILEINACTIVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_MAKEPROFILEINACTIVE_ID = PREFIX+ICON_SYSTEM_MAKEPROFILEINACTIVE_ROOT+ICON_SUFFIX;
+ public static final String ICON_SYSTEM_MAKEPROFILEINACTIVE_ID = PREFIX+ICON_SYSTEM_MAKEPROFILEINACTIVE_ROOT+ICON_SUFFIX;
public static final String ICON_SYSTEM_CHANGEFILTER_ROOT = "editfilter"; //$NON-NLS-1$
public static final String ICON_SYSTEM_CHANGEFILTER = ICON_ACTIONS_DIR + ICON_SYSTEM_CHANGEFILTER_ROOT+ICON_EXT;
@@ -214,7 +219,7 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_SELECTPROFILE_ROOT = "selectprofile"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SELECTPROFILE = ICON_ACTIONS_DIR + ICON_SYSTEM_SELECTPROFILE_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_SELECTPROFILE_ID = PREFIX+ICON_SYSTEM_SELECTPROFILE_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_SELECTFILTERPOOLS_ROOT = "selectpool"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SELECTFILTERPOOLS = ICON_ACTIONS_DIR + ICON_SYSTEM_SELECTFILTERPOOLS_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_SELECTFILTERPOOLS_ID = PREFIX+ICON_SYSTEM_SELECTFILTERPOOLS_ROOT+ICON_SUFFIX;
@@ -226,11 +231,11 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_SHOW_TABLE_ROOT = "systemshowintable"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SHOW_TABLE = ICON_ACTIONS_DIR + ICON_SYSTEM_SHOW_TABLE_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_SHOW_TABLE_ID = PREFIX + ICON_SYSTEM_SHOW_TABLE_ROOT + ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_SHOW_MONITOR_ROOT = "monitor_view"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SHOW_MONITOR = ICON_ACTIONS_DIR + ICON_SYSTEM_SHOW_MONITOR_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_SHOW_MONITOR_ID = PREFIX + ICON_SYSTEM_SHOW_MONITOR_ROOT + ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_SHOW_SHELL_ROOT = "systemshell"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SHOW_SHELL = ICON_ACTIONS_DIR + ICON_SYSTEM_SHOW_SHELL_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_SHOW_SHELL_ID = PREFIX + ICON_SYSTEM_SHOW_SHELL_ROOT + ICON_SUFFIX;
@@ -243,50 +248,50 @@ public interface ISystemIconConstants
public static final String ICON_OBJS_DIR = "full/obj16/"; //$NON-NLS-1$
public static final String ICON_SYSTEM_ERROR_ROOT = "error"; //$NON-NLS-1$
public static final String ICON_SYSTEM_ERROR_ID = PREFIX + ICON_SYSTEM_ERROR_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_ERROR = ICON_OBJS_DIR + ICON_SYSTEM_ERROR_ROOT + ICON_EXT;
+ public static final String ICON_SYSTEM_ERROR = ICON_OBJS_DIR + ICON_SYSTEM_ERROR_ROOT + ICON_EXT;
// info is to be used in dialogs
public static final String ICON_SYSTEM_INFO_ROOT = "info"; //$NON-NLS-1$
public static final String ICON_SYSTEM_INFO_ID = PREFIX + ICON_SYSTEM_INFO_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_INFO = ICON_OBJS_DIR + ICON_SYSTEM_INFO_ROOT + ICON_EXT;
-
+ public static final String ICON_SYSTEM_INFO = ICON_OBJS_DIR + ICON_SYSTEM_INFO_ROOT + ICON_EXT;
+
// systeminfo is to be used in tree view
public static final String ICON_SYSTEM_INFO_TREE_ROOT = "systeminfo"; //$NON-NLS-1$
public static final String ICON_SYSTEM_INFO_TREE_ID = PREFIX + ICON_SYSTEM_INFO_TREE_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_INFO_TREE = ICON_OBJS_DIR + ICON_SYSTEM_INFO_TREE_ROOT + ICON_EXT;
+ public static final String ICON_SYSTEM_INFO_TREE = ICON_OBJS_DIR + ICON_SYSTEM_INFO_TREE_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_HELP_ROOT = "systemhelp"; //$NON-NLS-1$
public static final String ICON_SYSTEM_HELP_ID = PREFIX + ICON_SYSTEM_HELP_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_HELP = ICON_OBJS_DIR + ICON_SYSTEM_HELP_ROOT + ICON_EXT;
-
+ public static final String ICON_SYSTEM_HELP = ICON_OBJS_DIR + ICON_SYSTEM_HELP_ROOT + ICON_EXT;
+
public static final String ICON_SYSTEM_CANCEL_ROOT = "systemcancel"; //$NON-NLS-1$
public static final String ICON_SYSTEM_CANCEL_ID = PREFIX + ICON_SYSTEM_CANCEL_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_CANCEL = ICON_OBJS_DIR + ICON_SYSTEM_CANCEL_ROOT + ICON_EXT;
+ public static final String ICON_SYSTEM_CANCEL = ICON_OBJS_DIR + ICON_SYSTEM_CANCEL_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_EMPTY_ROOT = "systemempty"; //$NON-NLS-1$
public static final String ICON_SYSTEM_EMPTY_ID = PREFIX + ICON_SYSTEM_EMPTY_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_EMPTY = ICON_OBJS_DIR + ICON_SYSTEM_EMPTY_ROOT + ICON_EXT;
+ public static final String ICON_SYSTEM_EMPTY = ICON_OBJS_DIR + ICON_SYSTEM_EMPTY_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_OK_ROOT = "systemok"; //$NON-NLS-1$
public static final String ICON_SYSTEM_OK_ID = PREFIX + ICON_SYSTEM_OK_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_OK = ICON_OBJS_DIR + ICON_SYSTEM_OK_ROOT + ICON_EXT;
+ public static final String ICON_SYSTEM_OK = ICON_OBJS_DIR + ICON_SYSTEM_OK_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_WARNING_ROOT = "warning"; //$NON-NLS-1$
public static final String ICON_SYSTEM_WARNING_ID = PREFIX + ICON_SYSTEM_WARNING_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_WARNING = ICON_OBJS_DIR + ICON_SYSTEM_WARNING_ROOT + ICON_EXT;
+ public static final String ICON_SYSTEM_WARNING = ICON_OBJS_DIR + ICON_SYSTEM_WARNING_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_BLANK_ROOT = "systemblank"; // not used yet //$NON-NLS-1$
public static final String ICON_SYSTEM_BLANK_ID = PREFIX + ICON_SYSTEM_BLANK_ROOT + ICON_SUFFIX;
public static final String ICON_SYSTEM_BLANK = ICON_OBJS_DIR + ICON_SYSTEM_BLANK_ROOT + ICON_EXT;
-
+
public static final String ICON_SYSTEM_SEARCH_ROOT = "system_search"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SEARCH_ID = PREFIX + ICON_SYSTEM_SEARCH_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_SEARCH = ICON_OBJS_DIR + ICON_SYSTEM_SEARCH_ROOT + ICON_EXT;
-
+ public static final String ICON_SYSTEM_SEARCH = ICON_OBJS_DIR + ICON_SYSTEM_SEARCH_ROOT + ICON_EXT;
+
public static final String ICON_SYSTEM_SEARCH_RESULT_ROOT = "systemsearchresult"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SEARCH_RESULT_ID = PREFIX + ICON_SYSTEM_SEARCH_RESULT_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_SEARCH_RESULT = ICON_OBJS_DIR + ICON_SYSTEM_SEARCH_RESULT_ROOT + ICON_EXT;
-
+ public static final String ICON_SYSTEM_SEARCH_RESULT = ICON_OBJS_DIR + ICON_SYSTEM_SEARCH_RESULT_ROOT + ICON_EXT;
+
public static final String ICON_SYSTEM_PERSPECTIVE_ROOT ="system_persp"; //$NON-NLS-1$
public static final String ICON_SYSTEM_PERSPECTIVE_ID = PREFIX + ICON_SYSTEM_PERSPECTIVE_ROOT + ICON_SUFFIX;
public static final String ICON_SYSTEM_PERSPECTIVE = ICON_OBJS_DIR + ICON_SYSTEM_PERSPECTIVE_ROOT + ICON_EXT;
@@ -296,20 +301,20 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_ARROW_UP_ROOT = "arrowup_obj"; //$NON-NLS-1$
public static final String ICON_SYSTEM_ARROW_UP = ICON_OBJS_DIR + ICON_SYSTEM_ARROW_UP_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_ARROW_UP_ID = PREFIX+ICON_SYSTEM_ARROW_UP_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_ARROW_DOWN_ROOT = "arrowdown_obj"; //$NON-NLS-1$
public static final String ICON_SYSTEM_ARROW_DOWN = ICON_OBJS_DIR + ICON_SYSTEM_ARROW_DOWN_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_ARROW_DOWN_ID = PREFIX+ICON_SYSTEM_ARROW_DOWN_ROOT+ICON_SUFFIX;
-
-
+
+
public static final String ICON_SYSTEM_CONNECTOR_SERVICE_ROOT = "connectorservice_obj"; //$NON-NLS-1$
public static final String ICON_SYSTEM_CONNECTOR_SERVICE = ICON_OBJS_DIR + ICON_SYSTEM_CONNECTOR_SERVICE_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_CONNECTOR_SERVICE_ID = PREFIX+ICON_SYSTEM_CONNECTOR_SERVICE_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_SERVICE_ROOT = "service_obj"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SERVICE = ICON_OBJS_DIR + ICON_SYSTEM_SERVICE_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_SERVICE_ID = PREFIX+ICON_SYSTEM_SERVICE_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SYSTEM_LAUNCHER_CONFIGURATION_ROOT = "launcher_config_obj"; //$NON-NLS-1$
public static final String ICON_SYSTEM_LAUNCHER_CONFIGURATION = ICON_OBJS_DIR + ICON_SYSTEM_LAUNCHER_CONFIGURATION_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_LAUNCHER_CONFIGURATION_ID = PREFIX+ICON_SYSTEM_LAUNCHER_CONFIGURATION_ROOT+ICON_SUFFIX;
@@ -317,17 +322,17 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_PROPERTIES_ROOT = "properties_obj"; //$NON-NLS-1$
public static final String ICON_SYSTEM_PROPERTIES = ICON_OBJS_DIR + ICON_SYSTEM_PROPERTIES_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_PROPERTIES_ID = PREFIX+ICON_SYSTEM_PROPERTIES_ROOT+ICON_SUFFIX;
-
+
public static final String ICON_SEARCH_REMOVE_SELECTED_MATCHES_ROOT = "searchremoveselected"; //$NON-NLS-1$
public static final String ICON_SEARCH_REMOVE_SELECTED_MATCHES = ICON_ACTIONS_DIR + ICON_SEARCH_REMOVE_SELECTED_MATCHES_ROOT + ICON_EXT;
public static final String ICON_SEARCH_REMOVE_SELECTED_MATCHES_ID = PREFIX + ICON_SEARCH_REMOVE_SELECTED_MATCHES_ROOT + ICON_SUFFIX;
-
+
public static final String ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT = "searchremoveall"; //$NON-NLS-1$
public static final String ICON_SEARCH_REMOVE_ALL_MATCHES = ICON_ACTIONS_DIR + ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT + ICON_EXT;
public static final String ICON_SEARCH_REMOVE_ALL_MATCHES_ID = PREFIX + ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT + ICON_SUFFIX;
-
+
// we reuse the Remove all matches action icon
- public static final String ICON_SEARCH_CLEAR_HISTORY_ROOT = ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT;
+ public static final String ICON_SEARCH_CLEAR_HISTORY_ROOT = ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT;
public static final String ICON_SEARCH_CLEAR_HISTORY = ICON_ACTIONS_DIR + ICON_SEARCH_CLEAR_HISTORY_ROOT + ICON_EXT;
public static final String ICON_SEARCH_CLEAR_HISTORY_ID = PREFIX + ICON_SEARCH_CLEAR_HISTORY_ROOT + ICON_SUFFIX;
}
\ No newline at end of file
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java
index 817fc90..8f97034 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
+ * 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
@@ -16,6 +16,7 @@
* David McKnight (IBM) - [243263] NPE on expanding a filter
* David McKnight (IBM) - [244454] SystemBasePlugin.getWorkBench() incorrectly returns null when called during Eclipse startup
* David McKnight (IBM) [246406] [performance] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup
+ * Martin Oberhuber (Wind River) - [246406] Timeout waiting when loading RSE
********************************************************************************/
package org.eclipse.rse.ui;
@@ -58,9 +59,13 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
// static variables
private static SystemBasePlugin baseInst = null;
- /**
- * Logger object for logging messages for servicing purposes.
- */
+ /**
+ * Logger object for logging messages for servicing purposes.
+ *
+ * @deprecated do not use use this directly, use {@link #getLogger()}
+ * instead for lazy loading of the Logger. We do not guarantee
+ * that this variable is ever initialized.
+ */
protected static Logger log = null;
/**
@@ -343,7 +348,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
boolean ok = false;
try {
URL url = bundle.getEntry("/"+fileName); //$NON-NLS-1$
- if (url != null) {
+ if (url != null) {
mf = SystemUIMessageFile.getMessageFile(fileName, url);
ok = true;
}
@@ -459,19 +464,19 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
switch (type)
{
case SystemMessage.ERROR:
- log.logError(message.toString(), ex);
+ getBaseDefault().getLogger().logError(message.toString(), ex);
break;
case SystemMessage.WARNING:
- log.logWarning(message.toString(), ex);
+ getBaseDefault().getLogger().logWarning(message.toString(), ex);
break;
case SystemMessage.INFORMATION:
case SystemMessage.COMPLETION:
- log.logInfo(message.toString(), ex);
+ getBaseDefault().getLogger().logInfo(message.toString(), ex);
break;
case SystemMessage.INQUIRY:
case SystemMessage.UNEXPECTED:
default:
- log.logInfo(message.toString(), ex);
+ getBaseDefault().getLogger().logInfo(message.toString(), ex);
break;
}
}
@@ -488,7 +493,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
*/
public static void logInfo(String message)
{
- log.logInfo(message);
+ getBaseDefault().getLogger().logInfo(message);
}
// -----------------
@@ -508,7 +513,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
*/
public static void logWarning(String message)
{
- log.logWarning(message);
+ getBaseDefault().getLogger().logWarning(message);
}
/**
@@ -523,7 +528,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
*/
public static void logError(String message)
{
- log.logError(message, null);
+ getBaseDefault().getLogger().logError(message, null);
}
/**
@@ -541,7 +546,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
*/
public static void logError(String message, Throwable exception)
{
- log.logError(message, exception);
+ getBaseDefault().getLogger().logError(message, exception);
}
/**
@@ -556,7 +561,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
*/
public static void logDebugMessage(String prefix, String message)
{
- log.logDebugMessage(prefix, message);
+ getBaseDefault().getLogger().logDebugMessage(prefix, message);
}
/**
@@ -609,11 +614,8 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
super.start(context);
- // logger
- if (log == null) {
- log = LoggerFactory.getLogger(this);
- log.logInfo("Loading " + this.getClass()); //$NON-NLS-1$
- }
+ // // bug 246406: initialize the logger lazily
+ // getLogger();
addWindowListener();
}
@@ -622,7 +624,9 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- logDebugMessage(this.getClass().getName(), "SHUTDOWN"); //$NON-NLS-1$
+ if (Logger.DEBUG) {
+ logDebugMessage(this.getClass().getName(), "SHUTDOWN"); //$NON-NLS-1$
+ }
LoggerFactory.freeLogger(this);
super.stop(context);
}
@@ -739,12 +743,16 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
}
/**
- * Returns an image descriptor from the base IDE. Looks only in the "icons/full/" directories.
+ * Returns an image descriptor from the base IDE. Looks only in the
+ * "icons/full/" directories.
*
- * @see org.eclipse.ui.views.navigator.ResourceNavigatorActionGroup#getImageDescriptor(java.lang.String)
+ * @deprecated use {@link org.eclipse.ui.ISharedImages} via
+ * PlatformUI.getWorkbench().getSharedImages()
*/
public ImageDescriptor getImageDescriptorFromIDE(String relativePath)
{
+ // This code is from
+ // org.eclipse.ui.views.navigator.ResourceNavigatorActionGroup#getImageDescriptor(java.lang.String)
Hashtable registry = getImageDescriptorRegistry();
ImageDescriptor descriptor = (ImageDescriptor)registry.get(relativePath);
if (descriptor == null) {
@@ -778,6 +786,11 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin
*/
public Logger getLogger()
{
+ // logger
+ if (log == null) {
+ log = LoggerFactory.getLogger(this);
+ log.logInfo("Loading " + this.getClass()); //$NON-NLS-1$
+ }
return log;
}
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java
index 9cdccd7..ca5cb5e 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation. All rights reserved.
+ * Copyright (c) 2000, 2009 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -18,17 +18,14 @@
* David McKnight (IBM) - [237300] Problem with setDefaultHistory for SystemHistoryCombo.
* David McKnight (IBM) - [240991] RSE startup creates display on worker thread before workbench.
* David McKnight (IBM) - [240991] Avoiding calling SystemBasePluging.getWorkbench()
+ * Martin Oberhuber (Wind River) - [246406] Timeout waiting when loading RSE
********************************************************************************/
package org.eclipse.rse.ui;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.rse.core.IRSEPreferenceNames;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.events.ISystemModelChangeEvent;
@@ -39,8 +36,10 @@ import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
import org.eclipse.rse.core.events.ISystemResourceChangeListener;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
/**
* A utility class that encapsulates all global preferences for the remote system framework
@@ -493,28 +492,26 @@ public class SystemPreferencesManager {
if (!alreadyListening) {
// FIXME bug 240991: With the current workaround, we might miss events
- // Instead of adding the listener deferred in a job, the SystemRegistry
+ // Instead of adding the listener deferred, the SystemRegistry
// should send events via the IRSEInteractionProvider
- Job addListenerJob = new Job("Add Listener"){ //$NON-NLS-1$
- public IStatus run(IProgressMonitor monitor){
- while (!PlatformUI.isWorkbenchRunning()){
- try {
- //Checks in the loop are fast enough so we can poll often
- Thread.sleep(100);
+ Bundle bnd = RSEUIPlugin.getDefault().getBundle();
+ if (bnd.getState() == Bundle.ACTIVE) {
+ // addListenerJob.schedule();
+ fModelChangeListener = new ModelChangeListener();
+ RSECorePlugin.getTheSystemRegistry().addSystemModelChangeListener(fModelChangeListener);
+ } else {
+ final BundleContext ctx = bnd.getBundleContext();
+ ctx.addBundleListener(new BundleListener() {
+ public void bundleChanged(BundleEvent event) {
+ if (event.getType() == BundleEvent.STARTED) {
+ // addListenerJob.schedule();
+ fModelChangeListener = new ModelChangeListener();
+ RSECorePlugin.getTheSystemRegistry().addSystemModelChangeListener(fModelChangeListener);
+ ctx.removeBundleListener(this);
}
- catch (InterruptedException e){}
}
-
- IWorkbench wb = PlatformUI.getWorkbench();
- if (!wb.isClosing()) {
- fModelChangeListener = new ModelChangeListener();
- RSECorePlugin.getTheSystemRegistry().addSystemModelChangeListener(fModelChangeListener);
- }
- return Status.OK_STATUS;
- }
- };
- addListenerJob.setSystem(true);
- addListenerJob.schedule();
+ });
+ }
}
}
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
index bc42afd..1baad89 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
@@ -1,22 +1,23 @@
/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
+ * 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
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
+ *
* Contributors:
- * Javier Montalvo Orús (Symbian) - Bug 149151: New Connection first page should use a Listbox for systemtype
+ * Javier Montalvo Orús (Symbian) - Bug 149151: New Connection first page should use a Listbox for systemtype
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [181939] avoid subsystem plugin activation just for enablement checking
* David Dykstal (IBM) - [231666] special colon processing for french locales
+ * Zhou Renjian (Kortide) - [282242] "LOCALHOST" as host name for first time connection creation
********************************************************************************/
package org.eclipse.rse.ui;
@@ -139,8 +140,8 @@ public class SystemWidgetHelpers {
/**
* Creates composite control and sets the default layout data.
- * @param parent GridLayout composite to put the new group composite into.
- * @param numColumns Number of columns the new group will contain.
+ * @param parent GridLayout composite to put the new group composite into.
+ * @param numColumns Number of columns the new group will contain.
*/
public static Composite createComposite(Composite parent, int numColumns) {
boolean testing = false; //true;
@@ -153,7 +154,7 @@ public class SystemWidgetHelpers {
/**
* Creates group composite control and sets the default layout data.
* Group composites show a visible border line and optional text in it.
- * @param parent GridLayout composite to put the new group composite into.
+ * @param parent GridLayout composite to put the new group composite into.
* @param numColumns Number of columns the new group will contain.
* @param label Text to display in the group border. Can be null.
*/
@@ -164,8 +165,8 @@ public class SystemWidgetHelpers {
/**
* Creates "tight" composite control and sets the default layout data.
* A tight composite is one with no vertical or horizontal spacing, or margin spacing.
- * @param parent GridLayout composite to put the new group composite into.
- * @param numColumns Number of columns the new group will contain.
+ * @param parent GridLayout composite to put the new group composite into.
+ * @param numColumns Number of columns the new group will contain.
*/
public static Composite createTightComposite(Composite parent, int numColumns) {
return createComposite(parent, 1, numColumns, false, null, 0, 0);
@@ -174,8 +175,8 @@ public class SystemWidgetHelpers {
/**
* Creates "flush" composite control and sets the default layout data.
* A flush composite is one with no margin spacing but normal inter-component spacing
- * @param parent GridLayout composite to put the new group composite into.
- * @param numColumns Number of columns the new group will contain.
+ * @param parent GridLayout composite to put the new group composite into.
+ * @param numColumns Number of columns the new group will contain.
*/
public static Composite createFlushComposite(Composite parent, int numColumns) {
return createComposite(parent, 1, numColumns, false, null, 0, -1);
@@ -207,7 +208,7 @@ public class SystemWidgetHelpers {
/**
* Creates a label instance and inserts it into a given GridLayout.
* @param parent GridLayout composite to put the field into.
- * @param text Text to display in the label.
+ * @param text Text to display in the label.
*/
public static Label createLabel(Composite parent, String text) {
return createLabel(parent, text, 1);
@@ -216,7 +217,7 @@ public class SystemWidgetHelpers {
/**
* Creates a label instance and inserts it into a given GridLayout.
* @param parent Composite to put the field into.
- * @param text Text to display in the label.
+ * @param text Text to display in the label.
* @param span Horizontal span
*/
public static Label createLabel(Composite parent, String text, int span) {
@@ -227,7 +228,7 @@ public class SystemWidgetHelpers {
* Creates a label instance and inserts it into a given GridLayout, optionally
* with a border style
* @param parent Composite to put the field into.
- * @param text Text to display in the label.
+ * @param text Text to display in the label.
* @param span Horizontal span
* @param wantBorder true to place border around the label
*/
@@ -253,7 +254,7 @@ public class SystemWidgetHelpers {
* @param text
* @param tooltip
*/
- public static Label createLabel(Composite parent, String text, String tooltip)
+ public static Label createLabel(Composite parent, String text, String tooltip)
{
Label label = createLabel(parent, text);
setToolTipText(label, tooltip);
@@ -268,7 +269,7 @@ public class SystemWidgetHelpers {
* @param span Horizontal span
* @param wantBorder true to place border around the label
*/
- public static Label createLabel(Composite parent, String text, String tooltip, int span, boolean wantBorder)
+ public static Label createLabel(Composite parent, String text, String tooltip, int span, boolean wantBorder)
{
Label label = createLabel(parent, text, span, wantBorder);
setToolTipText(label, tooltip);
@@ -280,12 +281,12 @@ public class SystemWidgetHelpers {
* is appended to the text of the first label. The text value of the second will be set to "".
* <p>
* The first label is set to not grab excess horizontal space, while the second one is, since
- * its contents are variable.
+ * its contents are variable.
* <p>
* To help with initial sizing, the widthHint of the second is set to 100.
* <p>
* If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
- *
+ *
* @param parent composite to put the fields into. Will be added sequentially
* @param label
* @param tooltip
@@ -330,7 +331,7 @@ public class SystemWidgetHelpers {
label.setLayoutData(data);
}
-
+
/**
* Creates a widget for displaying text verbiage that spans multiple lines. Takes resolved text vs resource bundle id.
@@ -386,7 +387,7 @@ public class SystemWidgetHelpers {
/**
* Create a label to show a command string as it is being built-up in a dialog.
- * This version allows you specify how tall to make it, in terms of normal line height.
+ * This version allows you specify how tall to make it, in terms of normal line height.
*/
public static Label createCommandStatusLine(Composite parent, int horizontalSpan, int heightInLines) {
Label commandSoFar = new Label(parent, SWT.LEFT | SWT.WRAP);
@@ -394,7 +395,7 @@ public class SystemWidgetHelpers {
//System.out.println("Default label height = " + dx); ALWAYS 0!
if (dx == 0)
//dx = 12; // what else?
- dx = 15; // d47377
+ dx = 15; // d47377
GridData data = new GridData();
data.horizontalSpan = horizontalSpan;
data.horizontalAlignment = GridData.FILL;
@@ -468,7 +469,7 @@ public class SystemWidgetHelpers {
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
- data.widthHint = 150; // defect 45789
+ data.widthHint = 150; // defect 45789
data.verticalAlignment = GridData.CENTER;
data.grabExcessVerticalSpace = false;
text.setLayoutData(data);
@@ -481,7 +482,7 @@ public class SystemWidgetHelpers {
* @param parent composite to put the field into.
* @param toolTip
*/
- public static Text createReadonlyTextField(Composite parent, String toolTip)
+ public static Text createReadonlyTextField(Composite parent, String toolTip)
{
Text text = createReadonlyTextField(parent);
setToolTipText(text, toolTip);
@@ -550,7 +551,7 @@ public class SystemWidgetHelpers {
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the checkbox into.
* @param label to display in the checkbox.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
*/
public static Button createCheckBox(Composite group, String label, Listener listener) {
return createCheckBox(group, 1, label, listener);
@@ -563,7 +564,7 @@ public class SystemWidgetHelpers {
* @param group composite to put the checkbox into.
* @param horizontalSpan number of columns this checkbox is to span.
* @param label to display in the checkbox.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
*/
public static Button createCheckBox(Composite group, int horizontalSpan, String label, Listener listener) {
Button button = new Button(group, SWT.CHECK | SWT.LEFT);
@@ -583,11 +584,11 @@ public class SystemWidgetHelpers {
* layout data, and sets the tooltip text.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the checkbox into.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param label the label
* @param tooltip the tooltip
*/
- public static Button createCheckBox(Composite group, Listener listener, String label, String tooltip)
+ public static Button createCheckBox(Composite group, Listener listener, String label, String tooltip)
{
Button button = createCheckBox(group, label, listener);
setToolTipText(button, tooltip);
@@ -599,12 +600,12 @@ public class SystemWidgetHelpers {
* layout data, and sets the tooltip text.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the checkbox into.
- * @param horizontalSpan number of columns to span.
- * @param listener object to listen for events. Can be null.
+ * @param horizontalSpan number of columns to span.
+ * @param listener object to listen for events. Can be null.
* @param label the label
* @param tooltip the tooltip
*/
- public static Button createCheckBox(Composite group, int horizontalSpan, Listener listener, String label, String tooltip)
+ public static Button createCheckBox(Composite group, int horizontalSpan, Listener listener, String label, String tooltip)
{
Button button = createCheckBox(group, horizontalSpan, label, listener);
setToolTipText(button, tooltip);
@@ -617,7 +618,7 @@ public class SystemWidgetHelpers {
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
* @param label to display in the button
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
*/
public static Button createRadioButton(Composite group, String label, Listener listener) {
Button button = new Button(group, SWT.RADIO | SWT.LEFT);
@@ -637,26 +638,26 @@ public class SystemWidgetHelpers {
* layout data, and assigns tooltip text.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param label the label
* @param tooltip the tooltip
*/
- public static Button createRadioButton(Composite group, Listener listener, String label, String tooltip)
+ public static Button createRadioButton(Composite group, Listener listener, String label, String tooltip)
{
Button button = createRadioButton(group, label, listener);
setToolTipText(button, tooltip);
return button;
}
-
+
/**
* Creates a new radiobutton instance and sets the default
* layout data, and assigns tooltip text.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param label the label
*/
- public static Button createRadioButton(Composite group, Listener listener, String label)
+ public static Button createRadioButton(Composite group, Listener listener, String label)
{
Button button = createRadioButton(group, label, listener);
return button;
@@ -668,7 +669,7 @@ public class SystemWidgetHelpers {
* Assign the listener to the passed in implementer of Listener.
* @param group The composite to put the button into.
* @param image The image to display in the button
- * @param listener The object to listen for events. Can be null.
+ * @param listener The object to listen for events. Can be null.
*/
public static Button createImageButton(Composite group, Image image, Listener listener) {
Button button = new Button(group, SWT.PUSH);
@@ -688,7 +689,7 @@ public class SystemWidgetHelpers {
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
* @param label to display in the button
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
*/
public static Button createPushButton(Composite group, String label, Listener listener) {
Button button = new Button(group, SWT.PUSH);
@@ -708,7 +709,7 @@ public class SystemWidgetHelpers {
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
* @param label to display in the button
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param tooltip the tooltip
*/
public static Button createPushButton(Composite group, String label, Listener listener, String tooltip) {
@@ -718,14 +719,14 @@ public class SystemWidgetHelpers {
}
/**
- * This one takes the resource bundle key and appends "label" and "tooltip" to it to
+ * This one takes the resource bundle key and appends "label" and "tooltip" to it to
* get the label and tooltip text.
* @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param label the label
* @param tooltip the tooltip
*/
- public static Button createPushButton(Composite group, Listener listener, String label, String tooltip)
+ public static Button createPushButton(Composite group, Listener listener, String label, String tooltip)
{
Button button = createPushButton(group, label, listener);
setToolTipText(button, tooltip);
@@ -737,9 +738,9 @@ public class SystemWidgetHelpers {
* layout data.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
*/
- public static Button createBrowseButton(Composite group, Listener listener)
+ public static Button createBrowseButton(Composite group, Listener listener)
{
String label = SystemResources.BUTTON_BROWSE;
return createPushButton(group, label, listener);
@@ -749,8 +750,8 @@ public class SystemWidgetHelpers {
* layout data, with tooltip text.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
- * @param tooltip the tooltip text
+ * @param listener object to listen for events. Can be null.
+ * @param tooltip the tooltip text
* @deprecated
*/
public static Button createBrowseButton(Composite group, Listener listener, String tooltip) {
@@ -758,14 +759,14 @@ public class SystemWidgetHelpers {
return createPushButton(group, label, listener, tooltip);
}
-
+
/**
* Creates a new listbox instance and sets the default
* layout data.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
* @param label to display above the list box (can be null).
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param multiSelect true if this is to be a multiple selection list. False for single selection.
*/
public static List createListBox(Composite group, String label, Listener listener, boolean multiSelect) {
@@ -778,7 +779,7 @@ public class SystemWidgetHelpers {
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
* @param label to display above the list box (can be null).
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param multiSelect true if this is to be a multiple selection list. False for single selection.
* @param columnSpan number of columns this should span
*/
@@ -817,7 +818,7 @@ public class SystemWidgetHelpers {
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
* @param label to display above the list box (can be null).
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param multiSelect true if this is to be a multiple selection list. False for single selection.
* @param tooltip the tooltip
*/
@@ -832,7 +833,7 @@ public class SystemWidgetHelpers {
* layout data.
* Assign the listener to the passed in implementer of Listener.
* @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
+ * @param listener object to listen for events. Can be null.
* @param multiSelect true if this is to be a multiple selection list. False for single selection.
* @param label the label
* @param tooltip the tooltip
@@ -848,7 +849,7 @@ public class SystemWidgetHelpers {
* layout data.
* Assign the listener to the passed in implementer of Listener.
* @param parent composite to put the button into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
*/
public static Combo createCombo(Composite parent, Listener listener) {
@@ -878,11 +879,11 @@ public class SystemWidgetHelpers {
* layout data, with tooltip text.
* Assign the listener to the passed in implementer of Listener.
* @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param toolTip tooltip text
+ * @param toolTip tooltip text
*/
- public static Combo createCombo(Composite parent, Listener listener, String toolTip)
+ public static Combo createCombo(Composite parent, Listener listener, String toolTip)
{
Combo combo = createCombo(parent, listener);
setToolTipText(combo, toolTip);
@@ -896,13 +897,13 @@ public class SystemWidgetHelpers {
* If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
*
* @param parent composite to put the field into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
* @param label the label text
* @param tooltip the tooltip for the combo field
* @return Combo created.
*/
- public static Combo createLabeledCombo(Composite parent, Listener listener, String label, String tooltip)
+ public static Combo createLabeledCombo(Composite parent, Listener listener, String label, String tooltip)
{
previousLabel = createLabel(parent, appendColon(label));
Combo entry = createCombo(parent, listener, tooltip);
@@ -915,7 +916,7 @@ public class SystemWidgetHelpers {
* layout data.
* Assign the listener to the passed in implementer of Listener.
* @param parent composite to put the button into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
*/
public static Combo createReadonlyCombo(Composite parent, Listener listener) {
@@ -930,11 +931,11 @@ public class SystemWidgetHelpers {
* layout data, with tooltip text.
* Assign the listener to the passed in implementer of Listener.
* @param parent composite to put the button into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
* @param tooltip
*/
- public static Combo createReadonlyCombo(Composite parent, Listener listener, String tooltip)
+ public static Combo createReadonlyCombo(Composite parent, Listener listener, String tooltip)
{
Combo combo = createReadonlyCombo(parent, listener);
setToolTipText(combo, tooltip);
@@ -948,13 +949,13 @@ public class SystemWidgetHelpers {
* If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
*
* @param parent composite to put the field into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
* @param labelText the label
* @param tooltip the tooltip
* @return Combo created.
*/
- public static Combo createLabeledReadonlyCombo(Composite parent, Listener listener, String labelText, String tooltip)
+ public static Combo createLabeledReadonlyCombo(Composite parent, Listener listener, String labelText, String tooltip)
{
labelText = appendColon(labelText);
previousLabel = createLabel(parent, labelText);
@@ -973,13 +974,13 @@ public class SystemWidgetHelpers {
* of that persistence is handled for you!.
* <p>
* @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
* @param historyKey the preferences key (any unique string) to use to persist this combo's history
* @param readonly true if this combo is to be readonly, forcing user to select from the history
* @param tooltip the tooltip
*/
- public static SystemHistoryCombo createHistoryCombo(Composite parent, SelectionListener listener, String historyKey, boolean readonly, String tooltip)
+ public static SystemHistoryCombo createHistoryCombo(Composite parent, SelectionListener listener, String historyKey, boolean readonly, String tooltip)
{
SystemHistoryCombo combo = new SystemHistoryCombo(parent, SWT.NULL, historyKey, readonly);
if (listener != null)
@@ -1018,21 +1019,21 @@ public class SystemWidgetHelpers {
* It has a "Connection:" prompt in front of it and optionally a "New..." button beside it.
* <p>
* @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
+ * @param listener object to listen for selection events. Can be null.
* If you want to listen for modify events, call addSelectionListener(...) on your own.
- * @param systemTypes array of system types to subset connection list by. Specify a single entry of '*' for
- * all system types. Specify this <i>OR</i> specify factory <i>OR</i> specify factoryCategory
+ * @param systemTypes array of system types to subset connection list by. Specify a single entry of '*' for
+ * all system types. Specify this <i>OR</i> specify factory <i>OR</i> specify factoryCategory
* <i>OR</i> specify factory Id
* @param factory the subsystem factory to subset connection list by. Only connections with a subsystem
* owned by this factory are listed. Specify this <i>OR</i> specify systemTypes <i>OR</i> specify factoryCategory
* <i>OR</i> specify factory Id
* @param factoryId the subsystem factory id to subset connection list by. Only connections with a
* subsystem owned by this factory are listed, where id is a string specified in the
- * plugin.xml file for the subsystem factory extension point definition.
+ * plugin.xml file for the subsystem factory extension point definition.
* Specify this <i>OR</i> specify factory <i>OR</i> specify systemTypes <i>OR</i> specify factory category
* @param factoryCategory the subsystem factory category to subset connection list by. Only connections with a
* subsystem owned by a factory of this category are listed, where category is a string specified in the
- * plugin.xml file for the subsystem factory extension point definition.
+ * plugin.xml file for the subsystem factory extension point definition.
* Specify this <i>OR</i> specify factory <i>OR</i> specify factory Id <i>OR</i> specify systemTypes
* @param defaultConnection the connection to pre-select. Can be null.
* @param horizontalSpan number of columns this should span
@@ -1050,7 +1051,7 @@ public class SystemWidgetHelpers {
combo = new SystemHostCombo(parent, SWT.NULL, defaultConnection, newButton, factoryCategory);
if (listener != null && combo != null)
combo.addSelectionListener(listener);
-
+
boolean hasGridData = false;
if (combo != null)
hasGridData = (combo.getLayoutData() != null) && (combo.getLayoutData() instanceof GridData);
@@ -1082,13 +1083,13 @@ public class SystemWidgetHelpers {
/**
* Return the list of all registered valid system types.
- *
+ *
* A system type is considered valid, if at least one subsystem
* configuration is registered against it, and the system type
* is enabled in the Preferences.
* The list is ordered alphabetically by system type label
* according to international unicode rules, in the current Locale.
- *
+ *
* @param restrictIds An array of system type IDs to restrict the
* returned list of valid system types to only those requested,
* or <code>null</code> to return all valid system types.
@@ -1142,12 +1143,12 @@ public class SystemWidgetHelpers {
/**
* Sorts the given array of systemTypes in ascending order by system
* type label.
- *
- * Note that this method sorts the array in place, so clients are
- * responsible for creating a copy of the array when needed.
+ *
+ * Note that this method sorts the array in place, so clients are
+ * responsible for creating a copy of the array when needed.
* Labels are sorted with a Collator according to international
* unicode rules, in the current Locale.
- *
+ *
* @param systemTypes list of system types to sort
*/
public static void sortSystemTypesByLabel(IRSESystemType[] systemTypes) {
@@ -1160,7 +1161,7 @@ public class SystemWidgetHelpers {
}
});
}
-
+
/**
* Return the labels for the given list of system types.
* @param systemTypes an array of system types
@@ -1173,21 +1174,21 @@ public class SystemWidgetHelpers {
}
return labels;
}
-
+
/**
* Creates a readonly system type combination box with the given system types.
- *
+ *
* Does NOT create the leading prompt or anything except the combo.
- * In order to find out what system type was selected, clients need to
+ * In order to find out what system type was selected, clients need to
* use {@link Combo#getSelectionIndex()} and use the return value as
* an index into the array of system types they provided.
- *
+ *
* @param parent the parent composite to embed this widget in.
* @param listener a listener for selection events.
* @param systemTypes an array of system types to show in this Combo.
* Must not be <code>null</code>.
* Fill this with the result of {@link #getValidSystemTypes(String[])}
- * with a null argument in order to get a combo box with all valid
+ * with a null argument in order to get a combo box with all valid
* system types.
* @return a Combo box displaying the given system types.
*/
@@ -1205,10 +1206,16 @@ public class SystemWidgetHelpers {
* Does NOT create the leading prompt or anything except the combo.
*/
public static Combo createHostNameCombo(Composite parent, Listener listener, IRSESystemType systemType) {
- //System.out.println("TipId: " + ISystemConstants.RESID_HOSTNAME_TIP);
+ //System.out.println("TipId: " + ISystemConstants.RESID_HOSTNAME_TIP);
Combo combo = createCombo(parent, listener, SystemResources.RESID_CONNECTION_HOSTNAME_TIP);
+
+ // Fix bug#282242: No default host names if no connection has been created.
+ String[] hostNames = RSECorePlugin.getTheSystemRegistry().getHostNames(systemType);
+ if (hostNames.length == 0) {
+ hostNames = new String[] { "LOCALHOST" }; //$NON-NLS-1$
+ }
+ combo.setItems(hostNames);
//System.out.println("Tip : " + combo.getToolTipText());
- combo.setItems(RSECorePlugin.getTheSystemRegistry().getHostNames(systemType));
combo.select(0);
return combo;
}
@@ -1222,7 +1229,7 @@ public class SystemWidgetHelpers {
* @param entryToolTip text for the entry field. Can be null
* @return The text field widget
*/
- public static InheritableEntryField createInheritableTextField(Composite parent, String toggleToolTip, String entryToolTip)
+ public static InheritableEntryField createInheritableTextField(Composite parent, String toggleToolTip, String entryToolTip)
{
InheritableEntryField entryField = new InheritableEntryField(parent, SWT.NULL);
if (toggleToolTip != null)
@@ -1233,7 +1240,7 @@ public class SystemWidgetHelpers {
}
/**
- * Helper method to line up the leading prompts in a composite, taking
+ * Helper method to line up the leading prompts in a composite, taking
* into account composite prompts nested within.
*/
public static void lineUpPrompts(Composite composite) {
@@ -1271,7 +1278,7 @@ public class SystemWidgetHelpers {
columnOneWidth = firstLabel.getSize().x;
if (maxNestedLabelWidth > columnOneWidth)
columnOneWidth = maxNestedLabelWidth;
- //System.out.println("Calculated column one width = " + columnOneWidth);
+ //System.out.println("Calculated column one width = " + columnOneWidth);
// APPLY NEW WIDTH TO FIRST COLUMN ONE LABEL
if (firstLabel != null)
((GridData) firstLabel.getLayoutData()).widthHint = columnOneWidth;
@@ -1324,11 +1331,11 @@ public class SystemWidgetHelpers {
}
/**
- * Given a Composite, this method walks all the children recursively and
- * and sets the mnemonics uniquely for each child control where a
+ * Given a Composite, this method walks all the children recursively and
+ * and sets the mnemonics uniquely for each child control where a
* mnemonic makes sense (eg, buttons).
- * The letter/digit chosen for the mnemonic is unique for this Composite,
- * so you should call this on as high a level of a composite as possible
+ * The letter/digit chosen for the mnemonic is unique for this Composite,
+ * so you should call this on as high a level of a composite as possible
* per Window.
* Call this after populating your controls.
* @return mnemonics object used for recording used-mnemonics. Use this
@@ -1339,7 +1346,7 @@ public class SystemWidgetHelpers {
mnemonics.setMnemonics(parent);
return mnemonics;
}
-
+
/**
* Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields.
*/
@@ -1359,7 +1366,7 @@ public class SystemWidgetHelpers {
mnemonics.setMnemonics(parent);
return mnemonics;
}
-
+
/**
* Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields.
*/
@@ -1380,7 +1387,7 @@ public class SystemWidgetHelpers {
mnemonics.setMnemonics(parent);
return mnemonics;
}
-
+
/**
* Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields.
*/
@@ -1402,7 +1409,7 @@ public class SystemWidgetHelpers {
}
/**
* Given an SWT Menu, "walk it" and automatically assign unique
- * mnemonics for every menu item in it, and then for each
+ * mnemonics for every menu item in it, and then for each
* submenu, do so for it too.
* @param menu the menubar to add mnemonics for
*/
@@ -1422,8 +1429,8 @@ public class SystemWidgetHelpers {
} // end addMnemonicsForMenuBar
/**
- * Given a Composite, this method walks all the children recursively and
- * and sets the infopop help id for each child control where help
+ * Given a Composite, this method walks all the children recursively and
+ * and sets the infopop help id for each child control where help
* makes sense (eg, buttons, combos, entry fields, lists, trees).
* <p>
* Call this after populating your controls.
@@ -1467,7 +1474,7 @@ public class SystemWidgetHelpers {
String[] ids = new String[1];
ids[0] = id;
PlatformUI.getWorkbench().getHelpSystem().setHelp(c, id);
- //setHelp(c, ids);
+ //setHelp(c, ids);
}
private final static char STANDARD_COLON = ':';
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java
index fd17b1a..0efc9c4 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Kenya Ishimoto (IBM) - [241197] Paste action causes IllegalArgumentException at Resource.copy
+ * Zhou Renjian (Kortide) - [282241] "Paste" is enabled on file system when text is in clipboard
********************************************************************************/
package org.eclipse.rse.ui.actions;
@@ -259,6 +260,12 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements
if (va != null)
{
enable = va.canDrop(selectedObject);
+
+ // Fix bug#282241: Copy anything, for example, text string, will enable "Paste" menu item
+ if (enable) {
+ enable = _srcType != SystemDNDTransferRunnable.SRC_TYPE_TEXT && _srcType != SystemDNDTransferRunnable.SRC_TYPE_UNKNOWN;
+ }
+
/* to allow disable of paste
* not sure if this is a performance hit or not
if (enable)
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java
index 8823e5f..6ff2741 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java
@@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [188160] avoid parent refresh if not doing deferred queries
+ * Patrick Tasse (Ericsson) - [285047] SystemRefreshAction not disabled when showRefresh returns false
********************************************************************************/
package org.eclipse.rse.ui.actions;
@@ -70,6 +71,14 @@ public class SystemRefreshAction extends SystemBaseAction
{
boolean enable = true;
_selection = selection;
+ Iterator iter = _selection.iterator();
+ while (enable && iter.hasNext()) {
+ Object obj = iter.next();
+ ISystemViewElementAdapter adapter = getViewAdapter(obj);
+ if (adapter != null && !adapter.showRefresh(obj)) {
+ enable = false;
+ }
+ }
return enable;
}
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java
index 5cdb494..3fd7d72 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java
@@ -24,6 +24,7 @@
* David McKnight (IBM) - [233160] [dstore] SSL/non-SSL alert are not appropriate
* David McKnight (IBM) - [243263] NPE on expanding a filter
* David McKnight (IBM) - [260777] [ssh] Deadlock when changing selection after multiple hibernate/resume cycles
+ * David McKnight (IBM) - [283793] [dstore] Expansion indicator(+) does not reset after no connect
*******************************************************************************/
package org.eclipse.rse.ui.operations;
@@ -79,28 +80,28 @@ import org.eclipse.ui.progress.IElementCollector;
public class SystemFetchOperation extends JobChangeAdapter implements IRunnableWithProgress
{
private static class ConnectorServicePool {
-
+
private static List _connectingConnectorServices = new ArrayList();
-
+
public synchronized void add(IConnectorService cs) {
_connectingConnectorServices.add(cs);
}
-
+
public synchronized void remove(IConnectorService cs) {
_connectingConnectorServices.remove(cs);
notifyAll();
}
-
+
public synchronized boolean contains(IConnectorService cs) {
return _connectingConnectorServices.contains(cs);
}
-
+
public synchronized void waitUntilNotContained(IConnectorService cs) {
while (contains(cs)){ // wait until the connector service is no longer in the list
- try {
- wait();
+ try {
+ wait();
}
- catch (InterruptedException e){
+ catch (InterruptedException e){
e.printStackTrace();
}
catch (Exception e){
@@ -109,7 +110,7 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
}
}
}
-
+
protected IWorkbenchPart _part;
protected Object _remoteObject;
protected IElementCollector _collector;
@@ -117,7 +118,7 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
protected ISystemViewElementAdapter _adapter;
protected boolean _canRunAsJob;
protected InvocationTargetException _exc;
-
+
private static ConnectorServicePool _connectorServicePool = new ConnectorServicePool();
/**
@@ -266,19 +267,19 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
registry.connectedStatusChange(_ss, true, false);
}
}
-
-
+
+
private boolean ensureConnected(SubSystem ss, IProgressMonitor monitor) throws InterruptedException {
- if (!ss.isConnected() &&
+ if (!ss.isConnected() &&
!ss.isOffline()) // skip the connect if offline, but still follow through because we need to follow through in the subsystem
{
IConnectorService connectorService = ss.getConnectorService();
-
+
boolean alreadyConnecting = false;
-
- // is this connector service already connecting?
+
+ // is this connector service already connecting?
alreadyConnecting = _connectorServicePool.contains(connectorService);
-
+
if (alreadyConnecting){
// connector service already attempting connect
// need to wait for it to complete
@@ -286,20 +287,19 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
_connectorServicePool.waitUntilNotContained(connectorService);
}
else {
+ final Display dis = Display.getDefault();
_connectorServicePool.add(connectorService);
-
- Display dis = Display.getDefault();
- PromptForPassword prompter = new PromptForPassword(ss);
- dis.syncExec(prompter);
- if (prompter.isCancelled()) {
- SystemMessage cancelledMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED);
- SystemMessageObject cancelledMessageObject = new SystemMessageObject(cancelledMessage, ISystemMessageObject.MSGTYPE_CANCEL, _remoteObject);
- _collector.add(cancelledMessageObject, monitor);
- _connectorServicePool.remove(connectorService);
- throw new InterruptedException();
- }
try
{
+ PromptForPassword prompter = new PromptForPassword(ss);
+ dis.syncExec(prompter);
+ if (prompter.isCancelled()) {
+ SystemMessage cancelledMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED);
+ SystemMessageObject cancelledMessageObject = new SystemMessageObject(cancelledMessage, ISystemMessageObject.MSGTYPE_CANCEL,
+ _remoteObject);
+ _collector.add(cancelledMessageObject, monitor);
+ throw new InterruptedException();
+ }
connectorService.connect(monitor);
if (_exc != null)
{
@@ -308,25 +308,23 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
}
catch (InvocationTargetException exc)
{
- showOperationErrorMessage(null, exc, ss);
- _connectorServicePool.remove(connectorService);
- return false;
+ showOperationErrorMessage(null, exc, ss);
+ return false;
}
catch (Exception e)
{
showOperationErrorMessage(null, e, ss);
- _connectorServicePool.remove(connectorService);
return false;
}
finally {
_connectorServicePool.remove(connectorService);
}
- dis.asyncExec(new UpdateRegistry(ss));
+ dis.asyncExec(new UpdateRegistry(ss));
}
}
return ss.isConnected();
-
+
}
/**
@@ -351,7 +349,7 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
ss = (SubSystem)_adapter.getSubSystem(_remoteObject);
}
-
+
boolean isPromptable = false;
if (actualRemoteObj instanceof IAdaptable){
@@ -360,15 +358,18 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
isPromptable = adapter.isPromptable(actualRemoteObj);
}
}
-
+
+ Object[] children = null;
if (!isPromptable){
if (!ensureConnected(ss, monitor)){
+ children = new Object[0];
+ _collector.add(children, monitor);
return;
}
}
-
- Object[] children = null;
+
+
// we first test to see if this is an expand-to filter in effect for this
// object, and if so use it...
if ((_part==null || _part instanceof SystemViewPart) && _adapter instanceof ISystemRemoteElementAdapter)
@@ -393,7 +394,7 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
}
}
}
-
+
if (activePart instanceof SystemViewPart){
SystemView viewer = ((SystemViewPart)activePart).getSystemView();
if (_remoteObject instanceof IContextObject){
@@ -404,18 +405,18 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
}
}
}
-
+
public String getExpandToFilter()
{
return expandToFilter;
}
}
-
+
Display dis = Display.getDefault();
GetExpandToFilter getExpandTo = new GetExpandToFilter();
dis.syncExec(getExpandTo);
String expandToFilter = getExpandTo.getExpandToFilter();
-
+
if (expandToFilter != null){
if (_remoteObject instanceof IContextObject){
children = _adapter.getChildrenUsingExpandToFilter(((IContextObject)_remoteObject).getModelObject(), expandToFilter);
@@ -425,7 +426,7 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
}
}
}
- if (children == null){
+ if (children == null){
if (_remoteObject instanceof IContextObject)
{
children = _adapter.getChildren((IContextObject)_remoteObject, monitor);
@@ -466,7 +467,9 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
{
String excMsg = exc.getMessage();
if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
+ exc.getClass().getName();
+ else
+ excMsg = exc.getClass().getName() + ": " + excMsg; //$NON-NLS-1$
sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED);
sysMsg.makeSubstitution(excMsg);
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java
index 1e72187..4c50d59 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java
@@ -23,6 +23,7 @@
* Martin Oberhuber (Wind River) - [227516] [regression] Fix ArrayIndexOutOfBoundsException in TableView
* David McKnight (IBM) - [187058] Incorrect Right Click Menu in Remote System Details View with no selection
* David McKnight (IBM) - [260346] RSE view for jobs does not remember resized columns
+ * Martin Oberhuber (Wind River) - [289533] NPE on "Show in Table"
********************************************************************************/
package org.eclipse.rse.ui.view;
@@ -307,11 +308,11 @@ public class SystemTableView
private static final int LEFT_BUTTON = 1;
private int mouseButtonPressed = LEFT_BUTTON;
-
+
// for bug 260346 - to maintain list of cached column widths
private Map _cachedColumnWidths;
-
-
+
+
/**
* Constructor for the table view
*
@@ -372,7 +373,7 @@ public class SystemTableView
_upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_UP_ID);
_downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN_ID);
-
+
_cachedColumnWidths = new HashMap();
}
@@ -438,18 +439,20 @@ public class SystemTableView
if (newObject instanceof IAdaptable)
{
getTable().setVisible(true);
-
+
// columns may change so we want to keep track of the current ones
int[] lastWidths = getCurrentColumnWidths();
if (lastWidths.length > 0){
ISystemViewElementAdapter contentsAdapter = getAdapterForContents();
-
- String adapterName = contentsAdapter.getClass().getName();
-
- // associate the last contents adapter with the last widths
- _cachedColumnWidths.put(adapterName, lastWidths);
+ if (contentsAdapter != null) {
+ // no use caching anything when there were no children
+ String adapterName = contentsAdapter.getClass().getName();
+
+ // associate the last contents adapter with the last widths
+ _cachedColumnWidths.put(adapterName, lastWidths);
+ }
}
-
+
_objectInput = newObject;
computeLayout();
@@ -784,7 +787,7 @@ public class SystemTableView
ISystemViewElementAdapter adapter = getAdapterForContents();
String adapterName = adapter.getClass().getName();
int[] cachedWidths = (int[])_cachedColumnWidths.get(adapterName);
-
+
// if there are already cached widths, use them
if (cachedWidths != null){
setCurrentColumnWidths(cachedWidths);
@@ -1334,7 +1337,7 @@ public class SystemTableView
}
table.dispose();
- }
+ }
}
/*
@@ -2117,9 +2120,9 @@ public class SystemTableView
/**
* Returns the column widths associated with this view.
- *
+ *
* @return the map of column widths associated with this view
- *
+ *
* @since 3.1
*/
public Map getCachedColumnWidths()
@@ -2129,14 +2132,14 @@ public class SystemTableView
/**
* Sets the map of column widths associated with this view
- *
+ *
* @param cachedColumnWidths the column widths map
- *
+ *
* @since 3.1
*/
public void setCachedColumnWidths(Map cachedColumnWidths)
{
_cachedColumnWidths = cachedColumnWidths;
}
-
+
}
\ No newline at end of file
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java
index e5084f3..fe3819f 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * 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
@@ -15,6 +15,8 @@
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* David McKnight (IBM) - [216161] table view needs to handle context when filter reference is input
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
+ * David McKnight (IBM) - [278848] NPE in Remote System Details view
+ * David McKnight (IBM) - [284917] Deleting a folder in a fresh workspace throws NPE
*******************************************************************************/
package org.eclipse.rse.ui.view;
@@ -37,6 +39,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.rse.core.filters.ISystemFilterReference;
import org.eclipse.rse.core.model.ISystemContainer;
+import org.eclipse.rse.core.model.ISystemViewInputProvider;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.ui.view.SystemViewPromptableAdapter;
import org.eclipse.rse.internal.ui.view.SystemViewRootInputAdapter;
@@ -146,6 +149,14 @@ public class SystemTableViewProvider implements ILabelProvider, ITableLabelProvi
}
if (result != null)
result.setPropertySourceInput(object);
+
+ // for bug 278848
+ if (_viewer != null && _viewer.getInput() instanceof ISystemViewInputProvider)
+ {
+ ISystemViewInputProvider inputProvider = (ISystemViewInputProvider)_viewer.getInput();
+ result.setInput(inputProvider);
+ }
+
return result;
}
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
index 1482df8..6f42a1d 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
@@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * Javier Montalvo Orús (Symbian) - Bug 158555 - newConnectionWizardDelegates can only be used once
+ * Javier Montalvo Orús (Symbian) - Bug 158555 - newConnectionWizardDelegates can only be used once
* Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
diff --git a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java
index 7f309a8..13bacd0 100644
--- a/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java
+++ b/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * 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:
+ * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
* Uwe Stieber (Wind River) - initial API and implementation.
*******************************************************************************/
package org.eclipse.rse.ui.wizards.registries;
@@ -17,6 +17,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
/**
* Data element for RSE wizard selection tree's.
@@ -28,7 +30,7 @@ public class RSEWizardSelectionTreeElement {
/**
* Constructor.
- *
+ *
* @param element The wizard registry element to associate. Must be not <code>null</code>.
*/
public RSEWizardSelectionTreeElement(IRSEWizardRegistryElement element) {
@@ -36,20 +38,20 @@ public class RSEWizardSelectionTreeElement {
wizardRegistryElement = element;
children.clear();
}
-
+
/**
* Returns the associated wizard registry element
- *
+ *
* @return The wizard registry element. Must be never <code>null</code>.
*/
public IRSEWizardRegistryElement getWizardRegistryElement() {
return wizardRegistryElement;
}
-
+
/**
* Adds a new child to this RSE wizard selection tree element. If
* the child had been added already before, the method will do nothing.
- *
+ *
* @param child The child to add. Must be not <code>null</code>.
*/
public void add(RSEWizardSelectionTreeElement child) {
@@ -62,44 +64,44 @@ public class RSEWizardSelectionTreeElement {
/**
* Removes the given child from the list of children. If the child
* has not been added before, the method will do nothing.
- *
+ *
* @param child The child to remove. Must be not <code>null</code>.
*/
public void remove(RSEWizardSelectionTreeElement child) {
assert child != null;
children.remove(child);
}
-
+
/**
* Returns the children of this wizard selection tree element.
- *
+ *
* @return The list of children, May be empty but never <code>null</code>.
*/
public RSEWizardSelectionTreeElement[] getChildren() {
return (RSEWizardSelectionTreeElement[])children.toArray(new RSEWizardSelectionTreeElement[children.size()]);
}
-
+
/**
* Associate a parent element to this wizard selection tree element.
- *
+ *
* @param parent The parent element to associate or <code>null</code>.
*/
public void setParentElement(RSEWizardSelectionTreeElement parent) {
this.parent = parent;
}
-
+
/**
* Returns the associated parent element of this wizard selection tree element.
- *
+ *
* @return The parent element or <code>null</code>.
*/
public RSEWizardSelectionTreeElement getParentElement() {
return this.parent;
}
-
+
/**
* Returns the description to show in the wizards message area.
- *
+ *
* @return The description to show in the wizards message are or <code>null</code>.
*/
public String getDescription() {
@@ -108,10 +110,10 @@ public class RSEWizardSelectionTreeElement {
}
return null;
}
-
+
/**
* Returns the label to show in the tree.
- *
+ *
* @return The label to use for the tree node or <code>null</code>.
*/
public String getLabel() {
@@ -120,7 +122,7 @@ public class RSEWizardSelectionTreeElement {
/**
* Returns the image to show in the tree.
- *
+ *
* @return The image to use for the tree node or <code>null</code>.
*/
public Image getImage() {
@@ -131,7 +133,8 @@ public class RSEWizardSelectionTreeElement {
String key = "category::" + getWizardRegistryElement().getId(); //$NON-NLS-1$
Image image = imageRegistry.get(key);
if (image == null) {
- ImageDescriptor descriptor = RSEUIPlugin.getDefault().getImageDescriptorFromIDE("obj16/fldr_obj.gif"); //$NON-NLS-1$
+ //ImageDescriptor descriptor = RSEUIPlugin.getDefault().getImageDescriptorFromIDE("obj16/fldr_obj.gif"); //$NON-NLS-1$
+ ImageDescriptor descriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
if (descriptor != null) {
image = descriptor.createImage();
imageRegistry.put(key, image);
@@ -139,7 +142,7 @@ public class RSEWizardSelectionTreeElement {
}
return image;
}
-
+
return null;
}
diff --git a/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java b/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
index 623d08c..59d9d64 100644
--- a/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
+++ b/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
@@ -47,7 +47,8 @@
* David McKnight (IBM) - [226787] [services] Dstore processes subsystem is empty after switching from shell processes
* David McKnight (IBM) - [262930] Remote System Details view not restoring filter memento input
* David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- ********************************************************************************/
+ * David McKnight (IBM) - [284018] concurrent SubSystem.connect() calls can result in double login-prompt
+ * ********************************************************************************/
package org.eclipse.rse.core.subsystems;
import java.lang.reflect.InvocationTargetException;
@@ -2442,6 +2443,41 @@ implements IAdaptable, ISubSystem, ISystemFilterPoolReferenceManagerProvider
_isInitialized = false;
}
+
+ private static class ConnectorServicePool {
+
+ private static List _connectingConnectorServices = new ArrayList();
+
+ public synchronized void add(IConnectorService cs) {
+ _connectingConnectorServices.add(cs);
+ }
+
+ public synchronized void remove(IConnectorService cs) {
+ _connectingConnectorServices.remove(cs);
+ notifyAll();
+ }
+
+ public synchronized boolean contains(IConnectorService cs) {
+ return _connectingConnectorServices.contains(cs);
+ }
+
+ public synchronized void waitUntilNotContained(IConnectorService cs) {
+ while (contains(cs)){ // wait until the connector service is no longer in the list
+ try {
+ wait();
+ }
+ catch (InterruptedException e){
+ e.printStackTrace();
+ }
+ catch (Exception e){
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private static ConnectorServicePool _connectorServicePool = new ConnectorServicePool();
+
/*
* Connect to a remote system with a monitor.
* Required for Bug 176603
@@ -2460,35 +2496,52 @@ implements IAdaptable, ISubSystem, ISystemFilterPoolReferenceManagerProvider
final Exception[] exception=new Exception[1];
exception[0]=null;
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- try
- {
- promptForPassword(promptForPassword);
- } catch(Exception e) {
- exception[0]=e;
- }
- }
- });
- try {
- Exception e = exception[0];
- if (e == null) {
- getConnectorService().connect(monitor);
- if (isConnected()) {
- final SubSystem ss = this;
- //Notify connect status change
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- RSECorePlugin.getTheSystemRegistry().connectedStatusChange(ss, true, false);
+
+ IConnectorService connectorService = getConnectorService();
+ // is this connector service already connecting?
+ boolean alreadyConnecting = _connectorServicePool.contains(connectorService);
+
+ if (alreadyConnecting){
+ // connector service already attempting connect
+ // need to wait for it to complete
+ // before we can return out of this method
+ _connectorServicePool.waitUntilNotContained(connectorService);
+ }
+ else {
+ _connectorServicePool.add(connectorService);
+
+ try {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ try
+ {
+ promptForPassword(promptForPassword);
+ } catch(Exception e) {
+ exception[0]=e;
}
- });
+ }
+ });
+
+ Exception e = exception[0];
+ if (e == null) {
+ getConnectorService().connect(monitor);
+ if (isConnected()) {
+ final SubSystem ss = this;
+ //Notify connect status change
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ RSECorePlugin.getTheSystemRegistry().connectedStatusChange(ss, true, false);
+ }
+ });
+ }
+ } else {
+ throw e;
}
- } else {
- throw e;
+ } finally {
+ _connectorServicePool.remove(connectorService);
+ monitor.done();
}
- } finally {
- monitor.done();
- }
+ }
}
}
diff --git a/org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dll b/org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dll
deleted file mode 100644
index 983e6b8..0000000
Binary files a/org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dll and /dev/null differ
diff --git a/org.eclipse.tm.terminal-feature/feature.xml b/org.eclipse.tm.terminal-feature/feature.xml
index 11ad9fc..23a9494 100644
--- a/org.eclipse.tm.terminal-feature/feature.xml
+++ b/org.eclipse.tm.terminal-feature/feature.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Wind River - initial API and implementation
-->
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Wind River - initial API and implementation
Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
-->
<feature
id="org.eclipse.tm.terminal"
label="%featureName"
- version="3.0.0.qualifier"
+ version="3.0.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/org.eclipse.tm.terminal.sdk-feature/feature.xml b/org.eclipse.tm.terminal.sdk-feature/feature.xml
index 11c01b2..7d81961 100644
--- a/org.eclipse.tm.terminal.sdk-feature/feature.xml
+++ b/org.eclipse.tm.terminal.sdk-feature/feature.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Wind River - initial API and implementation
-->
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Wind River - initial API and implementation
Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
-->
<feature
id="org.eclipse.tm.terminal.sdk"
label="%featureName"
- version="3.0.0.qualifier"
+ version="3.0.2.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg">
diff --git a/org.eclipse.tm.terminal.telnet-feature/feature.xml b/org.eclipse.tm.terminal.telnet-feature/feature.xml
index 43d6dc3..3df4148 100644
--- a/org.eclipse.tm.terminal.telnet-feature/feature.xml
+++ b/org.eclipse.tm.terminal.telnet-feature/feature.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Wind River - initial API and implementation
-->
<feature
id="org.eclipse.tm.terminal.telnet"
label="%featureName"
- version="2.0.100.qualifier"
+ version="2.0.101.qualifier"
provider-name="%providerName">
<description>
diff --git a/org.eclipse.tm.terminal.telnet/META-INF/MANIFEST.MF b/org.eclipse.tm.terminal.telnet/META-INF/MANIFEST.MF
index 5870cd8..18c918a 100644
--- a/org.eclipse.tm.terminal.telnet/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm.terminal.telnet/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.telnet;singleton:=true
-Bundle-Version: 2.0.100.qualifier
+Bundle-Version: 2.0.101.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java b/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java
index 0b07c77..4c1dcc4 100644
--- a/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java
+++ b/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 Wind River Systems, Inc. and others.
+ * Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,8 +11,9 @@
* Helmut Haigermoser and Ted Williams.
*
* Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalControl
+ * Michael Scharf (Wind River) - extracted from TerminalControl
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
+ * Uwe Stieber (Wind River) - [287158][terminal][telnet] Connect worker is giving up to early
*******************************************************************************/
package org.eclipse.tm.internal.terminal.telnet;
@@ -35,43 +36,75 @@ class TelnetConnectWorker extends Thread {
fControl.setState(TerminalState.CONNECTING);
}
public void run() {
- try {
- int nTimeout = fConn.getTelnetSettings().getTimeout() * 1000;
- String strHost = fConn.getTelnetSettings().getHost();
- int nPort = fConn.getTelnetSettings().getNetworkPort();
- InetSocketAddress address = new InetSocketAddress(strHost, nPort);
- Socket socket=new Socket();
+ // Retry the connect with after a little pause in case the
+ // remote telnet server isn't ready. ConnectExceptions might
+ // happen if the telnet server process did not initialized itself.
+ // This is seen especially if the telnet server is a process
+ // providing it's input and output via a built in telnet server.
+ int remaining = 10;
- socket.connect(address, nTimeout);
+ while (remaining >= 0) {
+ // Pause before we re-try if the remaining tries are less than the initial value
+ if (remaining < 10) try { Thread.sleep(500); } catch (InterruptedException e) { /* ignored on purpose */ }
- // This next call causes reads on the socket to see TCP urgent data
- // inline with the rest of the non-urgent data. Without this call, TCP
- // urgent data is silently dropped by Java. This is required for
- // TELNET support, because when the TELNET server sends "IAC DM", the
- // IAC byte is TCP urgent data. If urgent data is silently dropped, we
- // only see the DM, which looks like an ISO Latin-1 '�' character.
+ try {
+ int nTimeout = fConn.getTelnetSettings().getTimeout() * 1000;
+ String strHost = fConn.getTelnetSettings().getHost();
+ int nPort = fConn.getTelnetSettings().getNetworkPort();
+ InetSocketAddress address = new InetSocketAddress(strHost, nPort);
+ Socket socket=new Socket();
- socket.setOOBInline(true);
-
- fConn.setSocket(socket);
+ socket.connect(address, nTimeout);
- TelnetConnection connection=new TelnetConnection(fConn, socket);
- socket.setKeepAlive(true);
- fConn.setTelnetConnection(connection);
- connection.start();
- fControl.setState(TerminalState.CONNECTED);
+ // If we get to this point, the connect succeeded and we will
+ // force the remaining counter to be 0.
+ remaining = 0;
- } catch (UnknownHostException ex) {
- String txt="Unknown host: " + ex.getMessage(); //$NON-NLS-1$
- connectFailed(txt,"Unknown host: " + ex.getMessage() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (SocketTimeoutException socketTimeoutException) {
- connectFailed(socketTimeoutException.getMessage(), "Connection Error!\n" + socketTimeoutException.getMessage()); //$NON-NLS-1$
- } catch (ConnectException connectException) {
- connectFailed(connectException.getMessage(),"Connection refused!"); //$NON-NLS-1$
- } catch (Exception exception) {
- Logger.logException(exception);
+ // This next call causes reads on the socket to see TCP urgent data
+ // inline with the rest of the non-urgent data. Without this call, TCP
+ // urgent data is silently dropped by Java. This is required for
+ // TELNET support, because when the TELNET server sends "IAC DM", the
+ // IAC byte is TCP urgent data. If urgent data is silently dropped, we
+ // only see the DM, which looks like an ISO Latin-1 '�' character.
- connectFailed(exception.getMessage(),""); //$NON-NLS-1$
+ socket.setOOBInline(true);
+
+ fConn.setSocket(socket);
+
+ TelnetConnection connection=new TelnetConnection(fConn, socket);
+ socket.setKeepAlive(true);
+ fConn.setTelnetConnection(connection);
+ connection.start();
+ fControl.setState(TerminalState.CONNECTED);
+
+ } catch (UnknownHostException ex) {
+ // No re-try in case of UnknownHostException, there is no indication that
+ // the DNS will fix itself
+ remaining = 0;
+ //Construct error message and signal failed
+ String txt="Unknown host: " + ex.getMessage(); //$NON-NLS-1$
+ connectFailed(txt,"Unknown host: " + ex.getMessage() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (SocketTimeoutException socketTimeoutException) {
+ // Time out occurred. No re-try in this case either. Time out can
+ // be increased by the user. Multiplying the timeout with the remaining
+ // counter is not desired.
+ remaining = 0;
+ // Construct error message and signal failed
+ connectFailed(socketTimeoutException.getMessage(), "Connection Error!\n" + socketTimeoutException.getMessage()); //$NON-NLS-1$
+ } catch (ConnectException connectException) {
+ // In case of a ConnectException, do a re-try. The server could have been
+ // simply not ready yet and the worker would give up to early.
+ if (remaining == 0) connectFailed(connectException.getMessage(),"Connection refused!"); //$NON-NLS-1$
+ } catch (Exception exception) {
+ // Any other exception on connect. No re-try in this case either
+ remaining = 0;
+ // Log the exception
+ Logger.logException(exception);
+ // And signal failed
+ connectFailed(exception.getMessage(),""); //$NON-NLS-1$
+ } finally {
+ remaining--;
+ }
}
}
diff --git a/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java b/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java
index e5ccc4e..492b572 100644
--- a/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java
+++ b/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java
@@ -13,6 +13,7 @@
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Michael Scharf (Wind River) - [209665] Add ability to log byte streams from terminal
* Alex Panchenko (Xored) - [277061] TelnetConnection.isConnected() should check if socket was not closed
+ * Uwe Stieber (Wind River) - [281329] Telnet connection not handling "SocketException: Connection reset" correct
*******************************************************************************/
package org.eclipse.tm.internal.terminal.telnet;
@@ -330,10 +331,14 @@ public class TelnetConnection extends Thread implements TelnetCodes {
// A "socket closed" exception is normal here. It's caused by the
// user clicking the disconnect button on the Terminal view toolbar.
- if (message != null && !message.equals("socket closed")) //$NON-NLS-1$
+ if (message != null && !message.equalsIgnoreCase("Socket closed") && !message.equalsIgnoreCase("Connection reset")) //$NON-NLS-1$ //$NON-NLS-2$
{
Logger.logException(ex);
}
+
+ // Tell the ITerminalControl object that the connection is
+ // closed.
+ terminalControl.setState(TerminalState.CLOSED);
} catch (Exception ex) {
Logger.logException(ex);
}
diff --git a/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java b/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java
index 674b9ad..d9e57a0 100644
--- a/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java
+++ b/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 Wind River Systems, Inc. and others.
+ * Copyright (c) 2005, 2009 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
* Sean Adams (Cisco) - [231959][terminal][telnet] NPE in TelnetConnector.java
+ * David Sciamma (Anyware-Tech) - [288254][telnet] local echo is always disabled
*******************************************************************************/
package org.eclipse.tm.internal.terminal.telnet;
@@ -79,7 +80,7 @@ public class TelnetConnector extends TerminalConnectorImpl {
cleanSocket();
}
public boolean isLocalEcho() {
- if(fTelnetConnection!=null)
+ if(fTelnetConnection==null)
return false;
return fTelnetConnection.localEcho();
}
diff --git a/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF b/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF
index 56a4f2d..25e38ba 100644
--- a/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF
@@ -2,11 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.test;singleton:=true
-Bundle-Version: 2.0.100.qualifier
+Bundle-Version: 2.0.101.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.junit,
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)",
+ org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)",
org.eclipse.core.runtime,
org.eclipse.ui
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
diff --git a/org.eclipse.tm.terminal.test/plugin.xml b/org.eclipse.tm.terminal.test/plugin.xml
index a6fe6ae..b70f331 100644
--- a/org.eclipse.tm.terminal.test/plugin.xml
+++ b/org.eclipse.tm.terminal.test/plugin.xml
@@ -10,12 +10,14 @@
# Contributors:
# Michael Scharf (Wind River) - initial API and implementation
# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
+# Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
-->
<plugin>
<extension
point="org.eclipse.tm.terminal.terminalConnectors">
- <connector name="Speed Test"
- id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
- class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"/>
+ <connector
+ class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
+ id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
+ name="Speed Test"/>
</extension>
</plugin>
diff --git a/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java b/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java
index 4f6d3bf..105b43e 100644
--- a/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java
+++ b/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java
@@ -9,6 +9,7 @@
* Michael Scharf (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
* Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
*******************************************************************************/
package org.eclipse.tm.internal.terminal.connector;
@@ -137,7 +138,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
public TerminalConnectorImpl makeConnector() throws Exception {
return mock;
}
- },"xID","xName");
+ },"xID","xName", false);
return c;
}
diff --git a/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java b/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java
index cc0c9ee..799bd2b 100644
--- a/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java
+++ b/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - initial API and implementation
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
*******************************************************************************/
package org.eclipse.tm.internal.terminal.connector;
@@ -26,12 +27,14 @@ public class TerminalConnectorPluginTest extends TestCase {
public void testIsInitialized() {
if (!Platform.isRunning())
return;
- TerminalConnector c = new TerminalConnector(new SimpleFactory(new ConnectorMock()), "xID", "xName");
+ TerminalConnector c = new TerminalConnector(new SimpleFactory(new ConnectorMock()), "xID", "xName", false);
assertFalse(c.isInitialized());
c.getId();
assertFalse(c.isInitialized());
c.getName();
assertFalse(c.isInitialized());
+ c.isHidden();
+ assertFalse(c.isInitialized());
c.getSettingsSummary();
assertFalse(c.isInitialized());
c.setTerminalSize(10, 10);
@@ -48,7 +51,7 @@ public class TerminalConnectorPluginTest extends TestCase {
if (!Platform.isRunning())
return;
ConnectorMock mock = new ConnectorMock();
- TerminalConnector c = new TerminalConnector(new SimpleFactory(mock), "xID", "xName");
+ TerminalConnector c = new TerminalConnector(new SimpleFactory(mock), "xID", "xName", false);
assertNull(c.getAdapter(ConnectorMock.class));
// the load is called after the connect...
c.connect(new TerminalControlMock());
diff --git a/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java b/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java
index ffb0efe..93d5555 100644
--- a/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java
+++ b/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
@@ -9,6 +9,7 @@
* Michael Scharf (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
* Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
*******************************************************************************/
package org.eclipse.tm.internal.terminal.connector;
@@ -139,27 +140,27 @@ public class TerminalConnectorTest extends TestCase {
}
}
public void testGetInitializationErrorMessage() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
c.connect(new TerminalControlMock());
assertNull(c.getInitializationErrorMessage());
c=new TerminalConnector(new SimpleFactory(new ConnectorMock(){
public void initialize() throws Exception {
throw new Exception("FAILED");
- }}),"xID","xName");
+ }}),"xID","xName", false);
c.connect(new TerminalControlMock());
assertEquals("FAILED",c.getInitializationErrorMessage());
}
public void testGetIdAndName() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
assertEquals("xID", c.getId());
assertEquals("xName", c.getName());
}
public void testConnect() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
assertFalse(c.isInitialized());
c.connect(new TerminalControlMock());
assertTrue(c.isInitialized());
@@ -168,7 +169,7 @@ public class TerminalConnectorTest extends TestCase {
public void testDisconnect() {
ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
TerminalControlMock control=new TerminalControlMock();
c.connect(control);
c.disconnect();
@@ -177,14 +178,14 @@ public class TerminalConnectorTest extends TestCase {
public void testGetTerminalToRemoteStream() {
ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
TerminalControlMock control=new TerminalControlMock();
c.connect(control);
assertSame(mock.fControl,control);
}
public void testGetSettingsSummary() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
assertEquals("Not Initialized", c.getSettingsSummary());
c.connect(new TerminalControlMock());
assertEquals("Summary", c.getSettingsSummary());
@@ -192,7 +193,7 @@ public class TerminalConnectorTest extends TestCase {
public void testIsLocalEcho() {
ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
assertFalse(c.isLocalEcho());
mock.fEcho=true;
assertTrue(c.isLocalEcho());
@@ -200,7 +201,7 @@ public class TerminalConnectorTest extends TestCase {
public void testLoad() {
ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
ISettingsStore s=new SettingsMock();
c.load(s);
// the load is called after the connect...
@@ -211,7 +212,7 @@ public class TerminalConnectorTest extends TestCase {
public void testSave() {
ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
ISettingsStore s=new SettingsMock();
c.save(s);
assertNull(mock.fSaveStore);
@@ -222,13 +223,13 @@ public class TerminalConnectorTest extends TestCase {
public void testMakeSettingsPage() {
ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
assertNotNull(c.makeSettingsPage());
}
public void testSetTerminalSize() {
ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
+ TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
c.setTerminalSize(100, 200);
}
diff --git a/org.eclipse.tm.terminal.view-feature/feature.xml b/org.eclipse.tm.terminal.view-feature/feature.xml
index f52c645..cee1851 100644
--- a/org.eclipse.tm.terminal.view-feature/feature.xml
+++ b/org.eclipse.tm.terminal.view-feature/feature.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -7,12 +8,12 @@
Contributors:
Wind River - initial API and implementation
+ Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
-->
-
<feature
id="org.eclipse.tm.terminal.view"
label="%featureName"
- version="2.0.100.qualifier"
+ version="2.0.101.qualifier"
provider-name="%providerName">
<description>
@@ -35,7 +36,7 @@
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
+ <import plugin="org.eclipse.tm.terminal" version="3.0.1" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF b/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF
index c48e9b7..85ac5a3 100644
--- a/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF
@@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.view;singleton:=true
-Bundle-Version: 2.0.100.qualifier
+Bundle-Version: 2.0.101.qualifier
Bundle-Activator: org.eclipse.tm.internal.terminal.view.TerminalViewPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)"
+ org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)"
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java b/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java
index 8ea599b..b934cea 100644
--- a/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java
+++ b/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
+ * Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@
* Michael Scharf (Wind River) - [196454] Initial connection settings dialog should not be blank
* Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
* Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
*******************************************************************************/
package org.eclipse.tm.internal.terminal.view;
@@ -87,7 +88,7 @@ class TerminalSettingsDlg extends Dialog {
List list=new ArrayList(Arrays.asList(connectors));
for (Iterator iterator = list.iterator(); iterator.hasNext();) {
ITerminalConnector info = (ITerminalConnector) iterator.next();
- if(info.isInitialized() && info.getInitializationErrorMessage()!=null)
+ if(info.isInitialized() && info.getInitializationErrorMessage()!=null || info.isHidden())
iterator.remove();
}
connectors=(ITerminalConnector[]) list.toArray(new ITerminalConnector[list.size()]);
diff --git a/org.eclipse.tm.terminal/META-INF/MANIFEST.MF b/org.eclipse.tm.terminal/META-INF/MANIFEST.MF
index df5860b..6bb8abc 100644
--- a/org.eclipse.tm.terminal/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm.terminal/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal; singleton:=true
-Bundle-Version: 3.0.0.qualifier
+Bundle-Version: 3.0.2.qualifier
Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.tm.terminal/schema/terminalConnectors.exsd b/org.eclipse.tm.terminal/schema/terminalConnectors.exsd
index c58c999..b503ea5 100644
--- a/org.eclipse.tm.terminal/schema/terminalConnectors.exsd
+++ b/org.eclipse.tm.terminal/schema/terminalConnectors.exsd
@@ -2,15 +2,20 @@
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.tm.terminal" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appinfo>
+ <appInfo>
<meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnectors" name="Terminal Connectors"/>
- </appinfo>
+ </appInfo>
<documentation>
</documentation>
</annotation>
<element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="connector"/>
@@ -34,9 +39,9 @@
<documentation>
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute translatable="true"/>
- </appinfo>
+ </appInfo>
</annotation>
</attribute>
</complexType>
@@ -49,9 +54,9 @@
<documentation>
A class extending TerminalConnectorImpl
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl:"/>
- </appinfo>
+ </appInfo>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
@@ -66,9 +71,16 @@
<documentation>
The name of the connection (used in the UI)
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute translatable="true"/>
- </appinfo>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="hidden" type="boolean" use="default" value="false">
+ <annotation>
+ <documentation>
+ When set to "true", the terminal connector will not be visible to the user in connector selections.
+ </documentation>
</annotation>
</attribute>
</complexType>
@@ -79,11 +91,11 @@
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="copyright"/>
- </appinfo>
+ </appInfo>
<documentation>
- Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ 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
@@ -92,6 +104,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Michael Scharf (Wind River) - initial API and implementation
Martin Oberhuber (Wind River) - fixed copyright headers and beautified
+Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
</documentation>
</annotation>
diff --git a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java
index b2439f6..86ebca2 100644
--- a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java
+++ b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
@@ -9,6 +9,7 @@
* Michael Scharf (Wind River) - initial API and implementation
* Michael Scharf (Wind River) - [200541] Extract from TerminalConnectorExtension.TerminalConnectorProxy
* Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
*******************************************************************************/
package org.eclipse.tm.internal.terminal.connector;
@@ -76,6 +77,10 @@ public class TerminalConnector implements ITerminalConnector {
*/
private final String fId;
/**
+ * Flag to mark the connector as hidden.
+ */
+ private final boolean fHidden;
+ /**
* The connector
*/
private TerminalConnectorImpl fConnector;
@@ -98,10 +103,11 @@ public class TerminalConnector implements ITerminalConnector {
* this ID.
* @param name translatable name to display the connector in the UI.
*/
- public TerminalConnector(TerminalConnector.Factory terminalConnectorFactory, String id, String name) {
+ public TerminalConnector(TerminalConnector.Factory terminalConnectorFactory, String id, String name, boolean hidden) {
fTerminalConnectorFactory = terminalConnectorFactory;
fId = id;
fName = name;
+ fHidden = hidden;
}
public String getInitializationErrorMessage() {
getConnectorImpl();
@@ -115,6 +121,9 @@ public class TerminalConnector implements ITerminalConnector {
public String getName() {
return fName;
}
+ public boolean isHidden() {
+ return fHidden;
+ }
private TerminalConnectorImpl getConnectorImpl() {
if(!isInitialized()) {
try {
diff --git a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java
index 9f13b82..3c33be2 100644
--- a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java
+++ b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 Wind River Systems, Inc. and others.
+ * Copyright (c) 2004, 2010 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,8 @@
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin
* Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available
+ * Uwe Stieber (Wind River) - [294719] [terminal] SWT Widget disposed in TerminalActionPaste
+ * Martin Oberhuber (Wind River) - [296212] Cannot paste text into terminal on some Linux hosts
*******************************************************************************/
package org.eclipse.tm.internal.terminal.control.actions;
@@ -52,7 +54,7 @@ public class TerminalActionPaste extends AbstractTerminalAction {
public void updateAction(boolean aboutToShow) {
ITerminalViewControl target = getTarget();
- boolean bEnabled = target != null;
+ boolean bEnabled = target != null && target.getClipboard() != null && !target.getClipboard().isDisposed();
if (bEnabled) {
String strText = (String) target.getClipboard().getContents(
TextTransfer.getInstance());
diff --git a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java
index 978c4b8..ef1b76a 100644
--- a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java
+++ b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java
@@ -9,6 +9,7 @@
* Michael Scharf (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
*******************************************************************************/
package org.eclipse.tm.internal.terminal.provisional.api;
@@ -61,6 +62,13 @@ public interface ITerminalConnector extends IAdaptable {
String getName();
/**
+ * @return <code>True</code> if the connector is not visible in user
+ * selections.
+ * @since org.eclipse.tm.terminal 3.0.1
+ */
+ boolean isHidden();
+
+ /**
* @return true if the {@link TerminalConnectorImpl} has been initialized.
* If there was an initialization error, {@link #getInitializationErrorMessage()}
* returns the error message.
diff --git a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java
index ee14c81..941e7c3 100644
--- a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java
+++ b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
@@ -8,6 +8,7 @@
* Contributors:
* Michael Scharf (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
+ * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
*******************************************************************************/
package org.eclipse.tm.internal.terminal.provisional.api;
@@ -21,12 +22,12 @@ import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnect
/**
* A factory to get {@link ITerminalConnector} instances.
- *
+ *
* @author Michael Scharf
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
- *
+ *
* <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
@@ -44,11 +45,13 @@ public class TerminalConnectorExtension {
if(name==null || name.length()==0) {
name=id;
}
+ String hidden = config.getAttribute("hidden"); //$NON-NLS-1$
+ boolean isHidden = hidden != null ? new Boolean(hidden).booleanValue() : false;
TerminalConnector.Factory factory=new TerminalConnector.Factory(){
public TerminalConnectorImpl makeConnector() throws Exception {
return (TerminalConnectorImpl)config.createExecutableExtension("class"); //$NON-NLS-1$
}};
- return new TerminalConnector(factory,id,name);
+ return new TerminalConnector(factory,id,name, isHidden);
}
/**
diff --git a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java
index 4d0ceee..8326cc9 100644
--- a/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java
+++ b/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java
@@ -8,6 +8,8 @@
* Contributors:
* Michael Scharf (Wind River) - initial API and implementation
* Michael Scharf (Wind River) - [240098] The cursor should not blink when the terminal is disconnected
+ * Uwe Stieber (Wind River) - [281328] The very first few characters might be missing in the terminal control if opened and connected programmatically
+ * Martin Oberhuber (Wind River) - [294327] After logging in, the remote prompt is hidden
*******************************************************************************/
package org.eclipse.tm.internal.terminal.textcanvas;
@@ -40,6 +42,30 @@ public class TextCanvas extends GridCanvas {
private Point fDraggingEnd;
private boolean fHasSelection;
private ResizeListener fResizeListener;
+
+ // The minSize is meant to determine the minimum size of the backing store
+ // (grid) into which remote data is rendered. If the viewport is smaller
+ // than that minimum size, the backing store size remains at the minSize,
+ // and a scrollbar is shown instead. In reality, this has the following
+ // issues or effects today:
+ // (a) Bug 281328: For very early data coming in before the widget is
+ // realized, the minSize determines into what initial grid that is
+ // rendered. See also @link{#addResizeHandler(ResizeListener)}.
+ // (b) Bug 294468: Since we have redraw and size computation problems
+ // with horizontal scrollers, for now the minColumns must be small
+ // enough to avoid a horizontal scroller appearing in most cases.
+ // (b) Bug 294327: since we have problems with the vertical scroller
+ // showing the correct location, minLines must be small enough
+ // to avoid a vertical scroller or new data may be rendered off-screen.
+ // As a compromise, we have been working with a 20x4 since the Terminal
+ // inception, though many users would want a 80x24 minSize and backing
+ // store. Pros and cons of the small minsize:
+ // + consistent "remote size==viewport size", vi works as expected
+ // - dumb terminals which expect 80x24 render garbled on small viewport.
+ // If bug 294468 were resolved, an 80 wide minSize would be preferrable
+ // since it allows switching the terminal viewport small/large as needed,
+ // without destroying the backing store. For a complete solution,
+ // Bug 196462 tracks the request for a user-defined fixed-widow-size-mode.
private int fMinColumns=20;
private int fMinLines=4;
private boolean fCursorEnabled;
@@ -177,14 +203,14 @@ public class TextCanvas extends GridCanvas {
fMinLines = minLines;
}
- protected void onResize() {
+ protected void onResize(boolean init) {
if(fResizeListener!=null) {
Rectangle bonds=getClientArea();
int lines=bonds.height/getCellHeight();
int columns=bonds.width/getCellWidth();
// when the view is minimised, its size is set to 0
// we don't sent this to the terminal!
- if(lines>0 && columns>0) {
+ if((lines>0 && columns>0) || init) {
if(columns<fMinColumns) {
if(!isHorizontalBarVisble()) {
setHorizontalBarVisible(true);
@@ -208,6 +234,10 @@ public class TextCanvas extends GridCanvas {
calculateGrid();
}
+ protected void onResize() {
+ onResize(false);
+ }
+
private void calculateGrid() {
setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
// scroll to end
@@ -294,6 +324,21 @@ public class TextCanvas extends GridCanvas {
if(fResizeListener!=null)
throw new IllegalArgumentException("There can be at most one listener at the moment!"); //$NON-NLS-1$
fResizeListener=listener;
+
+ // Bug 281328: [terminal] The very first few characters might be missing in
+ // the terminal control if opened and connected programmatically
+ //
+ // In case the terminal had not been visible yet or is too small (less than one
+ // line visible), the terminal should have a minimum size to avoid RuntimeExceptions.
+ Rectangle bonds=getClientArea();
+ if (bonds.height<getCellHeight() || bonds.width<getCellWidth()) {
+ //Widget not realized yet, or minimized to < 1 item:
+ //Just tell the listener our min size
+ fResizeListener.sizeChanged(getMinLines(), getMinColumns());
+ } else {
+ //Widget realized: compute actual size and force telling the listener
+ onResize(true);
+ }
}
public void onFontChange() {
@@ -323,7 +368,7 @@ public class TextCanvas extends GridCanvas {
fCursorEnabled=enabled;
fCellCanvasModel.setCursorEnabled(fCursorEnabled);
}
-
+
}
}
diff --git a/pluginVersions.properties b/pluginVersions.properties
deleted file mode 100644
index b56a959..0000000
--- a/pluginVersions.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-# Mo 19. Okt 22:49:31 CEST 2009
-org.eclipse.rse.discovery,0.0.0=v200905272300
-org.eclipse.tm.discovery.doc.isv,0.0.0=v200905272300
-org.eclipse.tm.discovery.engine,0.0.0=v200905272300
-org.eclipse.tm.discovery.model,0.0.0=v200905272300
-org.eclipse.tm.discovery.model.edit,0.0.0=v200905272300
-org.eclipse.tm.discovery.protocol.dnssd,0.0.0=v200905272300
-org.eclipse.tm.discovery.transport.udp,0.0.0=v200905272300
-org.eclipse.tm.discovery.view,0.0.0=v200905272300
-org.eclipse.tm.discovery.wizard,0.0.0=v200905272300
-org.eclipse.dstore.core,0.0.0=v200906032235
-org.eclipse.dstore.doc.isv,0.0.0=v200905272300
-org.eclipse.dstore.extra,0.0.0=v200905272300
-org.eclipse.rse,0.0.0=v200905272300
-org.eclipse.rse.connectorservice.dstore,0.0.0=v200906032235
-org.eclipse.rse.connectorservice.local,0.0.0=v200905272300
-org.eclipse.rse.connectorservice.ssh,0.0.0=v200905272300
-org.eclipse.rse.connectorservice.telnet,0.0.0=v200905272300
-org.eclipse.rse.core,0.0.0=v200905272300
-org.eclipse.rse.doc.isv,0.0.0=v200905272300
-org.eclipse.rse.doc.user,0.0.0=v200905272300
-org.eclipse.rse.dstore.security,0.0.0=v200905272300
-org.eclipse.rse.efs,0.0.0=v200905272300
-org.eclipse.rse.efs.ui,0.0.0=v200905272300
-org.eclipse.rse.examples.daytime,0.0.0=v200905272300
-org.eclipse.rse.examples.tutorial,0.0.0=v200905272300
-org.eclipse.rse.files.ui,0.0.0=v200906102345
-org.eclipse.rse.importexport,0.0.0=v200906032235
-org.eclipse.rse.processes.ui,0.0.0=v200905272300
-org.eclipse.rse.sdk,0.0.0=v200905272300
-org.eclipse.rse.services.dstore,0.0.0=v200906102345
-org.eclipse.rse.services.files.ftp,0.0.0=v200905272300
-org.eclipse.rse.services.local,0.0.0=v200905272300
-org.eclipse.rse.services.ssh,0.0.0=v200905272300
-org.eclipse.rse.services.telnet,0.0.0=v200905272300
-org.eclipse.rse.services,0.0.0=v200906102345
-org.eclipse.rse.shells.ui,0.0.0=v200905272300
-org.eclipse.rse.subsystems.files.core,0.0.0=v200906102345
-org.eclipse.rse.subsystems.files.dstore,0.0.0=v200905272300
-org.eclipse.rse.subsystems.files.ftp,0.0.0=v200905272300
-org.eclipse.rse.subsystems.files.local,0.0.0=v200905272300
-org.eclipse.rse.subsystems.files.ssh,0.0.0=v200905272300
-org.eclipse.rse.subsystems.processes.core,0.0.0=v200905272300
-org.eclipse.rse.subsystems.processes.dstore,0.0.0=v200905272300
-org.eclipse.rse.subsystems.processes.local,0.0.0=v200905272300
-org.eclipse.rse.subsystems.processes.shell.linux,0.0.0=v200905272300
-org.eclipse.rse.subsystems.shells.core,0.0.0=v200905272300
-org.eclipse.rse.subsystems.shells.dstore,0.0.0=v200905272300
-org.eclipse.rse.subsystems.shells.local,0.0.0=v200905272300
-org.eclipse.rse.subsystems.shells.ssh,0.0.0=v200905272300
-org.eclipse.rse.subsystems.shells.telnet,0.0.0=v200905272300
-org.eclipse.rse.subsystems.terminals.core,0.0.0=v200905272300
-org.eclipse.rse.subsystems.terminals.ssh,0.0.0=v200905272300
-org.eclipse.rse.terminals.ui,0.0.0=v200905272300
-org.eclipse.rse.tests,0.0.0=v200905272300
-org.eclipse.rse.tests.framework,0.0.0=v200905272300
-org.eclipse.rse.ui,0.0.0=v200905272300
-org.eclipse.rse.useractions,0.0.0=v200905272300
-org.eclipse.tm.terminal,0.0.0=v200905272300
-org.eclipse.tm.terminal.serial,0.0.0=v200905272300
-org.eclipse.tm.terminal.ssh,0.0.0=v200905272300
-org.eclipse.tm.terminal.telnet,0.0.0=v200905272300
-org.eclipse.tm.terminal.test,0.0.0=v200905272300
-org.eclipse.tm.terminal.view,0.0.0=v200905272300
-org.eclipse.test,0.0.0=v20081002
-org.eclipse.ant.optional.junit,0.0.0=v20080717
-org.eclipse.rse.subsystems.wince,0.0.0=v200905272300
-org.eclipse.tm.rapi,0.0.0=v200905272300
-org.eclipse.tm.rapi.examples,0.0.0=v200905272300
-org.eclipse.tm.rapi.tests,0.0.0=v200905272300
hooks/post-receive
--
eclipse-rse - Plug-in for eclipse - Debian package.
More information about the pkg-java-commits
mailing list