1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-12 03:25:22 +02:00

fix compiler warnings for connectorservice.dstore

This commit is contained in:
David McKnight 2006-12-12 17:34:46 +00:00
parent 59b25cbdd6
commit 596bc86602
6 changed files with 105 additions and 99 deletions

View file

@ -165,7 +165,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
} }
catch (Exception e) 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$ return ""; //$NON-NLS-1$
} }
} }
@ -196,8 +196,8 @@ public class DStoreConnectorService extends AbstractConnectorService implements
} }
else else
{ {
SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: sysInfo node not found", null); SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: sysInfo node not found", null); //$NON-NLS-1$
SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: miner data = " + envMinerData, null); SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: miner data = " + envMinerData, null); //$NON-NLS-1$
propertyValue = ""; //$NON-NLS-1$ propertyValue = ""; //$NON-NLS-1$
} }
@ -581,7 +581,9 @@ public class DStoreConnectorService extends AbstractConnectorService implements
// this will be the temp remoteuser userid. // this will be the temp remoteuser userid.
//launchStatus = clientConnection.launchServer(getLocalUserId(), getPassword(getPasswordInformation())); //launchStatus = clientConnection.launchServer(getLocalUserId(), getPassword(getPasswordInformation()));
SystemSignonInformation info = getPasswordInformation(); SystemSignonInformation info = getPasswordInformation();
int daemonPort = serverLauncher.getDaemonPort(); int daemonPort = 0;
if (serverLauncher != null)
daemonPort = serverLauncher.getDaemonPort();
/* String daemonPortStr = getSubSystem().getVendorAttribute("Remote", "DAEMON_PORT"); /* String daemonPortStr = getSubSystem().getVendorAttribute("Remote", "DAEMON_PORT");
if (daemonPortStr != null && daemonPortStr.length() > 0) if (daemonPortStr != null && daemonPortStr.length() > 0)
@ -626,7 +628,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
return; return;
} }
} }
else if (isPortOutOfRange(launchMsg)) else if (launchMsg != null && isPortOutOfRange(launchMsg))
{ {
launchFailed = true; launchFailed = true;
@ -642,7 +644,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
else else
{ {
launchFailed = true; launchFailed = true;
SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); //$NON-NLS-1$
} }
} }
if (launchStatus.isConnected()) if (launchStatus.isConnected())
@ -901,7 +903,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
if (launchFailed && launchStatus != null) if (launchFailed && launchStatus != null)
{ {
String launchMsg = launchStatus.getMessage(); String launchMsg = launchStatus.getMessage();
if (launchStatus.getException() != null) if (launchStatus.getException() != null && serverLauncher != null)
{ {
Throwable exception = launchStatus.getException(); Throwable exception = launchStatus.getException();
msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED_EXCEPTION); 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 // if connect failed for unknown reason
else if (connectStatus == null) 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 = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
msg.makeSubstitution(getHostName()); msg.makeSubstitution(getHostName());
} }
// if, for some reason, we don't have a message // 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 = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
msg.makeSubstitution(getHostName()); msg.makeSubstitution(getHostName());
} }
@ -1022,7 +1024,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
clientConnection = null; clientConnection = null;
// yantzi: artemis 6.0, check for invalid login (user ID / pwd) and reprompt for signon information // 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) if (launchFailed)
{ {

View file

@ -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 // prefix for context sensitive help
public static final String HELP_PREFIX = PREFIX; public static final String HELP_PREFIX = PREFIX;
// Resource Bundle ids // Resource Bundle ids
public static final String RESID_PREFIX = PREFIX + "ui."; public static final String RESID_PREFIX = PREFIX + "ui."; //$NON-NLS-1$
// Icons // 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_PATH = java.io.File.separator + ICON_DIR + java.io.File.separator;
public static final String ICON_SUFFIX = "Icon"; public static final String ICON_SUFFIX = "Icon"; //$NON-NLS-1$
public static final String ICON_EXT = ".gif"; 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_ROOT = "system400Library";
//public static final String ICON_SYSTEM_LIBRARY = ICON_SYSTEM_LIBRARY_ROOT + ICON_EXT; //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 // SYstemBaseAction class adds "label" to get text and "tooltip" and "description" to get hover help
// ------------------------- // -------------------------
// action ids // action ids
public static final String ACTION_PREFIX = RESID_PREFIX + "action."; public static final String ACTION_PREFIX = RESID_PREFIX + "action."; //$NON-NLS-1$
public static final String RESID_RUN_REMOTECMD_PREFIX = ACTION_PREFIX+"RunRemoteCommand"; public static final String RESID_RUN_REMOTECMD_PREFIX = ACTION_PREFIX+"RunRemoteCommand"; //$NON-NLS-1$
// ------------------------- // -------------------------
// Preferences... // Preferences...
// ------------------------- // -------------------------
public static final String RESID_PREF_PREFIX = RESID_PREFIX+"preferences."; public static final String RESID_PREF_PREFIX = RESID_PREFIX+"preferences."; //$NON-NLS-1$
public static final String RESID_PREF_ROOT_TITLE = RESID_PREF_PREFIX+"root.title"; public static final String RESID_PREF_ROOT_TITLE = RESID_PREF_PREFIX+"root.title"; //$NON-NLS-1$
// RemoteClassLoader caching preferences // 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; public static final boolean DEFAULT_PREF_CACHE_REMOTE_CLASSES = true;
// Socket timeout preference // 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 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; public static final boolean DEFAULT_PREF_DO_KEEPALIVE = true;
} }

View file

@ -23,38 +23,38 @@ public interface IUniversalDStoreMessages
{ {
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$
// Resource Bundle ids // Resource Bundle ids
public static final String RESID_PREFIX = PREFIX+"ui."; public static final String RESID_PREFIX = PREFIX+"ui."; //$NON-NLS-1$
// Messages prefixes // Messages prefixes
public static final String MSG_PREFIX = RESID_PREFIX+"msg."; public static final String MSG_PREFIX = RESID_PREFIX+"msg."; //$NON-NLS-1$
public static final String MSG_TITLE = MSG_PREFIX + "Title"; public static final String MSG_TITLE = MSG_PREFIX + "Title"; //$NON-NLS-1$
// Messages // Messages
public static final String MSG_CONNECTION_PREFIX = MSG_PREFIX + "Connection."; public static final String MSG_CONNECTION_PREFIX = MSG_PREFIX + "Connection."; //$NON-NLS-1$
public static final String MSG_CONNECTION_FAILED = MSG_CONNECTION_PREFIX + "Failed"; 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"; 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"; 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"; public static final String MSG_CONNECTION_COMMPROPERTIES = MSG_CONNECTION_PREFIX + "CommProperties"; //$NON-NLS-1$
// RSE Server Connection Messages // RSE Server Connection Messages
public static final String MSG_SIGNON_PREFIX = MSG_PREFIX + "Signon."; 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"; 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"; 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"; 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"; 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"; 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"; 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"; 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_PREFIX = MSG_PREFIX + "DataStore."; //$NON-NLS-1$
public static final String MSG_DATASTORE_STARTSERVER = MSG_DATASTORE_PREFIX + "StartServer"; 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"; 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"; 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"; 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_CMD_PREFIX = MSG_PREFIX + "Command."; //$NON-NLS-1$
public static final String MSG_CMDNAME_EMPTY = MSG_CMD_PREFIX + "Required"; 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"; public static final String MSG_CMDNAME_NOTVALID = MSG_CMD_PREFIX + "NotValid"; //$NON-NLS-1$
} }

View file

@ -48,9 +48,9 @@ public class RexecDstoreServer implements IServerLauncher
private int rexecPort = 512; // the port where rexecd normally listens private int rexecPort = 512; // the port where rexecd normally listens
private String cmd = null; private String cmd = null;
//private String pwd = null; //private String pwd = null;
private static String ASCII_TEST_STRING = "ASCII"; private static String ASCII_TEST_STRING = "ASCII"; //$NON-NLS-1$
private static String PORT_LEADING_STRING = "Server Started Successfully"; private static String PORT_LEADING_STRING = "Server Started Successfully"; //$NON-NLS-1$
private static final String EZYRD11E="EZYRD11E"; private static final String EZYRD11E="EZYRD11E"; //$NON-NLS-1$
private ClientConnection clientConnection; private ClientConnection clientConnection;
private IServerLauncherProperties propertyInfo; private IServerLauncherProperties propertyInfo;
private boolean isModeChecked = false; private boolean isModeChecked = false;
@ -359,7 +359,7 @@ public class RexecDstoreServer implements IServerLauncher
this.propertyInfo = propertyInfo; this.propertyInfo = propertyInfo;
// set path... // set path...
this.cwd = ((IRemoteServerLauncher)propertyInfo).getServerPath(); 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) if (cwd.length() > 0 && cwd.charAt(cwd.length() - 1) != separatorChar)
cwd += separatorChar; cwd += separatorChar;
// set script... // set script...
@ -405,15 +405,15 @@ public class RexecDstoreServer implements IServerLauncher
isModeChecked= false; isModeChecked= false;
checkPort=true; checkPort=true;
_errorMessage = null; _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 hostResponse = ""; //buffer to hold all the messages, so that it can be printed out later
String originalHostResponse=""; String originalHostResponse=""; //$NON-NLS-1$
String convertedHostResponse=""; String convertedHostResponse=""; //$NON-NLS-1$
String debugOptions = System.getProperty("REXEC_DEBUG"); String debugOptions = System.getProperty("REXEC_DEBUG"); //$NON-NLS-1$
if (debugOptions!= null){ if (debugOptions!= null){
if (debugOptions.toUpperCase().indexOf("LOG") > -1) if (debugOptions.toUpperCase().indexOf("LOG") > -1) //$NON-NLS-1$
logInfo = true; logInfo = true;
if (debugOptions.toUpperCase().indexOf("EBCDIC") > -1) if (debugOptions.toUpperCase().indexOf("EBCDIC") > -1) //$NON-NLS-1$
isEBCDICTest=true; isEBCDICTest=true;
} }
boolean isEBCDIC = false; boolean isEBCDIC = false;
@ -452,10 +452,10 @@ public class RexecDstoreServer implements IServerLauncher
// this should be stored in some resource bundle later // this should be stored in some resource bundle later
//cmd = new String ("echo USSTEST;cd ~/dstore;start_anyport"); //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 ~/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")); //cmd = new String("echo " + ASCII_TEST_STRING + ";cd " + this.cwd + ";" + this.invocation + " " + System.getProperty("user.name"));
logMessage("The command is " + cmd); logMessage("The command is " + cmd); //$NON-NLS-1$
SystemBasePlugin.logInfo("RexecDstoreServer :"); SystemBasePlugin.logInfo("RexecDstoreServer :"); //$NON-NLS-1$
rxOut.writeBytes(cmd); rxOut.writeBytes(cmd);
rxOut.writeByte(0); // send null terminator rxOut.writeByte(0); // send null terminator
@ -468,7 +468,7 @@ public class RexecDstoreServer implements IServerLauncher
while (inBytes == 0 && timeout > 0) while (inBytes == 0 && timeout > 0)
{ {
if (monitor.isCanceled()) // Cancel button pressed? if (monitor.isCanceled()) // Cancel button pressed?
return "0"; return "0"; //$NON-NLS-1$
// try for more input // try for more input
Thread.sleep(100); Thread.sleep(100);
@ -478,7 +478,7 @@ public class RexecDstoreServer implements IServerLauncher
if (timeout == 0) { if (timeout == 0) {
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
msg.makeSubstitution(signonInfo.getHostname(), ""); msg.makeSubstitution(signonInfo.getHostname(), ""); //$NON-NLS-1$
_errorMessage = msg; _errorMessage = msg;
return port; return port;
} }
@ -488,26 +488,26 @@ public class RexecDstoreServer implements IServerLauncher
String maybePort=null; String maybePort=null;
while (true ){ while (true ){
if (monitor.isCanceled()) if (monitor.isCanceled())
return "0"; return "0"; //$NON-NLS-1$
byte aByte = rxIn.readByte(); byte aByte = rxIn.readByte();
if (isEBCDICTest) if (isEBCDICTest)
aByte = convertFromASCIIToEBCDIC(aByte); // for EBCDIC Test aByte = convertFromASCIIToEBCDIC(aByte); // for EBCDIC Test
if (aByte == 0) // drop the null if (aByte == 0) // drop the null
continue; continue;
originalHostResponse += (char)aByte; originalHostResponse += (char)aByte;
logMessage("Host response is " + originalHostResponse); logMessage("Host response is " + originalHostResponse); //$NON-NLS-1$
if (!isModeChecked) if (!isModeChecked)
{ {
convertedHostResponse += convertFromEBCDICToASCII(aByte); 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) if (originalHostResponse.indexOf(ASCII_TEST_STRING) > -1)
{ // It's ASCII mode { // It's ASCII mode
isModeChecked = true; 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) else if (convertedHostResponse.indexOf(ASCII_TEST_STRING) > -1)
{ // It's EBCDIC mode { // It's EBCDIC mode
logMessage("This is the EBCDIC mode. "); logMessage("This is the EBCDIC mode. "); //$NON-NLS-1$
isModeChecked = true; isModeChecked = true;
isEBCDIC = true; isEBCDIC = true;
} }
@ -517,7 +517,7 @@ public class RexecDstoreServer implements IServerLauncher
if (isEBCDIC) if (isEBCDIC)
{ {
convertedHostResponse += convertFromEBCDICToASCII(aByte); convertedHostResponse += convertFromEBCDICToASCII(aByte);
logMessage("Host response is converted to " + convertedHostResponse); logMessage("Host response is converted to " + convertedHostResponse); //$NON-NLS-1$
if(checkPort) if(checkPort)
{ // It's EBCDIC mode { // It's EBCDIC mode
maybePort = extractPortNumber (convertedHostResponse); maybePort = extractPortNumber (convertedHostResponse);
@ -539,7 +539,7 @@ public class RexecDstoreServer implements IServerLauncher
rxIn.close(); rxIn.close();
rxOut.close(); rxOut.close();
rexecCall.close(); rexecCall.close();
logMessage("Going to return port " + port); logMessage("Going to return port " + port); //$NON-NLS-1$
return port; return port;
} }
catch (EOFException e) catch (EOFException e)
@ -563,7 +563,7 @@ public class RexecDstoreServer implements IServerLauncher
_errorMessage = msg; _errorMessage = msg;
} else { } else {
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED); 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; _errorMessage = msg;
} }
@ -1113,21 +1113,25 @@ public class RexecDstoreServer implements IServerLauncher
} }
*/ */
private String extractPortNumber (String hostResponse) { private String extractPortNumber (String hostResponse) {
String port ="0"; String port ="0"; //$NON-NLS-1$
logMessage("Going to find port number. "); logMessage("Going to find port number. "); //$NON-NLS-1$
int index = hostResponse.indexOf(PORT_LEADING_STRING); int index = hostResponse.indexOf(PORT_LEADING_STRING);
if ( index < 0 ) if ( index < 0 )
return null; return null;
logMessage("Found the leading string. "); logMessage("Found the leading string. "); //$NON-NLS-1$
String portString = hostResponse.substring(index + PORT_LEADING_STRING.length()); String portString = hostResponse.substring(index + PORT_LEADING_STRING.length());
logMessage("Removed the leading string as " + portString); logMessage("Removed the leading string as " + portString); //$NON-NLS-1$
if (portString != null && portString.startsWith("\n")) if (portString != null && portString.startsWith("\n")) //$NON-NLS-1$
portString = portString.substring(1); portString = portString.substring(1);
if (portString == null)
return null;
//if (portString.length() < 4) //if (portString.length() < 4)
// return null; // return null;
// change to support 5 digit ports // change to support 5 digit ports
StringBuffer portBuffer = new StringBuffer(); StringBuffer portBuffer = new StringBuffer();
for (int i = 0; i < portString.length(); i++) for (int i = 0; i < portString.length(); i++)
{ {
char c = portString.charAt(i); char c = portString.charAt(i);
@ -1143,17 +1147,17 @@ public class RexecDstoreServer implements IServerLauncher
// old code - didn't support 5 digits // old code - didn't support 5 digits
//port = portString.substring(0,4); //port = portString.substring(0,4);
logMessage("Got the port " + port); logMessage("Got the port " + port); //$NON-NLS-1$
try try
{ {
Integer.parseInt(port); Integer.parseInt(port);
logMessage("Going to return port " + port); logMessage("Going to return port " + port); //$NON-NLS-1$
return port; return port;
} }
catch (RuntimeException e) catch (RuntimeException e)
{ {
e.printStackTrace(); e.printStackTrace();
logMessage("Got the wrong port " + port); logMessage("Got the wrong port " + port); //$NON-NLS-1$
checkPort=false; checkPort=false;
return null; return null;
} }
@ -1187,7 +1191,7 @@ public class RexecDstoreServer implements IServerLauncher
} }
private void logMessage (String message) { private void logMessage (String message) {
if (logInfo) if (logInfo)
SystemBasePlugin.logError("RexecDstoreServer :" + message); SystemBasePlugin.logError("RexecDstoreServer :" + message); //$NON-NLS-1$
} }
public void setSocketTimeoutValue(int value) public void setSocketTimeoutValue(int value)

View file

@ -137,7 +137,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
} }
catch (Exception e) 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) public void domainChanged(DomainEvent event)
{ {
if (!_dataStoreStatus.getName().equals("okay")) if (!_dataStoreStatus.getName().equals("okay")) //$NON-NLS-1$
{ {
handleConnectionDown(); handleConnectionDown();
} }
@ -219,7 +219,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
Shell winShell = RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(); Shell winShell = RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
if (winShell != null && !winShell.isDisposed() && winShell.isVisible()) 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; shell = winShell;
return win; return win;
} }
@ -231,7 +231,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
if (shell == null || shell.isDisposed() || !shell.isVisible()) 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; shell = rshell;
} }

View file

@ -79,7 +79,7 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
} }
} }
} catch (Exception e) { } 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) 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 * Start diagnostic
* *
* @param Class diagnostic is the an implementation of ICommunicationsDiagnostic * @param diagnostic is the an implementation of ICommunicationsDiagnostic
* @param boolean quiet is the flag to indicate if user should be prompted * @param quiet is the flag to indicate if user should be prompted
* - true for no prompt * - true for no prompt
* @return ICommunciationsDiagnostic class instance * @return ICommunciationsDiagnostic class instance
*/ */
@ -407,15 +407,15 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
try { try {
String name = target.getName(); /* Get the current element status name: started/working/done */ String name = target.getName(); /* Get the current element status name: started/working/done */
/* Log the current status */ /* Log the current status */
SystemBasePlugin.logError("StatusChangeListener."+name+": " + "Communications Diagnostic started"); SystemBasePlugin.logError("StatusChangeListener."+name+": " + "Communications Diagnostic started"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SystemBasePlugin.logError("StatusChangeListener."+name + SystemBasePlugin.logError("StatusChangeListener."+name + //$NON-NLS-1$
": done = " + _doneStatuses.contains(target) + ": done = " + _doneStatuses.contains(target) + //$NON-NLS-1$
"; cancelled = " + _cancelledStatuses.contains(target)+ "; cancelled = " + _cancelledStatuses.contains(target)+ //$NON-NLS-1$
"; _networkDown = " + _networkDown ); "; _networkDown = " + _networkDown ); //$NON-NLS-1$
DataStore ds = _dataStore; DataStore ds = _dataStore;
/* Log the status in 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*/ /*Log all nested DataElement's in target's parent*/
List deList = target.getParent().getNestedData(); List deList = target.getParent().getNestedData();
@ -425,10 +425,10 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
{ {
DataElement child = (DataElement) deList.get(i); DataElement child = (DataElement) deList.get(i);
if (child != null) { 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(); DataElement descriptor = child.getDescriptor();
if (descriptor != null) 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) 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 return d; // return the created diagnostic class instance