KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > wizards > tools > OrganizeManifestsWizard


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.ui.wizards.tools;
12
13 import java.lang.reflect.InvocationTargetException JavaDoc;
14 import java.util.ArrayList JavaDoc;
15
16 import org.eclipse.jface.wizard.Wizard;
17 import org.eclipse.pde.internal.ui.PDEPlugin;
18 import org.eclipse.pde.internal.ui.PDEPluginImages;
19 import org.eclipse.pde.internal.ui.PDEUIMessages;
20
21 public class OrganizeManifestsWizard extends Wizard {
22
23     private OrganizeManifestsWizardPage fMainPage;
24     private ArrayList JavaDoc fProjects;
25     
26     public OrganizeManifestsWizard(ArrayList JavaDoc projects) {
27         fProjects = projects;
28         setNeedsProgressMonitor(true);
29         setWindowTitle(PDEUIMessages.OrganizeManifestsWizard_title);
30         setDialogSettings(PDEPlugin.getDefault().getDialogSettings());
31         setDefaultPageImageDescriptor(PDEPluginImages.DESC_ORGANIZE_MANIFESTS);
32     }
33
34     public boolean performFinish() {
35         fMainPage.preformOk();
36         try {
37             OrganizeManifestsOperation op = new OrganizeManifestsOperation(fProjects);
38             op.setOperations(fMainPage.getSettings());
39             getContainer().run(false, true, op);
40         } catch (InvocationTargetException JavaDoc e) {
41             PDEPlugin.log(e);
42             return false;
43         } catch (InterruptedException JavaDoc e) {
44             PDEPlugin.log(e);
45             return false;
46         }
47         return true;
48     }
49     
50     public void addPages() {
51         fMainPage = new OrganizeManifestsWizardPage();
52         addPage(fMainPage);
53     }
54 }
55
Popular Tags