summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-01-17 16:52:25 (EST)
committerSteffen Pingel2012-01-17 16:52:25 (EST)
commitd53c0e90fc8f1bb141fd4318da7cd443f00a5733 (patch)
tree995db54c3589d28c47f89ecdc01ef6958010faba
parent7de02742fad65fab2e424a18ac687451b6210cda (diff)
downloadorg.eclipse.mylyn.commons-d53c0e90fc8f1bb141fd4318da7cd443f00a5733.zip
org.eclipse.mylyn.commons-d53c0e90fc8f1bb141fd4318da7cd443f00a5733.tar.gz
org.eclipse.mylyn.commons-d53c0e90fc8f1bb141fd4318da7cd443f00a5733.tar.bz2
RESOLVED - bug 317907: [api] provide support for password prompting
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317907 Change-Id: Iecf6f2079558b366da82fca72af22f1a4fdaf1cd
-rw-r--r--org.eclipse.mylyn.commons.repositories.core/build.properties3
-rw-r--r--org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/commons/repositories/core/RepositoryLocation.java10
-rw-r--r--org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/CredentialsFactory.java2
-rw-r--r--org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/LocationService.java5
-rw-r--r--org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/SecureCredentialsStore.java2
5 files changed, 17 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.commons.repositories.core/build.properties b/org.eclipse.mylyn.commons.repositories.core/build.properties
index 2f1725d..0ca9052 100644
--- a/org.eclipse.mylyn.commons.repositories.core/build.properties
+++ b/org.eclipse.mylyn.commons.repositories.core/build.properties
@@ -9,7 +9,8 @@
bin.includes = about.html,\
META-INF/,\
.,\
- plugin.properties
+ plugin.properties,\
+ plugin.xml
src.includes = about.html
jre.compilation.profile = J2SE-1.5
source.. = src/
diff --git a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/commons/repositories/core/RepositoryLocation.java b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/commons/repositories/core/RepositoryLocation.java
index e001e27..6db89d7 100644
--- a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/commons/repositories/core/RepositoryLocation.java
+++ b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/commons/repositories/core/RepositoryLocation.java
@@ -51,6 +51,8 @@ import org.eclipse.mylyn.internal.commons.repositories.core.RepositoriesCoreInte
// FIXME add synchronization
public class RepositoryLocation extends PlatformObject {
+ private static boolean flushCredentialsErrorLogged;
+
public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
public static final String PROPERTY_LABEL = "label"; //$NON-NLS-1$
@@ -157,7 +159,13 @@ public class RepositoryLocation extends PlatformObject {
try {
newCredentialsStore.flush();
} catch (IOException e) {
- // ignore
+ if (!flushCredentialsErrorLogged) {
+ flushCredentialsErrorLogged = true;
+ StatusHandler.log(new Status(
+ IStatus.ERROR,
+ RepositoriesCoreInternal.ID_PLUGIN,
+ "Unexpected error occured while flushing credentials. Credentials may not have been saved.", e)); //$NON-NLS-1$
+ }
}
}
diff --git a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/CredentialsFactory.java b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/CredentialsFactory.java
index 77dc223..c663df7 100644
--- a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/CredentialsFactory.java
+++ b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/CredentialsFactory.java
@@ -31,7 +31,7 @@ public class CredentialsFactory {
constructor.setAccessible(true);
return constructor.newInstance(credentialsStore, key, loadSecrets);
} catch (Exception e) {
- throw new RuntimeException("Unexpected error while creating credentials", e);
+ throw new RuntimeException("Unexpected error while creating credentials", e); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/LocationService.java b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/LocationService.java
index 844c5ba..ff544c5 100644
--- a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/LocationService.java
+++ b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/LocationService.java
@@ -32,8 +32,10 @@ import org.eclipse.mylyn.commons.repositories.core.auth.ICredentialsStore;
*/
public class LocationService implements ILocationService {
- private static class LocationServiceInitializer {
+ static class LocationServiceInitializer {
+
private static ILocationService service;
+
static {
ExtensionPointReader<ILocationService> reader = new ExtensionPointReader<ILocationService>(
RepositoriesCoreInternal.ID_PLUGIN, "locationServices", "service", ILocationService.class); //$NON-NLS-1$ //$NON-NLS-2$
@@ -49,6 +51,7 @@ public class LocationService implements ILocationService {
service = new LocationService();
}
}
+
}
private static class PlatformProxyProvider extends ProxyProvider {
diff --git a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/SecureCredentialsStore.java b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/SecureCredentialsStore.java
index fd18a02..8be852d 100644
--- a/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/SecureCredentialsStore.java
+++ b/org.eclipse.mylyn.commons.repositories.core/src/org/eclipse/mylyn/internal/commons/repositories/core/SecureCredentialsStore.java
@@ -187,7 +187,7 @@ public class SecureCredentialsStore implements ICredentialsStore {
StatusHandler.log(new Status(
IStatus.ERROR,
RepositoriesCoreInternal.ID_PLUGIN,
- "Unexpected error accessing secure storage, falling back to in memory store for credentials. Some credentials may not be saved.",
+ "Unexpected error accessing secure storage, falling back to in memory store for credentials. Some credentials may not be saved.", //$NON-NLS-1$
e));
}
}