Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Determine which project template was selected

Rekha, that sounds promising. I'll have a look at that, too

...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


                                                                           
             "Rekha Deshmukh"                                              
             <Rekha.Deshmukh@k                                             
             pitcummins.com>                                            To 
             Sent by:                  <cdt-dev@xxxxxxxxxxx>               
             cdt-dev-bounces@e                                          cc 
             clipse.org                                                    
                                                                   Subject 
                                       Re: [cdt-dev] Determine which       
             11/01/2007 08:41          project template was selected       
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
               "CDT General                                                
             developers list."                                             
             <cdt-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           




 Hi Beth,

      I also came across same issue with template and custom pages
provided to template. I was not able to get the selected template. I
needed to update the template macro in template value store to run the
template processes at end of project  creation. As I was not getting
template selected or template's pages after the finish button is clicked
or not even in my own process Runner. I added the below mentioned code
to MBSWizardHandler.createProject() as a workaround :

IWizardPage[] wizardPages = MBSCustomPageManager.getCustomPages();
      for(int wizCnt = 0 ; wizCnt < wizardPages.length ;wizCnt++)
      {
            if(  ( wizardPages[wizCnt] instanceof  IWizardDataPage)
                                    &&
(IWizardDataPage)wizardPages[wizCnt]  instanceof  MBSCustomPage)
            {
                  Map map =
(IWizardDataPage)wizardPages[wizCnt]).getPageData();
                  if ( entryInfo.getTemplate() != null &&  map != null)

entryInfo.getTemplate().getValueStore().putAll( map);
            }
      }

With this I was able to get the selected template and respective values
stored.

Regards,
Rekha

-----------------------------
Original Message
Date: Wed, 31 Oct 2007 21:15:08 -0400
From: Beth Tibbitts <tibbitts@xxxxxxxxxx>
Subject: [cdt-dev] Determine which project template was selected
             during            wizard page execution
To: cdt-dev@xxxxxxxxxxx
Message-ID:

<OF9F21B8A3.13C405FE-ON85257386.00050981-85257386.0006E0F1@xxxxxxxxxx>
Content-Type: text/plain; charset=US-ASCII


I need to determine which project template was selected by the user,
while
i am processing a wizard page from the managed build wizard pages.
So basically, I'm using the project templates from the templateengine
but
the wizard pages from the managed build system. (since i have some
specific
processing to do, accessing the MBS data).

While in the wizard page, i want to make decisions about what to show
the
user, and which MBS settings to modify, based on which project template
was
selected.

<extension point="org.eclipse.cdt.managedbuilder.ui.newWizardPages">
 <wizardPage.
  ID="org.eclipse.ptp.pldt.wizards.wizardPages.MPIProjectWizardPage"
  operationClass=
"org.eclipse.ptp.pldt.wizards.wizardPages.MPIProjectRunnable" //
Runnable
  pageClass=.
"org.eclipse.ptp.pldt.wizards.wizardPages.MPIProjectWizardPage"> //
MBSCustomPage
 </wizardPage>
 </extension>

<extension point="org.eclipse.cdt.core.templates">
 <template
   id="org.eclipse.ptp.pldt.projects.MPIhelloWorldCProject"
   location=."templates/MPIhelloWorldCproject/template.xml"
   projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
 </template>.

How can i tell, while in the MBSCustomPage (wizard page), which template
was selected by the user?
If there was a way to set an attribute/value in the template xml, and
access that from the MBSCustomPage, I think I could do what I need to
do.

Does anyone know how to do this?

I would also be happy if I could run a different MBS wizard page based
on
project type, but the project types aren't fine-grained enough
(they are not my projects determined by the templates).

More discussion of this is in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205182

Can anyone help? Thanks.


...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


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top