Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » Extending Snippets view
Extending Snippets view [message #476131] Wed, 06 May 2009 06:41 Go to next message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Hi,

Can you please tell me what extension point to use and how to extend the
snippets view to inlude my own snippets category and custom snippets.

I am using Web Page editor to open the JSP and have already extended the
existing palette editor.
But as few of my requirements doesn't fit into a tag of cutom tag library,
I wud need to extend snippets view also.
Re: Extending Snippets view [message #476132 is a reply to message #476131] Wed, 06 May 2009 07:06 Go to previous messageGo to next message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Hi again,

I tried using extension point
"org.eclipse.wst.common.snippets.SnippetContributions" but the issue I am
facing is that the snippets I would be showing would be read on runtime
from some database.

That means I can not configure each snippet item at compile time in the
plugin.xml.

Rather I would need something where I can keep on adding snippet item in
my category at runtime only.....

I am hoping sumthing is available ....
Re: Extending Snippets view [message #476133 is a reply to message #476132] Wed, 06 May 2009 17:04 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

shilpa wrote:
> Hi again,
>
> I tried using extension point
> "org.eclipse.wst.common.snippets.SnippetContributions" but the issue I
> am facing is that the snippets I would be showing would be read on
> runtime from some database.
>
> That means I can not configure each snippet item at compile time in the
> plugin.xml.
>
> Rather I would need something where I can keep on adding snippet item in
> my category at runtime only.....
>
> I am hoping sumthing is available ....

At the moment, there is not. The only supported means for putting
drawers and items into the view are through the UI by the user or
through the plugin.xml. You'd want to open an enhancement request
for some means for doing so, and perhaps contribute a solution
implementing this ability. From the sounds of it, simply rescanning
the plug-in extensions wouldn't quite cover your case.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20Co mmon%20Tools&component=Snippets+Framework&bug_severi ty=enhancement

Were you thinking of snippet items that use a custom
ISnippetInsertion class? If so, the class loading story gets rather
complicated for your scenario.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extending Snippets view [message #476134 is a reply to message #476133] Thu, 07 May 2009 03:06 Go to previous messageGo to next message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Nitin,

I was thinking of creating Snippets category and item classes using
DefaultSnippetInsertion at runtime.... I am still not sure whether that
wud be feasible or not..

Basically I want to do what plugin.xml does programatically..

does it look feasible ?
Re: Extending Snippets view [message #476135 is a reply to message #476134] Thu, 07 May 2009 13:11 Go to previous messageGo to next message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Also, I can see that the Import option in the existing "Customize Palette"
wizard for snippets view also does something similar...

Can I use the classes or some extension point from there ??
Re: Extending Snippets view [message #476136 is a reply to message #476135] Tue, 12 May 2009 01:31 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

shilpa wrote:
> Also, I can see that the Import option in the existing "Customize
> Palette" wizard for snippets view also does something similar...
>
> Can I use the classes or some extension point from there ??

it's all visible, so it means you *can*, but I'd still rather there
be an enhancement request opened for a real (read: friendlier and
supported) mechanism for doing so in a future release.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extending Snippets view [message #476140 is a reply to message #476136] Thu, 04 June 2009 13:05 Go to previous messageGo to next message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
I have been sucessful in extending Snippets import functionality, but now
I need another change in the snippets view.

Can I somehow make the snippets work on Drag and Drop event rather than
the usual Double click?

As the other views like Pallete supports DnD, snippets becomes a little
out of sync supporting only Double click...

Shouldn't all views be in sync for Eclipse ?
Re: Extending Snippets view [message #476141 is a reply to message #476140] Thu, 04 June 2009 17:19 Go to previous message
Gerry Kessler is currently offline Gerry KesslerFriend
Messages: 125
Registered: July 2009
Senior Member
I think you will find that you can DnD into the source pane but not the
design pane. Supporting snippets in the design pane would require some
work in the WPE. Please create an enhancement request using Bugzilla.

Regards,
Gerry Kessler
WTP JSF Tools Project
Re: Extending Snippets view [message #618760 is a reply to message #476131] Wed, 06 May 2009 07:06 Go to previous message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Hi again,

I tried using extension point
"org.eclipse.wst.common.snippets.SnippetContributions" but the issue I am
facing is that the snippets I would be showing would be read on runtime
from some database.

That means I can not configure each snippet item at compile time in the
plugin.xml.

Rather I would need something where I can keep on adding snippet item in
my category at runtime only.....

I am hoping sumthing is available ....
Re: Extending Snippets view [message #618761 is a reply to message #476132] Wed, 06 May 2009 17:04 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

shilpa wrote:
> Hi again,
>
> I tried using extension point
> "org.eclipse.wst.common.snippets.SnippetContributions" but the issue I
> am facing is that the snippets I would be showing would be read on
> runtime from some database.
>
> That means I can not configure each snippet item at compile time in the
> plugin.xml.
>
> Rather I would need something where I can keep on adding snippet item in
> my category at runtime only.....
>
> I am hoping sumthing is available ....

At the moment, there is not. The only supported means for putting
drawers and items into the view are through the UI by the user or
through the plugin.xml. You'd want to open an enhancement request
for some means for doing so, and perhaps contribute a solution
implementing this ability. From the sounds of it, simply rescanning
the plug-in extensions wouldn't quite cover your case.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20Co mmon%20Tools&component=Snippets+Framework&bug_severi ty=enhancement

Were you thinking of snippet items that use a custom
ISnippetInsertion class? If so, the class loading story gets rather
complicated for your scenario.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extending Snippets view [message #618762 is a reply to message #476133] Thu, 07 May 2009 03:06 Go to previous message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Nitin,

I was thinking of creating Snippets category and item classes using
DefaultSnippetInsertion at runtime.... I am still not sure whether that
wud be feasible or not..

Basically I want to do what plugin.xml does programatically..

does it look feasible ?
Re: Extending Snippets view [message #618763 is a reply to message #476134] Thu, 07 May 2009 13:11 Go to previous message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Also, I can see that the Import option in the existing "Customize Palette"
wizard for snippets view also does something similar...

Can I use the classes or some extension point from there ??
Re: Extending Snippets view [message #618764 is a reply to message #476135] Tue, 12 May 2009 01:31 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

shilpa wrote:
> Also, I can see that the Import option in the existing "Customize
> Palette" wizard for snippets view also does something similar...
>
> Can I use the classes or some extension point from there ??

it's all visible, so it means you *can*, but I'd still rather there
be an enhancement request opened for a real (read: friendlier and
supported) mechanism for doing so in a future release.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extending Snippets view [message #618768 is a reply to message #476136] Thu, 04 June 2009 13:05 Go to previous message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
I have been sucessful in extending Snippets import functionality, but now
I need another change in the snippets view.

Can I somehow make the snippets work on Drag and Drop event rather than
the usual Double click?

As the other views like Pallete supports DnD, snippets becomes a little
out of sync supporting only Double click...

Shouldn't all views be in sync for Eclipse ?
Re: Extending Snippets view [message #618769 is a reply to message #476140] Thu, 04 June 2009 17:19 Go to previous message
Gerry Kessler is currently offline Gerry KesslerFriend
Messages: 125
Registered: July 2009
Senior Member
I think you will find that you can DnD into the source pane but not the
design pane. Supporting snippets in the design pane would require some
work in the WPE. Please create an enhancement request using Bugzilla.

Regards,
Gerry Kessler
WTP JSF Tools Project
Previous Topic:Design time rendering of custom tag libraries
Next Topic:Design time rendering of custom tag libraries
Goto Forum:
  


Current Time: Fri Apr 19 08:21:29 GMT 2024

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

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

Back to the top