本文整理汇总了Java中org.eclipse.jdt.ui.ISharedImages类的典型用法代码示例。如果您正苦于以下问题:Java ISharedImages类的具体用法?Java ISharedImages怎么用?Java ISharedImages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISharedImages类属于org.eclipse.jdt.ui包,在下文中一共展示了ISharedImages类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getImage(Object element) {
if (element instanceof JavadocLinkRef) {
JavadocLinkRef ref= (JavadocLinkRef) element;
ImageDescriptor desc;
if (ref.isProjectRef()) {
desc= PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
} else {
desc= JavaUI.getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_JAR);
}
if (ref.getURL() == null) {
return JavaPlugin.getImageDescriptorRegistry().get(new JavaElementImageDescriptor(desc, JavaElementImageDescriptor.WARNING, JavaElementImageProvider.SMALL_SIZE));
}
return JavaPlugin.getImageDescriptorRegistry().get(desc);
}
return null;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:JavadocLinkDialogLabelProvider.java
示例2: getColumnImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getColumnImage(Object element, int columnIndex) {
switch (columnIndex) {
case 0:
IStatus validationStatus = ((Sdk) element).validate();
if (!validationStatus.isOK()) {
ImageRegistry imageRegistry = CorePlugin.getDefault().getImageRegistry();
return imageRegistry.get(CoreImages.INVALID_SDK_ICON);
}
return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_LIBRARY);
default:
return null;
}
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:16,代码来源:SdkTable.java
示例3: getColumnImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
public Image getColumnImage(Object element, int columnIndex) {
ClientBundleResource resource = (ClientBundleResource) element;
switch (columnIndex) {
case COL_FILE:
IStatus resourceStatus = validateResource(resource);
return workbenchLabelProvider.getImage(resource, resourceStatus);
case COL_METHOD:
return JavaUI.getSharedImages().getImage(
ISharedImages.IMG_OBJS_PUBLIC);
default:
return null;
}
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:14,代码来源:BundledResourcesSelectionBlock.java
示例4: getColumnImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getColumnImage(Object obj, int index) {
if(obj instanceof String[]){
String [] arr = (String[]) obj;
if(index < arr.length ){
if( "true".equalsIgnoreCase(arr[index])){
return //JavaUI.getSharedImages().getImage( ISharedImages.
PlatformUI.getWorkbench().getSharedImages().getImage(
org.eclipse.ui.ISharedImages.IMG_OBJS_WARN_TSK);
}
}
}
return index == 0? getImage(obj) : null;
}
开发者ID:iloveeclipse,项目名称:jdepend4eclipse,代码行数:15,代码来源:DependencyView.java
示例5: getImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getImage() {
final ISharedImages images = JavaUI.getSharedImages();
final Image image = images.getImage(ISharedImages.IMG_OBJS_LIBRARY);
return image;
}
开发者ID:x10-lang,项目名称:apgas,代码行数:7,代码来源:APGASClasspathFixProposal.java
示例6: getImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getImage() {
final ISharedImages images = JavaUI.getSharedImages();
final Image image = images.getImage(ISharedImages.IMG_OBJS_IMPDECL);
return image;
}
开发者ID:x10-lang,项目名称:apgas,代码行数:7,代码来源:ConstructsImportProposal.java
示例7: getInfoIcon
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
public static Image getInfoIcon(Object element) {
if(element instanceof Info<?>){
switch(((Info) element).getType()){
case CLASS:
ITypeBinding typeBinding = Crystal.getInstance().getTypeBindingFromName((((Info) element).getKey()));
if(typeBinding!=null){
List<ImageDescriptor> overlayIcons = new ArrayList<ImageDescriptor>();
int typeModifiers = typeBinding.getModifiers();
if(Modifier.isAbstract(typeModifiers)){
overlayIcons.add(getImageDescriptor(IMG_ABSTRACT_CO));
}else if(Modifier.isStatic(typeModifiers)){
overlayIcons.add(getImageDescriptor(IMG_STATIC_CO));
}else if(Modifier.isPrivate(typeModifiers)){
overlayIcons.add(getImageDescriptor(IMG_PRIVATE_CO));
}
Image baseImage = JavaPluginImages.get(ISharedImages.IMG_OBJS_CLASS);
DecorationOverlayIcon image = new DecorationOverlayIcon(baseImage, overlayIcons.toArray(new ImageDescriptor[0]));
return image.createImage();
}
break;
case METHOD:
MethodDeclaration methodDeclaration = ASTUtils.getMethodDeclaration(((Info) element).getKey());
if(methodDeclaration!=null){
String icon= IMG_PUBLIC_CO;
if(methodDeclaration!=null){
int modifiers = methodDeclaration.getModifiers();
if(Modifier.isPrivate(modifiers)){
icon = IMG_PRIVATE_CO;
}else if(Modifier.isProtected(modifiers)){
icon = IMG_PROTECTED_CO;
}else{
}
}
ImageDescriptor imageDescriptor = getImageDescriptor(icon);
return imageDescriptor.createImage();
}
break;
}
}
return null;
}
开发者ID:aroog,项目名称:code,代码行数:51,代码来源:IconUtils.java
示例8: getImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getImage() {
return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_CLASS);
}
开发者ID:thahn0720,项目名称:agui_eclipse_plugin,代码行数:5,代码来源:AguiMainTab.java
示例9: getImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getImage(Object obj) {
return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_PACKAGE);
}
开发者ID:iloveeclipse,项目名称:jdepend4eclipse,代码行数:5,代码来源:DependencyView.java
示例10: getCPListElementBaseImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
private ImageDescriptor getCPListElementBaseImage(CPListElement cpentry) {
switch (cpentry.getEntryKind()) {
case IClasspathEntry.CPE_SOURCE:
if (cpentry.getPath().segmentCount() == 1) {
return fProjectImage;
} else {
return fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_PACKFRAG_ROOT);
}
case IClasspathEntry.CPE_LIBRARY:
IResource res= cpentry.getResource();
IPath path= (IPath) cpentry.getAttribute(CPListElement.SOURCEATTACHMENT);
if (res == null) {
if (ArchiveFileFilter.isArchivePath(cpentry.getPath(), true)) {
if (path == null || path.isEmpty()) {
return fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_EXTERNAL_ARCHIVE);
} else {
return fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_EXTERNAL_ARCHIVE_WITH_SOURCE);
}
} else {
if (path == null || path.isEmpty()) {
return JavaPluginImages.DESC_OBJS_CLASSFOLDER;
} else {
return JavaPluginImages.DESC_OBJS_CLASSFOLDER_WSRC;
}
}
} else if (res instanceof IFile) {
if (path == null || path.isEmpty()) {
return fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_JAR);
} else {
return fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_JAR_WITH_SOURCE);
}
} else {
return fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_PACKFRAG_ROOT);
}
case IClasspathEntry.CPE_PROJECT:
return fProjectImage;
case IClasspathEntry.CPE_VARIABLE:
ImageDescriptor variableImage= fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_CLASSPATH_VAR_ENTRY);
if (cpentry.isDeprecated()) {
return new JavaElementImageDescriptor(variableImage, JavaElementImageDescriptor.DEPRECATED, JavaElementImageProvider.SMALL_SIZE);
}
return variableImage;
case IClasspathEntry.CPE_CONTAINER:
return fSharedImages.getImageDescriptor(ISharedImages.IMG_OBJS_LIBRARY);
default:
return null;
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:49,代码来源:CPListLabelProvider.java
示例11: getImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getImage(Object element) {
return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_PACKAGE);
}
开发者ID:kopl,项目名称:SPLevo,代码行数:5,代码来源:PackageLabelProvider.java
示例12: getImage
import org.eclipse.jdt.ui.ISharedImages; //导入依赖的package包/类
@Override
public Image getImage()
{
return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_CLASS);
}
开发者ID:JanKoehnlein,项目名称:XRobot,代码行数:6,代码来源:LaunchEV3MainTab.java
注:本文中的org.eclipse.jdt.ui.ISharedImages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论