Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] MBS wizard page can't get project template type in time to show a different wizard page content

I am using project templates to nicely allow several types of C projects
with different sample content, ideal for a tutorial so the students have
easily-created C projects.

I am using MBSCustomPage to add a wizard page that calculates how to add
the include paths, and other calculated entities.
(Can't use the static information that a template wizard page could do.)

I want to use a different wizard page depending on the type of project the
user selected from the templates, but I can't seem to get that information
in time to
affect which wizard page I show.
In order to get the project type, I added a process type that just
remembers the project type:
 <extension point="org.eclipse.cdt.core.templateProcessTypes">
  <processType name="storeInfo"
   processRunner=
"org.eclipse.ptp.pldt.wizards.wizardPages.StoreInfoProcessRunner">
   <simple name=."projectName"> </simple>
   <simple name=."projectType"> </simple>
  </processType>.
 </extension>

So then in the template.xml I put:
      <process type="org.eclipse.ptp.pldt.wizards.storeInfo">
            <simple name="projectName" value="$(projectName)"/>
            <simple name="projectType" value="mpi_project"/>
      </process>
This way I should be able to determine that the user chose an "mpi_project"

However, I don't get this information in time.
Here's the order that things happen  (MPIProjectWizardPage is an
MBSCustomPage).

StoreInfoProcessRunner.ctor()
MPIProjectWizardPage().ctor...
  projectType=null  --- don't know it yet
MPIProjectWizardPage.createUserEntryArea()
  projectType=null  --- don't know it yet   (need it at this point to
determine what wizard page to show, but earlier would be better)
StoreInfoProcessRunner.process()...
  projectName=mpihello2 ---> now I have it, but it's too late.

Is there any way to get some information about which template is running,
before the MBS wizard page displays?

...Beth

Beth Tibbitts  (859) 243-4981  (TL 545-4981)
High Productivity Tools / Parallel Tools  http://eclipse.org/ptp
IBM T.J.Watson Research Center
Mailing Address:  IBM Corp., 455 Park Place, Lexington, KY 40511



Back to the top