Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Modifying the behavior of the internal web browser
Modifying the behavior of the internal web browser [message #522616] Tue, 23 March 2010 06:40 Go to next message
Eclipse UserFriend
Originally posted by: Patrick.Schoenbach.robustsoft.de

Hi,

I am developing a little plugin which analyzes some models and then it
generates a simple HTML report. This report is then opened within the
internal web browser of Eclipse.

I would like to add some links in the report that will open the
corresponding model files in an Eclipse editor (EPF Composer).

Is it possible somehow to tweak the internal browser (e.g. by
subclassing) so that clicking a certain link opens an Eclipse editor
instead of displaying the linked local file in the browser?

--
Regards,
Patrick
Re: Modifying the behavior of the internal web browser [message #522902 is a reply to message #522616] Wed, 24 March 2010 13:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Patrick.Schoenbach.robustsoft.de

On Tue, 23 Mar 2010 12:33:47 +0100, Patrick Schönbach wrote:

> Is it possible somehow to tweak the internal browser (e.g. by
> subclassing) so that clicking a certain link opens an Eclipse editor
> instead of displaying the linked local file in the browser?

In case this is not feasible, are there alternatives to achieve the same
result?

--
Regards,
Patrick
Re: Modifying the behavior of the internal web browser [message #523434 is a reply to message #522902] Fri, 26 March 2010 13:41 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Patrick,

If you have a handle to the Browser then you do this by adding a
LocationListener to it, and in your LocationListener.changing()
implementation, setting event.doit to false and performing your alternate
action instead. Using LocationListener.changing() to do something like this
is demonstrated in
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet327.java?view=co .

If you're using Eclipse's Internal Web Browser view (I wasn't sure from your
description if this was the case) then you should see if you can either get
at its underlying Browser (in which case you can use the approach above), or
if not, see if it sends any events corresponding to the Browser's
LocationListener.changing().

HTH,
Grant


"Patrick Sch
Re: Modifying the behavior of the internal web browser [message #524310 is a reply to message #522616] Wed, 31 March 2010 13:41 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Cheatsheets and the local help allows executing commands within eclipse
(by dealing with them in a servlet, I would imagine).

You'll see the links in Help>Help Contents as
"javascript:executeCommand(...)"

It's pretty easy to start a Jetty instance from within eclipse and host
a servlet for communications, and ICommandService/IHandlerService can be
used to execute a command programmatically.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Override Command Binding
Next Topic:workbench.xml reloading
Goto Forum:
  


Current Time: Fri Mar 29 10:40:44 GMT 2024

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

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

Back to the top