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

[208572] merge of file extension property descriptor to open rse

This commit is contained in:
David McKnight 2007-11-02 15:10:27 +00:00
parent d1e082c015
commit 133313358b
4 changed files with 28 additions and 3 deletions

View file

@ -857,7 +857,7 @@ public class SystemViewRemoteFileAdapter
int nbrOfArchiveProperties = 2;
int nbrOfVirtualProperties = 4;
int nbrOfProperties = 4;
int nbrOfProperties = 5;
if (isVirtual) nbrOfProperties += nbrOfVirtualProperties;
else if (isArchive) nbrOfProperties += nbrOfArchiveProperties;
@ -891,6 +891,11 @@ public class SystemViewRemoteFileAdapter
else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
// file extension
if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
if (isVirtual)
{
@ -955,7 +960,7 @@ public class SystemViewRemoteFileAdapter
{
int nbrOfArchiveProperties = 2;
int nbrOfVirtualProperties = 4;
int nbrOfProperties = 8;
int nbrOfProperties = 9;
int nbrOfBriefProperties = 2;
if (debug)
nbrOfProperties += 7;
@ -1013,6 +1018,12 @@ public class SystemViewRemoteFileAdapter
else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_HIDDEN, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_HIDDEN, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
// file extension
if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
if (debug)
{
propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$
@ -1223,6 +1234,15 @@ public class SystemViewRemoteFileAdapter
{
return file.getCanonicalPath();
}
else if (name.equals(ISystemPropertyConstants.P_FILE_EXTENSION))
{
if(!file.isDirectory()) {
String ext = file.getExtension();
return ext == null?"":ext;
}
else
return "";
}
else if (name.equals(ISystemPropertyConstants.P_FILE_CLASSIFICATION))
{
return file.getClassification();

View file

@ -168,6 +168,9 @@ public class SystemViewResources extends NLS {
public static String RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL;
public static String RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP;
public static String RESID_PROPERTY_FILE_EXTENSION_LABEL;
public static String RESID_PROPERTY_FILE_EXTENSION_TOOLTIP;
public static String RESID_PROPERTY_FILE_CLASSIFICATION_LABEL;
public static String RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP;

View file

@ -134,7 +134,8 @@ RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL=Canonical Path
RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP=Canonical path of this file or folder
RESID_PROPERTY_FILE_CLASSIFICATION_LABEL=Classification
RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP=Classification path of this file
RESID_PROPERTY_FILE_EXTENSION_LABEL=Extension
RESID_PROPERTY_FILE_EXTENSION_TOOLTIP=Extension of this file
#SEARCH RESULT PROPERTIES

View file

@ -55,6 +55,7 @@ public interface ISystemPropertyConstants extends IBasicPropertyConstants
public static final String P_FILE_PATH = P_PREFIX+"file.path"; //$NON-NLS-1$
public static final String P_FILE_CANONICAL_PATH = P_PREFIX+"file.canonicalpath"; //$NON-NLS-1$
public static final String P_FILE_CLASSIFICATION= P_PREFIX+"file.classification"; //$NON-NLS-1$
public static final String P_FILE_EXTENSION = P_PREFIX+"file.extension";
public static final String P_FILE_READONLY = P_PREFIX+"file.readonly"; //$NON-NLS-1$
public static final String P_FILE_READABLE = P_PREFIX+"file.readable"; //$NON-NLS-1$
public static final String P_FILE_WRITABLE = P_PREFIX+"file.writable"; //$NON-NLS-1$