Bug 520207

Summary: Mechanism to do specific project operations after standard project import
Product: [Eclipse Project] Platform Reporter: Alain Bernard <alain.bernard1224>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: olivier.prouvost
Version: 4.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Alain Bernard CLA 2017-07-26 07:38:44 EDT
When working on project with specific natures, it is sometimes useful to perform operations just after importing an existing project into workspace (modifying config files, etc.)

In some cases, there is no need to redefine a specific wizard, as the "Import Existing Projects into Workspace" does the job perfectly apart from the fine-grained configurations just after import. 

So, if we want to extend it to add specific custom behavior, we can:
- extend the o.e.ui.wizard.datatransfer.ExternalProjectImportWizard but it is idenfified as @noextend
- reimplement this wizard, reusing the page o.e.ui.internal.wizards.datatransfer.WizardProjectsImportPage, which is internal so it seems to be a bad idea too (and even with that we don't have access to the list of created IProject as it is not API)
- reimplement our own wizard by copy-pasting all the code, therefore not benefitting from potential bug fixes or improvements in the standard import wizard.

So is there a mechanism to be informed when projects are imported inside the workspace so that we can do our stuff there, is there a good method to do so that I didn't notice or is there a chance to open the API of the projects import wizard a bit?
Comment 1 Olivier Prouvost CLA 2017-07-26 08:40:45 EDT
It seems to be such a mechanism implemented in the CDT in the interfaces and classes : 

IProjectSettingsWizardPageStrategy
ProjectSettingsImportStrategy