Skip to content

Commit

Permalink
TEIIDDES-1670 removed the "Set Description..." checkbox because diffe…
Browse files Browse the repository at this point in the history
…rence logic for descriptions is wrong.

Need to assess scope of potential fix and when to fix
  • Loading branch information
blafond committed May 6, 2013
1 parent 07da26b commit eaf040b
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class DdlImporterPage extends WizardPage implements IPersistentWizardPage {
private static final List<ModelType> MODEL_TYPES = Arrays.asList(ModelType.PHYSICAL_LITERAL, ModelType.VIRTUAL_LITERAL);
private static final String DDL_FILE_CONTENTS_SHOWN_SETTING = "ddlFileContentsShown"; //$NON-NLS-1$
private static final String OPT_TO_CREATE_MODEL_ENTITIES_FOR_UNSUPPORTED_DDL_SETTING = "optToCreateModelEntitiesForUnsupportedDdl"; //$NON-NLS-1$
private static final String OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_SETTING = "optToSetModelEntityDescription"; //$NON-NLS-1$
// private static final String OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_SETTING = "optToSetModelEntityDescription"; //$NON-NLS-1$

private final DdlImporter importer;
final IProject[] projects;
Expand All @@ -90,7 +90,7 @@ class DdlImporterPage extends WizardPage implements IPersistentWizardPage {
private Text modelFolderFld;
private Text modelNameFld;
private Combo modelTypeCombo;
private Button optToSetModelEntityDescriptionCheckBox;
//private Button optToSetModelEntityDescriptionCheckBox;
private Button optToCreateModelEntitiesForUnsupportedDdlCheckBox;
private ExpandBar ddlFileContentsExpanderBar;
private ExpandItem ddlFileContentsExpander;
Expand Down Expand Up @@ -183,7 +183,7 @@ boolean validFile( final IFile file ) {
if (importer.modelFile() != null) dlg.setInitialSelection(importer.modelFile());
final IPath choice = showChooseDialog(dlg);
if (choice == null) return;
ddlFileCombo.setText(choice.removeFileExtension().lastSegment());
modelNameFld.setText(choice.removeFileExtension().lastSegment());
}

void chooseModelFolder() {
Expand Down Expand Up @@ -336,21 +336,21 @@ public void widgetSelected( final SelectionEvent event ) {
});
modelTypeCombo.select(modelTypeCombo.indexOf(ModelType.PHYSICAL_LITERAL.getDisplayName()));

optToSetModelEntityDescriptionCheckBox = WidgetFactory.createCheckBox(panel,
DdlImporterUiI18n.OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_LABEL,
0,
PANEL_GRID_SPAN,
settings.getBoolean(OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_SETTING));
optToSetModelEntityDescriptionCheckBox.addSelectionListener(new SelectionAdapter() {

@Override
public void widgetSelected( final SelectionEvent event ) {
optToSetModelEntityDescriptionModified();
}
});
// optToSetModelEntityDescriptionCheckBox = WidgetFactory.createCheckBox(panel,
// DdlImporterUiI18n.OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_LABEL,
// 0,
// PANEL_GRID_SPAN,
// settings.getBoolean(OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_SETTING));
// optToSetModelEntityDescriptionCheckBox.addSelectionListener(new SelectionAdapter() {
//
// @Override
// public void widgetSelected( final SelectionEvent event ) {
// optToSetModelEntityDescriptionModified();
// }
// });

// make sure importer has restored setting
optToSetModelEntityDescriptionModified();
// optToSetModelEntityDescriptionModified();

optToCreateModelEntitiesForUnsupportedDdlCheckBox = WidgetFactory.createCheckBox(panel,
DdlImporterUiI18n.OPT_TO_CREATE_MODEL_ENTITIES_FOR_UNSUPPORTED_DDL_LABEL,
Expand Down Expand Up @@ -449,9 +449,9 @@ void optToCreateModelEntitiesForUnsupportedDdlModified() {
importer.setOptToCreateModelEntitiesForUnsupportedDdl(optToCreateModelEntitiesForUnsupportedDdlCheckBox.getSelection());
}

void optToSetModelEntityDescriptionModified() {
importer.setOptToSetModelEntityDescription(optToSetModelEntityDescriptionCheckBox.getSelection());
}
// void optToSetModelEntityDescriptionModified() {
// importer.setOptToSetModelEntityDescription(optToSetModelEntityDescriptionCheckBox.getSelection());
// }

void panelResized() {
if (ddlFileContentsExpander.getExpanded()) sizeDdlFileContents();
Expand Down Expand Up @@ -503,7 +503,7 @@ public void saveSettings() {
}
}
settings.put(DDL_FILE_CONTENTS_SHOWN_SETTING, ddlFileContentsExpander.getExpanded());
settings.put(OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_SETTING, optToSetModelEntityDescriptionCheckBox.getSelection());
// settings.put(OPT_TO_SET_MODEL_ENTITY_DESCRIPTION_SETTING, optToSetModelEntityDescriptionCheckBox.getSelection());
settings.put(OPT_TO_CREATE_MODEL_ENTITIES_FOR_UNSUPPORTED_DDL_SETTING,
optToCreateModelEntitiesForUnsupportedDdlCheckBox.getSelection());
}
Expand Down

0 comments on commit eaf040b

Please sign in to comment.