mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
New constructor for ShowInCView
This commit is contained in:
parent
d0ae8c2f99
commit
d523bd1dbf
2 changed files with 16 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-02-24 Alain Magloire
|
||||
|
||||
New constructor for ShowInCView.
|
||||
|
||||
* src/org/eclipse/cdt/ui/actions/ShowInCView.java
|
||||
|
||||
2004-02-20 Alain Magloire
|
||||
|
||||
Fix for PR 52618
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.ui.IEditorInput;
|
|||
import org.eclipse.ui.IFileEditorInput;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
import org.eclipse.ui.IWorkbenchSite;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.actions.SelectionProviderAction;
|
||||
import org.eclipse.ui.part.ISetSelectionTarget;
|
||||
|
@ -40,9 +41,17 @@ import org.eclipse.ui.texteditor.ITextEditor;
|
|||
public class ShowInCViewAction extends SelectionProviderAction {
|
||||
|
||||
private IWorkbenchPage page;
|
||||
|
||||
private ITextEditor fEditor;
|
||||
|
||||
public ShowInCViewAction(IWorkbenchSite site) {
|
||||
this(site.getPage(), site.getSelectionProvider());
|
||||
}
|
||||
|
||||
public ShowInCViewAction(ITextEditor editor) {
|
||||
this(editor.getEditorSite().getWorkbenchWindow().getActivePage(), editor.getSelectionProvider());
|
||||
fEditor = editor;
|
||||
}
|
||||
|
||||
public ShowInCViewAction(IWorkbenchPage page, ISelectionProvider viewer) {
|
||||
super(viewer, CEditorMessages.getString("ShowInCView.label")); //$NON-NLS-1$
|
||||
setToolTipText(CEditorMessages.getString("ShowInCView.tooltip")); //$NON-NLS-1$
|
||||
|
@ -52,15 +61,6 @@ public class ShowInCViewAction extends SelectionProviderAction {
|
|||
//WorkbenchHelp.setHelp(this, ICHelpContextIds.SHOW_IN_CVIEW_ACTION);
|
||||
}
|
||||
|
||||
public ShowInCViewAction() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ShowInCViewAction(ITextEditor editor) {
|
||||
this(editor.getEditorSite().getWorkbenchWindow().getActivePage(), editor.getSelectionProvider());
|
||||
fEditor = editor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IAction#actionPerformed
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue