Changeset 4c7803f in rtems-eclipse-plug-in
- Timestamp:
- 02/06/09 16:32:11 (15 years ago)
- Branches:
- master
- Children:
- 8e6327a
- Parents:
- b9a8b46
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
org.rtems.cdt/src/org/rtems/cdt/Storage.java
rb9a8b46 r4c7803f 153 153 } 154 154 155 public static String getPlatform( IProject project) { 156 return getPristineProperty( project, Constants.PLATFORM_KEY); 157 } 158 159 public static void setPlatform( IProject project, String platform) { 160 setProperty( project, Constants.PLATFORM_KEY, platform); 161 } 162 155 163 public static void clearPlatform( IProject project) { 156 setP roperty( project, Constants.PLATFORM_KEY, null);164 setPlatform( project, null); 157 165 158 166 // Delete discovered paths for all configurations of the project … … 165 173 } 166 174 167 public static String getPlatform( IProject project) {168 return getPristineProperty( project, Constants.PLATFORM_KEY);169 }170 171 175 public static void changePlatform( IProject project, String newPlatform) { 172 176 String platform = getPlatform( project); … … 179 183 180 184 // Set new platform 181 setP roperty( project, Constants.PLATFORM_KEY, newPlatform);185 setPlatform( project, newPlatform); 182 186 183 187 // Update path prepends … … 202 206 IPath make = new Path( "make"); 203 207 List<String> options = new LinkedList<String>(); 208 boolean error = false; 204 209 205 210 // Set tools to default values … … 238 243 env.put( Constants.PATH_VARIABLE_NAME, path); 239 244 240 // On windows we have to search for the make program in the new path environment245 // On Windows we have to search for the make program in the new path environment 241 246 if (Platform.getOS().equals( Platform.OS_WIN32)) { 242 247 String parts [] = path.split( Constants.PATH_SEPARATOR); 248 boolean found = false; 249 243 250 for (String p : parts) { 244 251 IPath makeCandidate = new Path( p).append( "make.exe"); 245 252 File file = new File( makeCandidate.toOSString()); 253 246 254 if (file.exists()) { 247 255 make = makeCandidate; 256 found = true; 248 257 break; 249 258 } 250 259 } 260 261 if (!found) { 262 createMarker( 263 project, 264 Constants.MARKER_ID_TOOL_DISCOVERY, 265 "make program not found, check your Cygwin or MinGW settings in the RTEMS preferences" 266 ); 267 } 251 268 } 252 269 253 270 // Set command line 271 String makeArgument = Constants.BSP_PATH_MAKE_VARIABLE + "=" + bspPath; 254 272 pb.command( 255 273 make.toOSString(), 256 Constants.BSP_PATH_MAKE_VARIABLE + "=" + bspPath274 makeArgument 257 275 ); 258 276 … … 307 325 } 308 326 } catch (IOException e) { 327 error = true; 309 328 createMarker( 310 329 project, … … 325 344 // Check exit status 326 345 if (p.exitValue() != 0) { 346 error = true; 327 347 createMarker( 328 348 project, 329 349 Constants.MARKER_ID_TOOL_DISCOVERY, 330 "make invokation `" + make.toOSString() + " ' returned with error status " + p.exitValue()350 "make invokation `" + make.toOSString() + " " + makeArgument + "' returned with error status " + p.exitValue() 331 351 ); 352 } 353 354 // Check error 355 if (error) { 356 // Clear platform to trigger an update again if someone changed a preference or property value 357 setPlatform( project, null); 332 358 } 333 359 }
Note: See TracChangeset
for help on using the changeset viewer.