Skip to content

Commit 9584bfe

Browse files
authored
Documented filename rules
1 parent 2cd7e82 commit 9584bfe

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Go to your Sublime Text `Packages` directory and clone this repository:
5858
- In Sublime Text, select your main `.pde` file and use **⌘B** to run the sketch. The build system expects that your sketch follows the normal directory structure and naming conventions of a Processing sketch (e.g. `mysketch/mysketch.pde`).
5959
- With **⇧⌘B** and typing `build`, you can select alternative build systems, such as _Run sketch fullscreen_ and various _Export sketch_ options.
6060

61-
### Custom shortcuts
61+
### Custom Shortcuts
6262
To get `.pde` files to run with **⌘R** and **⇧⌘R** (like Processing) instead of **⌘B** and **⇧⌘B**, add the following code to the User Key Bindings file via the _Preferences > Key Bindings - User_ menu item in Sublime Text.
6363

6464
```
@@ -73,9 +73,16 @@ To get `.pde` files to run with **⌘R** and **⇧⌘R** (like Processing) inste
7373
}
7474
```
7575

76-
### Console errors
76+
### Console Errors
7777
Console error messages are clickable: e.g. double click `test.pde:10:0:10:0: The function rEEct(int, int, int, int) does not exist` to jump to the related line and file.
7878

79+
### Filenames of Sketches
80+
Your filenames have to follow specific rules, otherwise they won't work with `processing-java`:
81+
82+
- must not contain dashes `-` (see processing/processing#4861)
83+
- must not start with a number `0123456789` (see processing/processing#2152)
84+
- must not start with an underscore `_` (see processing/processing#2152)
85+
- must adhere to [Java class naming rules](https://docs.oracle.com/javase/specs/jls/se11/html/jls-3.html#jls-3.8) (see [stackoverflow discussion](https://stackoverflow.com/a/65490/7574329) for the gist of it)
7986

8087
## Want a "Pure Java" Project without Eclipse?
8188

@@ -104,14 +111,15 @@ If you are new to Sublime I recommend the [Perfect Workflow in Sublime Text](htt
104111
## Acknowledgements
105112
- Original [Processing TextMate Bundle](http://www.onebitwonder.com/projects/processing/): [Leon Hong](http://www.onebitwonder.com/)
106113
- Textmate to Sublime snippet conversion: [textmate-to-sublime-converter](https://github.com/srbs/textmate-to-sublime-converter)
107-
- Maintainer: [Benedikt Groß](http://benedikt-gross.de/log/)
114+
- Maintainer: [Benedikt Groß](http://benedikt-gross.de/log/), [Yong Joseph Bakos](http://yongbakos.com)
108115
- Syntax highlighting tweaking: [Mark Brand](https://github.com/ignism)
109116
- Linux build script and testing: [Julien Deswaef](http://xuv.be/)
110117
- Windows build script and documention: [Ralf Baecker](http://github.com/rlfbckr)
111118
- Error console capturer: [Greger Stolt Nilsen](http://gregerstoltnilsen.net/)
112119
- Syntax definition, snippet cleansing, Processing reference vs. sublime [diff tool](https://github.com/ybakos/processing-sublime-util), and _New Java Ant Project_ command: [Yong Joseph Bakos](http://yongbakos.com)
113120
- How to set custom shortcuts: [Raphaël de Courville](https://github.com/SableRaf)
114121
- Rebuild of the processing syntax highlighter: [Kyle Fleming](https://github.com/kylefleming)
122+
- Filenames rules of sketches: [MaxValue](https://github.com/MaxValue)
115123

116124
See the [contributing guide](https://github.com/b-g/processing-sublime/blob/master/CONTRIBUTING.md) to learn about how to contribute to this project.
117125

0 commit comments

Comments
 (0)