Examples of selectLineAtCaret()


Examples of com.intellij.openapi.editor.SelectionModel.selectLineAtCaret()

        long offset = caretModel.getOffset();

        final SelectionModel selectionModel = editor.getSelectionModel();
        boolean hasSelection = selectionModel.hasSelection();
        if (hasSelection == false) {
          selectionModel.selectLineAtCaret();
        }
        final String selectedText = selectionModel.getSelectedText();

        if (selectedText != null) {
          String[] textParts = StringUtil.splitPreserveAllTokens(selectedText,
View Full Code Here

Examples of com.intellij.openapi.editor.SelectionModel.selectLineAtCaret()

          final SelectionModel selectionModel = editor.getSelectionModel();
          String selectedText = selectionModel.getSelectedText();

          boolean allLinSelected = false;
          if (selectedText == null) {
            selectionModel.selectLineAtCaret();
            selectedText = selectionModel.getSelectedText();
            allLinSelected = true;

            if (selectedText == null) {
              return;
View Full Code Here

Examples of com.intellij.openapi.editor.SelectionModel.selectLineAtCaret()

        long offset = caretModel.getOffset();

        final SelectionModel selectionModel = editor.getSelectionModel();
        boolean hasSelection = selectionModel.hasSelection();
        if (hasSelection == false) {
                    selectionModel.selectLineAtCaret();
                }
                final String selectedText = selectionModel.getSelectedText();

                if (selectedText != null) {
                    String[] textParts = StringUtil
View Full Code Here

Examples of com.intellij.openapi.editor.SelectionModel.selectLineAtCaret()

  }

  @Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) {
    final SelectionModel selectionModel = editor.getSelectionModel();
    if (!selectionModel.hasSelection()) selectionModel.selectLineAtCaret();

    final PsiElement[] elements =
      DartRefactoringUtil.findStatementsInRange(file, selectionModel.getSelectionStart(), selectionModel.getSelectionEnd());

    if (elements.length == 0 || (elements.length == 1 && elements[0] instanceof DartExpression)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.