• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JavaElementImageProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: NewDefiningMethodProposal

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public NewDefiningMethodProposal(
    String label,
    ICompilationUnit targetCU,
    ASTNode invocationNode,
    ITypeBinding binding,
    IMethodBinding method,
    String[] paramNames,
    int relevance) {
  super(label, targetCU, invocationNode, binding, relevance, null);
  fMethod = method;
  fParamNames = paramNames;

  ImageDescriptor desc =
      JavaElementImageProvider.getMethodImageDescriptor(
          binding.isInterface() || binding.isAnnotation(), method.getModifiers());
  setImage(JavaPlugin.getImageDescriptorRegistry().get(desc));
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:NewDefiningMethodProposal.java


示例2: computeCompletionProposals

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubject, int documentOffset) {
	if (fFieldNameProposals.length == 0)
		return null;
	String input= contentAssistSubject.getDocument().get();

	ArrayList<JavaCompletionProposal> proposals= new ArrayList<JavaCompletionProposal>();
	String prefix= input.substring(0, documentOffset);
	ImageDescriptor imageDescriptor= JavaElementImageProvider.getFieldImageDescriptor(false, fRefactoring.getVisibility());
	Image image= fImageRegistry.get(imageDescriptor);
	for (int i= 0; i < fFieldNameProposals.length; i++) {
		String tempName= fFieldNameProposals[i];
		if (tempName.length() == 0 || ! tempName.startsWith(prefix))
			continue;
		JavaCompletionProposal proposal= new JavaCompletionProposal(tempName, 0, input.length(), image, tempName, 0);
		proposals.add(proposal);
	}
	fErrorMessage= proposals.size() > 0 ? null : JavaUIMessages.JavaEditor_codeassist_noCompletions;
	return proposals.toArray(new ICompletionProposal[proposals.size()]);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:FieldNameProcessor.java


示例3: getImage

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
@Override
public Image getImage(Object element) {
	if (element instanceof JavadocLinkRef) {
		JavadocLinkRef ref= (JavadocLinkRef) element;
		ImageDescriptor desc;
		if (ref.isProjectRef()) {
			desc= PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
		} else {
			desc= JavaUI.getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_JAR);
		}
		if (ref.getURL() == null) {
			return JavaPlugin.getImageDescriptorRegistry().get(new JavaElementImageDescriptor(desc, JavaElementImageDescriptor.WARNING, JavaElementImageProvider.SMALL_SIZE));
		}
		return JavaPlugin.getImageDescriptorRegistry().get(desc);
	}
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:JavadocLinkDialogLabelProvider.java


示例4: MethodDeclarationCompletionProposal

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public MethodDeclarationCompletionProposal(IType type, String methodName, String returnTypeSig, int start, int length, int relevance) {
	super("", type.getCompilationUnit(), start, length, null, getDisplayName(methodName, returnTypeSig), relevance); //$NON-NLS-1$
	Assert.isNotNull(type);
	Assert.isNotNull(methodName);

	fType= type;
	fMethodName= methodName;
	fReturnTypeSig= returnTypeSig;

	if (returnTypeSig == null) {
		setProposalInfo(new ProposalInfo(type));

		ImageDescriptor desc= new JavaElementImageDescriptor(JavaPluginImages.DESC_MISC_PUBLIC, JavaElementImageDescriptor.CONSTRUCTOR, JavaElementImageProvider.SMALL_SIZE);
		setImage(JavaPlugin.getImageDescriptorRegistry().get(desc));
	} else {
		setImage(JavaPluginImages.get(JavaPluginImages.IMG_MISC_PRIVATE));
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:MethodDeclarationCompletionProposal.java


示例5: getColumnImage

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public Image getColumnImage(Object element, int columnIndex) {
	if (columnIndex != 0) {
		return null;
	}

	NameConventionEntry entry= (NameConventionEntry) element;
	ImageDescriptorRegistry registry= JavaPlugin.getImageDescriptorRegistry();
	switch (entry.kind) {
		case FIELD:
			return registry.get(JavaPluginImages.DESC_FIELD_PUBLIC);
		case STATIC:
			return registry.get(new JavaElementImageDescriptor(JavaPluginImages.DESC_FIELD_PUBLIC, JavaElementImageDescriptor.STATIC, JavaElementImageProvider.SMALL_SIZE));
		case STATIC_FINAL:
			return registry.get(new JavaElementImageDescriptor(JavaPluginImages.DESC_FIELD_PUBLIC, JavaElementImageDescriptor.STATIC | JavaElementImageDescriptor.FINAL, JavaElementImageProvider.SMALL_SIZE));
		case ARGUMENT:
			return registry.get(JavaPluginImages.DESC_OBJS_LOCAL_VARIABLE);
		default:
			return registry.get(JavaPluginImages.DESC_OBJS_LOCAL_VARIABLE);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:NameConventionConfigurationBlock.java


示例6: getImage

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
@Override
public Image getImage(Object element) {
	//access to image registry
	ImageDescriptorRegistry registry= JavaPlugin.getImageDescriptorRegistry();
	ImageDescriptor descriptor= null;

	if (element instanceof String) {
		String s= (String) element;
		if (s.equals(PUBLIC)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccPublic);
		} else if (s.equals(PRIVATE)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccPrivate);
		} else if (s.equals(PROTECTED)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccProtected);
		} else if (s.equals(DEFAULT)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccDefault);
		}
		return registry.get(descriptor);
	}
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:MembersOrderPreferencePage.java


示例7: getImageDescriptor

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
@Override
public ImageDescriptor getImageDescriptor(Context context, Bookmark bookmark) {
	ImageDescriptorRegistry registry = JavaPlugin
			.getImageDescriptorRegistry();
	ImageDescriptor descriptor = null;
	String kind = bookmark.getPropertyValue(PROP_JAVA_ELEMENT_KIND);
	if (KIND_METHOD.equals(kind)) {
		descriptor = JavaElementImageProvider
				.getMethodImageDescriptor(false, 0);
	}
	if (KIND_FIELD.equals(kind)) {
		descriptor = JavaElementImageProvider
				.getFieldImageDescriptor(false, 0);
	}
	if (KIND_ANNOTATION.equals(kind)) {
		descriptor = JavaElementImageProvider
				.getTypeImageDescriptor(false, true, Flags.AccAnnotation, false);			
	}
	if (KIND_ENUM.equals(kind)) {
		descriptor = JavaElementImageProvider
				.getTypeImageDescriptor(false, false, Flags.AccEnum, false);			
	}
	if (KIND_INTERFACE.equals(kind)) {
		descriptor = JavaElementImageProvider
				.getTypeImageDescriptor(false, true, Flags.AccInterface, false);			
	}
	if (KIND_CLASS.equals(kind)) {
		descriptor = JavaElementImageProvider
				.getTypeImageDescriptor(false, false, 0, false);
	}		
	if (KIND_TYPE.equals(kind)) {
		descriptor = JavaElementImageProvider
				.getTypeImageDescriptor(false, false, 0, false);
	}
	return descriptor;
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:37,代码来源:JavaBookmarkLabelProvider.java


示例8: createTypeImageDescriptor

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
ImageDescriptor createTypeImageDescriptor(CompletionProposal proposal) {
  final int flags = proposal.getFlags();
  boolean isInterfaceOrAnnotation = Flags.isInterface(flags) || Flags.isAnnotation(flags);
  return decorateImageDescriptor(
      JavaElementImageProvider.getTypeImageDescriptor(
          true /* in order to get all visibility decorations */,
          isInterfaceOrAnnotation,
          flags,
          false),
      proposal);
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:CompletionProposalLabelProvider.java


示例9: getImageDescriptor

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
private ImageDescriptor getImageDescriptor(IJavaElement elem) {
  JavaElementImageProvider imageProvider = new JavaElementImageProvider();
  ImageDescriptor desc =
      imageProvider.getBaseImageDescriptor(elem, JavaElementImageProvider.OVERLAY_ICONS);
  imageProvider.dispose();
  return desc;
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:ParameterGuesser.java


示例10: getImageDescriptor

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public ImageDescriptor getImageDescriptor(Object element) {
	TypeNameMatch type= (TypeNameMatch)element;
	if (fProviderExtension != null) {
		fAdapter.setMatch(type);
		ImageDescriptor descriptor= fProviderExtension.getImageDescriptor(fAdapter);
		if (descriptor != null)
			return descriptor;
	}
	return JavaElementImageProvider.getTypeImageDescriptor(
		isInnerType(type), false, type.getModifiers(), false);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:TypeInfoViewer.java


示例11: createTypeHierarchyLabel

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
private void createTypeHierarchyLabel(Composite composite) {
	fSimilarElementsLabel= new Label(composite, SWT.WRAP);
	GridData gd= new GridData(GridData.FILL_HORIZONTAL);
	gd.heightHint= JavaElementImageProvider.SMALL_SIZE.x;
	fSimilarElementsLabel.setLayoutData(gd);
	fSimilarElementsLabel.setText(RefactoringMessages.RenameTypeWizardSimilarElementsPage_review_similar_elements);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:RenameTypeWizardSimilarElementsPage.java


示例12: createSourceViewerLabel

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
private void createSourceViewerLabel(Composite c) {
	fCurrentElementLabel= new CLabel(c, SWT.NONE);
	GridData gd= new GridData(GridData.FILL_HORIZONTAL);
	gd.heightHint= JavaElementImageProvider.SMALL_SIZE.x;
	fCurrentElementLabel.setText(RefactoringMessages.RenameTypeWizardSimilarElementsPage_select_element_to_view_source);
	fCurrentElementLabel.setLayoutData(gd);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:RenameTypeWizardSimilarElementsPage.java


示例13: JavaElementLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
/**
 * Creates a new label provider.
 *
 * @param flags the initial options; a bitwise OR of <code>SHOW_* </code> constants
 */
public JavaElementLabelProvider(int flags) {
	fImageLabelProvider= new JavaElementImageProvider();
	fStorageLabelProvider= new StorageLabelProvider();
	fFlags= flags;
	updateImageProviderFlags();
	updateTextProviderFlags();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:JavaElementLabelProvider.java


示例14: updateImageProviderFlags

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
private void updateImageProviderFlags() {
	fImageFlags= 0;
	if (getFlag(SHOW_OVERLAY_ICONS)) {
		fImageFlags |= JavaElementImageProvider.OVERLAY_ICONS;
	}
	if (getFlag(SHOW_SMALL_ICONS)) {
		fImageFlags |= JavaElementImageProvider.SMALL_ICONS;
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:JavaElementLabelProvider.java


示例15: PackageExplorerLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public PackageExplorerLabelProvider(PackageExplorerContentProvider cp) {
	super(DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED | JavaElementLabels.ALL_CATEGORY, DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS);

	fProblemDecorator= new PackageExplorerProblemsDecorator();
	addLabelDecorator(fProblemDecorator);
	Assert.isNotNull(cp);
	fContentProvider= cp;
	fWorkingSetImages= null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:PackageExplorerLabelProvider.java


示例16: getImageDescriptor

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
private static ImageDescriptor getImageDescriptor(IMember[] members) {
	JavaElementImageProvider imageProvider= new JavaElementImageProvider();
	ImageDescriptor desc= imageProvider.getBaseImageDescriptor(members[0], 0);
	imageProvider.dispose();
	return desc;

}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:HistoryAction.java


示例17: getImageDescriptor

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public ImageDescriptor getImageDescriptor(Object element) {
	IJavaElement je= getJavaElement(element);
	if (je != null)
		return fImageProvider.getJavaImageDescriptor(je, JavaElementImageProvider.OVERLAY_ICONS | JavaElementImageProvider.SMALL_ICONS);

	return null;

}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:JavaWorkbenchAdapter.java


示例18: createToolTipLabelProvider

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的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


示例19: JavaEditorErrorTickUpdater

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public JavaEditorErrorTickUpdater(JavaEditor editor) {
	Assert.isNotNull(editor);
	fJavaEditor= editor;
	fLabelProvider=  new JavaUILabelProvider(0, JavaElementImageProvider.SMALL_ICONS);
	fLabelProvider.addLabelDecorator(new ProblemsLabelDecorator(null));
	JavaPlugin.getDefault().getProblemMarkerManager().addListener(this);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:JavaEditorErrorTickUpdater.java


示例20: NewDefiningMethodProposal

import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; //导入依赖的package包/类
public NewDefiningMethodProposal(String label, ICompilationUnit targetCU, ASTNode invocationNode, ITypeBinding binding, IMethodBinding method, String[] paramNames, int relevance) {
	super(label,targetCU,invocationNode,binding,relevance,null);
	fMethod= method;
	fParamNames= paramNames;

	ImageDescriptor desc= JavaElementImageProvider.getMethodImageDescriptor(binding.isInterface() || binding.isAnnotation(), method.getModifiers());
	setImage(JavaPlugin.getImageDescriptorRegistry().get(desc));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:NewDefiningMethodProposal.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PsiElementUsageTarget类代码示例发布时间:2022-05-22
下一篇:
Java Stage类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap