示例#1
0
 public Image forField(
     JvmVisibility visibility, boolean isStatic, boolean isFinal, boolean isExtension) {
   ImageDescriptor descriptor =
       JavaElementImageProvider.getFieldImageDescriptor(
           false, toFlags(visibility, false, isStatic, isFinal));
   int adornment = 0;
   if (isStatic) adornment |= JavaElementImageDescriptor.STATIC;
   if (isFinal) adornment |= JavaElementImageDescriptor.FINAL;
   if (adornment != 0) return getDecoratedJdtImage(descriptor, adornment);
   else return getJdtImage(descriptor);
 }
示例#2
0
 public Image forOperation(
     JvmVisibility visibility, boolean isAbstract, boolean isStatic, boolean isFinal) {
   ImageDescriptor descriptor =
       JavaElementImageProvider.getMethodImageDescriptor(
           false, toFlags(visibility, isAbstract, isStatic, isFinal));
   int adornment = 0;
   if (isStatic) adornment |= JavaElementImageDescriptor.STATIC;
   if (isFinal) adornment |= JavaElementImageDescriptor.FINAL;
   if (isAbstract) adornment |= JavaElementImageDescriptor.ABSTRACT;
   if (adornment != 0) return getDecoratedJdtImage(descriptor, adornment);
   else return getJdtImage(descriptor);
 }
 public static Image getImage(IJavaElement element) {
   return imageProvider.getImageLabel(element, JavaElementImageProvider.OVERLAY_ICONS);
 }
示例#4
0
 public Image forConstructor(JvmVisibility visibility) {
   return getDecoratedJdtImage(
       JavaElementImageProvider.getMethodImageDescriptor(false, toFlags(visibility)),
       JavaElementImageDescriptor.CONSTRUCTOR);
 }
示例#5
0
 public Image forAnnotation(JvmVisibility visibility) {
   return getJdtImage(
       JavaElementImageProvider.getTypeImageDescriptor(
           false, true, toFlags(visibility) | Flags.AccAnnotation, false));
 }
示例#6
0
 public Image forEnum(JvmVisibility visibility) {
   return getJdtImage(
       JavaElementImageProvider.getTypeImageDescriptor(
           false, false, toFlags(visibility) | Flags.AccEnum, false));
 }
示例#7
0
 protected Image getDecoratedJdtImage(ImageDescriptor descriptor, int adornment) {
   return JavaElementImageProvider.getDecoratedImage(
       descriptor, adornment, JavaElementImageProvider.SMALL_SIZE);
 }