Package org.eclipse.jface.text.hyperlink

Examples of org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter


    textViewer = new TextViewer(parent, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
    textViewer.getControl().setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
    textViewer.getControl().setBackground(NOTE_COLOR);
    textViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
    textViewer.setDocument(new Document());
    textViewer.setHyperlinkPresenter(new DefaultHyperlinkPresenter(new RGB(0, 0, 255)));
    textViewer.setHyperlinkDetectors(new IHyperlinkDetector[] { new URLHyperlinkDetector() }, SWT.MOD1);
    textViewer.setUndoManager(new TextViewerUndoManager(100));
    textViewer.setTextDoubleClickStrategy(new DefaultTextDoubleClickStrategy(), IDocument.DEFAULT_CONTENT_TYPE);
    textViewer.getDocument().addDocumentListener(new IDocumentListener() {
      public void documentAboutToBeChanged(DocumentEvent event) {
View Full Code Here


   */
  public IHyperlinkPresenter getHyperlinkPresenter(ISourceViewer sourceViewer) {
    if (fPreferenceStore == null)
      return super.getHyperlinkPresenter(sourceViewer);

    return new DefaultHyperlinkPresenter(fPreferenceStore);
  }
View Full Code Here

   * @param sourceViewer the source viewer to be configured by this configuration
   * @return the hyperlink presenter or <code>null</code> if no hyperlink support should be installed
   * @since 3.1
   */
  public IHyperlinkPresenter getHyperlinkPresenter(ISourceViewer sourceViewer) {
    return new DefaultHyperlinkPresenter(new RGB(0, 0, 255));
  }
View Full Code Here

   * @param sourceViewer the source viewer to be configured by this configuration
   * @return the hyperlink presenter or <code>null</code> if no hyperlink support should be installed
   * @since 3.1
   */
  public IHyperlinkPresenter getHyperlinkPresenter(ISourceViewer sourceViewer) {
    return new DefaultHyperlinkPresenter(new RGB(0, 0, 255));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter

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.