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

Java SpeedSearchUtil类代码示例

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

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



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

示例1: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
    Color bgColor = UIUtil.getListBackground();
    setPaintFocusBorder(hasFocus && UIUtil.isToUseDottedCellBorder());

    if (value instanceof SearchResultElement) {
        SearchResultElement element = (SearchResultElement) value;
        String stringKeyText = "(" + element.getName() + ")";
        String text = new StringEllipsisPolicy().ellipsizeText(element.getValue(), matcher);

        SimpleTextAttributes nameAttributes = new SimpleTextAttributes(Font.PLAIN, list.getForeground());
        SpeedSearchUtil.appendColoredFragmentForMatcher(text, this, nameAttributes, matcher, bgColor, selected);
        append(" " + stringKeyText, new SimpleTextAttributes(Font.PLAIN, JBColor.GRAY));
    }

    setBackground(selected ? UIUtil.getListSelectionBackground() : bgColor);
}
 
开发者ID:hoai265,项目名称:SearchResourcePlugin,代码行数:18,代码来源:ResultElementListCellRenderer.java


示例2: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
    Color bgColor = UIUtil.getListBackground();
    setPaintFocusBorder(hasFocus && UIUtil.isToUseDottedCellBorder());

    if (value instanceof StringElement) {
        StringElement element = (StringElement) value;
        String stringKeyText = "(" + element.getName() + ")";
        String text = new StringEllipsisPolicy().ellipsizeText(element.getValue(), matcher);

        SimpleTextAttributes nameAttributes = new SimpleTextAttributes(Font.PLAIN, list.getForeground());
        SpeedSearchUtil.appendColoredFragmentForMatcher(text, this, nameAttributes, matcher, bgColor, selected);
        // TODO Change icon
        setIcon(AndroidIcons.EmptyFlag);

        append(" " + stringKeyText, new SimpleTextAttributes(Font.PLAIN, JBColor.GRAY));
    }

    setBackground(selected ? UIUtil.getListSelectionBackground() : bgColor);
}
 
开发者ID:konifar,项目名称:android-strings-search-plugin,代码行数:21,代码来源:StringElementListCellRenderer.java


示例3: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
  if (value instanceof FileInfo) {
    Project project = mySwitcherPanel.project;
    VirtualFile virtualFile = ((FileInfo)value).getFirst();
    String renderedName = ((FileInfo)value).getNameForRendering();
    setIcon(IconUtil.getIcon(virtualFile, Iconable.ICON_FLAG_READ_STATUS, project));

    FileStatus fileStatus = FileStatusManager.getInstance(project).getStatus(virtualFile);
    open = FileEditorManager.getInstance(project).isFileOpen(virtualFile);
    TextAttributes attributes = new TextAttributes(fileStatus.getColor(), null, null, EffectType.LINE_UNDERSCORE, Font.PLAIN);
    append(renderedName, SimpleTextAttributes.fromTextAttributes(attributes));

    // calc color the same way editor tabs do this, i.e. including EPs
    Color color = EditorTabbedContainer.calcTabColor(project, virtualFile);

    if (!selected && color != null) {
      setBackground(color);
    }
    SpeedSearchUtil.applySpeedSearchHighlighting(mySwitcherPanel, this, false, selected);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:Switcher.java


示例4: renderItemName

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
private void renderItemName(LookupElement item,
                    Color foreground,
                    boolean selected,
                    @SimpleTextAttributes.StyleAttributeConstant int style,
                    String name,
                    final SimpleColoredComponent nameComponent) {
  final SimpleTextAttributes base = new SimpleTextAttributes(style, foreground);

  final String prefix = item instanceof EmptyLookupItem ? "" : myLookup.itemPattern(item);
  if (prefix.length() > 0) {
    Iterable<TextRange> ranges = getMatchingFragments(prefix, name);
    if (ranges != null) {
      SimpleTextAttributes highlighted =
        new SimpleTextAttributes(style, selected ? SELECTED_PREFIX_FOREGROUND_COLOR : PREFIX_FOREGROUND_COLOR);
      SpeedSearchUtil.appendColoredFragments(nameComponent, name, ranges, base, highlighted);
      return;
    }
  }
  nameComponent.append(name, base);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:LookupCellRenderer.java


示例5: appendWithColoredMatches

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
private static void appendWithColoredMatches(SimpleColoredComponent nameComponent,
                                             String name,
                                             String pattern,
                                             Color fg,
                                             boolean selected) {
  SimpleTextAttributes plain = new SimpleTextAttributes(STYLE_PLAIN, fg);
  SimpleTextAttributes highlighted = new SimpleTextAttributes(null, fg, null, STYLE_SEARCH_MATCH);
  List<TextRange> fragments = ContainerUtil.newArrayList();
  if (selected) {
    int matchStart = StringUtil.indexOfIgnoreCase(name, pattern, 0);
    if (matchStart >= 0) {
      fragments.add(TextRange.from(matchStart, pattern.length()));
    }
  }
  SpeedSearchUtil.appendColoredFragments(nameComponent, name, fragments, plain, highlighted);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GotoActionModel.java


示例6: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
protected void customizeCellRenderer(@Nonnull JList list, Object value, int index, boolean selected, boolean hasFocus) {
  if (value instanceof FileInfo) {
    Project project = mySwitcherPanel.project;
    VirtualFile virtualFile = ((FileInfo)value).getFirst();
    String renderedName = ((FileInfo)value).getNameForRendering();
    setIcon(VfsIconUtil.getIcon(virtualFile, Iconable.ICON_FLAG_READ_STATUS, project));

    FileStatus fileStatus = FileStatusManager.getInstance(project).getStatus(virtualFile);
    open = FileEditorManager.getInstance(project).isFileOpen(virtualFile);
    TextAttributes attributes = new TextAttributes(fileStatus.getColor(), null, null, EffectType.LINE_UNDERSCORE, Font.PLAIN);
    append(renderedName, SimpleTextAttributes.fromTextAttributes(attributes));

    // calc color the same way editor tabs do this, i.e. including EPs
    Color color = EditorTabbedContainer.calcTabColor(project, virtualFile);

    if (!selected && color != null) {
      setBackground(color);
    }
    SpeedSearchUtil.applySpeedSearchHighlighting(mySwitcherPanel, this, false, selected);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:Switcher.java


示例7: renderItemName

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
private void renderItemName(LookupElement item,
                            Color foreground,
                            boolean selected,
                            @SimpleTextAttributes.StyleAttributeConstant int style,
                            String name,
                            final SimpleColoredComponent nameComponent) {
  final SimpleTextAttributes base = new SimpleTextAttributes(style, foreground);

  final String prefix = item instanceof EmptyLookupItem ? "" : myLookup.itemPattern(item);
  if (prefix.length() > 0) {
    Iterable<TextRange> ranges = getMatchingFragments(prefix, name);
    if (ranges != null) {
      SimpleTextAttributes highlighted =
              new SimpleTextAttributes(style, selected ? SELECTED_PREFIX_FOREGROUND_COLOR : PREFIX_FOREGROUND_COLOR);
      SpeedSearchUtil.appendColoredFragments(nameComponent, name, ranges, base, highlighted);
      return;
    }
  }
  nameComponent.append(name, base);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:LookupCellRenderer.java


示例8: addText

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
protected void addText(@NotNull Object value, boolean isSelected, int row)
{
	String presentation = ((ReferenceType) value).name();
	append(" ");
	if(isSelected)
	{
		FList<TextRange> textRanges = myMatcher.matchingFragments(presentation);
		if(textRanges != null)
		{
			SimpleTextAttributes attributes = new SimpleTextAttributes(getBackground(), getForeground(), null, SimpleTextAttributes.STYLE_SEARCH_MATCH);
			SpeedSearchUtil.appendColoredFragments(this, presentation, textRanges, SimpleTextAttributes.REGULAR_ATTRIBUTES, attributes);
		}
	}
	else
	{
		append(String.format("%s", presentation), SimpleTextAttributes.REGULAR_ATTRIBUTES);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:20,代码来源:ClassesTable.java


示例9: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
public void customizeCellRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {

    AbstractTreeNode treeNode = (AbstractTreeNode)value;
    append(treeNode.getText(), treeNode.getAttributes());
    final String errorText = treeNode.getErrorText();
    if (errorText != null) {
      append(" - ", SimpleTextAttributes.REGULAR_ATTRIBUTES);
      append("Error: ", SimpleTextAttributes.ERROR_ATTRIBUTES);
      append(errorText, SimpleTextAttributes.REGULAR_ATTRIBUTES);
    }
    setIcon(treeNode.getIcon(false));
    SpeedSearchUtil.applySpeedSearchHighlighting(tree, this, true, selected);
  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:UpdateTreeCellRenderer.java


示例10: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
public void customizeCellRenderer(JTree tree,
                                  Object value,
                                  boolean selected,
                                  boolean expanded,
                                  boolean leaf,
                                  int row,
                                  boolean hasFocus) {
  ChangesBrowserNode node = (ChangesBrowserNode)value;
  node.render(this, selected, expanded, hasFocus);
  SpeedSearchUtil.applySpeedSearchHighlighting(tree, this, true, selected);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ChangesBrowserNodeRenderer.java


示例11: getListCellRendererComponent

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean sel, boolean focus) {
  final JPanel panel = new JPanel(new BorderLayout());
  panel.setOpaque(true);

  final Color bg = sel ? UIUtil.getListSelectionBackground() : UIUtil.getListBackground();
  final Color fg = sel ? UIUtil.getListSelectionForeground() : UIUtil.getListForeground();
  panel.setBackground(bg);
  panel.setForeground(fg);

  SimpleTextAttributes attr = sel ? SELECTED : PLAIN;
  if (value instanceof InspectionToolWrapper) {
    final InspectionToolWrapper toolWrapper = (InspectionToolWrapper)value;
    final SimpleColoredComponent c = new SimpleColoredComponent();
    SpeedSearchUtil.appendColoredFragmentForMatcher("  " + toolWrapper.getDisplayName(), c, attr, myMatcher, bg, sel);
    panel.add(c, BorderLayout.WEST);

    final SimpleColoredComponent group = new SimpleColoredComponent();
    SpeedSearchUtil.appendColoredFragmentForMatcher(toolWrapper.getGroupDisplayName() + "  ", group, attr, myMatcher, bg, sel);
    final JPanel right = new JPanel(new BorderLayout());
    right.setBackground(bg);
    right.setForeground(fg);
    right.add(group, BorderLayout.CENTER);
    final JLabel icon = new JLabel(getIcon(toolWrapper));
    icon.setBackground(bg);
    icon.setForeground(fg);
    right.add(icon, BorderLayout.EAST);
    panel.add(right, BorderLayout.EAST);
  }
  else {
    // E.g. "..." item
    return value == ChooseByNameBase.NON_PREFIX_SEPARATOR ? ChooseByNameBase.renderNonPrefixSeparatorComponent(UIUtil.getListBackground()) :
           super.getListCellRendererComponent(list, value, index, sel, focus);
  }

  return panel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:38,代码来源:InspectionListCellRenderer.java


示例12: getListCellRendererComponent

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
public Component getListCellRendererComponent(JList jList, Object value, int i, boolean sel, boolean focus) {
    JPanel jPanel = new JPanel(new BorderLayout());
    jPanel.setOpaque(true);

    final Color bg = sel ? UIUtil.getListSelectionBackground() : UIUtil.getListBackground();
    final Color fg = sel ? UIUtil.getListSelectionForeground() : UIUtil.getListForeground();
    jPanel.setBackground(bg);
    jPanel.setForeground(fg);

    SimpleTextAttributes attr = sel ? SELECTED : PLAIN;
    if (value instanceof EmberItem) {
        EmberItem item = (EmberItem) value;
        final SimpleColoredComponent c = new SimpleColoredComponent();
        SpeedSearchUtil.appendColoredFragmentForMatcher("  " + item.getItemName(), c, attr, null, bg, sel);
        jPanel.add(c, BorderLayout.WEST);

        final SimpleColoredComponent group = new SimpleColoredComponent();
        SpeedSearchUtil.appendColoredFragmentForMatcher(item.getItemType() + "  ", group, attr, null, bg, sel);
        final JPanel right = new JPanel(new BorderLayout());
        right.setBackground(bg);
        right.setForeground(fg);
        right.add(group, BorderLayout.CENTER);
        jPanel.add(right, BorderLayout.EAST);
    }
    else {
        // E.g. "..." item
        return ChooseByNameBase.renderNonPrefixSeparatorComponent(UIUtil.getListBackground());
    }

    return jPanel;
}
 
开发者ID:kristianmandrup,项目名称:emberjs-plugin,代码行数:33,代码来源:GotoEmberModel.java


示例13: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
  setBorder(null);
  if (value == null) {
    return;
  }
  append(value.toString(), applyHighlighters(this, row, column, hasFocus, selected));
  SpeedSearchUtil.applySpeedSearchHighlighting(table, this, false, selected);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:VcsLogGraphTable.java


示例14: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
public void customizeCellRenderer(@Nonnull JTree tree,
                                  Object value,
                                  boolean selected,
                                  boolean expanded,
                                  boolean leaf,
                                  int row,
                                  boolean hasFocus) {
  ChangesBrowserNode node = (ChangesBrowserNode)value;
  node.render(this, selected, expanded, hasFocus);
  SpeedSearchUtil.applySpeedSearchHighlighting(tree, this, true, selected);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:ChangesBrowserNodeRenderer.java


示例15: renderTreeNode

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
public void renderTreeNode(SimpleColoredComponent component, JTree tree) {
  SpeedSearchUtil.appendFragmentsForSpeedSearch(tree, getText(), SimpleTextAttributes.REGULAR_ATTRIBUTES, false, component);
  component.setIcon(myParameter.getIcon(0));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ParameterClassMember.java


示例16: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
public void customizeCellRenderer(@NotNull JTree tree,
                                  Object value,
                                  boolean selected,
                                  boolean expanded,
                                  boolean leaf,
                                  int row,
                                  boolean hasFocus) {
  Color foreground = selected ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeForeground();
  Color background = selected ? UIUtil.getTreeSelectionBackground() : null;
  if (value instanceof HierarchyTree.ComponentNode) {
    HierarchyTree.ComponentNode componentNode = (HierarchyTree.ComponentNode)value;
    Component component = componentNode.getComponent();
    Class<?> clazz0 = component.getClass();
    Class<?> clazz = clazz0.isAnonymousClass() ? clazz0.getSuperclass() : clazz0;
    String name = component.getName();

    if (!selected) {
      if (!component.isVisible()) {
        foreground = JBColor.GRAY;
      }
      else if (component.getWidth() == 0 || component.getHeight() == 0) {
        foreground = new Color(128, 10, 0);
      }
      else if (component.getPreferredSize() != null &&
               (component.getSize().width < component.getPreferredSize().width
                || component.getSize().height < component.getPreferredSize().height)) {
        foreground = PlatformColors.BLUE;
      }

      if (myInitialSelection == componentNode.getComponent()) {
        background = new Color(31, 128, 8, 58);
      }
    }
    append(clazz.getSimpleName());
    if (StringUtil.isNotEmpty(name)) {
      append(" \"" + name + "\"");
    }
    append(": " + RectangleRenderer.toString(component.getBounds()), SimpleTextAttributes.GRAYED_ATTRIBUTES);
    if (component.isOpaque()) {
      append(", opaque", SimpleTextAttributes.GRAYED_ATTRIBUTES);
    }
    if (component.isDoubleBuffered()) {
      append(", double-buffered", SimpleTextAttributes.GRAYED_ATTRIBUTES);
    }
    componentNode.setText(toString());
    setIcon(new TwoColorsIcon(11, component.getForeground(), component.getBackground()));
  }

  setForeground(foreground);
  setBackground(background);

  SpeedSearchUtil.applySpeedSearchHighlighting(tree, this, false, selected);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:55,代码来源:UiInspectorAction.java


示例17: renderTreeNode

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
public void renderTreeNode(SimpleColoredComponent component, JTree tree) {
  SpeedSearchUtil.appendFragmentsForSpeedSearch(tree, getText(), getTextAttributes(tree), false, component);
  component.setIcon(myIcon);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:MemberChooserObjectBase.java


示例18: GitRebaseEditor

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
protected GitRebaseEditor(@NotNull Project project, @NotNull VirtualFile gitRoot, @NotNull List<GitRebaseEntry> entries)
  throws IOException {
  super(project, true);
  myProject = project;
  myRoot = gitRoot;
  setTitle(GitBundle.getString("rebase.editor.title"));
  setOKButtonText(GitBundle.getString("rebase.editor.button"));

  myTableModel = new MyTableModel(entries);
  myCommitsTable = new JBTable(myTableModel);
  myCommitsTable.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
  myCommitsTable.setIntercellSpacing(JBUI.emptySize());

  final JComboBox editorComboBox = new ComboBox();
  for (Object option : GitRebaseEntry.Action.values()) {
    editorComboBox.addItem(option);
  }
  TableColumn actionColumn = myCommitsTable.getColumnModel().getColumn(MyTableModel.ACTION_COLUMN);
  actionColumn.setCellEditor(new DefaultCellEditor(editorComboBox));
  actionColumn.setCellRenderer(ComboBoxTableCellRenderer.INSTANCE);

  myCommitsTable.setDefaultRenderer(String.class, new ColoredTableCellRenderer() {
    @Override
    protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
      if (value != null) {
        append(value.toString());
        SpeedSearchUtil.applySpeedSearchHighlighting(myCommitsTable, this, true, selected);
      }
    }
  });

  myTableModel.addTableModelListener(new TableModelListener() {
    public void tableChanged(final TableModelEvent e) {
      validateFields();
    }
  });

  installSpeedSearch();
  myCopyProvider = new MyCopyProvider();

  adjustColumnWidth(0);
  adjustColumnWidth(1);
  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:45,代码来源:GitRebaseEditor.java


示例19: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
@Override
protected void customizeCellRenderer(final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) {
  // Fix GTK background
  if (UIUtil.isUnderGTKLookAndFeel()){
    final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground();
    UIUtil.changeBackGround(this, background);
  }
  Color color = UIUtil.getListForeground();
  SimpleTextAttributes attributes = null;
  String locationString = null;

  setBorder(BorderFactory.createEmptyBorder(1, 0, 1, 0)); // for separator, see below

  if (value instanceof NodeDescriptor) {
    final NodeDescriptor descriptor = (NodeDescriptor)value;
    setIcon(descriptor.getIcon());
    final Color elementColor = descriptor.getColor();

    if (elementColor != null) {
      color = elementColor;
    }

    if (descriptor instanceof AbstractTreeNode) {
      final AbstractTreeNode treeNode = (AbstractTreeNode)descriptor;
      final TextAttributesKey attributesKey = treeNode.getAttributesKey();

      if (attributesKey != null) {
        final TextAttributes textAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(attributesKey);

        if (textAttributes != null) attributes =  SimpleTextAttributes.fromTextAttributes(textAttributes);
      }
      locationString = treeNode.getLocationString();

      final PresentationData presentation = treeNode.getPresentation();
      if (presentation.hasSeparatorAbove() && !selected) {
        setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, GroupedElementsRenderer.POPUP_SEPARATOR_FOREGROUND),
                                                     BorderFactory.createEmptyBorder(0, 0, 1, 0)));
      }
    }
  }

  if(attributes == null) attributes = new SimpleTextAttributes(Font.PLAIN, color);
  final String text = value.toString();

  if (myCommanderPanel.isEnableSearchHighlighting()) {
    JList list1 = myCommanderPanel.getList();
    if (list1 != null) {
      SpeedSearchUtil.appendFragmentsForSpeedSearch(list1, text, attributes, selected, this);
    }
  }
  else {
    append(text != null ? text : "", attributes);
  }

  if (locationString != null && locationString.length() > 0) {
    append(" (" + locationString + ")", SimpleTextAttributes.GRAY_ATTRIBUTES);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:59,代码来源:ColoredCommanderRenderer.java


示例20: appendText

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入依赖的package包/类
private void appendText(@Nonnull GraphCommitCell cell, @Nonnull SimpleTextAttributes style, boolean isSelected) {
  myIssueLinkRenderer.appendTextWithLinks(StringUtil.replace(cell.getText(), "\t", " ").trim(), style);
  SpeedSearchUtil.applySpeedSearchHighlighting(myGraphTable, this, false, isSelected);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:GraphCommitCellRenderer.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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