Java 类com.intellij.util.ui.RangeBlinker 实例源码

项目:intellij-ce-playground    文件:SearchForUsagesRunnable.java   
private static void flashUsageScriptaculously(@NotNull final Usage usage) {
  if (!(usage instanceof UsageInfo2UsageAdapter)) {
    return;
  }
  UsageInfo2UsageAdapter usageInfo = (UsageInfo2UsageAdapter)usage;

  Editor editor = usageInfo.openTextEditor(true);
  if (editor == null) return;
  TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.BLINKING_HIGHLIGHTS_ATTRIBUTES);

  RangeBlinker rangeBlinker = new RangeBlinker(editor, attributes, 6);
  List<Segment> segments = new ArrayList<Segment>();
  CommonProcessors.CollectProcessor<Segment> processor = new CommonProcessors.CollectProcessor<Segment>(segments);
  usageInfo.processRangeMarkers(processor);
  rangeBlinker.resetMarkers(segments);
  rangeBlinker.startBlinking();
}
项目:tools-idea    文件:UsageViewManagerImpl.java   
private static void flashUsageScriptaculously(@NotNull final Usage usage) {
  if (!(usage instanceof UsageInfo2UsageAdapter)) {
    return;
  }
  UsageInfo2UsageAdapter usageInfo = (UsageInfo2UsageAdapter)usage;

  Editor editor = usageInfo.openTextEditor(true);
  if (editor == null) return;
  TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.BLINKING_HIGHLIGHTS_ATTRIBUTES);

  RangeBlinker rangeBlinker = new RangeBlinker(editor, attributes, 6);
  List<Segment> segments = new ArrayList<Segment>();
  CommonProcessors.CollectProcessor<Segment> processor = new CommonProcessors.CollectProcessor<Segment>(segments);
  usageInfo.processRangeMarkers(processor);
  rangeBlinker.resetMarkers(segments);
  rangeBlinker.startBlinking();
}
项目:consulo    文件:SearchForUsagesRunnable.java   
private static void flashUsageScriptaculously(@Nonnull final Usage usage) {
  if (!(usage instanceof UsageInfo2UsageAdapter)) {
    return;
  }
  UsageInfo2UsageAdapter usageInfo = (UsageInfo2UsageAdapter)usage;

  Editor editor = usageInfo.openTextEditor(true);
  if (editor == null) return;
  TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.BLINKING_HIGHLIGHTS_ATTRIBUTES);

  RangeBlinker rangeBlinker = new RangeBlinker(editor, attributes, 6);
  List<Segment> segments = new ArrayList<>();
  Processor<Segment> processor = Processors.cancelableCollectProcessor(segments);
  usageInfo.processRangeMarkers(processor);
  rangeBlinker.resetMarkers(segments);
  rangeBlinker.startBlinking();
}
项目:intellij-ce-playground    文件:ActionUsagePanel.java   
public ActionUsagePanel() {
  myEditor = (EditorEx)createEditor("", 10, 3, -1);
  setLayout(new BorderLayout());
  add(myEditor.getComponent(), BorderLayout.CENTER);
  TextAttributes blinkAttributes =
    EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.BLINKING_HIGHLIGHTS_ATTRIBUTES);
  myRangeBlinker = new RangeBlinker(myEditor, blinkAttributes, Integer.MAX_VALUE);
}
项目:tools-idea    文件:IntentionUsagePanel.java   
public IntentionUsagePanel() {
  myEditor = (EditorEx)createEditor("", 10, 3, -1);
  setLayout(new BorderLayout());
  add(myEditor.getComponent(), BorderLayout.CENTER);
  TextAttributes blinkAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.BLINKING_HIGHLIGHTS_ATTRIBUTES);
  myRangeBlinker = new RangeBlinker(myEditor, blinkAttributes, Integer.MAX_VALUE);
}
项目:consulo    文件:IntentionUsagePanel.java   
public IntentionUsagePanel() {
  myEditor = (EditorEx)createEditor("", 10, 3, -1);
  setLayout(new BorderLayout());
  add(myEditor.getComponent(), BorderLayout.CENTER);
  TextAttributes blinkAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.BLINKING_HIGHLIGHTS_ATTRIBUTES);
  myRangeBlinker = new RangeBlinker(myEditor, blinkAttributes, Integer.MAX_VALUE);
}
项目:consulo    文件:ActionUsagePanel.java   
public ActionUsagePanel() {
  myEditor = (EditorEx)createEditor("", 10, 3, -1);
  setLayout(new BorderLayout());
  add(myEditor.getComponent(), BorderLayout.CENTER);
  TextAttributes blinkAttributes =
          EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.BLINKING_HIGHLIGHTS_ATTRIBUTES);
  myRangeBlinker = new RangeBlinker(myEditor, blinkAttributes, Integer.MAX_VALUE);
}