Skip to main content


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 08:46 Go to next message
yaumunlam  is currently offline yaumunlam Friend
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 19:51 Go to previous message
David Green is currently offline David GreenFriend
Messages: 136
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 19:51 Go to previous message
David Green is currently offline David GreenFriend
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:WikiText MarkupViewer and clickable image
Next Topic:Integrating Jira using mylyn
Goto Forum:
  


Current Time: Tue Mar 19 04:59:08 GMT 2024

Powered by FUDForum. Page generated in 0.02082 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top