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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package org.eclipse.jdt.ui.actions;
14 import org.eclipse.core.runtime.CoreException;
16 import org.eclipse.jface.viewers.IStructuredSelection;
18 import org.eclipse.ui.INewWizard;
19 import org.eclipse.ui.PlatformUI;
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;
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>
32 * This class may be instantiated; it is not intended to be subclassed.
37 * @noextend This class is not intended to be subclassed by clients.
39 public class OpenNewSourceFolderWizardAction extends AbstractOpenWizardAction {
42 * Creates an instance of the <code>OpenNewSourceFolderWizardAction</code>.
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);
53 * @see org.eclipse.jdt.ui.actions.AbstractOpenWizardAction#createWizard()
56 protected final INewWizard createWizard() throws CoreException {
57 return new NewSourceFolderCreationWizard();