Skip to content

Commit

Permalink
TEIIDDES-3100
Browse files Browse the repository at this point in the history
 * added suppression of UDF warning dialog except when launching wizard
  • Loading branch information
blafond committed Sep 5, 2017
1 parent cd72033 commit 3734975
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Expand Up @@ -226,7 +226,7 @@ private Composite createDynamicVdbInfoPanel(Composite parent) {
@Override
public void modifyText(final ModifyEvent event) {
vdbManager.setOutputVdbName(dynamicVdbName.getText());
resetDynamicVdb();
resetDynamicVdb(true);
validatePage();
}
});
Expand All @@ -244,7 +244,7 @@ public void modifyText(final ModifyEvent event) {
@Override
public void modifyText(ModifyEvent e) {
vdbManager.setVersion(vdbVersionText.getText());
resetDynamicVdb();
resetDynamicVdb(true);
validatePage();
}
});
Expand All @@ -260,7 +260,7 @@ public void modifyText(ModifyEvent e) {
@Override
public void modifyText(final ModifyEvent event) {
vdbManager.setOutputVdbFileName(dynamicVdbFileName.getText());
resetDynamicVdb();
resetDynamicVdb(true);
validatePage();
}
});
Expand All @@ -281,7 +281,7 @@ private Composite createOptionsPanel(Composite parent) {
@Override
public void widgetSelected(SelectionEvent arg0) {
vdbManager.setExcludeSourceMetadata(excludeSourceDdlButton.getSelection());
resetDynamicVdb();
resetDynamicVdb(true);
validatePage();
}
});
Expand All @@ -303,16 +303,16 @@ public void widgetSelected(SelectionEvent e) {
//
// Reset the dynamic vdb
//
resetDynamicVdb();
resetDynamicVdb(true);
}
});

return thePanel;
}

private void resetDynamicVdb() {
private void resetDynamicVdb(boolean ignoreWarning) {
vdbManager.setDynamicVdb(null);
vdbManager.generate();
vdbManager.generate(ignoreWarning);
try {
refreshXml();
} catch (Exception ex) {
Expand Down Expand Up @@ -468,7 +468,7 @@ private void setXmlEditiable(boolean canEdit) {
}
resetButton.setEnabled(canEdit);
if( !canEdit ) {
vdbManager.generate();
vdbManager.generate(false);
//IStatus status = vdbManager.getStatus();
setXmlContents(getVdbXml());
}
Expand Down Expand Up @@ -669,7 +669,7 @@ protected Control createContents(Composite parent) {
// TODO Auto-generated method stub
Control control = super.createContents(parent);

resetDynamicVdb();
resetDynamicVdb(false);

return control;
}
Expand Down
Expand Up @@ -125,7 +125,7 @@ private void checkDynamicVdbGenerated() throws Exception {
/**
* Generate the dynamic xml from the xmi vdb
*/
public void generate() {
public void generate(final boolean ignoreWarning) {
if (!isGenerateRequired())
return;

Expand Down Expand Up @@ -171,7 +171,7 @@ public void run() {

String title = DqpUiConstants.UTIL.getString("GenerateDynamicVdbManager.generateDynamicVdbStatus");

if( vdbStatus.getSeverity() == IStatus.WARNING ) {
if( vdbStatus.getSeverity() == IStatus.WARNING && !ignoreWarning ) {
ListMessageDialog.openWarning(
UiUtil.getWorkbenchShellOnlyIfUiThread(),
title,
Expand Down
Expand Up @@ -209,7 +209,7 @@ private void createButtonPanel(Composite parent) {
generateXmlButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
vdbManager.generate();
vdbManager.generate(false);
refreshXml();
validatePage();
}
Expand Down
Expand Up @@ -1797,7 +1797,7 @@ public void widgetSelected( final SelectionEvent event ) {
{ // execute VDB button
exportDynamicVdbButton = WidgetFactory.createButton(extraButtonPanel, i18n("saveAsXml"), //$NON-NLS-1$
GridData.HORIZONTAL_ALIGN_BEGINNING);
exportDynamicVdbButton.setToolTipText(i18n("saveAsXmlTooltip"));
exportDynamicVdbButton.setToolTipText(i18n("saveAsXmlTooltip")); //$NON-NLS-1$
exportDynamicVdbButton.addSelectionListener(new SelectionAdapter() {
/**
* {@inheritDoc}
Expand Down

0 comments on commit 3734975

Please sign in to comment.