Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.AbstractTextEditor$InformationDispatchAction


    List<String> testCases = new ArrayList<String>();
    try {
      String projectName = "";
      List<IFile> files = new ArrayList<IFile>();
      if (editor instanceof AbstractTextEditor) {
        AbstractTextEditor textEditor = (AbstractTextEditor) editor;
        // org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditor
        // If we can find some particular tests selected in the file
        if (textEditor.getSelectionProvider().getSelection() instanceof ITextSelection) {
          int startLine = updateTestCasesFromSelection(testCases, textEditor);
          if (testCases.isEmpty()) {
            updateTestCasesFromCurrentLine(testCases, textEditor, startLine);
          }
        }
View Full Code Here


                    IWorkbenchWindow window = PlatformUI.getWorkbench()
                        .getWorkbenchWindows()[0];
                    IEditorPart editor = IDE.openEditor(window.getActivePage(),
                                                        file, true);
                    if (editor instanceof AbstractTextEditor) {
                        AbstractTextEditor te = (AbstractTextEditor)editor;
                        IDocument document = te.getDocumentProvider()
                            .getDocument(te.getEditorInput());
                        try {
                            int start = document.getLineOffset(_line - 1);
                            te.selectAndReveal(start, 0);
                            te.getSite().getPage().activate(te);
                        }
                        catch (BadLocationException ble) {

                        }
                    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.texteditor.AbstractTextEditor$InformationDispatchAction

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.