Bug 440507

Summary: [find/replace] Add (?x) and (?U) flags to the tooltips for regular expressions
Product: [Eclipse Project] Platform Reporter: Lukas Eder <lukas.eder>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, martin.karpisek
Version: 4.4Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
01 Regex flags explanation in search tooltip none

Description Lukas Eder CLA 2014-07-28 02:50:49 EDT
Created attachment 245421 [details]
01 Regex flags explanation in search tooltip

This is probably used quite scarcely, but I find the tool tip in Eclipse very useful to remind me of what the various ismd flags really mean.

Support for the COMMENTS (?x:...) flag has been around for ages:

- http://docs.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html#COMMENTS

... and in Java 7, support for the UNICODE_CHARACTER_CLASS (?U:...) was added

- http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#UNICODE_CHARACTER_CLASS

It would be great if these flags were also documented / supported from the Eclipse search feature. Probably, a version-check would need to be done to see if Eclipes is running on Java 7 for UNICODE_CHARACTER_CLASS
Comment 1 Dani Megert CLA 2014-07-28 03:12:07 EDT
High quality patch would be welcome.

Entry point for fix:
org.eclipse.jface.text.FindReplaceDocumentAdapterContentProposalProvider