本文整理汇总了Java中org.eclipse.ui.model.WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider方法的典型用法代码示例。如果您正苦于以下问题:Java WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider方法的具体用法?Java WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider怎么用?Java WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.model.WorkbenchLabelProvider
的用法示例。
在下文中一共展示了WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ProjectListSelectionDialog
import org.eclipse.ui.model.WorkbenchLabelProvider; //导入方法依赖的package包/类
/**
* @param parent
*/
public ProjectListSelectionDialog(Shell parent) {
super(parent, WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
setTitle(Messages.ProjectSelectionDialog_Title);
setMessage(Messages.ProjectSelectionDialog_Message);
final List<Object> list = new ArrayList<Object>();
try {
ResourcesPlugin.getWorkspace().getRoot().accept(new IResourceProxyVisitor() {
public boolean visit(IResourceProxy proxy) throws CoreException {
if (proxy.getType() == IResource.ROOT) {
return true;
}
if (proxy.isAccessible()) {
list.add(proxy.requestResource());
}
return false;
}
}, 0);
} catch (CoreException e) {
IdeLog.logError(UIPlugin.getDefault(), e);
}
setElements(list.toArray());
}
示例2: createResourcesGroup
import org.eclipse.ui.model.WorkbenchLabelProvider; //导入方法依赖的package包/类
/**
* Creates the checkbox tree and list for selecting resources.
* @param parent
* the parent control
*/
protected final void createResourcesGroup(Composite parent) {
// create the input element, which has the root resource
// as its only child
List input = new ArrayList();
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < projects.length; i++) {
if (projects[i].isOpen()) {
input.add(projects[i]);
}
}
this.resourceGroup = new ResourceTreeAndListGroup(parent, input, getResourceProvider(IResource.FOLDER
| IResource.PROJECT), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
getResourceProvider(IResource.FILE), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
SWT.NONE, DialogUtil.inRegularFontMode(parent));
ICheckStateListener listener = new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
updateWidgetEnablements();
}
};
this.resourceGroup.addCheckStateListener(listener);
}
示例3: ResourceFileSelectionDialog
import org.eclipse.ui.model.WorkbenchLabelProvider; //导入方法依赖的package包/类
/**
* Instantiates a new resource file selection dialog.
*
* @param title
* the title
* @param message
* the message
* @param type
* the type
*/
public ResourceFileSelectionDialog(String title, String message, String[] type) {
this(Display.getDefault().getActiveShell(), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
contentProvider);
this.extensions = type;
setTitle(title);
setMessage(message);
setInput(computeInput());
setValidator(validator);
}
示例4: ExternalSchemaFileSelectionDialog
import org.eclipse.ui.model.WorkbenchLabelProvider; //导入方法依赖的package包/类
/**
* Instantiates a new external schema selection dialog including validator for schema extension
*
* @param title the title
* @param message the message
* @param type the type
* @param filterOperationClassUtility the filter operation class utility
*/
public ExternalSchemaFileSelectionDialog(String title, String message, String[] type,FilterOperationClassUtility filterOperationClassUtility) {
this(Display.getDefault().getActiveShell(), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
contentProvider);
this.extensions = type;
setTitle(title);
setMessage(message);
setInput(computeInput());
setValidator(validator);
this.filterOperationClassUtility=filterOperationClassUtility;
}
示例5: CustomResourceSelectionDialog
import org.eclipse.ui.model.WorkbenchLabelProvider; //导入方法依赖的package包/类
public CustomResourceSelectionDialog(String title, String message, Class<?> resourceClass, String[] extensions, IContainer root) {
this(Display.getDefault().getActiveShell(), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
contentProvider);
this.extensions = extensions;
this.resourceClass = resourceClass == null ? IFile.class : resourceClass;
this.container = root == null ? ResourcesPlugin.getWorkspace().getRoot() : root;
setTitle(title);
setMessage(message);
setInput(computeInput(this.container));
setValidator(validator);
}
示例6: createProjectSelectionDialog
import org.eclipse.ui.model.WorkbenchLabelProvider; //导入方法依赖的package包/类
private static ElementListSelectionDialog createProjectSelectionDialog(IProject[] projects) {
ElementListSelectionDialog dialog = new ElementListSelectionDialog(
VerilogPlugin.getActiveWorkbenchShell()
, WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider()
);
dialog.setTitle(Txt.s("Dialog.ProjectSelection.Caption"));
dialog.setMessage(Txt.s("Dialog.ProjectSelection.Message"));
dialog.setMultipleSelection(false);
dialog.setIgnoreCase(true);
dialog.setElements(projects);
return dialog;
}