Bug 17703 Edit-Add Task action should use Workbench dialog as Java Editor does
F1 - select CU in packages view - execute File->Add Task observe: you get a different dialog than executing the action from the Java editors ruler context menu
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/AddTaskAction.java
if (resource == null)
			return;
		InputDialog dialog= new InputDialog(getShell(), getDialogTitle(), ActionMessages.getString("AddTaskAction.inputDialog.message"), "", null); 
		if (dialog.open() == IDialogConstants.CANCEL_ID)
			return;
			
		String message= dialog.getValue().trim();
		Map attributes= new HashMap(2);
		MarkerUtilities.setMessage(attributes, message);
		try {
			MarkerUtilities.createMarker(resource, attributes, IMarker.TASK);
		} catch (CoreException e) {
			ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.getString("AddTaskAction.error.create_failed")); 
		}	
	}
	
	private IResource getElement(IStructuredSelection selection) {
		if (selection.size() != 1)
			return null;
		Object element= selection.getFirstElement();
		if (!(element instanceof IAdaptable))
			return null;
		return (IResource)((IAdaptable)element).getAdapter(IResource.class);
	}
	
	private String getDialogTitle() {
		return ActionMessages.getString("AddTaskAction.dialog.title"); 
	}
}