1 11 12 package org.eclipse.ui.views.tasklist; 13 14 import org.eclipse.core.resources.IMarker; 15 import org.eclipse.jface.viewers.IStructuredSelection; 16 import org.eclipse.ui.PlatformUI; 17 18 21 class TaskPropertiesAction extends TaskAction { 22 23 29 public TaskPropertiesAction(TaskList tasklist, String id) { 30 super(tasklist, id); 31 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, 32 ITaskListHelpContextIds.TASK_PROPERTIES_ACTION); 33 } 34 35 38 public void run() { 39 IStructuredSelection sel = (IStructuredSelection) getTaskList() 40 .getSelection(); 41 Object o = sel.getFirstElement(); 42 if (o instanceof IMarker) { 43 TaskPropertiesDialog dialog = new TaskPropertiesDialog(getShell()); 44 dialog.setMarker((IMarker) o); 45 dialog.open(); 46 } 47 } 48 } 49 | Popular Tags |