1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 03:55:22 +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) public void setFilterString(String filterString)
{ {
if (filesOnly && (filterString != null) && (filterString.indexOf("/ns") == -1)) //$NON-NLS-1$ if (filesOnly && (filterString != null) && (filterString.indexOf("/ns") == -1)) //$NON-NLS-1$
filterString = filterString + " /ns"; filterString = filterString + " /ns"; //$NON-NLS-1$
else if (foldersOnly && (filterString != null) && (filterString.indexOf("/nf") == -1)) else if (foldersOnly && (filterString != null) && (filterString.indexOf("/nf") == -1)) //$NON-NLS-1$
filterString = filterString + " /nf"; filterString = filterString + " /nf"; //$NON-NLS-1$
this.filterString = filterString; this.filterString = filterString;
} }
@ -588,7 +588,7 @@ public class SystemViewRemoteFileAdapter
*/ */
public String getStatusLineText(Object element) 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) else if (foldersOnly)
{ {
if (filterString == null) if (filterString == null)
filter = "* /nf"; filter = "* /nf"; //$NON-NLS-1$
else else
filter = filterString; filter = filterString;
} }
else if (filesOnly) else if (filesOnly)
{ {
if (filterString == null) if (filterString == null)
filter = "* /ns"; filter = "* /ns"; //$NON-NLS-1$
else else
filter = filterString; filter = filterString;
} }
else else
{ {
if (filterString == null) if (filterString == null)
filter = "*"; filter = "*"; //$NON-NLS-1$
else else
filter = filterString; filter = filterString;
} }
@ -750,7 +750,7 @@ public class SystemViewRemoteFileAdapter
{ {
children = new SystemMessageObject[1]; children = new SystemMessageObject[1];
children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); 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 } // message already issued
} }
return children; return children;
@ -985,20 +985,20 @@ public class SystemViewRemoteFileAdapter
if (debug) if (debug)
{ {
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENT"); propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENT"); briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ROOT"); propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ROOT"); briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$
briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$
} }
if (isVirtual) if (isVirtual)
@ -1075,12 +1075,12 @@ public class SystemViewRemoteFileAdapter
if (name.equals(P_NBRCHILDREN)) if (name.equals(P_NBRCHILDREN))
{ {
IRemoteFile file = (IRemoteFile) propertySourceInput; 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()); Object[] contents = container.getContents(RemoteChildrenContentsType.getInstance());
if (contents == null) if (contents == null)
return "0"; return "0"; //$NON-NLS-1$
else else
return Integer.toString(contents.length); return Integer.toString(contents.length);
} }
@ -1107,26 +1107,26 @@ public class SystemViewRemoteFileAdapter
} }
if (debug) if (debug)
{ {
if (name.equals("DEBUG_PARENTREMOTEFILE")) if (name.equals("DEBUG_PARENTREMOTEFILE")) //$NON-NLS-1$
{ {
IRemoteFile parent = file.getParentRemoteFile(); IRemoteFile parent = file.getParentRemoteFile();
if (parent == null) if (parent == null)
return "null"; return "null"; //$NON-NLS-1$
else 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(); return file.getParentPath();
else if (name.equals("DEBUG_PARENTNOROOT")) else if (name.equals("DEBUG_PARENTNOROOT")) //$NON-NLS-1$
return file.getParentNoRoot(); return file.getParentNoRoot();
else if (name.equals("DEBUG_PARENTNAME")) else if (name.equals("DEBUG_PARENTNAME")) //$NON-NLS-1$
return file.getParentName(); return file.getParentName();
else if (name.equals("DEBUG_ROOT")) else if (name.equals("DEBUG_ROOT")) //$NON-NLS-1$
return file.getRoot(); return file.getRoot();
else if (name.equals("DEBUG_ISROOT")) else if (name.equals("DEBUG_ISROOT")) //$NON-NLS-1$
return file.isRoot() ? "true" : "false"; return file.isRoot() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
else if (name.equals("DEBUG_EXISTS")) else if (name.equals("DEBUG_EXISTS")) //$NON-NLS-1$
return file.exists() ? "true" : "false"; 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)) else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONMETHOD))
{ {
if (!isVirtual) return ""; if (!isVirtual) return ""; //$NON-NLS-1$
return virtualFile.getCompressionMethod(); return virtualFile.getCompressionMethod();
} }
else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO)) else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO))
@ -1473,7 +1473,7 @@ public class SystemViewRemoteFileAdapter
{ {
IHost connection = connections[i]; IHost connection = connections[i];
IRemoteFileSubSystem anFS = RemoteFileUtility.getFileSubSystem(connection); 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; return anFS;
} }
@ -1495,7 +1495,7 @@ public class SystemViewRemoteFileAdapter
{ {
FileServiceSubSystem ss = (FileServiceSubSystem)subsys; 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++) for (int i = 0; i < initialResources.size(); i++)
{ {
@ -1882,6 +1882,13 @@ public class SystemViewRemoteFileAdapter
IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name); IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name);
resultSet.addResource(copiedFile); 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) catch (Exception e)
{ {
@ -2233,7 +2240,7 @@ public class SystemViewRemoteFileAdapter
} }
catch (SystemMessageException e) catch (SystemMessageException e)
{ {
SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e); SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e); //$NON-NLS-1$
} }
return newName; return newName;
@ -2402,7 +2409,7 @@ public class SystemViewRemoteFileAdapter
for (int i = 0; i < members.length; i++) for (int i = 0; i < members.length; i++)
{ {
IResource member = members[i]; IResource member = members[i];
moveTempFileProperties(member, ss, remotePath + "/" + member.getName()); moveTempFileProperties(member, ss, remotePath + "/" + member.getName()); //$NON-NLS-1$
} }
} }
catch (Exception e) catch (Exception e)
@ -2446,7 +2453,7 @@ public class SystemViewRemoteFileAdapter
try try
{ {
String newRemotePath = file.getParentPath() + "/" + newName; String newRemotePath = file.getParentPath() + "/" + newName; //$NON-NLS-1$
IResource localResource = null; IResource localResource = null;
if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist()) if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
{ {
@ -2653,9 +2660,9 @@ public class SystemViewRemoteFileAdapter
{ {
srcType = file.getExtension(); srcType = file.getExtension();
if (srcType == null) if (srcType == null)
srcType = "blank"; srcType = "blank"; //$NON-NLS-1$
else if (srcType.length() == 0) else if (srcType.length() == 0)
srcType = "null"; srcType = "null"; //$NON-NLS-1$
} }
return srcType; return srcType;
} }
@ -2912,7 +2919,7 @@ public class SystemViewRemoteFileAdapter
IRemoteFile remoteFile = (IRemoteFile) object; IRemoteFile remoteFile = (IRemoteFile) object;
if (remoteFile.isDirectory()) if (remoteFile.isDirectory())
{ {
return remoteFile.getAbsolutePath() + remoteFile.getSeparator() + "*"; return remoteFile.getAbsolutePath() + remoteFile.getSeparator() + "*"; //$NON-NLS-1$
} }
else else
{ {
@ -2965,7 +2972,7 @@ public class SystemViewRemoteFileAdapter
String inName = name.toLowerCase(); String inName = name.toLowerCase();
if (inName.equals("classification")) if (inName.equals("classification")) //$NON-NLS-1$
{ {
String classification = tgt.getClassification(); String classification = tgt.getClassification();
@ -2974,7 +2981,7 @@ public class SystemViewRemoteFileAdapter
return StringCompare.compare(value, classification, true); return StringCompare.compare(value, classification, true);
} }
} }
else if (inName.equals("name")) else if (inName.equals("name")) //$NON-NLS-1$
{ {
boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive(); 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 // 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)); return tgtName.startsWith(val.substring(0, val.length()-1));
} }
else { else {
return val.equals(tgtName); return val.equals(tgtName);
} }
} }
else if (inName.equals("absolutePath".toLowerCase())) { else if (inName.equals("absolutePath".toLowerCase())) { //$NON-NLS-1$
boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive(); 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 // 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)); return tgtPath.startsWith(val.substring(0, val.length()-1));
} }
else { else {
return val.equals(tgtPath); return val.equals(tgtPath);
} }
} }
else if (inName.equals("extension")) { else if (inName.equals("extension")) { //$NON-NLS-1$
boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive(); boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive();
@ -3026,7 +3033,7 @@ public class SystemViewRemoteFileAdapter
return false; 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; String val = null;
@ -3044,7 +3051,7 @@ public class SystemViewRemoteFileAdapter
// we have a wild card test, and * is the last character in // we have a wild card test, and * is the last character in
// the value // the value
if (val.endsWith("*")) { if (val.endsWith("*")) { //$NON-NLS-1$
match = tgtExtension.startsWith(val.substring(0, val.length() - 1)); match = tgtExtension.startsWith(val.substring(0, val.length() - 1));
} }
else { else {
@ -3060,64 +3067,64 @@ public class SystemViewRemoteFileAdapter
// return false if no match // return false if no match
return false; return false;
} }
else if (inName.equals("isroot")) else if (inName.equals("isroot")) //$NON-NLS-1$
{ {
return tgt.isRoot() && value.equals("true") || return tgt.isRoot() && value.equals("true") || //$NON-NLS-1$
!tgt.isRoot() && value.equals("false"); !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") || return tgt.isFile() && value.equals("true") || //$NON-NLS-1$
!tgt.isFile() && value.equals("false"); !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") || return tgt.isDirectory() && value.equals("true") || //$NON-NLS-1$
!tgt.isDirectory() && value.equals("false"); !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") || return tgt.isHidden() && value.equals("true") || //$NON-NLS-1$
!tgt.isHidden() && value.equals("false"); !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") || return tgt.canRead() && value.equals("true") || //$NON-NLS-1$
!tgt.canRead() && value.equals("false"); !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") || return tgt.canWrite() && value.equals("true") || //$NON-NLS-1$
!tgt.canWrite() && value.equals("false"); !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") || return tgt.isBinary() && value.equals("true") || //$NON-NLS-1$
!tgt.isBinary() && value.equals("false"); !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") || return tgt.isText() && value.equals("true") || //$NON-NLS-1$
!tgt.isText() && value.equals("false"); !tgt.isText() && value.equals("false"); //$NON-NLS-1$
} }
else if (inName.equals("isarchive")) { else if (inName.equals("isarchive")) { //$NON-NLS-1$
return tgt.isArchive() && value.equals("true") || return tgt.isArchive() && value.equals("true") || //$NON-NLS-1$
!tgt.isArchive() && value.equals("false"); !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") || return tgt instanceof IVirtualRemoteFile && value.equals("true") || //$NON-NLS-1$
!(tgt instanceof IVirtualRemoteFile) && value.equals("false"); !(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") || return tgt.isExecutable() && value.equals("true") || //$NON-NLS-1$
!tgt.isExecutable() && value.equals("false"); !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") || return tgt.isLink() && value.equals("true") || //$NON-NLS-1$
!tgt.isLink() && value.equals("false"); !tgt.isLink() && value.equals("false"); //$NON-NLS-1$
} }
} }