Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 132098 Details for
Bug 267887
[ui] No Repository Found dialog's details is the same as the error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for surfacing errors
SurfaceErrors-UI.patch (text/plain), 5.63 KB, created by
Matthew Piggott
on 2009-04-16 11:40:06 EDT
(
hide
)
Description:
Patch for surfacing errors
Filename:
MIME Type:
Creator:
Matthew Piggott
Created:
2009-04-16 11:40:06 EDT
Size:
5.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.ui >Index: src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java,v >retrieving revision 1.11 >diff -u -r1.11 MetadataRepositoryElement.java >--- src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java 30 Mar 2009 01:48:58 -0000 1.11 >+++ src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java 16 Apr 2009 15:13:15 -0000 >@@ -10,8 +10,6 @@ > *******************************************************************************/ > package org.eclipse.equinox.internal.p2.ui.model; > >-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository; >- > import java.net.URI; > import org.eclipse.core.runtime.*; > import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper; >@@ -22,6 +20,7 @@ > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager; > import org.eclipse.equinox.internal.provisional.p2.query.IQueryable; >+import org.eclipse.equinox.internal.provisional.p2.repository.IRepository; > import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI; > import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages; > import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement; >@@ -108,16 +107,22 @@ > // If repository could not be found, report to the user, but only once. > // If the user refreshes the repositories, new elements will be created and > // then a failure would be reported again on the next try. >- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) { >- if (!alreadyReportedNotFound) { >- // report the status, not the exception, to the user because we >- // do not want to show them stack trace and exception detail. >- ProvUI.reportNotFoundStatus(location, e.getStatus(), StatusManager.SHOW); >- alreadyReportedNotFound = true; >- } >- } else >- // handle other exceptions the normal way >- handleException(e, NLS.bind(ProvUIMessages.MetadataRepositoryElement_RepositoryLoadError, location)); >+ switch (e.getStatus().getCode()) { >+ case ProvisionException.REPOSITORY_FAILED_READ : >+ case ProvisionException.REPOSITORY_FAILED_AUTHENTICATION : >+ case ProvisionException.REPOSITORY_INVALID_LOCATION : >+ case ProvisionException.REPOSITORY_NOT_FOUND : >+ if (!alreadyReportedNotFound) { >+ // report the status, not the exception, to the user because we >+ // do not want to show them stack trace and exception detail. >+ ProvUI.reportNotFoundStatus(location, e.getStatus(), StatusManager.SHOW); >+ alreadyReportedNotFound = true; >+ } >+ break; >+ default : >+ // handle other exceptions the normal way >+ handleException(e, NLS.bind(ProvUIMessages.MetadataRepositoryElement_RepositoryLoadError, location)); >+ } > } catch (OperationCanceledException e) { > // Nothing to report > } >Index: src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java,v >retrieving revision 1.11 >diff -u -r1.11 RepositoryManipulationPage.java >--- src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java 30 Mar 2009 01:48:58 -0000 1.11 >+++ src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java 16 Apr 2009 15:13:15 -0000 >@@ -10,8 +10,6 @@ > *******************************************************************************/ > package org.eclipse.equinox.internal.provisional.p2.ui.dialogs; > >-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; >- > import java.lang.reflect.InvocationTargetException; > import java.net.URI; > import java.util.ArrayList; >@@ -25,6 +23,7 @@ > import org.eclipse.equinox.internal.p2.ui.viewers.MetadataRepositoryElementComparator; > import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryDetailsLabelProvider; > import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException; >+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; > import org.eclipse.equinox.internal.provisional.p2.ui.*; > import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories; > import org.eclipse.equinox.internal.provisional.p2.ui.operations.*; >@@ -572,10 +571,16 @@ > // nothing to report > } > if (fail[0] != null) { >- if (fail[0].getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) { >- ProvUI.reportNotFoundStatus(location, fail[0].getStatus(), StatusManager.SHOW); >- } else >- ProvUI.handleException(fail[0], null, StatusManager.SHOW); >+ switch (fail[0].getStatus().getCode()) { >+ case ProvisionException.REPOSITORY_FAILED_READ : >+ case ProvisionException.REPOSITORY_FAILED_AUTHENTICATION : >+ case ProvisionException.REPOSITORY_INVALID_LOCATION : >+ case ProvisionException.REPOSITORY_NOT_FOUND : >+ ProvUI.reportNotFoundStatus(location, fail[0].getStatus(), StatusManager.SHOW); >+ break; >+ default : >+ ProvUI.handleException(fail[0], null, StatusManager.SHOW); >+ } > } > repositoryViewer.update(selected[0], null); > setDetails();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 267887
:
128218
|
132098