From 9194aae4695412ef8c248c959a08e6638dbb28e4 Mon Sep 17 00:00:00 2001 From: Mikkel Gravgaard Date: Fri, 7 Nov 2014 08:23:24 +0100 Subject: [PATCH 1/4] compiles! --- .../com/stanfy/dyci/DyciRecompileAndInjectAction.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Support/AppCode/Dyci/src/com/stanfy/dyci/DyciRecompileAndInjectAction.java b/Support/AppCode/Dyci/src/com/stanfy/dyci/DyciRecompileAndInjectAction.java index 0f7de45..e67e838 100644 --- a/Support/AppCode/Dyci/src/com/stanfy/dyci/DyciRecompileAndInjectAction.java +++ b/Support/AppCode/Dyci/src/com/stanfy/dyci/DyciRecompileAndInjectAction.java @@ -54,22 +54,23 @@ public void actionPerformed(final AnActionEvent actionEvent) { } - private String xcodePath(java.io.FileReader fileReader){ + private String xcodePath(final AnActionEvent actionEvent,java.io.FileReader fileReader){ String xpathExpression = "/application/component[@name='XcodeSettings']/option[@name='selectedXcode']/@value"; + String result = null; XPathFactory xpathFactory = XPathFactory.newInstance(); XPath xpath = xpathFactory.newXPath(); try{ XPathExpression expr = xpath.compile(xpathExpression); InputSource inputSource = new InputSource(fileReader); - String result = expr.evaluate(inputSource); - return result; + result = expr.evaluate(inputSource); } catch(Exception e){ LOG.error("Exception getting Xcode path: " + e.getMessage()); this.showMessageBubble(actionEvent, MessageType.ERROR, "Failed to run injection script"); } + return result; } private void injectFile(final AnActionEvent actionEvent, final String path) { @@ -97,7 +98,7 @@ private void injectFile(final AnActionEvent actionEvent, final String path) { String[] commands; try { FileReader appcodeOptions = new FileReader(appcodeOptionsFilename); - String xcodePath = xcodePath(appcodeOptions); + String xcodePath = xcodePath(actionEvent, appcodeOptions); commands = new String[] {dyciScriptLocation, path, xcodePath}; } catch(IOException e) { // If the file cannot be found, it might not be a problem (user has appcode 2 or maybe the setting wasn't saved) From 9746ed2d009048c0be05575e568a7111dd65bf94 Mon Sep 17 00:00:00 2001 From: Mikkel Gravgaard Date: Mon, 10 Nov 2014 09:55:51 +0100 Subject: [PATCH 2/4] updated IntelliJ project settings --- Support/AppCode/Dyci/Dyci.iml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Support/AppCode/Dyci/Dyci.iml b/Support/AppCode/Dyci/Dyci.iml index b2f3591..c3f96cb 100644 --- a/Support/AppCode/Dyci/Dyci.iml +++ b/Support/AppCode/Dyci/Dyci.iml @@ -6,8 +6,21 @@ - + + + + + + + + + + + + + + From f3e014ef5e926d0a4fc1065dde7974c4f6ca0bbd Mon Sep 17 00:00:00 2001 From: Mikkel Gravgaard Date: Mon, 10 Nov 2014 09:56:27 +0100 Subject: [PATCH 3/4] updated plugin changelog --- Support/AppCode/Dyci/META-INF/plugin.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Support/AppCode/Dyci/META-INF/plugin.xml b/Support/AppCode/Dyci/META-INF/plugin.xml index 3c84f87..43498cb 100644 --- a/Support/AppCode/Dyci/META-INF/plugin.xml +++ b/Support/AppCode/Dyci/META-INF/plugin.xml @@ -1,7 +1,7 @@ com.stanfy.dyci DYCI - Dynamic code injection Tool - 1.1 + 1.2 YourCompany @@ -15,6 +15,9 @@ From 928cffeb28ef8565fd25e5803c58d3a882d06644 Mon Sep 17 00:00:00 2001 From: Mikkel Gravgaard Date: Mon, 10 Nov 2014 10:13:59 +0100 Subject: [PATCH 4/4] removed weird dependency --- Support/AppCode/Dyci/Dyci.iml | 1 - 1 file changed, 1 deletion(-) diff --git a/Support/AppCode/Dyci/Dyci.iml b/Support/AppCode/Dyci/Dyci.iml index c3f96cb..17858cf 100644 --- a/Support/AppCode/Dyci/Dyci.iml +++ b/Support/AppCode/Dyci/Dyci.iml @@ -18,7 +18,6 @@ -