blob: b97ee37ecd2a55ff41a0705cbc90752fe493735b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2003 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.eclipse.ui.views.markers.internal;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.Dialog;
/**
* This action opens a Filters Dialog and notifies the Marker View if the user has
* modified the filter via the filters dialog.
*/
class FiltersAction extends Action {
private TableView view;
private Dialog dialog;
/**
* Creates the action
*/
public FiltersAction(TableView view, Dialog dialog) {
super(Messages.getString("filtersAction.title")); //$NON-NLS-1$
setImageDescriptor(ImageFactory.getImageDescriptor("clcl16/filter_ps.gif")); //$NON-NLS-1$
this.view = view;
this.dialog = dialog;
setEnabled(true);
}
/**
* Opens the dialog. Notifies the view if the filter has been modified.
*/
public void run() {
if (dialog != null && dialog.open() == Dialog.OK)
view.filtersChanged();
}
}