1 11 12 package org.eclipse.ui.views.markers.internal; 13 14 import org.eclipse.core.resources.IMarker; 15 import org.eclipse.jface.viewers.ISelectionProvider; 16 import org.eclipse.jface.viewers.IStructuredSelection; 17 import org.eclipse.ui.IWorkbenchPart; 18 19 24 public class ActionProblemProperties extends MarkerSelectionProviderAction { 25 26 private IWorkbenchPart part; 27 28 33 public ActionProblemProperties(IWorkbenchPart part, 34 ISelectionProvider provider) { 35 super(provider, MarkerMessages.propertiesAction_title); 36 setEnabled(false); 37 this.part = part; 38 } 39 40 43 public void run() { 44 45 IMarker marker = getSelectedMarker(); 46 DialogMarkerProperties dialog = new DialogProblemProperties(part 47 .getSite().getShell()); 48 dialog.setMarker(marker); 49 dialog.open(); 50 } 51 52 55 public void selectionChanged(IStructuredSelection selection) { 56 setEnabled(Util.isSingleConcreteSelection(selection)); 57 } 58 } 59 | Popular Tags |