diff options
author | relves | 2006-05-30 02:32:39 +0000 |
---|---|---|
committer | relves | 2006-05-30 02:32:39 +0000 |
commit | 022f75a91905ba0f0ed48e84d09a03613357992d (patch) | |
tree | 775d90342d6900884270d9a84d7252c61dc1865e /org.eclipse.mylyn.bugzilla.ui | |
parent | 93841ee7a27a2b18422f9d2bf9b9c9818f198498 (diff) | |
download | org.eclipse.mylyn.tasks-022f75a91905ba0f0ed48e84d09a03613357992d.tar.gz org.eclipse.mylyn.tasks-022f75a91905ba0f0ed48e84d09a03613357992d.tar.xz org.eclipse.mylyn.tasks-022f75a91905ba0f0ed48e84d09a03613357992d.zip |
Progress on: 144256: Some queries fail when using SSL and unsigned certificates
https://bugs.eclipse.org/bugs/show_bug.cgi?id=144256
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
4 files changed, 37 insertions, 15 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java index fc0ec6200..03a3e6063 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java @@ -12,6 +12,8 @@ package org.eclipse.mylar.internal.bugzilla.ui; import java.io.IOException; import java.net.Authenticator; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.List; @@ -29,6 +31,7 @@ import org.eclipse.mylar.internal.bugzilla.core.RepositoryConfiguration; import org.eclipse.mylar.internal.bugzilla.core.RepositoryConfigurationFactory; import org.eclipse.mylar.internal.bugzilla.ui.search.IBugzillaResultEditorMatchAdapter; import org.eclipse.mylar.internal.core.util.MylarStatusHandler; +import org.eclipse.mylar.provisional.tasklist.MylarTaskListPlugin; import org.eclipse.mylar.provisional.tasklist.TaskRepository; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.eclipse.update.internal.ui.UpdateUI; @@ -259,9 +262,11 @@ public class BugzillaUiPlugin extends AbstractUIPlugin { * @param monitor * A reference to a progress monitor * @throws IOException + * @throws NoSuchAlgorithmException + * @throws KeyManagementException */ public static void updateQueryOptions(TaskRepository repository, IProgressMonitor monitor) throws LoginException, - IOException { + IOException, KeyManagementException, NoSuchAlgorithmException { String repositoryUrl = repository.getUrl(); @@ -269,7 +274,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin { throw new OperationCanceledException(); // TODO: pass monitor along since it is this call that does the work and can hang due to network IO - RepositoryConfiguration config = RepositoryConfigurationFactory.getInstance().getConfiguration(repository.getUrl(), repository.getUserName(), repository.getPassword(), repository.getCharacterEncoding()); + RepositoryConfiguration config = RepositoryConfigurationFactory.getInstance().getConfiguration(repository.getUrl(), MylarTaskListPlugin.getDefault().getProxySettings(), repository.getUserName(), repository.getPassword(), repository.getCharacterEncoding()); if(monitor.isCanceled()) throw new OperationCanceledException(); diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/ExistingBugEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/ExistingBugEditor.java index 873993551..63971f4f4 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/ExistingBugEditor.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/ExistingBugEditor.java @@ -718,9 +718,14 @@ public class ExistingBugEditor extends AbstractBugEditor { keyWordsList.setLayoutData(keyWordsTextData); // initialize the keywords list with valid values - - java.util.List<String> validKeywords = BugzillaPlugin.getDefault().getRepositoryConfiguration(repository.getUrl(), - repository.getUserName(), repository.getPassword(), repository.getCharacterEncoding()).getKeywords(); + + java.util.List<String> validKeywords = new ArrayList<String>(); + try { + validKeywords = BugzillaPlugin.getDefault().getRepositoryConfiguration(repository.getUrl(), + MylarTaskListPlugin.getDefault().getProxySettings(), repository.getUserName(), repository.getPassword(), repository.getCharacterEncoding()).getKeywords(); + } catch (Exception e) { + // ignore + } if (validKeywords != null) { for (Iterator<String> it = validKeywords.iterator(); it.hasNext();) { diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java index 14f1a87a6..aa1952b14 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java @@ -1320,8 +1320,11 @@ public class BugzillaSearchPage extends AbstractBugzillaQueryPage implements ISe MessageDialog.openError(null, "Connection Error", e.getMessage() + "\nPlease check your settings in the bugzilla preferences. "); return; - } catch (OperationCanceledException exception) { - System.err.println("Cancelled"); + } catch (OperationCanceledException exception) { + return; + } catch (Exception e) { + MessageDialog.openError(null, "Error updating search options", "Error was : "+e.getMessage()); + return; } finally { monitor.done(); diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java index bca53ce4c..cba139ef4 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java @@ -29,6 +29,7 @@ import org.eclipse.mylar.internal.bugzilla.core.IBugzillaConstants; import org.eclipse.mylar.internal.bugzilla.core.NewBugzillaReport; import org.eclipse.mylar.internal.bugzilla.ui.BugzillaUiPlugin; import org.eclipse.mylar.internal.tasklist.ui.views.TaskRepositoriesView; +import org.eclipse.mylar.provisional.tasklist.MylarTaskListPlugin; import org.eclipse.mylar.provisional.tasklist.TaskRepository; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; @@ -47,7 +48,7 @@ import org.eclipse.ui.PlatformUI; * The first page of the new bug wizard where the user chooses the bug's product */ public class BugzillaProductPage extends AbstractWizardListPage { - + private static final String NEW_BUGZILLA_TASK_ERROR_TITLE = "New Bugzilla Task Error"; private static final String DESCRIPTION = "Pick a product on which to enter a bug.\n" @@ -90,7 +91,8 @@ public class BugzillaProductPage extends AbstractWizardListPage { "icons/wizban/bug-wizard.gif")); } - protected ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); + protected ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(PlatformUI.getWorkbench() + .getActiveWorkbenchWindow().getShell()); protected IPreferenceStore prefs = BugzillaUiPlugin.getDefault().getPreferenceStore(); @@ -114,8 +116,8 @@ public class BugzillaProductPage extends AbstractWizardListPage { BugzillaUiPlugin.updateQueryOptions(repository, monitor); products = new ArrayList<String>(); - for (String product : BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_PRODUCT, - null, repository.getUrl())) { + for (String product : BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_PRODUCT, null, + repository.getUrl())) { products.add(product); } monitor.worked(1); @@ -132,6 +134,9 @@ public class BugzillaProductPage extends AbstractWizardListPage { } catch (IOException exception) { MessageDialog.openError(null, "Connection Error", "\nPlease check your settings in the bugzilla preferences. "); + } catch (Exception exception) { + MessageDialog.openError(null, "Error updating product list", "Error reported:\n" + + exception.getMessage()); } finally { monitor.done(); monitorDialog.close(); @@ -145,12 +150,14 @@ public class BugzillaProductPage extends AbstractWizardListPage { if (!bugWizard.model.hasParsedProducts()) { String repositoryUrl = repository.getUrl(); try { - String[] storedProducts = BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_PRODUCT, - null, repositoryUrl); + String[] storedProducts = BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_PRODUCT, null, + repositoryUrl); if (storedProducts.length > 0) { products = Arrays.asList(storedProducts); } else { - products = BugzillaRepositoryUtil.getProductList(repository.getUrl(), repository.getUserName(), repository.getPassword(), repository.getCharacterEncoding()); + products = BugzillaRepositoryUtil.getProductList(repository.getUrl(), MylarTaskListPlugin + .getDefault().getProxySettings(), repository.getUserName(), repository.getPassword(), + repository.getCharacterEncoding()); } bugWizard.model.setConnected(true); bugWizard.model.setParsedProductsStatus(true); @@ -206,7 +213,9 @@ public class BugzillaProductPage extends AbstractWizardListPage { // try to get the attributes from the bugzilla server try { if (!model.hasParsedAttributes() || !model.getProduct().equals(prevProduct)) { - BugzillaRepositoryUtil.setupNewBugAttributes(repository.getUrl(), repository.getUserName(), repository.getPassword(), model, null); + BugzillaRepositoryUtil.setupNewBugAttributes(repository.getUrl(), MylarTaskListPlugin.getDefault() + .getProxySettings(), repository.getUserName(), repository.getPassword(), model, repository + .getCharacterEncoding()); model.setParsedAttributesStatus(true); } |