shakeyo / qlcolorcode

Automatically exported from code.google.com/p/qlcolorcode
0 stars 0 forks source link

Xcode 3.2 QL plugin conflicts with QLCC #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Xcode 3.2 ships with a QL plugin that registers for the public.source-code UTI, 
which QLCC also 
registers for.  On my system, at least, QL always picks XCode's plugin over 
QLCC for source code 
files.  Unfortunately, Xcode's plugin only handles a handful of programming 
languages, so lots of 
files end up being rendered without highlighting.

AFAIK, Apple provides no way for users to express a preference for one plugin 
over another.  So 
the only way to get QL to pick QLCC is to disable the Xcode plugin somehow.  
This can be done 
by deleting it, renaming it to something without the .qlgenerator extension, or 
moving it to a 
location that QL doesn't look in.  

It's never fun to modify Apple-supplied files in this way, and it's even less 
fun now that they've 
implemented code-signing and signed the Xcode app bundle.  DIsabling the Xcode 
QL plugin 
requires the user to invalidate the signature on the Xcode app.  I am not aware 
of any negative 
ramifications of doing this, but I haven't tried it yet.

There is a very ugly way to mitigate this issue.  Instead of registering for 
public.source-code we 
could register for public.c-source, public.objective-c-source, 
org.ocaml.ocaml-source, etc.  In 
other words, we could register for every conceivable subclass of 
public.source-code.  This would 
mean adding *another* massive enumeration of file types in addition to the list 
of imported UTIs.  
It also means that if some other program picks a different UTI for a file type 
and their UTI wins 
we'll never see it.  Bag of hurt all around.

Jeez Apple, just give us a way to rank our plugins already!!!

Original issue reported on code.google.com by n8gray@gmail.com on 17 Sep 2009 at 12:25

GoogleCodeExporter commented 9 years ago
To understand if QLCC is working for you, try invoking quick look on a .plist 
file.  If you get a preview with 
syntax highlighting then QLCC is working properly.  The Xcode plugin doesn't 
handle .plist files because they're 
not considered source code, but QLCC does.

Original comment by n8gray@gmail.com on 17 Sep 2009 at 5:55

GoogleCodeExporter commented 9 years ago
First I want to thank you for all your work on this plugin, as it's always been 
of great value to me. After installing 
the 2.0 you released last night, I read this, and.. Maybe I don't know what's 
going on. My .plist files are 
quicklooking, color xml, i suppose that is syntax highlighted. so that makes me 
think QLCC is working. but i still 
can't get .as actionscript files to work. I've removed all my other ql 
generators just in case, but still nothing.. 
ughh.. thanks for the help. 

Original comment by RussLeeS...@gmail.com on 17 Sep 2009 at 3:24

GoogleCodeExporter commented 9 years ago
I've been depending on your plugin for quite some time now.
It's very good.
I took the plunge and removed the Xcode ql plugin in Snow Leopard.
And now my R source files a highlighted nicely (again) and nor as Rez source 
files (whatever that may be).
No bad effects yet; if something not so nice happens, you'll hear about it.

Original comment by b...@xs4all.nl on 17 Sep 2009 at 7:57

GoogleCodeExporter commented 9 years ago
Have you filed a bug with Apple's bug reporter? Maybe if you do, and tell us 
the number, the rest of us can also 
file bugs and cross refer to yours, to help "vote" for it being sorted out.

Original comment by ralphrma...@gmail.com on 18 Sep 2009 at 12:26

GoogleCodeExporter commented 9 years ago
Hi n8gray,

I've been using QLColorCode since I discovered this plugin a couple years ago, 
and it's always worked 
beautifully. Unfortunately, when I upgraded to v2.0.0 earlier today, I found it 
no longer worked for me at all 
(under OS 10.5.8)… I could not view ANY of the files that were previously 
viewable using v1.1.0.

I assumed there was a conflict with another QuickLook plugin, so I decided to 
find the culprit by process of 
elimination — i.e., by removing all my QL plugins except for QLColorCode 
2.0.0, then adding back those other 
QL plugins in small batches (restarting via "qlmanage -r" each time) until I 
found the conflicting plugin. It 
didn't take long…

I don't have the Xcode 3.2 plugin, so that was definitely NOT the problem.

My first conflict check was with QLColorCode 2.0.0 itself, to make sure it DID 
work when it was the only QL 
plugin available to the system. It didn't. However, when I swapped it with 
v1.1.0, that version worked perfectly 
again. I swapped it back it v2.0.0 and it failed once again.

Therefore, the problem on my setup is definitely not a conflicting QL plugin, 
but is something inherent with 
the v2.0.0 build itself. I only wish that I had some additional information to 
provide for you…

Any ideas?

Sorry about this… but many MANY thanks in advance for any help you can 
provide (and for taking the time to 
create this outstanding plugin in the first place)!!!

Original comment by baronbr...@laserrot.com on 18 Sep 2009 at 12:52

GoogleCodeExporter commented 9 years ago
I'll do that. Just post the number to reference.

Original comment by lordfatt...@gmail.com on 18 Sep 2009 at 2:40

GoogleCodeExporter commented 9 years ago
Jeff:  I've got another report similar to yours that QLCC 2.0 doesn't work on 
Leopard and I'm working on it.  
Please open a separate issue report for that problem.

Ralph:  I haven't filed a bug report yet, but I will.  I'll post the number 
here when I do.

Russ: Go ahead and open another issue report and we'll get to the bottom of it.

bhh: Thanks for giving it a shot!  If you happen to be an iPhone developer I'm 
especially curious to know if 
you're still able to sign and deploy iPhone apps.

Original comment by n8gray@gmail.com on 18 Sep 2009 at 5:45

GoogleCodeExporter commented 9 years ago
IMPORTANT NOTE
===========

I've done some research on code signing and it looks like removing or renaming 
the Xcode quick look plugin will 
NOT invalidate the signature on Xcode itself.  So if you want to use QLCC 
instead of Xcode's plugin, it looks like 
it IS SAFE to disable Xcode's plugin.

I really wish I could edit the issue report to put this somewhere more visible 
than comment #8...

Original comment by n8gray@gmail.com on 18 Sep 2009 at 6:46

GoogleCodeExporter commented 9 years ago
Follow up on Comment 3:
I haven't seen any adverse effects of removing the Xcode ql-plugin (I've just 
parked it somewhere).
I do however get console messages such as

18-09-2009 09:43:25 Finder[464] [QL] Can't get plugin bundle info at 
/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenera
tor/
18-09-2009 09:43:25 quicklookd32[636]   [QL] Can't get plugin bundle info at 
/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenera
tor/

And from ForkLift I see

18-09-2009 09:30:51 ForkLift[522]   [QL] Can't get plugin bundle info at 
/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenera
tor/
18-09-2009 09:30:59 quicklookd[538] [QL] Can't get plugin bundle info at 
/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenera
tor/

I'll have to put up with this until someone can tell us how to get rid of these.
I am not an iPhone developer so I can't satisfy your curiosity (comment 7).

Original comment by b...@xs4all.nl on 18 Sep 2009 at 7:53

GoogleCodeExporter commented 9 years ago
I've added a page to the Wiki where I'll put the most up-to-date info on this 
issue:

http://code.google.com/p/qlcolorcode/wiki/ImportantNoteForXcodeUsers

Original comment by n8gray@gmail.com on 18 Sep 2009 at 7:53

GoogleCodeExporter commented 9 years ago
n8gray: New issue report (#48) added as per your request. Just recopied over 
the same info; hope that works for 
you. Thanks!

Original comment by baronbr...@laserrot.com on 20 Sep 2009 at 12:25

GoogleCodeExporter commented 9 years ago
I filed an report with Apple on this issue: rdar://7240036

I also mirrored it on OpenRadar: http://openradar.appspot.com/7240036

Original comment by n8gray@gmail.com on 21 Sep 2009 at 9:43