Skip to content

Commit 2cb597b

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 2cb597b

File tree

1 file changed

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

1 file changed

+7
-12
lines changed

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -803,22 +803,17 @@ 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
814813
Display display;
815-
if (shell == null) {
816-
display = Display.getCurrent();
817-
} else {
818-
display = loopShell.getDisplay();
819-
}
814+
display = shell.getDisplay();
820815

821-
while (loopShell != null && !loopShell.isDisposed()) {
816+
while (!shell.isDisposed()) {
822817
try {
823818
if (!display.readAndDispatch()) {
824819
display.sleep();

0 commit comments

Comments
 (0)