Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 341768
Collapse All | Expand All

(-)src/org/eclipse/rwt/internal/lifecycle/IDisplayLifeCycleAdapter.java (-5 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2007 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2002, 2011 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 7-27 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
10
 *     EclipseSource - ongoing development
10
 ******************************************************************************/
11
 ******************************************************************************/
11
12
package org.eclipse.rwt.internal.lifecycle;
12
package org.eclipse.rwt.internal.lifecycle;
13
13
14
import java.io.IOException;
14
import java.io.IOException;
15
15
16
import org.eclipse.rwt.lifecycle.ILifeCycleAdapter;
16
import org.eclipse.rwt.lifecycle.ILifeCycleAdapter;
17
import org.eclipse.swt.graphics.Device;
18
import org.eclipse.swt.widgets.Display;
17
import org.eclipse.swt.widgets.Display;
19
18
20
19
21
public interface IDisplayLifeCycleAdapter extends ILifeCycleAdapter {
20
public interface IDisplayLifeCycleAdapter extends ILifeCycleAdapter {
22
23
  void preserveValues( Display display );
21
  void preserveValues( Display display );
24
  void readData( Display display );
22
  void readData( Display display );
25
  void processAction( Device display );
26
  void render( Display display ) throws IOException;
23
  void render( Display display ) throws IOException;
27
}
24
}
(-)src/org/eclipse/rwt/internal/lifecycle/ProcessAction.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2009 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2002, 2011 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 23-29 Link Here
23
23
24
  public PhaseId execute() {
24
  public PhaseId execute() {
25
    Display display = RWTLifeCycle.getSessionDisplay();
25
    Display display = RWTLifeCycle.getSessionDisplay();
26
    DisplayUtil.getLCA( display ).processAction( display );
26
    while( display.readAndDispatch() ) {
27
    }
27
    return PhaseId.RENDER;
28
    return PhaseId.RENDER;
28
  }
29
  }
29
}
30
}
(-)src/org/eclipse/swt/internal/widgets/displaykit/DisplayLCA.java (-7 lines)
Lines 29-36 Link Here
29
import org.eclipse.rwt.lifecycle.*;
29
import org.eclipse.rwt.lifecycle.*;
30
import org.eclipse.swt.dnd.DragSource;
30
import org.eclipse.swt.dnd.DragSource;
31
import org.eclipse.swt.dnd.DropTarget;
31
import org.eclipse.swt.dnd.DropTarget;
32
import org.eclipse.swt.events.TypedEvent;
33
import org.eclipse.swt.graphics.Device;
34
import org.eclipse.swt.graphics.Rectangle;
32
import org.eclipse.swt.graphics.Rectangle;
35
import org.eclipse.swt.internal.widgets.*;
33
import org.eclipse.swt.internal.widgets.*;
36
import org.eclipse.swt.internal.widgets.WidgetTreeVisitor.AllWidgetTreeVisitor;
34
import org.eclipse.swt.internal.widgets.WidgetTreeVisitor.AllWidgetTreeVisitor;
Lines 256-266 Link Here
256
    DNDSupport.processEvents();
254
    DNDSupport.processEvents();
257
  }
255
  }
258
256
259
  public void processAction( final Device display ) {
260
    ProcessActionRunner.execute();
261
    TypedEvent.processScheduledEvents();
262
  }
263
264
  /////////////////////////////
257
  /////////////////////////////
265
  // Helping methods for render
258
  // Helping methods for render
266
259
(-)src/org/eclipse/rwt/Fixture.java (-4 / +4 lines)
Lines 239-245 Link Here
239
    displayLCA.readData( display );
239
    displayLCA.readData( display );
240
    Fixture.preserveWidgets();
240
    Fixture.preserveWidgets();
241
    fakePhase( PhaseId.PROCESS_ACTION );
241
    fakePhase( PhaseId.PROCESS_ACTION );
242
    displayLCA.processAction( display );
242
    while( Display.getCurrent().readAndDispatch() ) {
243
    }
243
  }
244
  }
244
245
245
  public static void readDataAndProcessAction( final Widget widget ) {
246
  public static void readDataAndProcessAction( final Widget widget ) {
Lines 247-255 Link Here
247
    fakePhase( PhaseId.READ_DATA );
248
    fakePhase( PhaseId.READ_DATA );
248
    widgetLCA.readData( widget );
249
    widgetLCA.readData( widget );
249
    fakePhase( PhaseId.PROCESS_ACTION );
250
    fakePhase( PhaseId.PROCESS_ACTION );
250
    Display display = widget.getDisplay();
251
    while( Display.getCurrent().readAndDispatch() ) {
251
    IDisplayLifeCycleAdapter displayLCA = DisplayUtil.getLCA( display );
252
    }
252
    displayLCA.processAction( display );
253
  }
253
  }
254
254
255
  public static void markInitialized( final Widget widget ) {
255
  public static void markInitialized( final Widget widget ) {

Return to bug 341768