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