File tree Expand file tree Collapse file tree 5 files changed +15
-6
lines changed
io.sloeber.autoBuild/src/io/sloeber/autoBuild
io.sloeber.core/src/io/sloeber/core Expand file tree Collapse file tree 5 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ public class AutoBuildConstants {
3232 public static final String TARGET_OBJECTS = "objects" ;
3333 public static final String TARGET_ALL = "all" ;
3434 public static final String TARGET_CLEAN = "clean" ;
35+ public static final String RELEASE = "Release" ;
3536 public static final String DEFAULT_AUTO_MAKE_TARGET = TARGET_OBJECTS ;
3637 public static final String DEFAULT_INCREMENTAL_MAKE_TARGET = TARGET_ALL ;
3738 public static final String DEFAULT_CLEAN_MAKE_TARGET = TARGET_CLEAN ;
Original file line number Diff line number Diff line change 11
22package io .sloeber .autoBuild .integration ;
33
4+ import static io .sloeber .autoBuild .helpers .api .AutoBuildConstants .*;
45import java .net .URI ;
56import java .util .HashSet ;
67import java .util .List ;
@@ -80,8 +81,12 @@ public void run(IProgressMonitor internalMonitor) throws CoreException {
8081 if (myProject .exists ()) {
8182 // Update the existing configurations
8283 ICProjectDescription orgdesc = mngr .getProjectDescription (myProject , false );
83- for (ICConfigurationDescription curConfig : orgdesc .getConfigurations ()) {
84- configNames .add (curConfig .getName ());
84+ if (orgdesc == null ) {
85+ configNames .add (RELEASE );
86+ } else {
87+ for (ICConfigurationDescription curConfig : orgdesc .getConfigurations ()) {
88+ configNames .add (curConfig .getName ());
89+ }
8590 }
8691 myLocationURI =myProject .getLocationURI ();
8792 //CDT reads the .cproject file when setting the configuration for making the delta
Original file line number Diff line number Diff line change @@ -201,7 +201,6 @@ public class Const extends AutoBuildConstants {
201201 public static final String KEY_JSON_URL ="URL" ;//$NON-NLS-1$
202202
203203
204- public static final String RELEASE = "Release" ;
205204 public static final String ARDUINO_SIZE = "arduino-size.cmd" ;
206205
207206 public static final short PLOTTER_START_DATA = (short ) 0xCDAB ;// This is the
Original file line number Diff line number Diff line change @@ -111,8 +111,12 @@ public void run(IProgressMonitor internalMonitor) throws CoreException {
111111 CCorePlugin cCorePlugin = CCorePlugin .getDefault ();
112112 ICProjectDescription oldPrjCDesc = cCorePlugin .getProjectDescription (project , false );
113113 Set <String >cfgNames =new HashSet <>();
114- for (ICConfigurationDescription curConfig : oldPrjCDesc .getConfigurations ()) {
115- cfgNames .add ( curConfig .getName ());
114+ if (oldPrjCDesc == null ) {
115+ cfgNames .add (RELEASE );
116+ } else {
117+ for (ICConfigurationDescription curConfig : oldPrjCDesc .getConfigurations ()) {
118+ cfgNames .add (curConfig .getName ());
119+ }
116120 }
117121
118122
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ private static IPath getLocation(ICSourceEntry entry) {
327327 IResource rc = ResourcesPlugin .getWorkspace ().getRoot ().findMember (path );
328328 if (rc != null )
329329 return rc .getLocation ();
330- return null ;
330+ return entry . getLocation () ;
331331 }
332332
333333 /**
You can’t perform that action at this time.
0 commit comments