Open skurfer opened 12 years ago
I see you've assigned yourself to this, so I'll give you my thoughts (hopefully) before you've got too far. I think this sounds good, but I'm not convinced about arranging manually and testing like that.
My thought are that implementing this:
I definitely think it'd help out with plugins and things though. It'd mean we wouldn't have to define plugin's object types in QSTypes.h :)
I'll give you my thoughts (hopefully) before you've got too far.
Haven’t even started. I was waiting for some input.
I think this sounds good, but I'm not convinced about arranging manually and testing like that.
Fair enough. I’m just paranoid about the processing on every keystroke aspects. Why don’t we get it working (with no sorting) and then, only if performance turns out to be an issue, we can look at how to order the sniffers?
A few more points :
-(NSArray *)validTypesForText:(NSString *)text
which returns an array of compatible plugins types (or nil if the Source can't sniff that string).
-(NSString *)primaryTypeFromText:(NSString *)text
.-(void)sniffObject:(QSObject *)object
so that the sniffer has complete access to the specific object it sniffs (meaning it can set all the data it will need) ? Maybe implement -validTypesForText:
using the -sniffObject:
infrastructure so that Sources with more complex requirements can override that instead ?This issue hasn't been updated in over 2 years. It has been marked as 'stale' and will be closed in 30 days. Please check whether this is still an issue with the latest version of Quicksilver. If so, update or comment on this issue to keep it open.
Goals
sniffString
should be extensible without modifications to the core application.Here's what I propose to bring this about.
Plug-ins
BOOL
indicating whether or not the string matched.YES
, assign these types". The type doesn't necessarily have to be provided by the plug-in in question.Quicksilver
sniffString
functionality would be broken up and added to different QSStringSniffers in the Core Support plug-in.sniffString
will be modified to iterate through the available sniffers from all plug-ins. If one returnsYES
, iteration stops and the approprate types (as defined by various plug-ins) are assigned.sniffString
will try them in that order. As this ranking is unlikely to change often, perhaps it should be cached to avoid a delay on every start up.I’m happy to work on this once we agree on an approach. Thoughts?