本文整理匯總了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;
}