Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.TextViewer$ShiftPositionUpdater


    long start = System.nanoTime();

    QWickieHtmlProposalComputer proposal = new QWickieHtmlProposalComputer();
    proposal.sessionStarted();

    ITextViewer viewer = new TextViewer(new Shell(), 0);
    viewer.setDocument(htmlDocument);
    try {
      IDE.openEditor(activePage, htmlFile);
    } catch (PartInitException e) {
    }
View Full Code Here


    try {
      IDE.openEditor(activePage, javaFile);
    } catch (PartInitException e) {
    }
    hover.setEditor(activePage.getActiveEditor());
    TextViewer viewer = new TextViewer(new Shell(), 0);
    viewer.setDocument(javaDocument);
    assertEquals("<b>Line in HomePage.html</b><br>&lt;div wicket:id=<b>\"message\"</b>>&lt;/div>", hover.getHoverInfo(viewer, new Region(421, 0)));

    activePage.closeAllEditors(false);

    System.out.println("testHoverInfo:\t\t\t" + (System.nanoTime() - start));
View Full Code Here

    ContentAssistInvocationContext context = new ContentAssistInvocationContext(javaDocument, 0);
    IProgressMonitor monitor = new NullProgressMonitor();
    assertEquals(proposal.computeCompletionProposals(context, monitor).size(), 0);

    final ICompilationUnit cu = JavaCore.createCompilationUnitFrom(javaFile);
    ITextViewer viewer = new TextViewer(new Shell(), 0);
    int offset = 420;
    context = new JavaContentAssistInvocationContext(viewer, offset, new CompilationUnitEditor()) {
      @SuppressWarnings("restriction")
      @Override
      public IType getExpectedType() {
View Full Code Here

   * @param location
   * @param caret
   */
  public void updateCaret(StructuredTextEditor textEditor, Point location,
      Point caret) {
    TextViewer textViewer = textEditor.getTextViewer();
    if (textViewer != null) {
      Point pt = toControl(textViewer, location);
      StyledText st = textViewer.getTextWidget();

      // auto scroll
      Rectangle ca = st.getClientArea();
      int margin = st.getLineHeight();

View Full Code Here

  /**
   * @param textEditor
   * @param location
   */
  public void updateCaret(StructuredTextEditor textEditor, Point location) {
    TextViewer textViewer = textEditor.getTextViewer();
    if (textViewer != null) {
      Point pt = toControl(textViewer, location);
      StyledText st = textViewer.getTextWidget();

      // auto scroll
      Rectangle ca = st.getClientArea();
      int margin = st.getLineHeight();

View Full Code Here

        SWT.BOLD);
   
    statusLine.setFont(font);
   
    scriptTextViewer =
      new TextViewer(parent, SWT.MULTI | SWT.V_SCROLL);
    scriptTextWidget = scriptTextViewer.getTextWidget();
    scriptTextWidget.setDoubleClickEnabled(true);
    scriptTextWidget.setFont(JFaceResources.getTextFont());
    scriptTextWidget.setEditable(true);
    scriptTextWidget.setTabs(4);
View Full Code Here

   */
  public void createPartControl(Composite parent) {
    sashForm = new SashForm(parent, SWT.VERTICAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
    this.createTable(sashForm);
    textViewer = new TextViewer(sashForm, SWT.H_SCROLL | SWT.V_SCROLL
        | SWT.MULTI | SWT.BORDER | SWT.READ_ONLY);
    sashForm.setWeights(new int[]{70, 30});
    viewer.setContentProvider(new IStructuredContentProvider() {
      List entries = null;
      public Object[] getElements(Object inputElement) {
View Full Code Here

     */
    public void createControl(Composite parent) {
    sashForm = new SashForm(parent, SWT.VERTICAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
    this.createTable(sashForm);
    textViewer = new TextViewer(sashForm, SWT.H_SCROLL | SWT.V_SCROLL
        | SWT.MULTI | SWT.BORDER | SWT.READ_ONLY);
    sashForm.setWeights(new int[]{70, 30});       
    }
View Full Code Here

        SWT.BOLD);
   
    statusLine.setFont(font);
   
    scriptTextViewer =
      new TextViewer(parent, SWT.MULTI | SWT.V_SCROLL);
    scriptTextWidget = scriptTextViewer.getTextWidget();
    scriptTextWidget.setDoubleClickEnabled(true);
    scriptTextWidget.setFont(JFaceResources.getTextFont());
    scriptTextWidget.setEditable(true);
    scriptTextWidget.setTabs(4);
View Full Code Here

    // TODO : shall i inheritance from FieldEditor for
    // TextView so the PreferenceStore can be handled easily ?
    Label label = new Label(composite, SWT.NONE);
    label.setText("Preview:");

    textViewer = new TextViewer(composite, SWT.MULTI
        | SWT.V_SCROLL | SWT.BORDER | SWT.READ_ONLY);
    previewCode = getPreferenceStore().getString(
        PreferenceConstants.PREVIEW_SOURCE);
    previewdocument = new Document(previewCode);
    GridData gd = new GridData();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.TextViewer$ShiftPositionUpdater

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.