Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorkmoore2007-05-09 14:50:50 +0000
committerkmoore2007-05-09 14:50:50 +0000
commitef7935e0c50e1233ef629d81a642c4502ed0d641 (patch)
treebf6b454ec0597c7f5bd43962d107fedf6d7394d6 /jpa
parentee40a09158f12dc6e71fb19e37ce4adaec761555 (diff)
downloadwebtools.dali-ef7935e0c50e1233ef629d81a642c4502ed0d641.tar.gz
webtools.dali-ef7935e0c50e1233ef629d81a642c4502ed0d641.tar.xz
webtools.dali-ef7935e0c50e1233ef629d81a642c4502ed0d641.zip
JoinTable panel needed 'join columns' and 'inverse join columns'
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java2
3 files changed, 6 insertions, 24 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java
index 8487b23feb..886e200383 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java
@@ -63,10 +63,11 @@ public class JoinColumnsComposite extends BaseJpaComposite
private Button joinColumnsEditButton;
- public JoinColumnsComposite(Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
+ public JoinColumnsComposite(Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory, String groupTitle) {
super(parent, SWT.NULL, commandStack, widgetFactory);
this.joinColumnsOwnerListener = buildJoinColumnsOwnerListener();
this.joinColumnListener = buildJoinColumnListener();
+ this.joinColumnsGroup.setText(groupTitle);
}
private Adapter buildJoinColumnsOwnerListener() {
@@ -94,7 +95,7 @@ public class JoinColumnsComposite extends BaseJpaComposite
this.joinColumnsGroup =
getWidgetFactory().createGroup(
composite,
- JptUiMappingsMessages.JoinTableComposite_joinColumn);
+ "");
this.joinColumnsGroup.setLayout(new GridLayout(2, false));
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java
index 5bc4b1efab..2cbd1f02ac 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java
@@ -197,7 +197,7 @@ public class JoinTableComposite extends BaseJpaComposite
}
});
- this.joinColumnsComposite = new JoinColumnsComposite(composite, this.commandStack, getWidgetFactory());
+ this.joinColumnsComposite = new JoinColumnsComposite(composite, this.commandStack, getWidgetFactory(), JptUiMappingsMessages.JoinTableComposite_joinColumn);
gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.FILL;
@@ -226,7 +226,7 @@ public class JoinTableComposite extends BaseJpaComposite
}
}
});
- this.inverseJoinColumnsComposite = new JoinColumnsComposite(composite, this.commandStack, getWidgetFactory());
+ this.inverseJoinColumnsComposite = new JoinColumnsComposite(composite, this.commandStack, getWidgetFactory(), JptUiMappingsMessages.JoinTableComposite_inverseJoinColumn);
gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.FILL;
@@ -236,25 +236,6 @@ public class JoinTableComposite extends BaseJpaComposite
this.inverseJoinColumnsComposite.getControl().setLayoutData(gridData);
}
- private String buildDefaultJoinColumnLabel(IJoinColumn joinColumn) {
- return NLS.bind(JptUiMappingsMessages.JoinTableComposite_mappingBetweenTwoParamsDefault, joinColumn.getName(), joinColumn.getReferencedColumnName());
- }
-
- private String buildJoinColumnLabel(IJoinColumn joinColumn) {
- if (joinColumn.getSpecifiedName() == null) {
- if (joinColumn.getSpecifiedReferencedColumnName() == null) {
- return NLS.bind(JptUiMappingsMessages.JoinTableComposite_mappingBetweenTwoParamsBothDefault, joinColumn.getName(),joinColumn.getReferencedColumnName());
- }
- return NLS.bind(JptUiMappingsMessages.JoinTableComposite_mappingBetweenTwoParamsFirstDefault, joinColumn.getName(), joinColumn.getReferencedColumnName());
- }
- else if (joinColumn.getSpecifiedReferencedColumnName() == null) {
- return NLS.bind(JptUiMappingsMessages.JoinTableComposite_mappingBetweenTwoParamsSecDefault, joinColumn.getName(), joinColumn.getReferencedColumnName());
- }
- else {
- return NLS.bind(JptUiMappingsMessages.JoinTableComposite_mappingBetweenTwoParams, joinColumn.getName(), joinColumn.getReferencedColumnName());
- }
- }
-
void addJoinColumn() {
JoinColumnInJoinTableDialog dialog = new JoinColumnInJoinTableDialog(this.getControl().getShell(), this.joinTable);
this.addJoinColumnFromDialog(dialog);
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java
index ef01e095e1..7bc8967b5d 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java
@@ -131,7 +131,7 @@ public class OverridesComposite extends BaseJpaComposite
gridData.horizontalAlignment = SWT.FILL;
this.overridePageBook.setLayoutData(gridData);
- this.joinColumnsComposite = new JoinColumnsComposite(this.overridePageBook, this.commandStack, getWidgetFactory());
+ this.joinColumnsComposite = new JoinColumnsComposite(this.overridePageBook, this.commandStack, getWidgetFactory(), JptUiMappingsMessages.OverridesComposite_joinColumn);
this.columnComposite = new ColumnComposite(this.overridePageBook, this.commandStack, getWidgetFactory());
this.overridePageBook.showPage(this.joinColumnsComposite.getControl());
}

Back to the top