Lines 10-17
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.equinox.internal.p2.ui.model; |
11 |
package org.eclipse.equinox.internal.p2.ui.model; |
12 |
|
12 |
|
13 |
import org.eclipse.equinox.internal.provisional.p2.repository.IRepository; |
|
|
14 |
|
15 |
import java.net.URI; |
13 |
import java.net.URI; |
16 |
import org.eclipse.core.runtime.*; |
14 |
import org.eclipse.core.runtime.*; |
17 |
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper; |
15 |
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper; |
Lines 22-27
Link Here
|
22 |
import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; |
20 |
import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; |
23 |
import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager; |
21 |
import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager; |
24 |
import org.eclipse.equinox.internal.provisional.p2.query.IQueryable; |
22 |
import org.eclipse.equinox.internal.provisional.p2.query.IQueryable; |
|
|
23 |
import org.eclipse.equinox.internal.provisional.p2.repository.IRepository; |
25 |
import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI; |
24 |
import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI; |
26 |
import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages; |
25 |
import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages; |
27 |
import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement; |
26 |
import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement; |
Lines 108-123
Link Here
|
108 |
// If repository could not be found, report to the user, but only once. |
107 |
// If repository could not be found, report to the user, but only once. |
109 |
// If the user refreshes the repositories, new elements will be created and |
108 |
// If the user refreshes the repositories, new elements will be created and |
110 |
// then a failure would be reported again on the next try. |
109 |
// then a failure would be reported again on the next try. |
111 |
if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) { |
110 |
switch (e.getStatus().getCode()) { |
112 |
if (!alreadyReportedNotFound) { |
111 |
case ProvisionException.REPOSITORY_FAILED_READ : |
113 |
// report the status, not the exception, to the user because we |
112 |
case ProvisionException.REPOSITORY_FAILED_AUTHENTICATION : |
114 |
// do not want to show them stack trace and exception detail. |
113 |
case ProvisionException.REPOSITORY_INVALID_LOCATION : |
115 |
ProvUI.reportNotFoundStatus(location, e.getStatus(), StatusManager.SHOW); |
114 |
case ProvisionException.REPOSITORY_NOT_FOUND : |
116 |
alreadyReportedNotFound = true; |
115 |
if (!alreadyReportedNotFound) { |
117 |
} |
116 |
// report the status, not the exception, to the user because we |
118 |
} else |
117 |
// do not want to show them stack trace and exception detail. |
119 |
// handle other exceptions the normal way |
118 |
ProvUI.reportNotFoundStatus(location, e.getStatus(), StatusManager.SHOW); |
120 |
handleException(e, NLS.bind(ProvUIMessages.MetadataRepositoryElement_RepositoryLoadError, location)); |
119 |
alreadyReportedNotFound = true; |
|
|
120 |
} |
121 |
break; |
122 |
default : |
123 |
// handle other exceptions the normal way |
124 |
handleException(e, NLS.bind(ProvUIMessages.MetadataRepositoryElement_RepositoryLoadError, location)); |
125 |
} |
121 |
} catch (OperationCanceledException e) { |
126 |
} catch (OperationCanceledException e) { |
122 |
// Nothing to report |
127 |
// Nothing to report |
123 |
} |
128 |
} |