1 /*******************************************************************************
2  * Copyright (c) 2008, 2015 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  ******************************************************************************/
14 package org.eclipse.ui.internal.views.markers;
15 
16 import org.eclipse.core.commands.operations.IUndoContext;
17 import org.eclipse.core.resources.IMarker;
18 import org.eclipse.core.runtime.Assert;
19 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
20 import org.eclipse.ui.views.markers.MarkerSupportView;
21 import org.eclipse.ui.views.markers.internal.MarkerMessages;
22 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
23 
24 
25 /**
26  * TasksView is the ide view for showing tasks.
27  * @since 3.4
28  *
29  */
30 public class TasksView extends MarkerSupportView {
31 
32 	/**
33 	 * Create a new instance of the receiver.
34 	 */
TasksView()35 	public TasksView() {
36 		super(MarkerSupportRegistry.TASKS_GENERATOR);
37 
38 	}
39 
40 	@Override
getUndoContext()41 	protected IUndoContext getUndoContext() {
42 		return WorkspaceUndoUtil.getTasksUndoContext();
43 	}
44 
45 	@Override
getDeleteOperationName(IMarker[] markers)46 	protected String getDeleteOperationName(IMarker[] markers) {
47 		Assert.isLegal(markers.length > 0);
48 		return markers.length == 1 ? MarkerMessages.deleteTaskMarker_operationName : MarkerMessages.deleteTaskMarkers_operationName;
49 	}
50 
51 }
52