Opened 11 years ago

Last modified 3 years ago

#7308 new enhancement

Syntax highlighting in search dialog

Reported by: joshdoe Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: search syntax highlighting gsoc-candidate Cc: joshdoe


This is somewhat related to #7230, but is worthy of a separate ticket in terms of scope and discussion.

As the number of Special targets (search operators) increases, the likelihood of someone inadvertently using one increases, especially for beginning users. I suggest that we somehow visually distinguish these keywords from normal keywords, perhaps by using a bold font or underlining. Later I'll attach an example screenshot.

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by joshdoe

Keywords: syntax highlighting added
Summary: Visually distinguish search operator keywords from normal keywordsSyntax highlighting in search dialog

For reference, here are some Java syntax highlighting libraries:

  • RSyntaxTextArea - LGPL-licensed library currently maintained (last updated 2012/01/15)
  • jEdit Syntax - MIT-licensed library not currently maintained (last updated 2003/11/22)

I'm not necessarily advoctating we use these libraries (though autocomplete would be very cool), but perhaps they'll at least offer inspiration.

comment:2 Changed 4 years ago by Don-vip

Keywords: gsoc-candidate added

comment:3 Changed 3 years ago by antsyau@…

I found a useful package It can output highlighted text as XHTML and therefore could be placed in html editor panes, but I haven't read exact codes and am not sure if this will work.

comment:4 Changed 3 years ago by stoecker

As the SearchCompiler can parse the search data itself, using an external library to do a syntax highlighting seems wasted effort. The internal functions should be able enough to deliver the required information (and probably in much better quality, as it must be identical to the final results).

So if implemented it should rely on what we already have.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to joshdoe
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.