@@ -47,7 +47,6 @@ public ArduinoSampleSelector(Composite parent, int style, String label) {
47
47
myLabel .setLayoutData (theGriddata );
48
48
49
49
myTreeSelector = new Tree (composite , SWT .CHECK | SWT .BORDER );
50
-
51
50
myTreeSelector .setLayoutData (theGriddata );
52
51
// Get the data in the tree
53
52
myTreeSelector .setRedraw (false );
@@ -90,14 +89,6 @@ public void handleEvent(Event event) {
90
89
public void AddAllExamples (IPath arduinoExample , IPath arduinoLibPath , IPath privateLibrary , IPath hardwareLibrary ) {
91
90
removeExamples ();
92
91
93
- if (arduinoLibPath .toFile ().exists ()) {
94
- addLibExamples (arduinoLibPath , ArduinoConst .WORKSPACE_PATH_VARIABLE_NAME_ARDUINO_LIB );
95
- }
96
-
97
- if (hardwareLibrary .toFile ().exists ()) {
98
- addLibExamples (hardwareLibrary , ArduinoConst .WORKSPACE_PATH_VARIABLE_NAME_HARDWARE_LIB );
99
- }
100
-
101
92
if (arduinoExample .toFile ().exists ()) {
102
93
// Create Arduino Item
103
94
// TreeItem myArduinoExampleItem = new TreeItem(myTreeSelector, SWT.NONE);
@@ -108,10 +99,17 @@ public void AddAllExamples(IPath arduinoExample, IPath arduinoLibPath, IPath pri
108
99
addExamplesFolder (arduinoExample );
109
100
}
110
101
102
+ if (arduinoLibPath .toFile ().exists ()) {
103
+ addLibExamples (arduinoLibPath , ArduinoConst .WORKSPACE_PATH_VARIABLE_NAME_ARDUINO_LIB );
104
+ }
105
+
106
+ if (hardwareLibrary .toFile ().exists ()) {
107
+ addLibExamples (hardwareLibrary , ArduinoConst .WORKSPACE_PATH_VARIABLE_NAME_HARDWARE_LIB );
108
+ }
109
+
111
110
if (privateLibrary .toFile ().exists ()) {
112
111
addLibExamples (privateLibrary , ArduinoConst .WORKSPACE_PATH_VARIABLE_NAME_PRIVATE_LIB );
113
112
}
114
-
115
113
}
116
114
117
115
/**
0 commit comments