本文整理汇总了Java中org.eclipse.jdt.ui.JavaUI.getSharedImages方法的典型用法代码示例。如果您正苦于以下问题:Java JavaUI.getSharedImages方法的具体用法?Java JavaUI.getSharedImages怎么用?Java JavaUI.getSharedImages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.ui.JavaUI
的用法示例。
在下文中一共展示了JavaUI.getSharedImages方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDeclarationImage
import org.eclipse.jdt.ui.JavaUI; //导入方法依赖的package包/类
/**
* Obtient une image pour une déclaration KSP.
*
* @param kspDeclaration Déclaration KSP.
* @return Image.
*/
public static Image getDeclarationImage(KspDeclaration kspDeclaration) { // NOSONAR
org.eclipse.ui.ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
org.eclipse.jdt.ui.ISharedImages sharedImagesJdt = JavaUI.getSharedImages();
switch (kspDeclaration.getNature()) {
case "DtDefinition": // Kasper >= 4
case "DT": // Kasper <= 3
return sharedImagesJdt.getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_CLASS);
case "Task": // Kasper >= 5
case "Service": // Kasper <= 4
return sharedImagesJdt.getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PUBLIC);
case "Domain":
return sharedImagesJdt.getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_ANNOTATION);
case "FileInfo":
return sharedImages.getImage(org.eclipse.ui.ISharedImages.IMG_OBJ_FILE);
default:
/*
* Pas d'images spécifiques pour : Constraint, Formatter, Association, PublisherNode, Controller...
*/
return sharedImages.getImage(org.eclipse.ui.ISharedImages.IMG_OBJ_ELEMENT);
}
}
示例2: CPListLabelProvider
import org.eclipse.jdt.ui.JavaUI; //导入方法依赖的package包/类
public CPListLabelProvider() {
fNewLabel= NewWizardMessages.CPListLabelProvider_new;
fClassLabel= NewWizardMessages.CPListLabelProvider_classcontainer;
fMissing= NewWizardMessages.CPListLabelProvider_missing;
fRegistry= JavaPlugin.getImageDescriptorRegistry();
fSharedImages= JavaUI.getSharedImages();
IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();
fProjectImage= workbench.getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
fAttributeDescriptors= JavaPlugin.getDefault().getClasspathAttributeConfigurationDescriptors();
}
示例3: getImage
import org.eclipse.jdt.ui.JavaUI; //导入方法依赖的package包/类
@Override
public Image getImage() {
final ISharedImages images = JavaUI.getSharedImages();
final Image image = images.getImage(ISharedImages.IMG_OBJS_LIBRARY);
return image;
}
示例4: getImage
import org.eclipse.jdt.ui.JavaUI; //导入方法依赖的package包/类
@Override
public Image getImage() {
final ISharedImages images = JavaUI.getSharedImages();
final Image image = images.getImage(ISharedImages.IMG_OBJS_IMPDECL);
return image;
}