/******************************************************************************* * Copyright (c) 2009 the CHISEL group and contributors. * 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: * the CHISEL group - initial API and implementation *******************************************************************************/ package ca.uvic.chisel.javasketch.ui.internal.search; import org.eclipse.jface.action.IAction; import org.eclipse.search.ui.NewSearchUI; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.actions.ActionDelegate; /** * @author Del Myers * */ public class SearchDialogAction extends ActionDelegate implements IWorkbenchWindowActionDelegate { private IWorkbenchWindow window; /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ @Override public void init(IWorkbenchWindow window) { this.window = window; } /* (non-Javadoc) * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction) */ @Override public void run(IAction action) { if (window != null) { NewSearchUI.openSearchDialog(window, TraceSearchPage.ID); } } }