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 398957
Collapse All | Expand All

(-)a/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/tabfolderkit/TabFolderLCA.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2012 Innoopract Informationssysteme GmbH and others.
2
 * Copyright (c) 2002, 2013 Innoopract Informationssysteme GmbH and others.
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 96-101 Link Here
96
        ProcessActionRunner.add( new Runnable() {
96
        ProcessActionRunner.add( new Runnable() {
97
          public void run() {
97
          public void run() {
98
            folder.setSelection( item );
98
            folder.setSelection( item );
99
            preserveProperty( folder, PROP_SELECTION, getSelection( folder ) );
99
            ControlLCAUtil.processSelection( folder, item, false );
100
            ControlLCAUtil.processSelection( folder, item, false );
100
            ControlLCAUtil.processDefaultSelection( folder, item );
101
            ControlLCAUtil.processDefaultSelection( folder, item );
101
          }
102
          }
(-)a/tests/org.eclipse.rap.rwt.test/src/org/eclipse/swt/internal/widgets/tabfolderkit/TabFolderLCA_Test.java (-1 / +23 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2012 Innoopract Informationssysteme GmbH and others.
2
 * Copyright (c) 2007, 2013 Innoopract Informationssysteme GmbH and others.
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 34-39 Link Here
34
import org.eclipse.rap.rwt.testfixture.Message;
34
import org.eclipse.rap.rwt.testfixture.Message;
35
import org.eclipse.rap.rwt.testfixture.Message.CreateOperation;
35
import org.eclipse.rap.rwt.testfixture.Message.CreateOperation;
36
import org.eclipse.swt.SWT;
36
import org.eclipse.swt.SWT;
37
import org.eclipse.swt.events.SelectionAdapter;
37
import org.eclipse.swt.events.SelectionEvent;
38
import org.eclipse.swt.events.SelectionEvent;
38
import org.eclipse.swt.events.SelectionListener;
39
import org.eclipse.swt.events.SelectionListener;
39
import org.eclipse.swt.graphics.Color;
40
import org.eclipse.swt.graphics.Color;
Lines 301-306 Link Here
301
    assertSame( item, folder.getSelection()[ 0 ] );
302
    assertSame( item, folder.getSelection()[ 0 ] );
302
  }
303
  }
303
304
305
  @Test
306
  public void testResetSelectionInSelectionEvent() {
307
    Fixture.markInitialized( display );
308
    Fixture.markInitialized( folder );
309
    final TabItem item1 = new TabItem( folder, SWT.NONE );
310
    TabItem item2 = new TabItem( folder, SWT.NONE );
311
    folder.setSelection( item1 );
312
    folder.addSelectionListener( new SelectionAdapter() {
313
      @Override
314
      public void widgetSelected( SelectionEvent event ) {
315
        folder.setSelection( item1 );
316
      }
317
    } );
318
319
    fakeWidgetSelected( folder, item2 );
320
    Fixture.executeLifeCycleFromServerThread();
321
322
    Message message = Fixture.getProtocolMessage();
323
    assertEquals( WidgetUtil.getId( item1 ), message.findSetProperty( folder, "selection" ) );
324
  }
325
304
  private void fakeWidgetSelected( TabFolder folder, TabItem item ) {
326
  private void fakeWidgetSelected( TabFolder folder, TabItem item ) {
305
    Map<String, Object> parameters = new HashMap<String, Object>();
327
    Map<String, Object> parameters = new HashMap<String, Object>();
306
    parameters.put( ClientMessageConst.EVENT_PARAM_ITEM, getId( item ) );
328
    parameters.put( ClientMessageConst.EVENT_PARAM_ITEM, getId( item ) );

Return to bug 398957