1 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 |