1 11 12 package org.eclipse.ui.texteditor; 13 14 15 import java.util.Map ; 16 import java.util.ResourceBundle ; 17 18 import org.eclipse.core.resources.IMarker; 19 import org.eclipse.core.resources.IResource; 20 21 import org.eclipse.ui.views.tasklist.TaskPropertiesDialog; 22 23 24 28 public class AddTaskAction extends AddMarkerAction { 29 30 42 public AddTaskAction(ResourceBundle bundle, String prefix, ITextEditor editor) { 43 super(bundle, prefix, editor, IMarker.TASK, false); 44 } 45 46 49 public void run() { 50 51 IResource resource= getResource(); 52 if (resource == null) 53 return; 54 Map attributes= getInitialAttributes(); 55 56 TaskPropertiesDialog dialog= new TaskPropertiesDialog(getTextEditor().getSite().getShell()); 57 dialog.setResource(resource); 58 dialog.setInitialAttributes(attributes); 59 dialog.open(); 60 } 61 } 62 | Popular Tags |