File tree Expand file tree Collapse file tree 3 files changed +2
-61
lines changed
arduino-core/src/processing/app Expand file tree Collapse file tree 3 files changed +2
-61
lines changed Original file line number Diff line number Diff line change @@ -90,11 +90,6 @@ private void load() throws IOException {
90
90
protected void load (boolean forceUpdate ) throws IOException {
91
91
data .load ();
92
92
93
- for (SketchCode code : data .getCodes ()) {
94
- if (code .getMetadata () == null )
95
- code .setMetadata (new SketchCodeDocument (this , code ));
96
- }
97
-
98
93
// set the main file to be the current tab
99
94
if (editor != null ) {
100
95
int current = editor .getCurrentTabIndex ();
@@ -401,7 +396,7 @@ protected void nameCode(String newName) {
401
396
return ;
402
397
}
403
398
ensureExistence ();
404
- SketchCode code = ( new SketchCodeDocument ( this , newFile )). getCode ( );
399
+ SketchCode code = new SketchCode ( newFile );
405
400
try {
406
401
editor .addTab (code , "" );
407
402
} catch (IOException e ) {
@@ -861,7 +856,7 @@ public boolean addFile(File sourceFile) {
861
856
}
862
857
863
858
if (codeExtension != null ) {
864
- SketchCode newCode = ( new SketchCodeDocument ( this , destFile )). getCode ( );
859
+ SketchCode newCode = new SketchCode ( destFile );
865
860
866
861
if (replacement ) {
867
862
data .replaceCode (newCode );
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -45,8 +45,6 @@ public class SketchCode {
45
45
*/
46
46
private File file ;
47
47
48
- private Object metadata ;
49
-
50
48
/**
51
49
* Interface for an in-memory storage of text file contents. This is
52
50
* intended to allow a GUI to keep modified text in memory, and allow
@@ -74,16 +72,7 @@ public static interface TextStorage {
74
72
private TextStorage storage ;
75
73
76
74
public SketchCode (File file ) {
77
- init (file , null );
78
- }
79
-
80
- public SketchCode (File file , Object metadata ) {
81
- init (file , metadata );
82
- }
83
-
84
- private void init (File file , Object metadata ) {
85
75
this .file = file ;
86
- this .metadata = metadata ;
87
76
}
88
77
89
78
/**
@@ -244,14 +233,4 @@ public void saveAs(File newFile) throws IOException {
244
233
245
234
BaseNoGui .saveFile (storage .getText (), newFile );
246
235
}
247
-
248
-
249
- public Object getMetadata () {
250
- return metadata ;
251
- }
252
-
253
-
254
- public void setMetadata (Object metadata ) {
255
- this .metadata = metadata ;
256
- }
257
236
}
You can’t perform that action at this time.
0 commit comments