Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Preview HTML Editor
Preview HTML Editor [message #61884] Wed, 05 January 2005 22:26 Go to next message
Eclipse UserFriend
Originally posted by: mdiggory.apache.org

I notice there a nice example of a multipage source/preview editor in
the HTML portion of the project. Is there a simple way I can use this
editor for HTML instead of of the current single page editor, or are
there plans to make this example preview editor the default for the HTML
editor plugin?

-Mark
Re: Preview HTML Editor [message #61928 is a reply to message #61884] Thu, 06 January 2005 02:02 Go to previous messageGo to next message
Eclipse UserFriend
Mark Diggory wrote:
> I notice there a nice example of a multipage source/preview editor in
> the HTML portion of the project. Is there a simple way I can use this
> editor for HTML instead of of the current single page editor, or are
> there plans to make this example preview editor the default for the HTML
> editor plugin?

You can use the PDE to create an Ant build.xml from its plugin.xml
and then run Ant to build a .zip to package it so you can run it as
part of your environment. Once it's running you're free to change
the file associations as you'd like.

There are no plans to make this the default since it's 1) really
just an example showing that it's as easy to embed as the default
text editor 2) missing the status bar you see in the HTML Source
Page editor and 3) we'd like to see real editors created and used
instead.

---
- Nitin
Re: Preview HTML Editor [message #63076 is a reply to message #61928] Fri, 07 January 2005 12:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdiggory.apache.org

Thanks,

Your correct, after more consideration I feel the ultimate awkwardness
here is that there is an HTMLEditor and a BrowserEditor, so, say I'm
authoring and HTML doc and I want to View it in the BrowserEditor, the I
have to close it in the HTML editor and Open it in the BrowserEditor.

What would be much more powerful would be to have a BrowserView with the
same capabilities of BrowserEditor (I mean really, what good is a
BrowserEditor, it supplys no "Editing" functionality and on top of this,
I can navigate away for the page I'm "Editing"). So, in that light, even
a Multipage source/preview html editor is wonky.

What I would recommend as a solution to this design issue would be to
move away from supplying a BrowserEditor and instead provide a
BrowserView linked to the source editor in the same way as the
Properties or Outline View. This browserView could then be used in
concert with the editor in the same way that the OutlineView or
PropertiesView is used. When you open an HTML page in the HTML Editor,
the editor supplies content info to the BrowserView for rendering that page.

-Mark

Nitin Dahyabhai wrote:
> Mark Diggory wrote:
>
>> I notice there a nice example of a multipage source/preview editor in
>> the HTML portion of the project. Is there a simple way I can use this
>> editor for HTML instead of of the current single page editor, or are
>> there plans to make this example preview editor the default for the
>> HTML editor plugin?
>
>
> You can use the PDE to create an Ant build.xml from its plugin.xml and
> then run Ant to build a .zip to package it so you can run it as part of
> your environment. Once it's running you're free to change the file
> associations as you'd like.
>
> There are no plans to make this the default since it's 1) really just an
> example showing that it's as easy to embed as the default text editor 2)
> missing the status bar you see in the HTML Source Page editor and 3)
> we'd like to see real editors created and used instead.
>
> ---
> - Nitin
Re: Preview HTML Editor [message #63164 is a reply to message #63076] Fri, 07 January 2005 14:20 Go to previous messageGo to next message
Eclipse UserFriend
On Fri, 07 Jan 2005 12:31:54 -0500, Mark Diggory <mdiggory@apache.org> wrote:


> What I would recommend as a solution to this design issue would be to
> move away from supplying a BrowserEditor and instead provide a
> BrowserView linked to the source editor in the same way as the
> Properties or Outline View.

This is a good idea (volunteering? :)

I'd also like communities opinon on another "twist" to this idea. It seems that a
view of the "static" HTML is pretty limitied ... only good for those cases where the
HTML is in fact static ... for cases where you need to "run" the page to get accurate view,
perhaps the browser view should in fact be our web browser? (That you currently get in
editor site when you "run on server"). ... I'm just curious as to relative weight of need
for static vs. need for dynamic views. [not that I'm voluntering :) ]
Re: Preview HTML Editor [message #63193 is a reply to message #63164] Fri, 07 January 2005 14:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdiggory.apache.org

David Williams wrote:
> On Fri, 07 Jan 2005 12:31:54 -0500, Mark Diggory <mdiggory@apache.org>
> wrote:
>
>
>> What I would recommend as a solution to this design issue would be to
>> move away from supplying a BrowserEditor and instead provide a
>> BrowserView linked to the source editor in the same way as the
>> Properties or Outline View.
>
>
> This is a good idea (volunteering? :)

Sure, I'd be glad to donate back in. I need this view for my current
project, but would like to see it in the right place. I'm new to the
Eclipse cvs/newsgroups (joined last fall) but have spent considerable
time over the last few years helping out as a commiter at Apache.

> I'd also like communities opinon on another "twist" to this idea. It
> seems that a
> view of the "static" HTML is pretty limitied ... only good for those
> cases where the
> HTML is in fact static ... for cases where you need to "run" the page to
> get accurate view,
> perhaps the browser view should in fact be our web browser? (That you
> currently get in
> editor site when you "run on server"). ... I'm just curious as to
> relative weight of need
> for static vs. need for dynamic views. [not that I'm voluntering :) ]
>

Have you seen the JTidy example? Here a split pane is used to show
before and after results of running JTidy in SWT Browser Widgets

http://www.devx.com/opensource/Article/22118/0/page/1

Point being that in one case the HTML is actually getting loaded from a
dynamic source (JTidy)


Not fully grokking the Architecture of a Web application project, I'm
only guessing. But, I would think that if your working with any editor
(Html, JSP, css, javascript) etc. Its still the "Nature" of the project
your in that would determine how url's or the html content itself was
fed to the browser view.

I also think, in reviewing the WebBrowser code, that WebBrowser itself
is very similar to a "Viewer" wrapping a Browser control and should
probably be sporting the JFace Viewer Interface.

Reviewing the Models behind ContentOutlineView and PropertiesPageView.
logically, we end up with a View shell that listens for editor
selectionChange events and acquires the WebBrowser in an IWebBrowserPage
delivered by the Editor

The analogy is to that of:

http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/editors_workbench_outliner.htm

and

http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench_resources.htm

-Mark
Re: Preview HTML Editor [message #63289 is a reply to message #63193] Fri, 07 January 2005 15:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdiggory.apache.org

In fact, such a viewer framework should actually be much higher in the
dependencies of Eclipse, within the platform project, not here in
webtools. It would place the BrowserView in "org.eclipse.ui.views" and
the BrowserViewer used within it up in "org.eclipse.jface".

I suspect the big issue then would be where to place the browser
"preferences".

-Mark

Mark Diggory wrote:
>
>
> David Williams wrote:
>
>> On Fri, 07 Jan 2005 12:31:54 -0500, Mark Diggory <mdiggory@apache.org>
>> wrote:
>>
>>
>>> What I would recommend as a solution to this design issue would be to
>>> move away from supplying a BrowserEditor and instead provide a
>>> BrowserView linked to the source editor in the same way as the
>>> Properties or Outline View.
>>
>>
>>
>> This is a good idea (volunteering? :)
>
>
> Sure, I'd be glad to donate back in. I need this view for my current
> project, but would like to see it in the right place. I'm new to the
> Eclipse cvs/newsgroups (joined last fall) but have spent considerable
> time over the last few years helping out as a commiter at Apache.
>
>> I'd also like communities opinon on another "twist" to this idea. It
>> seems that a
>> view of the "static" HTML is pretty limitied ... only good for those
>> cases where the
>> HTML is in fact static ... for cases where you need to "run" the page
>> to get accurate view,
>> perhaps the browser view should in fact be our web browser? (That you
>> currently get in
>> editor site when you "run on server"). ... I'm just curious as to
>> relative weight of need
>> for static vs. need for dynamic views. [not that I'm voluntering :) ]
>>
>
> Have you seen the JTidy example? Here a split pane is used to show
> before and after results of running JTidy in SWT Browser Widgets
>
> http://www.devx.com/opensource/Article/22118/0/page/1
>
> Point being that in one case the HTML is actually getting loaded from a
> dynamic source (JTidy)
>
>
> Not fully grokking the Architecture of a Web application project, I'm
> only guessing. But, I would think that if your working with any editor
> (Html, JSP, css, javascript) etc. Its still the "Nature" of the project
> your in that would determine how url's or the html content itself was
> fed to the browser view.
>
> I also think, in reviewing the WebBrowser code, that WebBrowser itself
> is very similar to a "Viewer" wrapping a Browser control and should
> probably be sporting the JFace Viewer Interface.
>
> Reviewing the Models behind ContentOutlineView and PropertiesPageView.
> logically, we end up with a View shell that listens for editor
> selectionChange events and acquires the WebBrowser in an IWebBrowserPage
> delivered by the Editor
>
> The analogy is to that of:
>
> http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/editors_workbench_outliner.htm
>
>
> and
>
> http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench_resources.htm
>
>
> -Mark
Re: Preview HTML Editor [message #63407 is a reply to message #63289] Sat, 08 January 2005 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thisisnot.mymail.com

The editor that should be a guideline if you ask me should be the one
found in dreamweaver. Also I think the cute bar which can be used to
select the exact tag you want, that shows you the tag hierarchy and can
help you do quick actions like apply style, and quick edit is a must do.
(it's the bar that sits below the edit window in dreamweaver).
Re: Preview HTML Editor [message #63457 is a reply to message #63407] Sat, 08 January 2005 10:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdiggory.apache.org

True, but there are two strategies that Dreamweaver uses:

1.) WYSYWIG Preview panel that can be used directly as a a design view
on the document with, selection events.

2.) Preview in various Browser implementations.

What your suggesting is really (1). I suspect it would be implemented
using GEF or similar.

If we really could capture selection events and drill down into the
various Browser Implementations, then maybe we could get away with
selection events in (2). But I suspect thats ambitious.

Stray Thoughts:

Has there been any discussion/crossover with the Eclipse Help
developers? Don't they have an implementation of an internal Browser and
wrappers that drill into the Browser and catch events from it?

Help also has another analogous point to WTP, they have a Tomcat
Application Server, how will these tools relate?

-Mark

Srgjan Srepfler wrote:
> The editor that should be a guideline if you ask me should be the one
> found in dreamweaver. Also I think the cute bar which can be used to
> select the exact tag you want, that shows you the tag hierarchy and can
> help you do quick actions like apply style, and quick edit is a must do.
> (it's the bar that sits below the edit window in dreamweaver).
>
Re: Preview HTML Editor [message #65096 is a reply to message #63164] Wed, 12 January 2005 18:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rgardler.come_now_no_spam-apache.org

David Williams wrote:
> On Fri, 07 Jan 2005 12:31:54 -0500, Mark Diggory <mdiggory@apache.org>
> wrote:
>
>
>> What I would recommend as a solution to this design issue would be to
>> move away from supplying a BrowserEditor and instead provide a
>> BrowserView linked to the source editor in the same way as the
>> Properties or Outline View.
>
>
> This is a good idea (volunteering? :)
>
> I'd also like communities opinon on another "twist" to this idea. It
> seems that a
> view of the "static" HTML is pretty limitied ... only good for those
> cases where the
> HTML is in fact static ... for cases where you need to "run" the page to
> get accurate view,
> perhaps the browser view should in fact be our web browser? (That you
> currently get in
> editor site when you "run on server"). ... I'm just curious as to
> relative weight of need
> for static vs. need for dynamic views. [not that I'm voluntering :) ]
>

Whilst I feel that a browser is often a view, it is also often an
editor. As you say there is the static Vs dynamic issue. With respect to
"weight of need". For our purposes the editor is more important at this
tie, we have a wealth of interfaces that are already XHTML based. Our
server app is being packaged as an RCP application and we want to stick
to the same interfaces the client would see.

That being said, I think the arguments for a browser view have merit. We
should really have both, but since my project needs the browser editor
I'm not volunteering either ;-)

Ross
Re: Preview HTML Editor [message #65164 is a reply to message #65096] Wed, 12 January 2005 21:05 Go to previous message
Eclipse UserFriend
Originally posted by: mdiggory.apache.org

I agree, both have their place. The underlying implementation is pretty
much the same. Its just a difference of Implemented Interface, ViewPart
vs EditorPart...


-Mark

Ross Gardler wrote:
> David Williams wrote:
>
>> On Fri, 07 Jan 2005 12:31:54 -0500, Mark Diggory <mdiggory@apache.org>
>> wrote:
>>
>>
>>> What I would recommend as a solution to this design issue would be to
>>> move away from supplying a BrowserEditor and instead provide a
>>> BrowserView linked to the source editor in the same way as the
>>> Properties or Outline View.
>>
>>
>>
>> This is a good idea (volunteering? :)
>>
>> I'd also like communities opinon on another "twist" to this idea. It
>> seems that a
>> view of the "static" HTML is pretty limitied ... only good for those
>> cases where the
>> HTML is in fact static ... for cases where you need to "run" the page
>> to get accurate view,
>> perhaps the browser view should in fact be our web browser? (That you
>> currently get in
>> editor site when you "run on server"). ... I'm just curious as to
>> relative weight of need
>> for static vs. need for dynamic views. [not that I'm voluntering :) ]
>>
>
> Whilst I feel that a browser is often a view, it is also often an
> editor. As you say there is the static Vs dynamic issue. With respect to
> "weight of need". For our purposes the editor is more important at this
> tie, we have a wealth of interfaces that are already XHTML based. Our
> server app is being packaged as an RCP application and we want to stick
> to the same interfaces the client would see.
>
> That being said, I think the arguments for a browser view have merit. We
> should really have both, but since my project needs the browser editor
> I'm not volunteering either ;-)
>
> Ross
Previous Topic:Common UI Properties plugin
Next Topic:Snippets and Templates
Goto Forum:
  


Current Time: Sat May 10 09:27:46 EDT 2025

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

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

Back to the top