Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Mandatory snippet variable values?
Mandatory snippet variable values? [message #171511] Fri, 16 June 2006 16:37 Go to next message
Eclipse UserFriend
Hello,

Is there a way to have the Snippets view variable replacement dialog issue
a warning or error if the user does not fill in a value for a Snippet
variable? What we'd like to create are essentially mandatory variables
that the user must fill in before the Snippet can be inserted into the
editor.

I've looked at the following classes but don't see an easy way to do this
from my plugin.

DefaultSnippetInsertion
VariableItemHelper
VariableInsertionDialog

Any help would be appreciated.

Malcom Zung
IBM Toronto Lab
Re: Mandatory snippet variable values? [message #171526 is a reply to message #171511] Fri, 16 June 2006 17:14 Go to previous messageGo to next message
Eclipse UserFriend
Malcom Zung wrote:
> Is there a way to have the Snippets view variable replacement dialog
> issue a warning or error if the user does not fill in a value for a
> Snippet variable? What we'd like to create are essentially mandatory
> variables that the user must fill in before the Snippet can be inserted
> into the editor.

No, there is no support for declaring a variable as being required.
The extension point does allow you to specify a default value,
though, so that barring the user clearing it, a value will be
present. If that isn't enough, you'll need to either subclass the
DefaultSnippetInsertion dialog to provide a UI that enforces that,
or open a feature request:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Web%20To ols&component=wst.common&short_desc=[snippets]


--
- Nitin
Re: Mandatory snippet variable values? [message #171604 is a reply to message #171526] Mon, 19 June 2006 10:40 Go to previous message
Eclipse UserFriend
Nitin,

Thanks for the reply, I've opened an enhancement in Bugzilla:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=147723

Malcom.
Previous Topic:EAR LIbrary container
Next Topic:anyone use Code Generator Wizard - eclipse Plug-in
Goto Forum:
  


Current Time: Sat May 10 11:18:32 EDT 2025

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

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

Back to the top