如何在Eclipse插件首选项页面中创建超链接? [英] How to create a hyperlink in Eclipse plugin preferences page?

查看:320
本文介绍了如何在Eclipse插件首选项页面中创建超链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有描述和三个文本字段的Eclipse插件。

I have an Eclipse plugin with a description and three text fields.

然而,我想添加一组三个单选按钮来执行特定的更改操作选择的选择。我还想要一个超链接到一个信息页面,人们可以点击它,并被引导到他们的浏览器查看信息。

However, I would like to add a group of three radio buttons that perform specific actions on changing the selected choice. I would also like to have a hyperlink to an information page where people can click it and be directed to their browser for viewing the information.

org.eclipse.jface.preference 似乎不包含这样的类和函数。

The library org.eclipse.jface.preference does not seem to contain such classes and functions.

是否可以引导我到适当的资源或给我任何关于如何使用Eclipse库的提示?我想在首选项页面中添加标签,链接,按钮。

Would it be possible to guide me to the appropriate resources or give me any hints on how to do that using the Eclipse libraries? I would like to have labels, links, buttons, all in the preferences page.

推荐答案

您可以使用 org.eclipse.swt.widgets.Link 添加超级链接到首选项页面(或任何其他对话框或向导):

You can use org.eclipse.swt.widgets.Link to add a hyperlink to a preference page (or any other dialog or wizard):

final Link link = new Link(parent, SWT.NONE);
link.setText("text");
link.setLayoutData(your layour data);

link.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(final SelectionEvent e)
  {
    // TODO deal with hyperlink selection
  }
});

这篇关于如何在Eclipse插件首选项页面中创建超链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆