本文整理汇总了Java中org.eclipse.ui.ide.IDE.SharedImages类的典型用法代码示例。如果您正苦于以下问题:Java SharedImages类的具体用法?Java SharedImages怎么用?Java SharedImages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SharedImages类属于org.eclipse.ui.ide.IDE包,在下文中一共展示了SharedImages类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getImage
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
@Override
public Image getImage(Object element) {
if (element instanceof IProject) {
if (((IProject) element).isOpen()) {
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
} else {
return PlatformUI.getWorkbench().getSharedImages()
.getImage(SharedImages.IMG_OBJ_PROJECT_CLOSED);
}
} else if (element instanceof IFolder) {
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
} else if (element instanceof IFile) {
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
} else if (element instanceof IMarker) {
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OPEN_MARKER);
}
return null;
}
开发者ID:ModelWriter,项目名称:Tarski,代码行数:20,代码来源:SigTypeLabelProvider.java
示例2: getImage
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
@Override
public Image getImage(final Object element) {
if (element instanceof IProject) {
if (((IProject) element).isOpen()) {
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
} else {
return PlatformUI.getWorkbench().getSharedImages()
.getImage(SharedImages.IMG_OBJ_PROJECT_CLOSED);
}
} else if (element instanceof IFolder) {
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
} else if (element instanceof IFile) {
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
} else if (element instanceof IMarker) {
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OPEN_MARKER);
}
return null;
}
开发者ID:ModelWriter,项目名称:Tarski,代码行数:20,代码来源:WizardTreeViewLabelProvider.java
示例3: getImage
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
public Image getImage(Object element) {
final String s;
switch (((PreviewFile)element).type) {
case IResource.PROJECT:
s= SharedImages.IMG_OBJ_PROJECT; break;
case IResource.FOLDER:
s= ISharedImages.IMG_OBJ_FOLDER; break;
default:
s= ISharedImages.IMG_OBJ_FILE; break;
}
final Image baseImage= PlatformUI.getWorkbench().getSharedImages().getImage(s);
final ImageDescriptor overlay = getOverlay(element);
if (overlay == null)
return baseImage;
try {
return fImageCache.createImage(new OverlayIcon(baseImage, new ImageDescriptor[] {overlay}, new int[] {OverlayIcon.BOTTOM_RIGHT}, new Point(baseImage.getBounds().width, baseImage.getBounds().height)));
} catch (Exception e) {
SVNUIPlugin.log(e.getMessage());
}
return null;
}
开发者ID:subclipse,项目名称:subclipse,代码行数:22,代码来源:SVNDecoratorPreferencesPage.java
示例4: createToolbar
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
private void createToolbar(Composite panel) {
ToolBar toolbar = new ToolBar(panel, SWT.HORIZONTAL | SWT.RIGHT);
ToolItem addModuleItem = new ToolItem(toolbar, SWT.PUSH);
addModuleItem.setImage(PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_OBJ_ADD));
addModuleItem.setText("Add Module");
addModuleItem.setToolTipText("Add new module to this Domain");
addModuleItem.addSelectionListener(new CreateModuleListener());
ToolItem createStructureItem = new ToolItem(toolbar, SWT.PUSH);
createStructureItem.setImage(PlatformUI.getWorkbench().getSharedImages()
.getImage(SharedImages.IMG_OBJ_PROJECT));
createStructureItem.setText("Create Structure");
createStructureItem.setToolTipText("Create the initial structure of this project");
createStructureItem.addSelectionListener(new CreateStructureListener());
ToolItem updateModuleItem = new ToolItem(toolbar, SWT.PUSH);
updateModuleItem.setImage(PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_ELCL_SYNCED));
updateModuleItem.setText("Refresh");
updateModuleItem.setToolTipText("Rebuilds the Project's metadata for Studio");
updateModuleItem.addSelectionListener(new RefreshModuleListener());
}
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:27,代码来源:DomainProjectsSectionPart.java
示例5: getImage
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
@Override
public Image getImage(Object element) {
if (element instanceof IProject)
if (((IProject) element).isOpen())
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
else
return PlatformUI.getWorkbench().getSharedImages()
.getImage(SharedImages.IMG_OBJ_PROJECT_CLOSED);
else if (element instanceof IFolder)
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
else if (element instanceof IFile)
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
return null;
}
开发者ID:ModelWriter,项目名称:Tarski,代码行数:15,代码来源:MarkAllInWsLabelProvider.java
示例6: initializeImages
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
private void initializeImages()
{
if (fgImagesInitialized)
{
return;
}
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
fgTaskImage = sharedImages.getImage(SharedImages.IMG_OBJS_TASK_TSK);
fgInfoImage = sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK);
fgWarningImage = sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK);
fgErrorImage = sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
fgImagesInitialized = true;
}
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:16,代码来源:ProblemAnnotation.java
示例7: initializeImages
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
private void initializeImages() {
if (fgImagesInitialized)
return;
fgQuickFixImage= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_FIXABLE_PROBLEM);
fgQuickFixErrorImage= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_FIXABLE_ERROR);
ISharedImages sharedImages= PlatformUI.getWorkbench().getSharedImages();
fgTaskImage= sharedImages.getImage(SharedImages.IMG_OBJS_TASK_TSK);
fgInfoImage= sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK);
fgWarningImage= sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK);
fgErrorImage= sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
fgImagesInitialized= true;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:16,代码来源:CompilationUnitDocumentProvider.java
示例8: getImage
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
@Override
public Image getImage(Object element) {
ProjectEntry entry = (ProjectEntry) element;
if (entry.isSupported()) {
if (entry.isImported()) {
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
} else {
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT_CLOSED);
}
}
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
}
开发者ID:asakusafw,项目名称:asakusafw-shafu,代码行数:13,代码来源:SelectGradleProjectsPage.java
示例9: contributeToolbar
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
private void contributeToolbar() {
IActionBars bars = getViewSite().getActionBars();
IToolBarManager tbm = bars.getToolBarManager();
rerunAction = new Action("Run or Re-Run unit tests...") {
@Override
public void run() {
runTestsMaybe();
}
};
rerunAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(SharedImages.IMG_OBJS_TASK_TSK));
tbm.add(rerunAction);
}
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:15,代码来源:TestsReportView.java
示例10: getImage
import org.eclipse.ui.ide.IDE.SharedImages; //导入依赖的package包/类
@Override
public Image getImage() {
return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OPEN_MARKER);
}
开发者ID:kopl,项目名称:SPLevo,代码行数:5,代码来源:VartiantLinkQuickFix.java
注:本文中的org.eclipse.ui.ide.IDE.SharedImages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论