Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem with BasicNewProjectResourceWizard
Problem with BasicNewProjectResourceWizard [message #325851] Thu, 28 February 2008 22:36 Go to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

I'm trying to extend BasicNewProjectResourceWizard to create customized
projects. I need to add extra validation against the entered project name.
WizardNewProjectCreationPage has the validatePage() method which I could
override in a subclass, but the problem is that
BasicNewProjectResourceWizard assumes its mainPage instance variable
will be set in createNewProject(). If my wizard overrides addPages() to
use my subclass of WizardNewProjectCreationPage then
BasicNewProjectResourceWizard's mainPage is never set, resulting in NPE
in createNewProject().

I tried to hook a modify listener to the Text on the
WizardNewProjectCreationPage but that, too, is inaccessible.

I want to extend BasicNewProjectResourceWizard because of the large
amount of logic and code embedded in it (especially in
createNewProject() which, sadly, is private).

So far, I can not find any workaround to be able to just add some extra
validation around the name. Any ideas?

Aside from work-around ideas, should I enter a bug report about the poor
re-usability of these classes?

Eric
Re: Problem with BasicNewProjectResourceWizard [message #332194 is a reply to message #325851] Thu, 09 October 2008 11:05 Go to previous messageGo to next message
Lukas Zapletal is currently offline Lukas ZapletalFriend
Messages: 7
Registered: July 2009
Junior Member
Hi Eric,

I am currrently facing the very same problem. I would like to implement a similar Wizard for creating a new project as in BasicNewProjectResourceWizard but I need to customize the new project (adding some natures).

How did you solve this poor design problem?
Re: Problem with BasicNewProjectResourceWizard [message #332196 is a reply to message #332194] Thu, 09 October 2008 11:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33185
Registered: July 2009
Senior Member
Guys,

I don't see anything short of pawing through the composite structure to
find the entry field, which wouldn't exactly be API safe for doing
this. It seems to me there though to be a protected method that creates
the main page so you can create a derived main page. I'd open a
bugzilla with a patch for the changes I wanted to see.


Lukas Zapletal wrote:
> Hi Eric,
>
> I am currrently facing the very same problem. I would like to implement a similar Wizard for creating a new project as in BasicNewProjectResourceWizard but I need to customize the new project (adding some natures).
>
> How did you solve this poor design problem?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:SelectionChanged(IAction.., ISelection..)
Next Topic:Delaying resource modifications to prevent "resource tree is locked" exception
Goto Forum:
  


Current Time: Fri Jul 19 14:32:58 GMT 2024

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

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

Back to the top