[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cdt-dev] Custom Wizard Page Operation's Run Priority
- From: "Karol Krizka" <kkrizka@xxxxxxxxx>
- Date: Mon, 16 Jun 2008 09:36:30 -0700
- Delivered-to: firstname.lastname@example.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=hF7T5ZecwRR+z+gTBpCwxEZIC4gI5UibA01r0nahD1g=; b=Yg6xnFO1Wc60pTc4vF4cLEwWdcZ6P92RrGSaQkQwORxvmHjMsSSKSaUWCiwrhkmZM8 8SaKjMpqSotf0IA8PtkRNn0D6uhegU3DvZIVv2UuPz0zF2nUxILjltx2keXVu8JZMyZJ Kw7Bk33ds5DVSpt91VeewXFXbaUMsDjjSwvZs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Jch+EX0sTUVSf1bCwJlivimTm6x9wmi5oew4fbc43KeItXRdAaJPX63dXJlxGWp+zc +7GQLE1nTqfPVN3WNPs8/0VwuCPp+ZvHBsOe6AWHZlolLBPbziHkn9eNg1OWT3auG8pW c9Av2GCgUY7TA2dn5d9YsyqqrXIthriLnuVJo=
On Sun, Jun 15, 2008 at 2:50 PM, Hilliard, Bill <bill.hilliard@xxxxxxxxx> wrote:
> Have you looked at the optional IBM XLC support? The
> org.eclipse.cdt.managedbuilder.xlc.ui plugin seems to do something close
> to what you want. It extends the new project wizard to add a page that
> allows the user to specify the path to and the version of the IBM
That might be very close to what I need to do (actually, my wizard
page looks exactly (literally) as theirs). Do you know if it's
possible to get the source of that plugin? Importing it as source has
only the manifest and I can't find it in the CVS report.
> Hope that helps (and sorry for duplication if someone already suggested
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Karol Krizka
> Sent: Sunday, June 15, 2008 1:29 AM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] Custom Wizard Page Operation's Run Priority
> Thanks for the reply! (more below)
> On Fri, Jun 13, 2008 at 10:31 AM, Alex Chapiro <achapiro@xxxxxxx> wrote:
>> Karol Krizka wrote:
>>> I am working on a CDT projectType that needs to have a certain
>>> environment configured before it can be created. What I though of
>>> doing is to add an custom wizard page using the
>>> org.eclipse.cdt.managedbuilder.ui.newWizardPages extension, where the
>>> user will be asked to enter the configuration for the environment.
>> Actually, you shouldn't create new dialogs, it's already there. You
> can see
>> it if you on Select Configuration page press Advanced Settings button.
> I'm not making new dialogs, just extending the existing ones.
>> tricky thing is if you'd like calculate environment using some basic
>> parameters. In this case you can use class which implements
>> IConfigurationEnvironmentVariableSupplier interface. In my case for
>> I calculate environment from platform, compiler version, language type
>> something else. To simplify users task I let him edit these more
>> parameters on the extra tab property page, then reevaluate environment
>> (automatically). On the other hand user can edit environment directly.
>> Anyway, I couldn't do these changes without changing of CDT stuff.
> I'm already using that class during the build process. I just needed
> to extend the wizard page to get a few options to create the
> environment. The environment variables are set using a bash script,
> and the location of the script is what I need to get from the user.
>>> Then I wanted to use the operationClass to process the information,
>>> run the necessary commands and create the project using a template.
>>> But the problem is that the operationClass is run after the project
>>> created, which is too late. I have several ideas on how to get around
>>> this, but they seem a bit hacky and I'm wondering if there is a
>>> cleaner way to make sure that operationClass runs before the project
>>> is created.
>> This functionality exists in MBS and "almost" works. MBSWizardHandler
>> doCustom method. To do extra work during project creation I had to
>> invisible custom page and added custom operation to it. It works
> smooth now,
>> but unfortunately I had to change CDT stuff once again (not much, I
> Ah, I'll take a look at that method.
>>> Here is what I'm thinking of doing
>>> 1) Add a button to the custom wizard page that says "configure
>>> environment". Clicking it will run what needs to be run and enables
>>> the Next/Finish buttons of the wizard.
>>> 2) Add another custom process at the beginning of the template that
>>> will somehow grab the options and run the scripts. I don't like this
>>> approach, because I plan to create several templates for the
>>> projectType, and I don't really want to make sure that the custom
>>> process is included in every one of them...
>>> On a slightly related topic, is it possible to dynamically add/delete
>>> the custom page to the wizard? I know I can specity the projectType,
>>> natureID and toolchainID of projects for which to display the page,
>>> but that is not enough for what I need to do. The environment that
>>> this page will be created for is specific to the entire workspace, so
>>> I only need to display it the first time the user tries to create a
>>> project. What I'm thinking of doing is showing editable text boxes if
>>> he has not configured it yet and labels with current options if he
>>> configured it, but it would be even better if I could not display
>>> anything at all.
>> Yes, you can manipulate pages visibility as well as re-evaluate
>> previous and next pages
> I was afraid someone would suggest that. :P I guess I could do some
> "splicing" to remove the page after it was loaded. I'll play a bit
> around with it.
> Karol Krizka
> cdt-dev mailing list
> cdt-dev mailing list