|
Lines 24-31
Link Here
|
| 24 |
import org.eclipse.jdt.core.JavaModelException; |
24 |
import org.eclipse.jdt.core.JavaModelException; |
| 25 |
import org.eclipse.jdt.core.search.IJavaSearchScope; |
25 |
import org.eclipse.jdt.core.search.IJavaSearchScope; |
| 26 |
import org.eclipse.jdt.core.JavaCore; |
26 |
import org.eclipse.jdt.core.JavaCore; |
|
|
27 |
import org.eclipse.jface.bindings.keys.KeyStroke; |
| 28 |
import org.eclipse.jface.bindings.keys.ParseException; |
| 27 |
import org.eclipse.jface.dialogs.Dialog; |
29 |
import org.eclipse.jface.dialogs.Dialog; |
| 28 |
import org.eclipse.jface.dialogs.IDialogConstants; |
30 |
import org.eclipse.jface.dialogs.IDialogConstants; |
|
|
31 |
import org.eclipse.jface.fieldassist.ContentProposalAdapter; |
| 32 |
import org.eclipse.jface.fieldassist.IContentProposalProvider; |
| 33 |
import org.eclipse.jface.fieldassist.SimpleContentProposalProvider; |
| 34 |
import org.eclipse.jface.fieldassist.TextContentAdapter; |
| 29 |
import org.eclipse.jface.viewers.CheckStateChangedEvent; |
35 |
import org.eclipse.jface.viewers.CheckStateChangedEvent; |
| 30 |
import org.eclipse.jface.viewers.CheckboxTableViewer; |
36 |
import org.eclipse.jface.viewers.CheckboxTableViewer; |
| 31 |
import org.eclipse.jface.viewers.DoubleClickEvent; |
37 |
import org.eclipse.jface.viewers.DoubleClickEvent; |
|
Lines 59-71
Link Here
|
| 59 |
import org.eclipse.swt.layout.GridData; |
65 |
import org.eclipse.swt.layout.GridData; |
| 60 |
import org.eclipse.swt.layout.GridLayout; |
66 |
import org.eclipse.swt.layout.GridLayout; |
| 61 |
import org.eclipse.swt.widgets.Button; |
67 |
import org.eclipse.swt.widgets.Button; |
| 62 |
import org.eclipse.swt.widgets.Combo; |
|
|
| 63 |
import org.eclipse.swt.widgets.Composite; |
68 |
import org.eclipse.swt.widgets.Composite; |
| 64 |
import org.eclipse.swt.widgets.Control; |
69 |
import org.eclipse.swt.widgets.Control; |
| 65 |
import org.eclipse.swt.widgets.Label; |
70 |
import org.eclipse.swt.widgets.Label; |
| 66 |
import org.eclipse.swt.widgets.Shell; |
71 |
import org.eclipse.swt.widgets.Shell; |
| 67 |
import org.eclipse.swt.widgets.Table; |
72 |
import org.eclipse.swt.widgets.Table; |
| 68 |
import org.eclipse.swt.widgets.TableColumn; |
73 |
import org.eclipse.swt.widgets.TableColumn; |
|
|
74 |
import org.eclipse.swt.widgets.TableItem; |
| 69 |
import org.eclipse.swt.widgets.Text; |
75 |
import org.eclipse.swt.widgets.Text; |
| 70 |
import org.eclipse.ui.dialogs.SelectionDialog; |
76 |
import org.eclipse.ui.dialogs.SelectionDialog; |
| 71 |
import org.eclipse.wst.common.frameworks.datamodel.IDataModel; |
77 |
import org.eclipse.wst.common.frameworks.datamodel.IDataModel; |
|
Lines 81-93
Link Here
|
| 81 |
/** |
87 |
/** |
| 82 |
* The possible entity types, mentioned in the specification (Chapter 2.1.1 Persistent Fields and Properties p.20) |
88 |
* The possible entity types, mentioned in the specification (Chapter 2.1.1 Persistent Fields and Properties p.20) |
| 83 |
*/ |
89 |
*/ |
| 84 |
protected final static String[] VALID_TYPES = {"int", "long", "short", "char", "boolean", "byte", "double", "float", "java.lang.String", |
90 |
protected final static String[] VALID_TYPES = {"int", |
| 85 |
"byte[]", "char[]", "java.lang.Byte[]", "java.lang.Character[]", "java.math.BigDecimal", "java.math.BigInteger", "java.sql.Date", "java.sql.Time", "java.sql.Timestamp", |
91 |
"long", |
| 86 |
"java.util.Date", "java.util.Calendar"}; |
92 |
"short", |
|
|
93 |
"char", |
| 94 |
"boolean", |
| 95 |
"byte", |
| 96 |
"double", |
| 97 |
"float", |
| 98 |
"java.lang.String", |
| 99 |
"java.lang.Integer", |
| 100 |
"java.lang.Long", |
| 101 |
"java.lang.Short", |
| 102 |
"java.lang.Character", |
| 103 |
"java.lang.Boolean", |
| 104 |
"java.lang.Byte", |
| 105 |
"java.lang.Double", |
| 106 |
"java.lang.Float", |
| 107 |
"java.math.BigDecimal", |
| 108 |
"java.math.BigInteger", |
| 109 |
"java.util.Date", |
| 110 |
"java.util.Calendar", |
| 111 |
"java.sql.Date", |
| 112 |
"java.sql.Time", |
| 113 |
"java.sql.Timestamp", |
| 114 |
"String", |
| 115 |
"Integer", |
| 116 |
"Long", |
| 117 |
"Short", |
| 118 |
"Character", |
| 119 |
"Boolean", |
| 120 |
"Byte", |
| 121 |
"Double", |
| 122 |
"Float" }; |
| 87 |
|
123 |
|
| 88 |
private CheckboxTableViewer mTableViewer = null; |
124 |
private CheckboxTableViewer mTableViewer = null; |
| 89 |
private Table mTableWidget = null; |
125 |
private Table mTableWidget = null; |
| 90 |
private final int PK_COLUMN = 0; |
|
|
| 91 |
private final int NAME_COLUMN = 1; |
126 |
private final int NAME_COLUMN = 1; |
| 92 |
private final int TYPE_COLUMN = 2; |
127 |
private final int TYPE_COLUMN = 2; |
| 93 |
|
128 |
|
|
Lines 98-109
Link Here
|
| 98 |
private Button editButton; |
133 |
private Button editButton; |
| 99 |
private Button removeButton; |
134 |
private Button removeButton; |
| 100 |
private String title = EntityWizardMsg.ENTITY_FIELDS_DIALOG_TITLE; |
135 |
private String title = EntityWizardMsg.ENTITY_FIELDS_DIALOG_TITLE; |
| 101 |
private String[] labelsForCombo = VALID_TYPES; |
136 |
private String[] typeProposals = VALID_TYPES; |
| 102 |
private String[] labelsForText = new String[]{EntityWizardMsg.TYPE_TEXT_FIELD, EntityWizardMsg.NAME_TEXT_FIELD}; |
137 |
private String[] labelsForText = new String[]{EntityWizardMsg.TYPE_TEXT_FIELD, EntityWizardMsg.NAME_TEXT_FIELD}; |
| 103 |
private IDataModel model; |
138 |
private IDataModel model; |
| 104 |
private String propertyName; |
139 |
private String propertyName; |
| 105 |
private Image labelProviderImage = null; |
140 |
private Image labelProviderImage = null; |
| 106 |
private DialogCallback callback; |
141 |
private DialogCallback callback; |
|
|
142 |
private static KeyStroke ks = null; |
| 143 |
static { |
| 144 |
try { |
| 145 |
ks = KeyStroke.getInstance("Ctrl+Space"); |
| 146 |
} catch (ParseException e1) { |
| 147 |
JptUiPlugin.log(e1); |
| 148 |
} |
| 149 |
} |
| 107 |
|
150 |
|
| 108 |
|
151 |
|
| 109 |
/** |
152 |
/** |
|
Lines 261-276
Link Here
|
| 261 |
* add new entity field |
304 |
* add new entity field |
| 262 |
*/ |
305 |
*/ |
| 263 |
private void handleAddButtonSelected() { |
306 |
private void handleAddButtonSelected() { |
| 264 |
AddFieldDialog dialog = new AddFieldDialog(getShell(), title, labelsForCombo, labelsForText); |
307 |
AddFieldDialog dialog = new AddFieldDialog(getShell(), title, typeProposals, labelsForText); |
| 265 |
int result = dialog.open(); |
308 |
int result = dialog.open(); |
| 266 |
if (result == Window.CANCEL) { |
309 |
if (result == Window.CANCEL) { |
| 267 |
return; |
310 |
return; |
| 268 |
} |
311 |
} |
| 269 |
EntityRow entityRow = dialog.getEntityRow(); |
312 |
EntityRow entityRow = dialog.getEntityRow(); |
| 270 |
addEntityRow(entityRow); |
313 |
addEntityRow(entityRow); |
|
|
314 |
/* |
| 271 |
if (!entityRow.couldBeKey()) { |
315 |
if (!entityRow.couldBeKey()) { |
| 272 |
mTableViewer.setGrayed(entityRow, true); |
316 |
mTableViewer.setGrayed(entityRow, true); |
| 273 |
} |
317 |
} |
|
|
318 |
*/ |
| 274 |
} |
319 |
} |
| 275 |
|
320 |
|
| 276 |
/** |
321 |
/** |
|
Lines 305-322
Link Here
|
| 305 |
int index = mTableWidget.getSelectionIndex(); |
350 |
int index = mTableWidget.getSelectionIndex(); |
| 306 |
boolean isChecked = mTableViewer.getChecked(entityForEdit); |
351 |
boolean isChecked = mTableViewer.getChecked(entityForEdit); |
| 307 |
|
352 |
|
| 308 |
EditFieldDialog dialog = new EditFieldDialog(getShell(), title, labelsForCombo, labelsForText, entityForEdit); |
353 |
EditFieldDialog dialog = new EditFieldDialog(getShell(), title, typeProposals, labelsForText, entityForEdit); |
| 309 |
dialog.open(); |
354 |
dialog.open(); |
| 310 |
EntityRow entityRow = dialog.getEntityRow(); |
355 |
EntityRow entityRow = dialog.getEntityRow(); |
| 311 |
if (entityRow != null) { |
356 |
if (entityRow != null) { |
| 312 |
editEntityRow(index, entityRow); |
357 |
editEntityRow(index, entityRow); |
| 313 |
mTableViewer.setChecked(entityRow, isChecked); |
358 |
mTableViewer.setChecked(entityRow, isChecked); |
| 314 |
if (!entityRow.couldBeKey()) { |
359 |
// if (!entityRow.couldBeKey()) { |
| 315 |
mTableViewer.setChecked(entityRow, false); |
360 |
// mTableViewer.setChecked(entityRow, false); |
| 316 |
mTableViewer.setGrayed(entityRow, true); |
361 |
// mTableViewer.setGrayed(entityRow, true); |
| 317 |
} else { |
362 |
// } else { |
| 318 |
mTableViewer.setGrayed(entityRow, false); |
363 |
mTableViewer.setGrayed(entityRow, false); |
| 319 |
} |
364 |
// } |
| 320 |
} |
365 |
} |
| 321 |
} |
366 |
} |
| 322 |
|
367 |
|
|
Lines 425-433
Link Here
|
| 425 |
if (columnIndex == TYPE_COLUMN) { |
470 |
if (columnIndex == TYPE_COLUMN) { |
| 426 |
return entity.getFqnTypeName(); |
471 |
return entity.getFqnTypeName(); |
| 427 |
} |
472 |
} |
| 428 |
if (entity.couldBeKey()) { |
473 |
// if (entity.couldBeKey()) { |
| 429 |
mTableViewer.setChecked(entity, entity.isKey()); |
474 |
mTableViewer.setChecked(entity, entity.isKey()); |
| 430 |
} |
475 |
// } |
| 431 |
return ""; |
476 |
return ""; |
| 432 |
} |
477 |
} |
| 433 |
|
478 |
|
|
Lines 454-470
Link Here
|
| 454 |
private class PKFieldCheckStateListener implements ICheckStateListener { |
499 |
private class PKFieldCheckStateListener implements ICheckStateListener { |
| 455 |
|
500 |
|
| 456 |
public void checkStateChanged(CheckStateChangedEvent event) { |
501 |
public void checkStateChanged(CheckStateChangedEvent event) { |
| 457 |
Object[] checkedElements = mTableViewer.getCheckedElements(); |
|
|
| 458 |
List<String> pkFields = new ArrayList<String>(); |
502 |
List<String> pkFields = new ArrayList<String>(); |
| 459 |
for (Object object : checkedElements) { |
503 |
TableItem[] children = mTableViewer.getTable().getItems(); |
| 460 |
EntityRow entity = (EntityRow)object; |
504 |
for (int i = 0; i < children.length; i++) { |
| 461 |
if (entity.couldBeKey()) { |
505 |
TableItem item = children[i]; |
| 462 |
pkFields.add(entity.getName()); |
506 |
EntityRow entityRow = (EntityRow)item.getData(); |
| 463 |
} else { |
507 |
entityRow.setKey(item.getChecked()); |
| 464 |
mTableViewer.setChecked(entity, false); |
508 |
if (item.getChecked()) |
| 465 |
} |
509 |
pkFields.add(entityRow.getName()); |
| 466 |
} |
510 |
} |
| 467 |
model.setProperty(IEntityDataModelProperties.PK_FIELDS, pkFields); |
511 |
model.setProperty(IEntityDataModelProperties.PK_FIELDS, pkFields); |
| 468 |
} |
512 |
} |
| 469 |
|
513 |
|
| 470 |
} |
514 |
} |
|
Lines 485-491
Link Here
|
| 485 |
* @return <code>true</code> if the values in the text fields are |
529 |
* @return <code>true</code> if the values in the text fields are |
| 486 |
* valid, <code>false</code> otherwise. |
530 |
* valid, <code>false</code> otherwise. |
| 487 |
*/ |
531 |
*/ |
| 488 |
public boolean validate(Combo combo, Text[] texts); |
532 |
public boolean validate(Text type, Text[] texts); |
| 489 |
|
533 |
|
| 490 |
/** |
534 |
/** |
| 491 |
* Retrieves the entity presentation object from the fields of the dialog. |
535 |
* Retrieves the entity presentation object from the fields of the dialog. |
|
Lines 497-503
Link Here
|
| 497 |
* @param texts the name of the entity field |
541 |
* @param texts the name of the entity field |
| 498 |
* @return the entity presentation object retrieved from the dialog |
542 |
* @return the entity presentation object retrieved from the dialog |
| 499 |
*/ |
543 |
*/ |
| 500 |
public EntityRow retrieveResultStrings(Combo combo, Text[] texts); |
544 |
public EntityRow retrieveResultStrings(Text type, Text[] texts); |
| 501 |
|
545 |
|
| 502 |
} |
546 |
} |
| 503 |
|
547 |
|
|
Lines 510-516
Link Here
|
| 510 |
/** |
554 |
/** |
| 511 |
* The first text field should not be empty. |
555 |
* The first text field should not be empty. |
| 512 |
*/ |
556 |
*/ |
| 513 |
public boolean validate(Combo combo, Text[] texts) { |
557 |
public boolean validate(Text type, Text[] texts) { |
| 514 |
if (texts.length > 0) { |
558 |
if (texts.length > 0) { |
| 515 |
IStatus validateFieldNameStatus = JavaConventions |
559 |
IStatus validateFieldNameStatus = JavaConventions |
| 516 |
.validateFieldName(texts[0].getText(), |
560 |
.validateFieldName(texts[0].getText(), |
|
Lines 520-526
Link Here
|
| 520 |
return false; |
564 |
return false; |
| 521 |
} |
565 |
} |
| 522 |
} |
566 |
} |
| 523 |
if (combo.getText().equals("")) { |
567 |
if (type.getText().equals("")) { |
| 524 |
return false; |
568 |
return false; |
| 525 |
} |
569 |
} |
| 526 |
return true; |
570 |
return true; |
|
Lines 531-539
Link Here
|
| 531 |
* entity field presentation |
575 |
* entity field presentation |
| 532 |
* @see org.eclipse.jpt.ui.internal.wizards.entity.data.model.EntityRow |
576 |
* @see org.eclipse.jpt.ui.internal.wizards.entity.data.model.EntityRow |
| 533 |
*/ |
577 |
*/ |
| 534 |
public EntityRow retrieveResultStrings(Combo combo, Text[] texts) { |
578 |
public EntityRow retrieveResultStrings(Text type, Text[] texts) { |
| 535 |
EntityRow entity = new EntityRow(); |
579 |
EntityRow entity = new EntityRow(); |
| 536 |
entity.setFqnTypeName(combo.getText()); |
580 |
entity.setFqnTypeName(type.getText()); |
| 537 |
entity.setName(texts[0].getText()); |
581 |
entity.setName(texts[0].getText()); |
| 538 |
return entity; |
582 |
return entity; |
| 539 |
} |
583 |
} |
|
Lines 546-568
Link Here
|
| 546 |
*/ |
590 |
*/ |
| 547 |
private class AddFieldDialog extends Dialog implements ModifyListener, SelectionListener { |
591 |
private class AddFieldDialog extends Dialog implements ModifyListener, SelectionListener { |
| 548 |
protected String windowTitle; |
592 |
protected String windowTitle; |
| 549 |
protected String[] labelsForCombo; |
593 |
protected String[] typeProposals; |
| 550 |
protected String[] labelsForText; |
594 |
protected String[] labelsForText; |
| 551 |
protected Text[] texts; |
595 |
protected Text[] texts; |
| 552 |
protected EntityRow entityRow; |
596 |
protected EntityRow entityRow; |
| 553 |
protected Combo combo; |
597 |
protected Text attributeType; |
|
|
598 |
protected ContentProposalAdapter contentProposalAdapter; |
| 554 |
|
599 |
|
| 555 |
/** |
600 |
/** |
| 556 |
* Constructs AddFieldDialog |
601 |
* Constructs AddFieldDialog |
| 557 |
* @param shell |
602 |
* @param shell |
| 558 |
* @param windowTitle dialog label |
603 |
* @param windowTitle dialog label |
| 559 |
* @param labelsForCombo the elements for the combo |
604 |
* @param typeProposals the elements for the combo |
| 560 |
* @param labelsForText name text |
605 |
* @param labelsForText name text |
| 561 |
*/ |
606 |
*/ |
| 562 |
public AddFieldDialog(Shell shell, String windowTitle, String[] labelsForCombo, String[] labelsForText) { |
607 |
public AddFieldDialog(Shell shell, String windowTitle, String[] typeProposals, String[] labelsForText) { |
| 563 |
super(shell); |
608 |
super(shell); |
| 564 |
this.windowTitle = windowTitle; |
609 |
this.windowTitle = windowTitle; |
| 565 |
this.labelsForCombo = labelsForCombo; |
610 |
this.typeProposals = typeProposals; |
| 566 |
this.labelsForText = labelsForText; |
611 |
this.labelsForText = labelsForText; |
| 567 |
} |
612 |
} |
| 568 |
|
613 |
|
|
Lines 589-599
Link Here
|
| 589 |
label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); |
634 |
label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); |
| 590 |
|
635 |
|
| 591 |
|
636 |
|
| 592 |
combo = new Combo(composite, SWT.SINGLE | SWT.BORDER);// | SWT.READ_ONLY); |
637 |
attributeType = new Text(composite, SWT.SINGLE | SWT.BORDER);// | SWT.READ_ONLY); |
| 593 |
combo.setItems(labelsForCombo); |
638 |
//combo.setItems(labelsForCombo); |
| 594 |
data = new GridData(GridData.FILL_HORIZONTAL); |
639 |
data = new GridData(GridData.FILL_HORIZONTAL); |
| 595 |
data.horizontalSpan = 2; |
640 |
data.horizontalSpan = 2; |
| 596 |
combo.setLayoutData(data); |
641 |
attributeType.setLayoutData(data); |
| 597 |
|
642 |
|
| 598 |
Button browseButton = new Button(composite, SWT.PUSH); |
643 |
Button browseButton = new Button(composite, SWT.PUSH); |
| 599 |
browseButton.setText(EntityWizardMsg.BROWSE_BUTTON_LABEL); |
644 |
browseButton.setText(EntityWizardMsg.BROWSE_BUTTON_LABEL); |
|
Lines 618-631
Link Here
|
| 618 |
labelI.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); |
663 |
labelI.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); |
| 619 |
texts[i-1] = new Text(composite, SWT.SINGLE | SWT.BORDER); |
664 |
texts[i-1] = new Text(composite, SWT.SINGLE | SWT.BORDER); |
| 620 |
data = new GridData(GridData.FILL_HORIZONTAL); |
665 |
data = new GridData(GridData.FILL_HORIZONTAL); |
| 621 |
data.widthHint = 100; |
666 |
data.horizontalSpan = 2; |
| 622 |
texts[i-1].setLayoutData(data); |
667 |
texts[i-1].setLayoutData(data); |
| 623 |
} |
668 |
} |
| 624 |
|
669 |
|
| 625 |
combo.setFocus(); |
670 |
attributeType.setFocus(); |
| 626 |
Dialog.applyDialogFont(parent); |
671 |
Dialog.applyDialogFont(parent); |
|
|
672 |
createContentProposalProvider(); |
| 627 |
return composite; |
673 |
return composite; |
| 628 |
} |
674 |
} |
|
|
675 |
|
| 676 |
private IContentProposalProvider createContentProposalProvider() { |
| 677 |
SimpleContentProposalProvider contProvider = new SimpleContentProposalProvider(typeProposals); |
| 678 |
contProvider.setFiltering(true); |
| 679 |
|
| 680 |
contentProposalAdapter = new ContentProposalAdapter( |
| 681 |
attributeType, |
| 682 |
new TextContentAdapter(), |
| 683 |
contProvider, |
| 684 |
ks, |
| 685 |
new char[] {'b', 'c', 'd', 'i', 'f', 'l', 's', 'j', 'B', 'C', 'D', 'F', 'S', 'L', 'I'}); |
| 686 |
contentProposalAdapter.setEnabled(true); |
| 687 |
contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); |
| 688 |
return contProvider; |
| 689 |
} |
| 690 |
|
| 629 |
|
691 |
|
| 630 |
/** |
692 |
/** |
| 631 |
* Process browsing when the Browse... button have been pressed. Allow adding of entity field |
693 |
* Process browsing when the Browse... button have been pressed. Allow adding of entity field |
|
Lines 670-676
Link Here
|
| 670 |
if (type != null) { |
732 |
if (type != null) { |
| 671 |
superclassFullPath = type.getFullyQualifiedName(); |
733 |
superclassFullPath = type.getFullyQualifiedName(); |
| 672 |
} |
734 |
} |
| 673 |
combo.setText(superclassFullPath); |
735 |
attributeType.setText(superclassFullPath); |
| 674 |
//getControl().setCursor(null); |
736 |
//getControl().setCursor(null); |
| 675 |
return; |
737 |
return; |
| 676 |
} |
738 |
} |
|
Lines 685-692
Link Here
|
| 685 |
protected Control createContents(Composite parent) { |
747 |
protected Control createContents(Composite parent) { |
| 686 |
Composite composite = (Composite) super.createContents(parent); |
748 |
Composite composite = (Composite) super.createContents(parent); |
| 687 |
|
749 |
|
| 688 |
combo.addSelectionListener(this); |
750 |
attributeType.addSelectionListener(this); |
| 689 |
combo.addModifyListener(this); |
751 |
attributeType.addModifyListener(this); |
| 690 |
for (int i = 0; i < texts.length; i++) { |
752 |
for (int i = 0; i < texts.length; i++) { |
| 691 |
texts[i].addModifyListener(this); |
753 |
texts[i].addModifyListener(this); |
| 692 |
} |
754 |
} |
|
Lines 701-707
Link Here
|
| 701 |
*/ |
763 |
*/ |
| 702 |
@Override |
764 |
@Override |
| 703 |
protected void okPressed() { |
765 |
protected void okPressed() { |
| 704 |
entityRow = callback.retrieveResultStrings(combo, texts); |
766 |
entityRow = callback.retrieveResultStrings(attributeType, texts); |
| 705 |
super.okPressed(); |
767 |
super.okPressed(); |
| 706 |
} |
768 |
} |
| 707 |
|
769 |
|
|
Lines 724-730
Link Here
|
| 724 |
* @see DialogCallback |
786 |
* @see DialogCallback |
| 725 |
*/ |
787 |
*/ |
| 726 |
private void updateOKButton() { |
788 |
private void updateOKButton() { |
| 727 |
getButton(IDialogConstants.OK_ID).setEnabled(callback.validate(combo, texts)); |
789 |
getButton(IDialogConstants.OK_ID).setEnabled(callback.validate(attributeType, texts)); |
| 728 |
} |
790 |
} |
| 729 |
/* (non-Javadoc) |
791 |
/* (non-Javadoc) |
| 730 |
* @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) |
792 |
* @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) |
|
Lines 762-768
Link Here
|
| 762 |
|
824 |
|
| 763 |
Composite composite = (Composite) super.createDialogArea(parent); |
825 |
Composite composite = (Composite) super.createDialogArea(parent); |
| 764 |
|
826 |
|
| 765 |
combo.setText(entityRow.getFqnTypeName()); |
827 |
attributeType.setText(entityRow.getFqnTypeName()); |
| 766 |
texts[0].setText(entityRow.getName()); |
828 |
texts[0].setText(entityRow.getName()); |
| 767 |
|
829 |
|
| 768 |
return composite; |
830 |
return composite; |