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

(-)UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java (-2 / +17 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2009 IBM Corporation and others.
2
 * Copyright (c) 2002, 2010 IBM Corporation 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 40-45 Link Here
40
 * David McKnight   (IBM)        - [250417] Restore from memento flag set to false during restore on startup
40
 * David McKnight   (IBM)        - [250417] Restore from memento flag set to false during restore on startup
41
 * Martin Oberhuber (Wind River) - [286122] Avoid NPE when restoring memento
41
 * Martin Oberhuber (Wind River) - [286122] Avoid NPE when restoring memento
42
 * David McKnight   (IBM)        - [286670] TVT35:TCT586: CHS: English Strings Found
42
 * David McKnight   (IBM)        - [286670] TVT35:TCT586: CHS: English Strings Found
43
 * Martin Oberhuber (Wind River) - [326910] RSE looses selection when creating a project
43
 *******************************************************************************/
44
 *******************************************************************************/
44
45
45
package org.eclipse.rse.internal.ui.view;
46
package org.eclipse.rse.internal.ui.view;
Lines 231-237 Link Here
231
	 */
232
	 */
232
	public void selectReveal(ISelection selection)
233
	public void selectReveal(ISelection selection)
233
	{
234
	{
234
		systemView.setSelection(selection, true);
235
		ISelection origSel = systemView.getSelection();
236
		if (origSel.isEmpty()) {
237
			systemView.setSelection(selection, true);
238
		} else {
239
			// bug check whether the new selection can be set,
240
			// before actually setting it. Restore old selection
241
			// if the new one does not work.
242
			systemView.setSelection(selection, false);
243
			ISelection newSel = systemView.getSelection();
244
			if (newSel.isEmpty()) {
245
				systemView.setSelection(origSel, false);
246
			} else {
247
				systemView.setSelection(newSel, true);
248
			}
249
		}
235
	}
250
	}
236
251
237
	/**
252
	/**

Return to bug 326910