Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 235657 | Differences between
and this patch

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %Plugin.name
3
Bundle-Name: %Plugin.name
4
Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
4
Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
5
Bundle-Version: 3.6.100.qualifier
5
Bundle-Version: 3.7.0.qualifier
6
Bundle-ClassPath: e4-ide.jar,
6
Bundle-ClassPath: e4-ide.jar,
7
 .
7
 .
8
Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
8
Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
(-)src/org/eclipse/ui/ide/undo/AbstractMarkersOperation.java (-3 / +13 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 25-30 Link Here
25
import org.eclipse.core.runtime.jobs.MultiRule;
25
import org.eclipse.core.runtime.jobs.MultiRule;
26
import org.eclipse.ui.internal.ide.undo.MarkerDescription;
26
import org.eclipse.ui.internal.ide.undo.MarkerDescription;
27
import org.eclipse.ui.internal.ide.undo.UndoMessages;
27
import org.eclipse.ui.internal.ide.undo.UndoMessages;
28
import org.eclipse.ui.views.markers.internal.MarkerType;
29
import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
28
30
29
/**
31
/**
30
 * An AbstractMarkersOperation represents an undoable operation that affects
32
 * An AbstractMarkersOperation represents an undoable operation that affects
Lines 253-268 Link Here
253
255
254
			}
256
			}
255
		}
257
		}
258
256
		if (types != null) {
259
		if (types != null) {
260
			MarkerType bookmarkType= MarkerTypesModel.getInstance().getType(IMarker.BOOKMARK);
261
			MarkerType taskType= MarkerTypesModel.getInstance().getType(IMarker.TASK);
262
			MarkerType problemType= MarkerTypesModel.getInstance().getType(IMarker.PROBLEM);
263
257
			for (int i = 0; i < types.length; i++) {
264
			for (int i = 0; i < types.length; i++) {
258
				// Marker type could be null if marker did not exist.
265
				// Marker type could be null if marker did not exist.
259
				// This shouldn't happen, but can.
266
				// This shouldn't happen, but can.
260
				// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=158129
267
				// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=158129
261
				if (types[i] != null) {
268
				if (types[i] != null) {
262
					if (types[i].equals(IMarker.BOOKMARK)) {
269
					MarkerType type= MarkerTypesModel.getInstance().getType(types[i]);
270
					if (type.isSubtypeOf(bookmarkType)) {
263
						addContext(WorkspaceUndoUtil.getBookmarksUndoContext());
271
						addContext(WorkspaceUndoUtil.getBookmarksUndoContext());
264
					} else if (types[i].equals(IMarker.TASK)) {
272
					} else if (type.isSubtypeOf(taskType)) {
265
						addContext(WorkspaceUndoUtil.getTasksUndoContext());
273
						addContext(WorkspaceUndoUtil.getTasksUndoContext());
274
					} else if (type.isSubtypeOf(problemType)) {
275
						addContext(WorkspaceUndoUtil.getProblemsUndoContext());
266
					} else if (types[i] != null) {
276
					} else if (types[i] != null) {
267
						// type is not known, use the workspace undo context
277
						// type is not known, use the workspace undo context
268
						addContext(WorkspaceUndoUtil.getWorkspaceUndoContext());
278
						addContext(WorkspaceUndoUtil.getWorkspaceUndoContext());
(-)src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java (-3 / +19 lines)
Lines 8-14 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
10
 *******************************************************************************/
11
12
package org.eclipse.ui.ide.undo;
11
package org.eclipse.ui.ide.undo;
13
12
14
import java.net.URI;
13
import java.net.URI;
Lines 50-67 Link Here
50
import org.eclipse.ui.internal.ide.undo.FileDescription;
49
import org.eclipse.ui.internal.ide.undo.FileDescription;
51
import org.eclipse.ui.internal.ide.undo.UndoMessages;
50
import org.eclipse.ui.internal.ide.undo.UndoMessages;
52
51
52
53
/**
53
/**
54
 * WorkspaceUndoUtil defines common utility methods and constants used by
54
 * WorkspaceUndoUtil defines common utility methods and constants used by
55
 * clients who create undoable workspace operations.
55
 * clients who create undoable workspace operations.
56
 * 
56
 * 
57
 * @since 3.3
57
 * @since 3.3
58
 * 
59
 */
58
 */
60
public class WorkspaceUndoUtil {
59
public class WorkspaceUndoUtil {
61
60
62
	private static ObjectUndoContext tasksUndoContext;
61
	private static ObjectUndoContext tasksUndoContext;
63
64
	private static ObjectUndoContext bookmarksUndoContext;
62
	private static ObjectUndoContext bookmarksUndoContext;
63
	private static ObjectUndoContext problemsUndoContext;
64
65
65
66
	/**
66
	/**
67
	 * Return the undo context that should be used for workspace-wide operations
67
	 * Return the undo context that should be used for workspace-wide operations
Lines 104-109 Link Here
104
	}
104
	}
105
105
106
	/**
106
	/**
107
	 * Return the undo context that should be used for operations involving
108
	 * problems.
109
	 * 
110
	 * @return the problems undo context
111
	 * @since 3.7
112
	 */
113
	public static IUndoContext getProblemsUndoContext() {
114
		if (problemsUndoContext == null) {
115
			problemsUndoContext = new ObjectUndoContext(new Object(),
116
					"Problems Context"); //$NON-NLS-1$
117
			problemsUndoContext.addMatch(getWorkspaceUndoContext());
118
		}
119
		return problemsUndoContext;
120
	}
121
122
	/**
107
	 * Make an <code>IAdaptable</code> that adapts to the specified shell,
123
	 * Make an <code>IAdaptable</code> that adapts to the specified shell,
108
	 * suitable for passing for passing to any
124
	 * suitable for passing for passing to any
109
	 * {@link org.eclipse.core.commands.operations.IUndoableOperation} or
125
	 * {@link org.eclipse.core.commands.operations.IUndoableOperation} or
(-)src/org/eclipse/ui/internal/views/markers/AllMarkersView.java (-2 / +18 lines)
Lines 1-6 Link Here
1
package org.eclipse.ui.internal.views.markers;
1
package org.eclipse.ui.internal.views.markers;
2
/*******************************************************************************
2
/*******************************************************************************
3
 * Copyright (c) 2008 IBM Corporation and others.
3
 * Copyright (c) 2008, 2011 IBM Corporation and others.
4
 * All rights reserved. This program and the accompanying materials
4
 * All rights reserved. This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
5
 * are made available under the terms of the Eclipse Public License v1.0
6
 * which accompanies this distribution, and is available at
6
 * which accompanies this distribution, and is available at
Lines 9-18 Link Here
9
 * Contributors:
9
 * Contributors:
10
 *     IBM Corporation - initial API and implementation
10
 *     IBM Corporation - initial API and implementation
11
 *******************************************************************************/
11
 *******************************************************************************/
12
12
import org.eclipse.core.commands.operations.IUndoContext;
13
import org.eclipse.core.commands.operations.ObjectUndoContext;
14
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
13
import org.eclipse.ui.views.markers.MarkerSupportView;
15
import org.eclipse.ui.views.markers.MarkerSupportView;
14
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
16
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
15
17
18
16
/**
19
/**
17
 * AllMarkersView is the view that shows all markers.
20
 * AllMarkersView is the view that shows all markers.
18
 * @since 3.4
21
 * @since 3.4
Lines 27-30 Link Here
27
		super(MarkerSupportRegistry.ALL_MARKERS_GENERATOR);
30
		super(MarkerSupportRegistry.ALL_MARKERS_GENERATOR);
28
	}
31
	}
29
32
33
	/*
34
	 * (non-Javadoc)
35
	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getUndoContext()
36
	 * @since 3.7
37
	 */
38
	protected IUndoContext getUndoContext() {
39
		ObjectUndoContext context= new ObjectUndoContext(new Object(), "All Markers Context"); //$NON-NLS-1$
40
		context.addMatch(WorkspaceUndoUtil.getBookmarksUndoContext());
41
		context.addMatch(WorkspaceUndoUtil.getTasksUndoContext());
42
		context.addMatch(WorkspaceUndoUtil.getProblemsUndoContext());
43
		return context;
44
	}
45
30
}
46
}
(-)src/org/eclipse/ui/internal/views/markers/BookmarksView.java (-2 / +26 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 8-19 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 ******************************************************************************/
10
 ******************************************************************************/
11
12
package org.eclipse.ui.internal.views.markers;
11
package org.eclipse.ui.internal.views.markers;
13
12
13
import org.eclipse.core.commands.operations.IUndoContext;
14
import org.eclipse.core.resources.IMarker;
15
import org.eclipse.core.runtime.Assert;
16
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
14
import org.eclipse.ui.views.markers.MarkerSupportView;
17
import org.eclipse.ui.views.markers.MarkerSupportView;
18
import org.eclipse.ui.views.markers.internal.MarkerMessages;
15
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
19
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
16
20
21
17
/**
22
/**
18
 * The BookmarksView is the ide view for bookmarks.
23
 * The BookmarksView is the ide view for bookmarks.
19
 * @since 3.4
24
 * @since 3.4
Lines 28-31 Link Here
28
		super(MarkerSupportRegistry.BOOKMARKS_GENERATOR);
33
		super(MarkerSupportRegistry.BOOKMARKS_GENERATOR);
29
		
34
		
30
	}
35
	}
36
37
	/*
38
	 * (non-Javadoc)
39
	 * @see org.eclipse.ui.views.markers.internal.MarkerView#getUndoContext()
40
	 * @since 3.7
41
	 */
42
	protected IUndoContext getUndoContext() {
43
		return WorkspaceUndoUtil.getBookmarksUndoContext();
44
	}
45
46
	/* (non-Javadoc)
47
	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getDeleteOperationName(org.eclipse.core.resources.IMarker[])
48
	 * @since 3.7
49
	 */
50
	protected String getDeleteOperationName(IMarker[] markers) {
51
		Assert.isLegal(markers.length > 0);
52
		return markers.length == 1 ? MarkerMessages.deleteBookmarkMarker_operationName : MarkerMessages.deleteBookmarkMarkers_operationName;
53
	}
54
31
}
55
}
(-)src/org/eclipse/ui/internal/views/markers/DeleteHandler.java (-1 / +2 lines)
Lines 65-71 Link Here
65
			public IStatus runInWorkspace(IProgressMonitor monitor) {
65
			public IStatus runInWorkspace(IProgressMonitor monitor) {
66
				monitor.beginTask(IDEWorkbenchMessages.MarkerDeleteHandler_JobMessageLabel, 10 * selected.length);
66
				monitor.beginTask(IDEWorkbenchMessages.MarkerDeleteHandler_JobMessageLabel, 10 * selected.length);
67
				try {
67
				try {
68
					IUndoableOperation op= new DeleteMarkersOperation(selected, MarkerMessages.deleteMarkers_operationName);
68
					IUndoableOperation op= new DeleteMarkersOperation(selected, view.getDeleteOperationName(selected));
69
					op.addContext(view.getUndoContext());
69
					execute(op, MarkerMessages.deleteMarkers_errorMessage, monitor, WorkspaceUndoUtil.getUIInfoAdapter(view.getSite().getShell()));
70
					execute(op, MarkerMessages.deleteMarkers_errorMessage, monitor, WorkspaceUndoUtil.getUIInfoAdapter(view.getSite().getShell()));
70
				} finally {
71
				} finally {
71
					monitor.done();
72
					monitor.done();
(-)src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java (-2 / +49 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2010 IBM Corporation and others.
2
 * Copyright (c) 2007, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 8-14 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
10
 *******************************************************************************/
11
12
package org.eclipse.ui.internal.views.markers;
11
package org.eclipse.ui.internal.views.markers;
13
12
14
import java.util.ArrayList;
13
import java.util.ArrayList;
Lines 17-24 Link Here
17
import java.util.Iterator;
16
import java.util.Iterator;
18
import java.util.List;
17
import java.util.List;
19
18
19
import org.eclipse.core.commands.operations.IUndoContext;
20
import org.eclipse.core.resources.IFile;
20
import org.eclipse.core.resources.IFile;
21
import org.eclipse.core.resources.IMarker;
21
import org.eclipse.core.resources.IMarker;
22
import org.eclipse.core.resources.ResourcesPlugin;
23
import org.eclipse.core.runtime.Assert;
22
import org.eclipse.core.runtime.IStatus;
24
import org.eclipse.core.runtime.IStatus;
23
import org.eclipse.core.runtime.Status;
25
import org.eclipse.core.runtime.Status;
24
import org.eclipse.help.IContext;
26
import org.eclipse.help.IContext;
Lines 70-86 Link Here
70
import org.eclipse.ui.ISelectionListener;
72
import org.eclipse.ui.ISelectionListener;
71
import org.eclipse.ui.IViewPart;
73
import org.eclipse.ui.IViewPart;
72
import org.eclipse.ui.IViewSite;
74
import org.eclipse.ui.IViewSite;
75
import org.eclipse.ui.IWorkbenchCommandConstants;
73
import org.eclipse.ui.IWorkbenchPage;
76
import org.eclipse.ui.IWorkbenchPage;
74
import org.eclipse.ui.IWorkbenchPart;
77
import org.eclipse.ui.IWorkbenchPart;
75
import org.eclipse.ui.IWorkbenchPartReference;
78
import org.eclipse.ui.IWorkbenchPartReference;
76
import org.eclipse.ui.OpenAndLinkWithEditorHelper;
79
import org.eclipse.ui.OpenAndLinkWithEditorHelper;
77
import org.eclipse.ui.PartInitException;
80
import org.eclipse.ui.PartInitException;
78
import org.eclipse.ui.PlatformUI;
81
import org.eclipse.ui.PlatformUI;
82
import org.eclipse.ui.actions.ActionFactory;
79
import org.eclipse.ui.ide.IDE;
83
import org.eclipse.ui.ide.IDE;
80
import org.eclipse.ui.ide.ResourceUtil;
84
import org.eclipse.ui.ide.ResourceUtil;
81
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
85
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
82
import org.eclipse.ui.internal.ide.StatusUtil;
86
import org.eclipse.ui.internal.ide.StatusUtil;
83
import org.eclipse.ui.menus.IMenuService;
87
import org.eclipse.ui.menus.IMenuService;
88
import org.eclipse.ui.operations.RedoActionHandler;
89
import org.eclipse.ui.operations.UndoActionHandler;
84
import org.eclipse.ui.part.MarkerTransfer;
90
import org.eclipse.ui.part.MarkerTransfer;
85
import org.eclipse.ui.part.ViewPart;
91
import org.eclipse.ui.part.ViewPart;
86
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
92
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
Lines 94-99 Link Here
94
100
95
import com.ibm.icu.text.MessageFormat;
101
import com.ibm.icu.text.MessageFormat;
96
102
103
97
/**
104
/**
98
 * The ExtendedMarkersView is the internal implementation of the view that shows
105
 * The ExtendedMarkersView is the internal implementation of the view that shows
99
 * markers using the markerGenerators extension point.
106
 * markers using the markerGenerators extension point.
Lines 146-151 Link Here
146
	private IMemento memento;
153
	private IMemento memento;
147
	private String[] defaultGeneratorIds = new String[0];
154
	private String[] defaultGeneratorIds = new String[0];
148
155
156
	private UndoActionHandler undoAction;
157
158
	private RedoActionHandler redoAction;
159
160
149
	/**
161
	/**
150
	 * Return a new instance of the receiver.
162
	 * Return a new instance of the receiver.
151
	 * 
163
	 * 
Lines 393-398 Link Here
393
405
394
		getSite().setSelectionProvider(viewer);
406
		getSite().setSelectionProvider(viewer);
395
407
408
		IUndoContext undoContext= getUndoContext();
409
		undoAction= new UndoActionHandler(getSite(), undoContext);
410
		undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
411
		redoAction= new RedoActionHandler(getSite(), undoContext);
412
		redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
413
		getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
414
		getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
415
396
		startView();
416
		startView();
397
417
398
	}
418
	}
Lines 572-577 Link Here
572
592
573
		getSite().getPage().removePostSelectionListener(pageSelectionListener);
593
		getSite().getPage().removePostSelectionListener(pageSelectionListener);
574
		getSite().getPage().removePartListener(partListener);
594
		getSite().getPage().removePartListener(partListener);
595
596
		undoAction.dispose();
597
		redoAction.dispose();
598
575
		super.dispose();
599
		super.dispose();
576
	}
600
	}
577
601
Lines 1714-1717 Link Here
1714
		}
1738
		}
1715
		
1739
		
1716
	}
1740
	}
1741
1742
	/**
1743
	 * Return the undo context associated with operations performed in this view. By default, return
1744
	 * the workspace undo context. Subclasses should override if a more specific undo context should
1745
	 * be used.
1746
	 *
1747
	 * @since 3.7
1748
	 */
1749
	protected IUndoContext getUndoContext() {
1750
		return (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
1751
	}
1752
1753
	/**
1754
	 * Returns the name of the delete operation.
1755
	 * 
1756
	 * @param markers the markers to be deleted, must have at least one element
1757
	 * @since 3.7
1758
	 */
1759
	protected String getDeleteOperationName(IMarker[] markers) {
1760
		Assert.isLegal(markers.length > 0);
1761
		return markers.length == 1 ? MarkerMessages.deleteMarker_operationName : MarkerMessages.deleteMarkers_operationName;
1762
	}
1763
1717
}
1764
}
(-)src/org/eclipse/ui/internal/views/markers/ProblemsView.java (-1 / +24 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2010 IBM Corporation and others.
2
 * Copyright (c) 2008, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 10-19 Link Here
10
 ******************************************************************************/
10
 ******************************************************************************/
11
package org.eclipse.ui.internal.views.markers;
11
package org.eclipse.ui.internal.views.markers;
12
12
13
import org.eclipse.core.commands.operations.IUndoContext;
14
import org.eclipse.core.resources.IMarker;
15
import org.eclipse.core.runtime.Assert;
13
import org.eclipse.swt.graphics.Image;
16
import org.eclipse.swt.graphics.Image;
17
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
14
import org.eclipse.ui.internal.WorkbenchPlugin;
18
import org.eclipse.ui.internal.WorkbenchPlugin;
15
import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
19
import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
16
import org.eclipse.ui.views.markers.MarkerSupportView;
20
import org.eclipse.ui.views.markers.MarkerSupportView;
21
import org.eclipse.ui.views.markers.internal.MarkerMessages;
17
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
22
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
18
23
19
24
Lines 44-47 Link Here
44
		setTitleImage(image);
49
		setTitleImage(image);
45
	}
50
	}
46
51
52
	/*
53
	 * (non-Javadoc)
54
	 * @see org.eclipse.ui.views.markers.internal.MarkerView#getUndoContext()
55
	 * @since 3.7
56
	 */
57
	protected IUndoContext getUndoContext() {
58
		return WorkspaceUndoUtil.getProblemsUndoContext();
59
	}
60
	
61
	/* (non-Javadoc)
62
	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getDeleteOperationName(org.eclipse.core.resources.IMarker[])
63
	 * @since 3.7
64
	 */
65
	protected String getDeleteOperationName(IMarker[] markers) {
66
		Assert.isLegal(markers.length > 0);
67
		return markers.length == 1 ? MarkerMessages.deleteProblemMarker_operationName : MarkerMessages.deleteProblemMarkers_operationName;
68
	}
69
47
}
70
}
(-)src/org/eclipse/ui/internal/views/markers/TasksView.java (-2 / +26 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 8-19 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 ******************************************************************************/
10
 ******************************************************************************/
11
12
package org.eclipse.ui.internal.views.markers;
11
package org.eclipse.ui.internal.views.markers;
13
12
13
import org.eclipse.core.commands.operations.IUndoContext;
14
import org.eclipse.core.resources.IMarker;
15
import org.eclipse.core.runtime.Assert;
16
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
14
import org.eclipse.ui.views.markers.MarkerSupportView;
17
import org.eclipse.ui.views.markers.MarkerSupportView;
18
import org.eclipse.ui.views.markers.internal.MarkerMessages;
15
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
19
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
16
20
21
17
/**
22
/**
18
 * TasksView is the ide view for showing tasks.
23
 * TasksView is the ide view for showing tasks.
19
 * @since 3.4
24
 * @since 3.4
Lines 28-31 Link Here
28
		super(MarkerSupportRegistry.TASKS_GENERATOR);
33
		super(MarkerSupportRegistry.TASKS_GENERATOR);
29
		
34
		
30
	}
35
	}
36
	
37
	/*
38
	 * (non-Javadoc)
39
	 * @see org.eclipse.ui.views.markers.internal.MarkerView#getUndoContext()
40
	 * @since 3.7
41
	 */
42
	protected IUndoContext getUndoContext() {
43
		return WorkspaceUndoUtil.getTasksUndoContext();
44
	}
45
46
	/* (non-Javadoc)
47
	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getDeleteOperationName(org.eclipse.core.resources.IMarker[])
48
	 * @since 3.7
49
	 */
50
	protected String getDeleteOperationName(IMarker[] markers) {
51
		Assert.isLegal(markers.length > 0);
52
		return markers.length == 1 ? MarkerMessages.deleteTaskMarker_operationName : MarkerMessages.deleteTaskMarkers_operationName;
53
	}
54
31
}
55
}
(-)src/org/eclipse/ui/views/markers/internal/MarkerMessages.java (-1 / +9 lines)
Lines 145-152 Link Here
145
	public static String marker_statusSelectedCount;
145
	public static String marker_statusSelectedCount;
146
	public static String errorsAndWarningsSummaryBreakdown;
146
	public static String errorsAndWarningsSummaryBreakdown;
147
147
148
	public static String deleteMarkers_operationName;
149
	public static String deleteMarkers_errorMessage;
148
	public static String deleteMarkers_errorMessage;
149
	public static String deleteMarker_operationName;
150
	public static String deleteMarkers_operationName;
151
	public static String deleteBookmarkMarker_operationName;
152
	public static String deleteBookmarkMarkers_operationName;
153
	public static String deleteTaskMarker_operationName;
154
	public static String deleteTaskMarkers_operationName;
155
	public static String deleteProblemMarker_operationName;
156
	public static String deleteProblemMarkers_operationName;
157
150
158
151
	public static String deleteCompletedAction_title;
159
	public static String deleteCompletedAction_title;
152
160
(-)src/org/eclipse/ui/views/markers/internal/messages.properties (-1 / +8 lines)
Lines 133-140 Link Here
133
marker_statusSelectedCount={0,choice,0#0 items |1#{0,number,integer} item |1<{0,number,integer} items} selected
133
marker_statusSelectedCount={0,choice,0#0 items |1#{0,number,integer} item |1<{0,number,integer} items} selected
134
errorsAndWarningsSummaryBreakdown = {0,choice,0#0 errors|1#{0,number,integer} error|1<{0,number,integer} errors}, {1,choice,0#0 warnings|1#{1,number,integer} warning|1<{1,number,integer} warnings}, {2,choice,0#0 others|1#{2,number,integer} other|1<{2,number,integer} others}
134
errorsAndWarningsSummaryBreakdown = {0,choice,0#0 errors|1#{0,number,integer} error|1<{0,number,integer} errors}, {1,choice,0#0 warnings|1#{1,number,integer} warning|1<{1,number,integer} warnings}, {2,choice,0#0 others|1#{2,number,integer} other|1<{2,number,integer} others}
135
135
136
deleteMarkers_operationName= Delete Markers
137
deleteMarkers_errorMessage= Error deleting markers
136
deleteMarkers_errorMessage= Error deleting markers
137
deleteMarker_operationName= Delete Marker
138
deleteMarkers_operationName= Delete Markers
139
deleteBookmarkMarker_operationName= Delete Bookmark
140
deleteBookmarkMarkers_operationName= Delete Bookmarks
141
deleteTaskMarker_operationName= Delete Task
142
deleteTaskMarkers_operationName= Delete Tasks
143
deleteProblemMarker_operationName= Delete Problem
144
deleteProblemMarkers_operationName= Delete Problems
138
145
139
deleteCompletedAction_title = Delete Completed &Tasks
146
deleteCompletedAction_title = Delete Completed &Tasks
140
markCompletedAction_title = &Mark Completed
147
markCompletedAction_title = &Mark Completed

Return to bug 235657