Exemplo n.º 1
0
 public void execute(jetbrains.mps.openapi.editor.EditorContext context) {
   EditorCell selection = getDeepestSelectedCell(context);
   EditorCell target = findTarget(selection);
   ((EditorComponent) context.getEditorComponent()).changeSelection(target);
   if (target instanceof EditorCell_Label) {
     EditorCell_Label label = (EditorCell_Label) target;
     label.end();
   }
 }
Exemplo n.º 2
0
 public void execute(jetbrains.mps.openapi.editor.EditorContext context) {
   EditorComponent editorComponent = ((EditorComponent) context.getEditorComponent());
   EditorCell target = findTarget(editorComponent);
   if (target instanceof EditorCell_Label) {
     EditorCell_Label label = (EditorCell_Label) target;
     label.end();
     editorComponent.resetLastCaretX();
   }
   editorComponent.changeSelection(target);
 }
Exemplo n.º 3
0
 public void execute(jetbrains.mps.openapi.editor.EditorContext context) {
   EditorCell selection = getDeepestSelectedCell(context);
   EditorCell target = findTarget(selection);
   ((EditorComponent) context.getEditorComponent()).changeSelection(target);
   if (target.isPunctuationLayout() && ((EditorCell_Label) target).isCaretPositionAllowed(1)) {
     ((EditorCell_Label) target).setCaretPosition(1);
   } else if (target instanceof EditorCell_Label) {
     EditorCell_Label label = (EditorCell_Label) target;
     label.home();
   }
 }
Exemplo n.º 4
0
 public void execute(jetbrains.mps.openapi.editor.EditorContext context) {
   SelectionManager selectionManager =
       ((EditorComponent) context.getEditorComponent()).getSelectionManager();
   EditorCell cell = findTarget(selectionManager);
   selectionManager.pushSelection(selectionManager.createSelection(cell));
   if (cell instanceof EditorCell_Label) {
     ((EditorCell_Label) cell).selectWordOrAll();
   }
 }
Exemplo n.º 5
0
 public void execute(jetbrains.mps.openapi.editor.EditorContext context) {
   SelectionManager selectionManager =
       ((EditorComponent) context.getEditorComponent()).getSelectionManager();
   EditorCell cell = findTarget(selectionManager);
   selectionManager.setSelection(cell);
   if (cell.isPunctuationLayout()
       && (cell instanceof EditorCell_Label)
       && ((EditorCell_Label) cell).isCaretPositionAllowed(1)) {
     ((EditorCell_Label) cell).setCaretPosition(1);
   } else {
     cell.home();
   }
 }