当前位置: 首页>>代码示例>>Java>>正文


Java AppearanceAwareLabelProvider类代码示例

本文整理汇总了Java中org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider的典型用法代码示例。如果您正苦于以下问题:Java AppearanceAwareLabelProvider类的具体用法?Java AppearanceAwareLabelProvider怎么用?Java AppearanceAwareLabelProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AppearanceAwareLabelProvider类属于org.eclipse.jdt.internal.ui.viewsupport包,在下文中一共展示了AppearanceAwareLabelProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getToolTipText

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * Returns the tool tip text for the given element.
 * @param element the element
 * @return the tooltip for the element
 */
String getToolTipText(Object element) {
	String result;
	if (!(element instanceof IResource)) {
		result= JavaElementLabels.getTextLabel(element, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS);
	} else {
		IPath path= ((IResource) element).getFullPath();
		if (path.isRoot()) {
			result= getConfigurationElement().getAttribute("name"); //$NON-NLS-1$
		} else {
			result= path.makeRelative().toString();
		}
	}

	if (fWorkingSetFilterActionGroup == null || fWorkingSetFilterActionGroup.getWorkingSet() == null)
		return result;

	IWorkingSet ws= fWorkingSetFilterActionGroup.getWorkingSet();
	String wsstr= Messages.format(JavaBrowsingMessages.JavaBrowsingPart_toolTip, new String[] { BasicElementLabels.getWorkingSetLabel(ws) });
	if (result.length() == 0)
		return wsstr;
	return Messages.format(JavaBrowsingMessages.JavaBrowsingPart_toolTip2, new String[] { result, BasicElementLabels.getWorkingSetLabel(ws) });
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:28,代码来源:JavaBrowsingPart.java

示例2: createLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
private ILabelProvider createLabelProvider(){
	AppearanceAwareLabelProvider lprovider= new AppearanceAwareLabelProvider(
		AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS |  JavaElementLabels.F_APP_TYPE_SIGNATURE,
		AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS
	);

	return new DecoratingJavaLabelProvider(lprovider);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:ExtractInterfaceWizard.java

示例3: updateTitle

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * Updates the title text and title tool tip.
 * Called whenever the input of the viewer changes.
 */
void updateTitle() {
	Object input= fViewer.getInput();
	if (input == null
		|| (input instanceof IJavaModel)) {
		setContentDescription(""); //$NON-NLS-1$
		setTitleToolTip(""); //$NON-NLS-1$
	} else {
		String inputText= JavaElementLabels.getTextLabel(input, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS);
		setContentDescription(inputText);
		setTitleToolTip(getToolTipText(input));
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:PackageExplorerPart.java

示例4: createToolTipLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * Returns the label provider to use for the tool tips.
 *
 * @return a label provider for the tool tips
 */
private ILabelProvider createToolTipLabelProvider() {
	final AppearanceAwareLabelProvider result= new AppearanceAwareLabelProvider(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_APP_TYPE_SIGNATURE
			| JavaElementLabels.ALL_CATEGORY, JavaElementImageProvider.SMALL_ICONS | AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS);

	return new DecoratingJavaLabelProvider(result);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:JavaEditorBreadcrumb.java

示例5: setContentProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
   * Set the content and label provider of the
   * <code>fPackageViewer</code>
   */
  public void setContentProvider() {
  	if (fContentProvider != null) {
  		fContentProvider.dispose();
  	}
fContentProvider= new PackageContentProvider();
fContentProvider.setIsFlatLayout(true);
PackageLabelProvider labelProvider= new PackageLabelProvider(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED,
		AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS);
fPackageViewer.setContentProvider(fContentProvider);
fPackageViewer.setLabelProvider(new DecoratingJavaLabelProvider(labelProvider, false));
  }
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:16,代码来源:DialogPackageExplorer.java

示例6: createLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * Creates and returns the label provider for this part.
 *
 * @return the label provider
 * @see org.eclipse.jface.viewers.ILabelProvider
 */
@Override
protected JavaUILabelProvider createLabelProvider() {
	return new AppearanceAwareLabelProvider(
					AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_APP_TYPE_SIGNATURE | JavaElementLabels.ALL_CATEGORY,
					AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS
					);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:14,代码来源:MembersView.java

示例7: createLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * Creates and returns the label provider for this part.
 *
 * @return the label provider
 * @see org.eclipse.jface.viewers.ILabelProvider
 */
@Override
protected JavaUILabelProvider createLabelProvider() {
	return new AppearanceAwareLabelProvider(
					AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.T_CATEGORY,
					AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:TypesView.java

示例8: configureTree

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void configureTree(TreeViewer tree) {
	tree.setContentProvider(new JavaWorkingSetPageContentProvider());

	AppearanceAwareLabelProvider javaElementLabelProvider=
		new AppearanceAwareLabelProvider(
			AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED,
			AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS
		);

	tree.setLabelProvider(new DecoratingJavaLabelProvider(javaElementLabelProvider));
	tree.setComparator(new JavaElementComparator());
	tree.addFilter(new EmptyInnerPackageFilter());

	tree.setInput(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()));

	if (getSelection() == null)
		return;

	Object[] selection= getInitialTreeSelection();
	if (selection.length > 0) {
		try {
			tree.getTree().setRedraw(false);

			for (int i= 0; i < selection.length; i++) {
				tree.expandToLevel(selection[i], 0);
			}
			tree.setSelection(new StructuredSelection(selection));
		} finally {
			tree.getTree().setRedraw(true);
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:37,代码来源:JavaWorkingSetPage.java

示例9: configureTable

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void configureTable(TableViewer table) {
	AppearanceAwareLabelProvider javaElementLabelProvider= new AppearanceAwareLabelProvider(
			AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED
			| JavaElementLabels.ROOT_POST_QUALIFIED | JavaElementLabels.P_POST_QUALIFIED,
			AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS
		);

	table.setLabelProvider(new DecoratingJavaLabelProvider(javaElementLabelProvider));
	table.setComparator(new JavaElementComparator());
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:15,代码来源:JavaWorkingSetPage.java

示例10: createControl

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public void createControl(Composite parent) {
	fForm= new ViewForm(parent, SWT.BORDER | SWT.FLAT);
	fForm.marginWidth= 0;
	fForm.marginHeight= 0;

	fLabel= new CLabel(fForm, SWT.NONE);
	fLabel.setText(RefactoringMessages.ReferencesInBinaryStatusContextViewer_title);
	fForm.setTopLeft(fLabel);

	Composite composite= new Composite(fForm, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	GridLayout layout= new GridLayout(1, false);
	layout.marginWidth= 0;
	layout.marginHeight= 0;
	composite.setLayout(layout);


	fTreeViewer= new TreeViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
	final AppearanceAwareLabelProvider labelProvider= new AppearanceAwareLabelProvider();
	fTreeViewer.setLabelProvider(new DelegatingStyledCellLabelProvider(labelProvider));
	fTreeViewer.setComparator(new ViewerComparator() {
		private Collator fCollator= Collator.getInstance();
		@Override
		public int compare(Viewer viewer, Object e1, Object e2) {
			String l1= labelProvider.getText(e1);
			String l2= labelProvider.getText(e2);
			return fCollator.compare(l1, l2);
		}
	});
	fTreeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	fButton= new Button(composite, SWT.PUSH);
	fButton.setText(RefactoringMessages.ReferencesInBinaryStatusContextViewer_show_as_search_button);
	GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
	layoutData.widthHint= SWTUtil.getButtonWidthHint(fButton);
	fButton.setLayoutData(layoutData);
	fButton.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			fillInSearchView();
		}
	});
	fButton.setEnabled(false);

	fForm.setContent(composite);

	Dialog.applyDialogFont(parent);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:52,代码来源:ReferencesInBinaryStatusContextViewer.java

示例11: NLSSearchResultLabelProvider2

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
public NLSSearchResultLabelProvider2(AbstractTextSearchViewPage page) {
	super(page);
	fLabelProvider= new AppearanceAwareLabelProvider(JavaElementLabels.ALL_POST_QUALIFIED, 0);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:NLSSearchResultLabelProvider2.java

示例12: createDropDownLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
private ILabelProvider createDropDownLabelProvider() {
	final AppearanceAwareLabelProvider result= new AppearanceAwareLabelProvider(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_APP_TYPE_SIGNATURE
			| JavaElementLabels.ALL_CATEGORY | JavaElementLabels.P_COMPRESSED, JavaElementImageProvider.SMALL_ICONS | AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS);

	return new DecoratingJavaLabelProvider(result);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:JavaEditorBreadcrumb.java

示例13: OutlineLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
private OutlineLabelProvider() {
	super(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS |  JavaElementLabels.F_APP_TYPE_SIGNATURE | JavaElementLabels.ALL_CATEGORY | JavaElementLabels.P_COMPRESSED, AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:JavaOutlineInformationControl.java

示例14: createLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
protected JavaUILabelProvider createLabelProvider() {
	return new AppearanceAwareLabelProvider(
					AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS,
					AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS
					);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:JavaBrowsingPart.java

示例15: PackagesViewLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; //导入依赖的package包/类
PackagesViewLabelProvider(int state) {
	this(state, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED, AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:PackagesViewLabelProvider.java


注:本文中的org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。