Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Using the MBSCustomPage Class

Hey George, thanks for the response. I only specified the projectType, when
differentiating between when the custom page should be added or not. Even
when I take the projectType out as a child element of the wizardPage, and
try any listed projectType while running the application, the wizard page
does not show.

Am I correct in thinking that with no child elements the wizard page should
always show up? I'm thinking there MUST be some iin the pageClass java code
I am missing to implement the page.

Also, am I correct in understanding the operationClass is irrelevant when it
comes to getting the UI of the page to at least show up?

Here is the section of the .xml you were referring to. Possibly I'm missing
something? Thanks!

<plugin>
   <extension
         point="org.eclipse.cdt.managedbuilder.ui.newWizardPages">
      <wizardPage
            ID="Testing.wizardPage2"
            operationClass="testing.CustomPageRunnable2"
            pageClass="testing.CustomPageImplementation2">
         <projectType
               projectTypeID="Testing.projectType1">
         </projectType>
      </wizardPage>
   </extension>
   <extension
         id="testing.buildDefinitions2"
         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
      <projectType
            id="Testing.projectType1"
            isAbstract="false"
            isTest="false"
            name="Testing Project Type">
         <configuration
              
buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
               id="Testing.configuration1"
               name="Debug2">






George Loring wrote
> I stumbled through this in what sounds like a very similar fashion as what
> you did, so take my advice with a grain of salt.  What does the extension
> point tag in your plugin.xml look like?  Do you have the wizardPage
> configured with the correct projectType and nature?
> 
> -----Original Message-----
> From: 

> cdt-dev-bounces@

>  [mailto:

> cdt-dev-bounces@

> ] On Behalf Of charleytims
> Sent: Sunday, April 13, 2014 9:50 PM
> To: 

> cdt-dev@

> Subject: [cdt-dev] Using the MBSCustomPage Class
> 
> I'm currently trying to implement a custom page to the new project wizard
> by
> using the org.eclipse.cdt.managedbuilder.ui.newWizardPages. I want the
> custom page to be added to the wizard when a particular projectType has
> been
> selected.
> 
> I have set the new wizardPage (id=Testing.wizardPage2) to have the child
> element of projectType with id= Testing.projectType1.
> 
> I then create the pageClass and operationClass for the corresponding
> wizard
> page.
> 
> In the newly created pageClass I extend MBSCustomPage.
> 
> I found an example of a custom wizard page (AlwaysPresentWizardPage) that
> also extended this class and used this already functioning code to test
> out
> my implementation.
> 
> When I run the plugin application, I see the custom project type and the
> custom toolchain that corresponds with it, but when I go to the end of the
> wizard my custom page never shows up.
> 
> Here is the code for the created pageClass:
> 
> 
> 
> public class CustomPageImplementation2 extends MBSCustomPage {
> 	
> 	private Composite composite;
> 
> 	public CustomPageImplementation2()
> 	{
> 		pageID = "Testing.wizardPage2";
> 	}
> 
> 	@Override
> 	public boolean canFlipToNextPage()
> 	{
> 
> 		return (MBSCustomPageManager.getNextPage(pageID) != null);
> 	}
> 
> 	@Override
> 	public String getName()
> 	{
> 		return new String("Custom Page Test");
> 	}
> 
> 
> 	@Override
> 	public void createControl(Composite parent)
> 	{
> 
> 		composite = new Composite(parent, SWT.NULL);
> 		composite.setLayout(new GridLayout());
> 		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
> 
> 		Text pageText = new Text(composite, SWT.CENTER);
> 		pageText.setBounds(composite.getBounds());
> 		pageText.setText("This page is a test page provided by the
> org.eclipse.cdt.managedbuilder.ui.tests plugin.");
> 		pageText.setVisible(true);
> 
> 	}
> 
> 	@Override
> 	public void dispose()
> 	{
> 		composite.dispose();
> 
> 	}
> 
> 	@Override
> 	public Control getControl()
> 	{
> 		return composite;
> 	}
> 
> 	@Override
> 	public String getDescription()
> 	{
> 		return new String("This page is for testing, please ignore it.");
> 	}
> 
> 	@Override
> 	public String getErrorMessage()
> 	{
> 		return null;
> 	}
> 
> 	@Override
> 	public Image getImage()
> 	{
> 		return wizard.getDefaultPageImage();
> 	}
> 
> 	@Override
> 	public String getMessage()
> 	{
> 		// TODO Auto-generated method stub
> 		return null;
> 	}
> 
> 	@Override
> 	public String getTitle()
> 	{
> 		return new String("Test Page");
> 	}
> 
> 	@Override
> 	public void performHelp()
> 	{
> 		// do nothing
> 
> 	}
> 
> 	@Override
> 	public void setDescription(String description)
> 	{
> 		// do nothing
> 
> 	}
> 
> 	@Override
> 	public void setImageDescriptor(ImageDescriptor image)
> 	{
> 		// do nothing
> 
> 	}
> 
> 	@Override
> 	public void setTitle(String title)
> 	{
> 		// do nothing
> 
> 	}
> 
> 	@Override
> 	public void setVisible(boolean visible)
> 	{
> 		composite.setVisible(visible);
> 
> 	}
> 
> 	@Override
> 	protected boolean isCustomPageComplete()
> 	{
> 		return true;
> 	}
> 
> 
> I'm not sure how I am supposed to implement the CustomPageManager even
> after
> reading the documentation. Could anybody lead me in the right direction
> from
> here on how to implement custom pages and manage them with my wizard? 
> 
> Any help would be appreciated. Thanks
> 
> 
> 
> --
> View this message in context:
> http://eclipse.1072660.n5.nabble.com/Using-the-MBSCustomPage-Class-tp166748.html
> Sent from the Eclipse CDT - Development mailing list archive at
> Nabble.com.
> _______________________________________________
> cdt-dev mailing list

> cdt-dev@

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

> cdt-dev@

> https://dev.eclipse.org/mailman/listinfo/cdt-dev





--
View this message in context: http://eclipse.1072660.n5.nabble.com/Using-the-MBSCustomPage-Class-tp166748p166769.html
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.


Back to the top