Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » MarkupViewer and HyperlinkDetector
MarkupViewer and HyperlinkDetector [message #62739] Thu, 04 December 2008 03:46 Go to next message
yaumunlam  is currently offline yaumunlam
Messages: 33
Registered: July 2009
Member
Hi,

how to create a HyperlinkDetector for MarkupViewer?

Thanks!

Yau.
Re: MarkupViewer and HyperlinkDetector [message #62785 is a reply to message #62739] Thu, 04 December 2008 14:51 Go to previous message
David Green is currently offline David Green
Messages: 135
Registered: July 2009
Senior Member
Yau wrote:
> how to create a HyperlinkDetector for MarkupViewer?

If you get the latest WikiText build either from the Mylyn weekly
incubator update site or from CVS you'll find the WikiText Developer
Guide (in Eclipse it's under the Help table of contents, nested within
the Mylyn top-level heading). The guide gives detail about this and
other development questions. To quote the documentation:

MarkupViewer viewer = new MarkupViewer(parent, null, SWT.MULTI |
SWT.WRAP | SWT.V_SCROLL);
viewer.setMarkupLanguage(markupLanguage);

MarkupViewerConfiguration configuration = new
MarkupViewerConfiguration(viewer);
viewer.configure(configuration);
viewer.getTextWidget().setEditable(false);
viewer.setMarkup(markup);


The MarkupViewerConfiguration properly configures the hyperlink detector.

You can also take a look at the class
org.eclipse.mylyn.wikitext.tests.AbstractTestApplication which is in the
org.eclipse.mylyn.wikitext.tests project in CVS
Re: MarkupViewer and HyperlinkDetector [message #595232 is a reply to message #62739] Thu, 04 December 2008 14:51 Go to previous message
David Green is currently offline David Green
Messages: 96
Registered: July 2009
Member
Yau wrote:
> how to create a HyperlinkDetector for MarkupViewer?

If you get the latest WikiText build either from the Mylyn weekly
incubator update site or from CVS you'll find the WikiText Developer
Guide (in Eclipse it's under the Help table of contents, nested within
the Mylyn top-level heading). The guide gives detail about this and
other development questions. To quote the documentation:

MarkupViewer viewer = new MarkupViewer(parent, null, SWT.MULTI |
SWT.WRAP | SWT.V_SCROLL);
viewer.setMarkupLanguage(markupLanguage);

MarkupViewerConfiguration configuration = new
MarkupViewerConfiguration(viewer);
viewer.configure(configuration);
viewer.getTextWidget().setEditable(false);
viewer.setMarkup(markup);


The MarkupViewerConfiguration properly configures the hyperlink detector.

You can also take a look at the class
org.eclipse.mylyn.wikitext.tests.AbstractTestApplication which is in the
org.eclipse.mylyn.wikitext.tests project in CVS
Previous Topic:Integrating Jira using mylyn
Next Topic:How to change field labels in task editor (bugzilla connector)?
Goto Forum:
  


Current Time: Wed Jul 23 20:29:14 EDT 2014

Powered by FUDForum. Page generated in 0.01526 seconds