use of org.eclipse.userstorage.IStorage in project epp.mpc by eclipse.
the class MarketplaceStorageService method createStorage.
protected IStorage createStorage() {
IStorage storage = getStorageFactory().create(applicationToken, new FileStorageCache.SingleApplication(this.applicationToken));
credentialsProvider = new EclipseOAuthCredentialsProvider(new MPCOAuthParameters());
credentialsProvider.setInteractive(false);
storage.setCredentialsProvider(credentialsProvider);
return storage;
}
use of org.eclipse.userstorage.IStorage in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method applyShellProvider.
protected void applyShellProvider() {
IUserFavoritesService userFavoritesService = marketplaceService.getUserFavoritesService();
if (userFavoritesService == null) {
return;
}
IMarketplaceStorageService storageService = userFavoritesService.getStorageService();
if (storageService == null) {
return;
}
IStorage storage = storageService.getStorage();
ICredentialsProvider credentialsProvider = storage.getCredentialsProvider();
if (credentialsProvider instanceof EclipseOAuthCredentialsProvider) {
((EclipseOAuthCredentialsProvider) credentialsProvider).setShell(shellProvider);
}
}
Aggregations