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 78692 Details for
Bug 173352
Make parsed post success string/regexp a preference
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]
Patch
patch173355.txt (text/plain), 27.90 KB, created by
Frank Becker
on 2007-09-18 18:01:55 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2007-09-18 18:01:55 EDT
Size:
27.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.core >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java,v >retrieving revision 1.44 >diff -u -r1.44 BugzillaAttachmentHandler.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java 26 Jun 2007 01:16:07 -0000 1.44 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java 18 Sep 2007 21:56:32 -0000 >@@ -51,7 +51,7 @@ > try { > String bugId = task.getTaskId(); > BugzillaClient client = connector.getClientManager().getClient(repository); >- client.postAttachment(bugId, comment, attachment); >+ client.postAttachment(bugId, comment, attachment, repository); > } catch (IOException e) { > throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, > RepositoryStatus.ERROR_IO, repository.getUrl(), e)); >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java,v >retrieving revision 1.31 >diff -u -r1.31 BugzillaTaskDataHandler.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java 28 Aug 2007 21:07:38 -0000 1.31 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java 18 Sep 2007 21:56:39 -0000 >@@ -73,11 +73,11 @@ > int bugId = BugzillaRepositoryConnector.getBugId(taskId); > RepositoryTaskData taskData; > try { >- taskData = client.getTaskData(bugId); >+ taskData = client.getTaskData(bugId, repository); > } catch (CoreException e) { > // TODO: Move retry handling into client > if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) { >- taskData = client.getTaskData(bugId); >+ taskData = client.getTaskData(bugId, repository); > } else { > throw e; > } >@@ -87,7 +87,7 @@ > configureTaskData(repository, taskData); > } catch (CoreException ce) { > // retry since data retrieved may be corrupt >- taskData = client.getTaskData(bugId); >+ taskData = client.getTaskData(bugId, repository); > if (taskData != null) { > configureTaskData(repository, taskData); > } >@@ -110,14 +110,14 @@ > Set<RepositoryTaskData> result = new HashSet<RepositoryTaskData>(); > BugzillaClient client = connector.getClientManager().getClient(repository); > try { >- Map<String, RepositoryTaskData> dataReturned = client.getTaskData(taskIds); >+ Map<String, RepositoryTaskData> dataReturned = client.getTaskData(taskIds, repository); > for (RepositoryTaskData repositoryTaskData : dataReturned.values()) { > result.add(repositoryTaskData); > } > } catch (CoreException e) { > // TODO: Move retry handling into client > if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) { >- Map<String, RepositoryTaskData> dataReturned = client.getTaskData(taskIds); >+ Map<String, RepositoryTaskData> dataReturned = client.getTaskData(taskIds, repository); > for (RepositoryTaskData repositoryTaskData : dataReturned.values()) { > result.add(repositoryTaskData); > } >@@ -150,11 +150,11 @@ > try { > BugzillaClient client = connector.getClientManager().getClient(repository); > try { >- return client.postTaskData(taskData); >+ return client.postTaskData(taskData, repository); > } catch (CoreException e) { > // TODO: Move retry handling into client > if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) { >- return client.postTaskData(taskData); >+ return client.postTaskData(taskData, repository); > } else { > throw e; > } >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java,v >retrieving revision 1.81 >diff -u -r1.81 BugzillaRepositoryConnector.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java 29 Aug 2007 20:13:55 -0000 1.81 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java 18 Sep 2007 21:56:38 -0000 >@@ -379,12 +379,12 @@ > try { > monitor.beginTask("Running query", IProgressMonitor.UNKNOWN); > BugzillaClient client = getClientManager().getClient(repository); >- boolean hitsReceived = client.getSearchHits(query, resultCollector); >+ boolean hitsReceived = client.getSearchHits(query, resultCollector, repository); > if (!hitsReceived) { > // XXX: HACK in case of ip change bugzilla can return 0 hits > // due to invalid authorization token, forcing relogin fixes > client.logout(); >- client.getSearchHits(query, resultCollector); >+ client.getSearchHits(query, resultCollector, repository); > } > > return Status.OK_STATUS; >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java,v >retrieving revision 1.92 >diff -u -r1.92 BugzillaClient.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java 22 Aug 2007 20:50:00 -0000 1.92 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java 18 Sep 2007 21:56:36 -0000 >@@ -57,6 +57,7 @@ > import org.eclipse.mylyn.tasks.core.RepositoryStatus; > import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; > import org.eclipse.mylyn.tasks.core.RepositoryTaskData; >+import org.eclipse.mylyn.tasks.core.TaskRepository; > import org.eclipse.mylyn.web.core.HtmlStreamTokenizer; > import org.eclipse.mylyn.web.core.HtmlTag; > import org.eclipse.mylyn.web.core.WebClientUtil; >@@ -415,12 +416,12 @@ > } > } > >- public RepositoryTaskData getTaskData(int id) throws IOException, CoreException { >+ public RepositoryTaskData getTaskData(int id, TaskRepository repository) throws IOException, CoreException { > final String idString = String.valueOf(id); > Set<String> data = new HashSet<String>(); > data.add(idString); > >- Map<String, RepositoryTaskData> returnedData = getTaskData(data); >+ Map<String, RepositoryTaskData> returnedData = getTaskData(data, null); > > return returnedData.get(idString); > >@@ -457,7 +458,7 @@ > // } > } > >- public boolean getSearchHits(AbstractRepositoryQuery query, ITaskCollector collector) throws IOException, >+ public boolean getSearchHits(AbstractRepositoryQuery query, ITaskCollector collector, TaskRepository repository) throws IOException, > CoreException { > GetMethod method = null; > try { >@@ -481,7 +482,7 @@ > } > } > parseHtmlError(new BufferedReader( >- new InputStreamReader(method.getResponseBodyAsStream(), characterEncoding))); >+ new InputStreamReader(method.getResponseBodyAsStream(), characterEncoding)), repository); > } finally { > if (method != null) { > method.releaseConnection(); >@@ -614,7 +615,7 @@ > } > } > >- public void postAttachment(String bugReportID, String comment, ITaskAttachment attachment) throws HttpException, >+ public void postAttachment(String bugReportID, String comment, ITaskAttachment attachment, TaskRepository repository) throws HttpException, > IOException, CoreException { > > // TODO: Throw IllegalArgumentException if passed null parameter >@@ -665,7 +666,7 @@ > postMethod.getResponseCharSet()); > BufferedReader bufferedReader = new BufferedReader(reader); > >- parseHtmlError(bufferedReader); >+ parseHtmlError(bufferedReader, repository); > > } else { > postMethod.getResponseBody(); >@@ -723,7 +724,7 @@ > > } > >- public String postTaskData(RepositoryTaskData taskData) throws IOException, CoreException { >+ public String postTaskData(RepositoryTaskData taskData, TaskRepository repository) throws IOException, CoreException { > NameValuePair[] formData = null; > String prefix = null; > String prefix2 = null; >@@ -759,6 +760,7 @@ > in.mark(1028); > HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null); > >+ > boolean existingBugPosted = false; > boolean isTitle = false; > String title = ""; >@@ -770,6 +772,7 @@ > continue; > } > >+ String processed = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_STRING_PROCESSED); > if (isTitle) { > // get all of the data in the title tag > if (token.getType() != Token.TAG) { >@@ -778,7 +781,7 @@ > } else if (token.getType() == Token.TAG > && ((HtmlTag) token.getValue()).getTagType() == HtmlTag.Type.TITLE > && ((HtmlTag) token.getValue()).isEndTag()) { >- if (!taskData.isNew() && (title.toLowerCase(Locale.ENGLISH).indexOf("processed") != -1)) { >+ if (!taskData.isNew() && (title.toLowerCase(Locale.ENGLISH).indexOf(processed) != -1)) { > existingBugPosted = true; > } else if (taskData.isNew() && prefix != null && prefix2 != null && postfix != null > && postfix2 != null) { >@@ -815,7 +818,7 @@ > } catch (IOException e) { > // ignore > } >- parseHtmlError(in); >+ parseHtmlError(in, repository); > } > > return result; >@@ -965,8 +968,9 @@ > > /** > * Utility method for determining what potential error has occurred from a bugzilla html reponse page >+ * @param repository TODO > */ >- public void parseHtmlError(BufferedReader in) throws IOException, CoreException { >+ public void parseHtmlError(BufferedReader in, TaskRepository repository) throws IOException, CoreException { > HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null); > > boolean isTitle = false; >@@ -992,19 +996,19 @@ > && ((HtmlTag) token.getValue()).getTagType() == HtmlTag.Type.TITLE > && ((HtmlTag) token.getValue()).isEndTag()) { > >- if (title.indexOf("login") != -1 || title.indexOf("log in") != -1 >- || (title.indexOf("invalid") != -1 && title.indexOf("password") != -1) >- || title.indexOf("check e-mail") != -1) { >+ if (title.indexOf(repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_LOGIN)) != -1 /*|| title.indexOf("log in") != -1 */ >+ || (title.indexOf(repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_INVALID)) != -1 && title.indexOf(repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_PASSWORD)) != -1) >+ || title.indexOf(repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_CHECK_EMAIL)) != -1) { > authenticated = false; > throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, > RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(), title)); >- } else if (title.indexOf(IBugzillaConstants.ERROR_MIDAIR_COLLISION) != -1) { >+ } else if (title.indexOf(repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_COLLISION)) != -1) { > throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, > RepositoryStatus.REPOSITORY_COLLISION, repositoryUrl.toString())); >- } else if (title.indexOf(IBugzillaConstants.ERROR_COMMENT_REQUIRED) != -1) { >+ } else if (title.indexOf(repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_COMMENT_REQUIRED)) != -1) { > throw new CoreException(new BugzillaStatus(Status.INFO, BugzillaCorePlugin.PLUGIN_ID, > RepositoryStatus.REPOSITORY_COMMENT_REQUIRED)); >- } else if (title.indexOf(IBugzillaConstants.LOGGED_OUT) != -1) { >+ } else if (title.indexOf(repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_LOGGED_OUT)) != -1) { > authenticated = false; > // throw new > // BugzillaException(IBugzillaConstants.LOGGED_OUT); >@@ -1017,7 +1021,7 @@ > } > } > } >- >+// repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_STRING_PROCESSED) > throw new CoreException(RepositoryStatus.createHtmlStatus(repositoryUrl.toString(), IStatus.INFO, > BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_REPOSITORY, > "A repository error has occurred.", body)); >@@ -1066,7 +1070,7 @@ > return null; > } > >- public Map<String, RepositoryTaskData> getTaskData(Set<String> taskIds) throws IOException, CoreException { >+ public Map<String, RepositoryTaskData> getTaskData(Set<String> taskIds, TaskRepository repository) throws IOException, CoreException { > PostMethod method = null; > HashMap<String, RepositoryTaskData> taskDataMap = new HashMap<String, RepositoryTaskData>(); > while (taskIds.size() > 0) { >@@ -1116,7 +1120,7 @@ > } else { > > parseHtmlError(new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(), >- characterEncoding))); >+ characterEncoding)), repository); > } > } finally { > if (method != null) { >Index: src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java,v >retrieving revision 1.50 >diff -u -r1.50 IBugzillaConstants.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java 4 Sep 2007 20:49:18 -0000 1.50 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java 18 Sep 2007 21:56:39 -0000 >@@ -274,4 +274,30 @@ > > public static final String BUGZILLA_DEF_PLATFORM = "bugzilla.default.platform"; > >+ public static final String REPOSITORY_HTTP_ERROR_LOGIN = "bugzilla.http.error.Login"; >+ >+ public static final String REPOSITORY_HTTP_ERROR_INVALID = "bugzilla.http.error.Invalid"; >+ >+ public static final String REPOSITORY_HTTP_ERROR_PASSWORD = "bugzilla.http.error.Password"; >+ >+ public static final String REPOSITORY_HTTP_ERROR_CHECK_EMAIL = "bugzilla.http.error.checkEmail"; >+ >+ public static final String REPOSITORY_HTTP_ERROR_COLLISION = "bugzilla.http.error.collision"; >+ >+ public static final String REPOSITORY_HTTP_ERROR_COMMENT_REQUIRED = "bugzilla.http.error.commentRequired"; >+ >+ public static final String REPOSITORY_HTTP_ERROR_LOGGED_OUT = "bugzilla.http.error.loggedOut"; >+ >+ public static final String REPOSITORY_HTTP_STRING_PROCESSED = "bugzilla.http.processed"; >+ >+ public static final String REPOSITORY_HTTP_DEFAULT_ERROR_LOGIN = "login"; >+ >+ public static final String REPOSITORY_HTTP_DEFAULT_ERROR_INVALID = "invalid"; >+ >+ public static final String REPOSITORY_HTTP_DEFAULT_ERROR_PASSWORD = "password"; >+ >+ public static final String REPOSITORY_HTTP_DEFAULT_ERROR_CHECK_EMAIL = "check e-mail"; >+ >+ public static final String REPOSITORY_HTTP_DEFAULT_STRING_PROCESSED = "processed"; >+ > } >#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.68 >diff -u -r1.68 BugzillaRepositorySettingsPage.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java 31 Aug 2007 21:11:49 -0000 1.68 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java 18 Sep 2007 21:56:43 -0000 >@@ -20,7 +20,9 @@ > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.NullProgressMonitor; > import org.eclipse.core.runtime.Status; >+import org.eclipse.jface.layout.GridDataFactory; > import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.preference.StringFieldEditor; > import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient; > import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientFactory; > import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; >@@ -38,12 +40,17 @@ > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.events.SelectionListener; >+import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; > import org.eclipse.swt.widgets.Combo; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Label; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.forms.events.ExpansionAdapter; >+import org.eclipse.ui.forms.events.ExpansionEvent; >+import org.eclipse.ui.forms.widgets.ExpandableComposite; >+import org.eclipse.ui.forms.widgets.Section; > > /** > * @author Mik Kersten >@@ -85,6 +92,42 @@ > > private String os = null; > >+ private Composite httpStringComp; >+ >+ private ExpandableComposite httpStringComposite; >+ >+ protected static final String HTTP_ERROR_LOGIN = "Login : "; >+ >+ protected StringFieldEditor htmlErrorLogin; >+ >+ protected static final String HTTP_ERROR_INVALID = "Invalid : "; >+ >+ protected StringFieldEditor htmlErrorInvalid; >+ >+ protected static final String HTTP_ERROR_PASSWORD = "Password : "; >+ >+ protected StringFieldEditor htmlErrorPassword; >+ >+ protected static final String HTTP_ERROR_CHECK_EMAIL = "check Email : "; >+ >+ protected StringFieldEditor htmlErrorCheckEMail; >+ >+ protected static final String HTTP_ERROR_COLLISION = "collision : "; >+ >+ protected StringFieldEditor htmlErrorCollision; >+ >+ protected static final String HTTP_ERROR_COMMENT_REQUIRED = "comment required : "; >+ >+ protected StringFieldEditor htmlErrorCommentRequired; >+ >+ protected static final String HTTP_ERROR_LOGGED_OUT = "logged out : "; >+ >+ protected StringFieldEditor htmlErrorLoggedOut; >+ >+ protected static final String HTTP_STRING_PROCESSED = "processed : "; >+ >+ protected StringFieldEditor htmlStringProcessed; >+ > public BugzillaRepositorySettingsPage(AbstractRepositoryConnectorUi repositoryUi) { > super(TITLE, DESCRIPTION, repositoryUi); > setNeedsAnonymousLogin(true); >@@ -265,6 +308,213 @@ > defaultOSCombo = new Combo(platformOSContainer, SWT.READ_ONLY); > populateOsCombo(); > >+ httpStringComposite = toolkit.createExpandableComposite(compositeContainer, Section.COMPACT | Section.TWISTIE >+ | Section.TITLE_BAR); >+ httpStringComposite.clientVerticalSpacing = 0; >+ GridData gridData_2 = new GridData(SWT.FILL, SWT.FILL, true, false); >+ gridData_2.horizontalIndent = -5; >+ httpStringComposite.setLayoutData(gridData_2); >+ httpStringComposite.setFont(compositeContainer.getFont()); >+ httpStringComposite.setBackground(compositeContainer.getBackground()); >+ httpStringComposite.setText("Bugzilla HTTP Response Strings"); >+ httpStringComposite.addExpansionListener(new ExpansionAdapter() { >+ @Override >+ public void expansionStateChanged(ExpansionEvent e) { >+ getControl().getShell().pack(); >+ } >+ }); >+ >+ GridDataFactory.fillDefaults().span(4, SWT.DEFAULT).applyTo(httpStringComposite); >+ >+ httpStringComp = toolkit.createComposite(httpStringComposite, SWT.NONE); >+ GridLayout gridLayout2 = new GridLayout(); >+ gridLayout2.numColumns = 4; >+ gridLayout2.verticalSpacing = 0; >+ httpStringComp.setLayout(gridLayout2); >+ httpStringComp.setBackground(compositeContainer.getBackground()); >+ httpStringComposite.setClient(httpStringComp); >+ >+ htmlErrorLogin = new StringFieldEditor("", HTTP_ERROR_LOGIN, StringFieldEditor.UNLIMITED, httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ >+ htmlErrorInvalid = new StringFieldEditor("", HTTP_ERROR_INVALID, StringFieldEditor.UNLIMITED, httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ >+ htmlErrorPassword = new StringFieldEditor("", HTTP_ERROR_PASSWORD, StringFieldEditor.UNLIMITED, httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ >+ htmlErrorCheckEMail = new StringFieldEditor("", HTTP_ERROR_CHECK_EMAIL, StringFieldEditor.UNLIMITED, >+ httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ >+ htmlErrorCollision = new StringFieldEditor("", HTTP_ERROR_COLLISION, StringFieldEditor.UNLIMITED, >+ httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ htmlErrorCommentRequired = new StringFieldEditor("", HTTP_ERROR_COMMENT_REQUIRED, StringFieldEditor.UNLIMITED, >+ httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ htmlErrorLoggedOut = new StringFieldEditor("", HTTP_ERROR_LOGGED_OUT, StringFieldEditor.UNLIMITED, >+ httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ htmlStringProcessed = new StringFieldEditor("", HTTP_STRING_PROCESSED, StringFieldEditor.UNLIMITED, >+ httpStringComp) { >+ >+ @Override >+ protected boolean doCheckState() { >+ return true; >+ } >+ >+ @Override >+ protected void valueChanged() { >+ super.valueChanged(); >+ isPageComplete(); >+ if (getWizard() != null) { >+ getWizard().getContainer().updateButtons(); >+ } >+ } >+ }; >+ if (repository != null) { >+ String propertyValue; >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_LOGIN); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_LOGIN; >+ htmlErrorLogin.setStringValue(propertyValue); >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_INVALID); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_INVALID; >+ htmlErrorInvalid.setStringValue(propertyValue); >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_PASSWORD); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_PASSWORD; >+ htmlErrorPassword.setStringValue(propertyValue); >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_CHECK_EMAIL); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_CHECK_EMAIL; >+ htmlErrorCheckEMail.setStringValue(propertyValue); >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_COLLISION); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.ERROR_MIDAIR_COLLISION; >+ htmlErrorCollision.setStringValue(propertyValue); >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_COMMENT_REQUIRED); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.ERROR_COMMENT_REQUIRED; >+ htmlErrorCommentRequired.setStringValue(propertyValue); >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_LOGGED_OUT); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.LOGGED_OUT; >+ htmlErrorLoggedOut.setStringValue(propertyValue); >+ propertyValue = repository.getProperty(IBugzillaConstants.REPOSITORY_HTTP_STRING_PROCESSED); >+ if (propertyValue == null) >+ propertyValue = IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_STRING_PROCESSED; >+ htmlStringProcessed.setStringValue(propertyValue); >+ } else { >+ htmlErrorLogin.setStringValue(IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_LOGIN); >+ htmlErrorInvalid.setStringValue(IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_INVALID); >+ htmlErrorPassword.setStringValue(IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_PASSWORD); >+ htmlErrorCheckEMail.setStringValue(IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_ERROR_CHECK_EMAIL); >+ htmlErrorCollision.setStringValue(IBugzillaConstants.ERROR_MIDAIR_COLLISION); >+ htmlErrorCommentRequired.setStringValue(IBugzillaConstants.ERROR_COMMENT_REQUIRED); >+ htmlErrorLoggedOut.setStringValue(IBugzillaConstants.LOGGED_OUT); >+ htmlStringProcessed.setStringValue(IBugzillaConstants.REPOSITORY_HTTP_DEFAULT_STRING_PROCESSED); >+ } > } > > private void populateOsCombo() { >@@ -361,6 +611,18 @@ > repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM); > repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_OS); > } >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_LOGIN, htmlErrorLogin.getStringValue()); >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_INVALID, htmlErrorInvalid.getStringValue()); >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_PASSWORD, htmlErrorPassword.getStringValue()); >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_CHECK_EMAIL, >+ htmlErrorCheckEMail.getStringValue()); >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_COLLISION, htmlErrorCollision.getStringValue()); >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_COMMENT_REQUIRED, >+ htmlErrorCommentRequired.getStringValue()); >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_ERROR_LOGGED_OUT, htmlErrorLoggedOut.getStringValue()); >+ repository.setProperty(IBugzillaConstants.REPOSITORY_HTTP_STRING_PROCESSED, >+ htmlStringProcessed.getStringValue()); >+ > } > > @Override >@@ -372,6 +634,54 @@ > erg = false; > } > } >+ if (erg) { >+ if (htmlErrorLogin != null && htmlErrorLogin.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: login field must be filled "); >+ erg = false; >+ } >+ } >+ if (erg) { >+ if (htmlErrorInvalid != null && htmlErrorInvalid.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: invalid field must be filled "); >+ erg = false; >+ } >+ } >+ if (erg) { >+ if (htmlErrorPassword != null && htmlErrorPassword.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: password field must be filled "); >+ erg = false; >+ } >+ } >+ if (erg) { >+ if (htmlErrorCheckEMail != null && htmlErrorCheckEMail.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: check eMail field must be filled "); >+ erg = false; >+ } >+ } >+ if (erg) { >+ if (htmlErrorCollision != null && htmlErrorCollision.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: collision field must be filled "); >+ erg = false; >+ } >+ } >+ if (erg) { >+ if (htmlErrorCommentRequired != null && htmlErrorCommentRequired.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: comment required field must be filled "); >+ erg = false; >+ } >+ } >+ if (erg) { >+ if (htmlErrorLoggedOut != null && htmlErrorLoggedOut.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: clogged out field must be filled "); >+ erg = false; >+ } >+ } >+ if (erg) { >+ if (htmlStringProcessed != null && htmlStringProcessed.getStringValue().compareTo("")== 0) { >+ setErrorMessage("Bugzilla HTTP Response: processed field must be filled "); >+ erg = false; >+ } >+ } > return erg; > } >
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 173352
: 78692 |
78693
|
79854
|
79855
|
79856
|
80264
|
80265