KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > ui > actions > OpenNewSourceFolderWizardAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 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
12 package org.eclipse.jdt.ui.actions;
13
14 import org.eclipse.core.runtime.CoreException;
15
16 import org.eclipse.jface.viewers.IStructuredSelection;
17
18 import org.eclipse.ui.INewWizard;
19 import org.eclipse.ui.PlatformUI;
20
21 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
22 import org.eclipse.jdt.internal.ui.JavaPluginImages;
23 import org.eclipse.jdt.internal.ui.actions.ActionMessages;
24 import org.eclipse.jdt.internal.ui.wizards.NewSourceFolderCreationWizard;
25
26 /**
27  * <p>Action that opens the new source folder wizard. The action initializes the wizard with the
28  * selection as configured by {@link #setSelection(IStructuredSelection)} or the selection of
29  * the active workbench window.</p>
30  *
31  * <p>
32  * This class may be instantiated; it is not intended to be subclassed.
33  * </p>
34  *
35  * @since 3.2
36  */

37 public class OpenNewSourceFolderWizardAction extends AbstractOpenWizardAction {
38     
39     /**
40      * Creates an instance of the <code>OpenNewSourceFolderWizardAction</code>.
41      */

42     public OpenNewSourceFolderWizardAction() {
43         setText(ActionMessages.OpenNewSourceFolderWizardAction_text);
44         setDescription(ActionMessages.OpenNewSourceFolderWizardAction_description);
45         setToolTipText(ActionMessages.OpenNewSourceFolderWizardAction_tooltip);
46         setImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWSRCFOLDR);
47         PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_SOURCEFOLDER_WIZARD_ACTION);
48     }
49     
50     /* (non-Javadoc)
51      * @see org.eclipse.jdt.ui.actions.AbstractOpenWizardAction#createWizard()
52      */

53     protected final INewWizard createWizard() throws CoreException {
54         return new NewSourceFolderCreationWizard();
55     }
56 }
57
Popular Tags