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 117732 Details for
Bug 247220
validating server version did not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Updated patch.
clipboard.txt (text/plain), 10.50 KB, created by
Robert Elves
on 2008-11-13 00:24:04 EST
(
hide
)
Description:
Updated patch.
Filename:
MIME Type:
Creator:
Robert Elves
Created:
2008-11-13 00:24:04 EST
Size:
10.50 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.ui >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java,v >retrieving revision 1.88 >diff -u -r1.88 BugzillaRepositorySettingsPage.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java 12 Sep 2008 04:15:33 -0000 1.88 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java 13 Nov 2008 05:22:43 -0000 >@@ -21,9 +21,7 @@ > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.NullProgressMonitor; >-import org.eclipse.core.runtime.Status; > import org.eclipse.jface.operation.IRunnableWithProgress; >-import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient; > import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientFactory; > import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; >@@ -31,8 +29,6 @@ > import org.eclipse.mylyn.internal.bugzilla.core.BugzillaStatus; > import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; > import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration; >-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BugzillaServerVersion; >-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin; > import org.eclipse.mylyn.tasks.core.RepositoryStatus; > import org.eclipse.mylyn.tasks.core.RepositoryTemplate; > import org.eclipse.mylyn.tasks.core.TaskRepository; >@@ -40,7 +36,6 @@ > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; >-import org.eclipse.swt.events.SelectionListener; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; > import org.eclipse.swt.widgets.Combo; >@@ -58,19 +53,14 @@ > > private static final String TOOLTIP_AUTODETECTION_DISABLED = "Available once repository has been created."; > >- //private static final String TOOLTIP_CACHED_CONFIGURATION = "Use for repositories that explicitly state that they support this customization."; >- >- //private static final String LABEL_CACHED_CONFIGURATION = "Cached configuration:"; >- > private static final String LABEL_SHORT_LOGINS = "Local users enabled:"; > >- public static final String LABEL_AUTOMATIC_VERSION = "Automatic (Use Validate Settings)"; >+ private static final String LABEL_VERSION_NUMBER = "2.18 - 3.0"; > > private static final String TITLE = "Bugzilla Repository Settings"; > >- private static final String DESCRIPTION = "Example: https://bugs.eclipse.org/bugs (do not include index.cgi)"; >- >- protected Combo repositoryVersionCombo; >+ private static final String DESCRIPTION = "Supports Bugzilla " + LABEL_VERSION_NUMBER >+ + "\nExample: https://bugs.eclipse.org/bugs (do not include index.cgi)"; > > protected Button autodetectPlatformOS; > >@@ -80,8 +70,6 @@ > > private Button cleanQAContact; > >- //private Button cachedConfigButton; >- > private RepositoryConfiguration repositoryConfiguration = null; > > private String platform = null; >@@ -103,7 +91,6 @@ > repositoryLabelEditor.setStringValue(template.label); > setUrl(template.repositoryUrl); > // setAnonymous(info.anonymous); >- setBugzillaVersion(template.version); > if (template.characterEncoding != null) { > setEncoding(template.characterEncoding); > } >@@ -115,51 +102,6 @@ > protected void createAdditionalControls(Composite parent) { > addRepositoryTemplatesToServerUrlCombo(); > >- Label repositoryVersionLabel = new Label(parent, SWT.NONE); >- repositoryVersionLabel.setText("Repository version: "); >- repositoryVersionCombo = new Combo(parent, SWT.READ_ONLY); >- >- repositoryVersionCombo.add(LABEL_AUTOMATIC_VERSION); >- >- for (BugzillaServerVersion version : BugzillaServerVersion.values()) { >- repositoryVersionCombo.add(version.toString()); >- } >- if (repository != null && repositoryVersionCombo.indexOf(repository.getVersion()) >= 0) { >- repositoryVersionCombo.select(repositoryVersionCombo.indexOf(repository.getVersion())); >- } else { >- >- int defaultIndex = repositoryVersionCombo.indexOf(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString()); >- if (defaultIndex != -1) { >- repositoryVersionCombo.select(defaultIndex); >- setVersion(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString()); >- } else { >- defaultIndex = repositoryVersionCombo.getItemCount() - 1; >- } >- repositoryVersionCombo.select(defaultIndex); >- setVersion(repositoryVersionCombo.getItem(defaultIndex)); >- isPageComplete(); >- if (getWizard() != null) { >- getWizard().getContainer().updateButtons(); >- } >- } >- >- repositoryVersionCombo.addSelectionListener(new SelectionListener() { >- >- public void widgetSelected(SelectionEvent e) { >- if (repositoryVersionCombo.getSelectionIndex() >= 0) { >- setVersion(repositoryVersionCombo.getItem(repositoryVersionCombo.getSelectionIndex())); >- isPageComplete(); >- if (getWizard() != null) { >- getWizard().getContainer().updateButtons(); >- } >- } >- } >- >- public void widgetDefaultSelected(SelectionEvent e) { >- // ignore >- } >- }); >- > Label shortLoginLabel = new Label(parent, SWT.NONE); > shortLoginLabel.setText(LABEL_SHORT_LOGINS); > cleanQAContact = new Button(parent, SWT.CHECK | SWT.LEFT); >@@ -168,19 +110,6 @@ > cleanQAContact.setSelection(shortLogin); > } > >-// Label cachedConfigLabel = new Label(parent, SWT.NONE); >-// cachedConfigLabel.setText(LABEL_CACHED_CONFIGURATION); >-// cachedConfigLabel.setToolTipText(TOOLTIP_CACHED_CONFIGURATION); >-// cachedConfigButton = new Button(parent, SWT.CHECK | SWT.LEFT); >-// if (repository != null) { >-// boolean isCached = true; >-// String oldTimestamp = repository.getProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP); >-// if (oldTimestamp != null && oldTimestamp.equals(IBugzillaConstants.TIMESTAMP_NOT_AVAILABLE)) { >-// isCached = false; >-// } >-// cachedConfigButton.setSelection(isCached); >-// } >- > if (null != repository) { > repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository.getRepositoryUrl()); > platform = repository.getProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM); >@@ -327,38 +256,6 @@ > defaultPlatformCombo.setEnabled(!autodetectPlatformOS.getSelection()); > } > >- public void setBugzillaVersion(String version) { >- if (version == null) { >- repositoryVersionCombo.select(0); >- } else { >- int i = repositoryVersionCombo.indexOf(version.toString()); >- if (i != -1) { >- repositoryVersionCombo.select(i); >- setVersion(version); >- } else { >- for (IBugzillaConstants.BugzillaServerVersion serverVersion : IBugzillaConstants.BugzillaServerVersion.values()) { >- if (version.startsWith(serverVersion.toString())) { >- i = repositoryVersionCombo.indexOf(serverVersion.toString()); >- if (i != -1) { >- repositoryVersionCombo.select(i); >- setVersion(serverVersion.toString()); >- break; >- } >- } >- } >- if (i == -1) { >- StatusHandler.log(new Status(IStatus.INFO, BugzillaUiPlugin.ID_PLUGIN, >- "Could not resolve repository version: " + version)); >- i = repositoryVersionCombo.indexOf(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString()); >- if (i != -1) { >- repositoryVersionCombo.select(i); >- setVersion(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString()); >- } >- } >- } >- } >- } >- > @Override > public void applyTo(TaskRepository repository) { > super.applyTo(repository); >@@ -366,12 +263,6 @@ > String.valueOf(cleanQAContact.getSelection())); > repository.setProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING, languageSettingCombo.getText()); > >-// if (cachedConfigButton.getSelection()) { >-// repository.setProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP, ""); >-// } else { >-// repository.setProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP, >-// IBugzillaConstants.TIMESTAMP_NOT_AVAILABLE); >-// } > if (!autodetectPlatformOS.getSelection()) { > repository.setProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM, > String.valueOf(defaultPlatformCombo.getItem(defaultPlatformCombo.getSelectionIndex()))); >@@ -384,18 +275,6 @@ > } > > @Override >- public boolean isPageComplete() { >- boolean erg = super.isPageComplete(); >- if (erg) { >- if (getVersion().compareTo(LABEL_AUTOMATIC_VERSION) == 0) { >- setErrorMessage("Validate Settings or select repository version under Additional Settings section."); >- erg = false; >- } >- } >- return erg; >- } >- >- @Override > protected boolean isValidUrl(String name) { > if (name.startsWith(URL_PREFIX_HTTPS) || name.startsWith(URL_PREFIX_HTTP)) { > try { >@@ -409,32 +288,14 @@ > > @Override > protected Validator getValidator(TaskRepository repository) { >- >- if (repositoryVersionCombo.getSelectionIndex() != 0) { >- return new BugzillaValidator(repository, >- repositoryVersionCombo.getItem(repositoryVersionCombo.getSelectionIndex())); >- } else { >- return new BugzillaValidator(repository, null); >- } >- } >- >- @Override >- protected void applyValidatorResult(Validator validator) { >- super.applyValidatorResult(validator); >- >- if (((BugzillaValidator) validator).getResult() != null && ((BugzillaValidator) validator).getResult() != null) { >- setBugzillaVersion(((BugzillaValidator) validator).getResult()); >- } >+ return new BugzillaValidator(repository); > } > > public class BugzillaValidator extends Validator { > > final TaskRepository repository; > >- private final String[] versions = new String[1];; >- >- public BugzillaValidator(TaskRepository repository, String version) { >- versions[0] = version; >+ public BugzillaValidator(TaskRepository repository) { > this.repository = repository; > } > >@@ -473,28 +334,13 @@ > monitor.beginTask("Validating server settings", IProgressMonitor.UNKNOWN); > BugzillaClient client = null; > >- boolean checkVersion = versions[0] == null; >- >- if (versions != null) { >- client = BugzillaClientFactory.createClient(repository); >- client.validate(monitor); >- } >- if (checkVersion && client != null) { >- RepositoryConfiguration config = client.getRepositoryConfiguration(); >- if (config != null) { >- versions[0] = config.getInstallVersion(); >- } >- } >- >+ client = BugzillaClientFactory.createClient(repository); >+ client.validate(monitor); > } finally { > monitor.done(); > } > } > >- public String getResult() { >- return versions[0]; >- } >- > } > > @Override
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 247220
:
112499
|
112500
|
116139
|
116140
|
116142
|
116143
|
116695
|
116696
|
117486
|
117487
| 117732