01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.search.dependencies;
11:
12: import org.eclipse.core.runtime.jobs.Job;
13: import org.eclipse.jface.action.Action;
14: import org.eclipse.pde.core.plugin.IPluginModelBase;
15: import org.eclipse.pde.internal.ui.PDEPluginImages;
16: import org.eclipse.pde.internal.ui.PDEUIMessages;
17: import org.eclipse.ui.progress.IProgressConstants;
18:
19: public class UnusedDependenciesAction extends Action {
20:
21: private IPluginModelBase fModel;
22:
23: private boolean fReadOnly;
24:
25: public UnusedDependenciesAction(IPluginModelBase model,
26: boolean readOnly) {
27: fModel = model;
28: setText(PDEUIMessages.UnusedDependencies_action);
29: fReadOnly = readOnly;
30: }
31:
32: public void run() {
33: Job job = new UnusedDependenciesJob(
34: PDEUIMessages.UnusedDependenciesAction_jobName, fModel,
35: fReadOnly);
36: job.setUser(true);
37: job.setProperty(IProgressConstants.ICON_PROPERTY,
38: PDEPluginImages.DESC_PSEARCH_OBJ.createImage());
39: job.schedule();
40: }
41:
42: }
|