View | Details | Raw Unified | Return to bug 201572 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageVisibilitySection.java (-1 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
2
 * Copyright (c) 2000, 2008 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 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 201572
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.pde.internal.ui.editor.plugin;
12
package org.eclipse.pde.internal.ui.editor.plugin;
12
13
Lines 296-301 Link Here
296
			refresh();
297
			refresh();
297
			return;
298
			return;
298
		}
299
		}
300
301
		if (event.getChangeType() == IModelChangedEvent.INSERT && event.getChangedObjects()[0] instanceof PackageFriend) {
302
			fFriendViewer.refresh();
303
			fFriendViewer.setSelection(new StructuredSelection(event.getChangedObjects()[0]), true);
304
			return;
305
		}
306
299
		int index = fFriendViewer.getTable().getSelectionIndex();
307
		int index = fFriendViewer.getTable().getSelectionIndex();
300
		fFriendViewer.refresh();
308
		fFriendViewer.refresh();
301
		fFriendViewer.getTable().setSelection(Math.min(index, fFriendViewer.getTable().getItemCount() - 1));
309
		fFriendViewer.getTable().setSelection(Math.min(index, fFriendViewer.getTable().getItemCount() - 1));
(-)src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java (-1 / +1 lines)
Lines 535-541 Link Here
535
				switch (event.getChangeType()) {
535
				switch (event.getChangeType()) {
536
					case IModelChangedEvent.INSERT :
536
					case IModelChangedEvent.INSERT :
537
						fPackageViewer.add(object);
537
						fPackageViewer.add(object);
538
						fPackageViewer.setSelection(new StructuredSelection(object));
538
						fPackageViewer.setSelection(new StructuredSelection(object), false);
539
						fPackageViewer.getTable().setFocus();
539
						fPackageViewer.getTable().setFocus();
540
						break;
540
						break;
541
					case IModelChangedEvent.REMOVE :
541
					case IModelChangedEvent.REMOVE :

Return to bug 201572