Howdy,

I submitted this as Ticket #79 (defect)

What I have so far is that inside the inherited selectContentTypePlugin(...) method of RubySourceViewer, TextUtilities.getContentType(...) is returning c_string when you double click inside double-quoted text, otherwise it always returns __dftl_partition_content_type.  This makes some sense as the fDoubleClickStrategies map contains some RubyDoubleClickSelector objects as seen in the debugger.

[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]

Note the keys.  Oddly, c_string is missing from the keys collection.  The class RubyPartitionScanner defines the string constants that match the keys in the fDoubleClickStrategies map, and seems to setup all the ITokens and IPredicateRules for the partition scanner.  c_string is not one of the tokens.

Due to c_string being return, the double-click fails to highlight words in double quotes.  The reason for this (best I can tell so far) is the RubySourceViewer inherits an inner class called TextViewer$TextDoubleClickStrategyConnector.  The mouseUp(...) method on this class is responsible for choosing an ITextDoubleClickStrategy object to handle the double-click.  Since c_string is not a key in the fDoubleClickStrategies map of, a null is return...ergo RubyDoubleClickSelector.doubleClicked(...) is never called.  This method is the actual method that determines what is to be highlighted.

What I am trying to understand is why is c_string being returned when you double-click double-quoted text?

I'll keep poking around.  Let me know if you have any thoughts.

Regards,
Mike

Reply via email to