How do I include a hyperlink in my plugin?

Hi,

I would like to write a plugin that displays hyperlinks to content on the web. How do I include these?

Thanks
Luanne

6 comments

On 28.04.10 11:03, Luanne Misquitta wrote:

I would like to write a plugin that displays hyperlinks to content on the web. How do I include these?


Maybe you could elaborate a bit more on how your plugin is going to
work. Displaying a hyperlink is probably doable but how to do it depends
heavily on where you want them to show up (in the editor?, in some
settings page? in some flyout?)..

0

I would like to write a plugin which sits in the area above the status bar (along with TODO etc), or perhaps in the right-most groups. This plugin should be able to display a set of help links, and clicking on one of these should open a browser and load the URL specified.

Thanks
Luanne

0

On 29.04.10 08:05, Luanne Misquitta wrote:

I would like to write a plugin which sits in the area above the status bar (along with TODO etc), or perhaps in the right-most groups. This plugin should be able to display a set of help links, and clicking on one of these should open a browser and load the URL specified.

>

This is relatively easy. You need to create a project component and
register it to your plugin.xml. Then inside the project component you
can register a tool window like this:



Then you'd just have to implement the YourLinkPanel class, which
contains the links you want to display, but this is simple Swing Code then.

Hope this helps.

Kind regards,
Jan

0

Hi Jan,

Some of your post is missing...could you re-post please?

Thanks
Luanne

0

Dum di dum... Lets see if this one works...

On 29.04.10 08:05, Luanne Misquitta wrote:
> I would like to write a plugin which sits in the area above the
status bar (along with TODO etc), or perhaps in the right-most groups.
This plugin should be able to display a set of help links, and clicking
on one of these should open a browser and load the URL specified.
>

This is relatively easy. You need to create a project component and
register it to your plugin.xml. Then inside the project component you
can register a tool window like this:

public class YourProjectComponent extends AbstractProjectComponent {
   public static final String TOOL_WINDOW_ID = "Help Links";

   protected YourProjectComponent(Project project) {
     super(project);
   }

   @Override
   public void initComponent() {
     super.initComponent();
     final YourLinkPanel panel = new YourLinkPanel();
     final ToolWindowManagerEx manager =
ToolWindowManagerEx.getInstanceEx(myProject);
     runWhenInitialized(myProject, new Runnable() {
       public void run() {
         final ToolWindow window =
manager.registerToolWindow(TOOL_WINDOW_ID, panel,
ToolWindowAnchor.RIGHT, myProject, true);
       }
     });
   }
}

Then you'd just have to implement the YourLinkPanel class, which
contains the links you want to display, but this is simple Swing Code then.

Hope this helps.

Kind regards,
Jan

0

Thank you so much for the help!

0

Please sign in to leave a comment.