Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 3
0
 public static Image getImage(IJavaElement element) {
   return imageProvider.getImageLabel(element, JavaElementImageProvider.OVERLAY_ICONS);
 }
Esempio n. 4
0
 public Image forConstructor(JvmVisibility visibility) {
   return getDecoratedJdtImage(
       JavaElementImageProvider.getMethodImageDescriptor(false, toFlags(visibility)),
       JavaElementImageDescriptor.CONSTRUCTOR);
 }
Esempio n. 5
0
 public Image forAnnotation(JvmVisibility visibility) {
   return getJdtImage(
       JavaElementImageProvider.getTypeImageDescriptor(
           false, true, toFlags(visibility) | Flags.AccAnnotation, false));
 }
Esempio n. 6
0
 public Image forEnum(JvmVisibility visibility) {
   return getJdtImage(
       JavaElementImageProvider.getTypeImageDescriptor(
           false, false, toFlags(visibility) | Flags.AccEnum, false));
 }
Esempio n. 7
0
 protected Image getDecoratedJdtImage(ImageDescriptor descriptor, int adornment) {
   return JavaElementImageProvider.getDecoratedImage(
       descriptor, adornment, JavaElementImageProvider.SMALL_SIZE);
 }