Community
Participate
Working Groups
The following problem was reported via the automated error reporting: Message: Unhandled event loop exception java.util.regex.PatternSyntaxException: Unexpected internal error near index 4 sdf\ ^ at java.util.regex.Pattern.compile(null:-1) at java.util.regex.Pattern.<init>(null:-1) at java.util.regex.Pattern.compile(null:-1) at org.eclipse.egit.ui.internal.dialogs.CommitCombo$CommitContentProposalProvider.getProposals(CommitCombo.java:66) at org.eclipse.jface.fieldassist.ContentProposalAdapter.getProposals(ContentProposalAdapter.java:2005) at org.eclipse.jface.fieldassist.ContentProposalAdapter.openProposalPopup(ContentProposalAdapter.java:1854) at org.eclipse.jface.fieldassist.ContentProposalAdapter.lambda$2(ContentProposalAdapter.java:2038) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) Bundles: | org.eclipse.egit.ui | 4.6.1.201703071140-r | 4.6.1.201703071140-r | | org.eclipse.jface | 3.12.1.v20160923-1528 | 3.12.1.v20160923-1528 | | org.eclipse.swt | 3.105.2.v20161122-0613 | 3.105.2.v20161122-0613 | Operating Systems: | Windows | 10.0.0 | 10.0.0 | The above information is a snapshot of the collected data. Visit https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/58efc589e4b0bef0c9bcf9a3 for the latest data. Thank you for your assistance. Your friendly error-reports-inbox.
Occurs in the CreateTagDialog invoked from <Context Menu>->Create Tag... on the "Tags" node of a repository in the repository view. Steps to reproduce (once the dialog is open): 1. Expand the "Advanced" section 2. Type a string that is not a valid regular expression in the field. The error is logged only; there is no indication in the UI of (a) that the field accepts a regular expression, or (b) that the regular expression is invalid. Since the content assist is triggered on keystrokes, there may always be times when the input string is an invalid regular expression, and then the error gets logged. The UI behavior is more or less fine, though: the previous content assist remains. But how can a user search for a commit message containing a regexp meta character, for instance a '('? If he knew it was a regexp, he could just type \(. But how should he know? The dialog doesn't tell. How to best fix this? 1. Don't accept a regular expression, just do a substring search. Changes behavior and may come as a surprise to users used to use regular expressions in that field. 2. Catch the PatternSyntaxException, but then what? 2.1. Return null or an empty proposal list: changes behavior and is confusing. 2.2. Retry with the pattern quoted (i.e., substring search): may change the content proposals drastically and in unexpected ways. 2.3. Return the last list of proposals: current UI behavior unchanged, but input is simply ignored until the field content forms a valid regular expression again, and requires a stateful content proposal provider.