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


Java Annotation.setGutterIconRenderer方法代码示例

本文整理汇总了Java中com.intellij.lang.annotation.Annotation.setGutterIconRenderer方法的典型用法代码示例。如果您正苦于以下问题:Java Annotation.setGutterIconRenderer方法的具体用法?Java Annotation.setGutterIconRenderer怎么用?Java Annotation.setGutterIconRenderer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.lang.annotation.Annotation的用法示例。


在下文中一共展示了Annotation.setGutterIconRenderer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: annotate

import com.intellij.lang.annotation.Annotation; //导入方法依赖的package包/类
@Override
public void annotate(@NotNull PsiElement psiElement, @NotNull AnnotationHolder holder) {
  if (psiElement instanceof PsiField) {
    PsiField field = (PsiField) psiElement;
    final PsiFile boundForm = FormReferenceProvider.getFormFile(field);
    if (boundForm != null) {
      annotateFormField(field, boundForm, holder);
    }
  }
  else if (psiElement instanceof PsiClass) {
    PsiClass aClass = (PsiClass) psiElement;
    final List<PsiFile> formsBoundToClass = FormClassIndex.findFormsBoundToClass(aClass.getProject(), aClass);
    if (formsBoundToClass.size() > 0) {
      Annotation boundClassAnnotation = holder.createInfoAnnotation(aClass.getNameIdentifier(), null);
      boundClassAnnotation.setGutterIconRenderer(new BoundIconRenderer(aClass));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:FormClassAnnotator.java

示例2: attachColorIcon

import com.intellij.lang.annotation.Annotation; //导入方法依赖的package包/类
private static void attachColorIcon(final PsiElement element, AnnotationHolder holder, String attributeValueText) {
  try {
    Color color = null;
    if (attributeValueText.startsWith("#")) {
      color = ColorUtil.fromHex(attributeValueText.substring(1));
    } else {
      final String hexCode = ColorMap.getHexCodeForColorName(StringUtil.toLowerCase(attributeValueText));
      if (hexCode != null) {
        color = ColorUtil.fromHex(hexCode);
      }
    }
    if (color != null) {
      final ColorIcon icon = new ColorIcon(8, color);
      final Annotation annotation = holder.createInfoAnnotation(element, null);
      annotation.setGutterIconRenderer(new ColorIconRenderer(icon, element));
    }
  }
  catch (Exception ignored) {
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JavaFxAnnotator.java

示例3: doInstall

import com.intellij.lang.annotation.Annotation; //导入方法依赖的package包/类
private Annotation doInstall(@NotNull Annotation annotation, @NotNull Project project) {
  final MyNavigationGutterIconRenderer renderer = createGutterIconRenderer(project);
  annotation.setGutterIconRenderer(renderer);
  annotation.setNeedsUpdateOnTyping(false);
  return annotation;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:NavigationGutterIconBuilder.java

示例4: createGutterAnnotation

import com.intellij.lang.annotation.Annotation; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked" })
private void createGutterAnnotation(CommonElement t, GutterIconRenderer renderer) {
  final Annotation a = myHolder.createAnnotation((T)t, HighlightSeverity.INFORMATION, null);
  a.setGutterIconRenderer(renderer);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ModelAnnotator.java


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