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 275479 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java (+13 lines)
Lines 22-27 Link Here
22
import org.eclipse.equinox.internal.p2.ui.viewers.MetadataRepositoryElementComparator;
22
import org.eclipse.equinox.internal.p2.ui.viewers.MetadataRepositoryElementComparator;
23
import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryDetailsLabelProvider;
23
import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryDetailsLabelProvider;
24
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
24
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
25
import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
25
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
26
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
26
import org.eclipse.equinox.internal.provisional.p2.ui.*;
27
import org.eclipse.equinox.internal.provisional.p2.ui.*;
27
import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
28
import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
Lines 576-581 Link Here
576
							}
577
							}
577
							// stop swallowing events
578
							// stop swallowing events
578
							ProvUI.endBatchOperation(false);
579
							ProvUI.endBatchOperation(false);
580
						} else {
581
							// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=275479
582
							// Refreshing the repo will lose any nickname that was previously
583
							// set.  We reset it back in the manager.  We must do this directly
584
							// so that the right thing happens even when the user cancels the page.
585
							String nickname = selected[0].getName();
586
							if (nickname != null && nickname.length() > 0)
587
								try {
588
									ProvisioningUtil.setMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME, nickname);
589
								} catch (ProvisionException e) {
590
									ProvUI.handleException(e, null, StatusManager.SHOW);
591
								}
579
						}
592
						}
580
					}
593
					}
581
				}
594
				}

Return to bug 275479