Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Accessing data in New C Project Wizard

sorry, MBSCustomPageManager.getNextPage return an IWizardPage so my code should someting like:

IWizardPage nextPage = MBSCustomPageManager.getNextPage("org.eclipse.cdt.managedbuilder.ui.wizard.CConfigWizardPage"); // ID of last stock page before custom pages
 if (nextPage!=null) {
     setErrorMessage(null);      // not an error...
     return false;                         // just de-validate finish button
 }


On 13/02/2013 18:04, Antony Burton wrote:
I think I've found how to do it:

In CDTMainWizardPage, add following code to the method validatePage():

    boolean isNextPage = MBSCustomPageManager.getNextPage("org.eclipse.cdt.managedbuilder.ui.wizard.CConfigWizardPage"); // ID of last stock page before     custom pages
    if (isNextPage) {
        setErrorMessage(null);      // not an error...
        return false;                         // just de-validate finish button
    }

and something similar in CDTConfigWizardPage in the method isCustomPageComplete()

I have never done this before, but I will try to check this works using Eclipse SDK

Can you confirm that this is truly a bug?

Antony


On 13/02/2013 15:57, Antony Burton wrote:
OK, thanks.

I know that all pages are loaded when the wizard is evoked. Also, the id of the selected toolchain must be equal to the one in custom page's parameters for the next button to be validated on the second page. So the mechanism must be similar for the validation of the finish button. I will try and look into this by following what happens in MBSCustomPageManager...

On 13/02/2013 15:44, Chris Recoskie wrote:

This used to work.  I think this probably broke at some point when the wizards changed.

If I recall correctly, the way this used to work was that all custom pages were added to the wizard from the beginning regardless of their criteria.  The wizard kept the selected toolchain property up to date, and on each change asked MBSCustomPageManager whether the wizard could finish, which in turn would interrogate all the pages that should be active based on the toolchain.

===========================
Chris Recoskie
Team Lead, IBM CDT and RDT
IBM Toronto


Inactive hide details for Antony Burton ---02/13/2013
              04:22:01 AM---Yes, I know how to do this once I am in a
              custom page, but Antony Burton ---02/13/2013 04:22:01 AM---Yes, I know how to do this once I am in a custom page, but when I am on  the first stock page, I ent

From: Antony Burton <aburton@xxxxxxxxxxx>
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: 02/13/2013 04:22 AM
Subject: Re: [cdt-dev] Accessing data in New C Project Wizard
Sent by: cdt-dev-bounces@xxxxxxxxxxx





Yes, I know how to do this once I am in a custom page, but when I am on the first stock page, I enter a name for the project and the finish button is validated even though I have extended the wizard to have custom pages. I think that once a custom project type and toolchain have been chosen and there are custom pages, the finish button should be invalidated but I can't find how to do this...

On 12/02/2013 16:34, Chris Recoskie wrote:

    I believe it's up to the custom pages to report whether the wizard should be finishable or not.

    ===========================
    Chris Recoskie
    Team Lead, IBM CDT and RDT
    IBM Toronto


    Inactive hide details for Antony Burton ---02/11/2013
              12:28:44 PM---Hi, Thanks very much for the reply Chris! I
              can now get mAntony Burton ---02/11/2013 12:28:44 PM---Hi,   Thanks very much for the reply Chris! I can now get my project type with:

    From:
    Antony Burton <aburton@xxxxxxxxxxx>
    To:
    "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
    Date:
    02/11/2013 12:28 PM
    Subject:
    Re: [cdt-dev] Accessing data in New C Project Wizard
    Sent by:
    cdt-dev-bounces@xxxxxxxxxxx



    Hi,
    Thanks very much for the reply Chris! I can now get my project type with:

      Object theData = MBSCustomPageManager.getPageProperty("org.eclipse.cdt.managedbuilder.ui.wizard.platformPage", "projectType");
      String projType = theData.toString();

    I just have another small question: is it possible to de-validate the finish button on the first page if my project type is selected? For me this is essential to stop the user finishing before reaching the custom pages.

    Thanks again,

    Antony

    On 08/02/2013 17:12, Chris Recoskie wrote:

      See org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager.addPageProperty(String, String, Object) and org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager.getPageProperty(String, String)

      The stock pages set some properties that you can query from your own pages or from your operation class.

      ===========================
      Chris Recoskie
      Team Lead, IBM CDT and RDT
      IBM Toronto


      Inactive hide details for Antony Burton
                ---02/08/2013 11:08:25 AM---Hi, Have asked this question
                before (both here and on CDAntony Burton ---02/08/2013 11:08:25 AM---Hi,    Have asked this question before (both here and on CDT forum) but no

      From:
      Antony Burton <aburton@xxxxxxxxxxx>
      To:
      cdt-dev@xxxxxxxxxxx
      Date:
      02/08/2013 11:08 AM
      Subject:
      [cdt-dev] Accessing data in New C Project Wizard
      Sent by:
      cdt-dev-bounces@xxxxxxxxxxx 



      Hi,
      Have asked this question before (both here and on CDT forum) but no
      answer, so getting a little desperate!

      I will try to be clearer:

      I have extended and added new custom pages to the New C Project wizard
      by extendingorg.eclipse.cdt.managedbuilder.ui.newWizardPages

      How can I access data entered into the first New C Project wizard page
      from one of my custom pages?

      I would really appreciate it if someone could give me an answer.

      I have already searched the internet and CDT forum and read the Managed
      Build System Extensibility Document.

      Thanks,

      Antony


      _______________________________________________
      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



    _______________________________________________
    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



_______________________________________________
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