Java 类com.intellij.openapi.editor.event.SelectionEvent 实例源码

项目:intellij-ce-playground    文件:XVariablesViewBase.java   
@Override
public void selectionChanged(final SelectionEvent e) {
  if (!Registry.is("debugger.valueTooltipAutoShowOnSelection") || myEditor.getCaretModel().getCaretCount() > 1) {
    return;
  }
  final String text = myEditor.getDocument().getText(e.getNewRange());
  if (!StringUtil.isEmpty(text) && !(text.contains("exec(") || text.contains("++") || text.contains("--") || text.contains("="))) {
    final XDebugSession session = getSession(getTree());
    if (session == null) return;
    XDebuggerEvaluator evaluator = myStackFrame.getEvaluator();
    if (evaluator == null) return;
    TextRange range = e.getNewRange();
    ExpressionInfo info = new ExpressionInfo(range);
    int offset = range.getStartOffset();
    LogicalPosition pos = myEditor.offsetToLogicalPosition(offset);
    Point point = myEditor.logicalPositionToXY(pos);
    new XValueHint(myProject, myEditor, point, ValueHintType.MOUSE_OVER_HINT, info, evaluator, session).invokeHint();
  }
}
项目:tools-idea    文件:SelectionModelImpl.java   
@Override
public void removeBlockSelection() {
  myUnknownDirection = false;
  if (hasBlockSelection()) {
    myEditor.repaint(0, myEditor.getDocument().getTextLength());

    final int[] oldStarts = getBlockSelectionStarts();
    final int[] oldEnds = getBlockSelectionEnds();

    myBlockStart = null;
    myBlockEnd = null;

    final int[] newStarts = getBlockSelectionStarts();
    final int[] newEnds = getBlockSelectionEnds();

    broadcastSelectionEvent(new SelectionEvent(myEditor, oldStarts, oldEnds, newStarts, newEnds));
  }
}
项目:consulo    文件:XVariablesViewBase.java   
@Override
public void selectionChanged(final SelectionEvent e) {
  if (!XDebuggerSettingsManager.getInstance().getDataViewSettings().isValueTooltipAutoShowOnSelection() || myEditor.getCaretModel().getCaretCount() > 1) {
    return;
  }
  final String text = myEditor.getDocument().getText(e.getNewRange());
  if (!StringUtil.isEmpty(text) && !(text.contains("exec(") || text.contains("++") || text.contains("--") || text.contains("="))) {
    final XDebugSession session = getSession(getTree());
    if (session == null) return;
    XDebuggerEvaluator evaluator = myStackFrame.getEvaluator();
    if (evaluator == null) return;
    TextRange range = e.getNewRange();
    ExpressionInfo info = new ExpressionInfo(range);
    int offset = range.getStartOffset();
    LogicalPosition pos = myEditor.offsetToLogicalPosition(offset);
    Point point = myEditor.logicalPositionToXY(pos);
    new XValueHint(myProject, myEditor, point, ValueHintType.MOUSE_OVER_HINT, info, evaluator, session).invokeHint();
  }
}
项目:intellij-ce-playground    文件:SelectionModelImpl.java   
void fireSelectionChanged(int oldSelectionStart, int oldSelectionEnd, int startOffset, int endOffset) {
  repaintBySelectionChange(oldSelectionStart, startOffset, oldSelectionEnd, endOffset);

  SelectionEvent event = new SelectionEvent(myEditor,
                                            oldSelectionStart, oldSelectionEnd,
                                            startOffset, endOffset);

  broadcastSelectionEvent(event);
}
项目:intellij-ce-playground    文件:SelectionModelImpl.java   
private void broadcastSelectionEvent(SelectionEvent event) {
  for (SelectionListener listener : mySelectionListeners) {
    try {
      listener.selectionChanged(event);
    }
    catch (Exception e) {
      LOG.error(e);
    }
  }
}
项目:tools-idea    文件:SelectionModelImpl.java   
private void fireSelectionChanged(int oldSelectionStart, int oldSelectionEnd, int startOffset, int endOffset) {
  repaintBySelectionChange(oldSelectionStart, startOffset, oldSelectionEnd, endOffset);

  SelectionEvent event = new SelectionEvent(myEditor,
                                            oldSelectionStart, oldSelectionEnd,
                                            startOffset, endOffset);

  broadcastSelectionEvent(event);
}
项目:tools-idea    文件:SelectionModelImpl.java   
private void broadcastSelectionEvent(SelectionEvent event) {
  for (SelectionListener listener : mySelectionListeners) {
    try {
      listener.selectionChanged(event);
    }
    catch (Exception e) {
      LOG.error(e);
    }
  }
}
项目:consulo    文件:SelectionModelImpl.java   
void fireSelectionChanged(int oldSelectionStart, int oldSelectionEnd, int startOffset, int endOffset) {
  repaintBySelectionChange(oldSelectionStart, startOffset, oldSelectionEnd, endOffset);

  SelectionEvent event = new SelectionEvent(myEditor,
                                            oldSelectionStart, oldSelectionEnd,
                                            startOffset, endOffset);

  broadcastSelectionEvent(event);
}
项目:consulo    文件:SelectionModelImpl.java   
private void broadcastSelectionEvent(SelectionEvent event) {
  for (SelectionListener listener : mySelectionListeners) {
    try {
      listener.selectionChanged(event);
    }
    catch (Exception e) {
      LOG.error(e);
    }
  }
}
项目:intellij-ce-playground    文件:EditorSearchSession.java   
@Override
public void selectionChanged(SelectionEvent e) {
  updateResults(false);
}
项目:intellij-ce-playground    文件:LivePreviewController.java   
@Override
public void selectionChanged(SelectionEvent e) {
  smartUpdate();
}
项目:tools-idea    文件:EditorSearchComponent.java   
@Override
public void selectionChanged(SelectionEvent e) {
  updateResults(false);
}
项目:tools-idea    文件:LivePreviewController.java   
@Override
public void selectionChanged(SelectionEvent e) {
  smartUpdate();
}
项目:consulo    文件:EditorSearchSession.java   
@Override
public void selectionChanged(SelectionEvent e) {
  updateResults(false);
}
项目:consulo    文件:LivePreviewController.java   
@Override
public void selectionChanged(SelectionEvent e) {
  smartUpdate();
}