Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » Extending the HTMLEditor with custom operations
Extending the HTMLEditor with custom operations [message #475820] Sun, 20 April 2008 23:41 Go to next message
Holger Knublauch is currently offline Holger KnublauchFriend
Messages: 3
Registered: July 2009
Junior Member
For our product I am writing a plugin that extends the HTMLEditor with
support for some refactoring operations on the DOM tree. For example, the
plugin contains a button to insert a <span /> element with some attributes
at the selected caret position. This works fairly well and most of the
functionality is in place. I have a couple of questions and very much
appreciate your opinion.

1) I have been looking for WYSIWYG editors based on Eclipse, but this JSF
editor seems to be the best available foundation. Is it the right
approach to extend this editor, or are there better alternatives. One
problem is that most of the API classes seem to be marked as internal and
don't seem to be recommended to be used by third-party plugins.

2) For operations that manipulate the document, I am directly changing the
(XML API) Document with calls such as element.appendChild(). Is this the
recommended way? If yes, how can I bundle multiple steps (such as
appending and then deleting elements) into a single workspace Operation so
that the user can undo them. I have tried to create an IUndoableOperation
but it seems to be split into multiple undoable steps.

3) How can I change syntax high-lighting so that certain HTML attributes
have a different color in the source code?

4) How can I add my own items to the code-completion of the source-code
editor?

Thanks a lot!
Hans
Re: Extending the HTMLEditor with custom operations [message #475821 is a reply to message #475820] Mon, 21 April 2008 22:30 Go to previous messageGo to next message
Raghu Srinivasan is currently offline Raghu SrinivasanFriend
Messages: 265
Registered: July 2009
Senior Member
Hi Hans,

I am glad you are interested in extending the Web Page Editor. As an
adopter, you should raise bugs on the API's that you would like to use
which are marked internal. This will help us to do the necessary work to
declare them as API in a future release. Please take a look at the WTP API
policy described here: http://wiki.eclipse.org/WTP_API_Policy . You can
use the following link to add an enhancement request:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Java%20S erver%20Faces

Please also note that the focus of the JSF Tools Team is to improve the
editor to support JSF development and as such we have no resource working
on improving the editor to better support editing of HTML pages. We
encourage the community to contribute such enhancements to the project.

Thanks
Raghu Srinivasan
Project Lead - JSF Tools Project


Raghu Srinivasan,
Project Lead - JSF
Re: Extending the HTMLEditor with custom operations [message #475822 is a reply to message #475821] Wed, 23 April 2008 14:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chlache.talita.org

I too am looking into the Webpage Editor.
You are rendering the Html/Css yourself, are'nt you?
The code is quite complicated and i am having a hard time to understand what you do, so i just ask:
How do you do that? What are the core rendering classes?
What do think about SWT Composer? Why are'nt you using Mozilla?

Thanks in advance

Andreas Chlache


Raghu Srinivasan wrote:
> Hi Hans,
>
> I am glad you are interested in extending the Web Page Editor. As an
> adopter, you should raise bugs on the API's that you would like to use
> which are marked internal. This will help us to do the necessary work to
> declare them as API in a future release. Please take a look at the WTP
> API policy described here: http://wiki.eclipse.org/WTP_API_Policy . You
> can use the following link to add an enhancement request:
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Java%20S erver%20Faces
>
> Please also note that the focus of the JSF Tools Team is to improve the
> editor to support JSF development and as such we have no resource
> working on improving the editor to better support editing of HTML pages.
> We encourage the community to contribute such enhancements to the project.
>
> Thanks
> Raghu Srinivasan
> Project Lead - JSF Tools Project
>
Re: Extending the HTMLEditor with custom operations [message #475823 is a reply to message #475820] Wed, 23 April 2008 17:21 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 480
Registered: July 2009
Senior Member
> 2) For operations that manipulate the document, I am directly changing the
> (XML API) Document with calls such as element.appendChild(). Is this the

This question is better asked on WTP forum since the shared model that
underlies the XML editors (and therefore implementation of the XML API
classes you are using) are owned by WST (web standard tools).

> 3) How can I change syntax high-lighting so that certain HTML attributes
> have a different color in the source code?

Windows->Preferences->Web->HTML Files->Editor->Syntax Coloring. In terms of
more specific questions, the more general WTP forum would be better since they
own the SSE (structured source editor) which is what you see your source in.

> 4) How can I add my own items to the code-completion of the source-code
> editor?

This depends on the source type (HTML vs. JSP etc.) and what you want to
add. There are several layers which the WTP forum can help you with. If
you need help specifically with adding content-assist for JSF elements,
attributes and EL, we can give more help here if you give me specifics.


--Cam
Re: Extending the HTMLEditor with custom operations [message #475824 is a reply to message #475822] Wed, 23 April 2008 17:29 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 480
Registered: July 2009
Senior Member
> You are rendering the Html/Css yourself, are'nt you?


Yes, we have an extensible framework of what we call "tag converters" that
take a source tag (i.e. h:outputText) and produce HTML/CSS. The design
pane then renders it.

> How do you do that? What are the core rendering classes?

Can you be more specific about what part of the rendering you interested
since, as you rightly point out, it is a little complicated. If you have
a specific example of something you'd like to do, it would probably be
helpful to walk you through it.

> What do think about SWT Composer? Why are'nt you using Mozilla?

I haven't looked at SWT composer. We certainly have the ability to target
other HTML renderers/editors (we already do this with the Preview tab).
The main difficulty is being able to support input languages that are
non-HTML, since we need to first approximate the rendering _and_ maintain
enough bridging information that when you edit the HTML visually, we can
map this back to the original format.

If you have requirements in this area, please launch enhancement requests
at bugs.eclipse.org so that we track and address.


--Cam
Re: Extending the HTMLEditor with custom operations [message #617721 is a reply to message #475820] Mon, 21 April 2008 22:30 Go to previous message
Raghu Srinivasan is currently offline Raghu SrinivasanFriend
Messages: 265
Registered: July 2009
Senior Member
Hi Hans,

I am glad you are interested in extending the Web Page Editor. As an
adopter, you should raise bugs on the API's that you would like to use
which are marked internal. This will help us to do the necessary work to
declare them as API in a future release. Please take a look at the WTP API
policy described here: http://wiki.eclipse.org/WTP_API_Policy . You can
use the following link to add an enhancement request:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Java%20S erver%20Faces

Please also note that the focus of the JSF Tools Team is to improve the
editor to support JSF development and as such we have no resource working
on improving the editor to better support editing of HTML pages. We
encourage the community to contribute such enhancements to the project.

Thanks
Raghu Srinivasan
Project Lead - JSF Tools Project


Raghu Srinivasan,
Project Lead - JSF
Re: Extending the HTMLEditor with custom operations [message #617722 is a reply to message #475821] Wed, 23 April 2008 14:06 Go to previous message
Eclipse UserFriend
Originally posted by: chlache.talita.org

I too am looking into the Webpage Editor.
You are rendering the Html/Css yourself, are'nt you?
The code is quite complicated and i am having a hard time to understand what you do, so i just ask:
How do you do that? What are the core rendering classes?
What do think about SWT Composer? Why are'nt you using Mozilla?

Thanks in advance

Andreas Chlache


Raghu Srinivasan wrote:
> Hi Hans,
>
> I am glad you are interested in extending the Web Page Editor. As an
> adopter, you should raise bugs on the API's that you would like to use
> which are marked internal. This will help us to do the necessary work to
> declare them as API in a future release. Please take a look at the WTP
> API policy described here: http://wiki.eclipse.org/WTP_API_Policy . You
> can use the following link to add an enhancement request:
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Java%20S erver%20Faces
>
> Please also note that the focus of the JSF Tools Team is to improve the
> editor to support JSF development and as such we have no resource
> working on improving the editor to better support editing of HTML pages.
> We encourage the community to contribute such enhancements to the project.
>
> Thanks
> Raghu Srinivasan
> Project Lead - JSF Tools Project
>
Re: Extending the HTMLEditor with custom operations [message #617723 is a reply to message #475820] Wed, 23 April 2008 17:21 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 480
Registered: July 2009
Senior Member
> 2) For operations that manipulate the document, I am directly changing the
> (XML API) Document with calls such as element.appendChild(). Is this the

This question is better asked on WTP forum since the shared model that
underlies the XML editors (and therefore implementation of the XML API
classes you are using) are owned by WST (web standard tools).

> 3) How can I change syntax high-lighting so that certain HTML attributes
> have a different color in the source code?

Windows->Preferences->Web->HTML Files->Editor->Syntax Coloring. In terms of
more specific questions, the more general WTP forum would be better since they
own the SSE (structured source editor) which is what you see your source in.

> 4) How can I add my own items to the code-completion of the source-code
> editor?

This depends on the source type (HTML vs. JSP etc.) and what you want to
add. There are several layers which the WTP forum can help you with. If
you need help specifically with adding content-assist for JSF elements,
attributes and EL, we can give more help here if you give me specifics.


--Cam
Re: Extending the HTMLEditor with custom operations [message #617724 is a reply to message #475822] Wed, 23 April 2008 17:29 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 480
Registered: July 2009
Senior Member
> You are rendering the Html/Css yourself, are'nt you?


Yes, we have an extensible framework of what we call "tag converters" that
take a source tag (i.e. h:outputText) and produce HTML/CSS. The design
pane then renders it.

> How do you do that? What are the core rendering classes?

Can you be more specific about what part of the rendering you interested
since, as you rightly point out, it is a little complicated. If you have
a specific example of something you'd like to do, it would probably be
helpful to walk you through it.

> What do think about SWT Composer? Why are'nt you using Mozilla?

I haven't looked at SWT composer. We certainly have the ability to target
other HTML renderers/editors (we already do this with the Preview tab).
The main difficulty is being able to support input languages that are
non-HTML, since we need to first approximate the rendering _and_ maintain
enough bridging information that when you edit the HTML visually, we can
map this back to the original format.

If you have requirements in this area, please launch enhancement requests
at bugs.eclipse.org so that we track and address.


--Cam
Previous Topic:Extending the HTMLEditor with custom operations
Next Topic:standard JSF to iceFaces
Goto Forum:
  


Current Time: Fri Nov 28 23:05:13 GMT 2014

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

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