/**
* Copyright (c) 2008 Aptana, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl -v10.html. If redistributing this code,
* this entire header must remain intact.
*
* This file is based on a JDT equivalent:
********************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.rubypeople.rdt.internal.ui.wizards;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.PlatformUI;
import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
import org.rubypeople.rdt.internal.ui.RubyPluginImages;
import org.rubypeople.rdt.internal.ui.actions.ActionMessages;
import org.rubypeople.rdt.ui.actions.AbstractOpenWizardAction;
public class OpenNewRubyProjectWizardAction extends AbstractOpenWizardAction {
/**
* Creates an instance of the <code>OpenNewRubyProjectWizardAction</code>.
*/
public OpenNewRubyProjectWizardAction() {
setText(ActionMessages.OpenNewRubyProjectWizardAction_text);
setDescription(ActionMessages.OpenNewRubyProjectWizardAction_description);
setToolTipText(ActionMessages.OpenNewRubyProjectWizardAction_tooltip);
setImageDescriptor(RubyPluginImages.DESC_WIZBAN_NEWJPRJ);
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IRubyHelpContextIds.OPEN_PROJECT_WIZARD_ACTION);
setShell(RubyPlugin.getActiveWorkbenchShell());
}
/* (non-Javadoc)
* @see org.eclipse.jdt.ui.actions.AbstractOpenWizardAction#createWizard()
*/
protected final INewWizard createWizard() throws CoreException {
return new RubyProjectWizard();
}
/* (non-Javadoc)
* @see org.eclipse.jdt.ui.actions.AbstractOpenWizardAction#doCreateProjectFirstOnEmptyWorkspace(Shell)
*/
protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell shell) {
return true; // can work on an empty workspace
}
}