本文整理汇总了Java中org.eclipse.jdt.ui.JavaElementLabelProvider.SHOW_POST_QUALIFIED属性的典型用法代码示例。如果您正苦于以下问题:Java JavaElementLabelProvider.SHOW_POST_QUALIFIED属性的具体用法?Java JavaElementLabelProvider.SHOW_POST_QUALIFIED怎么用?Java JavaElementLabelProvider.SHOW_POST_QUALIFIED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.ui.JavaElementLabelProvider
的用法示例。
在下文中一共展示了JavaElementLabelProvider.SHOW_POST_QUALIFIED属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPostQualifiedLabelProvider
public static IBaseLabelProvider getPostQualifiedLabelProvider() {
return new DelegatingStyledCellLabelProvider(new JavaElementLabelProvider(
JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_SMALL_ICONS)) {
@Override
protected StyledString getStyledText(Object element) {
String nameWithQualifier = getStyledStringProvider().getStyledText(element).getString() + " ";
int separatorIndex = nameWithQualifier.indexOf('-');
if (separatorIndex == -1)
return new StyledString(nameWithQualifier);
StyledString name = new StyledString(nameWithQualifier.substring(0, separatorIndex));
String qualifier = nameWithQualifier.substring(separatorIndex);
return name.append(new StyledString(qualifier, StyledString.QUALIFIER_STYLER));
};
};
}
示例2: MultiMainTypeSelectionDialog
/**
* Constructor.
*/
public MultiMainTypeSelectionDialog(Shell shell, IRunnableContext context,
IJavaSearchScope scope, int style)
{
super(shell, new JavaElementLabelProvider(
JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT));
setMultipleSelection(true);
Assert.isNotNull(context);
Assert.isNotNull(scope);
fRunnableContext= context;
fScope= scope;
fStyle= style;
}
示例3: selectClass
/**
* @param shell
* @param project
* @param filter
* @return the selected file
*/
public static IType selectClass(final Shell shell,
final IProject project,
final Filter filter) {
final int flags = JavaElementLabelProvider.SHOW_DEFAULT |
JavaElementLabelProvider.SHOW_POST_QUALIFIED |
JavaElementLabelProvider.SHOW_ROOT;
final ElementListSelectionDialog dlg =
new ElementListSelectionDialog(shell, new JavaElementLabelProvider(flags));
dlg.setTitle("Select Custom Operation(s) Class");
dlg.setMessage("Select a custom operation(s) class");
dlg.setMatchEmptyString(true);
dlg.setHelpAvailable(false);
final List<IType> types = new ArrayList<>();
populateClasses(shell, JavaCore.create(project), types, filter);
dlg.setElements(types.toArray());
return (dlg.open() == Window.OK) ? (IType) dlg.getFirstResult() : null;
}
示例4: selectFile
/**
* @param shell
* @param project
* @param schemaType
* @return the selected file
*/
public static String selectFile(final Shell shell,
final IProject project,
final String schemaType) {
final int flags = JavaElementLabelProvider.SHOW_DEFAULT
| JavaElementLabelProvider.SHOW_POST_QUALIFIED
| JavaElementLabelProvider.SHOW_ROOT;
final ElementListSelectionDialog dlg =
new ElementListSelectionDialog(shell, new JavaElementLabelProvider(flags) {
@Override
public String getText(final Object element) {
return super.getText(element) + " - "
+ ((IResource) element).getParent().getFullPath().makeRelative();
}
});
dlg.setTitle("Select " + schemaType);
dlg.setMessage("Select the " + schemaType + " file for the transformation");
dlg.setMatchEmptyString(true);
dlg.setHelpAvailable(false);
final List<IResource> resources = new ArrayList<>();
populateResources(shell, project, resources);
dlg.setElements(resources.toArray());
if (dlg.open() == Window.OK)
return ((IFile) dlg.getFirstResult()).getProjectRelativePath().toString();
return null;
}
示例5: PackageRenderer
public PackageRenderer() {
super(JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT);
}
示例6: PackageRenderer
public PackageRenderer() {
super(JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT);
}