Skip to content

Commit 1aed4d6

Browse files
committed
cleaning up warnings, specifying Java 1.6 for build in Eclipse, remove unused
1 parent 3413876 commit 1aed4d6

File tree

18 files changed

+1511
-1503
lines changed

18 files changed

+1511
-1503
lines changed

android/core/src/processing/core/PGraphicsAndroid3D.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3025,7 +3025,7 @@ protected void addPolygonTriangles() {
30253025
int vc = shapeLast - shapeFirst;
30263026
int count = 2 * vc; // complex polygon detection
30273027

3028-
for (int m = 0, v = vc - 1; vc > 2;) {
3028+
for (int v = vc - 1; vc > 2;) {
30293029
boolean snip = true;
30303030

30313031
// if we start over again, is a complex polygon
@@ -3097,8 +3097,6 @@ protected void addPolygonTriangles() {
30973097
if (snip) {
30983098
addTriangle(vertexOrder[u], vertexOrder[v], vertexOrder[w]);
30993099

3100-
m++;
3101-
31023100
// remove v from remaining polygon
31033101
for (int s = v, t = v + 1; t < vc; s++, t++) {
31043102
vertexOrder[s] = vertexOrder[t];

app/.classpath

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<classpath>
3-
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="src" path="generated"/>
5-
<classpathentry kind="src" path="test/src"/>
6-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
7-
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
8-
<classpathentry combineaccessrules="false" kind="src" path="/processing-dxf"/>
9-
<classpathentry combineaccessrules="false" kind="src" path="/processing-net"/>
10-
<classpathentry combineaccessrules="false" kind="src" path="/processing-opengl">
11-
<attributes>
12-
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="opengl/library"/>
13-
</attributes>
14-
</classpathentry>
15-
<classpathentry combineaccessrules="false" kind="src" path="/processing-pdf"/>
16-
<classpathentry combineaccessrules="false" kind="src" path="/processing-serial"/>
17-
<classpathentry combineaccessrules="false" kind="src" path="/processing-video"/>
18-
<classpathentry kind="lib" path="lib/antlr.jar" sourcepath="lib/antlr-src.zip"/>
19-
<classpathentry kind="lib" path="lib/jna.jar"/>
20-
<classpathentry kind="lib" path="lib/ecj.jar"/>
21-
<classpathentry exported="true" kind="lib" path="lib/ant.jar"/>
22-
<classpathentry exported="true" kind="lib" path="lib/ant-launcher.jar"/>
23-
<classpathentry kind="lib" path="lib/apple.jar"/>
24-
<classpathentry kind="lib" path="test/lib/junit-4.8.1.jar"/>
25-
<classpathentry kind="output" path="bin"/>
26-
</classpath>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="generated"/>
5+
<classpathentry kind="src" path="test/src"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
7+
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
8+
<classpathentry combineaccessrules="false" kind="src" path="/processing-dxf"/>
9+
<classpathentry combineaccessrules="false" kind="src" path="/processing-net"/>
10+
<classpathentry combineaccessrules="false" kind="src" path="/processing-opengl">
11+
<attributes>
12+
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="opengl/library"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry combineaccessrules="false" kind="src" path="/processing-pdf"/>
16+
<classpathentry combineaccessrules="false" kind="src" path="/processing-serial"/>
17+
<classpathentry combineaccessrules="false" kind="src" path="/processing-video"/>
18+
<classpathentry kind="lib" path="lib/antlr.jar" sourcepath="lib/antlr-src.zip"/>
19+
<classpathentry kind="lib" path="lib/jna.jar"/>
20+
<classpathentry kind="lib" path="lib/ecj.jar"/>
21+
<classpathentry exported="true" kind="lib" path="lib/ant.jar"/>
22+
<classpathentry exported="true" kind="lib" path="lib/ant-launcher.jar"/>
23+
<classpathentry kind="lib" path="lib/apple.jar"/>
24+
<classpathentry kind="lib" path="test/lib/junit-4.8.1.jar"/>
25+
<classpathentry kind="output" path="bin"/>
26+
</classpath>

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

Lines changed: 325 additions & 325 deletions
Large diffs are not rendered by default.

app/src/processing/app/syntax/SyntaxUtilities.java

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -124,36 +124,30 @@ public static SyntaxStyle[] getDefaultSyntaxStyles()
124124
public static int paintSyntaxLine(Segment line, Token tokens,
125125
SyntaxStyle[] styles,
126126
TabExpander expander, Graphics gfx,
127-
int x, int y)
128-
{
127+
int x, int y) {
129128
Font defaultFont = gfx.getFont();
130129
Color defaultColor = gfx.getColor();
131130

132-
int offset = 0;
133-
for(;;)
134-
{
135-
byte id = tokens.id;
136-
if(id == Token.END)
137-
break;
138-
139-
int length = tokens.length;
140-
if(id == Token.NULL)
141-
{
142-
if(!defaultColor.equals(gfx.getColor()))
143-
gfx.setColor(defaultColor);
144-
if(!defaultFont.equals(gfx.getFont()))
145-
gfx.setFont(defaultFont);
146-
}
147-
else
148-
styles[id].setGraphicsFlags(gfx,defaultFont);
149-
150-
line.count = length;
151-
x = Utilities.drawTabbedText(line,x,y,gfx,expander,0);
152-
line.offset += length;
153-
offset += length;
154-
155-
tokens = tokens.next;
131+
for (;;) {
132+
byte id = tokens.id;
133+
if(id == Token.END)
134+
break;
135+
136+
int length = tokens.length;
137+
if (id == Token.NULL) {
138+
if(!defaultColor.equals(gfx.getColor()))
139+
gfx.setColor(defaultColor);
140+
if(!defaultFont.equals(gfx.getFont()))
141+
gfx.setFont(defaultFont);
142+
} else {
143+
styles[id].setGraphicsFlags(gfx,defaultFont);
156144
}
145+
line.count = length;
146+
x = Utilities.drawTabbedText(line,x,y,gfx,expander,0);
147+
line.offset += length;
148+
149+
tokens = tokens.next;
150+
}
157151

158152
return x;
159153
}

app/src/processing/mode/android/Device.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@
1919
import processing.mode.android.LogEntry.Severity;
2020

2121

22-
class Device implements DeviceProperties {
22+
class Device {
2323
private final Devices env;
2424
private final String id;
2525
private final Set<Integer> activeProcesses = new HashSet<Integer>();
2626
private final Set<DeviceListener> listeners =
2727
Collections.synchronizedSet(new HashSet<DeviceListener>());
28+
29+
// public static final String APP_STARTED = "android.device.app.started";
30+
// public static final String APP_ENDED = "android.device.app.ended";
2831

2932
// mutable state
3033
private Process logcat;

app/src/processing/mode/android/DeviceProperties.java

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/src/processing/mode/java/AutoFormat.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public class AutoFormat implements Formatter {
5353
private boolean EOF;
5454
private boolean a_flg, e_flg, if_flg, s_flag, q_flg;
5555
private boolean s_if_flg[];
56-
private int pos, lineNumber;
56+
private int pos;
57+
// private int lineNumber;
5758
private int s_level[];
5859
private int c_level;
5960
private int sp_flg[][];
@@ -82,7 +83,7 @@ private void comment() {
8283
buf.append(c = next());
8384
while ((c != '/')) {
8485
if (c == '\n') {
85-
lineNumber++;
86+
// lineNumber++;
8687
writeIndentedComment();
8788
s_flag = true;
8889
}
@@ -192,7 +193,7 @@ private void handleSingleLineComment() {
192193
buf.append(c);
193194
c = next();
194195
}
195-
lineNumber++;
196+
// lineNumber++;
196197
writeIndentedLine();
197198
s_flag = true;
198199
}
@@ -298,7 +299,7 @@ private boolean getnl() {
298299
if (c == '\n') {
299300
// eat it
300301
next();
301-
lineNumber++;
302+
// lineNumber++;
302303
tabs = savedTabs;
303304
return true;
304305
}
@@ -332,7 +333,7 @@ public String format(final String source) {
332333
result.setLength(0);
333334
indentValue = Preferences.getInteger("editor.tabs.size");
334335

335-
lineNumber = 0;
336+
// lineNumber = 0;
336337
q_flg = e_flg = a_flg = if_flg = false;
337338
s_flag = true;
338339
c_level = if_lev = level = paren = 0;
@@ -349,7 +350,7 @@ public String format(final String source) {
349350
s_tabs = new int[20][10];
350351
pos = -1;
351352
chars = cleanText.toCharArray();
352-
lineNumber = 1;
353+
// lineNumber = 1;
353354

354355
EOF = false; // set in next() when EOF
355356

@@ -385,7 +386,7 @@ public String format(final String source) {
385386
break;
386387

387388
case '\n':
388-
lineNumber++;
389+
// lineNumber++;
389390
if (EOF) {
390391
break;
391392
}
@@ -499,7 +500,7 @@ public String format(final String source) {
499500
buf.append(cc = next());
500501
}
501502
if (cc == '\n') {
502-
lineNumber++;
503+
// lineNumber++;
503504
writeIndentedLine();
504505
s_flag = true;
505506
}

app/src/processing/mode/java/JavaBuild.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ private boolean exportApplication(File destFolder,
12361236
String includes = Base.contentsToClassPath(sketch.getCodeFolder());
12371237
// Use tokens to get rid of extra blanks, which causes huge exports
12381238
String[] codeList = PApplet.splitTokens(includes, File.pathSeparator);
1239-
String cp = "";
1239+
// String cp = "";
12401240
for (int i = 0; i < codeList.length; i++) {
12411241
if (codeList[i].toLowerCase().endsWith(".jar") ||
12421242
codeList[i].toLowerCase().endsWith(".zip")) {
@@ -1245,7 +1245,7 @@ private boolean exportApplication(File destFolder,
12451245
Base.copyFile(exportFile, new File(jarFolder, exportFilename));
12461246
jarListVector.add(exportFilename);
12471247
} else {
1248-
cp += codeList[i] + File.pathSeparator;
1248+
// cp += codeList[i] + File.pathSeparator;
12491249
}
12501250
}
12511251
// packClassPathIntoZipFile(cp, zos, zipFileContents); // this was double adding the code folder prior to 2.0a2

0 commit comments

Comments
 (0)