### Eclipse Workspace Patch 1.0 #P org.eclipse.team.cvs.ui Index: src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java,v retrieving revision 1.100 diff -u -r1.100 CVSHistoryPage.java --- src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java 22 Nov 2007 12:51:04 -0000 1.100 +++ src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java 29 Nov 2007 10:53:28 -0000 @@ -70,6 +70,7 @@ import org.eclipse.team.ui.history.*; import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput; import org.eclipse.ui.*; +import org.eclipse.ui.actions.ActionFactory; import org.eclipse.ui.editors.text.EditorsUI; import org.eclipse.ui.editors.text.TextSourceViewerConfiguration; import org.eclipse.ui.ide.IDE; @@ -118,6 +119,10 @@ * Allows copying the tag name to the clipboard */ private TableViewerAction copyTagAction; + /** + * Allows selecting all tags + */ + private Action selectAllTagsAction; private Action tagWithExistingAction; private Action localMode; @@ -249,7 +254,7 @@ } private TableViewer createTagTable(SashForm parent) { - Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION); + Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI); TableViewer result = new TableViewer(table); TableLayout layout = new TableLayout(); layout.addColumnData(new ColumnWeightData(100)); @@ -677,6 +682,21 @@ copyTagAction = new TableViewerAction(tagViewer); copyTagAction.setText(CVSUIMessages.HistoryView_copy); copyTagAction.setEnabled(false); + copyTagAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY); + actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyTagAction); + + selectAllTagsAction = new Action() { + + public void run() { + tagViewer.getTable().selectAll(); + copyTagAction.setEnabled(true); + } + + }; + selectAllTagsAction.setText(CVSUIMessages.HistoryView_selectAll); + selectAllTagsAction.setEnabled(false); + selectAllTagsAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.SELECT_ALL); + actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), selectAllTagsAction); actionBars.updateActionBars(); } @@ -784,6 +804,7 @@ private void fillTagMenu(IMenuManager manager) { manager.add(copyTagAction); + manager.add(selectAllTagsAction); } /** @@ -851,6 +872,7 @@ viewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { + selectAllTagsAction.setEnabled(false); ISelection selection = event.getSelection(); if (selection == null || !(selection instanceof IStructuredSelection)) { textViewer.setDocument(new Document("")); //$NON-NLS-1$ @@ -876,6 +898,10 @@ textViewer.setDocument(new Document(entry.getComment())); tagViewer.setInput(entry.getTags()); setStatusLineMessage(CVSHistoryTableProvider.getCommentAsSingleLine(entry)); + setStatusLineMessage(CVSHistoryTableProvider.getCommentAsSingleLine(entry)); + if (tagViewer.getTable().getItems().length > 0) { + selectAllTagsAction.setEnabled(true); + } } });