Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Search for case insensitive languages
Search for case insensitive languages [message #696779] Thu, 14 July 2011 20:03 Go to next message
Marius Cojocaru is currently offline Marius CojocaruFriend
Messages: 8
Registered: November 2010
Junior Member
Hi,

I am trying to implement search (references) for a BASIC variant language (case insentive)

FindAction class use the "DLTKSearchQuery", that creates search pattern. Problem is that th DLTKSearchQuery is creating the pattern as

pattern= SearchPattern.createPattern(element, fPatternData.getLimitTo(), SearchUtils.GENERICS_AGNOSTIC_MATCH_RULE, toolkit);


and

public final static int GENERICS_AGNOSTIC_MATCH_RULE= SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE | SearchPattern.R_ERASURE_MATCH;


From what I noticed further this then goes to BasicSearchEngine who use the indexManager to retrieve potential matches in a case sensitive mode.

What is the easiest way to make the search framework case insensitive?
Re: Search for case insensitive languages [message #723938 is a reply to message #696779] Fri, 09 September 2011 23:14 Go to previous message
Marius Cojocaru is currently offline Marius CojocaruFriend
Messages: 8
Registered: November 2010
Junior Member
Hello,

I see now that AGNOSTIC match rule is changed to case insensitive. Thanks for that.

But there is still a place where case sensitive case is used.

	public static SearchPattern createPattern(IModelElement element, int limitTo) {
		return createPattern(element, limitTo, R_EXACT_MATCH | R_CASE_SENSITIVE
				| R_ERASURE_MATCH,
				DLTKLanguageManager.getLanguageToolkit(element));
	}


This is used by ModelElementOccurrencesFinder, causing occurrence finder to be inconsistent with find references for case insensitive languages.
Previous Topic:Debug multiple tcl files with packages
Next Topic:Buildpath operation and indexers
Goto Forum:
  


Current Time: Sat Nov 29 05:26:19 GMT 2014

Powered by FUDForum. Page generated in 0.03042 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software