Customizing palette in Web Page Editor [message #475971] |
Sun, 11 May 2008 05:01 |
Eclipse User |
|
|
|
Originally posted by: ning2010.gmail.com
Is it possible to customize the palette in WPE so that when a control is
dragged and dropped into the editor, a dialog window could open up that
allows the user to customize the tag generated?
Currently, I am using the
org.eclipse.jst.jsf.common.standardMetaDataFiles extension point to
provide additional attributes for the tags, but the attributes can only
be hard coded.
Thanks,
Ning
|
|
|
|
Re: Customizing palette in Web Page Editor [message #475975 is a reply to message #475974] |
Wed, 21 May 2008 15:26 |
Eclipse User |
|
|
|
Originally posted by: ning2010.gmail.com
Cameron Bateman wrote:
> Yes, the org.eclipse.jst.pagedesigner.pageDesignerExtension has an
> elementEditFactory option. You can implement an elementEditFactory for
> your taglib uri(s) by extending AbstractElementEditFactory. You can
> then return an object that extends AbstractElementEdit.
> Your element edit can then return an IDropCustomizer. The
> IDropCustomizer provides a call back interface to allow you to open a
> dialog and return custom creation data (see Javadocs).
> If you want to further control how this creation data gets translated
> into the actual tag that is added to the document, your element edit can
> also return its own ITagCreator by implementing getTagCreator.
>
>
> --Cam
>
Hi,
I followed your suggestion and was able to open a dialog when a tag was
added to the WPE from the palette. However, this only works when I
select a tag in the palette with one mouse click (mouse down+up) and
then click again in the editor. If I just do a drag-and-drop (mouse down
in the palette area, hold, move the cursor to editor, and release the
mouse button) the dialog never shows up. Is this by design or there is
something I missed?
Thanks
|
|
|
|
Re: Customizing palette in Web Page Editor [message #475977 is a reply to message #475974] |
Mon, 02 June 2008 15:18 |
Eclipse User |
|
|
|
Originally posted by: ning2010.gmail.com
Cameron Bateman wrote:
> Yes, the org.eclipse.jst.pagedesigner.pageDesignerExtension has an
> elementEditFactory option. You can implement an elementEditFactory for
> your taglib uri(s) by extending AbstractElementEditFactory. You can
> then return an object that extends AbstractElementEdit.
> Your element edit can then return an IDropCustomizer. The
> IDropCustomizer provides a call back interface to allow you to open a
> dialog and return custom creation data (see Javadocs).
> If you want to further control how this creation data gets translated
> into the actual tag that is added to the document, your element edit can
> also return its own ITagCreator by implementing getTagCreator.
>
>
> --Cam
>
Could you please elaborate on how to implement
getDropCustomizationData() that returns an IAdaptable? I tried to search
the source code for an example but could not find any.
|
|
|
|
|
Re: Customizing palette in Web Page Editor [message #617790 is a reply to message #475974] |
Wed, 21 May 2008 15:26 |
Eclipse User |
|
|
|
Originally posted by: ning2010.gmail.com
Cameron Bateman wrote:
> Yes, the org.eclipse.jst.pagedesigner.pageDesignerExtension has an
> elementEditFactory option. You can implement an elementEditFactory for
> your taglib uri(s) by extending AbstractElementEditFactory. You can
> then return an object that extends AbstractElementEdit.
> Your element edit can then return an IDropCustomizer. The
> IDropCustomizer provides a call back interface to allow you to open a
> dialog and return custom creation data (see Javadocs).
> If you want to further control how this creation data gets translated
> into the actual tag that is added to the document, your element edit can
> also return its own ITagCreator by implementing getTagCreator.
>
>
> --Cam
>
Hi,
I followed your suggestion and was able to open a dialog when a tag was
added to the WPE from the palette. However, this only works when I
select a tag in the palette with one mouse click (mouse down+up) and
then click again in the editor. If I just do a drag-and-drop (mouse down
in the palette area, hold, move the cursor to editor, and release the
mouse button) the dialog never shows up. Is this by design or there is
something I missed?
Thanks
|
|
|
|
Re: Customizing palette in Web Page Editor [message #617795 is a reply to message #475974] |
Mon, 02 June 2008 15:18 |
Eclipse User |
|
|
|
Originally posted by: ning2010.gmail.com
Cameron Bateman wrote:
> Yes, the org.eclipse.jst.pagedesigner.pageDesignerExtension has an
> elementEditFactory option. You can implement an elementEditFactory for
> your taglib uri(s) by extending AbstractElementEditFactory. You can
> then return an object that extends AbstractElementEdit.
> Your element edit can then return an IDropCustomizer. The
> IDropCustomizer provides a call back interface to allow you to open a
> dialog and return custom creation data (see Javadocs).
> If you want to further control how this creation data gets translated
> into the actual tag that is added to the document, your element edit can
> also return its own ITagCreator by implementing getTagCreator.
>
>
> --Cam
>
Could you please elaborate on how to implement
getDropCustomizationData() that returns an IAdaptable? I tried to search
the source code for an example but could not find any.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06568 seconds