Examples of doOperation()


Examples of at.bestsolution.efxclipse.text.jface.source.SourceViewer.doOperation()

      @Override
      public void handle(KeyEvent event) {
        if( event.isControlDown() && event.getCode() == KeyCode.SPACE ) {
          System.err.println("==============> EXEC");
          viewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
        }
      }
    });
    primaryStage.setScene(s);
    primaryStage.setWidth(300);
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer.doOperation()

                  final ISourceReference reference = (ISourceReference) element;
                  final ISourceRange range = reference.getSourceRange();

                  if (range != null) {
                    viewer.setSelectedRange(range.getOffset(), range.getLength());
                    viewer.doOperation(ISourceViewer.FORMAT);
                  }
                }
              }
            } catch (ModelException exception) {
              // Should not happen
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer.doOperation()

            } catch (ModelException exception) {
              // Should not happen
            }
          } else {
            viewer.setSelectedRange(selection.x, 1);
            viewer.doOperation(ISourceViewer.FORMAT);
          }
        } catch (BadLocationException exception) {
          // Can not happen
        } finally {
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer.doOperation()

                  final ISourceReference reference = (ISourceReference) element;
                  final ISourceRange range = reference.getSourceRange();

                  if (range != null) {
                    viewer.setSelectedRange(range.getOffset(), range.getLength());
                    viewer.doOperation(ISourceViewer.FORMAT);
                  }
                }
              }
            } catch (ModelException exception) {
              // Should not happen
View Full Code Here

Examples of org.eclipse.jface.text.ITextOperationTarget.doOperation()

      ITextOperationTarget operation = (ITextOperationTarget) fTextEditor.getAdapter(ITextOperationTarget.class);
      final int opCode = ISourceViewer.QUICK_ASSIST;
      if (operation != null && operation.canDoOperation(opCode)) {
        fTextEditor.selectAndReveal(fPosition.getOffset(), fPosition.getLength());
        operation.doOperation(opCode);
      }
      return;
    }

    super.run();
View Full Code Here

Examples of org.eclipse.jface.text.ITextOperationTarget.doOperation()

      ITextOperationTarget operation = (ITextOperationTarget) fTextEditor
              .getAdapter(ITextOperationTarget.class);
      final int opCode = ISourceViewer.QUICK_ASSIST;
      if (operation != null && operation.canDoOperation(opCode)) {
        fTextEditor.selectAndReveal(fPosition.getOffset(), fPosition.getLength());
        operation.doOperation(opCode);
      }
      return;
    }

    super.run();
View Full Code Here

Examples of org.eclipse.jface.text.ITextOperationTarget.doOperation()

  private void triggerContextInfo() {
    ITextOperationTarget target= fCurrentTarget.getViewer().getTextOperationTarget();
    if (target != null) {
      if (target.canDoOperation(ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION))
        target.doOperation(ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
    }
  }

  /** Trigger content assist on choice positions */
  private void triggerContentAssist() {
View Full Code Here

Examples of org.eclipse.jface.text.ITextOperationTarget.doOperation()

    IEditorPart editor = HandlerUtil.getActiveEditor(event);

    ITextOperationTarget operationTarget = (ITextOperationTarget) editor
        .getAdapter(ITextOperationTarget.class);

    operationTarget.doOperation(ISourceViewer.FORMAT);

    return null;
  }

}
View Full Code Here

Examples of org.eclipse.jface.text.ITextOperationTarget.doOperation()

 
  public static void invokeContentAssist(ScriptEditor editor, int offset) {
    editor.getViewer().setSelectedRange(offset, 0);
    ITextOperationTarget target= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
    if (target != null && target.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS)) {
      target.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
    }
  }
 
  public static ContentAssistant getContentAssistant(ScriptEditor scriptEditor) {
    // Need to do this because AdaptedSourceViewer is not extendable
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer.doOperation()

        }
    }

    public void format() {
        final SourceViewer viewer = (SourceViewer) getSourceViewer();
        viewer.doOperation(ISourceViewer.FORMAT);
    }
}
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.