Thread: [Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/actions PyAction.java, 1.30, 1.31
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-12-09 19:53:46
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14485/src/org/python/pydev/editor/actions Modified Files: PyAction.java Log Message: Index: PyAction.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions/PyAction.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** PyAction.java 19 Jul 2006 23:43:52 -0000 1.30 --- PyAction.java 9 Dec 2006 19:53:43 -0000 1.31 *************** *** 16,19 **** --- 16,21 ---- import org.eclipse.ui.IEditorActionDelegate; import org.eclipse.ui.IEditorPart; + import org.eclipse.ui.IWorkbench; + import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.texteditor.ITextEditor; *************** *** 33,37 **** public static Shell getShell() { ! return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); } --- 35,45 ---- public static Shell getShell() { ! IWorkbench workbench = PlatformUI.getWorkbench(); ! IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow(); ! if(activeWorkbenchWindow == null){ ! PydevPlugin.log("Error. Not currently with thread access (so, there is no activeWorkbenchWindow available)"); ! return null; ! } ! return activeWorkbenchWindow.getShell(); } |