[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[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.