Bug 90750 - New Visual class wizard contributors should validate/fix projects
Summary: New Visual class wizard contributors should validate/fix projects
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: VE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: VE Bugzilla inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-07 19:55 EDT by Srimanth CLA
Modified: 2011-06-13 11:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srimanth CLA 2005-04-07 19:55:32 EDT
Currently contributors to the New Visual Class wizard provide a class whose only
purpose is to provide the location of the template. 

The whole contribution mechanism should be restructured so that :
(1) The icon, text and location of the template for a particular style should be
provided in the plugin.xml itself. With this the wizard doesnt have to load
plugins just because their entry shows up in the tree.
(2) Optionally the styles could contribute a 'StyleHelper' class, which will
allow the style do more than just provide content:
	(a) It should be allowed to validate whether a particular style can be
generated into a particular project. Ex: it doesnt make sense to generate RCP
Views into a regular non-plugin Java Project. Hence there should be an API on
the contributor to say 'boolean validate(ISelection)' which will return whether
this style is applicable to the passed in workspace resource selection.
	(b)It should be allowed to make necessary changes to the project so that
necessary libraries/JARs are added to the classpath. Ex: Creating an JFace class
in a normal Java project should add the SWT container with JFace support. Hence
an API 'boolean contribute(IProject)' should be provided to the contributor.
Comment 1 Richard Kulp CLA 2005-10-13 16:18:40 EDT
NewVisualClassWizardPage.handleFieldChanged does a check that really should be
in the contributor instead.

It does a check to see if the project is a PDE project, and if it is, does it
have "org.eclipse.ui" in it. This was added as a kludge to be able to create SWT
controls in PDE projects because since we currently can't update the PDE
plugin.xml there was no way to make sure that SWT was in the classpath. 

This should of been done through the contributor instead. This is not the proper
place for it. It should be removed from here.