mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
Fix PR 52618
This commit is contained in:
parent
aa349fc2b3
commit
5f424df50d
2 changed files with 11 additions and 22 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-02-20 Alain Magloire
|
||||||
|
|
||||||
|
Fix for PR 52618
|
||||||
|
Added the global action handlers for the Property Dialog.
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java
|
||||||
|
|
||||||
2003-02-20 Andrew Niefer
|
2003-02-20 Andrew Niefer
|
||||||
bug 52567
|
bug 52567
|
||||||
change the extension IDs for the C Search sorters to avoid conflict with the JDT
|
change the extension IDs for the C Search sorters to avoid conflict with the JDT
|
||||||
|
|
|
@ -28,9 +28,6 @@ import org.eclipse.jface.action.MenuManager;
|
||||||
import org.eclipse.jface.action.Separator;
|
import org.eclipse.jface.action.Separator;
|
||||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
|
||||||
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
|
||||||
import org.eclipse.jface.viewers.ISelectionProvider;
|
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.swt.events.KeyEvent;
|
import org.eclipse.swt.events.KeyEvent;
|
||||||
|
@ -39,6 +36,7 @@ import org.eclipse.ui.IActionBars;
|
||||||
import org.eclipse.ui.IWorkbenchActionConstants;
|
import org.eclipse.ui.IWorkbenchActionConstants;
|
||||||
import org.eclipse.ui.IWorkingSet;
|
import org.eclipse.ui.IWorkingSet;
|
||||||
import org.eclipse.ui.actions.ActionContext;
|
import org.eclipse.ui.actions.ActionContext;
|
||||||
|
import org.eclipse.ui.actions.ActionFactory;
|
||||||
import org.eclipse.ui.actions.AddBookmarkAction;
|
import org.eclipse.ui.actions.AddBookmarkAction;
|
||||||
import org.eclipse.ui.actions.AddTaskAction;
|
import org.eclipse.ui.actions.AddTaskAction;
|
||||||
import org.eclipse.ui.actions.ExportResourcesAction;
|
import org.eclipse.ui.actions.ExportResourcesAction;
|
||||||
|
@ -144,24 +142,7 @@ public class MainActionGroup extends CViewActionGroup {
|
||||||
|
|
||||||
addBookmarkAction = new AddBookmarkAction(shell);
|
addBookmarkAction = new AddBookmarkAction(shell);
|
||||||
addTaskAction = new AddTaskAction(shell);
|
addTaskAction = new AddTaskAction(shell);
|
||||||
propertyDialogAction = new PropertyDialogAction(shell, new ISelectionProvider() {
|
propertyDialogAction = new PropertyDialogAction(shell, viewer);
|
||||||
|
|
||||||
public void addSelectionChangedListener(ISelectionChangedListener listener) {
|
|
||||||
viewer.addSelectionChangedListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ISelection getSelection() {
|
|
||||||
return SelectionConverter.convertSelectionToResources(viewer.getSelection());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
|
|
||||||
viewer.removeSelectionChangedListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSelection(ISelection selection) {
|
|
||||||
viewer.setSelection(selection);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Importing/exporting.
|
// Importing/exporting.
|
||||||
importAction = new ImportResourcesAction(getCView().getSite().getWorkbenchWindow());
|
importAction = new ImportResourcesAction(getCView().getSite().getWorkbenchWindow());
|
||||||
|
@ -311,6 +292,7 @@ public class MainActionGroup extends CViewActionGroup {
|
||||||
public void fillActionBars(IActionBars actionBars) {
|
public void fillActionBars(IActionBars actionBars) {
|
||||||
actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), addBookmarkAction);
|
actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), addBookmarkAction);
|
||||||
actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), addTaskAction);
|
actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), addTaskAction);
|
||||||
|
actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertyDialogAction);
|
||||||
|
|
||||||
workingSetGroup.fillActionBars(actionBars);
|
workingSetGroup.fillActionBars(actionBars);
|
||||||
gotoGroup.fillActionBars(actionBars);
|
gotoGroup.fillActionBars(actionBars);
|
||||||
|
|
Loading…
Add table
Reference in a new issue