mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
fix compiler warnings for connectorservice.dstore
This commit is contained in:
parent
59b25cbdd6
commit
596bc86602
6 changed files with 105 additions and 99 deletions
|
@ -165,7 +165,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SystemBasePlugin.logError("UniversalSystem.getSystemInfoProperty: error during connect", e);
|
||||
SystemBasePlugin.logError("UniversalSystem.getSystemInfoProperty: error during connect", e); //$NON-NLS-1$
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
@ -196,8 +196,8 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
}
|
||||
else
|
||||
{
|
||||
SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: sysInfo node not found", null);
|
||||
SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: miner data = " + envMinerData, null);
|
||||
SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: sysInfo node not found", null); //$NON-NLS-1$
|
||||
SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: miner data = " + envMinerData, null); //$NON-NLS-1$
|
||||
propertyValue = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,9 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
// this will be the temp remoteuser userid.
|
||||
//launchStatus = clientConnection.launchServer(getLocalUserId(), getPassword(getPasswordInformation()));
|
||||
SystemSignonInformation info = getPasswordInformation();
|
||||
int daemonPort = serverLauncher.getDaemonPort();
|
||||
int daemonPort = 0;
|
||||
if (serverLauncher != null)
|
||||
daemonPort = serverLauncher.getDaemonPort();
|
||||
|
||||
/* String daemonPortStr = getSubSystem().getVendorAttribute("Remote", "DAEMON_PORT");
|
||||
if (daemonPortStr != null && daemonPortStr.length() > 0)
|
||||
|
@ -626,7 +628,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (isPortOutOfRange(launchMsg))
|
||||
else if (launchMsg != null && isPortOutOfRange(launchMsg))
|
||||
{
|
||||
launchFailed = true;
|
||||
|
||||
|
@ -642,7 +644,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
else
|
||||
{
|
||||
launchFailed = true;
|
||||
SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null);
|
||||
SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
if (launchStatus.isConnected())
|
||||
|
@ -901,7 +903,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
if (launchFailed && launchStatus != null)
|
||||
{
|
||||
String launchMsg = launchStatus.getMessage();
|
||||
if (launchStatus.getException() != null)
|
||||
if (launchStatus.getException() != null && serverLauncher != null)
|
||||
{
|
||||
Throwable exception = launchStatus.getException();
|
||||
msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED_EXCEPTION);
|
||||
|
@ -1005,15 +1007,15 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
// if connect failed for unknown reason
|
||||
else if (connectStatus == null)
|
||||
{
|
||||
SystemBasePlugin.logError("Failed to connect to remote system", null);
|
||||
SystemBasePlugin.logError("Failed to connect to remote system", null); //$NON-NLS-1$
|
||||
msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
|
||||
msg.makeSubstitution(getHostName());
|
||||
}
|
||||
|
||||
// if, for some reason, we don't have a message
|
||||
if (msg == null)
|
||||
if (msg == null && connectStatus != null)
|
||||
{
|
||||
SystemBasePlugin.logError("Failed to connect to remote system" + connectStatus.getMessage(), null);
|
||||
SystemBasePlugin.logError("Failed to connect to remote system" + connectStatus.getMessage(), null); //$NON-NLS-1$
|
||||
msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
|
||||
msg.makeSubstitution(getHostName());
|
||||
}
|
||||
|
@ -1022,7 +1024,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
clientConnection = null;
|
||||
|
||||
// yantzi: artemis 6.0, check for invalid login (user ID / pwd) and reprompt for signon information
|
||||
if (msg.getFullMessageID().startsWith(ISystemMessages.MSG_COMM_INVALID_LOGIN))
|
||||
if (msg != null && msg.getFullMessageID().startsWith(ISystemMessages.MSG_COMM_INVALID_LOGIN))
|
||||
{
|
||||
if (launchFailed)
|
||||
{
|
||||
|
|
|
@ -22,21 +22,21 @@ public interface IUniversalDStoreConstants
|
|||
{
|
||||
|
||||
|
||||
public static final String PLUGIN_ID ="org.eclipse.rse.connectorservice.dstore";
|
||||
public static final String PLUGIN_ID ="org.eclipse.rse.connectorservice.dstore"; //$NON-NLS-1$
|
||||
|
||||
public static final String PREFIX = PLUGIN_ID + ".";
|
||||
public static final String PREFIX = PLUGIN_ID + "."; //$NON-NLS-1$
|
||||
|
||||
// prefix for context sensitive help
|
||||
public static final String HELP_PREFIX = PREFIX;
|
||||
|
||||
// Resource Bundle ids
|
||||
public static final String RESID_PREFIX = PREFIX + "ui.";
|
||||
public static final String RESID_PREFIX = PREFIX + "ui."; //$NON-NLS-1$
|
||||
|
||||
// Icons
|
||||
public static final String ICON_DIR = "icons";
|
||||
public static final String ICON_DIR = "icons"; //$NON-NLS-1$
|
||||
public static final String ICON_PATH = java.io.File.separator + ICON_DIR + java.io.File.separator;
|
||||
public static final String ICON_SUFFIX = "Icon";
|
||||
public static final String ICON_EXT = ".gif";
|
||||
public static final String ICON_SUFFIX = "Icon"; //$NON-NLS-1$
|
||||
public static final String ICON_EXT = ".gif"; //$NON-NLS-1$
|
||||
|
||||
//public static final String ICON_SYSTEM_LIBRARY_ROOT = "system400Library";
|
||||
//public static final String ICON_SYSTEM_LIBRARY = ICON_SYSTEM_LIBRARY_ROOT + ICON_EXT;
|
||||
|
@ -47,24 +47,24 @@ public interface IUniversalDStoreConstants
|
|||
// SYstemBaseAction class adds "label" to get text and "tooltip" and "description" to get hover help
|
||||
// -------------------------
|
||||
// action ids
|
||||
public static final String ACTION_PREFIX = RESID_PREFIX + "action.";
|
||||
public static final String RESID_RUN_REMOTECMD_PREFIX = ACTION_PREFIX+"RunRemoteCommand";
|
||||
public static final String ACTION_PREFIX = RESID_PREFIX + "action."; //$NON-NLS-1$
|
||||
public static final String RESID_RUN_REMOTECMD_PREFIX = ACTION_PREFIX+"RunRemoteCommand"; //$NON-NLS-1$
|
||||
|
||||
|
||||
// -------------------------
|
||||
// Preferences...
|
||||
// -------------------------
|
||||
public static final String RESID_PREF_PREFIX = RESID_PREFIX+"preferences.";
|
||||
public static final String RESID_PREF_ROOT_TITLE = RESID_PREF_PREFIX+"root.title";
|
||||
public static final String RESID_PREF_PREFIX = RESID_PREFIX+"preferences."; //$NON-NLS-1$
|
||||
public static final String RESID_PREF_ROOT_TITLE = RESID_PREF_PREFIX+"root.title"; //$NON-NLS-1$
|
||||
|
||||
// RemoteClassLoader caching preferences
|
||||
public static final String RESID_PREF_CACHE_REMOTE_CLASSES = RESID_PREF_PREFIX + "cacheremoteclasses";
|
||||
public static final String RESID_PREF_CACHE_REMOTE_CLASSES = RESID_PREF_PREFIX + "cacheremoteclasses"; //$NON-NLS-1$
|
||||
public static final boolean DEFAULT_PREF_CACHE_REMOTE_CLASSES = true;
|
||||
|
||||
// Socket timeout preference
|
||||
public static final String RESID_PREF_SOCKET_TIMEOUT = RESID_PREF_PREFIX + "sockettimeout";
|
||||
public static final String RESID_PREF_SOCKET_TIMEOUT = RESID_PREF_PREFIX + "sockettimeout"; //$NON-NLS-1$
|
||||
public static final int DEFAULT_PREF_SOCKET_TIMEOUT = 300000;
|
||||
|
||||
public static final String RESID_PREF_DO_KEEPALIVE = RESID_PREF_PREFIX + "dokeepalive";
|
||||
public static final String RESID_PREF_DO_KEEPALIVE = RESID_PREF_PREFIX + "dokeepalive"; //$NON-NLS-1$
|
||||
public static final boolean DEFAULT_PREF_DO_KEEPALIVE = true;
|
||||
}
|
|
@ -23,38 +23,38 @@ public interface IUniversalDStoreMessages
|
|||
{
|
||||
|
||||
|
||||
public static final String PLUGIN_ID ="org.eclipse.rse.connectorservice.dstore";
|
||||
public static final String PREFIX = PLUGIN_ID+".";
|
||||
public static final String PLUGIN_ID ="org.eclipse.rse.connectorservice.dstore"; //$NON-NLS-1$
|
||||
public static final String PREFIX = PLUGIN_ID+"."; //$NON-NLS-1$
|
||||
// Resource Bundle ids
|
||||
public static final String RESID_PREFIX = PREFIX+"ui.";
|
||||
public static final String RESID_PREFIX = PREFIX+"ui."; //$NON-NLS-1$
|
||||
// Messages prefixes
|
||||
public static final String MSG_PREFIX = RESID_PREFIX+"msg.";
|
||||
public static final String MSG_TITLE = MSG_PREFIX + "Title";
|
||||
public static final String MSG_PREFIX = RESID_PREFIX+"msg."; //$NON-NLS-1$
|
||||
public static final String MSG_TITLE = MSG_PREFIX + "Title"; //$NON-NLS-1$
|
||||
|
||||
// Messages
|
||||
public static final String MSG_CONNECTION_PREFIX = MSG_PREFIX + "Connection.";
|
||||
public static final String MSG_CONNECTION_FAILED = MSG_CONNECTION_PREFIX + "Failed";
|
||||
public static final String MSG_CONNECTION_UNKNOWN_HOST = MSG_CONNECTION_PREFIX + "UnknownHost";
|
||||
public static final String MSG_CONNECTION_VERIFY = MSG_CONNECTION_PREFIX + "Verify";
|
||||
public static final String MSG_CONNECTION_COMMPROPERTIES = MSG_CONNECTION_PREFIX + "CommProperties";
|
||||
public static final String MSG_CONNECTION_PREFIX = MSG_PREFIX + "Connection."; //$NON-NLS-1$
|
||||
public static final String MSG_CONNECTION_FAILED = MSG_CONNECTION_PREFIX + "Failed"; //$NON-NLS-1$
|
||||
public static final String MSG_CONNECTION_UNKNOWN_HOST = MSG_CONNECTION_PREFIX + "UnknownHost"; //$NON-NLS-1$
|
||||
public static final String MSG_CONNECTION_VERIFY = MSG_CONNECTION_PREFIX + "Verify"; //$NON-NLS-1$
|
||||
public static final String MSG_CONNECTION_COMMPROPERTIES = MSG_CONNECTION_PREFIX + "CommProperties"; //$NON-NLS-1$
|
||||
|
||||
// RSE Server Connection Messages
|
||||
public static final String MSG_SIGNON_PREFIX = MSG_PREFIX + "Signon.";
|
||||
public static final String MSG_SIGNON_PASSWORD_ERROR = MSG_SIGNON_PREFIX + "PasswordError";
|
||||
public static final String MSG_SIGNON_PASSWORD_INCORRECT = MSG_SIGNON_PREFIX + "PasswordIncorrect";
|
||||
public static final String MSG_SIGNON_PASSWORD_INCORRECT_USER_DISABLED= MSG_SIGNON_PREFIX + "PasswordIncorrectUserDisabled";
|
||||
public static final String MSG_SIGNON_PASSWORD_EXPIRED = MSG_SIGNON_PREFIX + "PasswordExpired";
|
||||
public static final String MSG_SIGNON_USERID_INVALID = MSG_SIGNON_PREFIX + "UserIDInvalid";
|
||||
public static final String MSG_SIGNON_USERID_DISABLED = MSG_SIGNON_PREFIX + "UserIDDisabled";
|
||||
public static final String MSG_SIGNON_USERID_ERROR = MSG_SIGNON_PREFIX + "UserIDError";
|
||||
public static final String MSG_SIGNON_PREFIX = MSG_PREFIX + "Signon."; //$NON-NLS-1$
|
||||
public static final String MSG_SIGNON_PASSWORD_ERROR = MSG_SIGNON_PREFIX + "PasswordError"; //$NON-NLS-1$
|
||||
public static final String MSG_SIGNON_PASSWORD_INCORRECT = MSG_SIGNON_PREFIX + "PasswordIncorrect"; //$NON-NLS-1$
|
||||
public static final String MSG_SIGNON_PASSWORD_INCORRECT_USER_DISABLED= MSG_SIGNON_PREFIX + "PasswordIncorrectUserDisabled"; //$NON-NLS-1$
|
||||
public static final String MSG_SIGNON_PASSWORD_EXPIRED = MSG_SIGNON_PREFIX + "PasswordExpired"; //$NON-NLS-1$
|
||||
public static final String MSG_SIGNON_USERID_INVALID = MSG_SIGNON_PREFIX + "UserIDInvalid"; //$NON-NLS-1$
|
||||
public static final String MSG_SIGNON_USERID_DISABLED = MSG_SIGNON_PREFIX + "UserIDDisabled"; //$NON-NLS-1$
|
||||
public static final String MSG_SIGNON_USERID_ERROR = MSG_SIGNON_PREFIX + "UserIDError"; //$NON-NLS-1$
|
||||
|
||||
public static final String MSG_DATASTORE_PREFIX = MSG_PREFIX + "DataStore.";
|
||||
public static final String MSG_DATASTORE_STARTSERVER = MSG_DATASTORE_PREFIX + "StartServer";
|
||||
public static final String MSG_DATASTORE_CONNECTSERVER = MSG_DATASTORE_PREFIX + "ConnectServer";
|
||||
public static final String MSG_DATASTORE_INITIALIZESERVER = MSG_DATASTORE_PREFIX + "InitializeServer";
|
||||
public static final String MSG_DATASTORE_INITIALIZECODESERVER = MSG_DATASTORE_PREFIX + "InitializeCODEServer";
|
||||
public static final String MSG_DATASTORE_PREFIX = MSG_PREFIX + "DataStore."; //$NON-NLS-1$
|
||||
public static final String MSG_DATASTORE_STARTSERVER = MSG_DATASTORE_PREFIX + "StartServer"; //$NON-NLS-1$
|
||||
public static final String MSG_DATASTORE_CONNECTSERVER = MSG_DATASTORE_PREFIX + "ConnectServer"; //$NON-NLS-1$
|
||||
public static final String MSG_DATASTORE_INITIALIZESERVER = MSG_DATASTORE_PREFIX + "InitializeServer"; //$NON-NLS-1$
|
||||
public static final String MSG_DATASTORE_INITIALIZECODESERVER = MSG_DATASTORE_PREFIX + "InitializeCODEServer"; //$NON-NLS-1$
|
||||
|
||||
public static final String MSG_CMD_PREFIX = MSG_PREFIX + "Command.";
|
||||
public static final String MSG_CMDNAME_EMPTY = MSG_CMD_PREFIX + "Required";
|
||||
public static final String MSG_CMDNAME_NOTVALID = MSG_CMD_PREFIX + "NotValid";
|
||||
public static final String MSG_CMD_PREFIX = MSG_PREFIX + "Command."; //$NON-NLS-1$
|
||||
public static final String MSG_CMDNAME_EMPTY = MSG_CMD_PREFIX + "Required"; //$NON-NLS-1$
|
||||
public static final String MSG_CMDNAME_NOTVALID = MSG_CMD_PREFIX + "NotValid"; //$NON-NLS-1$
|
||||
}
|
|
@ -48,9 +48,9 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
private int rexecPort = 512; // the port where rexecd normally listens
|
||||
private String cmd = null;
|
||||
//private String pwd = null;
|
||||
private static String ASCII_TEST_STRING = "ASCII";
|
||||
private static String PORT_LEADING_STRING = "Server Started Successfully";
|
||||
private static final String EZYRD11E="EZYRD11E";
|
||||
private static String ASCII_TEST_STRING = "ASCII"; //$NON-NLS-1$
|
||||
private static String PORT_LEADING_STRING = "Server Started Successfully"; //$NON-NLS-1$
|
||||
private static final String EZYRD11E="EZYRD11E"; //$NON-NLS-1$
|
||||
private ClientConnection clientConnection;
|
||||
private IServerLauncherProperties propertyInfo;
|
||||
private boolean isModeChecked = false;
|
||||
|
@ -359,7 +359,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
this.propertyInfo = propertyInfo;
|
||||
// set path...
|
||||
this.cwd = ((IRemoteServerLauncher)propertyInfo).getServerPath();
|
||||
char separatorChar = signonInfo.getSystemType().equals("Windows") ? '\\' : '/';
|
||||
char separatorChar = signonInfo.getSystemType().equals("Windows") ? '\\' : '/'; //$NON-NLS-1$
|
||||
if (cwd.length() > 0 && cwd.charAt(cwd.length() - 1) != separatorChar)
|
||||
cwd += separatorChar;
|
||||
// set script...
|
||||
|
@ -405,15 +405,15 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
isModeChecked= false;
|
||||
checkPort=true;
|
||||
_errorMessage = null;
|
||||
String port = new String("0"); // default no port
|
||||
String port = new String("0"); // default no port //$NON-NLS-1$
|
||||
//String hostResponse = ""; //buffer to hold all the messages, so that it can be printed out later
|
||||
String originalHostResponse="";
|
||||
String convertedHostResponse="";
|
||||
String debugOptions = System.getProperty("REXEC_DEBUG");
|
||||
String originalHostResponse=""; //$NON-NLS-1$
|
||||
String convertedHostResponse=""; //$NON-NLS-1$
|
||||
String debugOptions = System.getProperty("REXEC_DEBUG"); //$NON-NLS-1$
|
||||
if (debugOptions!= null){
|
||||
if (debugOptions.toUpperCase().indexOf("LOG") > -1)
|
||||
if (debugOptions.toUpperCase().indexOf("LOG") > -1) //$NON-NLS-1$
|
||||
logInfo = true;
|
||||
if (debugOptions.toUpperCase().indexOf("EBCDIC") > -1)
|
||||
if (debugOptions.toUpperCase().indexOf("EBCDIC") > -1) //$NON-NLS-1$
|
||||
isEBCDICTest=true;
|
||||
}
|
||||
boolean isEBCDIC = false;
|
||||
|
@ -452,10 +452,10 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
// this should be stored in some resource bundle later
|
||||
//cmd = new String ("echo USSTEST;cd ~/dstore;start_anyport");
|
||||
//cmd = new String("echo " + ASCII_TEST_STRING + ";cd ~/rseserver;start_anyport");
|
||||
cmd = new String("echo " + ASCII_TEST_STRING + ";cd " + this.cwd + ";" + this.invocation);
|
||||
cmd = new String("echo " + ASCII_TEST_STRING + ";cd " + this.cwd + ";" + this.invocation); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
//cmd = new String("echo " + ASCII_TEST_STRING + ";cd " + this.cwd + ";" + this.invocation + " " + System.getProperty("user.name"));
|
||||
logMessage("The command is " + cmd);
|
||||
SystemBasePlugin.logInfo("RexecDstoreServer :");
|
||||
logMessage("The command is " + cmd); //$NON-NLS-1$
|
||||
SystemBasePlugin.logInfo("RexecDstoreServer :"); //$NON-NLS-1$
|
||||
|
||||
rxOut.writeBytes(cmd);
|
||||
rxOut.writeByte(0); // send null terminator
|
||||
|
@ -468,7 +468,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
while (inBytes == 0 && timeout > 0)
|
||||
{
|
||||
if (monitor.isCanceled()) // Cancel button pressed?
|
||||
return "0";
|
||||
return "0"; //$NON-NLS-1$
|
||||
|
||||
// try for more input
|
||||
Thread.sleep(100);
|
||||
|
@ -478,7 +478,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
|
||||
if (timeout == 0) {
|
||||
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
|
||||
msg.makeSubstitution(signonInfo.getHostname(), "");
|
||||
msg.makeSubstitution(signonInfo.getHostname(), ""); //$NON-NLS-1$
|
||||
_errorMessage = msg;
|
||||
return port;
|
||||
}
|
||||
|
@ -488,26 +488,26 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
String maybePort=null;
|
||||
while (true ){
|
||||
if (monitor.isCanceled())
|
||||
return "0";
|
||||
return "0"; //$NON-NLS-1$
|
||||
byte aByte = rxIn.readByte();
|
||||
if (isEBCDICTest)
|
||||
aByte = convertFromASCIIToEBCDIC(aByte); // for EBCDIC Test
|
||||
if (aByte == 0) // drop the null
|
||||
continue;
|
||||
originalHostResponse += (char)aByte;
|
||||
logMessage("Host response is " + originalHostResponse);
|
||||
logMessage("Host response is " + originalHostResponse); //$NON-NLS-1$
|
||||
if (!isModeChecked)
|
||||
{
|
||||
convertedHostResponse += convertFromEBCDICToASCII(aByte);
|
||||
logMessage("Host response is converted to " + convertedHostResponse);
|
||||
logMessage("Host response is converted to " + convertedHostResponse); //$NON-NLS-1$
|
||||
if (originalHostResponse.indexOf(ASCII_TEST_STRING) > -1)
|
||||
{ // It's ASCII mode
|
||||
isModeChecked = true;
|
||||
logMessage("This is the ASCII mode. ");
|
||||
logMessage("This is the ASCII mode. "); //$NON-NLS-1$
|
||||
}
|
||||
else if (convertedHostResponse.indexOf(ASCII_TEST_STRING) > -1)
|
||||
{ // It's EBCDIC mode
|
||||
logMessage("This is the EBCDIC mode. ");
|
||||
logMessage("This is the EBCDIC mode. "); //$NON-NLS-1$
|
||||
isModeChecked = true;
|
||||
isEBCDIC = true;
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
if (isEBCDIC)
|
||||
{
|
||||
convertedHostResponse += convertFromEBCDICToASCII(aByte);
|
||||
logMessage("Host response is converted to " + convertedHostResponse);
|
||||
logMessage("Host response is converted to " + convertedHostResponse); //$NON-NLS-1$
|
||||
if(checkPort)
|
||||
{ // It's EBCDIC mode
|
||||
maybePort = extractPortNumber (convertedHostResponse);
|
||||
|
@ -539,7 +539,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
rxIn.close();
|
||||
rxOut.close();
|
||||
rexecCall.close();
|
||||
logMessage("Going to return port " + port);
|
||||
logMessage("Going to return port " + port); //$NON-NLS-1$
|
||||
return port;
|
||||
}
|
||||
catch (EOFException e)
|
||||
|
@ -563,7 +563,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
_errorMessage = msg;
|
||||
} else {
|
||||
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED);
|
||||
msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), hostMessage);
|
||||
msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), hostMessage); //$NON-NLS-1$
|
||||
_errorMessage = msg;
|
||||
|
||||
}
|
||||
|
@ -1113,21 +1113,25 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
}
|
||||
*/
|
||||
private String extractPortNumber (String hostResponse) {
|
||||
String port ="0";
|
||||
logMessage("Going to find port number. ");
|
||||
String port ="0"; //$NON-NLS-1$
|
||||
logMessage("Going to find port number. "); //$NON-NLS-1$
|
||||
int index = hostResponse.indexOf(PORT_LEADING_STRING);
|
||||
if ( index < 0 )
|
||||
return null;
|
||||
logMessage("Found the leading string. ");
|
||||
logMessage("Found the leading string. "); //$NON-NLS-1$
|
||||
String portString = hostResponse.substring(index + PORT_LEADING_STRING.length());
|
||||
logMessage("Removed the leading string as " + portString);
|
||||
if (portString != null && portString.startsWith("\n"))
|
||||
logMessage("Removed the leading string as " + portString); //$NON-NLS-1$
|
||||
if (portString != null && portString.startsWith("\n")) //$NON-NLS-1$
|
||||
portString = portString.substring(1);
|
||||
if (portString == null)
|
||||
return null;
|
||||
|
||||
//if (portString.length() < 4)
|
||||
// return null;
|
||||
|
||||
// change to support 5 digit ports
|
||||
StringBuffer portBuffer = new StringBuffer();
|
||||
|
||||
for (int i = 0; i < portString.length(); i++)
|
||||
{
|
||||
char c = portString.charAt(i);
|
||||
|
@ -1143,17 +1147,17 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
// old code - didn't support 5 digits
|
||||
//port = portString.substring(0,4);
|
||||
|
||||
logMessage("Got the port " + port);
|
||||
logMessage("Got the port " + port); //$NON-NLS-1$
|
||||
try
|
||||
{
|
||||
Integer.parseInt(port);
|
||||
logMessage("Going to return port " + port);
|
||||
logMessage("Going to return port " + port); //$NON-NLS-1$
|
||||
return port;
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
logMessage("Got the wrong port " + port);
|
||||
logMessage("Got the wrong port " + port); //$NON-NLS-1$
|
||||
checkPort=false;
|
||||
return null;
|
||||
}
|
||||
|
@ -1187,7 +1191,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
}
|
||||
private void logMessage (String message) {
|
||||
if (logInfo)
|
||||
SystemBasePlugin.logError("RexecDstoreServer :" + message);
|
||||
SystemBasePlugin.logError("RexecDstoreServer :" + message); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void setSocketTimeoutValue(int value)
|
||||
|
|
|
@ -137,7 +137,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SystemBasePlugin.logError("ConnectionStatusListener: Error disconnecting", e);
|
||||
SystemBasePlugin.logError("ConnectionStatusListener: Error disconnecting", e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
|
|||
*/
|
||||
public void domainChanged(DomainEvent event)
|
||||
{
|
||||
if (!_dataStoreStatus.getName().equals("okay"))
|
||||
if (!_dataStoreStatus.getName().equals("okay")) //$NON-NLS-1$
|
||||
{
|
||||
handleConnectionDown();
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
|
|||
Shell winShell = RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||
if (winShell != null && !winShell.isDisposed() && winShell.isVisible())
|
||||
{
|
||||
SystemBasePlugin.logInfo("Using active workbench window as runnable context");
|
||||
SystemBasePlugin.logInfo("Using active workbench window as runnable context"); //$NON-NLS-1$
|
||||
shell = winShell;
|
||||
return win;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
|
|||
|
||||
if (shell == null || shell.isDisposed() || !shell.isVisible())
|
||||
{
|
||||
SystemBasePlugin.logInfo("Using progress monitor dialog with given shell as parent");
|
||||
SystemBasePlugin.logInfo("Using progress monitor dialog with given shell as parent"); //$NON-NLS-1$
|
||||
shell = rshell;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
SystemBasePlugin.logError("StatusChangeListener.FindShell exception: ", e);
|
||||
SystemBasePlugin.logError("StatusChangeListener.FindShell exception: ", e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
|||
*/
|
||||
protected boolean determineStatusDone(DataElement status)
|
||||
{
|
||||
return status.getAttribute(DE.A_VALUE).equals("done") || status.getAttribute(DE.A_NAME).equals("done");
|
||||
return status.getAttribute(DE.A_VALUE).equals("done") || status.getAttribute(DE.A_NAME).equals("done"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -393,8 +393,8 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
|||
/**
|
||||
* Start diagnostic
|
||||
*
|
||||
* @param Class diagnostic is the an implementation of ICommunicationsDiagnostic
|
||||
* @param boolean quiet is the flag to indicate if user should be prompted
|
||||
* @param diagnostic is the an implementation of ICommunicationsDiagnostic
|
||||
* @param quiet is the flag to indicate if user should be prompted
|
||||
* - true for no prompt
|
||||
* @return ICommunciationsDiagnostic class instance
|
||||
*/
|
||||
|
@ -407,15 +407,15 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
|||
try {
|
||||
String name = target.getName(); /* Get the current element status name: started/working/done */
|
||||
/* Log the current status */
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+": " + "Communications Diagnostic started");
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name +
|
||||
": done = " + _doneStatuses.contains(target) +
|
||||
"; cancelled = " + _cancelledStatuses.contains(target)+
|
||||
"; _networkDown = " + _networkDown );
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+": " + "Communications Diagnostic started"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name + //$NON-NLS-1$
|
||||
": done = " + _doneStatuses.contains(target) + //$NON-NLS-1$
|
||||
"; cancelled = " + _cancelledStatuses.contains(target)+ //$NON-NLS-1$
|
||||
"; _networkDown = " + _networkDown ); //$NON-NLS-1$
|
||||
|
||||
DataStore ds = _dataStore;
|
||||
/* Log the status in DataStore */
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+"(DataStore): " + " isConnected = " + ds.isConnected() + "; isWaiting = " + ds.isWaiting(target));
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+"(DataStore): " + " isConnected = " + ds.isConnected() + "; isWaiting = " + ds.isWaiting(target)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
|
||||
/*Log all nested DataElement's in target's parent*/
|
||||
List deList = target.getParent().getNestedData();
|
||||
|
@ -425,10 +425,10 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
|||
{
|
||||
DataElement child = (DataElement) deList.get(i);
|
||||
if (child != null) {
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(DataElement): " + child.toString());
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(DataElement): " + child.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
DataElement descriptor = child.getDescriptor();
|
||||
if (descriptor != null)
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(Descriptor): " + descriptor.toString());
|
||||
SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(Descriptor): " + descriptor.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SystemBasePlugin.logError("StatusChangeListener.ICommunicationsDiagnostic exception: ", e);
|
||||
SystemBasePlugin.logError("StatusChangeListener.ICommunicationsDiagnostic exception: ", e); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return d; // return the created diagnostic class instance
|
||||
|
|
Loading…
Add table
Reference in a new issue