1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

removing warnings

This commit is contained in:
David McKnight 2006-12-19 22:04:18 +00:00
parent b99184d06c
commit aad5a3593f

View file

@ -240,9 +240,9 @@ public class SystemViewRemoteFileAdapter
public void setFilterString(String filterString)
{
if (filesOnly && (filterString != null) && (filterString.indexOf("/ns") == -1)) //$NON-NLS-1$
filterString = filterString + " /ns";
else if (foldersOnly && (filterString != null) && (filterString.indexOf("/nf") == -1))
filterString = filterString + " /nf";
filterString = filterString + " /ns"; //$NON-NLS-1$
else if (foldersOnly && (filterString != null) && (filterString.indexOf("/nf") == -1)) //$NON-NLS-1$
filterString = filterString + " /nf"; //$NON-NLS-1$
this.filterString = filterString;
}
@ -588,7 +588,7 @@ public class SystemViewRemoteFileAdapter
*/
public String getStatusLineText(Object element)
{
return getType(element) + ": " + getAbsoluteName(element);
return getType(element) + ": " + getAbsoluteName(element); //$NON-NLS-1$
}
/**
@ -669,21 +669,21 @@ public class SystemViewRemoteFileAdapter
else if (foldersOnly)
{
if (filterString == null)
filter = "* /nf";
filter = "* /nf"; //$NON-NLS-1$
else
filter = filterString;
}
else if (filesOnly)
{
if (filterString == null)
filter = "* /ns";
filter = "* /ns"; //$NON-NLS-1$
else
filter = filterString;
}
else
{
if (filterString == null)
filter = "*";
filter = "*"; //$NON-NLS-1$
else
filter = filterString;
}
@ -750,7 +750,7 @@ public class SystemViewRemoteFileAdapter
{
children = new SystemMessageObject[1];
children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element);
SystemBasePlugin.logError("Exception resolving file filter strings", exc);
SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
} // message already issued
}
return children;
@ -985,20 +985,20 @@ public class SystemViewRemoteFileAdapter
if (debug)
{
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE");
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE");
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENT");
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENT");
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT");
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT");
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME");
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME");
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ROOT");
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ROOT");
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ISROOT");
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ISROOT");
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_EXISTS");
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_EXISTS");
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$
}
if (isVirtual)
@ -1075,12 +1075,12 @@ public class SystemViewRemoteFileAdapter
if (name.equals(P_NBRCHILDREN))
{
IRemoteFile file = (IRemoteFile) propertySourceInput;
if (file instanceof ISystemContainer)
System.out.println("getting children for "+ file.getAbsolutePath()); //$NON-NLS-1$
{
ISystemContainer container = (ISystemContainer)file;
ISystemContainer container = file;
Object[] contents = container.getContents(RemoteChildrenContentsType.getInstance());
if (contents == null)
return "0";
return "0"; //$NON-NLS-1$
else
return Integer.toString(contents.length);
}
@ -1107,26 +1107,26 @@ public class SystemViewRemoteFileAdapter
}
if (debug)
{
if (name.equals("DEBUG_PARENTREMOTEFILE"))
if (name.equals("DEBUG_PARENTREMOTEFILE")) //$NON-NLS-1$
{
IRemoteFile parent = file.getParentRemoteFile();
if (parent == null)
return "null";
return "null"; //$NON-NLS-1$
else
return "absPath='" + parent.getAbsolutePath() + "'";
return "absPath='" + parent.getAbsolutePath() + "'"; //$NON-NLS-1$ //$NON-NLS-2$
}
else if (name.equals("DEBUG_PARENT"))
else if (name.equals("DEBUG_PARENT")) //$NON-NLS-1$
return file.getParentPath();
else if (name.equals("DEBUG_PARENTNOROOT"))
else if (name.equals("DEBUG_PARENTNOROOT")) //$NON-NLS-1$
return file.getParentNoRoot();
else if (name.equals("DEBUG_PARENTNAME"))
else if (name.equals("DEBUG_PARENTNAME")) //$NON-NLS-1$
return file.getParentName();
else if (name.equals("DEBUG_ROOT"))
else if (name.equals("DEBUG_ROOT")) //$NON-NLS-1$
return file.getRoot();
else if (name.equals("DEBUG_ISROOT"))
return file.isRoot() ? "true" : "false";
else if (name.equals("DEBUG_EXISTS"))
return file.exists() ? "true" : "false";
else if (name.equals("DEBUG_ISROOT")) //$NON-NLS-1$
return file.isRoot() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
else if (name.equals("DEBUG_EXISTS")) //$NON-NLS-1$
return file.exists() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
}
//
@ -1220,7 +1220,7 @@ public class SystemViewRemoteFileAdapter
}
else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONMETHOD))
{
if (!isVirtual) return "";
if (!isVirtual) return ""; //$NON-NLS-1$
return virtualFile.getCompressionMethod();
}
else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO))
@ -1473,7 +1473,7 @@ public class SystemViewRemoteFileAdapter
{
IHost connection = connections[i];
IRemoteFileSubSystem anFS = RemoteFileUtility.getFileSubSystem(connection);
if ((anFS != null) && (anFS.getHost().getSystemType().equals("Local")))
if ((anFS != null) && (anFS.getHost().getSystemType().equals("Local"))) //$NON-NLS-1$
{
return anFS;
}
@ -1495,7 +1495,7 @@ public class SystemViewRemoteFileAdapter
{
FileServiceSubSystem ss = (FileServiceSubSystem)subsys;
SystemSearchString searchString = new SystemSearchString("*", false, false, "*", false, false, true);
SystemSearchString searchString = new SystemSearchString("*", false, false, "*", false, false, true); //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < initialResources.size(); i++)
{
@ -1882,6 +1882,13 @@ public class SystemViewRemoteFileAdapter
IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name);
resultSet.addResource(copiedFile);
}
else
{
// need a failed message here
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_FILE_FAILED);
msg.makeSubstitution(srcFileOrFolder.getAbsolutePath());
resultSet.setMessage(msg);
}
}
catch (Exception e)
{
@ -2233,7 +2240,7 @@ public class SystemViewRemoteFileAdapter
}
catch (SystemMessageException e)
{
SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e);
SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e); //$NON-NLS-1$
}
return newName;
@ -2402,7 +2409,7 @@ public class SystemViewRemoteFileAdapter
for (int i = 0; i < members.length; i++)
{
IResource member = members[i];
moveTempFileProperties(member, ss, remotePath + "/" + member.getName());
moveTempFileProperties(member, ss, remotePath + "/" + member.getName()); //$NON-NLS-1$
}
}
catch (Exception e)
@ -2446,7 +2453,7 @@ public class SystemViewRemoteFileAdapter
try
{
String newRemotePath = file.getParentPath() + "/" + newName;
String newRemotePath = file.getParentPath() + "/" + newName; //$NON-NLS-1$
IResource localResource = null;
if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
{
@ -2653,9 +2660,9 @@ public class SystemViewRemoteFileAdapter
{
srcType = file.getExtension();
if (srcType == null)
srcType = "blank";
srcType = "blank"; //$NON-NLS-1$
else if (srcType.length() == 0)
srcType = "null";
srcType = "null"; //$NON-NLS-1$
}
return srcType;
}
@ -2912,7 +2919,7 @@ public class SystemViewRemoteFileAdapter
IRemoteFile remoteFile = (IRemoteFile) object;
if (remoteFile.isDirectory())
{
return remoteFile.getAbsolutePath() + remoteFile.getSeparator() + "*";
return remoteFile.getAbsolutePath() + remoteFile.getSeparator() + "*"; //$NON-NLS-1$
}
else
{
@ -2965,7 +2972,7 @@ public class SystemViewRemoteFileAdapter
String inName = name.toLowerCase();
if (inName.equals("classification"))
if (inName.equals("classification")) //$NON-NLS-1$
{
String classification = tgt.getClassification();
@ -2974,7 +2981,7 @@ public class SystemViewRemoteFileAdapter
return StringCompare.compare(value, classification, true);
}
}
else if (inName.equals("name"))
else if (inName.equals("name")) //$NON-NLS-1$
{
boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive();
@ -2988,14 +2995,14 @@ public class SystemViewRemoteFileAdapter
}
// we have a wild card test, and * is the last character in the value
if (val.endsWith("*")) {
if (val.endsWith("*")) { //$NON-NLS-1$
return tgtName.startsWith(val.substring(0, val.length()-1));
}
else {
return val.equals(tgtName);
}
}
else if (inName.equals("absolutePath".toLowerCase())) {
else if (inName.equals("absolutePath".toLowerCase())) { //$NON-NLS-1$
boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive();
@ -3009,14 +3016,14 @@ public class SystemViewRemoteFileAdapter
}
// we have a wild card test, and * is the last character in the value
if (val.endsWith("*")) {
if (val.endsWith("*")) { //$NON-NLS-1$
return tgtPath.startsWith(val.substring(0, val.length()-1));
}
else {
return val.equals(tgtPath);
}
}
else if (inName.equals("extension")) {
else if (inName.equals("extension")) { //$NON-NLS-1$
boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive();
@ -3026,7 +3033,7 @@ public class SystemViewRemoteFileAdapter
return false;
}
StringTokenizer st = new StringTokenizer(value, " \t\n\r\f,");
StringTokenizer st = new StringTokenizer(value, " \t\n\r\f,"); //$NON-NLS-1$
String val = null;
@ -3044,7 +3051,7 @@ public class SystemViewRemoteFileAdapter
// we have a wild card test, and * is the last character in
// the value
if (val.endsWith("*")) {
if (val.endsWith("*")) { //$NON-NLS-1$
match = tgtExtension.startsWith(val.substring(0, val.length() - 1));
}
else {
@ -3060,64 +3067,64 @@ public class SystemViewRemoteFileAdapter
// return false if no match
return false;
}
else if (inName.equals("isroot"))
else if (inName.equals("isroot")) //$NON-NLS-1$
{
return tgt.isRoot() && value.equals("true") ||
!tgt.isRoot() && value.equals("false");
return tgt.isRoot() && value.equals("true") || //$NON-NLS-1$
!tgt.isRoot() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("isfile"))
else if (inName.equals("isfile")) //$NON-NLS-1$
{
return tgt.isFile() && value.equals("true") ||
!tgt.isFile() && value.equals("false");
return tgt.isFile() && value.equals("true") || //$NON-NLS-1$
!tgt.isFile() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("isdirectory"))
else if (inName.equals("isdirectory")) //$NON-NLS-1$
{
return tgt.isDirectory() && value.equals("true") ||
!tgt.isDirectory() && value.equals("false");
return tgt.isDirectory() && value.equals("true") || //$NON-NLS-1$
!tgt.isDirectory() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("ishidden"))
else if (inName.equals("ishidden")) //$NON-NLS-1$
{
return tgt.isHidden() && value.equals("true") ||
!tgt.isHidden() && value.equals("false");
return tgt.isHidden() && value.equals("true") || //$NON-NLS-1$
!tgt.isHidden() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("canread"))
else if (inName.equals("canread")) //$NON-NLS-1$
{
return tgt.canRead() && value.equals("true") ||
!tgt.canRead() && value.equals("false");
return tgt.canRead() && value.equals("true") || //$NON-NLS-1$
!tgt.canRead() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("canwrite"))
else if (inName.equals("canwrite")) //$NON-NLS-1$
{
return tgt.canWrite() && value.equals("true") ||
!tgt.canWrite() && value.equals("false");
return tgt.canWrite() && value.equals("true") || //$NON-NLS-1$
!tgt.canWrite() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("isbinary"))
else if (inName.equals("isbinary")) //$NON-NLS-1$
{
return tgt.isBinary() && value.equals("true") ||
!tgt.isBinary() && value.equals("false");
return tgt.isBinary() && value.equals("true") || //$NON-NLS-1$
!tgt.isBinary() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("istext"))
else if (inName.equals("istext")) //$NON-NLS-1$
{
return tgt.isText() && value.equals("true") ||
!tgt.isText() && value.equals("false");
return tgt.isText() && value.equals("true") || //$NON-NLS-1$
!tgt.isText() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("isarchive")) {
return tgt.isArchive() && value.equals("true") ||
!tgt.isArchive() && value.equals("false");
else if (inName.equals("isarchive")) { //$NON-NLS-1$
return tgt.isArchive() && value.equals("true") || //$NON-NLS-1$
!tgt.isArchive() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("isvirtual"))
else if (inName.equals("isvirtual")) //$NON-NLS-1$
{
return tgt instanceof IVirtualRemoteFile && value.equals("true") ||
!(tgt instanceof IVirtualRemoteFile) && value.equals("false");
return tgt instanceof IVirtualRemoteFile && value.equals("true") || //$NON-NLS-1$
!(tgt instanceof IVirtualRemoteFile) && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("isexecutable"))
else if (inName.equals("isexecutable")) //$NON-NLS-1$
{
return tgt.isExecutable() && value.equals("true") ||
!tgt.isExecutable() && value.equals("false");
return tgt.isExecutable() && value.equals("true") || //$NON-NLS-1$
!tgt.isExecutable() && value.equals("false"); //$NON-NLS-1$
}
else if (inName.equals("islink"))
else if (inName.equals("islink")) //$NON-NLS-1$
{
return tgt.isLink() && value.equals("true") ||
!tgt.isLink() && value.equals("false");
return tgt.isLink() && value.equals("true") || //$NON-NLS-1$
!tgt.isLink() && value.equals("false"); //$NON-NLS-1$
}
}