Giter Site home page Giter Site logo

AppCode plugin and Xcode version about dyci-main HOT 15 OPEN

dyci avatar dyci commented on May 22, 2024
AppCode plugin and Xcode version

from dyci-main.

Comments (15)

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

Hm. Need to see what's going one there, but when I saw it last time, there's was not a lot API we can use related to AppCode settings.

from dyci-main.

grav avatar grav commented on May 22, 2024

Parsing ~/Library/Preferences/appcode30/options/other.xml works:

$ xpath ~/Library/Preferences/appCode30/options/other.xml "/application/component[@name='XcodeSettings']/option[@name='selectedXcode']/@value"

Found 1 nodes:
-- NODE --
 value="/Applications/Xcode511.app/Contents/Developer"

I might be able to do a patch though I'm not sure how to integrate with the plugin and all that

from dyci-main.

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

@grav Nice one. 👍
Don't think that I'll be able to get to it till Saturday.
So I'll write my thoughts about this:

  • Update dyci_recompile.py to handle additional parameter for xcode location
  • Update AppCode plugin for passing "additional parameter" to dyci_recompile.py

from dyci-main.

grav avatar grav commented on May 22, 2024

Just got my Java on and recreated the simple bash one-liner above in Java for the plugin:

https://gist.github.com/grav/d8f44d1a2ad527e764dc

(XPathFactory, sheesh ...)

from dyci-main.

grav avatar grav commented on May 22, 2024

Alright, I did a pull request with your suggestions, with the big disclaimer that I didn't test it, since I haven't tried compiling the plugin for AppCode yet!

#45

from dyci-main.

grav avatar grav commented on May 22, 2024

Okay, now I found out how to link to the correct jars to get the script to compile. I'm still not sure how to build the plugin jar so that I can test it in AppCode. Can you help me out there?

Edit: just for my own reference, this is how I compile:

javac -cp /Applications/AppCode.app/Contents/lib/*:. Support/AppCode/Dyci/src/com/stanfy/dyci/DyciRecompileAndInjectAction.java 

from dyci-main.

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

Well. The plugin was made long time ago
It was created by InteliJ IDEA
http://confluence.jetbrains.com/display/IDEADEV/PluginDevelopment
Read docs there. The plugin version can be outdated
I think you'll be able to do it :)
I'll look to this one on Saturday - a bit busy here.

Also - just to mention - use fallback, to old logic of searching xcode-select, in case if something will be different in AppCode configuration

from dyci-main.

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

It's may be even faster by using this example:
http://bjorn.tipling.com/how-to-make-an-intellij-idea-plugin-in-30-minutes

from dyci-main.

grav avatar grav commented on May 22, 2024

Thanks for the pointers, I'll look into it!

from dyci-main.

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

@grav How it's going? need a help? Will have some time to check this out :) Should I wait for you to finish?

from dyci-main.

grav avatar grav commented on May 22, 2024

@PaulTaykalo Didn't get down to looking at the tutorials yet. I did do a pull request with code that now actually compiles, but it is still untested.

It would be great if you could test out the PR. I won't have the time before next week.

from dyci-main.

grav avatar grav commented on May 22, 2024

Okay, I managed to set everything up and build the plugin in IntelliJ 13.
I had to download and build with JDK 1.6 from https://developer.apple.com/downloads/index.action in order to get AppCode to accept the plugin (since it's running on JRE 1.6).

However, I get a weird exception in AppCode when it starts up (or maybe it's when I do Ctrl+x the first time only, in any case, the reaction comes quite late):

Null child action in group Run () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=com.stanfy.dyci.DyciRecompileAndInjectAction
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.unStub(DefaultActionGroup.java:347)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.getChildren(DefaultActionGroup.java:303)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$5.compute(ActionManagerImpl.java:1261)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$5.compute(ActionManagerImpl.java:1254)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.preloadActionGroup(ActionManagerImpl.java:1254)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.preloadActionGroup(ActionManagerImpl.java:1269)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.preloadActionGroup(ActionManagerImpl.java:1248)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.doPreloadActions(ActionManagerImpl.java:1239)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.access$200(ActionManagerImpl.java:73)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$4.run(ActionManagerImpl.java:1220)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

I've updated the pull request with the updated .iml and changelog: #63

Maybe I'll look into it again later this week, but ping me if you have any clues :-)

Edit: when I build the plugin, I get a 100 MB big plugin with all the AppCode libs for some reason, so I haven't pushed the updated plugin.

from dyci-main.

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

Well, 100 MB plugin is quite a lot :)
I'll look into your pull request later today thank you for your effort :)

from dyci-main.

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

Thank you @grav
Closed with #63 / #64
Wasn't sure how to do it correctly, but it seems, that it worked )

from dyci-main.

PaulTaykalo avatar PaulTaykalo commented on May 22, 2024

Well, we also need to handle 3.1 and later installations

from dyci-main.

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.