JBIDE-18670 HTML5 Palette: Palette model refactoring

new palette model implemented
Done
On 11/20/2014 10:07 AM, scabanovich wrote:
>
> In 
> plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/editor/jspeditor/dnd/PaletteItemDropCommand.java:
>
> > +
> > +	private Properties properties = new Properties();
> > +	private boolean callPaletteWizard = false;
> > +	
> > +	private IPaletteItem paletteItem;
> > +	private boolean doNotShowWizard = false;
> > +	
> > +	private IDropWizard wizard;
> > +	
> > +	private IPositionCorrector corrector;
> > +	
> > +	public PaletteItemDropCommand(IPaletteItem paletteItem, boolean doNotShowWizard){
> > +		super();
> > +		this.paletteItem = paletteItem;
> > +		this.doNotShowWizard = doNotShowWizard;
> > +		wizard = paletteItem.createWizard();
>
> Wizard instance is created too early. It should not be cached, and 
> should be created by requesting paletteItem only in createDropWizard().
> Implementation of getCustomWizardName() is not needed - it is used 
> here only to check if wizard is available. Hence IPaletteItem just 
> needs method hasWizard().
> Old implementations called getCustomWizardName() to create wizard. 
> Here, as wizard is created by IPaletteItem it should also answer if it 
> can be created without actually creating it.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/jbosstools/jbosstools-jst/pull/406/files#r20665156>.
>