diff options
author | spingel | 2009-10-02 21:49:30 +0000 |
---|---|---|
committer | spingel | 2009-10-02 21:49:30 +0000 |
commit | 3b83c44f6725783d1e9d00b9a79c58b514a23dfe (patch) | |
tree | fa05ad1569a0c4768c8dddc108ca68bcdd8718a1 /org.eclipse.mylyn.bugzilla.core | |
parent | 757acc67bcaa0d3420616cb8e0104ad7584eb00d (diff) | |
download | org.eclipse.mylyn.tasks-3b83c44f6725783d1e9d00b9a79c58b514a23dfe.tar.gz org.eclipse.mylyn.tasks-3b83c44f6725783d1e9d00b9a79c58b514a23dfe.tar.xz org.eclipse.mylyn.tasks-3b83c44f6725783d1e9d00b9a79c58b514a23dfe.zip |
RESOLVED - bug 289663: remove circular dependency between BugzillaCorePlugin and BugzillaTaskDataHandler
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289663
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java index 1074776d2..9b39f87b9 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java @@ -172,36 +172,33 @@ public class BugzillaClient { private final AbstractWebLocation location; - private BugzillaRepositoryConnector connector; + private final BugzillaRepositoryConnector connector; public BugzillaClient(AbstractWebLocation location, String characterEncoding, Map<String, String> configParameters, - BugzillaLanguageSettings languageSettings) throws MalformedURLException { + BugzillaLanguageSettings languageSettings, BugzillaRepositoryConnector connector) + throws MalformedURLException { this.repositoryUrl = new URL(location.getUrl()); this.location = location; this.characterEncoding = characterEncoding; this.configParameters = configParameters; this.bugzillaLanguageSettings = languageSettings; + this.connector = connector; this.proxy = location.getProxyForHost(location.getUrl(), IProxyData.HTTP_PROXY_TYPE); WebUtil.configureHttpClient(httpClient, USER_AGENT); - } public BugzillaClient(AbstractWebLocation location, TaskRepository taskRepository, BugzillaRepositoryConnector connector) throws MalformedURLException { + this(location, taskRepository.getCharacterEncoding(), taskRepository.getProperties(), + getLanguageSettings(taskRepository), connector); + } + + private static BugzillaLanguageSettings getLanguageSettings(TaskRepository taskRepository) { String language = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING); if (language == null || language.equals("")) { //$NON-NLS-1$ language = IBugzillaConstants.DEFAULT_LANG; } - - this.connector = connector; - this.repositoryUrl = new URL(location.getUrl()); - this.location = location; - this.characterEncoding = taskRepository.getCharacterEncoding(); - this.configParameters = taskRepository.getProperties(); - this.bugzillaLanguageSettings = connector.getLanguageSetting(language); - this.proxy = location.getProxyForHost(location.getUrl(), IProxyData.HTTP_PROXY_TYPE); - WebUtil.configureHttpClient(httpClient, USER_AGENT); - + return BugzillaRepositoryConnector.getLanguageSetting(language); } public void validate(IProgressMonitor monitor) throws IOException, CoreException { |