How project/wizard is associated with perspective?

eclipse, eclipse-plugin, eclipse-rcp

Solution

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

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

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.

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

Problem

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? 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 :-)

Original source