Giter Site home page Giter Site logo

Comments (3)

radekcieciwa avatar radekcieciwa commented on June 13, 2024 1

I <3 idea of this plugin - so i can work on this feature - 2 month is still a lot to :P

Any tips where to start?

from distraction-free-xcode-plugin.

wokalski avatar wokalski commented on June 13, 2024

In a month or two the vast majority of developers will be using Xcode 8 where plugins like this are very hard to install, and might not work. I am not using Xcode at all at the moment so I have little to no motivation to work on any improvements.

We can live this issue open though, in case anyone wants to solve this.

from distraction-free-xcode-plugin.

wokalski avatar wokalski commented on June 13, 2024

I'm more than happy to hear that. 🤗🤗🤗

As far as I remember those commands are disabled in the ZEN window (to verify that, you can check move the mouse to the top, click Product and the buttons should be disabled).
If this is the case, we need some reverse engineering.
Open the xcodeproj and run the plugin. First we need to put some breakpoints to see where the enabling/disabling happens. The method which validates an NSMenuItem is called -validateMenuItem:. This is name of the method for your symbolic breakpoint. Then, add a condition to the breakpoint. I would check if the title of the NSMenuItem is equal to Run or Build. In order to check this, cast $arg2 ($arg1 is self in obj_msgSend) - the first argument - to NSMenuItem and then write the condition.

The result of this experiment will tell you two things about the validation:

  1. "Who" performs it
  2. "Who" responds to it

Now, many things can happen. Probably something (like the windowController) doesn't implement the method, but you will have to check. Also, use Hopper if necessary, but you don't need it at the beginning.

Feel free to get back to me anytime :).

from distraction-free-xcode-plugin.

Related Issues (20)

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.