]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/ui/org/eclipse/jdt/ui/actions/OpenNewSourceFolderWizardAction.java
0d9ae0b988c6e00e031e6fca3517210d4830d86b
[ifi-stolz-refaktor.git] / case-study / jdt-after / ui / org / eclipse / jdt / ui / actions / OpenNewSourceFolderWizardAction.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2011 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  * @noextend This class is not intended to be subclassed by clients.
38  */
39 public class OpenNewSourceFolderWizardAction extends AbstractOpenWizardAction {
40
41         /**
42          * Creates an instance of the <code>OpenNewSourceFolderWizardAction</code>.
43          */
44         public OpenNewSourceFolderWizardAction() {
45                 setText(ActionMessages.OpenNewSourceFolderWizardAction_text);
46                 setDescription(ActionMessages.OpenNewSourceFolderWizardAction_description);
47                 setToolTipText(ActionMessages.OpenNewSourceFolderWizardAction_tooltip);
48                 setImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWSRCFOLDR);
49                 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_SOURCEFOLDER_WIZARD_ACTION);
50         }
51
52         /* (non-Javadoc)
53          * @see org.eclipse.jdt.ui.actions.AbstractOpenWizardAction#createWizard()
54          */
55         @Override
56         protected final INewWizard createWizard() throws CoreException {
57                 return new NewSourceFolderCreationWizard();
58         }
59 }