Index: CodeGenerationSettingsTab.java =================================================================== --- CodeGenerationSettingsTab.java (revision 28698) +++ CodeGenerationSettingsTab.java (working copy) @@ -93,6 +93,11 @@ private DirectoryBrowseField templatedir; private SelectionButtonDialogField useExternalProcess; + + /** + * The field is used to simulate warning message: the error which doesn't prevent launch configuration from to be executed. + */ + private String warning = null; public CodeGenerationSettingsTab() { super(); @@ -284,6 +289,7 @@ private void dialogChanged() { + setWarning(null); boolean configSelected = getConfigurationName().length()==0; outputdir.setEnabled(!configSelected); reverseengineer.setEnabled(!configSelected); @@ -310,11 +316,13 @@ } if(packageName.isEnabled() && getOutputPackage().length()>0) { - IStatus val= JavaConventions.validatePackageName(getOutputPackage() ); - if (val.getSeverity() == IStatus.ERROR || val.getSeverity() == IStatus.WARNING) { + IStatus val = JavaConventions.validatePackageName(getOutputPackage() ); + if (val.getSeverity() == IStatus.ERROR) { updateStatus(val.getMessage() ); return; - } + } else if (val.getSeverity() == IStatus.WARNING){ + setWarning(val.getMessage()); + } } if(reverseEngineeringSettings.isEnabled() && reverseEngineeringSettings.getText().trim().length()>0) { @@ -378,9 +386,27 @@ return NLS.bind(HibernateConsoleMessages.CodeGenerationSettingsTab_does_not_exist, name); } } + + + public void setWarning(String warning){ + this.warning = warning; + } + + public String getWarning(){ + return this.warning; + } + + /* (non-Javadoc) + * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getErrorMessage() + */ + @Override + public String getErrorMessage() { + String error = super.getErrorMessage(); + return (error == null) ? getWarning() : error; + } public boolean isValid(ILaunchConfiguration launchConfig) { - if (getErrorMessage() == null) { + if (super.getErrorMessage() == null) { return true; } return false;