Skip to content

Commit 98cedaf

Browse files
committed
Made the runEventLoop() function static. Removed the loopshell parameter and directly referenced shell. Updated the runEventLoop() contract for clarification.
1 parent 1d2149c commit 98cedaf

File tree

1 file changed

+7
-13
lines changed
  • bundles/org.eclipse.jface/src/org/eclipse/jface/window

1 file changed

+7
-13
lines changed

bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -803,22 +803,16 @@ public int open() {
803803
}
804804

805805
/**
806-
* Runs the event loop for the given shell.
807-
*
808-
* @param loopShell
809-
* the shell
806+
* Runs the event loop for shell.
807+
* <p>
808+
* This method assumes that shell is not null.
809+
* </p>
810810
*/
811-
private void runEventLoop(Shell loopShell) {
811+
private static void runEventLoop() {
812812

813-
//Use the display provided by the shell if possible
814-
Display display;
815-
if (shell == null) {
816-
display = Display.getCurrent();
817-
} else {
818-
display = loopShell.getDisplay();
819-
}
813+
display = shell.getDisplay();
820814

821-
while (loopShell != null && !loopShell.isDisposed()) {
815+
while (!shell.isDisposed()) {
822816
try {
823817
if (!display.readAndDispatch()) {
824818
display.sleep();

0 commit comments

Comments
 (0)