Skip to content

Commit

Permalink
TEIIDDEs-1528
Browse files Browse the repository at this point in the history
 - fixed core arg check in ModelNameChecker
 - added initialized check in GenerateXsdWizardOptionsPage to prevent validating fields before page is fully initialized.
  • Loading branch information
blafond committed Nov 1, 2012
1 parent 58a870e commit 1b39cdc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private static String getString( final String id , final String param) {
*/
public ModelNameChecker(String modelName, String fileExtension, IContainer targetContainer, int flags) {
super();
CoreArgCheck.isNotNull(fileExtension, "modelName"); //$NON-NLS-1$
CoreArgCheck.isNotNull(modelName, "modelName"); //$NON-NLS-1$
CoreArgCheck.isNotNull(fileExtension, "fileExtension"); //$NON-NLS-1$

setFlags(flags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public class GenerateXsdWizardOptionslPage extends WizardPage
private ISelection selection;

private IContainer folder;

private boolean initializing = false;

/**
* Constructor for NewModelWizardSpecifyModelPage
Expand Down Expand Up @@ -332,6 +334,7 @@ void handleGenInputButton() {
* building.
*/
private void initialize() {
initializing = true;
roots = new LinkedHashSet();
if (SelectionUtilities.isEmptySelection(selection)) {
return;
Expand Down Expand Up @@ -404,6 +407,8 @@ private void initialize() {
processRootObject(selections.next(), true);
}// end while
}// end else

initializing = false;
}

/**
Expand Down Expand Up @@ -574,6 +579,10 @@ private boolean isRelationalModel( Resource rsrc ) {
* must select at least one of genOut or genInput
*/
void checkStatus() {
if( initializing ) {
return;
}

boolean hasWarnings = false;
if (!unsavedResources.isEmpty()) {
setErrorMessage(Util.getString("GenerateXsdWizard.unsavedModels")); //$NON-NLS-1$
Expand Down

0 comments on commit 1b39cdc

Please sign in to comment.