Examples of selectAndReveal()


Examples of org.eclipse.ui.texteditor.ITextEditor.selectAndReveal()

        }
        ITextEditor textEditor = (ITextEditor) editor;

        int offset = calculateOffset(textEditor, userPosition);

        textEditor.selectAndReveal(offset, 0);
      }

      private int calculateOffset(ITextEditor editor, SourcePosition userPosition) {
        IDocumentProvider provider = editor.getDocumentProvider();
        IDocument document = provider.getDocument(editor.getEditorInput());
View Full Code Here

Examples of org.eclipse.ui.texteditor.ITextEditor.selectAndReveal()

          IEditorInput input = part.getEditorInput();
          provider.connect(input);
          IDocument document = provider.getDocument(input);
          try {
            IRegion line = document.getLineInformation(lineNumber);
            textEditor.selectAndReveal(line.getOffset(), line.getLength());
          } catch (BadLocationException e) {

          }
          provider.disconnect(input);
        }
View Full Code Here

Examples of org.eclipse.ui.texteditor.ITextEditor.selectAndReveal()

                    document);
                try {
                  IRegion region = finder.find(0,
                      markerToFind, true, true, true,
                      false);
                  editorTextual.selectAndReveal(
                      region.getOffset(),
                      region.getLength());
                } catch (BadLocationException e) {
                  e.printStackTrace();
                }
View Full Code Here

Examples of org.eclipse.ui.texteditor.ITextEditor.selectAndReveal()

                    document);
                try {
                  IRegion region = finder.find(0,
                      markerToFind, true, true, true,
                      false);
                  editorTextual.selectAndReveal(
                      region.getOffset(),
                      region.getLength());
                } catch (BadLocationException e) {
                  e.printStackTrace();
                }
View Full Code Here

Examples of org.eclipse.wst.sse.ui.StructuredTextEditor.selectAndReveal()

      IDocument document = textEditor.getDocumentProvider().getDocument(
          textEditor.getEditorInput());
      document.set(compiledTemplate.string);
      documentProvider.saveDocument(null, textEditor.getEditorInput(),
          document, true);
      textEditor.selectAndReveal(compiledTemplate.offset, 0);

      // set document dirty
      document.replace(0, 0, ""); //$NON-NLS-1$
    } catch (PartInitException e) {
      Logger.logException(e);
View Full Code Here

Examples of org.epic.perleditor.editors.PerlEditor.selectAndReveal()

            PerlEditor editor = (PerlEditor) IDE.openEditor(
                activeWorkbenchPage(), getEditorInput().getFile(), true, true);
           
            IDocument doc = editor.getViewer().getDocument();
            IRegion line = doc.getLineInformation(lineNumber);
            editor.selectAndReveal(line.getOffset(), line.getLength());
        }
        catch (BadLocationException e)
        {
            PerlDebugPlugin.log(e);
        }
View Full Code Here

Examples of org.erlide.ui.editors.erl.AbstractErlangEditor.selectAndReveal()

            final IErlModule module = ese.getModule();
            final IEditorPart editor = EditorUtility.openInEditor(module);
            if (offset != 0) {
                if (editor instanceof ErlangEditor) {
                    final AbstractErlangEditor ee = (AbstractErlangEditor) editor;
                    ee.selectAndReveal(offset, length);
                } else if (editor != null) {
                    showWithMarker(editor, module, offset, length);
                }
            }
        }
View Full Code Here

Examples of org.erlide.ui.editors.erl.AbstractErlangEditor.selectAndReveal()

     */
    protected void selectAndReveal(final int newOffset, final int newLength,
            final ITextEditor editor) {
        if (editor instanceof ErlangEditor) {
            final AbstractErlangEditor erlEditor = (AbstractErlangEditor) editor;
            erlEditor.selectAndReveal(newOffset, newLength);
        } else {
            // this is too intrusive, but will never get called anyway
            editor.selectAndReveal(newOffset, newLength);
        }

View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.editor.WodEditor.selectAndReveal()

          String wodElementStr = wodElementWriter.toString();

          weDoc.replace(offset, 0, wodElementStr);

          if (-1 != firstBindingValueOffset) {
            we.selectAndReveal(offset + firstBindingValueOffset, 0);
          } else {
            we.selectAndReveal(offset, wodElementStr.length());
          }
        }
      } catch (Exception e) {
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.editor.WodEditor.selectAndReveal()

          weDoc.replace(offset, 0, wodElementStr);

          if (-1 != firstBindingValueOffset) {
            we.selectAndReveal(offset + firstBindingValueOffset, 0);
          } else {
            we.selectAndReveal(offset, wodElementStr.length());
          }
        }
      } catch (Exception e) {
        e.printStackTrace();
        ComponenteditorPlugin.getDefault().log(e);
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.