com.nokia.s60ct.gui.actions.NewConfigurationAction.java Source code

Java tutorial

Introduction

Here is the source code for com.nokia.s60ct.gui.actions.NewConfigurationAction.java

Source

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

package com.nokia.s60ct.gui.actions;

import org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;

import com.nokia.s60ct.gui.wizard.NewConfigurationWizard;

public class NewConfigurationAction extends WorkbenchWindowActionDelegate implements IViewActionDelegate {

    public void init(IViewPart view) {
    }

    public void run(IAction action) {
        NewConfigurationWizard wizard = new NewConfigurationWizard();
        wizard.init(getWindow().getWorkbench(), StructuredSelection.EMPTY);
        WizardDialog wizardDialog = new WizardDialog(getWindow().getShell(), wizard);
        wizardDialog.open();
    }

}