Skip to content

Commit b861469

Browse files
committed
recognize android-specific keywords
1 parent 3a9637b commit b861469

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

mode/keywords.txt

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Android-specific keywords
2+
3+
# For an explanation of these tags, see Token.java
4+
# processing/app/src/processing/app/syntax/Token.java
5+
6+
VR LITERAL2
7+
AR LITERAL2
8+
STEREO LITERAL2
9+
MONO LITERAL2
10+
PORTRAIT LITERAL2
11+
LANDSCAPE LITERAL2
12+
displayDensity KEYWORD4
13+
14+
orientation FUNCTION1
15+
hasPermission FUNCTION1
16+
requestPermission FUNCTION1
17+
touches KEYWORD4
18+
touchEnded FUNCTION4
19+
touchMoved FUNCTION4
20+
touchStarted FUNCTION4
21+
closeKeyboard FUNCTION1
22+
openKeyboard FUNCTION1
23+
wallpaperHomeCount FUNCTION1
24+
wallpaperOffset FUNCTION1
25+
wallpaperPreview FUNCTION1
26+
wearAmbient FUNCTION1
27+
wearBurnIn FUNCTION1
28+
wearInsets FUNCTION1
29+
wearInteractive FUNCTION1
30+
wearLowBit FUNCTION1
31+
wearRound FUNCTION1
32+
wearSquare FUNCTION1
33+
cameraUp FUNCTION1
34+
eye FUNCTION1
35+
getEyeMatrix FUNCTION1
36+
getObjectMatrix FUNCTION1
37+
getRayFromScreen FUNCTION1
38+
intersectsSphere FUNCTION1
39+
intersectsBox FUNCTION1
40+
intersectsPlane FUNCTION1
41+
calculate FUNCTION1
42+
push FUNCTION1
43+
pop FUNCTION1
44+
circle FUNCTION1
45+
square FUNCTION1
46+
47+
VRCamera KEYWORD5
48+
ARTracker KEYWORD5
49+
ARTrackable KEYWORD5
50+
ARAnchor KEYWORD5

mode/src/processing/mode/android/AndroidMode.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public String getTitle() {
9292

9393
public File[] getKeywordFiles() {
9494
return new File[] {
95-
Platform.getContentFile("modes/java/keywords.txt")
95+
Platform.getContentFile("modes/java/keywords.txt"),
96+
getContentFile("keywords.txt")
9697
};
9798
}
9899

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

-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
import java.io.File;
3535
import java.io.IOException;
36-
import java.io.InputStream;
3736
import java.util.*;
3837
import java.util.regex.Matcher;
3938
import java.util.regex.Pattern;
@@ -257,7 +256,6 @@ public boolean isEmulator() {
257256

258257
public void setPackageName(String pkgName) {
259258
packageName = pkgName;
260-
System.out.println("setting package name to " + packageName);
261259
}
262260

263261
// I/Process ( 9213): Sending signal. PID: 9213 SIG: 9

0 commit comments

Comments
 (0)