Modify

Opened 13 years ago

Last modified 5 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

Description

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 by joshdoe, 13 years ago

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 by Don-vip, 6 years ago

Keywords: gsoc-candidate added

comment:3 by antsyau@…, 5 years ago

I found a useful package https://github.com/codelibs/jhighlight. 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 by stoecker, 5 years ago

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
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to joshdoe.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.