Java tutorial
/******************************************************************************* * Copyright (c) 2013 Igor Zapletnev * * 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 * * Contributors: * Igor Zapletnev - initial API and Implementation *******************************************************************************/ package org.eclipse.regexp.ui.view; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.jface.preference.PreferenceDialog; import org.eclipse.regexp.ui.RegexpUIConstants; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.PreferencesUtil; public class RegexpPreferencesHandler extends AbstractHandler { @Override public Object execute(final ExecutionEvent event) throws ExecutionException { PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn( PlatformUI.getWorkbench().getDisplay().getActiveShell(), RegexpUIConstants.PREF_PAGE, null, null); pref.open(); return null; } }