|
Lines 59-64
Link Here
|
| 59 |
|
59 |
|
| 60 |
private static final String NOT_ENABLED= AntLaunchConfigurationMessages.AntBuilderTargetsTab_0; |
60 |
private static final String NOT_ENABLED= AntLaunchConfigurationMessages.AntBuilderTargetsTab_0; |
| 61 |
private static final String DEFAULT_TARGET_SELECTED= AntLaunchConfigurationMessages.AntBuilderTargetsTab_10; |
61 |
private static final String DEFAULT_TARGET_SELECTED= AntLaunchConfigurationMessages.AntBuilderTargetsTab_10; |
|
|
62 |
private static final String NO_BUILD_KIND_ERROR= AntLaunchConfigurationMessages.AntBuilderTargetsTab_buildKindError_1; |
| 63 |
private static final String BUILD_KIND_ERROR= AntLaunchConfigurationMessages.AntBuilderTargetsTab_buildKindError_2; |
| 62 |
|
64 |
|
| 63 |
private SelectionListener fSelectionListener= new SelectionAdapter() { |
65 |
private SelectionListener fSelectionListener= new SelectionAdapter() { |
| 64 |
/* (non-Javadoc) |
66 |
/* (non-Javadoc) |
|
Lines 333-336
Link Here
|
| 333 |
public Image getImage() { |
335 |
public Image getImage() { |
| 334 |
return AntUIImages.getImage(IAntUIConstants.IMG_TAB_ANT_TARGETS); |
336 |
return AntUIImages.getImage(IAntUIConstants.IMG_TAB_ANT_TARGETS); |
| 335 |
} |
337 |
} |
|
|
338 |
|
| 339 |
/* |
| 340 |
* (non-Javadoc) |
| 341 |
* |
| 342 |
* @see |
| 343 |
* org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug |
| 344 |
* .core.ILaunchConfiguration) |
| 345 |
*/ |
| 346 |
public boolean isValid(ILaunchConfiguration launchConfig) { |
| 347 |
setErrorMessage(null); |
| 348 |
setMessage(null); |
| 349 |
|
| 350 |
// configuration is invalid if we set targets for incremental build kind |
| 351 |
// without setting any target for full build |
| 352 |
if ((!fManualBuildTargetText.getText().equals(NOT_ENABLED)) |
| 353 |
|| (!fAutoBuildTargetText.getText().equals(NOT_ENABLED))) { |
| 354 |
if (fAfterCleanTargetText.getText().equals(NOT_ENABLED)) { |
| 355 |
setErrorMessage(BUILD_KIND_ERROR); |
| 356 |
return false; |
| 357 |
} |
| 358 |
} |
| 359 |
|
| 360 |
// configuration is invalid if we do not set any target for any build |
| 361 |
// kind |
| 362 |
if (fAfterCleanTargetText.getText().equals(NOT_ENABLED) |
| 363 |
&& fManualBuildTargetText.getText().equals(NOT_ENABLED) |
| 364 |
&& fAutoBuildTargetText.getText().equals(NOT_ENABLED) |
| 365 |
&& fDuringCleanTargetText.getText().equals(NOT_ENABLED)) { |
| 366 |
setErrorMessage(NO_BUILD_KIND_ERROR); |
| 367 |
return false; |
| 368 |
} |
| 369 |
|
| 370 |
return true; |
| 371 |
} |
| 372 |
|
| 373 |
/* |
| 374 |
* (non-Javadoc) |
| 375 |
* |
| 376 |
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#canSave() |
| 377 |
*/ |
| 378 |
public boolean canSave() { |
| 379 |
return isValid(null); |
| 380 |
} |
| 381 |
|
| 382 |
/* (non-Javadoc) |
| 383 |
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) |
| 384 |
*/ |
| 385 |
public void activated(ILaunchConfigurationWorkingCopy workingCopy) { |
| 386 |
// do nothing on activation |
| 387 |
} |
| 336 |
} |
388 |
} |