Giter Club home page Giter Club logo

dash-plugin-for-xcode's Introduction

Xcode 8+ Notice

This plugin does not work with Xcode 8 or newer. The Xcode 8 extensions API is unreliable and remains lacking even in Xcode 15. An Xcode 8+ extension will not be released as it would not add any functionality that isn't there already. The recommended workaround is to set up a Search using selected text shortcut in Dash's Preferences > General.

If you absolutely must use an extension in Xcode 8+, the Xcode Search and xTextHandler extensions support Dash. I don't recommend this, as extensions don't do anything more than what the Search using selected text keyboard shortcut does.

Dash Plugin for Xcode 7 and earlier

Overview

This plugin allows you to use Dash instead of Xcode's own documentation viewer when using Option-Click (or the equivalent keyboard shortcut) to view the documentation for the selected symbol.

I'm @olemoritz on Twitter.

Usage & Installation

  1. Download the source, build the Xcode project and restart Xcode. The plugin will automatically be installed in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins. To uninstall, just remove the plugin from there (and restart Xcode).
  2. To use - Option-Click any method/class/symbol in Xcode's text editor.
  3. If you prefer the keyboard, set up a shortcut in Xcode's Preferences > Key Bindings for Quick Help for Selected Item or Search Documentation for Selected Text.
  4. The plugin can automatically enable/disable docsets (e.g. OS X or iOS) based on what you're working on. Check out the Automatic Platform Detection section below.

Alcatraz

This plugin can be installed using Alcatraz. Search for OMQuickHelp in Alcatraz.

Automatic Platform Detection

The plugin can use Xcode's current active scheme to try to guess which docsets it should search, making it very easy to switch between iOS, OS X or even C/C++ projects. It's recommended that all users try out this feature and report back anything that might be wrong.

To enable automatic platform detection, go to Xcode's Help > Dash Integration > Enable Dash Platform Detection in Xcode's menu (after you installed the plugin).

License

Copyright (c) 2012, Ole Zorn
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

dash-plugin-for-xcode's People

Contributors

benedictc avatar evadne avatar inket avatar kapeli avatar omz avatar shjborage avatar tomburns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dash-plugin-for-xcode's Issues

Bind docsets to Xcode instead of substitute help panel

It would be nice if the docsets could be bound to Xcode, and open them in the default reader window instead of substituting the reader window with Dash. I have another app, Docs for Xcode that binds the documents directly into Xcode (I haven't figured out how it does it yet), and docsets installed by Docs for Xcode continues to show, even after Xcode have been updated.

A simple copy of the docsets to the location Docs for Xcode uses did not install them, so there must be some .plist or some other resource taking care of this

Syntax Coloring submenu on Editing menu disappeared

After installing this plugin, the Syntax Coloring submenu is empty. I work with several projects that have non-detecting filenames or languages, and are now no longer able to set language for syntax colouring.

"Replace Search Documentation" doesn't work in Xcode 7

After installing plugin I found that setting "Replace Quick Help" works fine, but I prefer having native quick help, and dash to replace searching in documentation. This setting doesn't work anymore (while "Replace Search Documentation" active, standard documentation is opening instead of Dash).

OS X 10.11.1
Dash 2.2.6
Xcode 7.1

Plugin installed through Alcatraz is not working

I've removed and added the plugin using Alcatraz. I can see the Dash Integration menu in help. When I option double click a method or click a link in the help pane, it still opens the built in help. Xcode 7.3.1 7D1014

Does not detect C++ context

When using C++ within an iOS/Mac project it would be great if the plugin could detect the file type and use that to decide on whether to use the C++ docset instead of iOS/OSX. For example if the filename ends with cpp. If it ends with mm then you would need to be able to search both cocoa and cpp, but I am not sure if Dash allows this to be specified. Anyway, just enabling this for cpp files would be great. I am happy to code this, but do not know how to get the current filename.

Open Dash from Xcode Quick Help?

I love the idea of opening Dash from Xcode, but I actually rather like the Quick Help popup--where Xcode falls down, IMO, is in the documentation viewer. What I would really like to do is to open Dash from the popup, in place of the documentation viewer--that is, when the user taps the "Reference" link at the bottom of the popup. Would you be able to give me any tips on implementing this?

  • how I might discover what happens when the link is tapped (so I can swizzle that method)?
  • how I might open the appropriate reference page in Dash? I see that you use Dash's service; where can I find documentation for that? cc @Kapeli

option+click does not work in my mac

option+click worked good in my device, but recently it doesn't work.
I added NSLog() in source code, and found error info in Console.app like below:
16/5/11 下午1:24:38.008 Xcode[20794]: OMQuickHelp: Couldn't swizzle _searchDocumentationForSelectedText:
16/5/11 下午1:24:38.008 Xcode[20794]: error: Error Domain=NSCocoaErrorDomain Code=-1 "+[NSObject(JRSwizzle) jr_swizzleMethod:withMethod:error:]: original method _searchDocumentationForSelectedText: not found for class IDESourceCodeEditor" UserInfo={NSLocalizedDescription=+[NSObject(JRSwizzle) jr_swizzleMethod:withMethod:error:]: original method _searchDocumentationForSelectedText: not found for class IDESourceCodeEditor}, info: {
NSLocalizedDescription = "+[NSObject(JRSwizzle) jr_swizzleMethod:withMethod:error:]: original method _searchDocumentationForSelectedText: not found for class IDESourceCodeEditor";

It seems method _searchDocumentationForSelectedText: does not exists. my Xcode version is 7.3.1, how can i solve this problem?

Quick help link to guide does not work properly

If one brings up the "quick help" inspector in Xcode, it presents help text as well as three links at the bottom: a) a declared in link, b) a link to reference of the relevant class and c) a link to a guide document. For example the quick help text on NSUserDefaults displays:
Declared in: NSUserDefaults.h
Reference: NSUserDefaults Class Reference
Guides: Preferences and settings programming guide.

Clicking the first link shows the header file in Xcode, the second the class definition in Dash. The Guides link however does not link to a guide. Instead, it brings up Dash with the same information as for the reference link - the NSUserDefaults class in this case.

Xcode 7.0 GM

The plugin has been working for me throughout the various Xcode betas but now isn't working in the GM seed. I tried deleting it from '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins' and then reinstalling, but upon restarting Xcode after building the project I get no prompt to allow the plugin. I've checked to make sure it's being copied to the Plugin-ins folder during the build, which it is.

It is working with the Xcode 7.1 beta however when I option click methods / properties they seem to default search to Google. For example if you option click on NSObject Dash Google searches c:objc(cs)NSObject.

No Dash Integration menu in latest Xcode beta

I cannot integrate Dash with the latest Xcode beta.

The plug-in is installed at ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/OMQuickHelp.xcplugin, but Xcode doesn't recognize it.

There is no Dash Integration menu in latest Xcode beta.

Replace Reference

when I select the Replace Reference option in the dans menu and I alt-double-click on a class name it goes directly to Dash but always as NSObject, never for the class it was clicked on.
If I chose the default option it will open Dash at the correct Class.

problem with Swift methods

when I use option+click in Swift methods, parenttheses will be added to the end of the search field and causes the searching fails

option-click + double click behaviour changed for Xcode 7.1?

Hi there,

I am keep using this plugin since Xcode 6. I used to optional-click to get the system popup window for description, and optional- double click to get dash.

Now today I updated Xcode 7.1 and rebuild the plugin, the trick is not working. the option- double click will always call up the xcode document, not dash ( I have enabled the replacement)

What's changed and how do I get my old habbit back? Thanks. It works perfect on 7.0, not sure why 7.1 broke my habbit :(

I don't use any other plugins except dash and vvdocumenter (a comment tool), and I always do a rebuild once the Xcode updated.

Dash intercepts links to header files of application classes.

Steps to reproduce:

  1. With the plugin in "Replace Reference" mode, option-click on a custom class to bring up the Quick Help popup.

    screen shot 2014-01-08 at 2 15 27 pm

  2. Click on the header file link after "Declared In".

Expected result: Xcode opens the header file.

Actual result: Dash searches for the header file.

screen shot 2014-01-08 at 2 16 53 pm

For some reason, Dash only intercepts links to headers of application classes (vs. classes of system frameworks).

Dash looses filter on search

When I set a scope in Dash (ios: for example) and option+click a symbol in Xcode, Dash opens but the scope is gone. This is annoying because some symbols also exist in other docsets so the result list is unnecessarily long and cluttered.

Cannot integrate Dash with Xcode 5.1

I cannot integrate Dash with Xcode 5.1.

The plug-in is installed at ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/OMQuickHelp.xcplugin, but Xcode doesn't recognize it.

There is no Dash Integration menu in Xcode.

I have deleted everything, rebuilt the plugin, quit Xcode, and rebooted. No luck so far.

Xcode 6.4 beta 2 (6E14) doesn't like the plug-in

(I suspect you may already be aware, but just in case…)

I was trying to use the 6.4 beta because of the note posted at the top of Apple's Swift forum, to wit:

Xcode 6.3.1 introduced a compile-time regression for Swift apps which is likely to impact the compile time of larger projects using Swift frameworks or using projects supplied from external sources (e.g. CocoaPods).
Xcode 6.4 beta fixes this problem so should be used as a workaround if this problem is affecting your current development.
Until Xcode 6.4 is released, App Store submissions still need to be built with Xcode 6.3.1.

Of course, the Dash-plugin stopped working. I tried adding the output of defaults read /Applications/Xcode-beta.app/Contents/Info DVTPlugInCompatibilityUUID to DVTPlugInCompatabilityUUIDs in the Info.plist which got me to an "Unexpected Code Bundles" dialog (see this image for an example.) Clicking "Load Bundles" made the dialog go away, and I had the menu items for Dash in the Help menu, but neither "Replace Quick Help" or "Replace Quick Help Reference Link" seemed to bring up Dash.

Turns out I'm not personally seeing the Swift issue mentioned above so I just reverted to 6.3.1 for now, but obviously 6.4 is all of our future's :-)

Dash creates results for application classes and methods.

Whether searched for via double-clicking on symbols or opened via links from the Quick Help popup.

Examples:

screen shot 2014-01-08 at 2 09 03 pm

screen shot 2014-01-08 at 2 08 39 pm

You can see that the search term is additionally messed up when searching for a class, though if it was just searching for "SLTerminal" it would probably still create a result like in the second image.

Disabling Quick Help integration also disabling Search integration

I'm trying to use Xcode's built-in quick help documentation (single option-click help window) while using Dash for the more in-depth search documentation (double option-click help window). In previous versions of Xcode and Dash, I was able to have this setup by disabling Quick Help integration but leaving Search Documentation enable, like in the screenshot below.

screen shot 2015-10-02 at 10 04 46 am

The behavior now is that the Xcode quick help pops up, but when I double option-click, instead of showing Dash, Xcode's own documentation pops up. Is this intended behavior, or a bug? I really liked being able to use the quick help popup within Xcode for quick checks but jumping into Dash when I needed more info.

Problem with XCode 7.0 and umlaut in group name

Hi,

we're getting an error in building the plugin. The group name "domänen-benutzer" is probably the reason. Could you tell where we could comment out the owner change, since the owner and group are actually correct. Thanks.

screen shot 2015-09-24 at 16 30 14

Using commit f1e71df

Detect platform based on file

I'm trying the automatic platform detection, without much luck. I have a very large, complex workspace filled with C, C++, and ObjC (and a little ObjC++). When I set my scheme to build one of the C-only projects, open a .c file and opt-double-click "signal", it's opening the Ruby Signal page. (Ruby is among my search docsets)

Rather than interrogating the scheme, it seems better to check the file type you're in. In a "C Source" file, for instance, it should search the C docset. In an "Objective-C Source" file, it should search osx: or ios: (that could be checked from the scheme), and then C. In an Objective-C++ Source" file, it should search osx, ios, C++, C.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.