Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode Spotlight plugin improvements??




On May 17, 2005, at 10:20 AM, Jonathon Mah wrote:

On 2005-05-17, at 04:23, Chris Espinosa wrote:


The Xcode "Spotlight importer" doesn't actually do anything. It just says that certain files it cares about are text files. That's all. The standard text file importer takes it from there.


Woah woah woah. I definitely remember:


On 2005-05-03, at 11:29, Eric Peyton wrote ("Re: Three Spotlight importer questions"):



a crack at any give file. My test asserting some metadata for a PDF file. And it worked fine. But the PDF importer never got to run and that seems somehow inappropriate. Am I missing something or is that the way it is right now?



That is the way that it is supposed to be. One file == one importer. It would be a ridiculous situation performance wise if more than one importer had to run for each file. I believe (I could be wrong) that the intention is that the importers take "ownership" of the data of the file type. So a pdf importer would be the single place to go to find out information about pdf files. Your intention to use a pdf importer to just add "more" metadata is currently not supported in the system. Add your data and the rest of the necessary data. I don't know of any way to create a tree of importers for any single file.




So importers can call other importers? Or can importers only "re- direct" to another importer, unable to extract any metadata themselves? And in either case, how does Source Code.mdimporter do this? I took only a brief look at it, and it seems that a UUID in CFPlugInTypes is shared between Source Code and Rich Text (as well as Mail, Image, and Audio, so I'm probably off).

Our importer simply opens the file (recognizing UTF-8 and UTF-16) and uses the contents as the value for the kMDItemTextContent key. The SpotLight internals know how to index that content.


So we're not violating any rules here. We just don't have to do much.

Dave

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >XCode Spotlight plugin improvements?? (From: Richard Dunlap <email@hidden>)
 >Re: XCode Spotlight plugin improvements?? (From: Chris Espinosa <email@hidden>)
 >Re: XCode Spotlight plugin improvements?? (From: Jonathon Mah <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.