Discussion:
[wdte-devel] Gecko embedding ideas
Christopher Lenz
2004-02-05 18:04:59 UTC
Permalink
Hi folks,

it's probably totally premature to chat about this, but I'm currently
playing with a complete embedding of the Mozilla Gecko rendering engine
for Eclipse. Initially I started looking at what can be done with the
new Browser widget in 3.0, but to support web development it does not
provide enough functionality. I also found out that there actually is a
Mozilla embedding for Mac and Windows (in addition to GTK2), although
it's not included in the SDK by default. Unfortunately, this embedding
also has a limited feature set, as only the APIs needed for "standard"
browser embedding are included.

Anyway my research has lead my to believe that it can't be too hard to
embed Gecko in Eclipse, while providing full access to its API. There
are IMHO many reasons why advanced browser embedding would be not only
beneficial but actually necessary for a real web development IDE (and
it's not WYSIWYG editing ;-) ).

I envision the Gecko embedding to contribute a separate view to the
Eclipse platform that closely collaborates with other plugins such as
the HTML, CSS and JavaScript editors. For example, the HTML
editor/outline could provide a context menu action that would highlight
the selected element in the browser view. We would be able to query
that element for its properties, i.e. not only the explicitly specified
attributes, but also properties determined dynamically by the rendering
engine, and display those in the Properties view. Look at the Mozilla
DOM Inspector if you don't know what I'm talking about.

Another example would be CSS selector editing. The browser view could
highlight elements selected by the selector while you're typing it into
the CSS editor.

There's a lot more: the browser view could be updated in realtime while
you're editing the HTML source. Changes to the HTML source could be
converted into modifications to the DOM that are directly applied to
the page displayed by the browser upon reconciliation, thus making
updates appear without needing to save the edited document and reload
the browser.

Or JavaScript: imagine simply setting a breakpoint in a JS file in
Eclipse, and when the corresponding code is executed by Gecko, you get
the option to step through the JavaScript source. I'm sure you have
seen Mozilla's Venkman. Imagine that integrated into your IDE :-)

But enough of that. I'm a relative newbie to JNI, so my current playing
might frustrate me out of the idea. I've been looking at the SWT
embedding of Mozilla as well as the Mozilla BlackConnect project, which
is sadly not being actively maintained. I plan to extract/refactor the
stuff needed for embedding and exposing the APIs of Gecko.

Any comments, ideas or even help appreciated.

Cheers,
Chris
--
Christopher Lenz
/=/ cmlenz at gmx.de

Loading...