Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to programmatically select the existing projects into workspace ?
How to programmatically select the existing projects into workspace ? [message #323891] Fri, 11 January 2008 07:55 Go to next message
Eclipse UserFriend
Originally posted by: abinashsahu.hsbc.co.in

Hi

I am creating a cheatsheet where in I am automating some instructions. The instruction is to import some existing projects into workspace and then continue with some other processing. I am able to open the import wizard programmatically by the following code :

IWorkbench workbench = PlatformUI.getWorkbench();
Shell shell = workbench.getActiveWorkbenchWindow().getShell();
ImportWizard wizard = new ImportWizard();
wizard.init(workbench, new StructuredSelection());
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.open();

but I am not able to select the <b>existing projects into workspace</b> option from the wizard list programmatically.
Please help.
Re: How to programmatically select the existing projects into workspace ? [message #323901 is a reply to message #323891] Fri, 11 January 2008 13:19 Go to previous message
Eclipse UserFriend
Get the first page of the wizard, which should be a subclass of
WorkbenchWizardSelectionPage. This page has a method on it call
selectWizardNode() which is what you want.

I won't know off the top of my head how you would discover the
IWizardNode to select, but in looking around those classes, you can
probably find a way.

Abinash wrote:
> Hi
>
> I am creating a cheatsheet where in I am automating some instructions. The instruction is to import some existing projects into workspace and then continue with some other processing. I am able to open the import wizard programmatically by the following code :
>
> IWorkbench workbench = PlatformUI.getWorkbench();
> Shell shell = workbench.getActiveWorkbenchWindow().getShell();
> ImportWizard wizard = new ImportWizard();
> wizard.init(workbench, new StructuredSelection());
> WizardDialog dialog = new WizardDialog(shell, wizard);
> dialog.create();
> dialog.open();
>
> but I am not able to select the <b>existing projects into workspace</b> option from the wizard list programmatically.
> Please help.
Previous Topic:executing at post_change event
Next Topic:How can I fix conditional breakpoint errors?
Goto Forum:
  


Current Time: Thu Jul 17 20:47:08 EDT 2025

Powered by FUDForum. Page generated in 0.07334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top