本文整理汇总了Java中org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.BIG_SIZE属性的典型用法代码示例。如果您正苦于以下问题:Java JavaElementImageProvider.BIG_SIZE属性的具体用法?Java JavaElementImageProvider.BIG_SIZE怎么用?Java JavaElementImageProvider.BIG_SIZE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider
的用法示例。
在下文中一共展示了JavaElementImageProvider.BIG_SIZE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImageDescriptor
public static ImageDescriptor getImageDescriptor(TypeNameMatch typeRef, int flags) {
if (isSet(SHOW_TYPE_CONTAINER_ONLY, flags)) {
if (typeRef.getPackageName().equals(typeRef.getTypeContainerName()))
return JavaPluginImages.DESC_OBJS_PACKAGE;
// XXX cannot check outer type for interface efficiently (5887)
return JavaPluginImages.DESC_OBJS_CLASS;
} else if (isSet(SHOW_PACKAGE_ONLY, flags)) {
return JavaPluginImages.DESC_OBJS_PACKAGE;
} else {
boolean isInner= typeRef.getTypeContainerName().indexOf('.') != -1;
int modifiers= typeRef.getModifiers();
ImageDescriptor desc= JavaElementImageProvider.getTypeImageDescriptor(isInner, false, modifiers, false);
int adornmentFlags= 0;
if (Flags.isFinal(modifiers)) {
adornmentFlags |= JavaElementImageDescriptor.FINAL;
}
if (Flags.isAbstract(modifiers) && !Flags.isInterface(modifiers)) {
adornmentFlags |= JavaElementImageDescriptor.ABSTRACT;
}
if (Flags.isStatic(modifiers)) {
adornmentFlags |= JavaElementImageDescriptor.STATIC;
}
if (Flags.isDeprecated(modifiers)) {
adornmentFlags |= JavaElementImageDescriptor.DEPRECATED;
}
return new JavaElementImageDescriptor(desc, adornmentFlags, JavaElementImageProvider.BIG_SIZE);
}
}
示例2: getTypeImageDescriptor
private ImageDescriptor getTypeImageDescriptor(IType type) {
ITypeHierarchy hierarchy= fHierarchy.getHierarchy();
if (hierarchy == null) {
return new JavaElementImageDescriptor(JavaPluginImages.DESC_OBJS_CLASS, 0, JavaElementImageProvider.BIG_SIZE);
}
int flags= hierarchy.getCachedFlags(type);
if (flags == -1) {
return new JavaElementImageDescriptor(JavaPluginImages.DESC_OBJS_CLASS, 0, JavaElementImageProvider.BIG_SIZE);
}
boolean isInterface= Flags.isInterface(flags);
IType declaringType= type.getDeclaringType();
boolean isInner= declaringType != null;
boolean isInInterfaceOrAnnotation= false;
if (isInner) {
int declaringTypeFlags= hierarchy.getCachedFlags(declaringType);
if (declaringTypeFlags != -1) {
isInInterfaceOrAnnotation= Flags.isInterface(declaringTypeFlags);
} else {
// declaring type is not in hierarchy, so we have to pay the price for resolving here
try {
isInInterfaceOrAnnotation= declaringType.isInterface();
} catch (JavaModelException e) {
}
}
}
ImageDescriptor desc= JavaElementImageProvider.getTypeImageDescriptor(isInner, isInInterfaceOrAnnotation, flags, isInDifferentHierarchyScope(type));
int adornmentFlags= 0;
if (Flags.isFinal(flags)) {
adornmentFlags |= JavaElementImageDescriptor.FINAL;
}
if (Flags.isAbstract(flags) && !isInterface) {
adornmentFlags |= JavaElementImageDescriptor.ABSTRACT;
}
if (Flags.isStatic(flags)) {
adornmentFlags |= JavaElementImageDescriptor.STATIC;
}
if (Flags.isDeprecated(flags)) {
adornmentFlags |= JavaElementImageDescriptor.DEPRECATED;
}
return new JavaElementImageDescriptor(desc, adornmentFlags, JavaElementImageProvider.BIG_SIZE);
}