mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch from Chris Wiebe to make some helper function
static.
This commit is contained in:
parent
cf45b52e3c
commit
50654ac2ef
2 changed files with 16 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-04-15 Chris Wiebe
|
||||||
|
|
||||||
|
Make some helper functions static for ease of use ...
|
||||||
|
and to get rid of some annoying warnings.
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/ui/CUIPlugin.java
|
||||||
|
|
||||||
2004-04-15 Mikhail Khodjaiants
|
2004-04-15 Mikhail Khodjaiants
|
||||||
Removed dependencies to 'org.eclipse.debug.core' and 'org.eclipse.debug.ui'.
|
Removed dependencies to 'org.eclipse.debug.core' and 'org.eclipse.debug.ui'.
|
||||||
* plugin.xml
|
* plugin.xml
|
||||||
|
|
|
@ -148,24 +148,25 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
public static ResourceBundle getResourceBundle() {
|
public static ResourceBundle getResourceBundle() {
|
||||||
return fgResourceBundle;
|
return fgResourceBundle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static IWorkbenchPage getActivePage() {
|
public static IWorkbenchPage getActivePage() {
|
||||||
IWorkbenchWindow window = getDefault().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
return window.getActivePage();
|
return window.getActivePage();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Shell getActiveWorkbenchShell() {
|
public static Shell getActiveWorkbenchShell() {
|
||||||
return getActiveWorkbenchWindow().getShell();
|
IWorkbenchWindow window= getActiveWorkbenchWindow();
|
||||||
|
if (window != null) {
|
||||||
|
return window.getShell();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CUIPlugin getDefault() {
|
public static CUIPlugin getDefault() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue