@@ -236,18 +236,20 @@ public static void addCodeFolder(IProject project, IPath toLinkFolder, String Li
236
236
237
237
// Now the folder has been created we need to make sure the special
238
238
// folders are added to the path
239
- addIncludeFolder (configurationDescription , link .getFullPath ());
240
239
241
240
String possibleIncludeFolder = "utility" ;
242
241
File file = toLinkFolder .append (possibleIncludeFolder ).toFile ();
243
242
if (file .exists ()) {
244
243
addIncludeFolder (configurationDescription , link .getFullPath ().append (possibleIncludeFolder ));
245
244
}
246
245
246
+ // add src or root give priority to src
247
247
possibleIncludeFolder = Library .LIBRARY_SOURCE_FODER ;
248
248
file = toLinkFolder .append (possibleIncludeFolder ).toFile ();
249
249
if (file .exists ()) {
250
250
addIncludeFolder (configurationDescription , link .getFullPath ().append (possibleIncludeFolder ));
251
+ } else {
252
+ addIncludeFolder (configurationDescription , link .getFullPath ());
251
253
}
252
254
253
255
possibleIncludeFolder = "arch" ;
@@ -328,9 +330,9 @@ public static void addTheNatures(IProjectDescription description) throws CoreExc
328
330
* A monitor to show progress
329
331
* @throws CoreException
330
332
*/
331
- public static void addFileToProject (IContainer container , Path path , InputStream contentStream ,
333
+ public static IFile addFileToProject (IContainer container , Path path , InputStream contentStream ,
332
334
IProgressMonitor monitor , boolean overwrite ) throws CoreException {
333
- final IFile file = container .getFile (path );
335
+ IFile file = container .getFile (path );
334
336
file .refreshLocal (IResource .DEPTH_INFINITE , monitor );
335
337
if (overwrite && file .exists ()) {
336
338
file .delete (true , null );
@@ -340,6 +342,7 @@ public static void addFileToProject(IContainer container, Path path, InputStream
340
342
if (!file .exists () && (contentStream != null )) {
341
343
file .create (contentStream , true , monitor );
342
344
}
345
+ return file ;
343
346
}
344
347
345
348
public static MessageConsole findConsole (String name ) {
@@ -657,7 +660,7 @@ private static void setTheEnvironmentVariablesAddThePlatformInfo(BoardDescriptor
657
660
File referencedPlatformFile = boardDescriptor .getreferencedPlatformFile ();
658
661
String architecture = boardDescriptor .getArchitecture ();
659
662
for (ArduinoPlatform curPlatform : Manager .getInstalledPlatforms ()) {
660
- addPlatformFileTools (curPlatform , contribEnv , confDesc , false );
663
+ addPlatformFileTools (curPlatform , contribEnv , confDesc , false );
661
664
}
662
665
ArduinoPlatform LatestArduinoPlatform = null ;
663
666
for (ArduinoPlatform curPlatform : Manager .getLatestInstalledPlatforms ()) {
@@ -729,6 +732,8 @@ public static void setTheEnvironmentVariables(IProject project, ICConfigurationD
729
732
730
733
// Now we have all info we can start processing
731
734
735
+ //set the output folder as derive
736
+
732
737
// first remove all Arduino Variables so there is no memory effect
733
738
removeAllEraseEnvironmentVariables (contribEnv , confDesc );
734
739
@@ -1082,8 +1087,6 @@ private static String makeEnvironmentVar(String variableName) {
1082
1087
return "${" + variableName + '}' ;
1083
1088
}
1084
1089
1085
-
1086
-
1087
1090
/**
1088
1091
* creates links to the root files and folders of the source location
1089
1092
*
0 commit comments