Skip to content

Commit

Permalink
Updated macosx-java7 bundle to 1.5.8
Browse files Browse the repository at this point in the history
Merge tag '1.5.8' into ide-1.5.x-java7
  • Loading branch information
cmaglie committed Oct 1, 2014
2 parents 057f45f + 3a1b7ea commit b1c554d
Show file tree
Hide file tree
Showing 135 changed files with 4,560 additions and 2,115 deletions.
8 changes: 7 additions & 1 deletion app/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<classpathentry kind="lib" path="lib/ecj.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
<classpathentry kind="lib" path="lib/apple.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.6.0.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.7.jar"/>
<classpathentry kind="lib" path="lib/commons-exec-1.1.jar"/>
<classpathentry kind="lib" path="lib/commons-httpclient-3.1.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
<classpathentry kind="lib" path="lib/jmdns-3.4.1.jar"/>
<classpathentry kind="lib" path="lib/jsch-0.1.50.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.8.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
4 changes: 4 additions & 0 deletions app/src/cc/arduino/packages/Uploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ protected boolean executeUploadCommand(Collection<String> command) throws Except
}

protected boolean executeUploadCommand(String command[]) throws Exception {
// Skip empty commands
if (command == null || command.length == 0)
return true;

notFoundError = false;
int result = -1;

Expand Down
6 changes: 6 additions & 0 deletions app/src/cc/arduino/packages/formatter/AStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import processing.app.Base;
import processing.app.Editor;
import processing.app.helpers.FileUtils;
import processing.app.syntax.JEditTextArea;
import processing.app.tools.Tool;

import java.io.File;
Expand Down Expand Up @@ -54,8 +55,13 @@ public void run() {
return;
}

JEditTextArea textArea = editor.getTextArea();
int line = textArea.getLineOfOffset(textArea.getCaretPosition());
int lineOffset = textArea.getCaretPosition() - textArea.getLineStartOffset(line);

editor.setText(formattedText);
editor.getSketch().setModified(true);
textArea.setCaretPosition(Math.min(textArea.getLineStartOffset(line) + lineOffset, textArea.getSafeLineStopOffset(line) - 1));
// mark as finished
editor.statusNotice(_("Auto Format finished."));
}
Expand Down
31 changes: 20 additions & 11 deletions app/src/cc/arduino/packages/uploaders/SerialUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,22 @@

package cc.arduino.packages.uploaders;

import cc.arduino.packages.Uploader;
import processing.app.*;
import processing.app.debug.RunnerException;
import processing.app.debug.TargetPlatform;
import processing.app.helpers.PreferencesMap;
import processing.app.helpers.StringReplacer;
import static processing.app.I18n._;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import static processing.app.I18n._;
import processing.app.Base;
import processing.app.I18n;
import processing.app.Preferences;
import processing.app.Serial;
import processing.app.SerialException;
import processing.app.debug.RunnerException;
import processing.app.debug.TargetPlatform;
import processing.app.helpers.PreferencesMap;
import processing.app.helpers.StringReplacer;
import cc.arduino.packages.Uploader;

public class SerialUploader extends Uploader {

Expand Down Expand Up @@ -82,15 +86,13 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
System.out.println(_("Forcing reset using 1200bps open/close on port ") + uploadPort);
Serial.touchPort(uploadPort, 1200);
}
Thread.sleep(400);
if (waitForUploadPort) {
// Scanning for available ports seems to open the port or
// otherwise assert DTR, which would cancel the WDT reset if
// it happened within 250 ms. So we wait until the reset should
// have already occured before we start scanning.
Thread.sleep(300);
uploadPort = waitForUploadPort(uploadPort, before);
} else {
Thread.sleep(400);
}
} catch (SerialException e) {
throw new RunnerException(e);
Expand Down Expand Up @@ -209,7 +211,11 @@ public boolean uploadUsingProgrammer(String buildPath, String className) throws

PreferencesMap prefs = Preferences.getMap();
prefs.putAll(Base.getBoardPreferences());
prefs.putAll(targetPlatform.getProgrammer(programmer));
PreferencesMap programmerPrefs = targetPlatform.getProgrammer(programmer);
if (programmerPrefs == null)
throw new RunnerException(
_("Please select a programmer from Tools->Programmer menu"));
prefs.putAll(programmerPrefs);
prefs.putAll(targetPlatform.getTool(prefs.getOrExcept("program.tool")));

prefs.put("build.path", buildPath);
Expand Down Expand Up @@ -251,6 +257,9 @@ public boolean burnBootloader() throws Exception {
} else {
programmerPrefs = targetPlatform.getProgrammer(programmer);
}
if (programmerPrefs == null)
throw new RunnerException(
_("Please select a programmer from Tools->Programmer menu"));

// Build configuration for the current programmer
PreferencesMap prefs = Preferences.getMap();
Expand Down
Loading

0 comments on commit b1c554d

Please sign in to comment.