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

Maybe you meant MBSCustomPage?  MBSCustomPageManager is a singleton and you are not meant to subclass it as it is the entity in CDT that manages all the pages.


===========================
Chris Recoskie
Team Lead
Rational Developer For AIX & Linux C/C++
Rational Developer For System z C/C++
IBM Eclipse CDT and RDT
IBM Toronto


Inactive hide details for charleytims ---04/14/2014 06:54:19 PM---If I take the function  "public boolean canFlipToNextPage()" charleytims ---04/14/2014 06:54:19 PM---If I take the function  "public boolean canFlipToNextPage()" there is actually no implementation of

From: charleytims <pwdavari@xxxxxxxx>
To: cdt-dev@xxxxxxxxxxx
Date: 04/14/2014 06:54 PM
Subject: Re: [cdt-dev] Using the MBSCustomPage Class
Sent by: cdt-dev-bounces@xxxxxxxxxxx





If I take the function  "public boolean canFlipToNextPage()" there is
actually no implementation of MBSCustomPageManager in my wizardPage. Is this
a problem?

The import is still there but I get the warning that it is not used. I did
the -clean command but did not see any different results when running the
application. Is there any implementations of MBSCustomPageManager that have
to be in my wizard page class?






I would suggest you step through the code in MBSCustomPageManager that
loads the extensions and confirm that your contributions are being properly
loaded.  If that holds true then run the wizard and step through the code
and see if your page gets called at all.

There can be a lot of reasons why your contribution may not work... are the
IDs correct?  Did you export the packages that your page class requires so
other plugins can access them?  Are the dependencies for your plugin
satisfied?  Did you drop in a new version of your plugin but not change the
version number or launch eclipse with the -clean option so it would pick it
up?  etc.  Without all the information it's difficult to track down your
problem.


===========================
Chris Recoskie
Team Lead
Rational Developer For AIX & Linux C/C++
Rational Developer For System z C/C++
IBM Eclipse CDT and RDT
IBM Toronto



From: charleytims &lt;pwdavari@&gt;
To: cdt-dev@
Date: 04/13/2014 10:51 PM
Subject: [cdt-dev] Using the MBSCustomPage Class
Sent by: cdt-dev-bounces@



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-tp166748p166773.html
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


GIF image


Back to the top