Skip to content

Commit e1748e7

Browse files
committed
Merge branch 'master' into wifly_integration
2 parents 17d8fcb + 4588120 commit e1748e7

File tree

196 files changed

+6695
-8736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+6695
-8736
lines changed

.classpath

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<classpath>
33
<classpathentry excluding="processing/app/tools/format/|processing/app/tools/format/src/|processing/app/Trace.java|processing/app/RunnerClassLoader.java" kind="src" path="app/src"/>
44
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5-
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
6-
<classpathentry kind="lib" path="build/shared/lib/antlr.jar"/>
7-
<classpathentry kind="lib" path="build/shared/lib/registry.jar"/>
8-
<classpathentry kind="lib" path="build/shared/lib/apple.jar"/>
5+
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
6+
<classpathentry kind="lib" path="app/lib/antlr.jar"/>
7+
<classpathentry kind="lib" path="app/lib/apple.jar"/>
8+
<classpathentry kind="lib" path="app/lib/ecj.jar"/>
9+
<classpathentry kind="lib" path="app/lib/jna.jar"/>
10+
<classpathentry kind="lib" path="app/lib/RXTXcomm.jar"/>
911
<classpathentry kind="output" path="app/bin"/>
1012
</classpath>

.settings/org.eclipse.jdt.core.prefs

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
#Thu Jan 10 10:50:38 PST 2008
1+
#Tue Aug 16 19:08:40 CEST 2011
22
eclipse.preferences.version=1
3-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
4-
org.eclipse.jdt.core.compiler.compliance=1.4
5-
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
6-
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
7-
org.eclipse.jdt.core.compiler.source=1.3
3+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.compliance=1.6
7+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.source=1.6
813
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
914
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
1015
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16

app/src/processing/app/Base.java

+33-11
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
* files and images, etc) that comes from that.
4242
*/
4343
public class Base {
44-
public static final int REVISION = 22;
44+
public static final int REVISION = 100;
4545
/** This might be replaced by main() if there's a lib/version.txt file. */
46-
static String VERSION_NAME = "0022";
46+
static String VERSION_NAME = "0100";
4747
/** Set true if this a proper release rather than a numbered revision. */
4848
static public boolean RELEASE = false;
4949

@@ -349,6 +349,10 @@ protected boolean restoreSketches() {
349349
int opened = 0;
350350
for (int i = 0; i < count; i++) {
351351
String path = Preferences.get("last.sketch" + i + ".path");
352+
// don't automatically rename sketches that were left open from a
353+
// pre-1.0 version of Arduino (wait for the user to explicitly open
354+
// the sketch before renaming it).
355+
if (path.toLowerCase().endsWith(".pde")) continue;
352356
int[] location;
353357
if (windowPositionValid) {
354358
String locationStr = Preferences.get("last.sketch" + i + ".location");
@@ -545,7 +549,7 @@ protected String createNewUntitled() throws IOException {
545549
newbieDir.mkdirs();
546550

547551
// Make an empty pde file
548-
File newbieFile = new File(newbieDir, newbieName + ".pde");
552+
File newbieFile = new File(newbieDir, newbieName + ".ino");
549553
new FileOutputStream(newbieFile); // create the file
550554
return newbieFile.getAbsolutePath();
551555
}
@@ -637,7 +641,8 @@ public void handleOpenPrompt() {
637641
public boolean accept(File dir, String name) {
638642
// TODO this doesn't seem to ever be used. AWESOME.
639643
//System.out.println("check filter on " + dir + " " + name);
640-
return name.toLowerCase().endsWith(".pde");
644+
return name.toLowerCase().endsWith(".ino")
645+
|| name.toLowerCase().endsWith(".pde");
641646
}
642647
});
643648

@@ -988,6 +993,13 @@ public void rebuildExamplesMenu(JMenu menu) {
988993
}
989994

990995

996+
public void onBoardOrPortChange() {
997+
for (Editor editor : editors) {
998+
editor.onBoardOrPortChange();
999+
}
1000+
}
1001+
1002+
9911003
public void rebuildBoardsMenu(JMenu menu) {
9921004
//System.out.println("rebuilding boards menu");
9931005
menu.removeAll();
@@ -1000,6 +1012,7 @@ public void actionPerformed(ActionEvent actionevent) {
10001012
//System.out.println("Switching to " + target + ":" + board);
10011013
Preferences.set("target", (String) getValue("target"));
10021014
Preferences.set("board", (String) getValue("board"));
1015+
onBoardOrPortChange();
10031016
}
10041017
};
10051018
action.putValue("target", target.getName());
@@ -1016,22 +1029,28 @@ public void actionPerformed(ActionEvent actionevent) {
10161029
}
10171030

10181031

1019-
public void rebuildBurnBootloaderMenu(JMenu menu) {
1020-
//System.out.println("rebuilding burn bootloader menu");
1032+
public void rebuildProgrammerMenu(JMenu menu) {
1033+
//System.out.println("rebuilding programmer menu");
10211034
menu.removeAll();
1035+
ButtonGroup group = new ButtonGroup();
10221036
for (Target target : targetsTable.values()) {
10231037
for (String programmer : target.getProgrammers().keySet()) {
10241038
AbstractAction action =
10251039
new AbstractAction(
1026-
"w/ " + target.getProgrammers().get(programmer).get("name")) {
1040+
target.getProgrammers().get(programmer).get("name")) {
10271041
public void actionPerformed(ActionEvent actionevent) {
1028-
activeEditor.handleBurnBootloader((String) getValue("target"),
1029-
(String) getValue("programmer"));
1042+
Preferences.set("programmer", getValue("target") + ":" +
1043+
getValue("programmer"));
10301044
}
10311045
};
10321046
action.putValue("target", target.getName());
10331047
action.putValue("programmer", programmer);
1034-
JMenuItem item = new JMenuItem(action);
1048+
JMenuItem item = new JRadioButtonMenuItem(action);
1049+
if (Preferences.get("programmer").equals(target.getName() + ":" +
1050+
programmer)) {
1051+
item.setSelected(true);
1052+
}
1053+
group.add(item);
10351054
menu.add(item);
10361055
}
10371056
}
@@ -1091,7 +1110,10 @@ public void actionPerformed(ActionEvent e) {
10911110
File subfolder = new File(folder, list[i]);
10921111
if (!subfolder.isDirectory()) continue;
10931112

1094-
File entry = new File(subfolder, list[i] + ".pde");
1113+
File entry = new File(subfolder, list[i] + ".ino");
1114+
if (!entry.exists() && (new File(subfolder, list[i] + ".pde")).exists()) {
1115+
entry = new File(subfolder, list[i] + ".pde");
1116+
}
10951117
// if a .pde file of the same prefix as the folder exists..
10961118
if (entry.exists()) {
10971119
//String sanityCheck = sanitizedName(list[i]);

0 commit comments

Comments
 (0)