Skip to main content



      Home
Home » Archived » Visual Editor (VE) » adding a new "tool" to the palette
adding a new "tool" to the palette [message #126771] Thu, 22 June 2006 10:26 Go to next message
Eclipse UserFriend
Is there a way to add a custom tool (not a bean) to the palette? From
looking at the code in JavaVisualEditorPart (where selection and marquee
(and I think Choose Bean) are added), it doesn't appear to be possible.

Thanks,
Ernest
Re: adding a new "tool" to the palette [message #126785 is a reply to message #126771] Thu, 22 June 2006 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

See

http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html

For how to access the palette, and then if you want to have a custom
tool instead of the standard tools:

Instead of an AnnotatedCreationEntry, your would use a ToolEntry:

<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
<palette:CategoryCmp>
<categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
<cmpGroups xsi:type="palette:GroupCmp">

<cmpEntries xsi:type="palette:ToolEntry"
toolClassName="your.bundle.id/your.fully-qualified-tool-class "
icon16Name=" platform:/plugin/org.eclipse.ve.example.customwidget/icons/c ustom.gif ">
</cmpEntries>

</cmpGroups>
</palette:CategoryCmp>
</xmi:XMI>

The tool class must implement org.eclipse.gef.Tool


Ernest Pasour wrote:
> Is there a way to add a custom tool (not a bean) to the palette? From
> looking at the code in JavaVisualEditorPart (where selection and marquee
> (and I think Choose Bean) are added), it doesn't appear to be possible.
>
> Thanks,
> Ernest

--
Thanks,
Rich Kulp
Re: adding a new "tool" to the palette [message #126823 is a reply to message #126785] Thu, 22 June 2006 12:53 Go to previous messageGo to next message
Eclipse UserFriend
Excellent. Thanks very much.

Rich Kulp wrote:
> See
>
> http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html
>
> For how to access the palette, and then if you want to have a custom
> tool instead of the standard tools:
>
> Instead of an AnnotatedCreationEntry, your would use a ToolEntry:
>
> <xmi:XMI xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
> xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
> <palette:CategoryCmp>
> <categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
> <cmpGroups xsi:type="palette:GroupCmp">
>
> <cmpEntries xsi:type="palette:ToolEntry"
> toolClassName="your.bundle.id/your.fully-qualified-tool-class "
> icon16Name=" platform:/plugin/org.eclipse.ve.example.customwidget/icons/c ustom.gif ">
>
> </cmpEntries>
>
> </cmpGroups>
> </palette:CategoryCmp>
> </xmi:XMI>
>
> The tool class must implement org.eclipse.gef.Tool
>
>
> Ernest Pasour wrote:
>> Is there a way to add a custom tool (not a bean) to the palette? From
>> looking at the code in JavaVisualEditorPart (where selection and
>> marquee (and I think Choose Bean) are added), it doesn't appear to be
>> possible.
>>
>> Thanks,
>> Ernest
>
Re: adding a new "tool" to the palette [message #126949 is a reply to message #126785] Fri, 23 June 2006 12:15 Go to previous messageGo to next message
Eclipse UserFriend
I got SAX errors until I added the following line:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

This line was also missing from the tutorial. Is that just an oversight?

Rich Kulp wrote:
> See
>
> http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html
>
> For how to access the palette, and then if you want to have a custom
> tool instead of the standard tools:
>
> Instead of an AnnotatedCreationEntry, your would use a ToolEntry:
>
> <xmi:XMI xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
> xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
> <palette:CategoryCmp>
> <categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
> <cmpGroups xsi:type="palette:GroupCmp">
>
> <cmpEntries xsi:type="palette:ToolEntry"
> toolClassName="your.bundle.id/your.fully-qualified-tool-class "
> icon16Name=" platform:/plugin/org.eclipse.ve.example.customwidget/icons/c ustom.gif ">
>
> </cmpEntries>
>
> </cmpGroups>
> </palette:CategoryCmp>
> </xmi:XMI>
>
> The tool class must implement org.eclipse.gef.Tool
>
>
> Ernest Pasour wrote:
>> Is there a way to add a custom tool (not a bean) to the palette? From
>> looking at the code in JavaVisualEditorPart (where selection and
>> marquee (and I think Choose Bean) are added), it doesn't appear to be
>> possible.
>>
>> Thanks,
>> Ernest
>
Re: adding a new "tool" to the palette [message #126963 is a reply to message #126949] Fri, 23 June 2006 13:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

No, it's not. Soemtime in the last year since the tutorial was written,
EMF got more specific on what was required. You didn't use to need the
xmlns:xsi for it to work.

Ernest Pasour wrote:
> I got SAX errors until I added the following line:
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> This line was also missing from the tutorial. Is that just an oversight?
>
>
--
Thanks,
Rich Kulp
Re: adding a new "tool" to the palette [message #126976 is a reply to message #126963] Fri, 23 June 2006 14:48 Go to previous message
Eclipse UserFriend
Ah. Well, we all get the rug pulled out from under us sometimes.

Thanks.

Rich Kulp wrote:
> No, it's not. Soemtime in the last year since the tutorial was written,
> EMF got more specific on what was required. You didn't use to need the
> xmlns:xsi for it to work.
>
> Ernest Pasour wrote:
>> I got SAX errors until I added the following line:
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>> This line was also missing from the tutorial. Is that just an oversight?
>>
>>
Re: adding a new "tool" to the palette [message #613392 is a reply to message #126771] Thu, 22 June 2006 11:09 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

See

http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html

For how to access the palette, and then if you want to have a custom
tool instead of the standard tools:

Instead of an AnnotatedCreationEntry, your would use a ToolEntry:

<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
<palette:CategoryCmp>
<categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
<cmpGroups xsi:type="palette:GroupCmp">

<cmpEntries xsi:type="palette:ToolEntry"
toolClassName="your.bundle.id/your.fully-qualified-tool-class "
icon16Name=" platform:/plugin/org.eclipse.ve.example.customwidget/icons/c ustom.gif ">
</cmpEntries>

</cmpGroups>
</palette:CategoryCmp>
</xmi:XMI>

The tool class must implement org.eclipse.gef.Tool


Ernest Pasour wrote:
> Is there a way to add a custom tool (not a bean) to the palette? From
> looking at the code in JavaVisualEditorPart (where selection and marquee
> (and I think Choose Bean) are added), it doesn't appear to be possible.
>
> Thanks,
> Ernest

--
Thanks,
Rich Kulp
Re: adding a new "tool" to the palette [message #613395 is a reply to message #126785] Thu, 22 June 2006 12:53 Go to previous message
Eclipse UserFriend
Excellent. Thanks very much.

Rich Kulp wrote:
> See
>
> http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html
>
> For how to access the palette, and then if you want to have a custom
> tool instead of the standard tools:
>
> Instead of an AnnotatedCreationEntry, your would use a ToolEntry:
>
> <xmi:XMI xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
> xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
> <palette:CategoryCmp>
> <categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
> <cmpGroups xsi:type="palette:GroupCmp">
>
> <cmpEntries xsi:type="palette:ToolEntry"
> toolClassName="your.bundle.id/your.fully-qualified-tool-class "
> icon16Name=" platform:/plugin/org.eclipse.ve.example.customwidget/icons/c ustom.gif ">
>
> </cmpEntries>
>
> </cmpGroups>
> </palette:CategoryCmp>
> </xmi:XMI>
>
> The tool class must implement org.eclipse.gef.Tool
>
>
> Ernest Pasour wrote:
>> Is there a way to add a custom tool (not a bean) to the palette? From
>> looking at the code in JavaVisualEditorPart (where selection and
>> marquee (and I think Choose Bean) are added), it doesn't appear to be
>> possible.
>>
>> Thanks,
>> Ernest
>
Re: adding a new "tool" to the palette [message #613405 is a reply to message #126785] Fri, 23 June 2006 12:15 Go to previous message
Eclipse UserFriend
I got SAX errors until I added the following line:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

This line was also missing from the tutorial. Is that just an oversight?

Rich Kulp wrote:
> See
>
> http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html
>
> For how to access the palette, and then if you want to have a custom
> tool instead of the standard tools:
>
> Instead of an AnnotatedCreationEntry, your would use a ToolEntry:
>
> <xmi:XMI xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
> xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
> <palette:CategoryCmp>
> <categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
> <cmpGroups xsi:type="palette:GroupCmp">
>
> <cmpEntries xsi:type="palette:ToolEntry"
> toolClassName="your.bundle.id/your.fully-qualified-tool-class "
> icon16Name=" platform:/plugin/org.eclipse.ve.example.customwidget/icons/c ustom.gif ">
>
> </cmpEntries>
>
> </cmpGroups>
> </palette:CategoryCmp>
> </xmi:XMI>
>
> The tool class must implement org.eclipse.gef.Tool
>
>
> Ernest Pasour wrote:
>> Is there a way to add a custom tool (not a bean) to the palette? From
>> looking at the code in JavaVisualEditorPart (where selection and
>> marquee (and I think Choose Bean) are added), it doesn't appear to be
>> possible.
>>
>> Thanks,
>> Ernest
>
Re: adding a new "tool" to the palette [message #613406 is a reply to message #126949] Fri, 23 June 2006 13:12 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

No, it's not. Soemtime in the last year since the tutorial was written,
EMF got more specific on what was required. You didn't use to need the
xmlns:xsi for it to work.

Ernest Pasour wrote:
> I got SAX errors until I added the following line:
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> This line was also missing from the tutorial. Is that just an oversight?
>
>
--
Thanks,
Rich Kulp
Re: adding a new "tool" to the palette [message #613407 is a reply to message #126963] Fri, 23 June 2006 14:48 Go to previous message
Eclipse UserFriend
Ah. Well, we all get the rug pulled out from under us sometimes.

Thanks.

Rich Kulp wrote:
> No, it's not. Soemtime in the last year since the tutorial was written,
> EMF got more specific on what was required. You didn't use to need the
> xmlns:xsi for it to work.
>
> Ernest Pasour wrote:
>> I got SAX errors until I added the following line:
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>> This line was also missing from the tutorial. Is that just an oversight?
>>
>>
Previous Topic:Parsing Stopped working for simple visual class
Next Topic:Parsing Stopped working for simple visual class
Goto Forum:
  


Current Time: Sat Jun 07 15:58:54 EDT 2025

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

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

Back to the top