Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.TextSelectionNavigationLocation



  public void run(IAction action) {
    IDocumentProvider dp = editor.getDocumentProvider();
    IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
    TextSelectionNavigationLocation navloc = (TextSelectionNavigationLocation) editor.createNavigationLocation();
    TextSelection selection=(TextSelection) editor.getSelectionProvider().getSelection();
    int line=selection.getStartLine();
    try {
      String text=document.get(document.getLineOffset(line),document.getLineLength(line));
      org.jbehave.plugin.eclipse.model.StoryLine storyLine = StoryLine.parseLine(text);
View Full Code Here


  public INavigationLocation createEmptyNavigationLocation() {
    if (getActivePage() == fDesignPageIndex) {
      return new DesignPageNavigationLocation(this, fDesignViewer, false);
    }
    // Makes sure that the text editor is returned
    return new TextSelectionNavigationLocation(fTextEditor, false) {
      protected IEditorPart getEditorPart() {
        IEditorPart part = super.getEditorPart();
        if (part != null) {
          part = (ITextEditor) part.getAdapter(ITextEditor.class);
        }
View Full Code Here

  public INavigationLocation createNavigationLocation() {
    if (getActivePage() == fDesignPageIndex) {
      return new DesignPageNavigationLocation(this, fDesignViewer, true);
    }
    // Makes sure that the text editor is returned
    return new TextSelectionNavigationLocation(fTextEditor, true) {
      protected IEditorPart getEditorPart() {
        IEditorPart part = super.getEditorPart();
        if (part != null) {
          part = (ITextEditor) part.getAdapter(ITextEditor.class);
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.texteditor.TextSelectionNavigationLocation

Copyright © 2018 www.massapicom. 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.