4

After we create a new project in eclipse, a dialog will be showed as following picture if our current perspective is not associated with this kind of project. So how do Eclipse make this programmatically?

Associated with perspective

I think it depends on the project nature but the perspective extension point has nothing to connect with the project nature.

Tks for your time :-)

Sam Su
  • 6,532
  • 8
  • 39
  • 80

1 Answers1

4

You have to set the finalPerspective attribute in your wizard. See Associating a Wizard with a Perspective for reference:

  1. Add the finalPerspective attribute to the definition of our wizard element in the extension.

  2. Make the Wizard class implement the interface IExecutableExtension. This interface has only one method setInitializationData. Implement the method in the class and assign the parameter IConfigurationElement to a field in the method.

  3. In the performFinish method of the Wizard, call BasicNewProjectResourceWizard.updatePerspective method.

Kai
  • 38,985
  • 14
  • 88
  • 103