if (element != null) {
accessorFlags_JDT = adornWithMethodClassDetails(element, accessorFlags_JDT);
}
ApexElementImageDescriptor decoratedDesc =
new ApexElementImageDescriptor(desc, accessorFlags_JDT, APEX_ICON_SIZE);
return ForceImages.get(ForceImages.APEX_GLOBAL_METHOD, accessorFlags_JVM, decoratedDesc);
} else if ((accessorFlags_JVM & ApexElementImageDescriptor.GLOBAL) != 0) {
ImageDescriptor desc = ForceImages.getDesc(ForceImages.APEX_GLOBAL_METHOD);
int decorationFlags = 0; // no further decoration needed.
ApexElementImageDescriptor decoratedDesc =
new ApexElementImageDescriptor(desc, decorationFlags, APEX_ICON_SIZE);
return ForceImages.get(ForceImages.APEX_GLOBAL_METHOD, accessorFlags_JVM, decoratedDesc);
} else if ((accessorFlags_JVM & ApexElementImageDescriptor.TESTMETHOD) != 0) {
ImageDescriptor desc = ForceImages.getDesc(ForceImages.APEX_TEST_METHOD);
int decorationFlags = 0; // no further decoration needed.
ApexElementImageDescriptor decoratedDesc =
new ApexElementImageDescriptor(desc, decorationFlags, APEX_ICON_SIZE);
return ForceImages.get(ForceImages.APEX_TEST_METHOD, accessorFlags_JVM, decoratedDesc);
} else {
// TODO: The first parameter determines if we are in an interface for annotation, where all methods are public.
// There is no way to determine this easily using JADT (cannot check parent) unless we store some environment variables.
// Worse, interfaces in Apex cannot annotate their methods as public so we have no way to use local information to check for "publicness".
ImageDescriptor desc = JavaElementImageProvider.getMethodImageDescriptor(false, accessorFlags_JVM);
if (element != null) {
accessorFlags_JDT = adornWithMethodClassDetails(element, accessorFlags_JDT);
}
ApexElementImageDescriptor decoratedDesc =
new ApexElementImageDescriptor(desc, accessorFlags_JDT, APEX_ICON_SIZE);
return ForceImages.get(ForceImages.JDT_METHOD, accessorFlags_JVM, decoratedDesc);
}
}