Skip to content
  • Sponsor arduino/Arduino

  • Notifications You must be signed in to change notification settings
  • Fork 7k

Commit d2734fa

Browse files
committedJan 11, 2012
Fixed eclipse project files
1 parent 47e8a81 commit d2734fa

File tree

4 files changed

+57
-71
lines changed

4 files changed

+57
-71
lines changed
 

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#Wed Jun 04 15:47:46 EDT 2008
1+
#Wed Jan 11 13:49:57 CET 2012
22
eclipse.preferences.version=1
33
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
55
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6-
org.eclipse.jdt.core.compiler.compliance=1.5
6+
org.eclipse.jdt.core.compiler.compliance=1.6
77
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
88
org.eclipse.jdt.core.compiler.debug.localVariable=generate
99
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -63,7 +63,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
6363
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
6464
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
6565
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
66-
org.eclipse.jdt.core.compiler.source=1.5
66+
org.eclipse.jdt.core.compiler.source=1.6
6767
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
6868
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
6969
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16

‎app/src/processing/app/debug/Sizer.java

+40-53
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,93 @@
11
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
22

33
/*
4-
Sizer - computes the size of a .hex file
5-
Part of the Arduino project - http://www.arduino.cc/
4+
Sizer - computes the size of a .hex file
5+
Part of the Arduino project - http://www.arduino.cc/
66
7-
Copyright (c) 2006 David A. Mellis
7+
Copyright (c) 2006 David A. Mellis
88
9-
This program is free software; you can redistribute it and/or modify
10-
it under the terms of the GNU General Public License as published by
11-
the Free Software Foundation; either version 2 of the License, or
12-
(at your option) any later version.
9+
This program is free software; you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation; either version 2 of the License, or
12+
(at your option) any later version.
1313
14-
This program is distributed in the hope that it will be useful,
15-
but WITHOUT ANY WARRANTY; without even the implied warranty of
16-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17-
GNU General Public License for more details.
14+
This program is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
1818
19-
You should have received a copy of the GNU General Public License
20-
along with this program; if not, write to the Free Software Foundation,
21-
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22-
23-
$Id$
24-
*/
19+
You should have received a copy of the GNU General Public License
20+
along with this program; if not, write to the Free Software Foundation,
21+
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22+
23+
$Id$
24+
*/
2525

2626
package processing.app.debug;
2727

28-
import java.io.File;
29-
import java.text.MessageFormat;
30-
import java.util.Map;
31-
import java.util.NoSuchElementException;
32-
import java.util.StringTokenizer;
28+
import processing.app.Base;
29+
30+
import java.io.*;
31+
import java.util.*;
3332

3433
public class Sizer implements MessageConsumer {
3534
private String buildPath, sketchName;
36-
3735
private String firstLine;
38-
3936
private long size;
40-
4137
private RunnerException exception;
4238

43-
private Map<String, String> prefs;
44-
45-
public Sizer(String buildPath, String sketchName,
46-
Map<String, String> prefs) {
39+
public Sizer(String buildPath, String sketchName) {
4740
this.buildPath = buildPath;
4841
this.sketchName = sketchName;
49-
this.prefs = prefs;
5042
}
51-
43+
5244
public long computeSize() throws RunnerException {
53-
String args[] = new String[3];
54-
args[0] = prefs.get("compiler.path");
55-
args[1] = prefs.get("compiler.size.cmd");
56-
args[2] = buildPath + File.separator + sketchName;
57-
58-
String recipe = prefs.get("recipe.size.pattern");
59-
MessageFormat compileFormat = new MessageFormat(recipe);
60-
String command = compileFormat.format(args);
61-
String[] commandArray = command.split("\\|");
45+
String avrBasePath = Base.getAvrBasePath();
46+
String commandSize[] = new String[] {
47+
avrBasePath + "avr-size",
48+
" "
49+
};
50+
51+
commandSize[1] = buildPath + File.separator + sketchName + ".hex";
6252

6353
int r = 0;
6454
try {
6555
exception = null;
6656
size = -1;
6757
firstLine = null;
68-
Process process = Runtime.getRuntime().exec(commandArray);
58+
Process process = Runtime.getRuntime().exec(commandSize);
6959
MessageSiphon in = new MessageSiphon(process.getInputStream(), this);
7060
MessageSiphon err = new MessageSiphon(process.getErrorStream(), this);
7161

7262
boolean running = true;
7363

74-
while (running) {
64+
while(running) {
7565
try {
7666
if (in.thread != null)
7767
in.thread.join();
7868
if (err.thread != null)
7969
err.thread.join();
8070
r = process.waitFor();
8171
running = false;
82-
} catch (InterruptedException intExc) {
83-
}
72+
} catch (InterruptedException intExc) { }
8473
}
8574
} catch (Exception e) {
8675
// The default Throwable.toString() never returns null, but apparently
8776
// some sub-class has overridden it to do so, thus we need to check for
88-
// it. See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1166589459
89-
if (e.toString() == null)
90-
exception = new RunnerException(e.getClass().getName() + r);
91-
else
92-
exception = new RunnerException(e.toString() + r);
77+
// it. See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1166589459
78+
exception = new RunnerException(
79+
(e.toString() == null) ? e.getClass().getName() + r : e.toString() + r);
9380
}
94-
81+
9582
if (exception != null)
9683
throw exception;
97-
84+
9885
if (size == -1)
9986
throw new RunnerException(firstLine);
100-
87+
10188
return size;
10289
}
103-
90+
10491
public void message(String s) {
10592
if (firstLine == null)
10693
firstLine = s;

‎build/windows/launcher/launch4j/.classpath

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
<classpathentry kind="lib" path="lib/commons-logging.jar"/>
1010
<classpathentry kind="lib" path="lib/looks.jar"/>
1111
<classpathentry kind="lib" path="lib/foxtrot.jar"/>
12-
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.ant_1.7.0.v200706080842/lib/ant.jar"/>
13-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2sdk1.4.2"/>
12+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
1413
<classpathentry kind="lib" path="lib/forms.jar"/>
1514
<classpathentry kind="output" path="build"/>
1615
</classpath>
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#Sun Jul 20 14:10:30 CEST 2008
2-
eclipse.preferences.version=1
3-
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
5-
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6-
org.eclipse.jdt.core.compiler.compliance=1.4
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=warning
12-
org.eclipse.jdt.core.compiler.source=1.4
1+
#Wed Jan 11 13:54:29 CET 2012
2+
eclipse.preferences.version=1
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

0 commit comments

Comments
 (0)