KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > search > dependencies > UnusedDependenciesAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.ui.search.dependencies;
12
13 import org.eclipse.core.runtime.jobs.Job;
14 import org.eclipse.jface.action.Action;
15 import org.eclipse.pde.core.plugin.IPluginModelBase;
16 import org.eclipse.pde.internal.ui.PDEPluginImages;
17 import org.eclipse.pde.internal.ui.PDEUIMessages;
18 import org.eclipse.ui.progress.IProgressConstants;
19
20 public class UnusedDependenciesAction extends Action {
21     
22     private IPluginModelBase fModel;
23
24     private boolean fReadOnly;
25
26     public UnusedDependenciesAction(IPluginModelBase model, boolean readOnly) {
27         fModel = model;
28         setText(PDEUIMessages.UnusedDependencies_action);
29         fReadOnly = readOnly;
30     }
31
32     public void run() {
33         Job job = new UnusedDependenciesJob(PDEUIMessages.UnusedDependenciesAction_jobName, fModel, fReadOnly);
34         job.setUser(true);
35         job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_PSEARCH_OBJ.createImage());
36         job.schedule();
37     }
38
39 }
40
Popular Tags