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 during wizard page execution

Beth,

Yes. It is Java, so you can do whatever you want!

I couldn't find anywhere to store it in the classes that were accessible to me, so I created my own class where I kept the data that I wanted to persist. I then used MyClass.getDefault() in my custom page wizard to access the persistent data.

I am trying (hard) to avoid modifying CDT, so this method works without modifying CDT.

HTH
--
Derek


Beth Tibbitts wrote:
Derek,
When you wrote your own template process  (I'll look into that) were you
able to write anything persistant that you could access *after* the
template pages are completed?
Such as, in the IProject, or elsewhere?

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


subs <dmsubs@consertum .com> To Sent by: "CDT General developers list." cdt-dev-bounces@e <cdt-dev@xxxxxxxxxxx> clipse.org cc Subject 11/01/2007 04:09 Re: [cdt-dev] Determine which AM project template was selected during wizard page execution Please respond to "CDT General developers list." <cdt-dev@eclipse. org>



Beth,

I was trying to do something similar, but couldn't come up with a way of
doing
it using the standard model. So, I wrote my own template Processes. This
allowed
me to do several other things (a Wildcard copy of files, for example)

I think there are a number of serious limitations to the templates and
Custom
wizard pages that need some thought through if they are to be useful (you
can
really tell they were developed independently!):

1. Currently, they are entirely independent processes, with no interaction
between them (unless you write your own template process). There needs to
be a
way for them to co-operate (share data and UI).

2. The template UI is static. That is, there is no way to modify what to
display
at run time. For example I want to be able to populate a combo box with
things I
can only know at run time. We'll ignore the fact that the UI is very
crude...

3. I'd like to be able to modify the 'flow' through the template UI
depending on
selections made by the user (e.g. show/hide particular pages).

There are others, but I can't remember them off the top of my head...
--
Derek


Beth Tibbitts wrote:
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

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


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



Back to the top