diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java index defa3f9c0b5..59178442043 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java @@ -461,7 +461,7 @@ public final class DataElement implements IDataElement public String getAttribute(int attributeIndex) { if (_attributes == null) - return ""; + return ""; //$NON-NLS-1$ return _attributes[attributeIndex]; } diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java index 4452a9803ab..7ad75b5a384 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java @@ -2662,7 +2662,7 @@ public final class DataStore * Finds all the deleted elements * * @param root where to search from - * @param type the descriptor representing the type of the objects to search for + * @param depth the depth to search * @return a list of elements */ public List findDeleted(DataElement root, int depth) @@ -3206,9 +3206,9 @@ public final class DataStore /** * Saves a class instance * - * @param className the fully qualified name of the class * @param buffer the contents of the class * @param size the size of the buffer + * @param classbyteStreamHandlerId the id for the byte stream handler */ public void saveClassInstance(byte[] buffer, int size, String classbyteStreamHandlerId) { @@ -3491,7 +3491,7 @@ public final class DataStore // if the idle is 0 or not set then it is considered indefinite. // The server is considered idle for the period of which no commands are // received in server command handler - String serverIdleShutdownTimeout = System.getProperty("DSTORE_IDLE_SHUTDOWN_TIMEOUT"); + String serverIdleShutdownTimeout = System.getProperty("DSTORE_IDLE_SHUTDOWN_TIMEOUT"); //$NON-NLS-1$ if (serverIdleShutdownTimeout != null) { _serverIdleShutdownTimeout = Integer.parseInt(serverIdleShutdownTimeout); @@ -4266,18 +4266,18 @@ public final class DataStore total++; boolean isSpirit = root.isSpirit(); boolean isDeleted = root.isDeleted(); - String prefix = "DataElement"; + String prefix = "DataElement"; //$NON-NLS-1$ if (isSpirit) - prefix += ""; + prefix += ""; //$NON-NLS-1$ if (isDeleted) - prefix += ""; + prefix += ""; //$NON-NLS-1$ - String msg = indent + prefix + "["+ total + "]("+root.getType()+", "+root.getName()+")"; + String msg = indent + prefix + "["+ total + "]("+root.getType()+", "+root.getName()+")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ System.out.println(msg); for (int i = 0; i < root.getNestedSize(); i++) { - DataElement currentElement = (DataElement) root.get(i); - total = printTree(indent + " ", total, currentElement); + DataElement currentElement = root.get(i); + total = printTree(indent + " ", total, currentElement); //$NON-NLS-1$ } } return total; diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java index 4edb834e376..8130c8fbeb2 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java @@ -78,7 +78,7 @@ public class ServerCommandHandler extends CommandHandler // if we do timeout then it's time to shutdown the server return; } - System.out.println("server timed out!"); + System.out.println("server timed out!"); //$NON-NLS-1$ _serverTimedOut = true; } diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java index 1af189113ef..286d807f9e7 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java @@ -191,10 +191,10 @@ public class CommandMiner extends Miner { String invocation = ">"; //$NON-NLS-1$ DataElement encodingArg = getCommandArgument(theElement, 1); - if (encodingArg.getType().equals("shell.encoding")) + if (encodingArg.getType().equals("shell.encoding")) //$NON-NLS-1$ { // fix for 191599 - System.setProperty("dstore.stdin.encoding",encodingArg.getValue()); //$NON-NLS-1$ //$NON-NLS-2$ + System.setProperty("dstore.stdin.encoding",encodingArg.getValue()); //$NON-NLS-1$ } launchCommand(subject, invocation, status); } @@ -204,7 +204,7 @@ public class CommandMiner extends Miner // DataElement de = (DataElement) subject.dereference().get(1); subject.dereference().get(1); sendInputToCommand(input.getName(), getCommandStatus(subject)); - status.setAttribute(DE.A_NAME, "done"); + status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$ } else if (name.equals("C_CANCEL")) //$NON-NLS-1$ { diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java index 90f1c6a39bb..c17694b90bf 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java @@ -1091,13 +1091,12 @@ public class CommandMinerThread extends MinerThread try { String fileName = parsedMsg.file; - DataElement object = null; - if (parsedMsg.type.equals("prompt")) + if (parsedMsg.type.equals("prompt")) //$NON-NLS-1$ { - int tildaIndex = fileName.indexOf("~"); + int tildaIndex = fileName.indexOf("~"); //$NON-NLS-1$ if (tildaIndex == 0) { - String userHome = System.getProperty("user.home"); + String userHome = System.getProperty("user.home"); //$NON-NLS-1$ fileName = userHome + fileName.substring(1); } @@ -1113,13 +1112,13 @@ public class CommandMinerThread extends MinerThread createObject(_descriptors._stdout, line); } } - else if (parsedMsg.type.equals("file")) + else if (parsedMsg.type.equals("file")) //$NON-NLS-1$ { - object = createObject(parsedMsg.type, line, fileName, null); + createObject(parsedMsg.type, line, fileName, null); } else { - object = createObject(parsedMsg.type, line, fileName, new Integer(parsedMsg.line)); + createObject(parsedMsg.type, line, fileName, new Integer(parsedMsg.line)); } } catch (NumberFormatException e) diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java index d90fdd16a38..acf387f4aac 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java @@ -210,7 +210,7 @@ public class OutputHandler extends Handler { // output // the delimiters are therefore set to "\n\r" StringTokenizer tokenizer = new StringTokenizer( - fullOutput, "\n\r"); + fullOutput, "\n\r"); //$NON-NLS-1$ int numTokens = tokenizer.countTokens(); output = new String[numTokens]; int index = 0; @@ -220,7 +220,7 @@ public class OutputHandler extends Handler { } String lastLine = output[index - 1]; - if (!_endOfStream && (!fullOutput.endsWith("\n") && !fullOutput.endsWith("\r"))) + if (!_endOfStream && (!fullOutput.endsWith("\n") && !fullOutput.endsWith("\r"))) //$NON-NLS-1$ //$NON-NLS-2$ { // our last line may be cut off byte[] lastBytes = new byte[MAX_OFFSET]; @@ -253,8 +253,8 @@ public class OutputHandler extends Handler { // check for end of line String suffix = new String(lastBytes, 0, lastIndex + 1, encoding); - int rBreak = suffix.indexOf("\r"); - int nBreak = suffix.indexOf("\n"); + int rBreak = suffix.indexOf("\r"); //$NON-NLS-1$ + int nBreak = suffix.indexOf("\n"); //$NON-NLS-1$ if (nBreak != -1 || rBreak != -1) { // we've hit the end of line; diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java index 75abdb051d0..1b7144935ff 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java @@ -37,21 +37,14 @@ import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild; public class ArchiveQueryThread extends QueryThread { - private DataElement _attributes; - private boolean _caseSensitive; private boolean _foldersOnly; - private boolean _showHidden; - private boolean _isWindows; + public ArchiveQueryThread(DataElement subject, DataElement attributes, boolean caseSensitive, boolean foldersOnly, boolean showHidden, boolean isWindows, DataElement status) { super(subject, status); - _attributes = attributes; _foldersOnly = foldersOnly; - _caseSensitive = caseSensitive; - _showHidden = showHidden; - _isWindows = isWindows; } public void run() { diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java index a281670f210..ad00fc3ec05 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java @@ -170,7 +170,7 @@ public class DStoreProcessService extends AbstractProcessService implements IPro if (_minerElement == null || _minerElement.getDataStore() != getDataStore()) { _minerElement = getDataStore() - .findMinerInformation(UniversalProcessMiner.MINER_ID); //$NON-NLS-1$ + .findMinerInformation(UniversalProcessMiner.MINER_ID); } return _minerElement; } diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java index f4c73ec9253..c2247e92a3b 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java @@ -86,11 +86,11 @@ public class DStoreSearchService extends AbstractDStoreService implements ISearc { getStatusMonitor(ds).waitForUpdate(status, monitor); String statusStr = status.getName(); - if (statusStr.equals("done")) + if (statusStr.equals("done")) //$NON-NLS-1$ { config.setStatus(IHostSearchConstants.FINISHED); } - else if (statusStr.equals("cancelled")) + else if (statusStr.equals("cancelled")) //$NON-NLS-1$ { config.setStatus(IHostSearchConstants.CANCELLED); } diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java index 2a2cabe34a7..e52539f8a7d 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java @@ -312,8 +312,8 @@ public class DStoreStatusMonitor implements IDomainListener if (status != null) { // token command to wake up update handler - DataElement cmdDescriptor = _dataStore.findCommandDescriptor("C_REFRESH"); - DataElement subject = (DataElement)status.getParent().get(0); + DataElement cmdDescriptor = _dataStore.findCommandDescriptor("C_REFRESH"); //$NON-NLS-1$ + DataElement subject = status.getParent().get(0); if (cmdDescriptor != null) { _dataStore.command(cmdDescriptor, subject); diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java index 9a6c0c3c95c..8782b32d6e9 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java @@ -80,7 +80,7 @@ public class DStoreFile extends AbstractRemoteFile implements IRemoteFile if (hostParent == null) { DataStore ds = _dstoreHostFile.getDataElement().getDataStore(); - DataElement element = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, ""); + DataElement element = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, ""); //$NON-NLS-1$ element.setAttribute(DE.A_VALUE, pathOnly); hostParent = new DStoreHostFile(element); @@ -101,7 +101,7 @@ public class DStoreFile extends AbstractRemoteFile implements IRemoteFile { parentName = pathOnly.substring(nameSep + 1); parentPath = pathOnly.substring(0, nameSep); - if (parentPath.endsWith(":")) + if (parentPath.endsWith(":")) //$NON-NLS-1$ { parentPath = parentPath + sep; } @@ -109,7 +109,7 @@ public class DStoreFile extends AbstractRemoteFile implements IRemoteFile else { parentName = pathOnly.substring(nameSep + 1); - parentPath = "" + sep; + parentPath = "" + sep; //$NON-NLS-1$ } DataElement element = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, parentName); @@ -135,7 +135,7 @@ public class DStoreFile extends AbstractRemoteFile implements IRemoteFile { parentName = pathOnly.substring(nameSep + 1); parentPath = pathOnly.substring(0, nameSep); - if (parentPath.endsWith(":")) + if (parentPath.endsWith(":")) //$NON-NLS-1$ { parentPath = parentPath + sep; } @@ -143,7 +143,7 @@ public class DStoreFile extends AbstractRemoteFile implements IRemoteFile else { parentName = pathOnly.substring(nameSep + 1); - parentPath = "" + sep; + parentPath = "" + sep; //$NON-NLS-1$ } DataElement element = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, parentName); diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java index ef7c2c43c1f..9b0c9daf95b 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java @@ -88,7 +88,7 @@ public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchRe for (int i = 0; i < results.size(); i++) { DataElement fileNode = (DataElement)results.get(i); - if (fileNode != null && !fileNode.getType().equals("error")) + if (fileNode != null && !fileNode.getType().equals("error")) //$NON-NLS-1$ { IRemoteFile parentRemoteFile = null; try @@ -140,7 +140,7 @@ public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchRe } } } - return (IRemoteFile[])_convertedResults.toArray(new IRemoteFile[_convertedResults.size()]); + return _convertedResults.toArray(new IRemoteFile[_convertedResults.size()]); } else { @@ -170,7 +170,7 @@ public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchRe _status.getDataStore().getDomainNotifier().removeDomainListener(this); } - else if (_status.getValue().equals("cancelled")) + else if (_status.getValue().equals("cancelled")) //$NON-NLS-1$ { setStatus(IHostSearchConstants.CANCELLED); _status.getDataStore().getDomainNotifier().removeDomainListener(this);