Java tutorial
/* * 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.cenrep.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 wizards.NewRepositoryWizard; public class NewRepositoryAction extends WorkbenchWindowActionDelegate implements IViewActionDelegate { public void init(IViewPart view) { } public void run(IAction action) { NewRepositoryWizard wizard = new NewRepositoryWizard(); wizard.init(getWindow().getWorkbench(), StructuredSelection.EMPTY); WizardDialog wizardDialog = new WizardDialog(getWindow().getShell(), wizard); wizardDialog.open(); } }