Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2008-10-29 22:12:58 +0000
committerkmoore2008-10-29 22:12:58 +0000
commitac2beb32b8361eac8310a223822962ec235db906 (patch)
treefc66d8f334aa3037c39f7ea89580c7ad85a82cad
parent293d0a52f69c42643f4998bad630be94993490e9 (diff)
downloadwebtools.dali-ac2beb32b8361eac8310a223822962ec235db906.tar.gz
webtools.dali-ac2beb32b8361eac8310a223822962ec235db906.tar.xz
webtools.dali-ac2beb32b8361eac8310a223822962ec235db906.zip
added UI support for converters on orm entity, embeddabe, mappedsuperclass
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_mappings.properties8
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEmbeddableComposite.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEntityComposite.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmMappedSuperclassComposite.java22
4 files changed, 67 insertions, 26 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_mappings.properties b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_mappings.properties
index 761b352cfe..d581dd2dae 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_mappings.properties
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_mappings.properties
@@ -48,10 +48,10 @@ ConverterComposite_classLabel = Class:
CustomizerComposite_classLabel = Customizer class:
-ConvertersComposite_converter = Converter
-ConvertersComposite_objectTypeConverter = Object type converter
-ConvertersComposite_structConverter = Struct converter
-ConvertersComposite_typeConverter = Type converter
+ConvertersComposite_converter = Custom
+ConvertersComposite_objectTypeConverter = Object type
+ConvertersComposite_structConverter = Struct
+ConvertersComposite_typeConverter = Type
AlwaysRefreshComposite_alwaysRefreshDefault = Always refresh ({0})
AlwaysRefreshComposite_alwaysRefreshLabel = Always refresh
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEmbeddableComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEmbeddableComposite.java
index 3ff2d35acb..8da2b5f24a 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEmbeddableComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEmbeddableComposite.java
@@ -13,6 +13,8 @@ import org.eclipse.jpt.core.context.orm.OrmEmbeddable;
import org.eclipse.jpt.eclipselink.core.context.ChangeTracking;
import org.eclipse.jpt.eclipselink.core.context.Customizer;
import org.eclipse.jpt.eclipselink.core.context.EclipseLinkEmbeddable;
+import org.eclipse.jpt.eclipselink.core.internal.context.orm.ConverterHolder;
+import org.eclipse.jpt.eclipselink.core.internal.context.orm.EclipseLinkOrmEmbeddable;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.ChangeTrackingComposite;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.CustomizerComposite;
@@ -52,29 +54,28 @@ public class EclipseLinkOrmEmbeddableComposite extends FormPane<OrmEmbeddable>
@Override
protected void initializeLayout(Composite container) {
-// initializeConvertersPane(container);
+ initializeConvertersPane(container);
initializeAdvancedPane(container);
}
-//
-// protected void initializeConvertersPane(Composite container) {
-//
-// container = addCollapsableSection(
-// addSubPane(container, 5),
-// EclipseLinkUiMappingsMessages.EclipseLinkTypeMappingComposite_converters
-// );
-//
-// new ConvertersComposite(this, buildConverterHolderValueModel(), container);
-// }
-//
-// protected PropertyValueModel<JavaConverterHolder> buildConverterHolderValueModel() {
-// return new PropertyAspectAdapter<JavaEmbeddable, JavaConverterHolder>(getSubjectHolder()) {
-// @Override
-// protected JavaConverterHolder buildValue_() {
-// return ((EclipseLinkJavaEmbeddable) this.subject).getConverterHolder();
-// }
-// };
-// }
+
+ protected void initializeConvertersPane(Composite container) {
+
+ container = addCollapsableSection(
+ container,
+ EclipseLinkUiMappingsMessages.ConvertersComposite_Label
+ );
+
+ new ConvertersComposite(this, buildConverterHolder(), container);
+ }
+ private PropertyValueModel<ConverterHolder> buildConverterHolder() {
+ return new PropertyAspectAdapter<OrmEmbeddable, ConverterHolder>(getSubjectHolder()) {
+ @Override
+ protected ConverterHolder buildValue_() {
+ return ((EclipseLinkOrmEmbeddable) this.subject).getConverterHolder();
+ }
+ };
+ }
protected void initializeAdvancedPane(Composite container) {
container = addCollapsableSection(
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEntityComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEntityComposite.java
index 11281c95c9..3e83b1a3bd 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEntityComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmEntityComposite.java
@@ -17,6 +17,7 @@ import org.eclipse.jpt.eclipselink.core.context.ChangeTracking;
import org.eclipse.jpt.eclipselink.core.context.Customizer;
import org.eclipse.jpt.eclipselink.core.context.EclipseLinkEntity;
import org.eclipse.jpt.eclipselink.core.context.ReadOnly;
+import org.eclipse.jpt.eclipselink.core.internal.context.orm.ConverterHolder;
import org.eclipse.jpt.eclipselink.core.internal.context.orm.EclipseLinkOrmEntity;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.ChangeTrackingComposite;
@@ -47,7 +48,7 @@ public class EclipseLinkOrmEntityComposite extends AbstractEntityComposite<OrmEn
initializeInheritancePane(container);
initializeAttributeOverridesPane(container);
initializeGeneratorsPane(container);
-// TODO - initializeConvertersPane(container);
+ initializeConvertersPane(container);
initializeSecondaryTablesPane(container);
initializeAdvancedPane(container);
}
@@ -77,6 +78,25 @@ public class EclipseLinkOrmEntityComposite extends AbstractEntityComposite<OrmEn
protected void addSecondaryTablesComposite(Composite container) {
new OrmSecondaryTablesComposite(this, container);
}
+
+ protected void initializeConvertersPane(Composite container) {
+
+ container = addCollapsableSection(
+ container,
+ EclipseLinkUiMappingsMessages.ConvertersComposite_Label
+ );
+
+ new ConvertersComposite(this, buildConverterHolder(), container);
+ }
+
+ private PropertyValueModel<ConverterHolder> buildConverterHolder() {
+ return new PropertyAspectAdapter<OrmEntity, ConverterHolder>(getSubjectHolder()) {
+ @Override
+ protected ConverterHolder buildValue_() {
+ return ((EclipseLinkOrmEntity) this.subject).getConverterHolder();
+ }
+ };
+ }
protected void initializeAdvancedPane(Composite container) {
container = addCollapsableSection(
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmMappedSuperclassComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmMappedSuperclassComposite.java
index 80aaab0c87..5ccf4b506c 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmMappedSuperclassComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmMappedSuperclassComposite.java
@@ -16,6 +16,7 @@ import org.eclipse.jpt.eclipselink.core.context.ChangeTracking;
import org.eclipse.jpt.eclipselink.core.context.Customizer;
import org.eclipse.jpt.eclipselink.core.context.EclipseLinkMappedSuperclass;
import org.eclipse.jpt.eclipselink.core.context.ReadOnly;
+import org.eclipse.jpt.eclipselink.core.internal.context.orm.ConverterHolder;
import org.eclipse.jpt.eclipselink.core.internal.context.orm.EclipseLinkOrmMappedSuperclass;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.ChangeTrackingComposite;
@@ -42,7 +43,7 @@ public class EclipseLinkOrmMappedSuperclassComposite extends FormPane<OrmMappedS
protected void initializeLayout(Composite container) {
new IdClassComposite(this, container);
initializeCachingPane(container);
-// TODO - initializeConvertersPane(container);
+ initializeConvertersPane(container);
initializeAdvancedPane(container);
}
protected void initializeCachingPane(Composite container) {
@@ -65,6 +66,25 @@ public class EclipseLinkOrmMappedSuperclassComposite extends FormPane<OrmMappedS
}
};
}
+
+ protected void initializeConvertersPane(Composite container) {
+
+ container = addCollapsableSection(
+ container,
+ EclipseLinkUiMappingsMessages.ConvertersComposite_Label
+ );
+
+ new ConvertersComposite(this, buildConverterHolder(), container);
+ }
+
+ private PropertyValueModel<ConverterHolder> buildConverterHolder() {
+ return new PropertyAspectAdapter<OrmMappedSuperclass, ConverterHolder>(getSubjectHolder()) {
+ @Override
+ protected ConverterHolder buildValue_() {
+ return ((EclipseLinkOrmMappedSuperclass) this.subject).getConverterHolder();
+ }
+ };
+ }
protected void initializeAdvancedPane(Composite container) {

Back to the top