mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
Bug #181022 : separate markers for excluded source & header files
This commit is contained in:
parent
dae80ef2cd
commit
457924ff1c
4 changed files with 15 additions and 3 deletions
BIN
core/org.eclipse.cdt.ui/icons/obj16/asm_resource_obj.gif
Normal file
BIN
core/org.eclipse.cdt.ui/icons/obj16/asm_resource_obj.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 344 B |
BIN
core/org.eclipse.cdt.ui/icons/obj16/ch_resource_obj.gif
Normal file
BIN
core/org.eclipse.cdt.ui/icons/obj16/ch_resource_obj.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 956 B |
|
@ -85,6 +85,8 @@ public class CPluginImages {
|
|||
public static final String IMG_OBJS_TUNIT_HEADER= NAME_PREFIX + "h_file_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_TUNIT_ASM= NAME_PREFIX + "s_file_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_TUNIT_RESOURCE= NAME_PREFIX + "c_resource_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_TUNIT_RESOURCE_H= NAME_PREFIX + "ch_resource_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_TUNIT_RESOURCE_A= NAME_PREFIX + "asm_resource_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_SOURCE_ROOT= NAME_PREFIX + "sroot_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_CFOLDER= NAME_PREFIX + "cfolder_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_ARCHIVE= NAME_PREFIX + "ar_obj.gif"; //$NON-NLS-1$
|
||||
|
@ -160,6 +162,8 @@ public class CPluginImages {
|
|||
public static final ImageDescriptor DESC_OBJS_TUNIT_HEADER= createManaged(T_OBJ, IMG_OBJS_TUNIT_HEADER);
|
||||
public static final ImageDescriptor DESC_OBJS_TUNIT_ASM= createManaged(T_OBJ, IMG_OBJS_TUNIT_ASM);
|
||||
public static final ImageDescriptor DESC_OBJS_TUNIT_RESOURCE= createManaged(T_OBJ, IMG_OBJS_TUNIT_RESOURCE);
|
||||
public static final ImageDescriptor DESC_OBJS_TUNIT_RESOURCE_H= createManaged(T_OBJ, IMG_OBJS_TUNIT_RESOURCE_H);
|
||||
public static final ImageDescriptor DESC_OBJS_TUNIT_RESOURCE_A= createManaged(T_OBJ, IMG_OBJS_TUNIT_RESOURCE_A);
|
||||
public static final ImageDescriptor DESC_OBJS_SOURCE_ROOT= createManaged(T_OBJ, IMG_OBJS_SOURCE_ROOT);
|
||||
public static final ImageDescriptor DESC_OBJS_CFOLDER= createManaged(T_OBJ, IMG_OBJS_CFOLDER);
|
||||
public static final ImageDescriptor DESC_OBJS_ARCHIVE= createManaged(T_OBJ, IMG_OBJS_ARCHIVE);
|
||||
|
|
|
@ -115,9 +115,17 @@ public class CElementImageProvider {
|
|||
} else if (element instanceof IFile) {
|
||||
// Check for Non Translation Unit.
|
||||
IFile file = (IFile)element;
|
||||
if (CoreModel.isValidTranslationUnitName(file.getProject(), file.getName()) ||
|
||||
CoreModel.isValidTranslationUnitName(null, file.getName())) {
|
||||
descriptor = CPluginImages.DESC_OBJS_TUNIT_RESOURCE;
|
||||
String name = file.getName();
|
||||
if (CoreModel.isValidTranslationUnitName(file.getProject(), name) ||
|
||||
CoreModel.isValidTranslationUnitName(null, name)) {
|
||||
if (CoreModel.isValidCHeaderUnitName(null, name) ||
|
||||
CoreModel.isValidCXXHeaderUnitName(null, name))
|
||||
descriptor = CPluginImages.DESC_OBJS_TUNIT_RESOURCE_H;
|
||||
else if (CoreModel.isValidASMSourceUnitName(null, name))
|
||||
descriptor = CPluginImages.DESC_OBJS_TUNIT_RESOURCE_A;
|
||||
else
|
||||
descriptor = CPluginImages.DESC_OBJS_TUNIT_RESOURCE;
|
||||
|
||||
Point size= useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE;
|
||||
descriptor = new CElementImageDescriptor(descriptor, 0, size);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue