From 3cba88da3c6c0e7059349f0600942ecdf0acaa2f Mon Sep 17 00:00:00 2001 From: nhauge Date: Tue, 15 Dec 2009 17:11:09 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'v200912150000'. --- .../org.eclipse.jpt.eclipselink.ui/.classpath | 15 - .../org.eclipse.jpt.eclipselink.ui/.cvsignore | 3 - .../org.eclipse.jpt.eclipselink.ui/.project | 28 -- .../.settings/org.eclipse.core.resources.prefs | 3 - .../.settings/org.eclipse.jdt.core.prefs | 7 - .../META-INF/MANIFEST.MF | 48 -- .../org.eclipse.jpt.eclipselink.ui/about.html | 34 -- .../build.properties | 20 - .../plugin.properties | 30 -- .../org.eclipse.jpt.eclipselink.ui/plugin.xml | 113 ----- .../property_files/eclipselink_ui.properties | 336 -------------- .../eclipselink_ui_details.properties | 153 ------- .../jpt/eclipselink/ui/JptEclipseLinkUiPlugin.java | 98 ----- .../ui/internal/EclipseLinkHelpContextIds.java | 57 --- .../ui/internal/EclipseLinkUiMessages.java | 356 --------------- .../internal/ddlgen/EclipseLinkDDLGeneratorUi.java | 167 ------- .../internal/ddlgen/wizards/GenerateDDLWizard.java | 56 --- .../details/EclipseLinkAlwaysRefreshComposite.java | 101 ----- ...EclipseLinkBasicCollectionMappingComposite.java | 45 -- ...ipseLinkBasicCollectionMappingUiDefinition.java | 43 -- .../EclipseLinkBasicMapMappingComposite.java | 45 -- .../EclipseLinkBasicMapMappingUiDefinition.java | 43 -- .../details/EclipseLinkBasicMappingComposite.java | 280 ------------ .../EclipseLinkCacheCoordinationTypeComposite.java | 105 ----- .../details/EclipseLinkCacheSizeComposite.java | 93 ---- .../details/EclipseLinkCacheTypeComposite.java | 105 ----- .../details/EclipseLinkCachingComposite.java | 168 ------- .../EclipseLinkChangeTrackingComposite.java | 107 ----- .../details/EclipseLinkConversionValueDialog.java | 209 --------- .../EclipseLinkConversionValueStateObject.java | 137 ------ .../details/EclipseLinkConvertComposite.java | 362 ---------------- .../EclipseLinkCustomConverterComposite.java | 155 ------- .../details/EclipseLinkCustomizerComposite.java | 104 ----- .../details/EclipseLinkDisableHitsComposite.java | 100 ----- .../EclipseLinkEmbeddableAdvancedComposite.java | 58 --- .../EclipseLinkEntityAdvancedComposite.java | 69 --- .../details/EclipseLinkExpiryComposite.java | 326 -------------- .../details/EclipseLinkIdMappingComposite.java | 185 -------- .../details/EclipseLinkJoinFetchComposite.java | 112 ----- .../EclipseLinkManyToManyMappingComposite.java | 106 ----- .../EclipseLinkManyToOneMappingComposite.java | 131 ------ ...lipseLinkMappedSuperclassAdvancedComposite.java | 69 --- .../details/EclipseLinkMutableComposite.java | 100 ----- .../EclipseLinkObjectTypeConverterComposite.java | 481 --------------------- .../EclipseLinkOneToManyJoiningStrategyPane.java | 51 --- .../EclipseLinkOneToManyMappingComposite.java | 152 ------- .../EclipseLinkOneToOneMappingComposite.java | 103 ----- .../details/EclipseLinkPrivateOwnedComposite.java | 66 --- .../details/EclipseLinkReadOnlyComposite.java | 102 ----- .../EclipseLinkRefreshOnlyIfNewerComposite.java | 102 ----- .../EclipseLinkStructConverterComposite.java | 151 ------- .../EclipseLinkTransformationMappingComposite.java | 45 -- ...lipseLinkTransformationMappingUiDefinition.java | 42 -- .../details/EclipseLinkTypeConverterComposite.java | 198 --------- .../details/EclipseLinkUiDetailsMessages.java | 169 -------- ...clipseLinkVariableOneToOneMappingComposite.java | 45 -- ...pseLinkVariableOneToOneMappingUiDefinition.java | 41 -- .../EclipseLinkVersionMappingComposite.java | 244 ----------- .../AbstractJavaEclipseLinkEntityComposite.java | 123 ------ ...ctJavaEclipseLinkMappedSuperclassComposite.java | 109 ----- ...avaEclipseLinkOneToManyMappingUiDefinition.java | 79 ---- ...JavaEclipseLinkOneToOneMappingUiDefinition.java | 79 ---- ...pseLinkVariableOneToOneMappingUiDefinition.java | 75 ---- .../java/EclipseLinkJavaResourceUiDefinition.java | 97 ----- .../details/java/EclipseLinkJavaUiFactory.java | 160 ------- ...ipseLinkBasicCollectionMappingUiDefinition.java | 52 --- ...JavaEclipseLinkBasicMapMappingUiDefinition.java | 52 --- .../java/JavaEclipseLinkCachingComposite.java | 62 --- .../java/JavaEclipseLinkConvertersComposite.java | 271 ------------ .../java/JavaEclipseLinkEmbeddableComposite.java | 79 ---- .../java/JavaEclipseLinkEntityComposite.java | 43 -- .../JavaEclipseLinkExistenceCheckingComposite.java | 128 ------ .../JavaEclipseLinkMappedSuperclassComposite.java | 42 -- ...lipseLinkTransformationMappingUiDefinition.java | 53 --- ...pseLinkVariableOneToOneMappingUiDefinition.java | 52 --- ...stractEclipseLinkEntityMappingsDetailsPage.java | 164 ------- .../orm/AbstractOrmEclipseLinkEntityComposite.java | 90 ---- ...actOrmEclipseLinkMappedSuperclassComposite.java | 113 ----- .../orm/BaseEclipseLinkOrmXmlUiFactory.java | 132 ------ .../details/orm/EclipseLinkConverterDialog.java | 195 --------- .../orm/EclipseLinkConverterStateObject.java | 125 ------ .../orm/EclipseLinkEntityMappingsDetailsPage.java | 91 ---- .../EclipseLinkEntityMappingsDetailsProvider.java | 64 --- .../details/orm/EclipseLinkOrmXmlUiDefinition.java | 98 ----- .../details/orm/EclipseLinkOrmXmlUiFactory.java | 15 - ...ipseLinkBasicCollectionMappingUiDefinition.java | 52 --- .../OrmEclipseLinkBasicMapMappingUiDefinition.java | 52 --- .../orm/OrmEclipseLinkBasicMappingComposite.java | 44 -- .../orm/OrmEclipseLinkCachingComposite.java | 69 --- .../orm/OrmEclipseLinkConvert1_0Composite.java | 222 ---------- .../orm/OrmEclipseLinkConvertersComposite.java | 412 ------------------ .../orm/OrmEclipseLinkEmbeddableComposite.java | 101 ----- .../details/orm/OrmEclipseLinkEntityComposite.java | 26 -- .../OrmEclipseLinkExistenceCheckingComposite.java | 106 ----- .../orm/OrmEclipseLinkIdMappingComposite.java | 43 -- .../OrmEclipseLinkMappedSuperclassComposite.java | 26 -- ...lipseLinkTransformationMappingUiDefinition.java | 53 --- ...pseLinkVariableOneToOneMappingUiDefinition.java | 52 --- .../orm/OrmEclipseLinkVersionMappingComposite.java | 45 -- .../EclipseLinkPersistenceXmlUiDefinition.java | 55 --- .../EclipseLinkPersistenceXmlUiFactory.java | 215 --------- .../caching/CacheDefaultsComposite.java | 55 --- .../persistence/caching/CacheSizeComposite.java | 109 ----- .../persistence/caching/CacheTypeComposite.java | 171 -------- .../caching/DefaultCacheSizeComposite.java | 88 ---- .../caching/DefaultCacheTypeComposite.java | 92 ---- .../caching/DefaultSharedCacheComposite.java | 95 ---- .../caching/EclipseLinkCachingComposite.java | 45 -- .../caching/EntityCachingPropertyComposite.java | 53 --- .../persistence/caching/EntityListComposite.java | 228 ---------- .../caching/FlushClearCacheComposite.java | 91 ---- .../caching/PersistenceXmlCachingTab.java | 87 ---- .../persistence/caching/SharedCacheComposite.java | 164 ------- .../connection/BatchWritingComposite.java | 88 ---- .../CacheStatementsPropertiesComposite.java | 135 ------ .../connection/ConnectionPropertiesComposite.java | 41 -- .../connection/DataSourcePropertiesComposite.java | 154 ------- .../connection/EclipseLinkConnectionComposite.java | 55 --- .../connection/JdbcBindParametersComposite.java | 96 ---- .../JdbcConnectionPropertiesComposite.java | 343 --------------- .../connection/JdbcDriverComposite.java | 93 ---- .../connection/JdbcPropertiesComposite.java | 87 ---- .../JdbcReadConnectionPropertiesComposite.java | 55 --- .../JdbcReadConnectionsMaxComposite.java | 88 ---- .../JdbcReadConnectionsMinComposite.java | 87 ---- .../JdbcReadConnectionsSharedComposite.java | 98 ----- .../JdbcWriteConnectionPropertiesComposite.java | 61 --- .../JdbcWriteConnectionsMaxComposite.java | 87 ---- .../JdbcWriteConnectionsMinComposite.java | 87 ---- .../persistence/connection/NativeSqlComposite.java | 98 ----- .../connection/PersistenceXmlConnectionTab.java | 84 ---- .../connection/TransactionTypeComposite.java | 128 ------ .../customization/CustomizerComposite.java | 103 ----- .../EclipseLinkCustomizationComposite.java | 86 ---- .../EntityCustomizationPropertyComposite.java | 47 -- .../customization/EntityListComposite.java | 228 ---------- .../customization/ExceptionHandlerComposite.java | 93 ---- .../PersistenceXmlCustomizationTab.java | 88 ---- .../customization/ProfilerComposite.java | 207 --------- .../customization/SessionCustomizersComposite.java | 213 --------- .../customization/ThrowExceptionsComposite.java | 96 ---- .../customization/ValidationOnlyComposite.java | 96 ---- .../WeavingChangeTrackingComposite.java | 96 ---- .../customization/WeavingComposite.java | 88 ---- .../customization/WeavingEagerComposite.java | 96 ---- .../customization/WeavingFetchGroupsComposite.java | 96 ---- .../customization/WeavingInternalComposite.java | 97 ----- .../customization/WeavingLazyComposite.java | 96 ---- ...EclipseLinkPersistenceUnitGeneralComposite.java | 68 --- ...clipseLinkPersistenceUnitJarFilesComposite.java | 53 --- ...seLinkPersistenceUnitMappingFilesComposite.java | 123 ------ .../logging/EclipseLinkLoggingComposite.java | 77 ---- .../persistence/logging/ExceptionsComposite.java | 96 ---- .../persistence/logging/LoggerComposite.java | 207 --------- .../logging/LoggingFileLocationComposite.java | 92 ---- .../persistence/logging/LoggingLevelComposite.java | 91 ---- .../logging/PersistenceXmlLoggingTab.java | 84 ---- .../persistence/logging/SessionComposite.java | 97 ----- .../persistence/logging/ThreadComposite.java | 96 ---- .../persistence/logging/TimestampComposite.java | 95 ---- .../options/EclipseLinkOptionsComposite.java | 85 ---- .../options/EventListenerComposite.java | 93 ---- .../options/IncludeDescriptorQueriesComposite.java | 96 ---- .../options/PersistenceXmlOptionsTab.java | 84 ---- .../persistence/options/SessionNameComposite.java | 111 ----- .../persistence/options/SessionsXmlComposite.java | 111 ----- .../options/TargetDatabaseComposite.java | 188 -------- .../persistence/options/TargetServerComposite.java | 188 -------- .../options/TemporalMutableComposite.java | 96 ---- .../generation/CreateDdlFileNameComposite.java | 111 ----- .../generation/DdlGenerationLocationComposite.java | 92 ---- .../generation/DdlGenerationTypeComposite.java | 88 ---- .../generation/DropDdlFileNameComposite.java | 111 ----- .../EclipseLinkSchemaGenerationComposite.java | 49 --- .../schema/generation/OutputModeComposite.java | 86 ---- .../PersistenceXmlSchemaGenerationTab.java | 56 --- ...pseLinkNavigatorItemContentProviderFactory.java | 94 ---- ...lipseLinkNavigatorItemLabelProviderFactory.java | 23 - .../platform/EclipseLinkJpaPlatformUi.java | 35 -- .../platform/EclipseLinkJpaPlatformUiFactory.java | 31 -- .../platform/EclipseLinkJpaPlatformUiProvider.java | 71 --- .../platform/EclipseLinkNavigatorProvider.java | 34 -- ...lipseLinkOrmResourceModelStructureProvider.java | 48 -- ...eLinkPersistenceItemContentProviderFactory.java | 137 ------ ...kPersistenceResourceModelStructureProvider.java | 47 -- .../EclipseLink1_1JavaResourceUiDefinition.java | 104 ----- .../details/java/EclipseLink1_1JavaUiFactory.java | 54 --- .../JavaEclipseLinkEmbeddable1_1Composite.java | 98 ----- .../java/JavaEclipseLinkEntity1_1Composite.java | 70 --- ...avaEclipseLinkMappedSuperclass1_1Composite.java | 63 --- .../orm/EclipseLinkOrmXml1_1UiDefinition.java | 102 ----- .../details/orm/EclipseLinkOrmXml1_1UiFactory.java | 104 ----- ...ipseLinkBasicCollectionMapping1_1Composite.java | 57 --- .../OrmEclipseLinkBasicMapMapping1_1Composite.java | 57 --- .../OrmEclipseLinkBasicMapping1_1Composite.java | 67 --- ...rmEclipseLinkEmbeddedIdMapping1_1Composite.java | 74 ---- .../OrmEclipseLinkEmbeddedMapping1_1Composite.java | 75 ---- .../orm/OrmEclipseLinkIdMapping1_1Composite.java | 62 --- ...rmEclipseLinkManyToManyMapping1_1Composite.java | 95 ---- ...OrmEclipseLinkManyToOneMapping1_1Composite.java | 106 ----- ...OrmEclipseLinkOneToManyMapping1_1Composite.java | 61 --- .../OrmEclipseLinkOneToOneMapping1_1Composite.java | 128 ------ .../OrmEclipseLinkVersionMapping1_1Composite.java | 61 --- .../EclipseLink1_1JpaPlatformUiFactory.java | 33 -- .../EclipseLink1_1JpaPlatformUiProvider.java | 73 ---- .../orm/EclipseLinkOrmXml1_2UiDefinition.java | 103 ----- .../EclipseLink1_2JpaPlatformUiFactory.java | 33 -- .../EclipseLink1_2JpaPlatformUiProvider.java | 75 ---- .../details/EclipseLinkCaching2_0Composite.java | 188 -------- .../EclipseLink2_0JavaResourceUiDefinition.java | 108 ----- .../details/java/EclipseLink2_0JavaUiFactory.java | 93 ---- .../java/JavaEclipseLinkCaching2_0Composite.java | 71 --- .../java/JavaEclipseLinkEntity2_0Composite.java | 97 ----- .../java/JavaEclipseLinkIdMapping2_0Composite.java | 79 ---- ...avaEclipseLinkManyToOneMapping2_0Composite.java | 91 ---- ...avaEclipseLinkMappedSuperclass2_0Composite.java | 69 --- ...avaEclipseLinkOneToManyMapping2_0Composite.java | 151 ------- ...JavaEclipseLinkOneToOneMapping2_0Composite.java | 137 ------ .../EclipseLinkEntityMappings2_0DetailsPage.java | 107 ----- ...clipseLinkEntityMappings2_0DetailsProvider.java | 63 --- .../orm/EclipseLinkOrmXml2_0UiDefinition.java | 105 ----- .../details/orm/EclipseLinkOrmXml2_0UiFactory.java | 140 ------ .../orm/OrmEclipseLinkCaching2_0Composite.java | 70 --- .../orm/OrmEclipseLinkEntity2_0Composite.java | 53 --- .../orm/OrmEclipseLinkIdMapping2_0Composite.java | 51 --- ...rmEclipseLinkManyToManyMapping2_0Composite.java | 94 ---- ...OrmEclipseLinkManyToOneMapping2_0Composite.java | 106 ----- ...OrmEclipseLinkMappedSuperclass2_0Composite.java | 32 -- ...OrmEclipseLinkOneToManyMapping2_0Composite.java | 138 ------ .../OrmEclipseLinkOneToOneMapping2_0Composite.java | 146 ------- .../EclipseLink2_0PersistenceXmlUiFactory.java | 69 --- .../EclipseLinkPersistenceXml2_0UiDefinition.java | 55 --- .../caching/CacheDefaults2_0Composite.java | 89 ---- .../caching/EclipseLinkCaching2_0Composite.java | 59 --- .../caching/FlushClearCache2_0Composite.java | 85 ---- .../caching/PersistenceXmlCaching2_0Tab.java | 36 -- .../options/EclipseLinkOptions2_0Composite.java | 38 -- .../options/LockingConfigurationComposite.java | 85 ---- .../options/PersistenceXmlOptions2_0Tab.java | 37 -- .../options/QueryConfigurationComposite.java | 85 ---- .../options/ValidationConfigurationComposite.java | 129 ------ .../options/ValidationModeComposite.java | 93 ---- .../EclipseLink2_0JpaPlatformUiFactory.java | 36 -- .../EclipseLink2_0JpaPlatformUiProvider.java | 87 ---- .../wizards/EclipseLinkMappingFileWizard.java | 46 -- .../wizards/EclipseLinkMappingFileWizardPage.java | 24 - 246 files changed, 24500 deletions(-) delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/.classpath delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/.cvsignore delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/.project delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.core.resources.prefs delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.jdt.core.prefs delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/META-INF/MANIFEST.MF delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/about.html delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/build.properties delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.properties delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.xml delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui.properties delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_details.properties delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/JptEclipseLinkUiPlugin.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkHelpContextIds.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkUiMessages.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/EclipseLinkDDLGeneratorUi.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/wizards/GenerateDDLWizard.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkAlwaysRefreshComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheCoordinationTypeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheSizeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheTypeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCachingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkChangeTrackingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueStateObject.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConvertComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomConverterComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomizerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkDisableHitsComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEmbeddableAdvancedComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEntityAdvancedComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkIdMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkJoinFetchComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToManyMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToOneMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMappedSuperclassAdvancedComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMutableComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkObjectTypeConverterComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyJoiningStrategyPane.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToOneMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkPrivateOwnedComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkReadOnlyComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkRefreshOnlyIfNewerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkStructConverterComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTypeConverterComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkUiDetailsMessages.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVersionMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkEntityComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkMappedSuperclassComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToManyMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToOneMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaResourceUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicCollectionMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicMapMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkCachingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkConvertersComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEmbeddableComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEntityComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkExistenceCheckingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclassComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkTransformationMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkVariableOneToOneMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractEclipseLinkEntityMappingsDetailsPage.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkEntityComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkMappedSuperclassComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/BaseEclipseLinkOrmXmlUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterDialog.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterStateObject.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPage.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicCollectionMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMapMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkCachingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvert1_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvertersComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEmbeddableComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntityComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkExistenceCheckingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkIdMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclassComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkTransformationMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVariableOneToOneMappingUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVersionMappingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheDefaultsComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheSizeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheTypeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheSizeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheTypeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultSharedCacheComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EclipseLinkCachingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityCachingPropertyComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityListComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/FlushClearCacheComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/PersistenceXmlCachingTab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/SharedCacheComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/BatchWritingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/CacheStatementsPropertiesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/ConnectionPropertiesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/DataSourcePropertiesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/EclipseLinkConnectionComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcBindParametersComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcConnectionPropertiesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcDriverComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcPropertiesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionPropertiesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMaxComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMinComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsSharedComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionPropertiesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMaxComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMinComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/NativeSqlComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/PersistenceXmlConnectionTab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/TransactionTypeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/CustomizerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EclipseLinkCustomizationComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityCustomizationPropertyComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityListComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ExceptionHandlerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/PersistenceXmlCustomizationTab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ProfilerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/SessionCustomizersComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ThrowExceptionsComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ValidationOnlyComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingChangeTrackingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingEagerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingFetchGroupsComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingInternalComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingLazyComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitGeneralComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitJarFilesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitMappingFilesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/EclipseLinkLoggingComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ExceptionsComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingFileLocationComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingLevelComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/PersistenceXmlLoggingTab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/SessionComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ThreadComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/TimestampComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EclipseLinkOptionsComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EventListenerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/IncludeDescriptorQueriesComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/PersistenceXmlOptionsTab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionNameComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionsXmlComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetDatabaseComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetServerComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TemporalMutableComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/CreateDdlFileNameComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationLocationComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationTypeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DropDdlFileNameComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/EclipseLinkSchemaGenerationComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/OutputModeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/PersistenceXmlSchemaGenerationTab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemContentProviderFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemLabelProviderFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUi.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkNavigatorProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkOrmResourceModelStructureProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceItemContentProviderFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceResourceModelStructureProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaResourceUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEmbeddable1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEntity1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkMappedSuperclass1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicCollectionMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedIdMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkIdMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToManyMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToOneMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToManyMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToOneMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkVersionMapping1_1Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/details/orm/EclipseLinkOrmXml1_2UiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/EclipseLinkCaching2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaResourceUiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkCaching2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkEntity2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkIdMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkManyToOneMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkMappedSuperclass2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToManyMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToOneMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsPage.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkCaching2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkEntity2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkIdMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToManyMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToOneMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkMappedSuperclass2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToManyMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToOneMapping2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLink2_0PersistenceXmlUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_0UiDefinition.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/FlushClearCache2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/PersistenceXmlCaching2_0Tab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/EclipseLinkOptions2_0Composite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/LockingConfigurationComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/PersistenceXmlOptions2_0Tab.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/QueryConfigurationComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationConfigurationComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationModeComposite.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiFactory.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiProvider.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizard.java delete mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizardPage.java (limited to 'jpa/plugins/org.eclipse.jpt.eclipselink.ui') diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.classpath b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.classpath deleted file mode 100644 index fcf07989bf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.classpath +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.cvsignore b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.cvsignore deleted file mode 100644 index 76e64421ad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -bin -@dot -temp.folder diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.project b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.project deleted file mode 100644 index e572be1b93..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.jpt.eclipselink.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.core.resources.prefs b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 2fdb2b173d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Mon Apr 07 14:26:59 EDT 2008 -eclipse.preferences.version=1 -encoding/=ISO-8859-1 diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.jdt.core.prefs b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 9dd4c3641c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Sun Feb 24 21:27:01 EST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 462f3048df..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,48 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-Vendor: %providerName -Bundle-SymbolicName: org.eclipse.jpt.eclipselink.ui;singleton:=true -Bundle-Version: 1.3.0.qualifier -Bundle-Activator: org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: . -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)", - org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", - org.eclipse.jdt.core;bundle-version="[3.4.0,4.0.0)", - org.eclipse.jdt.ui;bundle-version="[3.4.0,4.0.0)", - org.eclipse.jpt.core;bundle-version="[2.0.0,3.0.0)", - org.eclipse.jpt.db;bundle-version="[1.2.0,2.0.0)", - org.eclipse.jpt.eclipselink.core;bundle-version="[1.0.0,2.0.0)", - org.eclipse.jpt.ui;bundle-version="[2.0.0,3.0.0)", - org.eclipse.jpt.utility;bundle-version="[1.2.0,2.0.0)", - org.eclipse.ui;bundle-version="[3.4.0,4.0.0)", - org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0)", - org.eclipse.wst.common.frameworks;bundle-version="[1.1.200,2.0.0)", - org.eclipse.wst.common.frameworks.ui;bundle-version="[1.1.200,2.0.0)" -Export-Package: org.eclipse.jpt.eclipselink.ui, - org.eclipse.jpt.eclipselink.ui.internal;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.ddlgen;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.ddlgen.wizards;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.details;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.details.java;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.details.orm;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistence.caching;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistence.connection;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistence.customization;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistence.general;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistence.logging;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistence.options;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.persistencexml.details;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.platform;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.structure;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.v1_1.platform;x-internal:=true, - org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options, - org.eclipse.jpt.eclipselink.ui.internal.v2_0.platform, - org.eclipse.jpt.eclipselink.ui.internal.wizards;x-internal:=true -Import-Package: com.ibm.icu.text;version="4.0.1" diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/about.html b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/about.html deleted file mode 100644 index be534ba44f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/about.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - -About - - - - - -

About This Content

- -

May 02, 2008

- -

License

- -

The Eclipse Foundation makes available all content in this plug-in -("Content"). Unless otherwise indicated below, the Content is provided to you -under the terms and conditions of the Eclipse Public License Version 1.0 -("EPL"). A copy of the EPL is available at -http://www.eclipse.org/org/documents/epl-v10.php. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the -Content is being redistributed by another party ("Redistributor") and different -terms and conditions may apply to your use of any object code in the Content. -Check the Redistributor's license that was provided with the Content. If no such -license exists, contact the Redistributor. Unless otherwise indicated below, the -terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at -http://www.eclipse.org/.

- - - diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/build.properties b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/build.properties deleted file mode 100644 index 213a2e2c4d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/build.properties +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################ -# Copyright (c) 2006, 2008 Oracle. All rights reserved. -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0, which accompanies this distribution -# and is available at http://www.eclipse.org/legal/epl-v10.html. -# -# Contributors: -# Oracle - initial API and implementation -################################################################################ -javacSource = 1.5 -javacTarget = 1.5 -source.. = src/,\ - property_files/ -output.. = bin/ -bin.includes = .,\ - META-INF/,\ - about.html,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.properties b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.properties deleted file mode 100644 index 1759e9533a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.properties +++ /dev/null @@ -1,30 +0,0 @@ -############################################################################### -# Copyright (c) 2006, 2008 Oracle. All rights reserved. -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0, which accompanies this distribution -# and is available at http://www.eclipse.org/legal/epl-v10.html. -# -# Contributors: -# Oracle - initial API and implementation -############################################################################### - -# ==================================================================== -# To code developer: -# Do NOT change the properties between this line and the -# "%%% END OF TRANSLATED PROPERTIES %%%" line. -# Make a new property name, append to the end of the file and change -# the code to use the new property. -# ==================================================================== - -# ==================================================================== -# %%% END OF TRANSLATED PROPERTIES %%% -# ==================================================================== -pluginName= Dali Java Persistence Tools - EclipseLink Support - UI -providerName=Eclipse Web Tools Platform - -eclipseLinkWizardCategoryName=EclipseLink -newEclipseLinkMappingFileWizardName=EclipseLink Mapping File -newEclipseLinkJpaMappingFileWizardDesc=Create an EclipseLink specific mapping file - -newEclipseLink1_1MappingFileWizardName=EclipseLink 1.1 Mapping File -newEclipseLink1_1JpaMappingFileWizardDesc=Create an EclipseLink 1.1 specific mapping file \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.xml b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.xml deleted file mode 100644 index 3bfe3c6c16..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/plugin.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - %newEclipseLinkJpaMappingFileWizardDesc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui.properties b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui.properties deleted file mode 100644 index fc5e50e975..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui.properties +++ /dev/null @@ -1,336 +0,0 @@ -################################################################################ -# Copyright (c) 2007, 2009 Oracle. All rights reserved. -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0, which accompanies this distribution -# and is available at http://www.eclipse.org/legal/epl-v10.html. -# -# Contributors: -# Oracle - initial API and implementation -################################################################################ - -MappingFileWizard_title=New EclipseLink Mapping File -MappingFileWizardPage_title=EclipseLink mapping file -MappingFileWizardPage_desc=Specify EclipseLink mapping file location and properties - -EclipseLink1_1MappingFileWizard_title=New EclipseLink 1.1 Mapping File -EclipseLink1_1MappingFileWizardPage_title=EclipseLink 1.1 mapping file -EclipseLink1_1MappingFileWizardPage_desc=Specify EclipseLink 1.1 mapping file location and properties - -Boolean_True = True -Boolean_False = False - -DefaultWithoutValue=Default () -DefaultWithValue=Default ({0}) - -PersistenceXmlTabFolder_defaultEmpty = Default () -PersistenceXmlTabFolder_defaultWithOneParam = Default ({0}) - -PersistenceXmlGeneralTab_name = Name: -PersistenceXmlGeneralTab_provider = Provider: -PersistenceXmlGeneralTab_browse = Browse... -PersistenceXmlGeneralTab_description = Description: - -# General -PersistenceXmlGeneralTab_title = General -PersistenceXmlGeneralTab_generalSectionTitle = General -PersistenceXmlGeneralTab_mappedClassesSectionTitle = Managed Classes -PersistenceXmlGeneralTab_mappedClassesSectionDescription=Specify the list of classes to be managed in this persistence unit. -PersistenceXmlGeneralTab_xmlMappingFilesSectionTitle = XML Mapping Files -PersistenceXmlGeneralTab_xmlMappingFilesSectionDescription=Specify the XML mapping files for this persistence unit. - -PersistenceXmlGeneralTab_nameLabel = Name: -PersistenceXmlGeneralTab_persistenceProviderLabel = Persistence Provider: -PersistenceXmlGeneralTab_descriptionLabel = Description: - -PersistenceXmlGeneralTab_excludeUnlistedMappedClasses=Exclude unlisted classes -PersistenceXmlGeneralTab_excludeUnlistedMappedClassesWithDefault=Exclude unlisted classes ({0}) -PersistenceXmlGeneralTab_mappedClassesNoName= -PersistenceXmlGeneralTab_open=Open - -PersistenceXmlGeneralTab_xmlMappingFilesDialog_title=JPA XML Mapping File Selection -PersistenceXmlGeneralTab_xmlMappingFilesDialog_message=Choose the XML mapping files to be added to the persistence unit. -PersistenceXmlGeneralTab_ormNoName= -PersistenceXmlGeneralTab_excludeEclipselinkOrm=Exclude unlisted EclipseLink XML mapping file -PersistenceXmlGeneralTab_excludeEclipselinkOrmWithDefault=Exclude unlisted EclipseLink XML mapping file ({0}) - -# Connection -PersistenceXmlConnectionTab_title = Connection -PersistenceXmlConnectionTab_sectionTitle = Persistence Unit Connection -PersistenceXmlConnectionTab_sectionDescription = Configure the data source or JDBC connection properties. -PersistenceXmlConnectionTab_defaultWithOneParam = Default ({0}) -PersistenceXmlConnectionTab_defaultEmpty = Default () - -PersistenceXmlConnectionTab_transactionTypeLabel = Transaction type: - -TransactionTypeComposite_jta = JTA -TransactionTypeComposite_resource_local = Resource Local - -PersistenceXmlConnectionTab_nativeSqlLabel = Native SQL -PersistenceXmlConnectionTab_nativeSqlLabelDefault = Native SQL ({0}) - -PersistenceXmlConnectionTab_batchWritingLabel = Batch writing: - -BatchWritingComposite_none = None -BatchWritingComposite_jdbc = JDBC -BatchWritingComposite_buffered = Buffered -BatchWritingComposite_oracle_jdbc = Oracle JDBC - -PersistenceXmlConnectionTab_cacheStatementsLabel = Statement caching: - -PersistenceXmlConnectionTab_jtaDataSourceLabel = JTA data source: -PersistenceXmlConnectionTab_nonJtaDataSourceLabel = Non-JTA data source: - -PersistenceXmlConnectionTab_driverLabel = Driver: -PersistenceXmlConnectionTab_urlLabel = URL: -PersistenceXmlConnectionTab_userLabel = User: -PersistenceXmlConnectionTab_passwordLabel = Password: -PersistenceXmlConnectionTab_bindParametersLabel = Bind parameters -PersistenceXmlConnectionTab_bindParametersLabelDefault = Bind parameters ({0}) - -PersistenceXmlConnectionTab_readConnectionsSharedLabel = Shared -PersistenceXmlConnectionTab_readConnectionsSharedLabelDefault = Shared ({0}) -PersistenceXmlConnectionTab_readConnectionsSectionTitle = Read Connection -PersistenceXmlConnectionTab_readConnectionsMinLabel = Minimum: -PersistenceXmlConnectionTab_readConnectionsMaxLabel = Maximum: -PersistenceXmlConnectionTab_writeConnectionsSectionTitle = Write Connection -PersistenceXmlConnectionTab_writeConnectionsMinLabel = Minimum: -PersistenceXmlConnectionTab_writeConnectionsMaxLabel = Maximum: - -ConnectionPropertiesComposite_Database_GroupBox=Database - -JdbcPropertiesComposite_EclipseLinkConnectionPool_GroupBox=EclipseLink Connection Pool - -JdbcConnectionPropertiesComposite_ConnectionDialog_Message=&Enter connection name or pattern (*, ?, or camel case): -JdbcConnectionPropertiesComposite_ConnectionDialog_Title=Connection Selection - -# SchemaGeneration -PersistenceXmlSchemaGenerationTab_title = Schema Generation -PersistenceXmlSchemaGenerationTab_sectionTitle = Persistence Unit Schema Generation -PersistenceXmlSchemaGenerationTab_sectionDescription = Configure the EclipseLink schema generation properties. -PersistenceXmlSchemaGenerationTab_defaultWithOneParam = Default ({0}) -PersistenceXmlSchemaGenerationTab_defaultEmpty = Default () - -PersistenceXmlSchemaGenerationTab_ddlGenerationTypeLabel = DDL generation type: -PersistenceXmlSchemaGenerationTab_outputModeLabel = Output mode: -PersistenceXmlSchemaGenerationTab_createDdlFileNameLabel = Create DDL file name: -PersistenceXmlSchemaGenerationTab_dropDdlFileNameLabel = Drop DDL file name: - -OutputModeComposite_both = Both -OutputModeComposite_sql_script = Sql-script -OutputModeComposite_database = Database - -DdlGenerationTypeComposite_none = None -DdlGenerationTypeComposite_create_tables = Create Tables -DdlGenerationTypeComposite_drop_and_create_tables = Drop and Create Tables - -PersistenceXmlSchemaGenerationTab_ddlGenerationLocationLabel = DDL generation location: - -DdlGenerationLocationComposite_dialogTitle = Generation Location -DdlGenerationLocationComposite_dialogMessage = Choose a folder for the generated DDL files: - -# Caching -PersistenceXmlCachingTab_title = Caching -PersistenceXmlCachingTab_sectionTitle = Persistence Unit Caching -PersistenceXmlCachingTab_sectionDescription = Configure the session or entity specific EclipseLink caching properties. - -CacheDefaultsComposite_groupTitle = Defaults - -PersistenceXmlCachingTab_defaultCacheTypeLabel = Default cache type: -PersistenceXmlCachingTab_cacheTypeLabel = Cache type: - -PersistenceXmlCachingTab_defaultSharedCacheLabel = Shared cache ({0}) -PersistenceXmlCachingTab_sharedCacheLabel = Shared cache - -PersistenceXmlCachingTab_defaultSharedCacheDefaultLabel = Default shared cache ({0}) -PersistenceXmlCachingTab_sharedCacheDefaultLabel = Default shared cache - -CacheSizeComposite_cacheSize=Cache size: - -CacheTypeComposite_full = Full -CacheTypeComposite_hard_weak = Weak with Hard Subcache -CacheTypeComposite_none = None -CacheTypeComposite_soft = Soft -CacheTypeComposite_soft_weak = Weak with Soft Subcache -CacheTypeComposite_weak = Weak - -DefaultCacheSizeComposite_defaultCacheSize=Default cache size: - -DefaultCacheTypeComposite_full = Full -DefaultCacheTypeComposite_hard_weak = Weak With Hard Subcache -DefaultCacheTypeComposite_none = None -DefaultCacheTypeComposite_soft = Soft -DefaultCacheTypeComposite_soft_weak = Weak with Soft Subcache -DefaultCacheTypeComposite_weak = Weak - -EntityDialog_selectEntity = Select an Entity -EntityDialog_name = Name: - -CachingEntityListComposite_groupTitle = Entity caching -CachingEntityListComposite_editButton = Edit... - -CachingEntityListComposite_dialogMessage=&Enter type name prefix or pattern (*, ?, or camel case): -CachingEntityListComposite_dialogTitle=Entity Selection - -PersistenceXmlCachingTab_FlushClearCacheLabel = Flush clear cache: - -FlushClearCacheComposite_drop = Drop -FlushClearCacheComposite_drop_invalidate = Drop Invalidate -FlushClearCacheComposite_merge = Merge - -# Customization -PersistenceXmlCustomizationTab_title = Customization -PersistenceXmlCustomizationTab_sectionTitle = Persistence Unit Customization -PersistenceXmlCustomizationTab_sectionDescription = Set default or entity specific EclipseLink customization and validation properties. -PersistenceXmlCustomizationTab_defaultWithOneParam = Default ({0}) -PersistenceXmlCustomizationTab_defaultEmpty = Default () - -PersistenceXmlCustomizationTab_weavingLabel = Weaving: - -PersistenceXmlCustomizationTab_weavingLazyLabelDefault = Weaving lazy ({0}) -PersistenceXmlCustomizationTab_weavingLazyLabel = Weaving lazy - -PersistenceXmlCustomizationTab_weavingChangeTrackingLabelDefault = Weaving change tracking ({0}) -PersistenceXmlCustomizationTab_weavingChangeTrackingLabel = Weaving change tracking - -PersistenceXmlCustomizationTab_weavingFetchGroupsLabelDefault = Weaving fetch groups ({0}) -PersistenceXmlCustomizationTab_weavingFetchGroupsLabel = Weaving fetch groups - -PersistenceXmlCustomizationTab_weavingInternalLabel = Weaving internal -PersistenceXmlCustomizationTab_weavingInternalLabelDefault = Weaving internal ({0}) - -PersistenceXmlCustomizationTab_weavingEagerLabel = Weaving eager -PersistenceXmlCustomizationTab_weavingEagerLabelDefault = Weaving eager ({0}) - -PersistenceXmlCustomizationTab_throwExceptionsLabelDefault = Throw exceptions ({0}) -PersistenceXmlCustomizationTab_throwExceptionsLabel = Throw exceptions - -PersistenceXmlCustomizationTab_exceptionHandlerLabel = Exception handler: - -WeavingComposite_true_ = Weave Dynamically -WeavingComposite_false_ = No Weaving -WeavingComposite_static_ = Weave Statically - -CustomizationEntityListComposite_groupTitle = Descriptor customizers -CustomizationEntityListComposite_editButton = Edit... - -CustomizationEntityListComposite_dialogMessage=&Enter type name prefix or pattern (*, ?, or camel case): -CustomizationEntityListComposite_dialogTitle=Entity Selection - -PersistenceXmlCustomizationTab_customizerLabel = Customizer: -PersistenceXmlCustomizationTab_sessionCustomizerLabel = Session customizers - -PersistenceXmlCustomizationTab_noName= - -PersistenceXmlCustomizationTab_validationOnlyLabel = Validation only -PersistenceXmlCustomizationTab_validationOnlyLabelDefault = Validation only ({0}) - -PersistenceXmlCustomizationTab_profilerLabel = Profiler: -PersistenceXmlCustomizationTab_browse = Browse... - -ProfilerComposite_performance_profiler = Performance Profiler -ProfilerComposite_query_monitor = Query Monitor -ProfilerComposite_no_profiler = No Profiler - -# Logging -PersistenceXmlLoggingTab_title = Logging -PersistenceXmlLoggingTab_sectionTitle = Persistence Unit Logging -PersistenceXmlLoggingTab_sectionDescription = Configure the EclipseLink logging properties. -PersistenceXmlLoggingTab_defaultWithOneParam = Default ({0}) -PersistenceXmlLoggingTab_defaultEmpty = Default () - -PersistenceXmlLoggingTab_loggingLevelLabel = Logging level: - -LoggingLevelComposite_off = Off -LoggingLevelComposite_severe = Severe -LoggingLevelComposite_warning = Warning -LoggingLevelComposite_info = Info -LoggingLevelComposite_config = Config -LoggingLevelComposite_fine = Fine -LoggingLevelComposite_finer = Finer -LoggingLevelComposite_finest = Finest -LoggingLevelComposite_all = All - -PersistenceXmlLoggingTab_loggerLabel = Logger: -PersistenceXmlLoggingTab_browse = Browse... -LoggerComposite_default_logger = Default Logger -LoggerComposite_java_logger = Java Logger -LoggerComposite_server_logger = Server Logger - -PersistenceXmlLoggingTab_timestampLabel = Timestamp -PersistenceXmlLoggingTab_timestampLabelDefault = Timestamp ({0}) -PersistenceXmlLoggingTab_threadLabel = Thread -PersistenceXmlLoggingTab_threadLabelDefault = Thread ({0}) -PersistenceXmlLoggingTab_sessionLabel = Session -PersistenceXmlLoggingTab_sessionLabelDefault = Session ({0}) -PersistenceXmlLoggingTab_exceptionsLabel = Exceptions -PersistenceXmlLoggingTab_exceptionsLabelDefault = Exceptions ({0}) - -PersistenceXmlLoggingTab_loggersLabel = Loggers: - -PersistenceXmlLoggingTab_loggingFileLabel = Log file: - -LoggingFileLocationComposite_dialogTitle = Log File Location -LoggingFileLocationComposite_dialogMessage = Choose a folder for the log file: - -# Options -PersistenceXmlOptionsTab_title = Options -PersistenceXmlOptionsTab_sessionSectionTitle = EclipseLink Session Options -PersistenceXmlOptionsTab_sessionSectionDescription = Configure the EclipseLink session options. -PersistenceXmlOptionsTab_defaultWithOneParam = Default ({0}) -PersistenceXmlOptionsTab_defaultEmpty = Default () - -PersistenceXmlOptionsTab_sessionName = Session name: -PersistenceXmlOptionsTab_sessionsXml = Sessions XML: - -PersistenceXmlOptionsTab_includeDescriptorQueriesLabel = Include descriptor queries -PersistenceXmlOptionsTab_includeDescriptorQueriesLabelDefault = Include descriptor queries ({0}) - -PersistenceXmlOptionsTab_eventListenerLabel = Event listener: -PersistenceXmlOptionsTab_targetDatabaseLabel = Target database: - -PersistenceXmlOptionsTab_miscellaneousSectionTitle = Miscellaneous Options -PersistenceXmlOptionsTab_miscellaneousSectionDescription = Configure the miscellaneous options. - -PersistenceXmlOptionsTab_temporalMutableLabel = Temporal mutable -PersistenceXmlOptionsTab_temporalMutableLabelDefault = Temporal mutable ({0}) - -TargetDatabaseComposite_attunity = Attunity -TargetDatabaseComposite_auto = Auto -TargetDatabaseComposite_cloudscape = Cloudscape -TargetDatabaseComposite_database = Database -TargetDatabaseComposite_db2 = DB2 -TargetDatabaseComposite_db2mainframe = DB2Mainframe -TargetDatabaseComposite_dbase = DBase -TargetDatabaseComposite_derby = Derby -TargetDatabaseComposite_hsql = HSQL -TargetDatabaseComposite_informix = Informix -TargetDatabaseComposite_javadb = JavaDB -TargetDatabaseComposite_mysql = MySQL -TargetDatabaseComposite_oracle = Oracle -TargetDatabaseComposite_oracle11 = Oracle11 -TargetDatabaseComposite_oracle10 = Oracle10g -TargetDatabaseComposite_oracle9 = Oracle9i -TargetDatabaseComposite_oracle8 = Oracle8i -TargetDatabaseComposite_pointbase = PointBase -TargetDatabaseComposite_postgresql = PostgreSQL -TargetDatabaseComposite_sqlanywhere = SQLAnywhere -TargetDatabaseComposite_sqlserver = SQLServer -TargetDatabaseComposite_sybase = Sybase -TargetDatabaseComposite_timesten = TimesTen - -PersistenceXmlOptionsTab_targetServerLabel = Target server: - -TargetServerComposite_none = None -TargetServerComposite_oc4j = OC4J -TargetServerComposite_sunas9 = SunAS9 -TargetServerComposite_websphere = WebSphere -TargetServerComposite_websphere_6_1 = WebSphere 6.1 -TargetServerComposite_weblogic = WebLogic -TargetServerComposite_weblogic_9 = WebLogic 9 -TargetServerComposite_weblogic_10 = WebLogic 10 -TargetServerComposite_jboss = JBoss - -# DDLGeneration -EclipseLinkDDLGeneratorUi_generatingDDLWarningTitle = Generating DDL -EclipseLinkDDLGeneratorUi_generatingDDLWarningMessage = Warning: Generating DDL will DROP existing tables and{0}CREATE new tables based on the Entities in your project.{1}Are you sure you want to continue? -EclipseLinkDDLGeneratorUi_error = Error diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_details.properties b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_details.properties deleted file mode 100644 index d42af6bc42..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/property_files/eclipselink_ui_details.properties +++ /dev/null @@ -1,153 +0,0 @@ -################################################################################ -# Copyright (c) 2008, 2009 Oracle. All rights reserved. -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0, which accompanies this distribution -# and is available at http://www.eclipse.org/legal/epl-v10.html. -# -# Contributors: -# Oracle - initial API and implementation -################################################################################ - -EclipseLinkBasicCollectionMappingUiProvider_label = Basic Collection -EclipseLinkBasicCollectionMappingUiProvider_linkLabel = basic collection - -EclipseLinkBasicMapMappingUiProvider_label = Basic Map -EclipseLinkBasicMapMappingUiProvider_linkLabel = basic map - -EclipseLinkTransformationMappingUiProvider_label = Transformation -EclipseLinkTransformationMappingUiProvider_linkLabel = transformation - -EclipseLinkVariableOneToOneMappingUiProvider_label = Variable One to One -EclipseLinkVariableOneToOneMappingUiProvider_linkLabel = variable one to one - -EclipseLinkCacheTypeComposite_label = Type: -EclipseLinkCacheTypeComposite_full = Full -EclipseLinkCacheTypeComposite_weak = Weak -EclipseLinkCacheTypeComposite_soft = Soft -EclipseLinkCacheTypeComposite_soft_weak = Weak with Soft Subcache -EclipseLinkCacheTypeComposite_hard_weak = Weak with Hard Subcache -EclipseLinkCacheTypeComposite_cache = Cache -EclipseLinkCacheTypeComposite_none = None - -EclipseLinkCacheSizeComposite_size = Size: - -EclipseLinkCacheCoordinationTypeComposite_label = Coordination type: -EclipseLinkCacheCoordinationTypeComposite_send_object_changes = Send Object Changes -EclipseLinkCacheCoordinationTypeComposite_invalidate_changed_objects = Invalidate Changed Objects -EclipseLinkCacheCoordinationTypeComposite_send_new_objects_with_changes = Send New Objects with Changes -EclipseLinkCacheCoordinationTypeComposite_none = None - -EclipseLinkCachingComposite_sharedLabelDefault = Shared ({0}) -EclipseLinkCachingComposite_sharedLabel = Shared -EclipseLinkCachingComposite_advanced = Advanced - -EclipseLinkChangeTrackingComposite_label = Change tracking: -EclipseLinkChangeTrackingComposite_attribute = Attribute -EclipseLinkChangeTrackingComposite_object = Object -EclipseLinkChangeTrackingComposite_deferred = Deferred -EclipseLinkChangeTrackingComposite_auto = Auto - -EclipseLinkConvertComposite_converterNameLabel = Converter name: -EclipseLinkConvertComposite_defineConverterSection = Define Converter -EclipseLinkConvertComposite_default = Default -EclipseLinkConvertComposite_custom = Custom -EclipseLinkConvertComposite_type = Type -EclipseLinkConvertComposite_objectType = Object type -EclipseLinkConvertComposite_struct = Struct - -EclipseLinkConverterComposite_nameTextLabel = Name: -EclipseLinkConverterComposite_classLabel = Class: - -EclipseLinkCustomizerComposite_classLabel = Customizer class: - -EclipseLinkConvertersComposite_customConverter = Custom -EclipseLinkConvertersComposite_objectTypeConverter = Object type -EclipseLinkConvertersComposite_structConverter = Struct -EclipseLinkConvertersComposite_typeConverter = Type - -EclipseLinkAlwaysRefreshComposite_alwaysRefreshDefault = Always refresh ({0}) -EclipseLinkAlwaysRefreshComposite_alwaysRefreshLabel = Always refresh -EclipseLinkRefreshOnlyIfNewerComposite_refreshOnlyIfNewerDefault = Refresh only if newer ({0}) -EclipseLinkRefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel = Refresh only if newer -EclipseLinkDisableHitsComposite_disableHitsDefault = Disable hits ({0}) -EclipseLinkDisableHitsComposite_disableHitsLabel = Disable hits - -TypeSection_converted = Converted - -EclipseLinkTypeMappingComposite_advanced = Advanced -EclipseLinkTypeMappingComposite_caching = Caching -EclipseLinkTypeMappingComposite_converters = Converters - -EclipseLinkExistenceCheckingComposite_label = Existence checking: -JavaEclipseLinkExistenceCheckingComposite_check_cache = Check Cache -JavaEclipseLinkExistenceCheckingComposite_check_database = Check Cache then Database -JavaEclipseLinkExistenceCheckingComposite_assume_existence = Assume Existence -JavaEclipseLinkExistenceCheckingComposite_assume_non_existence = Assume Non-Existence -OrmEclipseLinkExistenceCheckingComposite_check_cache = Check Cache -OrmEclipseLinkExistenceCheckingComposite_check_database = Check Cache then Database -OrmEclipseLinkExistenceCheckingComposite_assume_existence = Assume Existence -OrmEclipseLinkExistenceCheckingComposite_assume_non_existence = Assume Non-Existence - -EclipseLinkExpiryComposite_expirySection = Expiry - -EclipseLinkExpiryComposite_noExpiry = No expiry -EclipseLinkExpiryComposite_timeToLiveExpiry = Time to live expiry -EclipseLinkExpiryComposite_timeToLiveExpiryExpireAfter = Expire after -EclipseLinkExpiryComposite_timeToLiveExpiryMilliseconds = milliseconds -EclipseLinkExpiryComposite_dailyExpiry = Daily expiry -EclipseLinkExpiryComposite_timeOfDayExpiryExpireAt = Expire at - - -EclipseLinkJoinFetchComposite_label = Join fetch: -EclipseLinkJoinFetchComposite_inner = Inner -EclipseLinkJoinFetchComposite_outer = Outer - -EclipseLinkMutableComposite_mutableLabel=Mutable -EclipseLinkMutableComposite_mutableLabelDefault=Mutable ({0}) -EclipseLinkMutableComposite_true=True -EclipseLinkMutableComposite_false=False - -EclipseLinkObjectTypeConverterComposite_dataTypeLabel = Data type: -EclipseLinkObjectTypeConverterComposite_objectTypeLabel = Object type: -EclipseLinkObjectTypeConverterComposite_conversionValueEdit = Edit... -EclipseLinkObjectTypeConverterComposite_conversionValuesDataValueColumn = Data Value -EclipseLinkObjectTypeConverterComposite_conversionValuesObjectValueColumn = Object Value -EclipseLinkObjectTypeConverterComposite_defaultObjectValueLabel = Default object value: -EclipseLinkObjectTypeConverterComposite_conversionValuesGroupTitle = Conversion values -EclipseLinkConversionValueDialog_addConversionValue = Add Conversion Value -EclipseLinkConversionValueDialog_editConversionValue = Edit Conversion Value -EclipseLinkConversionValueDialog_addConversionValueDescriptionTitle = Create new conversion value -EclipseLinkConversionValueDialog_addConversionValueDescription = Create a new conversion value setting both the 'data value' and the 'object value' -EclipseLinkConversionValueDialog_editConversionValueDescriptionTitle = Edit conversion value -EclipseLinkConversionValueDialog_editConversionValueDescription = Edit the conversion value, changing the 'data value' or 'object value' - -EclipseLinkConversionValueDialog_dataValue = Data value: -EclipseLinkConversionValueDialog_objectValue = Object value: -EclipseLinkConversionValueStateObject_dataValueMustBeSpecified = A data value must be specified. -EclipseLinkConversionValueStateObject_objectValueMustBeSpecified = An object value must be specified. -EclipseLinkConversionValueStateObject_dataValueAlreadyExists = This data value is already specified, cannot map multiple object values to the same data value. - - -EclipseLinkPrivateOwnedComposite_privateOwnedLabel = Private owned -EclipseLinkReadOnlyComposite_readOnlyLabel = Read-only -EclipseLinkReadOnlyComposite_readOnlyWithDefault = Read-only ({0}) -EclipseLinkTypeConverterComposite_dataTypeLabel = Data type: -EclipseLinkTypeConverterComposite_objectTypeLabel = Object type: - -DefaultEclipseLinkOneToOneMappingUiProvider_label=Default (One to One) -DefaultEclipseLinkVariableOneToOneMappingUiProvider_label=Default (Variable One to One) -DefaultEclipseLinkOneToManyMappingUiProvider_label=Default (One to Many) -DefaultEclipseLinkOneToOneMappingUiProvider_linkLabel=default (one to one) -DefaultEclipseLinkVariableOneToOneMappingUiProvider_linkLabel=default (variable one to one) -DefaultEclipseLinkOneToManyMappingUiProvider_linkLabel=default (one to many) - -EclipseLinkConvertersComposite_Label=Converters - -EclipseLinkConverterDialog_name=Name: -EclipseLinkConverterDialog_converterType=Type: -EclipseLinkConverterDialog_addConverter=Add Converter -EclipseLinkConverterDialog_addConverterDescriptionTitle=Create new converter -EclipseLinkConverterDialog_addConverterDescription=Create a new converter setting both the 'name' and the 'type' -EclipseLinkConverterStateObject_nameMustBeSpecified = A name must be specified. -EclipseLinkConverterStateObject_typeMustBeSpecified = A converter type must be specified. - diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/JptEclipseLinkUiPlugin.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/JptEclipseLinkUiPlugin.java deleted file mode 100644 index d9b480236c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/JptEclipseLinkUiPlugin.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - * - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public class JptEclipseLinkUiPlugin extends AbstractUIPlugin -{ - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.jpt.eclipselink.ui"; //$NON-NLS-1$ - - - // ********** singleton ********** - private static JptEclipseLinkUiPlugin INSTANCE; - - /** - * Returns the singleton Plugin - */ - public static JptEclipseLinkUiPlugin instance() { - return INSTANCE; - } - - public static void log(IStatus status) { - INSTANCE.getLog().log(status); - } - - public static void log(String msg) { - log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, msg, null)); - } - - public static void log(Throwable throwable) { - log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, throwable.getLocalizedMessage(), throwable)); - } - - // ********** Image API ********** - /** - * This gets a .gif from the icons folder. - */ - public static ImageDescriptor getImageDescriptor(String key) { - if (! key.startsWith("icons/")) { - key = "icons/" + key; - } - if (! key.endsWith(".gif")) { - key = key + ".gif"; - } - return imageDescriptorFromPlugin(PLUGIN_ID, key); - } - - /** - * This returns an image for a .gif from the icons folder - */ - public static Image getImage(String key) { - ImageDescriptor desc = getImageDescriptor(key); - return (desc == null) ? null : desc.createImage(); - } - - - - // ********** constructors ********** - public JptEclipseLinkUiPlugin() { - super(); - INSTANCE = this; - } - - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - INSTANCE = this; - } - @Override - public void stop(BundleContext context) throws Exception { - INSTANCE = null; - super.stop(context); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkHelpContextIds.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkHelpContextIds.java deleted file mode 100644 index 3832c21f0a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkHelpContextIds.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0, which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal; - -import org.eclipse.jpt.ui.JptUiPlugin; - -/** - * Help context ids for the Dali EclipseLink UI. - *

- * This interface contains constants only; it is not intended to be - * implemented. - *

- */ -@SuppressWarnings("nls") -public interface EclipseLinkHelpContextIds { - - //ContextID prefix - public static final String PREFIX = JptUiPlugin.PLUGIN_ID + "."; - - //Persistent Type composites - public static final String CACHING_ALWAYS_REFRESH = PREFIX + "caching_alwaysRefresh"; - public static final String CACHING_CACHE_COORDINATION_TYPE = PREFIX + "caching_cacheCoordinationType"; - public static final String CACHING_CACHE_TYPE = PREFIX + "caching_cacheType"; - public static final String CACHING_DISABLE_HITS = PREFIX + "caching_disableHits"; - public static final String CACHING_REFRESH_ONLY_IF_NEWER = PREFIX + "caching_refreshOnlyIfNewer"; - public static final String CACHING_SHARED = PREFIX + "caching_shared"; - - //Persistence Xml Editor - public static final String PERSISTENCE_CACHING = PREFIX + "persistence_caching"; - public static final String PERSISTENCE_CUSTOMIZATION = PREFIX + "persistence_customization"; - public static final String PERSISTENCE_LOGGING = PREFIX + "persistence_logging"; - public static final String PERSISTENCE_OPTIONS = PREFIX + "persistence_options"; - public static final String PERSISTENCE_SCHEMA_GENERATION = PREFIX + "persistence_schemaGeneration"; - - public static final String PERSISTENCE_CACHING_DEFAULT_SHARED = PREFIX + "caching_defaultShared"; - public static final String PERSISTENCE_CACHING_DEFAULT_SIZE = PREFIX + "caching_defaultSize"; - public static final String PERSISTENCE_CACHING_DEFAULT_TYPE = PREFIX + "caching_defaultType"; - - public static final String PERSISTENCE_LOGGING_EXCEPTIONS = PREFIX + "logging_exceptions"; - public static final String PERSISTENCE_LOGGING_LEVEL = PREFIX + "logging_level"; - public static final String PERSISTENCE_LOGGING_SESSION = PREFIX + "logging_session"; - public static final String PERSISTENCE_LOGGING_THREAD = PREFIX + "logging_thread"; - public static final String PERSISTENCE_LOGGING_TIMESTAMP = PREFIX + "logging_timeStamp"; - - public static final String PERSISTENCE_OPTIONS_SESSION_NAME = PREFIX + "options_sessionName"; - public static final String PERSISTENCE_OPTIONS_SESSIONS_XML = PREFIX + "options_sessionsXml"; - public static final String PERSISTENCE_OPTIONS_TARGET_DATABASE = PREFIX + "options_targetDatabase"; - public static final String PERSISTENCE_OPTIONS_TARGET_SERVER = PREFIX + "options_targetServer"; - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkUiMessages.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkUiMessages.java deleted file mode 100644 index 115f8aff4a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkUiMessages.java +++ /dev/null @@ -1,356 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2007, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal; - -import org.eclipse.osgi.util.NLS; - -/** - * Localized messages used by ElipseLink UI. - */ -public class EclipseLinkUiMessages { - - public static String MappingFileWizard_title; - public static String MappingFileWizardPage_title; - public static String MappingFileWizardPage_desc; - - public static String EclipseLink1_1MappingFileWizard_title; - public static String EclipseLink1_1MappingFileWizardPage_title; - public static String EclipseLink1_1MappingFileWizardPage_desc; - - public static String Boolean_True; - public static String Boolean_False; - - public static String DefaultWithoutValue; - public static String DefaultWithValue; - - public static String PersistenceXmlTabFolder_defaultEmpty; - public static String PersistenceXmlTabFolder_defaultWithOneParam; - - public static String PersistenceXmlGeneralTab_name; - public static String PersistenceXmlGeneralTab_provider; - public static String PersistenceXmlGeneralTab_browse; - public static String PersistenceXmlGeneralTab_description; - - // General - public static String PersistenceXmlGeneralTab_title; - public static String PersistenceXmlGeneralTab_generalSectionTitle; - public static String PersistenceXmlGeneralTab_mappedClassesSectionTitle; - public static String PersistenceXmlGeneralTab_mappedClassesSectionDescription; - public static String PersistenceXmlGeneralTab_xmlMappingFilesSectionTitle; - public static String PersistenceXmlGeneralTab_xmlMappingFilesSectionDescription; - - public static String PersistenceXmlGeneralTab_nameLabel; - public static String PersistenceXmlGeneralTab_persistenceProviderLabel; - public static String PersistenceXmlGeneralTab_descriptionLabel; - - public static String PersistenceXmlGeneralTab_excludeUnlistedMappedClasses; - public static String PersistenceXmlGeneralTab_excludeUnlistedMappedClassesWithDefault; - public static String PersistenceXmlGeneralTab_mappedClassesNoName; - public static String PersistenceXmlGeneralTab_open; - - public static String PersistenceXmlGeneralTab_xmlMappingFilesDialog_title; - public static String PersistenceXmlGeneralTab_xmlMappingFilesDialog_message; - public static String PersistenceXmlGeneralTab_ormNoName; - public static String PersistenceXmlGeneralTab_excludeEclipselinkOrm; - public static String PersistenceXmlGeneralTab_excludeEclipselinkOrmWithDefault; - - // Connection - public static String PersistenceXmlConnectionTab_title; - public static String PersistenceXmlConnectionTab_sectionTitle; - public static String PersistenceXmlConnectionTab_sectionDescription; - public static String PersistenceXmlConnectionTab_defaultWithOneParam; - public static String PersistenceXmlConnectionTab_defaultEmpty; - - public static String PersistenceXmlConnectionTab_transactionTypeLabel; - - public static String ConnectionPropertiesComposite_Database_GroupBox; - - public static String JdbcPropertiesComposite_EclipseLinkConnectionPool_GroupBox; - - public static String JdbcConnectionPropertiesComposite_ConnectionDialog_Message; - public static String JdbcConnectionPropertiesComposite_ConnectionDialog_Title; - - public static String TransactionTypeComposite_jta; - public static String TransactionTypeComposite_resource_local; - - public static String PersistenceXmlConnectionTab_nativeSqlLabel; - public static String PersistenceXmlConnectionTab_nativeSqlLabelDefault; - - public static String PersistenceXmlConnectionTab_batchWritingLabel; - - public static String BatchWritingComposite_none; - public static String BatchWritingComposite_jdbc; - public static String BatchWritingComposite_buffered; - public static String BatchWritingComposite_oracle_jdbc; - - public static String PersistenceXmlConnectionTab_cacheStatementsLabel; - - public static String PersistenceXmlConnectionTab_jtaDataSourceLabel; - public static String PersistenceXmlConnectionTab_nonJtaDataSourceLabel; - - public static String PersistenceXmlConnectionTab_driverLabel; - public static String PersistenceXmlConnectionTab_urlLabel; - public static String PersistenceXmlConnectionTab_userLabel; - public static String PersistenceXmlConnectionTab_passwordLabel; - public static String PersistenceXmlConnectionTab_bindParametersLabel; - public static String PersistenceXmlConnectionTab_bindParametersLabelDefault; - - public static String PersistenceXmlConnectionTab_readConnectionsSharedLabel; - public static String PersistenceXmlConnectionTab_readConnectionsSharedLabelDefault; - public static String PersistenceXmlConnectionTab_readConnectionsSectionTitle; - public static String PersistenceXmlConnectionTab_readConnectionsMinLabel; - public static String PersistenceXmlConnectionTab_readConnectionsMaxLabel; - public static String PersistenceXmlConnectionTab_writeConnectionsSectionTitle; - public static String PersistenceXmlConnectionTab_writeConnectionsMinLabel; - public static String PersistenceXmlConnectionTab_writeConnectionsMaxLabel; - - // SchemaGeneration - public static String PersistenceXmlSchemaGenerationTab_title; - public static String PersistenceXmlSchemaGenerationTab_sectionTitle; - public static String PersistenceXmlSchemaGenerationTab_sectionDescription; - public static String PersistenceXmlSchemaGenerationTab_defaultWithOneParam; - public static String PersistenceXmlSchemaGenerationTab_defaultEmpty; - - public static String PersistenceXmlSchemaGenerationTab_ddlGenerationTypeLabel; - public static String PersistenceXmlSchemaGenerationTab_outputModeLabel; - - public static String PersistenceXmlSchemaGenerationTab_createDdlFileNameLabel; - public static String PersistenceXmlSchemaGenerationTab_dropDdlFileNameLabel; - - public static String OutputModeComposite_both; - public static String OutputModeComposite_sql_script; - public static String OutputModeComposite_database; - - public static String DdlGenerationTypeComposite_none; - public static String DdlGenerationTypeComposite_create_tables; - public static String DdlGenerationTypeComposite_drop_and_create_tables; - - public static String PersistenceXmlSchemaGenerationTab_ddlGenerationLocationLabel; - - public static String DdlGenerationLocationComposite_dialogTitle; - public static String DdlGenerationLocationComposite_dialogMessage; - - // Caching - public static String PersistenceXmlCachingTab_title; - public static String PersistenceXmlCachingTab_sectionTitle; - public static String PersistenceXmlCachingTab_sectionDescription; - - public static String CacheDefaultsComposite_groupTitle; - - public static String PersistenceXmlCachingTab_defaultCacheTypeLabel; - public static String PersistenceXmlCachingTab_cacheTypeLabel; - - public static String PersistenceXmlCachingTab_defaultSharedCacheLabel; - public static String PersistenceXmlCachingTab_sharedCacheLabel; - - public static String PersistenceXmlCachingTab_defaultSharedCacheDefaultLabel; - public static String PersistenceXmlCachingTab_sharedCacheDefaultLabel; - - public static String CacheSizeComposite_cacheSize; - - public static String CacheTypeComposite_full; - public static String CacheTypeComposite_hard_weak; - public static String CacheTypeComposite_none; - public static String CacheTypeComposite_soft; - public static String CacheTypeComposite_soft_weak; - public static String CacheTypeComposite_weak; - - public static String DefaultCacheSizeComposite_defaultCacheSize; - - public static String DefaultCacheTypeComposite_full; - public static String DefaultCacheTypeComposite_hard_weak; - public static String DefaultCacheTypeComposite_none; - public static String DefaultCacheTypeComposite_soft; - public static String DefaultCacheTypeComposite_soft_weak; - public static String DefaultCacheTypeComposite_weak; - - public static String EntityDialog_selectEntity; - public static String EntityDialog_name; - - public static String CachingEntityListComposite_groupTitle; - public static String CachingEntityListComposite_editButton; - - public static String CachingEntityListComposite_dialogMessage; - public static String CachingEntityListComposite_dialogTitle; - - public static String PersistenceXmlCachingTab_FlushClearCacheLabel; - - public static String FlushClearCacheComposite_drop; - public static String FlushClearCacheComposite_drop_invalidate; - public static String FlushClearCacheComposite_merge; - - // Customization - public static String PersistenceXmlCustomizationTab_title; - public static String PersistenceXmlCustomizationTab_sectionTitle; - public static String PersistenceXmlCustomizationTab_sectionDescription; - public static String PersistenceXmlCustomizationTab_defaultWithOneParam; - - public static String PersistenceXmlCustomizationTab_weavingLabel; - - public static String PersistenceXmlCustomizationTab_weavingLazyLabelDefault; - public static String PersistenceXmlCustomizationTab_weavingLazyLabel; - - public static String PersistenceXmlCustomizationTab_weavingChangeTrackingLabelDefault; - public static String PersistenceXmlCustomizationTab_weavingChangeTrackingLabel; - - public static String PersistenceXmlCustomizationTab_weavingFetchGroupsLabelDefault; - public static String PersistenceXmlCustomizationTab_weavingFetchGroupsLabel; - - public static String PersistenceXmlCustomizationTab_weavingInternalLabelDefault; - public static String PersistenceXmlCustomizationTab_weavingInternalLabel; - - public static String PersistenceXmlCustomizationTab_weavingEagerLabelDefault; - public static String PersistenceXmlCustomizationTab_weavingEagerLabel; - public static String PersistenceXmlCustomizationTab_defaultEmpty; - - public static String PersistenceXmlCustomizationTab_throwExceptionsLabelDefault; - public static String PersistenceXmlCustomizationTab_throwExceptionsLabel; - - public static String PersistenceXmlCustomizationTab_exceptionHandlerLabel; - - public static String WeavingComposite_true_; - public static String WeavingComposite_false_; - public static String WeavingComposite_static_; - - public static String CustomizationEntityListComposite_groupTitle; - public static String CustomizationEntityListComposite_editButton; - - public static String CustomizationEntityListComposite_dialogMessage; - public static String CustomizationEntityListComposite_dialogTitle; - - public static String PersistenceXmlCustomizationTab_customizerLabel; - public static String PersistenceXmlCustomizationTab_sessionCustomizerLabel; - public static String PersistenceXmlCustomizationTab_noName; - - public static String PersistenceXmlCustomizationTab_validationOnlyLabel; - public static String PersistenceXmlCustomizationTab_validationOnlyLabelDefault; - - public static String PersistenceXmlCustomizationTab_profilerLabel; - public static String PersistenceXmlCustomizationTab_browse; - - public static String ProfilerComposite_performance_profiler; - public static String ProfilerComposite_query_monitor; - public static String ProfilerComposite_no_profiler; - - // Logging - public static String PersistenceXmlLoggingTab_title; - public static String PersistenceXmlLoggingTab_sectionTitle; - public static String PersistenceXmlLoggingTab_sectionDescription; - public static String PersistenceXmlLoggingTab_defaultWithOneParam; - public static String PersistenceXmlLoggingTab_defaultEmpty; - - public static String PersistenceXmlLoggingTab_loggingLevelLabel; - - public static String LoggingLevelComposite_off; - public static String LoggingLevelComposite_severe; - public static String LoggingLevelComposite_warning; - public static String LoggingLevelComposite_info; - public static String LoggingLevelComposite_config; - public static String LoggingLevelComposite_fine; - public static String LoggingLevelComposite_finer; - public static String LoggingLevelComposite_finest; - public static String LoggingLevelComposite_all; - - public static String PersistenceXmlLoggingTab_loggerLabel; - public static String PersistenceXmlLoggingTab_browse; - - public static String LoggerComposite_default_logger; - public static String LoggerComposite_java_logger; - public static String LoggerComposite_server_logger; - - public static String PersistenceXmlLoggingTab_timestampLabel; - public static String PersistenceXmlLoggingTab_timestampLabelDefault; - public static String PersistenceXmlLoggingTab_threadLabel; - public static String PersistenceXmlLoggingTab_threadLabelDefault; - public static String PersistenceXmlLoggingTab_sessionLabel; - public static String PersistenceXmlLoggingTab_sessionLabelDefault; - public static String PersistenceXmlLoggingTab_exceptionsLabel; - public static String PersistenceXmlLoggingTab_exceptionsLabelDefault; - - public static String PersistenceXmlLoggingTab_loggersLabel; - public static String PersistenceXmlLoggingTab_loggingFileLabel; - - public static String LoggingFileLocationComposite_dialogTitle; - public static String LoggingFileLocationComposite_dialogMessage; - - // Session Options - public static String PersistenceXmlOptionsTab_title; - public static String PersistenceXmlOptionsTab_sessionSectionTitle; - public static String PersistenceXmlOptionsTab_sessionSectionDescription; - public static String PersistenceXmlOptionsTab_defaultWithOneParam; - public static String PersistenceXmlOptionsTab_defaultEmpty; - - public static String PersistenceXmlOptionsTab_sessionName; - public static String PersistenceXmlOptionsTab_sessionsXml; - - public static String PersistenceXmlOptionsTab_includeDescriptorQueriesLabel; - public static String PersistenceXmlOptionsTab_includeDescriptorQueriesLabelDefault; - - public static String PersistenceXmlOptionsTab_eventListenerLabel; - public static String PersistenceXmlOptionsTab_targetDatabaseLabel; - - public static String PersistenceXmlOptionsTab_miscellaneousSectionTitle; - public static String PersistenceXmlOptionsTab_miscellaneousSectionDescription; - - public static String PersistenceXmlOptionsTab_temporalMutableLabel; - public static String PersistenceXmlOptionsTab_temporalMutableLabelDefault; - - public static String TargetDatabaseComposite_attunity; - public static String TargetDatabaseComposite_auto; - public static String TargetDatabaseComposite_cloudscape; - public static String TargetDatabaseComposite_database; - public static String TargetDatabaseComposite_db2; - public static String TargetDatabaseComposite_db2mainframe; - public static String TargetDatabaseComposite_dbase; - public static String TargetDatabaseComposite_derby; - public static String TargetDatabaseComposite_hsql; - public static String TargetDatabaseComposite_informix; - public static String TargetDatabaseComposite_javadb; - public static String TargetDatabaseComposite_mysql; - public static String TargetDatabaseComposite_oracle; - public static String TargetDatabaseComposite_oracle11; - public static String TargetDatabaseComposite_oracle10; - public static String TargetDatabaseComposite_oracle9; - public static String TargetDatabaseComposite_oracle8; - public static String TargetDatabaseComposite_pointbase; - public static String TargetDatabaseComposite_postgresql; - public static String TargetDatabaseComposite_sqlanywhere; - public static String TargetDatabaseComposite_sqlserver; - public static String TargetDatabaseComposite_sybase; - public static String TargetDatabaseComposite_timesten; - - public static String PersistenceXmlOptionsTab_targetServerLabel; - - public static String TargetServerComposite_none; - public static String TargetServerComposite_oc4j; - public static String TargetServerComposite_sunas9; - public static String TargetServerComposite_websphere; - public static String TargetServerComposite_websphere_6_1; - public static String TargetServerComposite_weblogic; - public static String TargetServerComposite_weblogic_9; - public static String TargetServerComposite_weblogic_10; - public static String TargetServerComposite_jboss; - - // DDL Generation - public static String EclipseLinkDDLGeneratorUi_generatingDDLWarningTitle; - public static String EclipseLinkDDLGeneratorUi_generatingDDLWarningMessage; - public static String EclipseLinkDDLGeneratorUi_error; - - private static final String BUNDLE_NAME = "eclipselink_ui"; //$NON-NLS-1$ - private static final Class BUNDLE_CLASS = EclipseLinkUiMessages.class; - static { - NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS); - } - - private EclipseLinkUiMessages() { - throw new UnsupportedOperationException(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/EclipseLinkDDLGeneratorUi.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/EclipseLinkDDLGeneratorUi.java deleted file mode 100644 index 1a23b0742a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/EclipseLinkDDLGeneratorUi.java +++ /dev/null @@ -1,167 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2007, 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.ddlgen; - -import java.util.Iterator; - -import org.eclipse.core.resources.IWorkspaceRunnable; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.window.Window; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.jpt.core.JpaPlatform; -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.core.context.persistence.Persistence; -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.eclipselink.core.internal.ddlgen.EclipseLinkDDLGenerator; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.ddlgen.wizards.GenerateDDLWizard; -import org.eclipse.jpt.utility.internal.StringTools; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; - -/** - * EclipseLinkDLLGeneratorUi is used by the EclipseLinkPlatformUi to initiate - * the execution of EclipseLink DDL generator. - */ -public class EclipseLinkDDLGeneratorUi -{ - private final JpaProject project; - private static final String CR = StringTools.CR; - - // ********** constructors ********** - - public static void generate(JpaProject project) { - new EclipseLinkDDLGeneratorUi(project).generate(); - } - - private EclipseLinkDDLGeneratorUi(JpaProject project) { - super(); - if (project == null) { - throw new NullPointerException(); - } - this.project = project; - } - - // ********** behavior ********** - - protected void generate() { - - PersistenceUnit persistenceUnit = this.getPersistenceUnits().next(); // Take the first persistenceUnit - String puName = persistenceUnit.getName(); - if( ! this.displayGeneratingDDLWarning()) { - return; - } - - GenerateDDLWizard wizard = new GenerateDDLWizard(this.project); - WizardDialog dialog = new WizardDialog(this.getCurrentShell(), wizard); - dialog.create(); - if(wizard.getPageCount() > 0) { - int returnCode = dialog.open(); - if (returnCode == Window.CANCEL) { - return; - } - } - IWorkspaceRunnable runnable = new GenerateDDLRunnable(puName, this.project); - try { - ResourcesPlugin.getWorkspace().run(runnable, new NullProgressMonitor()); - } - catch (CoreException ex) { - throw new RuntimeException(ex); - } - } - - private Shell getCurrentShell() { - return Display.getCurrent().getActiveShell(); - } - - private boolean displayGeneratingDDLWarning() { - String message = org.eclipse.osgi.util.NLS.bind( - EclipseLinkUiMessages.EclipseLinkDDLGeneratorUi_generatingDDLWarningMessage, - CR, CR + CR); - - return MessageDialog.openQuestion( - this.getCurrentShell(), - EclipseLinkUiMessages.EclipseLinkDDLGeneratorUi_generatingDDLWarningTitle, - message); - } - - // ********** Persistence Unit ********** - - protected JpaPlatform getPlatform() { - return this.project.getJpaPlatform(); - } - - protected Iterator getPersistenceUnits() { - return this.getPersistence().persistenceUnits(); - } - - protected Persistence getPersistence() { - return this.project.getRootContextNode().getPersistenceXml().getPersistence(); - } - - // ********** runnable ********** - - static class GenerateDDLRunnable implements IWorkspaceRunnable { - private final String puName; - private final JpaProject project; - - GenerateDDLRunnable(String puName, JpaProject project) { - super(); - this.puName = puName; - this.project = project; - } - - public void run(IProgressMonitor monitor) { - String projectLocation = this.project.getProject().getLocation().toString(); - try { - EclipseLinkDDLGenerator.generate(this.puName, this.project, projectLocation, monitor); - } - catch (OperationCanceledException e) { - return; - // fall through and tell monitor we are done - } - catch (RuntimeException re) { - String msg = re.getMessage(); - String message = (msg == null) ? re.toString() : msg; - - this.logError(message); - throw new RuntimeException(re); - } - } - - protected void logError(String message) { - this.displayError(message); - } - - private void displayError(String message) { - MessageDialog.openError( - getShell(), - EclipseLinkUiMessages.EclipseLinkDDLGeneratorUi_error, - message - ); - } - - private Shell getShell() { - Display display = Display.getCurrent(); - Shell shell = (display == null) ? null : display.getActiveShell(); - if (shell == null && display != null) { - Shell[] shells = display.getShells(); - if (shells.length > 0) - shell = shells[0]; - } - return shell; - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/wizards/GenerateDDLWizard.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/wizards/GenerateDDLWizard.java deleted file mode 100644 index 364e5b2bab..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/ddlgen/wizards/GenerateDDLWizard.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2007, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.ddlgen.wizards; - -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.db.ConnectionProfile; -import org.eclipse.jpt.ui.internal.JptUiMessages; -import org.eclipse.jpt.ui.internal.wizards.DatabaseSchemaWizardPage; - -/** - * GenerateDDLWizard - */ -public class GenerateDDLWizard extends Wizard { - - private JpaProject jpaProject; - - private DatabaseSchemaWizardPage dbSettingsPage; - - public GenerateDDLWizard(JpaProject jpaProject) { - super(); - this.jpaProject = jpaProject; - this.setWindowTitle(JptUiMessages.GenerateDDLWizard_title); - } - - @Override - public void addPages() { - super.addPages(); - if (this.getJpaProjectConnectionProfile() == null) { - this.dbSettingsPage = new DatabaseSchemaWizardPage(this.jpaProject); - this.addPage(this.dbSettingsPage); - } - } - - @Override - public boolean performFinish() { - return (this.getJpaProjectConnectionProfile() != null); - } - - @Override - public boolean canFinish() { - return this.dbSettingsPage.isPageComplete(); - } - - private ConnectionProfile getJpaProjectConnectionProfile() { - return this.jpaProject.getConnectionProfile(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkAlwaysRefreshComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkAlwaysRefreshComposite.java deleted file mode 100644 index 14367134e4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkAlwaysRefreshComposite.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - - -/** - * This composite simply shows a tri-state check box for the Always Refresh option. - * - * @see EclipseLinkCaching - * @see EclipseLinkCachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkAlwaysRefreshComposite extends FormPane -{ - /** - * Creates a new OptionalComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkAlwaysRefreshComposite(FormPane parentPane, - Composite parent) - { - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiDetailsMessages.EclipseLinkAlwaysRefreshComposite_alwaysRefreshLabel, - buildAlwaysRefreshHolder(), - buildAlwaysRefreshStringHolder(), - EclipseLinkHelpContextIds.CACHING_ALWAYS_REFRESH - ); - } - - private WritablePropertyValueModel buildAlwaysRefreshHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_ALWAYS_REFRESH_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSpecifiedAlwaysRefresh(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSpecifiedAlwaysRefresh(value); - } - }; - } - - private PropertyValueModel buildAlwaysRefreshStringHolder() { - return new TransformationPropertyValueModel(buildDefaultAlwaysRefreshHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiDetailsMessages.EclipseLinkAlwaysRefreshComposite_alwaysRefreshDefault, defaultStringValue); - } - return EclipseLinkUiDetailsMessages.EclipseLinkAlwaysRefreshComposite_alwaysRefreshLabel; - } - }; - } - - private PropertyValueModel buildDefaultAlwaysRefreshHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.SPECIFIED_ALWAYS_REFRESH_PROPERTY, - EclipseLinkCaching.DEFAULT_ALWAYS_REFRESH_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSpecifiedAlwaysRefresh() != null) { - return null; - } - return Boolean.valueOf(this.subject.isDefaultAlwaysRefresh()); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingComposite.java deleted file mode 100644 index c2b3cfcca0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingComposite.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicCollectionMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkBasicCollectionMappingComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLinkBasicCollectionMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkBasicCollectionMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingUiDefinition.java deleted file mode 100644 index b3b5f8869e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicCollectionMappingUiDefinition.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.EclipseLinkMappingKeys; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicCollectionMapping; -import org.eclipse.jpt.ui.JptUiPlugin; -import org.eclipse.jpt.ui.details.MappingUiDefinition; -import org.eclipse.jpt.ui.internal.JptUiIcons; -import org.eclipse.swt.graphics.Image; - -public abstract class EclipseLinkBasicCollectionMappingUiDefinition - implements MappingUiDefinition -{ - - protected EclipseLinkBasicCollectionMappingUiDefinition() { - super(); - } - - public Image getImage() { - return JptUiPlugin.getImage(JptUiIcons.JPA_CONTENT); - } - - public String getLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkBasicCollectionMappingUiProvider_label; - } - - public String getLinkLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkBasicCollectionMappingUiProvider_linkLabel; - } - - public String getKey() { - return EclipseLinkMappingKeys.BASIC_COLLECTION_ATTRIBUTE_MAPPING_KEY; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingComposite.java deleted file mode 100644 index 289a2f2b8d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingComposite.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicMapMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkBasicMapMappingComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLinkBasicCollectionMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkBasicMapMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingUiDefinition.java deleted file mode 100644 index 6679187c00..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMapMappingUiDefinition.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.EclipseLinkMappingKeys; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicMapMapping; -import org.eclipse.jpt.ui.JptUiPlugin; -import org.eclipse.jpt.ui.details.MappingUiDefinition; -import org.eclipse.jpt.ui.internal.JptUiIcons; -import org.eclipse.swt.graphics.Image; - -public abstract class EclipseLinkBasicMapMappingUiDefinition - implements MappingUiDefinition -{ - - protected EclipseLinkBasicMapMappingUiDefinition() { - super(); - } - - public Image getImage() { - return JptUiPlugin.getImage(JptUiIcons.JPA_CONTENT); - } - - public String getLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkBasicMapMappingUiProvider_label; - } - - public String getLinkLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkBasicMapMappingUiProvider_linkLabel; - } - - public String getKey() { - return EclipseLinkMappingKeys.BASIC_MAP_ATTRIBUTE_MAPPING_KEY; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMappingComposite.java deleted file mode 100644 index 654be5c52f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkBasicMappingComposite.java +++ /dev/null @@ -1,280 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.BasicMapping; -import org.eclipse.jpt.core.context.Column; -import org.eclipse.jpt.core.context.Converter; -import org.eclipse.jpt.core.context.ConvertibleMapping; -import org.eclipse.jpt.core.context.EnumeratedConverter; -import org.eclipse.jpt.core.context.TemporalConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkMutable; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.ui.internal.details.EnumTypeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TemporalTypeComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ColumnComposite                                                       | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TemporalTypeComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EnumTypeComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | MutableComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | LobComposite                                                          | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see BasicMapping - * @see ColumnComposite - * @see EnumTypeComposite - * @see FetchTypeComposite - * @see LobComposite - * @see OptionalComposite - * @see TemporalTypeComposite - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkBasicMappingComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new BasicMappingComposite. - * - * @param subjectHolder The holder of the subject IBasicMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkBasicMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeTypePane(container); - } - - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new ColumnComposite(this, buildColumnHolder(), container); - - // Align the widgets under the ColumnComposite - container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - - new FetchTypeComposite(this, container); - new OptionalComposite(this, addSubPane(container, 4)); - - // Mutable widgets - new EclipseLinkMutableComposite(this, buildMutableHolder(), container); - } - - protected void initializeTypePane(Composite container) { - - container = addCollapsableSection( - container, - JptUiDetailsMessages.TypeSection_type - ); - ((GridLayout) container.getLayout()).numColumns = 2; - - // No converter - Button noConverterButton = addRadioButton( - container, - JptUiDetailsMessages.TypeSection_default, - buildNoConverterHolder(), - null); - ((GridData) noConverterButton.getLayoutData()).horizontalSpan = 2; - - // Lob - Button lobButton = addRadioButton( - container, - JptUiDetailsMessages.TypeSection_lob, - buildConverterBooleanHolder(Converter.LOB_CONVERTER), - null); - ((GridData) lobButton.getLayoutData()).horizontalSpan = 2; - - PropertyValueModel specifiedConverterHolder = buildSpecifiedConverterHolder(); - // Temporal - addRadioButton( - container, - JptUiDetailsMessages.TypeSection_temporal, - buildConverterBooleanHolder(Converter.TEMPORAL_CONVERTER), - null); - registerSubPane(new TemporalTypeComposite(buildTemporalConverterHolder(specifiedConverterHolder), container, getWidgetFactory())); - - - // Enumerated - addRadioButton( - container, - JptUiDetailsMessages.TypeSection_enumerated, - buildConverterBooleanHolder(Converter.ENUMERATED_CONVERTER), - null); - registerSubPane(new EnumTypeComposite(buildEnumeratedConverterHolder(specifiedConverterHolder), container, getWidgetFactory())); - - // EclipseLink Converter - Button elConverterButton = addRadioButton( - container, - EclipseLinkUiDetailsMessages.TypeSection_converted, - buildConverterBooleanHolder(EclipseLinkConvert.ECLIPSE_LINK_CONVERTER), - null); - ((GridData) elConverterButton.getLayoutData()).horizontalSpan = 2; - - Pane convertComposite = buildConvertComposite(buildEclipseLinkConverterHolder(specifiedConverterHolder), container); - GridData gridData = (GridData) convertComposite.getControl().getLayoutData(); - gridData.horizontalSpan = 2; - gridData.horizontalIndent = 20; - registerSubPane(convertComposite); - } - - protected Pane buildConvertComposite(PropertyValueModel convertHolder, Composite container) { - return new EclipseLinkConvertComposite(convertHolder, container, getWidgetFactory()); - } - - protected PropertyValueModel buildColumnHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Column transform_(BasicMapping value) { - return value.getColumn(); - } - }; - } - - protected PropertyValueModel buildMutableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkMutable buildValue_() { - return ((EclipseLinkBasicMapping) this.subject).getMutable(); - } - }; - } - - protected PropertyValueModel buildSpecifiedConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Converter buildValue_() { - return this.subject.getSpecifiedConverter(); - } - }; - } - - protected PropertyValueModel buildTemporalConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected TemporalConverter transform_(Converter converter) { - return (converter != null && converter.getType() == Converter.TEMPORAL_CONVERTER) ? (TemporalConverter) converter : null; - } - }; - } - - protected PropertyValueModel buildEnumeratedConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EnumeratedConverter transform_(Converter converter) { - return (converter != null && converter.getType() == Converter.ENUMERATED_CONVERTER) ? (EnumeratedConverter) converter : null; - } - }; - } - - protected PropertyValueModel buildEclipseLinkConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EclipseLinkConvert transform_(Converter converter) { - return (converter != null && converter.getType() == EclipseLinkConvert.ECLIPSE_LINK_CONVERTER) ? (EclipseLinkConvert) converter : null; - } - }; - } - - protected WritablePropertyValueModel buildNoConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getSpecifiedConverter() == null); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setSpecifiedConverter(Converter.NO_CONVERTER); - } - } - }; - } - - protected WritablePropertyValueModel buildConverterBooleanHolder(final String converterType) { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - Converter converter = this.subject.getSpecifiedConverter(); - if (converter == null) { - return Boolean.FALSE; - } - return Boolean.valueOf(converter.getType() == converterType); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setSpecifiedConverter(converterType); - } - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheCoordinationTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheCoordinationTypeComposite.java deleted file mode 100644 index 9eb932eeb8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheCoordinationTypeComposite.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.Collection; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCacheCoordinationType; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * Here is the layout of this pane: - *
- * ----------------------------------------------------------------------------
- * |                    ----------------------------------------------------- |
- * | Coordination Type: |                                                 |v| |
- * |                    ----------------------------------------------------- |
- * ----------------------------------------------------------------------------
- * - * @see EclipseLinkCaching - * @see EclipseLinkCachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkCacheCoordinationTypeComposite extends FormPane { - - /** - * Creates a new CacheTypeComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkCacheCoordinationTypeComposite(FormPane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private EnumFormComboViewer addCacheCoordinationTypeCombo(Composite container) { - - return new EnumFormComboViewer(this, container) { - - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(EclipseLinkCaching.DEFAULT_COORDINATION_TYPE_PROPERTY); - propertyNames.add(EclipseLinkCaching.SPECIFIED_COORDINATION_TYPE_PROPERTY); - } - - @Override - protected EclipseLinkCacheCoordinationType[] getChoices() { - return EclipseLinkCacheCoordinationType.values(); - } - - @Override - protected EclipseLinkCacheCoordinationType getDefaultValue() { - return getSubject().getDefaultCoordinationType(); - } - - @Override - protected String displayString(EclipseLinkCacheCoordinationType value) { - return buildDisplayString( - EclipseLinkUiDetailsMessages.class, - EclipseLinkCacheCoordinationTypeComposite.this, - value - ); - } - - @Override - protected EclipseLinkCacheCoordinationType getValue() { - return getSubject().getSpecifiedCoordinationType(); - } - - @Override - protected void setValue(EclipseLinkCacheCoordinationType value) { - getSubject().setSpecifiedCoordinationType(value); - } - - @Override - protected boolean sortChoices() { - return false; - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledComposite( - container, - EclipseLinkUiDetailsMessages.EclipseLinkCacheCoordinationTypeComposite_label, - addCacheCoordinationTypeCombo(container), - EclipseLinkHelpContextIds.CACHING_CACHE_COORDINATION_TYPE - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheSizeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheSizeComposite.java deleted file mode 100644 index b4c3e885ef..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheSizeComposite.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here is the layout of this pane: - *
- * ----------------------------------------------------------------------------
- * |                      ---------------                                      |
- * |   Size:              | I         |I|  Default (XXX)                       |
- * |                      ---------------                                      |
- * ----------------------------------------------------------------------------
- * - * @see EclipseLinkCaching - * @see EclipseLinkCachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkCacheSizeComposite extends FormPane { - - /** - * Creates a new CacheSizeComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkCacheSizeComposite(FormPane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addSizeCombo(container); - } - - private void addSizeCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkCacheSizeComposite_size; - } - - @Override - protected String getHelpId() { - return null;//JpaHelpContextIds.MAPPING_COLUMN_LENGTH; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.DEFAULT_SIZE_PROPERTY) { - @Override - protected Integer buildValue_() { - return Integer.valueOf(this.subject.getDefaultSize()); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_SIZE_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getSpecifiedSize(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setSpecifiedSize(value); - } - }; - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheTypeComposite.java deleted file mode 100644 index 915d137951..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCacheTypeComposite.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.Collection; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCacheType; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * Here is the layout of this pane: - *
- * ----------------------------------------------------------------------------
- * |       ------------------------------------------------------------------ |
- * | Type: |                                                              |v| |
- * |       ------------------------------------------------------------------ |
- * ----------------------------------------------------------------------------
- * - * @see EclipseLinkCaching - * @see EclipseLinkCachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkCacheTypeComposite extends FormPane { - - /** - * Creates a new CacheTypeComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkCacheTypeComposite(FormPane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private EnumFormComboViewer addCacheTypeCombo(Composite container) { - - return new EnumFormComboViewer(this, container) { - - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(EclipseLinkCaching.DEFAULT_TYPE_PROPERTY); - propertyNames.add(EclipseLinkCaching.SPECIFIED_TYPE_PROPERTY); - } - - @Override - protected EclipseLinkCacheType[] getChoices() { - return EclipseLinkCacheType.values(); - } - - @Override - protected EclipseLinkCacheType getDefaultValue() { - return getSubject().getDefaultType(); - } - - @Override - protected String displayString(EclipseLinkCacheType value) { - return buildDisplayString( - EclipseLinkUiDetailsMessages.class, - EclipseLinkCacheTypeComposite.this, - value - ); - } - - @Override - protected EclipseLinkCacheType getValue() { - return getSubject().getSpecifiedType(); - } - - @Override - protected void setValue(EclipseLinkCacheType value) { - getSubject().setSpecifiedType(value); - } - - @Override - protected boolean sortChoices() { - return false; - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledComposite( - container, - EclipseLinkUiDetailsMessages.EclipseLinkCacheTypeComposite_label, - addCacheTypeCombo(container), - EclipseLinkHelpContextIds.CACHING_CACHE_TYPE - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCachingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCachingComposite.java deleted file mode 100644 index 8a229e5fb0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCachingComposite.java +++ /dev/null @@ -1,168 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.jpt.core.context.Entity; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkEntityComposite; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane shows the caching options. - *

- * Here the layout of this pane: - *

- * -----------------------------------------------------------------------------
- * | x Shared                                                                  |
- * |    CacheTypeComposite                                                     |
- * |    CacheSizeComposite                                                     |
- * |    > Advanced   	                                                       |
- * |    	ExpiryComposite                                                    |
- * |    	AlwaysRefreshComposite                                             |
- * |   		RefreshOnlyIfNewerComposite                                        |
- * |    	DisableHitsComposite                                               |
- * |    	CacheCoordinationComposite                                         |
- * | ExistenceTypeComposite                                                    |
- * -----------------------------------------------------------------------------
- * - * @see Entity - * @see EclipseLinkCaching - * @see JavaEclipseLinkEntityComposite - The parent container - * @see EclipseLinkCacheTypeComposite - * @see EclipseLinkCacheSizeComposite - * @see EclipseLinkAlwaysRefreshComposite - * @see EclipseLinkRefreshOnlyIfNewerComposite - * @see EclipseLinkDisableHitsComposite - * - * @version 2.1 - * @since 2.1 - */ -public abstract class EclipseLinkCachingComposite extends FormPane -{ - - protected EclipseLinkCachingComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - - //Shared Check box, uncheck this and the rest of the panel is disabled - addTriStateCheckBoxWithDefault( - addSubPane(container, 8), - EclipseLinkUiDetailsMessages.EclipseLinkCachingComposite_sharedLabel, - buildSpecifiedSharedHolder(), - buildSharedStringHolder(), - EclipseLinkHelpContextIds.CACHING_SHARED - ); - - Composite subPane = addSubPane(container, 0, 16); - - Collection> panes = new ArrayList>(); - - panes.add(new EclipseLinkCacheTypeComposite(this, subPane)); - panes.add(new EclipseLinkCacheSizeComposite(this, subPane)); - - // Advanced sub-pane - Composite advancedSection = addCollapsableSubSection( - subPane, - EclipseLinkUiDetailsMessages.EclipseLinkCachingComposite_advanced, - new SimplePropertyValueModel(Boolean.FALSE) - ); - - initializeAdvancedPane(addSubPane(advancedSection, 0, 16), panes); - - new PaneEnabler(buildSharedCacheEnabler(), panes); - - initializeExistenceCheckingComposite(addSubPane(container, 8)); - } - - protected void initializeAdvancedPane(Composite container, Collection> panes) { - panes.add(new EclipseLinkExpiryComposite(this, container)); - panes.add(new EclipseLinkAlwaysRefreshComposite(this, container)); - panes.add(new EclipseLinkRefreshOnlyIfNewerComposite(this, container)); - panes.add(new EclipseLinkDisableHitsComposite(this, container)); - panes.add(new EclipseLinkCacheCoordinationTypeComposite(this, container)); - } - - protected abstract void initializeExistenceCheckingComposite(Composite parent); - - private PropertyValueModel buildSharedCacheEnabler() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.SPECIFIED_SHARED_PROPERTY, - EclipseLinkCaching.DEFAULT_SHARED_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.isShared()); - } - }; - } - - private WritablePropertyValueModel buildSpecifiedSharedHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_SHARED_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSpecifiedShared(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSpecifiedShared(value); - } - }; - } - - private PropertyValueModel buildSharedStringHolder() { - return new TransformationPropertyValueModel(buildDefaultSharedHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiDetailsMessages.EclipseLinkCachingComposite_sharedLabelDefault, defaultStringValue); - } - return EclipseLinkUiDetailsMessages.EclipseLinkCachingComposite_sharedLabel; - } - }; - } - - private PropertyValueModel buildDefaultSharedHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.SPECIFIED_SHARED_PROPERTY, - EclipseLinkCaching.DEFAULT_SHARED_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSpecifiedShared() != null) { - return null; - } - return Boolean.valueOf(this.subject.isDefaultShared()); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkChangeTrackingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkChangeTrackingComposite.java deleted file mode 100644 index c2d505a75f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkChangeTrackingComposite.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.Collection; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkChangeTracking; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkChangeTrackingType; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here is the layout of this pane: - *
- * -------------------------------------------------------------------------
- * |       			  		---------------------------------------------- |
- * | Change Tracking :      |                                          |v| |
- * |       					---------------------------------------------- |
- * -------------------------------------------------------------------------
- * - * @see EclipseLinkChangeTracking - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkChangeTrackingComposite extends FormPane { - - /** - * Creates a new ChangeTrackingComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkChangeTrackingComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledComposite( - container, - addLabel( - container, - EclipseLinkUiDetailsMessages.EclipseLinkChangeTrackingComposite_label), - addChangeTrackingTypeCombo(container).getControl(), - null - ); - } - - private EnumFormComboViewer addChangeTrackingTypeCombo(Composite container) { - - return new EnumFormComboViewer(this, container) { - - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(EclipseLinkChangeTracking.DEFAULT_TYPE_PROPERTY); - propertyNames.add(EclipseLinkChangeTracking.SPECIFIED_TYPE_PROPERTY); - } - - @Override - protected EclipseLinkChangeTrackingType[] getChoices() { - return EclipseLinkChangeTrackingType.values(); - } - - @Override - protected EclipseLinkChangeTrackingType getDefaultValue() { - return getSubject().getDefaultType(); - } - - @Override - protected String displayString(EclipseLinkChangeTrackingType value) { - return buildDisplayString( - EclipseLinkUiDetailsMessages.class, - EclipseLinkChangeTrackingComposite.this, - value - ); - } - - @Override - protected EclipseLinkChangeTrackingType getValue() { - return getSubject().getSpecifiedType(); - } - - @Override - protected void setValue(EclipseLinkChangeTrackingType value) { - getSubject().setSpecifiedType(value); - } - - @Override - protected boolean sortChoices() { - return false; - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java deleted file mode 100644 index 0fb95d9182..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.Set; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConversionValue; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkObjectTypeConverter; -import org.eclipse.jpt.ui.internal.widgets.DialogPane; -import org.eclipse.jpt.ui.internal.widgets.ValidatingDialog; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -/** - * Clients can use this dialog to prompt the user for SecondaryTable settings. - * Use the following once the dialog is closed: - * @see #getSelectedTable() - * @see #getSelectedCatalog() - * @see #getSelectedSchema() - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkConversionValueDialog extends ValidatingDialog { - - /** - * when creating a new EclipseLinkConversionValue, 'conversionValue' will be null - */ - private final EclipseLinkConversionValue conversionValue; - - private EclipseLinkObjectTypeConverter objectTypeConverter; - - // ********** constructors ********** - - /** - * Use this constructor to create a new conversion value - */ - public EclipseLinkConversionValueDialog(Shell parent, EclipseLinkObjectTypeConverter objectTypeConverter) { - this(parent,objectTypeConverter, null); - } - - /** - * Use this constructor to edit an existing conversion value - */ - public EclipseLinkConversionValueDialog(Shell parent, EclipseLinkObjectTypeConverter objectTypeConverter, EclipseLinkConversionValue conversionValue) { - super(parent); - this.objectTypeConverter = objectTypeConverter; - this.conversionValue = conversionValue; - } - - @Override - protected EclipseLinkConversionValueStateObject buildStateObject() { - String dataValue = null; - String objectValue = null; - Set dataValues = CollectionTools.set(this.objectTypeConverter.dataValues()); - if (isEditDialog()) { - dataValue = this.conversionValue.getDataValue(); - objectValue = this.conversionValue.getObjectValue(); - //remove *this* dataValue, don't want a duplicate data value error - dataValues.remove(dataValue); - } - return new EclipseLinkConversionValueStateObject( - dataValue, - objectValue, - dataValues); - } - - // ********** open ********** - - @Override - protected void configureShell(Shell shell) { - super.configureShell(shell); - shell.setText(this.getTitle()); - } - - @Override - protected String getTitle() { - return (this.isAddDialog()) ? - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_addConversionValue - : - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_editConversionValue; - } - - @Override - protected String getDescriptionTitle() { - return (this.isAddDialog()) ? - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_addConversionValueDescriptionTitle - : - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_editConversionValueDescriptionTitle; - } - - @Override - protected String getDescription() { - return (this.isAddDialog()) ? - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_addConversionValueDescription - : - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_editConversionValueDescription; - } - - @Override - protected DialogPane buildLayout(Composite container) { - return new ConversionValueDialogPane(container); - } - - @Override - public void create() { - super.create(); - - ConversionValueDialogPane pane = (ConversionValueDialogPane) getPane(); - pane.selectAll(); - - getButton(OK).setEnabled(false); - } - - - // ********** convenience methods ********** - - protected boolean isAddDialog() { - return this.conversionValue == null; - } - - protected boolean isEditDialog() { - return ! this.isAddDialog(); - } - - - // ********** public API ********** - - /** - * Return the data value set in the text widget. - */ - public String getDataValue() { - return getSubject().getDataValue(); - } - - /** - * Return the object value set in the text widget. - */ - public String getObjectValue() { - return getSubject().getObjectValue(); - } - - private class ConversionValueDialogPane extends DialogPane { - - private Text dataValueText; - private Text objectValueText; - - ConversionValueDialogPane(Composite parent) { - super(EclipseLinkConversionValueDialog.this.getSubjectHolder(), parent); - } - - @Override - protected void initializeLayout(Composite container) { - this.dataValueText = addLabeledText( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_dataValue, - buildDataValueHolder() - ); - - this.objectValueText = addLabeledText( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConversionValueDialog_objectValue, - buildObjectValueHolder() - ); - } - - private WritablePropertyValueModel buildDataValueHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConversionValueStateObject.DATA_VALUE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getDataValue(); - } - - @Override - protected void setValue_(String value) { - this.subject.setDataValue(value); - } - }; - } - - private WritablePropertyValueModel buildObjectValueHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConversionValueStateObject.OBJECT_VALUE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getObjectValue(); - } - - @Override - protected void setValue_(String value) { - this.subject.setObjectValue(value); - } - }; - } - - void selectAll() { - this.dataValueText.selectAll(); - this.objectValueText.selectAll(); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueStateObject.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueStateObject.java deleted file mode 100644 index 90a3e40f6a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConversionValueStateObject.java +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.Collection; -import java.util.List; -import org.eclipse.jpt.utility.internal.StringTools; -import org.eclipse.jpt.utility.internal.node.AbstractNode; -import org.eclipse.jpt.utility.internal.node.Node; -import org.eclipse.jpt.utility.internal.node.Problem; - -/** - * This is the state object used by the NewNameDialog, which stores - * the current name and validates it when it is modified. - * - * @see NewNameDialog - * - * @version 2.1 - * @since 2.1 - */ -@SuppressWarnings("nls") -final class EclipseLinkConversionValueStateObject extends AbstractNode -{ - /** - * The initial dataValue or null - */ - private String dataValue; - - /** - * The collection of data values that can't be used or an empty collection - */ - private Collection dataValues; - - /** - * The initial objectValue or null - */ - private String objectValue; - - /** - * The Validator used to validate this state object. - */ - private Validator validator; - - /** - * Notifies a change in the data value property. - */ - static final String DATA_VALUE_PROPERTY = "dataValue"; - - /** - * Notifies a change in the object value property. - */ - static final String OBJECT_VALUE_PROPERTY = "objectValue"; - - /** - * Creates a new NewNameStateObject. - * - * @param name The initial input or null if no initial value can - * be specified - * @param names The collection of names that can't be used or an empty - * collection if none are available - */ - EclipseLinkConversionValueStateObject(String dataValue, String objectValue, Collection dataValues) { - super(null); - - this.dataValue = dataValue; - this.objectValue = objectValue; - this.dataValues = dataValues; - } - - private void addDataValueProblemsTo(List currentProblems) { - if (StringTools.stringIsEmpty(this.dataValue)) { - currentProblems.add(buildProblem(EclipseLinkUiDetailsMessages.EclipseLinkConversionValueStateObject_dataValueMustBeSpecified)); - } - else if (this.dataValues.contains(this.dataValue)) { - currentProblems.add(buildProblem(EclipseLinkUiDetailsMessages.EclipseLinkConversionValueStateObject_dataValueAlreadyExists)); - } - } - - private void addObjectValueProblemsTo(List currentProblems) { - if (StringTools.stringIsEmpty(this.objectValue)) { - currentProblems.add(buildProblem(EclipseLinkUiDetailsMessages.EclipseLinkConversionValueStateObject_objectValueMustBeSpecified)); - } - } - - @Override - protected void addProblemsTo(List currentProblems) { - super.addProblemsTo(currentProblems); - addDataValueProblemsTo(currentProblems); - addObjectValueProblemsTo(currentProblems); - } - - @Override - protected void checkParent(Node parentNode) { - //not parent - } - - public String displayString() { - return null; - } - - String getDataValue() { - return this.dataValue; - } - - String getObjectValue() { - return this.objectValue; - } - - public void setDataValue(String dataValue) { - String oldDataValue = this.dataValue; - this.dataValue = dataValue; - firePropertyChanged(DATA_VALUE_PROPERTY, oldDataValue, dataValue); - } - - public void setObjectValue(String objectValue) { - String oldObjectValue = this.objectValue; - this.objectValue = objectValue; - firePropertyChanged(OBJECT_VALUE_PROPERTY, oldObjectValue, objectValue); - } - - @Override - public void setValidator(Validator validator) { - this.validator = validator; - } - - @Override - public Validator getValidator() { - return this.validator; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConvertComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConvertComposite.java deleted file mode 100644 index 92a5baab86..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkConvertComposite.java +++ /dev/null @@ -1,362 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.ArrayList; -import java.util.ListIterator; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkObjectTypeConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkStructConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkTypeConverter; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceUnit; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.ArrayTools; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.StaticListValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * |            -------------------------------------------------------------- |
- * | Enum Type: |                                                          |v| |
- * |            -------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EclipseLinkConvert - * @see EclipseLinkBasicMappingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkConvertComposite extends FormPane -{ - - /** - * A key used to represent the default value, this is required to convert - * the selected item from a combo to null. This key is most - * likely never typed the user and it will help to convert the value to - * null when it's time to set the new selected value into the - * model. - */ - protected static String DEFAULT_KEY = "?!#!?#?#?default?#?!#?!#?"; //$NON-NLS-1$ - - - /** - * Creates a new EnumTypeComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkConvertComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_converterNameLabel, - buildConvertNameListHolder(), - buildConvertNameHolder(), - buildNameConverter(), - null - ); - SWTUtil.attachDefaultValueHandler(combo); - - Composite subSection = addCollapsableSubSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_defineConverterSection, - new SimplePropertyValueModel(Boolean.FALSE)); - - // No Converter - addRadioButton( - subSection, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_default, - buildNoConverterHolder(), - null); - PropertyValueModel converterHolder = buildConverterHolder(); - // CustomConverter - addRadioButton( - subSection, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_custom, - buildConverterHolder(EclipseLinkConverter.CUSTOM_CONVERTER), - null); - EclipseLinkCustomConverterComposite converterComposite = new EclipseLinkCustomConverterComposite(buildCustomConverterHolder(converterHolder), subSection, getWidgetFactory()); - GridData gridData = (GridData) converterComposite.getControl().getLayoutData(); - gridData.horizontalIndent = 20; - registerSubPane(converterComposite); - - // Type Converter - addRadioButton( - subSection, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_type, - buildConverterHolder(EclipseLinkConverter.TYPE_CONVERTER), - null); - EclipseLinkTypeConverterComposite typeConverterComposite = new EclipseLinkTypeConverterComposite(buildTypeConverterHolder(converterHolder), subSection, getWidgetFactory()); - gridData = (GridData) typeConverterComposite.getControl().getLayoutData(); - gridData.horizontalIndent = 20; - registerSubPane(typeConverterComposite); - - // Object Type Converter - addRadioButton( - subSection, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_objectType, - buildConverterHolder(EclipseLinkConverter.OBJECT_TYPE_CONVERTER), - null); - EclipseLinkObjectTypeConverterComposite objectTypeConverterComposite = new EclipseLinkObjectTypeConverterComposite(buildObjectTypeConverterHolder(converterHolder), subSection, getWidgetFactory()); - gridData = (GridData) objectTypeConverterComposite.getControl().getLayoutData(); - gridData.horizontalIndent = 20; - registerSubPane(objectTypeConverterComposite); - - // Struct Converter - addRadioButton( - subSection, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_struct, - buildConverterHolder(EclipseLinkConverter.STRUCT_CONVERTER), - null); - EclipseLinkStructConverterComposite structConverterComposite = new EclipseLinkStructConverterComposite(buildStructConverterHolder(converterHolder), subSection, getWidgetFactory()); - gridData = (GridData) structConverterComposite.getControl().getLayoutData(); - gridData.horizontalIndent = 20; - registerSubPane(structConverterComposite); - - new PaneEnabler(buildBooleanHolder(), this); - } - - protected final WritablePropertyValueModel buildConvertNameHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConvert.SPECIFIED_CONVERTER_NAME_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getSpecifiedConverterName(); - } - - @Override - protected void setValue_(String value) { - // Convert the default value or an empty string to null - if ((value != null) && - ((value.length() == 0) || value.startsWith(DEFAULT_KEY))) { - - value = null; - } - this.subject.setSpecifiedConverterName(value); - } - }; - } - private ListValueModel buildConvertNameListHolder() { - java.util.List> list = new ArrayList>(); - list.add(buildDefaultNameListHolder()); - list.add(buildReservedConverterNameListHolder()); - list.add(buildConverterNameListHolder()); - return new CompositeListValueModel, String>(list); - } - - protected ListValueModel buildDefaultNameListHolder() { - return new PropertyListValueModelAdapter( - buildDefaultNameHolder() - ); - } - - private WritablePropertyValueModel buildDefaultNameHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConvert.DEFAULT_CONVERTER_NAME_PROPERTY) { - @Override - protected String buildValue_() { - String name = this.subject.getDefaultConverterName(); - - if (name == null) { - name = DEFAULT_KEY; - } - else { - name = DEFAULT_KEY + name; - } - - return name; - } - }; - } - - private StringConverter buildNameConverter() { - return new StringConverter() { - public String convertToString(String value) { - - if (getSubject() == null) { - return value; - } - - if (value == null) { - value = getSubject().getDefaultConverterName(); - - if (value != null) { - value = DEFAULT_KEY + value; - } - else { - value = DEFAULT_KEY; - } - } - - if (value.startsWith(DEFAULT_KEY)) { - String defaultName = value.substring(DEFAULT_KEY.length()); - - if (defaultName.length() > 0) { - value = NLS.bind( - JptUiDetailsMessages.DefaultWithOneParam, - defaultName - ); - } - else { - value = JptUiDetailsMessages.DefaultEmpty; - } - } - - return value; - } - }; - } - - protected ListValueModel buildReservedConverterNameListHolder() { - return new StaticListValueModel(EclipseLinkConvert.RESERVED_CONVERTER_NAMES); - } - - protected ListValueModel buildConverterNameListHolder() { - return new ListAspectAdapter( - buildPersistenceUnitHolder(), - EclipseLinkPersistenceUnit.CONVERTERS_LIST)//TODO need EclipseLinkPersistenceUnit interface - { - @Override - protected ListIterator listIterator_() { - return CollectionTools.listIterator(ArrayTools.sort(this.subject.uniqueConverterNames())); - } - }; - } - - protected PropertyValueModel buildPersistenceUnitHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkPersistenceUnit buildValue_() { - return (EclipseLinkPersistenceUnit) getSubject().getPersistenceUnit(); - } - }; - } - - private WritablePropertyValueModel buildNoConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConvert.CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getConverter() == null); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setConverter(EclipseLinkConverter.NO_CONVERTER); - } - } - }; - } - - private WritablePropertyValueModel buildConverterHolder(final String converterType) { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConvert.CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - EclipseLinkConverter converter = this.subject.getConverter(); - if (converter == null) { - return Boolean.FALSE; - } - return Boolean.valueOf(converter.getType() == converterType); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setConverter(converterType); - } - } - }; - } - - private PropertyValueModel buildConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConvert.CONVERTER_PROPERTY) { - @Override - protected EclipseLinkConverter buildValue_() { - return this.subject.getConverter(); - } - }; - } - - private PropertyValueModel buildCustomConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EclipseLinkCustomConverter transform_(EclipseLinkConverter converter) { - return (converter != null && converter.getType() == EclipseLinkConverter.CUSTOM_CONVERTER) ? (EclipseLinkCustomConverter) converter : null; - } - }; - } - - private PropertyValueModel buildTypeConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EclipseLinkTypeConverter transform_(EclipseLinkConverter converter) { - return (converter != null && converter.getType() == EclipseLinkConverter.TYPE_CONVERTER) ? (EclipseLinkTypeConverter) converter : null; - } - }; - } - - private PropertyValueModel buildObjectTypeConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EclipseLinkObjectTypeConverter transform_(EclipseLinkConverter converter) { - return (converter != null && converter.getType() == EclipseLinkConverter.OBJECT_TYPE_CONVERTER) ? (EclipseLinkObjectTypeConverter) converter : null; - } - }; - } - - private PropertyValueModel buildStructConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EclipseLinkStructConverter transform_(EclipseLinkConverter converter) { - return (converter != null && converter.getType() == EclipseLinkConverter.STRUCT_CONVERTER) ? (EclipseLinkStructConverter) converter : null; - } - }; - } - - protected PropertyValueModel buildBooleanHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Boolean transform(EclipseLinkConvert value) { - if (getSubject() != null && getSubject().getParent().getPersistentAttribute().isVirtual()) { - return Boolean.FALSE; - } - return Boolean.valueOf(value != null); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomConverterComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomConverterComposite.java deleted file mode 100644 index 90174895e0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomConverterComposite.java +++ /dev/null @@ -1,155 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2009 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * |            -------------------------------------------------------------- |
- * | Name:      |                                                             ||
- * |            -------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EclipseLinkConverter - * @see EclipseLinkConvertComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkCustomConverterComposite extends FormPane -{ - - /** - * Creates a new ConverterComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkCustomConverterComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledText( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConverterComposite_nameTextLabel, - buildNameTextHolder()); - - addClassChooser(container); - - new PaneEnabler(buildBooleanHolder(), this); - } - - protected WritablePropertyValueModel buildNameTextHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), EclipseLinkConverter.NAME_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getName(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setName(value); - } - }; - } - - - private ClassChooserPane addClassChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCustomConverter.CONVERTER_CLASS_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getConverterClass(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - - this.subject.setConverterClass(value); - } - }; - } - - @Override - protected String getClassName() { - return getSubject().getConverterClass(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkConverterComposite_classLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubject().setConverterClass(className); - } - - @Override - protected String getSuperInterfaceName() { - return EclipseLinkCustomConverter.ECLIPSELINK_CONVERTER_CLASS_NAME; - } - - @Override - protected char getEnclosingTypeSeparator() { - return getSubject().getEnclosingTypeSeparator(); - } - }; - } - - - protected PropertyValueModel buildBooleanHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Boolean transform(EclipseLinkCustomConverter value) { -// if (getSubject() != null && getSubject().getParent().getPersistentAttribute().isVirtual()) { -// return Boolean.FALSE; -// } - return Boolean.valueOf(value != null); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomizerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomizerComposite.java deleted file mode 100644 index e06a1cb0f8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkCustomizerComposite.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomizer; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * - * @see EclipseLinkCustomizer - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkCustomizerComposite extends FormPane -{ - /** - * Creates a new CustomizerComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkCustomizerComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addCustomizerClassChooser(container); - } - - private ClassChooserPane addCustomizerClassChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCustomizer.SPECIFIED_CUSTOMIZER_CLASS_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getSpecifiedCustomizerClass(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - - this.subject.setSpecifiedCustomizerClass(value); - } - }; - } - - @Override - protected String getClassName() { - return getSubject().getSpecifiedCustomizerClass(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkCustomizerComposite_classLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubject().setSpecifiedCustomizerClass(className); - } - - @Override - protected String getSuperInterfaceName() { - return EclipseLinkCustomizer.ECLIPSELINK_DESCRIPTOR_CUSTOMIZER_CLASS_NAME; - } - - @Override - protected char getEnclosingTypeSeparator() { - return getSubject().getCustomizerClassEnclosingTypeSeparator(); - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkDisableHitsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkDisableHitsComposite.java deleted file mode 100644 index 5a360e11c0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkDisableHitsComposite.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * This composite simply shows a tri-state check box for the Disable Hits option. - * - * @see EclipseLinkCaching - * @see EclipseLinkCachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkDisableHitsComposite extends FormPane -{ - /** - * Creates a new OptionalComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkDisableHitsComposite(FormPane parentPane, - Composite parent) - { - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiDetailsMessages.EclipseLinkDisableHitsComposite_disableHitsLabel, - buildDisableHitsHolder(), - buildDisableHitsStringHolder(), - EclipseLinkHelpContextIds.CACHING_DISABLE_HITS - ); - } - - private WritablePropertyValueModel buildDisableHitsHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_DISABLE_HITS_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSpecifiedDisableHits(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSpecifiedDisableHits(value); - } - }; - } - - private PropertyValueModel buildDisableHitsStringHolder() { - return new TransformationPropertyValueModel(buildDefaultDisableHitsHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiDetailsMessages.EclipseLinkDisableHitsComposite_disableHitsDefault, defaultStringValue); - } - return EclipseLinkUiDetailsMessages.EclipseLinkDisableHitsComposite_disableHitsLabel; - } - }; - } - - private PropertyValueModel buildDefaultDisableHitsHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.SPECIFIED_DISABLE_HITS_PROPERTY, - EclipseLinkCaching.DEFAULT_DISABLE_HITS_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSpecifiedDisableHits() != null) { - return null; - } - return Boolean.valueOf(this.subject.isDefaultDisableHits()); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEmbeddableAdvancedComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEmbeddableAdvancedComposite.java deleted file mode 100644 index 4e8adf5d5f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEmbeddableAdvancedComposite.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.Embeddable; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkChangeTracking; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomizer; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkEmbeddable; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkEmbeddableAdvancedComposite extends FormPane { - - public EclipseLinkEmbeddableAdvancedComposite( - FormPane parentPane, - Composite parent) { - - super(parentPane, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_advanced - ); - - new EclipseLinkCustomizerComposite(this, buildCustomizerHolder(), container); - new EclipseLinkChangeTrackingComposite(this, buildChangeTrackingHolder(), container); - } - - private PropertyValueModel buildCustomizerHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkCustomizer buildValue_() { - return ((EclipseLinkEmbeddable) this.subject).getCustomizer(); - } - }; - } - - private PropertyValueModel buildChangeTrackingHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkChangeTracking buildValue_() { - return ((EclipseLinkEmbeddable) this.subject).getChangeTracking(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEntityAdvancedComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEntityAdvancedComposite.java deleted file mode 100644 index f7f706860d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkEntityAdvancedComposite.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.Entity; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkChangeTracking; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomizer; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkEntity; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkReadOnly; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkEntityAdvancedComposite extends FormPane { - - public EclipseLinkEntityAdvancedComposite( - FormPane parentPane, - Composite parent) { - - super(parentPane, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_advanced - ); - - new EclipseLinkReadOnlyComposite(this, buildReadOnlyHolder(), container); - new EclipseLinkCustomizerComposite(this, buildCustomizerHolder(), container); - new EclipseLinkChangeTrackingComposite(this, buildChangeTrackingHolder(), container); - } - - private PropertyValueModel buildReadOnlyHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkReadOnly buildValue_() { - return ((EclipseLinkEntity) this.subject).getReadOnly(); - } - }; - } - - private PropertyValueModel buildCustomizerHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkCustomizer buildValue_() { - return ((EclipseLinkEntity) this.subject).getCustomizer(); - } - }; - } - - private PropertyValueModel buildChangeTrackingHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkChangeTracking buildValue_() { - return ((EclipseLinkEntity) this.subject).getChangeTracking(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java deleted file mode 100644 index 50bf4926f8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java +++ /dev/null @@ -1,326 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkExpiryTimeOfDay; -import org.eclipse.jpt.ui.internal.utility.swt.SWTTools; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.DateTime; -import org.eclipse.swt.widgets.Group; - -/** - * Here is the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | - Expiry -------------------------------------------------------------- | |
- * | |                                                                       | |
- * | | o No expiry                                                           | |
- * | |                     					----------------                 | |
- * | | o Time to live expiry   Expire after | I          |I| milliseconds    | |
- * | |                                      ----------------                 | |
- * | |                     				    --------------------             | |
- * | | o Daily expiry          Expire at    | HH:MM:SS:AM/PM |I|             | |
- * | |                                      --------------------             | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EclipseLinkCaching - * @see EclipseLinkExpiryTimeOfDay - * @see EclipseLinkCachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkExpiryComposite extends FormPane { - - public EclipseLinkExpiryComposite(FormPane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - // Expiry group pane - Group expiryGroupPane = addTitledGroup( - container, - EclipseLinkUiDetailsMessages.EclipseLinkExpiryComposite_expirySection, - 2, - null - ); - - // No Expiry radio button - Button button = addRadioButton( - expiryGroupPane, - EclipseLinkUiDetailsMessages.EclipseLinkExpiryComposite_noExpiry, - buildNoExpiryHolder(), - null - ); - GridData gridData = new GridData(); - gridData.horizontalSpan = 2; - button.setLayoutData(gridData); - - - // Time To Live Expiry radio button - addRadioButton( - expiryGroupPane, - EclipseLinkUiDetailsMessages.EclipseLinkExpiryComposite_timeToLiveExpiry, - buildExpiryHolder(), - null - ); - - addTimeToLiveComposite(expiryGroupPane); - - // Daily Expiry radio button - addRadioButton( - expiryGroupPane, - EclipseLinkUiDetailsMessages.EclipseLinkExpiryComposite_dailyExpiry, - buildTimeOfDayExpiryBooleanHolder(), - null - ); - - addTimeOfDayComposite(expiryGroupPane); - } - - protected void addTimeToLiveComposite(Composite parent) { - Composite container = this.addSubPane(parent, 3, 0, 10, 0, 0); - - - Control expireAfterLabel = addUnmanagedLabel( - container, - EclipseLinkUiDetailsMessages.EclipseLinkExpiryComposite_timeToLiveExpiryExpireAfter - ); - - IntegerCombo combo = addTimeToLiveExpiryCombo(container); - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = false; - combo.getControl().setLayoutData(gridData); - - Control millisecondsLabel = addUnmanagedLabel( - container, - EclipseLinkUiDetailsMessages.EclipseLinkExpiryComposite_timeToLiveExpiryMilliseconds - ); - - SWTTools.controlEnabledState(buildTimeToLiveExpiryEnabler(), expireAfterLabel, combo.getCombo(), millisecondsLabel); - } - - protected void addTimeOfDayComposite(Composite parent) { - Composite container = this.addSubPane(parent, 2, 0, 10, 0, 0); - - - Control expireAtLabel = addUnmanagedLabel( - container, - EclipseLinkUiDetailsMessages.EclipseLinkExpiryComposite_timeOfDayExpiryExpireAt - ); - - PropertyValueModel timeOfDayExpiryHolder = buildTimeOfDayExpiryHolder(); - DateTime dateTime = addUnmanagedDateTime( - container, - buildTimeOfDayExpiryHourHolder(timeOfDayExpiryHolder), - buildTimeOfDayExpiryMinuteHolder(timeOfDayExpiryHolder), - buildTimeOfDayExpirySecondHolder(timeOfDayExpiryHolder), - null); - - SWTTools.controlEnabledState(buildTimeOfDayExpiryEnabler(), expireAtLabel, dateTime); - } - - private WritablePropertyValueModel buildNoExpiryHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.EXPIRY_PROPERTY, - EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getExpiry() == null && this.subject.getExpiryTimeOfDay() == null); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setExpiry(null); - if (this.subject.getExpiryTimeOfDay() != null) { - this.subject.removeExpiryTimeOfDay(); - } - } - }; - } - - private WritablePropertyValueModel buildExpiryHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.EXPIRY_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getExpiry() != null); - } - - @Override - protected void setValue_(Boolean value) { - if (value == Boolean.TRUE) { - this.subject.setExpiry(0); - } - } - }; - } - - private WritablePropertyValueModel buildTimeOfDayExpiryBooleanHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getExpiryTimeOfDay() != null); - } - - @Override - protected void setValue_(Boolean value) { - if (value == Boolean.TRUE) { - this.subject.addExpiryTimeOfDay(); - } - } - }; - } - - private IntegerCombo addTimeToLiveExpiryCombo(Composite container) { - return new IntegerCombo(this, container) { - - @Override - protected CCombo addIntegerCombo(Composite container) { - return this.addUnmanagedEditableCCombo( - container, - buildDefaultListHolder(), - buildSelectedItemStringHolder(), - StringConverter.Default.instance()); - } - - @Override - protected String getLabelText() { - throw new UnsupportedOperationException(); - } - - - @Override - protected String getHelpId() { - return null; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return Integer.valueOf(0); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.EXPIRY_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getExpiry(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setExpiry(value); - } - }; - } - }; - } - - private PropertyValueModel buildTimeToLiveExpiryEnabler() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.EXPIRY_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getExpiry() != null); - } - }; - } - - private PropertyValueModel buildTimeOfDayExpiryEnabler() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getExpiryTimeOfDay() != null); - } - }; - } - - private PropertyValueModel buildTimeOfDayExpiryHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY) { - @Override - protected EclipseLinkExpiryTimeOfDay buildValue_() { - return this.subject.getExpiryTimeOfDay(); - } - }; - } - - private WritablePropertyValueModel buildTimeOfDayExpiryHourHolder(PropertyValueModel timeOfDayExpiryHolder) { - return new PropertyAspectAdapter( - timeOfDayExpiryHolder, - EclipseLinkExpiryTimeOfDay.HOUR_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getHour(); - } - - @Override - protected void setValue_(Integer hour) { - this.subject.setHour(hour); - } - }; - } - - private WritablePropertyValueModel buildTimeOfDayExpiryMinuteHolder(PropertyValueModel timeOfDayExpiryHolder) { - return new PropertyAspectAdapter( - timeOfDayExpiryHolder, - EclipseLinkExpiryTimeOfDay.MINUTE_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getMinute(); - } - - @Override - protected void setValue_(Integer minute) { - this.subject.setMinute(minute); - } - }; - } - - private WritablePropertyValueModel buildTimeOfDayExpirySecondHolder(PropertyValueModel timeOfDayExpiryHolder) { - return new PropertyAspectAdapter( - timeOfDayExpiryHolder, - EclipseLinkExpiryTimeOfDay.SECOND_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getSecond(); - } - - @Override - protected void setValue_(Integer second) { - this.subject.setSecond(second); - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkIdMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkIdMappingComposite.java deleted file mode 100644 index 88bf668b5c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkIdMappingComposite.java +++ /dev/null @@ -1,185 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.Converter; -import org.eclipse.jpt.core.context.ConvertibleMapping; -import org.eclipse.jpt.core.context.IdMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkIdMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkMutable; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AbstractIdMappingComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.ui.internal.details.IdMappingGenerationComposite; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.details.TemporalTypeComposite; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ColumnComposite                                                       | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TemporalTypeComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | GenerationComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see IdMapping - * @see ColumnComposite - * @see TemporalTypeComposite - * @see IdMappingGenerationComposite - * - * @version 2.2 - * @since 2.1 - */ -public class EclipseLinkIdMappingComposite extends AbstractIdMappingComposite - implements JpaComposite -{ - /** - * Creates a new IdMappingComposite. - * - * @param subjectHolder The holder of the subject IIdMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkIdMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeTypePane(container); - - // Generation pane - new IdMappingGenerationComposite(this, container); - } - - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - // Column widgets - new ColumnComposite(this, buildColumnHolder(), container); - - // Align the widgets under the ColumnComposite - container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - - // Mutable widgets - new EclipseLinkMutableComposite(this, buildMutableHolder(), container); - } - - @Override - protected void initializeTypePane(Composite container) { - - container = addCollapsableSection( - addSubPane(container, 5), - JptUiDetailsMessages.TypeSection_type - ); - ((GridLayout) container.getLayout()).numColumns = 2; - - // No converter - Button noConverterButton = addRadioButton( - container, - JptUiDetailsMessages.TypeSection_default, - buildNoConverterHolder(), - null); - ((GridData) noConverterButton.getLayoutData()).horizontalSpan = 2; - - PropertyValueModel specifiedConverterHolder = buildSpecifiedConverterHolder(); - // Temporal - addRadioButton( - container, - JptUiDetailsMessages.TypeSection_temporal, - buildTemporalBooleanHolder(), - null); - registerSubPane(new TemporalTypeComposite(buildTemporalConverterHolder(specifiedConverterHolder), container, getWidgetFactory())); - - // EclipseLink Converter - Button elConverterButton = addRadioButton( - container, - EclipseLinkUiDetailsMessages.TypeSection_converted, - buildEclipseLinkConverterBooleanHolder(), - null); - ((GridData) elConverterButton.getLayoutData()).horizontalSpan = 2; - - Pane convertComposite = buildConvertComposite(buildEclipseLinkConverterHolder(specifiedConverterHolder), container); - GridData gridData = (GridData) convertComposite.getControl().getLayoutData(); - gridData.horizontalSpan = 2; - gridData.horizontalIndent = 20; - registerSubPane(convertComposite); - } - - protected Pane buildConvertComposite(PropertyValueModel convertHolder, Composite container) { - return new EclipseLinkConvertComposite(convertHolder, container, getWidgetFactory()); - } - - protected PropertyValueModel buildEclipseLinkConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EclipseLinkConvert transform_(Converter converter) { - return (converter != null && converter.getType() == EclipseLinkConvert.ECLIPSE_LINK_CONVERTER) ? (EclipseLinkConvert) converter : null; - } - }; - } - - protected WritablePropertyValueModel buildEclipseLinkConverterBooleanHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - Converter converter = this.subject.getSpecifiedConverter(); - if (converter == null) { - return Boolean.FALSE; - } - return Boolean.valueOf(converter.getType() == EclipseLinkConvert.ECLIPSE_LINK_CONVERTER); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setSpecifiedConverter(EclipseLinkConvert.ECLIPSE_LINK_CONVERTER); - } - } - }; - } - - protected PropertyValueModel buildMutableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkMutable buildValue_() { - return ((EclipseLinkIdMapping) this.subject).getMutable(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkJoinFetchComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkJoinFetchComposite.java deleted file mode 100644 index b868c5736c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkJoinFetchComposite.java +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.Collection; -import org.eclipse.jpt.core.internal.JptCoreMessages; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetchType; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * |                ---------------------------------------------------------- |
- * | Join Fetch:    |                                                      |v| |
- * |                ---------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see Fetchable - * @see BasicMappingComposite - A container of this widget - * @see JavaManyToManyMapping2_0Composite - A container of this widget - * @see ManyToOneMappingComposite - A container of this widget - * @see OneToManyMappingComposite - A container of this widget - * @see OneToOneMappingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkJoinFetchComposite extends FormPane { - - /** - * Creates a new JoinFetchComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkJoinFetchComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addLabeledComposite( - container, - addLabel( - container, - EclipseLinkUiDetailsMessages.EclipseLinkJoinFetchComposite_label), - addJoinFetchTypeCombo(container).getControl(), - null - ); - } - - - private EnumFormComboViewer addJoinFetchTypeCombo(Composite container) { - - return new EnumFormComboViewer(this, container) { - - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(EclipseLinkJoinFetch.VALUE_PROPERTY); - } - - @Override - protected EclipseLinkJoinFetchType[] getChoices() { - return EclipseLinkJoinFetchType.values(); - } - - @Override - protected EclipseLinkJoinFetchType getDefaultValue() { - return null; - } - - @Override - protected String displayString(EclipseLinkJoinFetchType value) { - return buildDisplayString( - EclipseLinkUiDetailsMessages.class, - EclipseLinkJoinFetchComposite.this, - value - ); - } - - @Override - protected String nullDisplayString() { - return JptCoreMessages.NONE; - } - - @Override - protected EclipseLinkJoinFetchType getValue() { - return getSubject().getValue(); - } - - @Override - protected void setValue(EclipseLinkJoinFetchType value) { - getSubject().setValue(value); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToManyMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToManyMappingComposite.java deleted file mode 100644 index ac0477d749..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToManyMappingComposite.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.ManyToManyMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkRelationshipMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AbstractManyToManyMappingComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.ManyToManyJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OrderingComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | JoiningStrategyComposite                                              | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrderingComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link ManyToManyMapping} - * @see {@link TargetEntityComposite} - * @see {@link ManyToManyJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link CascadeComposite} - * @see {@link OrderingComposite} - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkManyToManyMappingComposite - extends AbstractManyToManyMappingComposite - implements JpaComposite -{ - /** - * Creates a new ManyToManyMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToManyMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkManyToManyMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new ManyToManyJoiningStrategyPane(this, buildJoiningHolder(), container); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - new OrderingComposite(this, container); - } - - protected PropertyValueModel buildJoinFetchableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkJoinFetch buildValue_() { - return ((EclipseLinkRelationshipMapping) this.subject).getJoinFetch(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToOneMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToOneMappingComposite.java deleted file mode 100644 index b939c9dfd4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkManyToOneMappingComposite.java +++ /dev/null @@ -1,131 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.Cascade; -import org.eclipse.jpt.core.context.ManyToOneMapping; -import org.eclipse.jpt.core.context.ManyToOneRelationshipReference; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkRelationshipMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.ManyToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | JoiningStrategyComposite                                              | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link ManyToOneMapping} - * @see {@link TargetEntityComposite} - * @see {@link ManyToOneJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link OptionalComposite} - * @see {@link CascadeComposite} - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkManyToOneMappingComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLinkManyToOneMappingComposite. - * - * @param subjectHolder The holder of the subject ManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkManyToOneMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new ManyToOneJoiningStrategyPane(this, buildJoiningHolder(), container); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new OptionalComposite(this, addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - } - - protected Composite addPane(Composite container, int groupBoxMargin) { - return addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - } - - protected PropertyValueModel buildJoiningHolder() { - return new TransformationPropertyValueModel( - getSubjectHolder()) { - @Override - protected ManyToOneRelationshipReference transform_(ManyToOneMapping value) { - return value.getRelationshipReference(); - } - }; - } - - protected PropertyValueModel buildJoinFetchableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkJoinFetch buildValue_() { - return ((EclipseLinkRelationshipMapping) this.subject).getJoinFetch(); - } - }; - } - - protected PropertyValueModel buildCascadeHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Cascade transform_(ManyToOneMapping value) { - return value.getCascade(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMappedSuperclassAdvancedComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMappedSuperclassAdvancedComposite.java deleted file mode 100644 index e2c7fd7a04..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMappedSuperclassAdvancedComposite.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.MappedSuperclass; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkChangeTracking; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomizer; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkMappedSuperclass; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkReadOnly; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkMappedSuperclassAdvancedComposite extends FormPane { - - public EclipseLinkMappedSuperclassAdvancedComposite( - FormPane parentPane, - Composite parent) { - - super(parentPane, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_advanced - ); - - new EclipseLinkReadOnlyComposite(this, buildReadOnlyHolder(), container); - new EclipseLinkCustomizerComposite(this, buildCustomizerHolder(), container); - new EclipseLinkChangeTrackingComposite(this, buildChangeTrackingHolder(), container); - } - - private PropertyValueModel buildReadOnlyHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkReadOnly buildValue_() { - return ((EclipseLinkMappedSuperclass) this.subject).getReadOnly(); - } - }; - } - - private PropertyValueModel buildCustomizerHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkCustomizer buildValue_() { - return ((EclipseLinkMappedSuperclass) this.subject).getCustomizer(); - } - }; - } - - private PropertyValueModel buildChangeTrackingHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkChangeTracking buildValue_() { - return ((EclipseLinkMappedSuperclass) this.subject).getChangeTracking(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMutableComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMutableComposite.java deleted file mode 100644 index a9be5ffa34..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkMutableComposite.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkMutable; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * This composite simply shows a tri-state check box for the Mutable option. - * - * @see EclipseLinkMutable - * @see EclipseLinkBasicMappingComposite - A container of this pane - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkMutableComposite extends FormPane -{ - /** - * Creates a new MutableComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkMutableComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiDetailsMessages.EclipseLinkMutableComposite_mutableLabel, - buildMutableHolder(), - buildMutableStringHolder(), - null - ); - } - - private WritablePropertyValueModel buildMutableHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkMutable.SPECIFIED_MUTABLE_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSpecifiedMutable(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSpecifiedMutable(value); - } - - }; - } - - private PropertyValueModel buildMutableStringHolder() { - return new TransformationPropertyValueModel(buildDefaultMutableHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiDetailsMessages.EclipseLinkMutableComposite_mutableLabelDefault, defaultStringValue); - } - return EclipseLinkUiDetailsMessages.EclipseLinkMutableComposite_mutableLabel; - } - }; - } - - private PropertyValueModel buildDefaultMutableHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkMutable.SPECIFIED_MUTABLE_PROPERTY, - EclipseLinkMutable.DEFAULT_MUTABLE_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSpecifiedMutable() != null) { - return null; - } - return Boolean.valueOf(this.subject.isDefaultMutable()); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkObjectTypeConverterComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkObjectTypeConverterComposite.java deleted file mode 100644 index a2ce0de705..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkObjectTypeConverterComposite.java +++ /dev/null @@ -1,481 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2009 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import java.util.ListIterator; -import org.eclipse.jdt.ui.IJavaElementSearchConstants; -import org.eclipse.jface.viewers.ITableLabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.window.Window; -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConversionValue; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkObjectTypeConverter; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.swt.ColumnAdapter; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; -import org.eclipse.jpt.ui.internal.widgets.AddRemoveTablePane; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.model.value.ItemPropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.swing.ObjectListSelectionModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * |            -------------------------------------------------------------- |
- * | Name:      |                                                             ||
- * |            -------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EclipseLinkConverter - * @see EclipseLinkConvertComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkObjectTypeConverterComposite extends FormPane -{ - - /** - * Creates a new ObjectTypeConverterComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkObjectTypeConverterComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledText( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConverterComposite_nameTextLabel, - buildNameTextHolder()); - - addDataTypeChooser(container); - addObjectTypeChooser(container); - - addConversionValuesTable(container); - - addLabeledEditableCCombo( - container, - EclipseLinkUiDetailsMessages.EclipseLinkObjectTypeConverterComposite_defaultObjectValueLabel, - buildDefaultObjectValueListHolder(), - buildDefaultObjectValueHolder(), - buildStringConverter(), - null - ); - - new PaneEnabler(buildBooleanHolder(), this); - } - - protected WritablePropertyValueModel buildNameTextHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), EclipseLinkConverter.NAME_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getName(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setName(value); - } - }; - } - - private ClassChooserPane addDataTypeChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkObjectTypeConverter.DATA_TYPE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getDataType(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - - this.subject.setDataType(value); - } - }; - } - - @Override - protected String getClassName() { - return getSubject().getDataType(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkObjectTypeConverterComposite_dataTypeLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubject().setDataType(className); - } - - @Override - protected char getEnclosingTypeSeparator() { - return getSubject().getEnclosingTypeSeparator(); - } - }; - } - - private ClassChooserPane addObjectTypeChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkObjectTypeConverter.OBJECT_TYPE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getObjectType(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - - this.subject.setObjectType(value); - } - }; - } - - @Override - protected String getClassName() { - return getSubject().getObjectType(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkObjectTypeConverterComposite_objectTypeLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubject().setObjectType(className); - } - - @Override - protected int getTypeDialogStyle() { - return IJavaElementSearchConstants.CONSIDER_CLASSES_AND_ENUMS; - } - - @Override - protected char getEnclosingTypeSeparator() { - return getSubject().getEnclosingTypeSeparator(); - } - }; - } - - protected void addConversionValuesTable(Composite container) { - - // Join Columns group pane - Group conversionValuesGroupPane = addTitledGroup( - container, - EclipseLinkUiDetailsMessages.EclipseLinkObjectTypeConverterComposite_conversionValuesGroupTitle - ); - - WritablePropertyValueModel conversionValueHolder = - buildConversionValueHolder(); - // Conversion Values add/remove list pane - new AddRemoveTablePane( - this, - conversionValuesGroupPane, - buildConversionValuesAdapter(), - buildConversionValuesListModel(), - conversionValueHolder, - buildConversionValuesLabelProvider(), - null//TODO need a help context id for this - ) { - @Override - protected ColumnAdapter buildColumnAdapter() { - return new ConversionValueColumnAdapter(); - } - }; - - } - - protected WritablePropertyValueModel buildConversionValueHolder() { - return new SimplePropertyValueModel(); - } - - protected AddRemoveListPane.Adapter buildConversionValuesAdapter() { - return new AddRemoveListPane.AbstractAdapter() { - - public void addNewItem(ObjectListSelectionModel listSelectionModel) { - EclipseLinkConversionValueDialog dialog = buildConversionValueDialogForAdd(); - addConversionValueFromDialog(dialog, listSelectionModel); - } - - @Override - public boolean hasOptionalButton() { - return true; - } - - @Override - public String optionalButtonText() { - return EclipseLinkUiDetailsMessages.EclipseLinkObjectTypeConverterComposite_conversionValueEdit; - } - - @Override - public void optionOnSelection(ObjectListSelectionModel listSelectionModel) { - EclipseLinkConversionValue conversionValue = (EclipseLinkConversionValue) listSelectionModel.selectedValue(); - EclipseLinkConversionValueDialog dialog = new EclipseLinkConversionValueDialog(getControl().getShell(), getSubject(), conversionValue); - editConversionValueFromDialog(dialog, conversionValue); - } - - public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - EclipseLinkObjectTypeConverter converter = getSubject(); - int[] selectedIndices = listSelectionModel.selectedIndices(); - - for (int index = selectedIndices.length; --index >= 0; ) { - converter.removeConversionValue(selectedIndices[index]); - } - } - }; - } - - - protected EclipseLinkConversionValueDialog buildConversionValueDialogForAdd() { - return new EclipseLinkConversionValueDialog(getControl().getShell(), getSubject()); - } - - protected void addConversionValueFromDialog(EclipseLinkConversionValueDialog dialog, ObjectListSelectionModel listSelectionModel) { - if (dialog.open() != Window.OK) { - return; - } - - EclipseLinkConversionValue conversionValue = this.getSubject().addConversionValue(); - conversionValue.setDataValue(dialog.getDataValue()); - conversionValue.setObjectValue(dialog.getObjectValue()); - - listSelectionModel.setSelectedValue(conversionValue); - } - - protected void editConversionValueFromDialog(EclipseLinkConversionValueDialog dialog, EclipseLinkConversionValue conversionValue) { - if (dialog.open() != Window.OK) { - return; - } - - conversionValue.setDataValue(dialog.getDataValue()); - conversionValue.setObjectValue(dialog.getObjectValue()); - } - - private ListValueModel buildConversionValuesListModel() { - return new ItemPropertyListValueModelAdapter(buildConversionValuesListHolder(), - EclipseLinkConversionValue.DATA_VALUE_PROPERTY, - EclipseLinkConversionValue.OBJECT_VALUE_PROPERTY); - } - - private ListValueModel buildConversionValuesListHolder() { - return new ListAspectAdapter(getSubjectHolder(), EclipseLinkObjectTypeConverter.CONVERSION_VALUES_LIST) { - @Override - protected ListIterator listIterator_() { - return this.subject.conversionValues(); - } - - @Override - protected int size_() { - return this.subject.conversionValuesSize(); - } - }; - } - - private ITableLabelProvider buildConversionValuesLabelProvider() { - return new TableLabelProvider(); - } - - protected ListValueModel buildDefaultObjectValueListHolder() { - return new TransformationListValueModelAdapter(buildConversionValuesListModel()) { - @Override - protected String transformItem(EclipseLinkConversionValue conversionValue) { - return conversionValue.getObjectValue(); - } - }; - } - - protected WritablePropertyValueModel buildDefaultObjectValueHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), EclipseLinkObjectTypeConverter.DEFAULT_OBJECT_VALUE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getDefaultObjectValue(); - } - - @Override - protected void setValue_(String value) { - if (value != null && value.length() == 0) { - value = null; - } - this.subject.setDefaultObjectValue(value); - } - }; - } - - protected final StringConverter buildStringConverter() { - return new StringConverter() { - public String convertToString(String value) { - return (value == null) ? "" : value; //$NON-NLS-1$ - } - }; - } - - protected PropertyValueModel buildBooleanHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Boolean transform(EclipseLinkObjectTypeConverter value) { - return Boolean.valueOf(value != null); - } - }; - } - - private class TableLabelProvider extends LabelProvider - implements ITableLabelProvider { - - public Image getColumnImage(Object element, int columnIndex) { - return null; - } - - public String getColumnText(Object element, int columnIndex) { - - EclipseLinkConversionValue conversionValue = (EclipseLinkConversionValue) element; - String value = null; - - switch (columnIndex) { - case ConversionValueColumnAdapter.DATA_VALUE_COLUMN: { - value = conversionValue.getDataValue(); - break; - } - - case ConversionValueColumnAdapter.OBJECT_VALUE_COLUMN: { - value = conversionValue.getObjectValue(); - break; - } - } - - if (value == null) { - value = ""; //$NON-NLS-1$ - } - - return value; - } - } - - private static class ConversionValueColumnAdapter implements ColumnAdapter { - - public static final int COLUMN_COUNT = 2; - //public static final int SELECTION_COLUMN = 0; - public static final int DATA_VALUE_COLUMN = 0; - public static final int OBJECT_VALUE_COLUMN = 1; - - private WritablePropertyValueModel buildDataValueHolder(EclipseLinkConversionValue subject) { - return new PropertyAspectAdapter(EclipseLinkConversionValue.DATA_VALUE_PROPERTY, subject) { - @Override - protected String buildValue_() { - return this.subject.getDataValue(); - } - - @Override - protected void setValue_(String value) { - this.subject.setDataValue(value); - } - }; - } - - private WritablePropertyValueModel buildObjectValueHolder(EclipseLinkConversionValue subject) { - return new PropertyAspectAdapter(EclipseLinkConversionValue.OBJECT_VALUE_PROPERTY, subject) { - @Override - protected String buildValue_() { - return this.subject.getObjectValue(); - } - - @Override - protected void setValue_(String value) { - this.subject.setObjectValue(value); - } - }; - } - - public WritablePropertyValueModel[] cellModels(EclipseLinkConversionValue subject) { - WritablePropertyValueModel[] holders = new WritablePropertyValueModel[COLUMN_COUNT]; - //holders[SELECTION_COLUMN] = new SimplePropertyValueModel(); - holders[DATA_VALUE_COLUMN] = buildDataValueHolder(subject); - holders[OBJECT_VALUE_COLUMN] = buildObjectValueHolder(subject); - return holders; - } - - public int columnCount() { - return COLUMN_COUNT; - } - - public String columnName(int columnIndex) { - - switch (columnIndex) { - case ConversionValueColumnAdapter.DATA_VALUE_COLUMN: { - return EclipseLinkUiDetailsMessages.EclipseLinkObjectTypeConverterComposite_conversionValuesDataValueColumn; - } - - case ConversionValueColumnAdapter.OBJECT_VALUE_COLUMN: { - return EclipseLinkUiDetailsMessages.EclipseLinkObjectTypeConverterComposite_conversionValuesObjectValueColumn; - } - - default: { - return null; - } - } - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyJoiningStrategyPane.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyJoiningStrategyPane.java deleted file mode 100644 index e39b22be01..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyJoiningStrategyPane.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToManyRelationshipReference; -import org.eclipse.jpt.ui.internal.details.JoinColumnJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.JoinTableJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.details.MappedByJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; - -public class EclipseLinkOneToManyJoiningStrategyPane - extends FormPane -{ - public EclipseLinkOneToManyJoiningStrategyPane( - FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - super(parentPane, subjectHolder, parent); - } - - - @Override - protected void initializeLayout(Composite container) { - // joining strategy group pane - Group groupPane = addTitledGroup( - container, - JptUiDetailsMessages.Joining_title - ); - - new MappedByJoiningStrategyPane(this, groupPane); - - JoinColumnJoiningStrategyPane. - buildJoinColumnJoiningStrategyPaneWithIncludeOverrideCheckBox( - this, - groupPane); - - new JoinTableJoiningStrategyPane(this, groupPane); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyMappingComposite.java deleted file mode 100644 index 940449fb1a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToManyMappingComposite.java +++ /dev/null @@ -1,152 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.Cascade; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToManyMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToManyRelationshipReference; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkPrivateOwned; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OrderingComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkOneToManyJoiningStrategyPane                               | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkJoinFetchComposite                                         | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkvateOwnedComposite                                         | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrderingComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see OneToOneMapping - * @see CascadeComposite - * @see EclipseLinkJoinFetchComposite - * @see EclipseLinkJoinFetchComposite - * @see EclipseLinkOneToManyJoiningStrategyPane - * @see FetchTypeComposite - * @see OrderingComposite - * @see TargetEntityComposite - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkOneToManyMappingComposite - extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipselinkOneToManyMappingComposite. - * - * @param subjectHolder The holder of the subject IOneToManyMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkOneToManyMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkOneToManyJoiningStrategyPane(this, buildJoiningHolder(), container); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, buildPrivateOwnableHolder(), addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - new OrderingComposite(this, container); - } - - protected Composite addPane(Composite container, int groupBoxMargin) { - return addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - } - - protected PropertyValueModel buildJoiningHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected EclipseLinkOneToManyRelationshipReference transform_(T value) { - return value.getRelationshipReference(); - } - }; - } - - protected PropertyValueModel buildPrivateOwnableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkPrivateOwned buildValue_() { - return this.subject.getPrivateOwned(); - } - }; - } - - protected PropertyValueModel buildJoinFetchableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkJoinFetch buildValue_() { - return this.subject.getJoinFetch(); - } - }; - } - - protected PropertyValueModel buildCascadeHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Cascade transform_(T value) { - return value.getCascade(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToOneMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToOneMappingComposite.java deleted file mode 100644 index 189b5d8b07..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkOneToOneMappingComposite.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.Cascade; -import org.eclipse.jpt.core.context.OneToOneRelationshipReference; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToOneMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkPrivateOwned; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OneToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - - -public class EclipseLinkOneToOneMappingComposite - extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipselinkOneToOneMappingComposite. - * - * @param subjectHolder The holder of the subject IOneToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkOneToOneMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new OneToOneJoiningStrategyPane(this, buildJoiningHolder(), container); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new OptionalComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, buildPrivateOwnableHolder(), addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - } - - protected Composite addPane(Composite container, int groupBoxMargin) { - return addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - } - - protected PropertyValueModel buildJoiningHolder() { - return new TransformationPropertyValueModel( - getSubjectHolder()) { - @Override - protected OneToOneRelationshipReference transform_(T value) { - return value.getRelationshipReference(); - } - }; - } - - protected PropertyValueModel buildJoinFetchableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkJoinFetch buildValue_() { - return this.subject.getJoinFetch(); - } - }; - } - - protected PropertyValueModel buildPrivateOwnableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkPrivateOwned buildValue_() { - return this.subject.getPrivateOwned(); - } - }; - } - - protected PropertyValueModel buildCascadeHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - - @Override - protected Cascade transform_(T value) { - return value.getCascade(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkPrivateOwnedComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkPrivateOwnedComposite.java deleted file mode 100644 index ae967ea1ad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkPrivateOwnedComposite.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkPrivateOwned; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This composite simply shows the Lob check box. - * - * @see BasicMapping - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkPrivateOwnedComposite extends FormPane -{ - /** - * Creates a new PrivateOwnedComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkPrivateOwnedComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - private PropertyAspectAdapter buildPrivateOwnedHolder() { - - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkPrivateOwned.PRIVATE_OWNED_PROPERTY) { - - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.isPrivateOwned()); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setPrivateOwned(value.booleanValue()); - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - addCheckBox( - container, - EclipseLinkUiDetailsMessages.EclipseLinkPrivateOwnedComposite_privateOwnedLabel, - buildPrivateOwnedHolder(), - null - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkReadOnlyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkReadOnlyComposite.java deleted file mode 100644 index cca516995e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkReadOnlyComposite.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkReadOnly; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * This composite simply shows the Read Only check box. - * - * @see EclipseLinkReadOnly - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkReadOnlyComposite extends FormPane -{ - /** - * Creates a new ReadOnlyComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkReadOnlyComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeLayout(Composite container) { - // Unique tri-state check box - addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiDetailsMessages.EclipseLinkReadOnlyComposite_readOnlyLabel, - buildSpecifiedReadOnlyHolder(), - buildReadOnlyStringHolder(), - null - ); - } - - private WritablePropertyValueModel buildSpecifiedReadOnlyHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkReadOnly.SPECIFIED_READ_ONLY_PROPERTY) - { - @Override - protected Boolean buildValue_() { - return this.subject.getSpecifiedReadOnly(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSpecifiedReadOnly(value); - } - }; - } - - private PropertyValueModel buildReadOnlyStringHolder() { - return new TransformationPropertyValueModel(buildDefaultReadOnlyHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiDetailsMessages.EclipseLinkReadOnlyComposite_readOnlyWithDefault, defaultStringValue); - } - return EclipseLinkUiDetailsMessages.EclipseLinkReadOnlyComposite_readOnlyLabel; - } - }; - } - - private PropertyValueModel buildDefaultReadOnlyHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkReadOnly.SPECIFIED_READ_ONLY_PROPERTY, - EclipseLinkReadOnly.DEFAULT_READ_ONLY_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSpecifiedReadOnly() != null) { - return null; - } - return Boolean.valueOf(this.subject.isDefaultReadOnly()); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkRefreshOnlyIfNewerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkRefreshOnlyIfNewerComposite.java deleted file mode 100644 index ad38f46d82..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkRefreshOnlyIfNewerComposite.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * This composite simply shows a tri-state check box for the Refresh Only If Newer option. - * - * @see EclipseLinkCaching - * @see EclipseLinkCachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkRefreshOnlyIfNewerComposite extends FormPane -{ - /** - * Creates a new OptionalComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkRefreshOnlyIfNewerComposite(FormPane parentPane, - Composite parent) - { - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiDetailsMessages.EclipseLinkRefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel, - buildRefreshOnlyIfNewerHolder(), - buildRefreshOnlyIfNewerStringHolder(), - EclipseLinkHelpContextIds.CACHING_REFRESH_ONLY_IF_NEWER - ); - } - - private WritablePropertyValueModel buildRefreshOnlyIfNewerHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_REFRESH_ONLY_IF_NEWER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSpecifiedRefreshOnlyIfNewer(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSpecifiedRefreshOnlyIfNewer(value); - } - }; - } - - private PropertyValueModel buildRefreshOnlyIfNewerStringHolder() { - - return new TransformationPropertyValueModel(buildDefaultRefreshOnlyIfNewerHolder()) { - - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiDetailsMessages.EclipseLinkRefreshOnlyIfNewerComposite_refreshOnlyIfNewerDefault, defaultStringValue); - } - return EclipseLinkUiDetailsMessages.EclipseLinkRefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel; - } - }; - } - - private PropertyValueModel buildDefaultRefreshOnlyIfNewerHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - EclipseLinkCaching.SPECIFIED_REFRESH_ONLY_IF_NEWER_PROPERTY, - EclipseLinkCaching.DEFAULT_REFRESH_ONLY_IF_NEWER_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSpecifiedRefreshOnlyIfNewer() != null) { - return null; - } - return Boolean.valueOf(this.subject.isDefaultRefreshOnlyIfNewer()); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkStructConverterComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkStructConverterComposite.java deleted file mode 100644 index 77f2d2bc53..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkStructConverterComposite.java +++ /dev/null @@ -1,151 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2009 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkStructConverter; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * |            -------------------------------------------------------------- |
- * | Name:      |                                                             ||
- * |            -------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EclipseLinkConverter - * @see EclipseLinkConvertComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkStructConverterComposite extends FormPane -{ - - /** - * Creates a new StructConverterComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkStructConverterComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledText( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConverterComposite_nameTextLabel, - buildNameTextHolder()); - - addClassChooser(container); - - new PaneEnabler(buildBooleanHolder(), this); - } - - protected WritablePropertyValueModel buildNameTextHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), EclipseLinkConverter.NAME_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getName(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setName(value); - } - }; - } - - - private ClassChooserPane addClassChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkStructConverter.CONVERTER_CLASS_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getConverterClass(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - - this.subject.setConverterClass(value); - } - }; - } - - @Override - protected String getClassName() { - return getSubject().getConverterClass(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkConverterComposite_classLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubject().setConverterClass(className); - } - - @Override - protected String getSuperInterfaceName() { - return EclipseLinkStructConverter.ECLIPSELINK_STRUCT_CONVERTER_CLASS_NAME; - } - - @Override - protected char getEnclosingTypeSeparator() { - return getSubject().getEnclosingTypeSeparator(); - } - }; - } - - protected PropertyValueModel buildBooleanHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Boolean transform(EclipseLinkStructConverter value) { - return Boolean.valueOf(value != null); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingComposite.java deleted file mode 100644 index 68b04efa3f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingComposite.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkTransformationMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkTransformationMappingComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLinkBasicCollectionMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkTransformationMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingUiDefinition.java deleted file mode 100644 index d88ae209be..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTransformationMappingUiDefinition.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.EclipseLinkMappingKeys; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkTransformationMapping; -import org.eclipse.jpt.ui.JptUiPlugin; -import org.eclipse.jpt.ui.details.MappingUiDefinition; -import org.eclipse.jpt.ui.internal.JptUiIcons; -import org.eclipse.swt.graphics.Image; - -public abstract class EclipseLinkTransformationMappingUiDefinition - implements MappingUiDefinition -{ - - protected EclipseLinkTransformationMappingUiDefinition() { - super(); - } - - public Image getImage() { - return JptUiPlugin.getImage(JptUiIcons.JPA_CONTENT); - } - - public String getLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkTransformationMappingUiProvider_label; - } - - public String getLinkLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkTransformationMappingUiProvider_linkLabel; - } - - public String getKey() { - return EclipseLinkMappingKeys.TRANSFORMATION_ATTRIBUTE_MAPPING_KEY; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTypeConverterComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTypeConverterComposite.java deleted file mode 100644 index b0305ffd56..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkTypeConverterComposite.java +++ /dev/null @@ -1,198 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2009 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkTypeConverter; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * |            -------------------------------------------------------------- |
- * | Name:      |                                                             ||
- * |            -------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EclipseLinkConverter - * @see EclipseLinkConvertComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkTypeConverterComposite extends FormPane -{ - - /** - * Creates a new TypeConverterComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public EclipseLinkTypeConverterComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledText( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConverterComposite_nameTextLabel, - buildNameTextHolder()); - - addDataTypeChooser(container); - addObjectTypeChooser(container); - - new PaneEnabler(buildBooleanHolder(), this); - } - - protected WritablePropertyValueModel buildNameTextHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), EclipseLinkConverter.NAME_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getName(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setName(value); - } - }; - } - - - private ClassChooserPane addDataTypeChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkTypeConverter.DATA_TYPE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getDataType(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - - this.subject.setDataType(value); - } - }; - } - - @Override - protected String getClassName() { - return getSubject().getDataType(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkTypeConverterComposite_dataTypeLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubject().setDataType(className); - } - - @Override - protected char getEnclosingTypeSeparator() { - return getSubject().getEnclosingTypeSeparator(); - } - }; - } - - private ClassChooserPane addObjectTypeChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkTypeConverter.OBJECT_TYPE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getObjectType(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - - this.subject.setObjectType(value); - } - }; - } - - @Override - protected String getClassName() { - return getSubject().getObjectType(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiDetailsMessages.EclipseLinkTypeConverterComposite_objectTypeLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubject().setObjectType(className); - } - - @Override - protected char getEnclosingTypeSeparator() { - return getSubject().getEnclosingTypeSeparator(); - } - }; - } - - protected PropertyValueModel buildBooleanHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Boolean transform(EclipseLinkTypeConverter value) { - return Boolean.valueOf(value != null); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkUiDetailsMessages.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkUiDetailsMessages.java deleted file mode 100644 index e6bea69540..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkUiDetailsMessages.java +++ /dev/null @@ -1,169 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0, which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.osgi.util.NLS; - -/** - * The localized strings used by the mapping panes. - * - * @version 2.2 - * @since 1.0 - */ -@SuppressWarnings("nls") -public class EclipseLinkUiDetailsMessages extends NLS { - - public static String EclipseLinkBasicCollectionMappingUiProvider_label; - public static String EclipseLinkBasicCollectionMappingUiProvider_linkLabel; - - public static String EclipseLinkBasicMapMappingUiProvider_label; - public static String EclipseLinkBasicMapMappingUiProvider_linkLabel; - - public static String EclipseLinkTransformationMappingUiProvider_label; - public static String EclipseLinkTransformationMappingUiProvider_linkLabel; - - public static String EclipseLinkVariableOneToOneMappingUiProvider_label; - public static String EclipseLinkVariableOneToOneMappingUiProvider_linkLabel; - - public static String EclipseLinkCacheTypeComposite_label; - public static String EclipseLinkCacheTypeComposite_full; - public static String EclipseLinkCacheTypeComposite_weak; - public static String EclipseLinkCacheTypeComposite_soft; - public static String EclipseLinkCacheTypeComposite_soft_weak; - public static String EclipseLinkCacheTypeComposite_hard_weak; - public static String EclipseLinkCacheTypeComposite_cache; - public static String EclipseLinkCacheTypeComposite_none; - public static String EclipseLinkTypeMappingComposite_advanced; - public static String EclipseLinkTypeMappingComposite_caching; - public static String EclipseLinkTypeMappingComposite_converters; - - public static String EclipseLinkCacheSizeComposite_size; - public static String EclipseLinkCacheCoordinationTypeComposite_label; - public static String EclipseLinkCacheCoordinationTypeComposite_send_object_changes; - public static String EclipseLinkCacheCoordinationTypeComposite_invalidate_changed_objects; - public static String EclipseLinkCacheCoordinationTypeComposite_send_new_objects_with_changes; - public static String EclipseLinkCacheCoordinationTypeComposite_none; - - public static String EclipseLinkCachingComposite_sharedLabelDefault; - public static String EclipseLinkCachingComposite_sharedLabel; - public static String EclipseLinkCachingComposite_advanced; - public static String EclipseLinkAlwaysRefreshComposite_alwaysRefreshDefault; - public static String EclipseLinkAlwaysRefreshComposite_alwaysRefreshLabel; - public static String EclipseLinkRefreshOnlyIfNewerComposite_refreshOnlyIfNewerDefault; - public static String EclipseLinkRefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel; - public static String EclipseLinkDisableHitsComposite_disableHitsDefault; - public static String EclipseLinkDisableHitsComposite_disableHitsLabel; - - public static String EclipseLinkChangeTrackingComposite_label; - public static String EclipseLinkChangeTrackingComposite_attribute; - public static String EclipseLinkChangeTrackingComposite_object; - public static String EclipseLinkChangeTrackingComposite_deferred; - public static String EclipseLinkChangeTrackingComposite_auto; - - public static String EclipseLinkConvertComposite_converterNameLabel; - public static String EclipseLinkConvertComposite_defineConverterSection; - public static String EclipseLinkConvertComposite_default; - public static String EclipseLinkConvertComposite_custom; - public static String EclipseLinkConvertComposite_type; - public static String EclipseLinkConvertComposite_objectType; - public static String EclipseLinkConvertComposite_struct; - - public static String EclipseLinkConverterComposite_nameTextLabel; - public static String EclipseLinkConverterComposite_classLabel; - - public static String EclipseLinkConvertersComposite_customConverter; - public static String EclipseLinkConvertersComposite_objectTypeConverter; - public static String EclipseLinkConvertersComposite_structConverter; - public static String EclipseLinkConvertersComposite_typeConverter; - - public static String EclipseLinkCustomizerComposite_classLabel; - - public static String TypeSection_converted; - - public static String EclipseLinkExistenceCheckingComposite_label; - public static String JavaEclipseLinkExistenceCheckingComposite_check_cache; - public static String JavaEclipseLinkExistenceCheckingComposite_check_database; - public static String JavaEclipseLinkExistenceCheckingComposite_assume_existence; - public static String JavaEclipseLinkExistenceCheckingComposite_assume_non_existence; - public static String OrmEclipseLinkExistenceCheckingComposite_check_cache; - public static String OrmEclipseLinkExistenceCheckingComposite_check_database; - public static String OrmEclipseLinkExistenceCheckingComposite_assume_existence; - public static String OrmEclipseLinkExistenceCheckingComposite_assume_non_existence; - - public static String EclipseLinkExpiryComposite_expirySection; - public static String EclipseLinkExpiryComposite_noExpiry; - public static String EclipseLinkExpiryComposite_timeToLiveExpiry; - public static String EclipseLinkExpiryComposite_timeToLiveExpiryExpireAfter; - public static String EclipseLinkExpiryComposite_timeToLiveExpiryMilliseconds; - public static String EclipseLinkExpiryComposite_dailyExpiry; - public static String EclipseLinkExpiryComposite_timeOfDayExpiryExpireAt; - - public static String EclipseLinkJoinFetchComposite_label; - public static String EclipseLinkJoinFetchComposite_inner; - public static String EclipseLinkJoinFetchComposite_outer; - - public static String EclipseLinkMutableComposite_mutableLabel; - public static String EclipseLinkMutableComposite_mutableLabelDefault; - public static String EclipseLinkMutableComposite_true; - public static String EclipseLinkMutableComposite_false; - - public static String EclipseLinkObjectTypeConverterComposite_dataTypeLabel; - public static String EclipseLinkObjectTypeConverterComposite_objectTypeLabel; - public static String EclipseLinkObjectTypeConverterComposite_conversionValueEdit; - public static String EclipseLinkObjectTypeConverterComposite_conversionValuesDataValueColumn; - public static String EclipseLinkObjectTypeConverterComposite_conversionValuesObjectValueColumn; - public static String EclipseLinkObjectTypeConverterComposite_defaultObjectValueLabel; - public static String EclipseLinkObjectTypeConverterComposite_conversionValuesGroupTitle; - - public static String EclipseLinkConversionValueDialog_addConversionValue; - public static String EclipseLinkConversionValueDialog_editConversionValue; - public static String EclipseLinkConversionValueDialog_addConversionValueDescriptionTitle; - public static String EclipseLinkConversionValueDialog_editConversionValueDescriptionTitle; - public static String EclipseLinkConversionValueDialog_addConversionValueDescription; - public static String EclipseLinkConversionValueDialog_editConversionValueDescription; - - public static String EclipseLinkConversionValueDialog_dataValue; - public static String EclipseLinkConversionValueDialog_objectValue; - public static String EclipseLinkConversionValueStateObject_dataValueMustBeSpecified; - public static String EclipseLinkConversionValueStateObject_objectValueMustBeSpecified; - public static String EclipseLinkConversionValueStateObject_dataValueAlreadyExists; - - public static String EclipseLinkPrivateOwnedComposite_privateOwnedLabel; - - public static String EclipseLinkReadOnlyComposite_readOnlyLabel; - public static String EclipseLinkReadOnlyComposite_readOnlyWithDefault; - - public static String EclipseLinkTypeConverterComposite_dataTypeLabel; - public static String EclipseLinkTypeConverterComposite_objectTypeLabel; - - public static String DefaultEclipseLinkOneToOneMappingUiProvider_label; - public static String DefaultEclipseLinkVariableOneToOneMappingUiProvider_label; - public static String DefaultEclipseLinkOneToManyMappingUiProvider_label; - public static String DefaultEclipseLinkOneToOneMappingUiProvider_linkLabel; - public static String DefaultEclipseLinkVariableOneToOneMappingUiProvider_linkLabel; - public static String DefaultEclipseLinkOneToManyMappingUiProvider_linkLabel; - - public static String EclipseLinkConvertersComposite_Label; - public static String EclipseLinkConverterDialog_name; - public static String EclipseLinkConverterDialog_converterType; - public static String EclipseLinkConverterDialog_addConverter; - public static String EclipseLinkConverterDialog_addConverterDescriptionTitle; - public static String EclipseLinkConverterDialog_addConverterDescription; - public static String EclipseLinkConverterStateObject_nameMustBeSpecified; - public static String EclipseLinkConverterStateObject_typeMustBeSpecified; - - static { - NLS.initializeMessages("eclipselink_ui_details", EclipseLinkUiDetailsMessages.class); - } - - private EclipseLinkUiDetailsMessages() { - throw new UnsupportedOperationException(); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingComposite.java deleted file mode 100644 index f0cfaa3b6a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingComposite.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkVariableOneToOneMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * - * @version 2.2 - * @since 2.2 - */ -public class EclipseLinkVariableOneToOneMappingComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLinkBasicCollectionMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkVariableOneToOneMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingUiDefinition.java deleted file mode 100644 index c68faf91d2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVariableOneToOneMappingUiDefinition.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.eclipselink.core.EclipseLinkMappingKeys; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkVariableOneToOneMapping; -import org.eclipse.jpt.ui.JptUiPlugin; -import org.eclipse.jpt.ui.details.MappingUiDefinition; -import org.eclipse.jpt.ui.internal.JptUiIcons; -import org.eclipse.swt.graphics.Image; - -public abstract class EclipseLinkVariableOneToOneMappingUiDefinition - implements MappingUiDefinition -{ - protected EclipseLinkVariableOneToOneMappingUiDefinition() { - super(); - } - - public Image getImage() { - return JptUiPlugin.getImage(JptUiIcons.JPA_CONTENT); - } - - public String getLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkVariableOneToOneMappingUiProvider_label; - } - - public String getLinkLabel() { - return EclipseLinkUiDetailsMessages.EclipseLinkVariableOneToOneMappingUiProvider_linkLabel; - } - - public String getKey() { - return EclipseLinkMappingKeys.VARIABLE_ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVersionMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVersionMappingComposite.java deleted file mode 100644 index 127ac2065b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/EclipseLinkVersionMappingComposite.java +++ /dev/null @@ -1,244 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details; - -import org.eclipse.jpt.core.context.Column; -import org.eclipse.jpt.core.context.Converter; -import org.eclipse.jpt.core.context.ConvertibleMapping; -import org.eclipse.jpt.core.context.TemporalConverter; -import org.eclipse.jpt.core.context.VersionMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkVersionMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkMutable; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.details.TemporalTypeComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ColumnComposite                                                       | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | MutableComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TemporalTypeComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see VersionMapping - * @see ColumnComposite - * @see TemporalTypeComposite - * - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkVersionMappingComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new VersionMappingComposite. - * - * @param subjectHolder The holder of the subject IVersionMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkVersionMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - protected PropertyValueModel buildColumnHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Column transform_(VersionMapping value) { - return value.getColumn(); - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeTypePane(container); - } - - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - // Column widgets - new ColumnComposite(this, buildColumnHolder(), container); - - // Align the widgets under the ColumnComposite - container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - - // Mutable widgets - new EclipseLinkMutableComposite(this, buildMutableHolder(), container); - } - - protected void initializeTypePane(Composite container) { - - container = addCollapsableSection( - container, - JptUiDetailsMessages.TypeSection_type - ); - ((GridLayout) container.getLayout()).numColumns = 2; - - // No converter - Button noConverterButton = addRadioButton( - container, - JptUiDetailsMessages.TypeSection_default, - buildNoConverterHolder(), - null); - ((GridData) noConverterButton.getLayoutData()).horizontalSpan = 2; - - PropertyValueModel specifiedConverterHolder = buildSpecifiedConverterHolder(); - // Temporal - addRadioButton( - container, - JptUiDetailsMessages.TypeSection_temporal, - buildTemporalBooleanHolder(), - null); - registerSubPane(new TemporalTypeComposite(buildTemporalConverterHolder(specifiedConverterHolder), container, getWidgetFactory())); - - // EclipseLink Converter - Button elConverterButton = addRadioButton( - container, - EclipseLinkUiDetailsMessages.TypeSection_converted, - buildEclipseLinkConverterBooleanHolder(), - null); - ((GridData) elConverterButton.getLayoutData()).horizontalSpan = 2; - - Pane convertComposite = buildConvertComposite(buildEclipseLinkConverterHolder(specifiedConverterHolder), container); - GridData gridData = (GridData) convertComposite.getControl().getLayoutData(); - gridData.horizontalSpan = 2; - gridData.horizontalIndent = 20; - registerSubPane(convertComposite); - } - - protected Pane buildConvertComposite(PropertyValueModel convertHolder, Composite container) { - return new EclipseLinkConvertComposite(convertHolder, container, getWidgetFactory()); - } - - protected WritablePropertyValueModel buildNoConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getSpecifiedConverter() == null); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setSpecifiedConverter(Converter.NO_CONVERTER); - } - } - }; - } - - protected PropertyValueModel buildEclipseLinkConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected EclipseLinkConvert transform_(Converter converter) { - return (converter != null && converter.getType() == EclipseLinkConvert.ECLIPSE_LINK_CONVERTER) ? (EclipseLinkConvert) converter : null; - } - }; - } - - protected WritablePropertyValueModel buildTemporalBooleanHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - Converter converter = this.subject.getSpecifiedConverter(); - if (converter == null) { - return Boolean.FALSE; - } - return Boolean.valueOf(converter.getType() == Converter.TEMPORAL_CONVERTER); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setSpecifiedConverter(Converter.TEMPORAL_CONVERTER); - } - } - }; - } - - protected WritablePropertyValueModel buildEclipseLinkConverterBooleanHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - Converter converter = this.subject.getSpecifiedConverter(); - if (converter == null) { - return Boolean.FALSE; - } - return Boolean.valueOf(converter.getType() == EclipseLinkConvert.ECLIPSE_LINK_CONVERTER); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue()) { - this.subject.setSpecifiedConverter(EclipseLinkConvert.ECLIPSE_LINK_CONVERTER); - } - } - }; - } - - protected PropertyValueModel buildSpecifiedConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), ConvertibleMapping.SPECIFIED_CONVERTER_PROPERTY) { - @Override - protected Converter buildValue_() { - return this.subject.getSpecifiedConverter(); - } - }; - } - - protected PropertyValueModel buildTemporalConverterHolder(PropertyValueModel converterHolder) { - return new TransformationPropertyValueModel(converterHolder) { - @Override - protected TemporalConverter transform_(Converter converter) { - return (converter != null && converter.getType() == Converter.TEMPORAL_CONVERTER) ? (TemporalConverter) converter : null; - } - }; - } - - protected PropertyValueModel buildMutableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkMutable buildValue_() { - return ((EclipseLinkVersionMapping) this.subject).getMutable(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkEntityComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkEntityComposite.java deleted file mode 100644 index 66038743f8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkEntityComposite.java +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.context.java.JavaEntity; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkEntity; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkEntityAdvancedComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AbstractEntityComposite; -import org.eclipse.jpt.ui.internal.details.java.JavaInheritanceComposite; -import org.eclipse.jpt.ui.internal.details.java.JavaSecondaryTablesComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink Java entity. - * - * @see JavaEclipseLinkEntity - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 2.1 - * @since 2.1 - */ -public abstract class AbstractJavaEclipseLinkEntityComposite extends AbstractEntityComposite -{ - /** - * Creates a new EclipseLinkJavaEntityComposite. - * - * @param subjectHolder The holder of the subject JavaEntity - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - protected AbstractJavaEclipseLinkEntityComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeCachingPane(container); - initializeQueriesPane(container); - initializeInheritancePane(container); - initializeAttributeOverridesPane(container); - initializeGeneratorsPane(container); - initializeConvertersPane(container); - initializeSecondaryTablesPane(container); - initializeAdvancedPane(container); - } - - protected void initializeCachingPane(Composite container) { - - container = addCollapsableSection( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_caching - ); - - addCachingComposite(container, buildCachingHolder()); - } - - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new JavaEclipseLinkCachingComposite(this, cachingHolder, container); - } - - private PropertyAspectAdapter buildCachingHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected JavaEclipseLinkCaching buildValue_() { - return ((JavaEclipseLinkEntity) this.subject).getCaching(); - } - }; - - } - - protected void initializeConvertersPane(Composite container) { - - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_converters - ); - - new JavaEclipseLinkConvertersComposite(this, buildConverterHolderValueModel(), container); - } - - protected PropertyValueModel buildConverterHolderValueModel() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected JavaEclipseLinkConverterHolder buildValue_() { - return ((JavaEclipseLinkEntity) this.subject).getConverterHolder(); - } - }; - } - - @Override - protected void addSecondaryTablesComposite(Composite container) { - new JavaSecondaryTablesComposite(this, container); - } - - @Override - protected void addInheritanceComposite(Composite container) { - new JavaInheritanceComposite(this, container); - } - - protected void initializeAdvancedPane(Composite container) { - new EclipseLinkEntityAdvancedComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkMappedSuperclassComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkMappedSuperclassComposite.java deleted file mode 100644 index f81196c7f2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/AbstractJavaEclipseLinkMappedSuperclassComposite.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkMappedSuperclass; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkMappedSuperclassAdvancedComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.IdClassComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink Java Mapped Superclass. - * - * @see EclipseLinkMappedSuperclass - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 3.0 - * @since 2.1 - */ -public abstract class AbstractJavaEclipseLinkMappedSuperclassComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new MappedSuperclassComposite. - * - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - protected AbstractJavaEclipseLinkMappedSuperclassComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeCachingPane(container); - initializeConvertersPane(container); - initializeAdvancedPane(container); - } - - protected void initializeGeneralPane(Composite container) { - new IdClassComposite(this, container); - } - - protected void initializeCachingPane(Composite container) { - - container = addCollapsableSection( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_caching - ); - addCachingComposite(container, buildCachingHolder()); - } - - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new JavaEclipseLinkCachingComposite(this, cachingHolder, container); - } - - private PropertyAspectAdapter buildCachingHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected JavaEclipseLinkCaching buildValue_() { - return ((JavaEclipseLinkMappedSuperclass) this.subject).getCaching(); - } - }; - } - - protected void initializeConvertersPane(Composite container) { - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_converters - ); - - new JavaEclipseLinkConvertersComposite(this, buildConverterHolderValueModel(), container); - } - - protected PropertyValueModel buildConverterHolderValueModel() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected JavaEclipseLinkConverterHolder buildValue_() { - return ((JavaEclipseLinkMappedSuperclass) this.subject).getConverterHolder(); - } - }; - } - - protected void initializeAdvancedPane(Composite container) { - new EclipseLinkMappedSuperclassAdvancedComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToManyMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToManyMappingUiDefinition.java deleted file mode 100644 index df7e324c00..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToManyMappingUiDefinition.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.MappingKeys; -import org.eclipse.jpt.core.context.java.JavaOneToManyMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.java.DefaultJavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.ui.internal.JpaMappingImageHelper; -import org.eclipse.jpt.ui.internal.details.AbstractOneToManyMappingUiDefinition; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -public class DefaultJavaEclipseLinkOneToManyMappingUiDefinition - extends AbstractOneToManyMappingUiDefinition - implements DefaultJavaAttributeMappingUiDefinition -{ - // singleton - private static final DefaultJavaEclipseLinkOneToManyMappingUiDefinition INSTANCE = - new DefaultJavaEclipseLinkOneToManyMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static DefaultJavaAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private DefaultJavaEclipseLinkOneToManyMappingUiDefinition() { - super(); - } - - @Override - public String getKey() { - return null; - } - - public String getDefaultKey() { - return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY; - } - - @Override - public String getLabel() { - return EclipseLinkUiDetailsMessages.DefaultEclipseLinkOneToManyMappingUiProvider_label; - } - - @Override - public String getLinkLabel() { - return EclipseLinkUiDetailsMessages.DefaultEclipseLinkOneToManyMappingUiProvider_linkLabel; - } - - @Override - public Image getImage() { - return JpaMappingImageHelper.imageForAttributeMapping(getDefaultKey()); - } - - public JpaComposite buildAttributeMappingComposite( - JavaUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return factory.createJavaOneToManyMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToOneMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToOneMappingUiDefinition.java deleted file mode 100644 index ec4b186518..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkOneToOneMappingUiDefinition.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.MappingKeys; -import org.eclipse.jpt.core.context.java.JavaOneToOneMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.java.DefaultJavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.ui.internal.JpaMappingImageHelper; -import org.eclipse.jpt.ui.internal.details.AbstractOneToOneMappingUiDefinition; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -public class DefaultJavaEclipseLinkOneToOneMappingUiDefinition - extends AbstractOneToOneMappingUiDefinition - implements DefaultJavaAttributeMappingUiDefinition -{ - // singleton - private static final DefaultJavaEclipseLinkOneToOneMappingUiDefinition INSTANCE = - new DefaultJavaEclipseLinkOneToOneMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static DefaultJavaAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private DefaultJavaEclipseLinkOneToOneMappingUiDefinition() { - super(); - } - - @Override - public String getKey() { - return null; - } - - public String getDefaultKey() { - return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY; - } - - @Override - public String getLabel() { - return EclipseLinkUiDetailsMessages.DefaultEclipseLinkOneToOneMappingUiProvider_label; - } - - @Override - public String getLinkLabel() { - return EclipseLinkUiDetailsMessages.DefaultEclipseLinkOneToOneMappingUiProvider_linkLabel; - } - - @Override - public Image getImage() { - return JpaMappingImageHelper.imageForAttributeMapping(getDefaultKey()); - } - - public JpaComposite buildAttributeMappingComposite( - JavaUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return factory.createJavaOneToOneMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.java deleted file mode 100644 index 246be2c098..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.eclipselink.core.EclipseLinkMappingKeys; -import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkVariableOneToOneMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVariableOneToOneMappingComposite; -import org.eclipse.jpt.ui.JptUiPlugin; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.java.DefaultJavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.ui.internal.JptUiIcons; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -public class DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition - implements DefaultJavaAttributeMappingUiDefinition -{ - // singleton - private static final DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition INSTANCE = - new DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static DefaultJavaAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition() { - super(); - } - - public String getKey() { - return null; - } - - public String getDefaultKey() { - return EclipseLinkMappingKeys.VARIABLE_ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY; - } - - public Image getImage() { - return JptUiPlugin.getImage(JptUiIcons.JPA_CONTENT); - } - - public String getLabel() { - return EclipseLinkUiDetailsMessages.DefaultEclipseLinkVariableOneToOneMappingUiProvider_label; - } - - public String getLinkLabel() { - return EclipseLinkUiDetailsMessages.DefaultEclipseLinkVariableOneToOneMappingUiProvider_linkLabel; - } - - public JpaComposite buildAttributeMappingComposite( - JavaUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkVariableOneToOneMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaResourceUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaResourceUiDefinition.java deleted file mode 100644 index 85798c8ecb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaResourceUiDefinition.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import java.util.List; -import org.eclipse.jpt.core.context.AttributeMapping; -import org.eclipse.jpt.core.context.TypeMapping; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.java.DefaultJavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaTypeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.ui.internal.details.java.AbstractJavaResourceUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.DefaultBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.DefaultEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddableUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddedIdMappingUDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEntityUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaManyToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaManyToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaMappedSuperclassUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaOneToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaTransientMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaVersionMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.NullJavaAttributeMappingUiDefinition; - -public class EclipseLinkJavaResourceUiDefinition extends AbstractJavaResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLinkJavaResourceUiDefinition(); - - /** - * Return the singleton. - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * zero-argument constructor - */ - protected EclipseLinkJavaResourceUiDefinition() { - super(); - } - - @Override - protected JavaUiFactory buildJavaUiFactory() { - return new EclipseLinkJavaUiFactory(); - } - - @Override - protected void addSpecifiedAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(JavaIdMappingUiDefinition.instance()); - definitions.add(JavaEmbeddedIdMappingUDefinition.instance()); - definitions.add(JavaBasicMappingUiDefinition.instance()); - definitions.add(JavaVersionMappingUiDefinition.instance()); - definitions.add(JavaManyToOneMappingUiDefinition.instance()); - definitions.add(JavaOneToManyMappingUiDefinition.instance()); - definitions.add(JavaOneToOneMappingUiDefinition.instance()); - definitions.add(JavaManyToManyMappingUiDefinition.instance()); - definitions.add(JavaEmbeddedMappingUiDefinition.instance()); - definitions.add(JavaTransientMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkBasicCollectionMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkBasicMapMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkTransformationMappingUiDefinition.instance()); - } - - @Override - protected void addDefaultAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(DefaultBasicMappingUiDefinition.instance()); - definitions.add(DefaultEmbeddedMappingUiDefinition.instance()); - definitions.add(NullJavaAttributeMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkOneToOneMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkOneToManyMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - } - - @Override - protected void addSpecifiedTypeMappingUiDefinitionsTo(List> definitions) { - definitions.add(JavaEntityUiDefinition.instance()); - definitions.add(JavaMappedSuperclassUiDefinition.instance()); - definitions.add(JavaEmbeddableUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaUiFactory.java deleted file mode 100644 index 3da728716b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/EclipseLinkJavaUiFactory.java +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.context.java.JavaBasicMapping; -import org.eclipse.jpt.core.context.java.JavaEmbeddable; -import org.eclipse.jpt.core.context.java.JavaEntity; -import org.eclipse.jpt.core.context.java.JavaIdMapping; -import org.eclipse.jpt.core.context.java.JavaManyToManyMapping; -import org.eclipse.jpt.core.context.java.JavaManyToOneMapping; -import org.eclipse.jpt.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.core.context.java.JavaOneToManyMapping; -import org.eclipse.jpt.core.context.java.JavaOneToOneMapping; -import org.eclipse.jpt.core.context.java.JavaVersionMapping; -import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkBasicCollectionMapping; -import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkBasicMapMapping; -import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkTransformationMapping; -import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkVariableOneToOneMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicCollectionMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMapMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkIdMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkManyToManyMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkManyToOneMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToManyMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToOneMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkTransformationMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVariableOneToOneMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVersionMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.java.BaseJavaUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkJavaUiFactory extends BaseJavaUiFactory -{ - public EclipseLinkJavaUiFactory() { - super(); - } - - // **************** java type mapping composites *************************** - - @Override - public JpaComposite createJavaMappedSuperclassComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkMappedSuperclassComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaEntityComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkEntityComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaEmbeddableComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkEmbeddableComposite(subjectHolder, parent, widgetFactory); - } - - - // **************** java attribute mapping composites ********************** - - @Override - public JpaComposite createJavaIdMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkIdMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaBasicMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkBasicMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaVersionMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkVersionMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaManyToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkManyToOneMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaOneToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkOneToManyMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaOneToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkOneToOneMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaManyToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkManyToManyMappingComposite(subjectHolder, parent, widgetFactory); - } - - public JpaComposite createJavaEclipseLinkBasicMapMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkBasicMapMappingComposite(subjectHolder, parent, widgetFactory); - } - - public JpaComposite createJavaEclipseLinkBasicCollectionMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkBasicCollectionMappingComposite(subjectHolder, parent, widgetFactory); - } - - public JpaComposite createJavaEclipseLinkVariableOneToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkVariableOneToOneMappingComposite(subjectHolder, parent, widgetFactory); - } - - public JpaComposite createJavaEclipseLinkTransformationMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkTransformationMappingComposite(subjectHolder, parent, widgetFactory); - } - - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicCollectionMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicCollectionMappingUiDefinition.java deleted file mode 100644 index 19674941ec..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicCollectionMappingUiDefinition.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicCollectionMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicCollectionMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicCollectionMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.java.JavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class JavaEclipseLinkBasicCollectionMappingUiDefinition - extends EclipseLinkBasicCollectionMappingUiDefinition - implements JavaAttributeMappingUiDefinition -{ - // singleton - private static final JavaEclipseLinkBasicCollectionMappingUiDefinition INSTANCE = - new JavaEclipseLinkBasicCollectionMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static JavaAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private JavaEclipseLinkBasicCollectionMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - JavaUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkBasicCollectionMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicMapMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicMapMappingUiDefinition.java deleted file mode 100644 index 50530fd301..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkBasicMapMappingUiDefinition.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicMapMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMapMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMapMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.java.JavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class JavaEclipseLinkBasicMapMappingUiDefinition - extends EclipseLinkBasicMapMappingUiDefinition - implements JavaAttributeMappingUiDefinition -{ - // singleton - private static final JavaEclipseLinkBasicMapMappingUiDefinition INSTANCE = - new JavaEclipseLinkBasicMapMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static JavaAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private JavaEclipseLinkBasicMapMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - JavaUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkBasicMapMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkCachingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkCachingComposite.java deleted file mode 100644 index 75082f75d1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkCachingComposite.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCachingComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane shows the caching options. - *

- * Here the layout of this pane: - *

- * -----------------------------------------------------------------------------
- * | x Shared                                                                  |
- * |    CacheTypeComposite                                                     |
- * |    CacheSizeComposite                                                     |
- * |    > Advanced   	                                                       |
- * |    	ExpiryComposite                                                    |
- * |    	AlwaysRefreshComposite                                             |
- * |   		RefreshOnlyIfNewerComposite                                        |
- * |    	DisableHitsComposite                                               |
- * |    	CacheCoordinationComposite                                         |
- * | ExistenceTypeComposite                                                    |
- * -----------------------------------------------------------------------------
- * - * @see Entity - * @see EclipseLinkCaching2_0 - * @see JavaEclipseLinkEntityComposite - The parent container - * @see EclipseLinkCacheTypeComposite - * @see EclipseLinkCacheSizeComposite - * @see EclipseLinkAlwaysRefreshComposite - * @see EclipseLinkRefreshOnlyIfNewerComposite - * @see EclipseLinkDisableHitsComposite - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkCachingComposite extends EclipseLinkCachingComposite -{ - - public JavaEclipseLinkCachingComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeExistenceCheckingComposite(Composite parent) { - new JavaEclipseLinkExistenceCheckingComposite(this, parent); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkConvertersComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkConvertersComposite.java deleted file mode 100644 index 56331720e7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkConvertersComposite.java +++ /dev/null @@ -1,271 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkObjectTypeConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkStructConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkTypeConverter; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCustomConverterComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkObjectTypeConverterComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkStructConverterComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkTypeConverterComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | X CustomConverter                                                         |
- * |                                                                           |
- * |   ----------------------------------------------------------------------- |
- * |   |                                                                     | |
- * |   | CustomConverterComposite                                            | |
- * |   |                                                                     | |
- * |   ----------------------------------------------------------------------- |
- * |                                                                           |
- * | X Type Converter                                                          |
- * |                                                                           |
- * |   ----------------------------------------------------------------------- |
- * |   |                                                                     | |
- * |   | TypeConverterComposite                                              | |
- * |   |                                                                     | |
- * |   ----------------------------------------------------------------------- |
- * |                                                                           |
- * | X Oject Type Converter                                                    |
- * |                                                                           |
- * |   ----------------------------------------------------------------------- |
- * |   |                                                                     | |
- * |   | ObjectTypeConverterComposite                                        | |
- * |   |                                                                     | |
- * |   ----------------------------------------------------------------------- |
- * |                                                                           |
- * | X Struct Converter                                                        |
- * |                                                                           |
- * |   ----------------------------------------------------------------------- |
- * |   |                                                                     | |
- * |   | StructConverterComposite                                            | |
- * |   |                                                                     | |
- * |   ----------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkConvertersComposite extends Pane -{ - - /** - * Creates a new ConversionComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public JavaEclipseLinkConvertersComposite(Pane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - - initializeConverterPane(container); - } - - private void initializeConverterPane(Composite container) { - // Custom Converter check box - Button customConverterCheckBox = addCheckBox( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_customConverter, - buildCustomConverterBooleanHolder(), - null - ); - - // Custom Converter pane - EclipseLinkCustomConverterComposite customConverterComposite = new EclipseLinkCustomConverterComposite( - buildCustomConverterHolder(), - addSubPane(container, 0, customConverterCheckBox.getBorderWidth() + 16), - getWidgetFactory() - ); - registerSubPane(customConverterComposite); - - - // Type Converter check box - Button typeConverterCheckBox = addCheckBox( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_typeConverter, - buildTypeConverterBooleanHolder(), - null - ); - - // Type Converter pane - EclipseLinkTypeConverterComposite typeConverterComposite = new EclipseLinkTypeConverterComposite( - buildTypeConverterHolder(), - addSubPane(container, 0, typeConverterCheckBox.getBorderWidth() + 16), - getWidgetFactory() - ); - registerSubPane(typeConverterComposite); - - // Object Type Converter check box - Button objectTypeConverterCheckBox = addCheckBox( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_objectTypeConverter, - buildObjectTypeConverterBooleanHolder(), - null - ); - - // Object Type Converter pane - EclipseLinkObjectTypeConverterComposite objectTypeConverterComposite = new EclipseLinkObjectTypeConverterComposite( - buildObjectTypeConverterHolder(), - addSubPane(container, 0, objectTypeConverterCheckBox.getBorderWidth() + 16), - getWidgetFactory() - ); - registerSubPane(objectTypeConverterComposite); - - // Struct Converter check box - Button structConverterCheckBox = addCheckBox( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_structConverter, - buildStructConverterBooleanHolder(), - null - ); - - // Struct Converter pane - EclipseLinkStructConverterComposite structConverterComposite = new EclipseLinkStructConverterComposite( - buildStructConverterHolder(), - addSubPane(container, 0, structConverterCheckBox.getBorderWidth() + 16), - getWidgetFactory() - ); - registerSubPane(structConverterComposite); - } - - private WritablePropertyValueModel buildCustomConverterBooleanHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.CUSTOM_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getCustomConverter() != null); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue() && (this.subject.getCustomConverter() == null)) { - this.subject.addCustomConverter(); - } - else if (!value.booleanValue() && (this.subject.getCustomConverter() != null)) { - this.subject.removeCustomConverter(); - } - } - }; - } - - private PropertyValueModel buildCustomConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.CUSTOM_CONVERTER_PROPERTY) { - @Override - protected EclipseLinkCustomConverter buildValue_() { - return this.subject.getCustomConverter(); - } - }; - } - - private WritablePropertyValueModel buildTypeConverterBooleanHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.TYPE_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getTypeConverter() != null); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue() && (this.subject.getTypeConverter() == null)) { - this.subject.addTypeConverter(); - } - else if (!value.booleanValue() && (this.subject.getTypeConverter() != null)) { - this.subject.removeTypeConverter(); - } - } - }; - } - - private PropertyValueModel buildTypeConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.TYPE_CONVERTER_PROPERTY) { - @Override - protected EclipseLinkTypeConverter buildValue_() { - return this.subject.getTypeConverter(); - } - }; - } - - private WritablePropertyValueModel buildObjectTypeConverterBooleanHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.OBJECT_TYPE_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getObjectTypeConverter() != null); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue() && (this.subject.getObjectTypeConverter() == null)) { - this.subject.addObjectTypeConverter(); - } - else if (!value.booleanValue() && (this.subject.getObjectTypeConverter() != null)) { - this.subject.removeObjectTypeConverter(); - } - } - }; - } - - private PropertyValueModel buildObjectTypeConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.OBJECT_TYPE_CONVERTER_PROPERTY) { - @Override - protected EclipseLinkObjectTypeConverter buildValue_() { - return this.subject.getObjectTypeConverter(); - } - }; - } - - - private WritablePropertyValueModel buildStructConverterBooleanHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.STRUCT_CONVERTER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.getStructConverter() != null); - } - - @Override - protected void setValue_(Boolean value) { - if (value.booleanValue() && (this.subject.getStructConverter() == null)) { - this.subject.addStructConverter(); - } - else if (!value.booleanValue() && (this.subject.getStructConverter() != null)) { - this.subject.removeStructConverter(); - } - } - }; - } - - private PropertyValueModel buildStructConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkConverterHolder.STRUCT_CONVERTER_PROPERTY) { - @Override - protected EclipseLinkStructConverter buildValue_() { - return this.subject.getStructConverter(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEmbeddableComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEmbeddableComposite.java deleted file mode 100644 index 9b0a699644..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEmbeddableComposite.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.context.java.JavaEmbeddable; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkEmbeddable; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkEmbeddableAdvancedComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane does not have any widgets. - * - * @see Embeddable - * @see JavaUiFactory - The factory creating this pane - * @see EmbeddableUiProvider - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkEmbeddableComposite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EmbeddableComposite. - * - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkEmbeddableComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - initializeConvertersPane(container); - initializeAdvancedPane(container); - } - - protected void initializeConvertersPane(Composite container) { - - container = addCollapsableSection( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_converters - ); - - new JavaEclipseLinkConvertersComposite(this, buildConverterHolderValueModel(), container); - } - - protected PropertyValueModel buildConverterHolderValueModel() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected JavaEclipseLinkConverterHolder buildValue_() { - return ((JavaEclipseLinkEmbeddable) this.subject).getConverterHolder(); - } - }; - } - - protected void initializeAdvancedPane(Composite container) { - new EclipseLinkEmbeddableAdvancedComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEntityComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEntityComposite.java deleted file mode 100644 index f6434c109a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkEntityComposite.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.context.java.JavaEntity; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkEntity; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink Java entity. - * - * @see JavaEclipseLinkEntity - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkEntityComposite extends AbstractJavaEclipseLinkEntityComposite -{ - /** - * Creates a new EclipseLinkJavaEntityComposite. - * - * @param subjectHolder The holder of the subject JavaEntity - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkEntityComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkExistenceCheckingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkExistenceCheckingComposite.java deleted file mode 100644 index 39f530c898..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkExistenceCheckingComposite.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import java.util.Collection; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkExistenceType; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here is the layout of this pane: - *
- * -------------------------------------------------------------------------
- * |       			  		---------------------------------------------- |
- * | x Existence Checking:  |                                          |v| |
- * |       					---------------------------------------------- |
- * -------------------------------------------------------------------------
- * - * @see EclipseLinkCaching - * @see CachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkExistenceCheckingComposite extends FormPane { - - /** - * Creates a new ExistenceCheckingComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public JavaEclipseLinkExistenceCheckingComposite(FormPane parentPane, - Composite parent) { - - super(parentPane, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledComposite( - container, - addCheckBox( - container, - EclipseLinkUiDetailsMessages.EclipseLinkExistenceCheckingComposite_label, - buildExistenceCheckingHolder(), - null - ), - addExistenceCheckingTypeCombo(container).getControl(), - null - ); - } - - private EnumFormComboViewer addExistenceCheckingTypeCombo(Composite container) { - - return new EnumFormComboViewer(this, container) { - - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(EclipseLinkCaching.DEFAULT_EXISTENCE_TYPE_PROPERTY); - propertyNames.add(EclipseLinkCaching.SPECIFIED_EXISTENCE_TYPE_PROPERTY); - } - - @Override - protected EclipseLinkExistenceType[] getChoices() { - return EclipseLinkExistenceType.values(); - } - - @Override - protected EclipseLinkExistenceType getDefaultValue() { - return getSubject().getDefaultExistenceType(); - } - - @Override - protected String displayString(EclipseLinkExistenceType value) { - return buildDisplayString( - EclipseLinkUiDetailsMessages.class, - JavaEclipseLinkExistenceCheckingComposite.this, - value - ); - } - - @Override - protected EclipseLinkExistenceType getValue() { - return getSubject().getSpecifiedExistenceType(); - } - - @Override - protected void setValue(EclipseLinkExistenceType value) { - getSubject().setSpecifiedExistenceType(value); - } - - @Override - protected boolean sortChoices() { - return false; - } - }; - } - - private WritablePropertyValueModel buildExistenceCheckingHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), JavaEclipseLinkCaching.EXISTENCE_CHECKING_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.hasExistenceChecking()); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setExistenceChecking(value.booleanValue()); - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclassComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclassComposite.java deleted file mode 100644 index a399b6dc61..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclassComposite.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink Java Mapped Superclass. - * - * @see EclipseLinkMappedSuperclass - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkMappedSuperclassComposite extends AbstractJavaEclipseLinkMappedSuperclassComposite -{ - /** - * Creates a new MappedSuperclassComposite. - * - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkMappedSuperclassComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkTransformationMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkTransformationMappingUiDefinition.java deleted file mode 100644 index cce506e44c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkTransformationMappingUiDefinition.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkTransformationMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkTransformationMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkTransformationMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.java.JavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class JavaEclipseLinkTransformationMappingUiDefinition - extends EclipseLinkTransformationMappingUiDefinition - implements JavaAttributeMappingUiDefinition -{ - // singleton - private static final JavaEclipseLinkTransformationMappingUiDefinition INSTANCE = - new JavaEclipseLinkTransformationMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static JavaAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private JavaEclipseLinkTransformationMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - JavaUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - return new EclipseLinkTransformationMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkVariableOneToOneMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkVariableOneToOneMappingUiDefinition.java deleted file mode 100644 index f6a8b38195..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/java/JavaEclipseLinkVariableOneToOneMappingUiDefinition.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.java; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkVariableOneToOneMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVariableOneToOneMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.java.JavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class JavaEclipseLinkVariableOneToOneMappingUiDefinition - extends EclipseLinkVariableOneToOneMappingUiDefinition - implements JavaAttributeMappingUiDefinition -{ - // singleton - private static final JavaEclipseLinkVariableOneToOneMappingUiDefinition INSTANCE = - new JavaEclipseLinkVariableOneToOneMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static JavaAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private JavaEclipseLinkVariableOneToOneMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - JavaUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkVariableOneToOneMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractEclipseLinkEntityMappingsDetailsPage.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractEclipseLinkEntityMappingsDetailsPage.java deleted file mode 100644 index 9a0693af6d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractEclipseLinkEntityMappingsDetailsPage.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.orm.EntityMappings; -import org.eclipse.jpt.eclipselink.core.context.orm.EclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.orm.EclipseLinkEntityMappings; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.details.db.CatalogCombo; -import org.eclipse.jpt.ui.internal.details.db.SchemaCombo; -import org.eclipse.jpt.ui.internal.details.orm.AbstractEntityMappingsDetailsPage; -import org.eclipse.jpt.ui.internal.details.orm.EntityMappingsGeneratorsComposite; -import org.eclipse.jpt.ui.internal.details.orm.JptUiDetailsOrmMessages; -import org.eclipse.jpt.ui.internal.details.orm.OrmPackageChooser; -import org.eclipse.jpt.ui.internal.details.orm.OrmQueriesComposite; -import org.eclipse.jpt.ui.internal.details.orm.PersistenceUnitMetadataComposite; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | XmlPackageChooser                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * |              ------------------------------------------------------------ |
- * | Schema:      | SchemaCombo                                              | |
- * |              ------------------------------------------------------------ |
- * |              ------------------------------------------------------------ |
- * | Catalog:     | CatalogCombo                                             | |
- * |              ------------------------------------------------------------ |
- * |              ------------------------------------------------------------ |
- * | Access Type: |                                                        |v| |
- * |              ------------------------------------------------------------ |
- * |                                                                           |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | PersistenceUnitMetadataComposite                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrmGeneratorsComposite                                                | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrmQueriesComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ConvertersComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EntityMappings - * @see AbstractEclipseLinkEntityMappingsDetailsPage - The parent container - * @see CatalogCombo - * @see EnumFormComboViewer - * @see EntityMappingsGeneratorsComposite - * @see OrmPackageChooser - * @see OrmQueriesComposite - * @see PersistenceUnitMetadataComposite - * @see SchemaCombo - * - * @version 2.2 - * @since 2.1 - */ -public abstract class AbstractEclipseLinkEntityMappingsDetailsPage extends AbstractEntityMappingsDetailsPage -{ - /** - * Creates a new EclipseLinkEntityMappingsDetailsPage. - * - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - protected AbstractEclipseLinkEntityMappingsDetailsPage(Composite parent, - WidgetFactory widgetFactory) { - - super(parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - // Package widgets - new OrmPackageChooser(this, container); - - // Schema widgets - addLabeledComposite( - container, - JptUiDetailsOrmMessages.EntityMappingsDetailsPage_schema, - this.addSchemaCombo(container), - JpaHelpContextIds.ENTITY_ORM_SCHEMA - ); - - // Catalog widgets - addLabeledComposite( - container, - JptUiDetailsOrmMessages.EntityMappingsDetailsPage_catalog, - this.addCatalogCombo(container), - JpaHelpContextIds.ENTITY_ORM_CATALOG - ); - - // Access Type widgets - addLabeledComposite( - container, - JptUiDetailsOrmMessages.EntityMappingsDetailsPage_access, - this.addAccessTypeCombo(container), - JpaHelpContextIds.ENTITY_ORM_ACCESS - ); - - // Persistence Unit Metadata widgets - new PersistenceUnitMetadataComposite( - this, - this.buildPersistentUnitMetadataHolder(), - this.addSubPane(container, 5) - ); - - // Generators pane - this.buildEntityMappingsGeneratorsComposite(container); - - // Queries pane - this.buildOrmQueriesComposite(container); - - // Converters section - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_Label - ); - - new OrmEclipseLinkConvertersComposite( - this, - this.buildConverterHolder(), - container - ); - } - - private PropertyValueModel buildConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkConverterHolder buildValue_() { - return ((EclipseLinkEntityMappings) this.subject).getConverterHolder(); - } - }; - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkEntityComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkEntityComposite.java deleted file mode 100644 index 5667eb9682..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkEntityComposite.java +++ /dev/null @@ -1,90 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.orm.OrmEntity; -import org.eclipse.jpt.eclipselink.core.context.orm.EclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkEntity; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkEntityAdvancedComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.orm.AbstractOrmEntityComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public abstract class AbstractOrmEclipseLinkEntityComposite extends AbstractOrmEntityComposite -{ - protected AbstractOrmEclipseLinkEntityComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeCachingPane(container); - initializeQueriesPane(container); - initializeInheritancePane(container); - initializeAttributeOverridesPane(container); - initializeGeneratorsPane(container); - initializeConvertersPane(container); - initializeSecondaryTablesPane(container); - initializeAdvancedPane(container); - } - - protected void initializeCachingPane(Composite container) { - container = addCollapsableSection( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_caching); - addCachingComposite(container, buildCachingHolder()); - } - - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new OrmEclipseLinkCachingComposite(this, cachingHolder, container); - } - - - private PropertyAspectAdapter buildCachingHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected OrmEclipseLinkCaching buildValue_() { - return ((OrmEclipseLinkEntity) this.subject).getCaching(); - } - }; - } - - protected void initializeConvertersPane(Composite container) { - - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_Label - ); - - new OrmEclipseLinkConvertersComposite(this, buildConverterHolder(), container); - } - - private PropertyValueModel buildConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkConverterHolder buildValue_() { - return ((OrmEclipseLinkEntity) this.subject).getConverterHolder(); - } - }; - } - - protected void initializeAdvancedPane(Composite container) { - new EclipseLinkEntityAdvancedComposite(this, container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkMappedSuperclassComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkMappedSuperclassComposite.java deleted file mode 100644 index e6ecc555ea..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/AbstractOrmEclipseLinkMappedSuperclassComposite.java +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.eclipselink.core.context.orm.EclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkMappedSuperclass; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkMappedSuperclassAdvancedComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.IdClassComposite; -import org.eclipse.jpt.ui.internal.details.orm.MetadataCompleteComposite; -import org.eclipse.jpt.ui.internal.details.orm.OrmJavaClassChooser; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public abstract class AbstractOrmEclipseLinkMappedSuperclassComposite - extends FormPane - implements JpaComposite -{ - protected AbstractOrmEclipseLinkMappedSuperclassComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeCachingPane(container); - initializeConvertersPane(container); - initializeAdvancedPane(container); - } - - protected void initializeGeneralPane(Composite container) { - new OrmJavaClassChooser(this, getSubjectHolder(), container); - new AccessTypeComposite(this, buildAccessHolder(), container); - new IdClassComposite(this, container); - new MetadataCompleteComposite(this, getSubjectHolder(), container); - } - - protected PropertyValueModel buildAccessHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentType(); - } - }; - } - - protected void initializeCachingPane(Composite container) { - container = addCollapsableSection( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_caching - ); - - addCachingComposite(container, buildCachingHolder()); - } - - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new OrmEclipseLinkCachingComposite(this, cachingHolder, container); - } - - private PropertyAspectAdapter buildCachingHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected OrmEclipseLinkCaching buildValue_() { - return this.subject.getCaching(); - } - }; - } - - protected void initializeConvertersPane(Composite container) { - - container = addCollapsableSection( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_Label - ); - - new OrmEclipseLinkConvertersComposite(this, buildConverterHolder(), container); - } - - private PropertyValueModel buildConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkConverterHolder buildValue_() { - return this.subject.getConverterHolder(); - } - }; - } - - protected void initializeAdvancedPane(Composite container) { - new EclipseLinkMappedSuperclassAdvancedComposite(this, container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/BaseEclipseLinkOrmXmlUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/BaseEclipseLinkOrmXmlUiFactory.java deleted file mode 100644 index bcf0d6e780..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/BaseEclipseLinkOrmXmlUiFactory.java +++ /dev/null @@ -1,132 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.orm.OrmBasicMapping; -import org.eclipse.jpt.core.context.orm.OrmEmbeddable; -import org.eclipse.jpt.core.context.orm.OrmEntity; -import org.eclipse.jpt.core.context.orm.OrmIdMapping; -import org.eclipse.jpt.core.context.orm.OrmManyToManyMapping; -import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping; -import org.eclipse.jpt.core.context.orm.OrmMappedSuperclass; -import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping; -import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping; -import org.eclipse.jpt.core.context.orm.OrmTransientMapping; -import org.eclipse.jpt.core.context.orm.OrmVersionMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkManyToManyMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkManyToOneMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToManyMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToOneMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.TransientMappingComposite; -import org.eclipse.jpt.ui.internal.details.orm.BaseOrmXmlUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public abstract class BaseEclipseLinkOrmXmlUiFactory extends BaseOrmXmlUiFactory -{ - // **************** orm type mapping composites **************************** - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmMappedSuperclassComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkMappedSuperclassComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmEntityComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkEntityComposite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmEmbeddableComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkEmbeddableComposite(subjectHolder, parent, widgetFactory); - } - - - // **************** orm attribute mapping composites *********************** - - @Override - public JpaComposite createOrmIdMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkIdMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmBasicMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkBasicMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmVersionMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkVersionMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmManyToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkManyToOneMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmOneToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkOneToManyMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmOneToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkOneToOneMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmManyToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkManyToManyMappingComposite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmTransientMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new TransientMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterDialog.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterDialog.java deleted file mode 100644 index 0a2ce1b205..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterDialog.java +++ /dev/null @@ -1,195 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.DialogPane; -import org.eclipse.jpt.ui.internal.widgets.ValidatingDialog; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.StaticListValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -/** - * Clients can use this dialog to prompt the user for SecondaryTable settings. - * Use the following once the dialog is closed: - * @see #getSelectedTable() - * @see #getSelectedCatalog() - * @see #getSelectedSchema() - * @version 2.1 - * @since 2.1 - */ -public class EclipseLinkConverterDialog extends ValidatingDialog { - - - // ********** constructors ********** - - /** - * Use this constructor to edit an existing conversion value - */ - public EclipseLinkConverterDialog(Shell parent) { - super(parent); - } - - @Override - protected EclipseLinkConverterStateObject buildStateObject() { - return new EclipseLinkConverterStateObject(); - } - - // ********** open ********** - - @Override - protected void configureShell(Shell shell) { - super.configureShell(shell); - shell.setText(this.getTitle()); - } - - @Override - protected String getTitle() { - return EclipseLinkUiDetailsMessages.EclipseLinkConverterDialog_addConverter; - } - - @Override - protected String getDescriptionTitle() { - return EclipseLinkUiDetailsMessages.EclipseLinkConverterDialog_addConverterDescriptionTitle; - } - - @Override - protected String getDescription() { - return EclipseLinkUiDetailsMessages.EclipseLinkConverterDialog_addConverterDescription; - } - - @Override - protected DialogPane buildLayout(Composite container) { - return new ConversionValueDialogPane(container); - } - - @Override - public void create() { - super.create(); - - ConversionValueDialogPane pane = (ConversionValueDialogPane) getPane(); - pane.selectAll(); - - getButton(OK).setEnabled(false); - } - - - // ********** public API ********** - - /** - * Return the data value set in the text widget. - */ - public String getName() { - return getSubject().getName(); - } - - /** - * Return the object value set in the text widget. - */ - public String getConverterType() { - return getSubject().getConverterType(); - } - - private class ConversionValueDialogPane extends DialogPane { - - private Text nameText; - - ConversionValueDialogPane(Composite parent) { - super(EclipseLinkConverterDialog.this.getSubjectHolder(), parent); - } - - @Override - protected void initializeLayout(Composite container) { - this.nameText = addLabeledText( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConverterDialog_name, - buildNameHolder() - ); - - addLabeledCombo( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConverterDialog_converterType, - buildConverterTypeListHolder(), - buildConverterTypeHolder(), - buildStringConverter(), - null); - } - - protected ListValueModel buildConverterTypeListHolder() { - List converterTypes = new ArrayList(); - converterTypes.add(EclipseLinkConverter.CUSTOM_CONVERTER); - converterTypes.add(EclipseLinkConverter.OBJECT_TYPE_CONVERTER); - converterTypes.add(EclipseLinkConverter.STRUCT_CONVERTER); - converterTypes.add(EclipseLinkConverter.TYPE_CONVERTER); - - return new StaticListValueModel(converterTypes); - } - - private StringConverter buildStringConverter() { - return new StringConverter() { - public String convertToString(String value) { - if (value == EclipseLinkConverter.CUSTOM_CONVERTER) { - return EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_customConverter; - } - if (value == EclipseLinkConverter.OBJECT_TYPE_CONVERTER) { - return EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_objectTypeConverter; - } - if (value == EclipseLinkConverter.STRUCT_CONVERTER) { - return EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_structConverter; - } - if (value == EclipseLinkConverter.TYPE_CONVERTER) { - return EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_typeConverter; - } - return value; - } - }; - } - - private WritablePropertyValueModel buildNameHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConverterStateObject.NAME_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getName(); - } - - @Override - protected void setValue_(String value) { - this.subject.setName(value); - } - }; - } - - private WritablePropertyValueModel buildConverterTypeHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConverterStateObject.CONVERTER_TYPE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getConverterType(); - } - - @Override - protected void setValue_(String value) { - this.subject.setConverterType(value); - } - }; - } - - void selectAll() { - this.nameText.selectAll(); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterStateObject.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterStateObject.java deleted file mode 100644 index e663203b64..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkConverterStateObject.java +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import java.util.List; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.utility.internal.StringTools; -import org.eclipse.jpt.utility.internal.node.AbstractNode; -import org.eclipse.jpt.utility.internal.node.Node; -import org.eclipse.jpt.utility.internal.node.Problem; - -/** - * This is the state object used by the EclipseLinkConverterDialog, which stores - * the current name and validates it when it is modified. - * - * @see EclipseLinkConverterDialog - * - * @version 2.1 - * @since 2.1 - */ -final class EclipseLinkConverterStateObject extends AbstractNode -{ - /** - * The initial name or null - */ - private String name; - - /** - * The initial converterType or null - */ - private String converterType; - - /** - * The Validator used to validate this state object. - */ - private Validator validator; - - /** - * Notifies a change in the data value property. - */ - static final String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - /** - * Notifies a change in the object value property. - */ - static final String CONVERTER_TYPE_PROPERTY = "converterType"; //$NON-NLS-1$ - - /** - * Creates a new NewNameStateObject. - * - * @param name The initial input or null if no initial value can - * be specified - * @param names The collection of names that can't be used or an empty - * collection if none are available - */ - EclipseLinkConverterStateObject() { - super(null); - - } - - private void addNameProblemsTo(List currentProblems) { - if (StringTools.stringIsEmpty(this.name)) { - currentProblems.add(buildProblem(EclipseLinkUiDetailsMessages.EclipseLinkConverterStateObject_nameMustBeSpecified)); - } - } - - private void addConverterTypeProblemsTo(List currentProblems) { - if (StringTools.stringIsEmpty(this.converterType)) { - currentProblems.add(buildProblem(EclipseLinkUiDetailsMessages.EclipseLinkConverterStateObject_typeMustBeSpecified)); - } - } - - @Override - protected void addProblemsTo(List currentProblems) { - super.addProblemsTo(currentProblems); - addNameProblemsTo(currentProblems); - addConverterTypeProblemsTo(currentProblems); - } - - @Override - protected void checkParent(@SuppressWarnings("unused") Node parentNode) { - //no parent - } - - public String displayString() { - return null; - } - - String getName() { - return this.name; - } - - String getConverterType() { - return this.converterType; - } - - public void setName(String newName) { - String oldName = this.name; - this.name = newName; - firePropertyChanged(NAME_PROPERTY, oldName, newName); - } - - public void setConverterType(String newConverterType) { - String oldConverterType = this.converterType; - this.converterType = newConverterType; - firePropertyChanged(CONVERTER_TYPE_PROPERTY, oldConverterType, newConverterType); - } - - @Override - public void setValidator(Validator validator) { - this.validator = validator; - } - - @Override - public Validator getValidator() { - return this.validator; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPage.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPage.java deleted file mode 100644 index 5a162d1452..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPage.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.orm.EntityMappings; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.db.CatalogCombo; -import org.eclipse.jpt.ui.internal.details.db.SchemaCombo; -import org.eclipse.jpt.ui.internal.details.orm.EntityMappingsGeneratorsComposite; -import org.eclipse.jpt.ui.internal.details.orm.OrmPackageChooser; -import org.eclipse.jpt.ui.internal.details.orm.OrmQueriesComposite; -import org.eclipse.jpt.ui.internal.details.orm.PersistenceUnitMetadataComposite; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | XmlPackageChooser                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * |              ------------------------------------------------------------ |
- * | Schema:      | SchemaCombo                                              | |
- * |              ------------------------------------------------------------ |
- * |              ------------------------------------------------------------ |
- * | Catalog:     | CatalogCombo                                             | |
- * |              ------------------------------------------------------------ |
- * |              ------------------------------------------------------------ |
- * | Access Type: |                                                        |v| |
- * |              ------------------------------------------------------------ |
- * |                                                                           |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | PersistenceUnitMetadataComposite                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrmGeneratorsComposite                                                | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrmQueriesComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ConvertersComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EntityMappings - * @see EclipseLinkEntityMappingsDetailsPage - The parent container - * @see CatalogCombo - * @see EnumFormComboViewer - * @see EntityMappingsGeneratorsComposite - * @see OrmPackageChooser - * @see OrmQueriesComposite - * @see PersistenceUnitMetadataComposite - * @see SchemaCombo - * - * @version 2.2 - * @since 2.1 - */ -public class EclipseLinkEntityMappingsDetailsPage extends AbstractEclipseLinkEntityMappingsDetailsPage -{ - /** - * Creates a new EclipseLinkEntityMappingsDetailsPage. - * - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkEntityMappingsDetailsPage(Composite parent, - WidgetFactory widgetFactory) { - - super(parent, widgetFactory); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsProvider.java deleted file mode 100644 index c4d1774e14..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsProvider.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.JpaStructureNode; -import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaDetailsPage; -import org.eclipse.jpt.ui.details.JpaDetailsProvider; -import org.eclipse.jpt.ui.internal.details.AbstractEntityMappingsDetailsProvider; -import org.eclipse.swt.widgets.Composite; - -/** - * This provider is responsible for creating the {@link JpaDetailsPage} - * when the information comes from the XML file (either from the persistence - * configuration or from the Mappings Descriptor). - * - * @version 2.2 - * @since 2.2 - */ -public class EclipseLinkEntityMappingsDetailsProvider - extends AbstractEntityMappingsDetailsProvider -{ - // singleton - private static final JpaDetailsProvider INSTANCE = new EclipseLinkEntityMappingsDetailsProvider(); - - - /** - * Return the singleton - */ - public static JpaDetailsProvider instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkEntityMappingsDetailsProvider() { - super(); - } - - - @Override - protected boolean providesDetails(JpaResourceType resourceType) { - return resourceType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_1_0_RESOURCE_TYPE) - || resourceType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_1_1_RESOURCE_TYPE); - } - - public JpaDetailsPage buildDetailsPage( - Composite parent, - WidgetFactory widgetFactory) { - - return new EclipseLinkEntityMappingsDetailsPage(parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiDefinition.java deleted file mode 100644 index 0ac3142700..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiDefinition.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import java.util.List; -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.context.AttributeMapping; -import org.eclipse.jpt.core.context.TypeMapping; -import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin; -import org.eclipse.jpt.eclipselink.ui.internal.structure.EclipseLinkOrmResourceModelStructureProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmTypeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.ui.internal.details.orm.AbstractOrmXmlResourceUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddableUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEntityUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmMappedSuperclassUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmTransientMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmVersionMappingUiDefinition; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkOrmXmlUiDefinition extends AbstractOrmXmlResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLinkOrmXmlUiDefinition(); - - - /** - * Return the singleton - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkOrmXmlUiDefinition() { - super(); - } - - - @Override - protected OrmXmlUiFactory buildOrmXmlUiFactory() { - return new EclipseLinkOrmXmlUiFactory(); - } - - public boolean providesUi(JpaResourceType resourceType) { - return resourceType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_1_0_RESOURCE_TYPE); - } - - public JpaStructureProvider getStructureProvider() { - return EclipseLinkOrmResourceModelStructureProvider.instance(); - } - - @Override - protected void addOrmAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmIdMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedIdMappingUiDefinition.instance()); - definitions.add(OrmBasicMappingUiDefinition.instance()); - definitions.add(OrmVersionMappingUiDefinition.instance()); - definitions.add(OrmManyToOneMappingUiDefinition.instance()); - definitions.add(OrmOneToManyMappingUiDefinition.instance()); - definitions.add(OrmOneToOneMappingUiDefinition.instance()); - definitions.add(OrmManyToManyMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedMappingUiDefinition.instance()); - definitions.add(OrmTransientMappingUiDefinition.instance()); - - definitions.add(OrmEclipseLinkBasicCollectionMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkBasicMapMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkTransformationMappingUiDefinition.instance()); - } - - @Override - protected void addOrmTypeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmEntityUiDefinition.instance()); - definitions.add(OrmMappedSuperclassUiDefinition.instance()); - definitions.add(OrmEmbeddableUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiFactory.java deleted file mode 100644 index 079ae5b34b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/EclipseLinkOrmXmlUiFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -public class EclipseLinkOrmXmlUiFactory extends BaseEclipseLinkOrmXmlUiFactory -{ - //nothing -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicCollectionMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicCollectionMappingUiDefinition.java deleted file mode 100644 index 9459daddeb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicCollectionMappingUiDefinition.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.eclipselink.core.internal.context.orm.OrmEclipseLinkBasicCollectionMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicCollectionMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicCollectionMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkBasicCollectionMappingUiDefinition - extends EclipseLinkBasicCollectionMappingUiDefinition - implements OrmAttributeMappingUiDefinition -{ - // singleton - private static final OrmEclipseLinkBasicCollectionMappingUiDefinition INSTANCE = - new OrmEclipseLinkBasicCollectionMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static OrmAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private OrmEclipseLinkBasicCollectionMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - OrmXmlUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkBasicCollectionMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMapMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMapMappingUiDefinition.java deleted file mode 100644 index a515ac6713..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMapMappingUiDefinition.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.eclipselink.core.internal.context.orm.OrmEclipseLinkBasicMapMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMapMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMapMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkBasicMapMappingUiDefinition - extends EclipseLinkBasicMapMappingUiDefinition - implements OrmAttributeMappingUiDefinition -{ - // singleton - private static final OrmEclipseLinkBasicMapMappingUiDefinition INSTANCE = - new OrmEclipseLinkBasicMapMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static OrmAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private OrmEclipseLinkBasicMapMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - OrmXmlUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkBasicMapMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMappingComposite.java deleted file mode 100644 index 29f74dcca7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkBasicMappingComposite.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.BasicMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -//Remove the Converters section from 1.0 orm basic mappings. -//This is supported in EclipseLink in version 1.1, but not 1.0 -public class OrmEclipseLinkBasicMappingComposite extends EclipseLinkBasicMappingComposite -{ - /** - * Creates a new EclipseLinkOrmBasicMappingComposite. - * - * @param subjectHolder The holder of the subject BasicMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkBasicMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - //everything but the 'Defaine Converter' section. This is not supported in eclipselink 1.0, but is in 1.1 - protected Pane buildConvertComposite(PropertyValueModel convertHolder, Composite container) { - return new OrmEclipseLinkConvert1_0Composite(convertHolder, container, getWidgetFactory()); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkCachingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkCachingComposite.java deleted file mode 100644 index 4ced36b7b7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkCachingComposite.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkAlwaysRefreshComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheSizeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheTypeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCachingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkDisableHitsComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkRefreshOnlyIfNewerComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkEntityComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane shows the caching options. - *

- * Here the layout of this pane: - *

- * -----------------------------------------------------------------------------
- * | x Shared                                                                  |
- * |    CacheTypeComposite                                                     |
- * |    CacheSizeComposite                                                     |
- * |    > Advanced   	                                                       |
- * |    	ExpiryComposite                                                    |
- * |    	AlwaysRefreshComposite                                             |
- * |   		RefreshOnlyIfNewerComposite                                        |
- * |    	DisableHitsComposite                                               |
- * |    	CacheCoordinationComposite                                         |
- * | ExistenceTypeComposite                                                    |
- * -----------------------------------------------------------------------------
- * - * @see Entity - * @see EclipseLinkCaching - * @see JavaEclipseLinkEntityComposite - The parent container - * @see EclipseLinkCacheTypeComposite - * @see EclipseLinkCacheSizeComposite - * @see EclipseLinkAlwaysRefreshComposite - * @see EclipseLinkRefreshOnlyIfNewerComposite - * @see EclipseLinkDisableHitsComposite - * - * @version 2.1 - * @since 2.1 - */ -public class OrmEclipseLinkCachingComposite extends EclipseLinkCachingComposite -{ - - public OrmEclipseLinkCachingComposite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeExistenceCheckingComposite(Composite parent) { - new OrmEclipseLinkExistenceCheckingComposite(this, parent); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvert1_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvert1_0Composite.java deleted file mode 100644 index da275aae58..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvert1_0Composite.java +++ /dev/null @@ -1,222 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import java.util.ArrayList; -import java.util.ListIterator; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceUnit; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.ArrayTools; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.StaticListValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * |            -------------------------------------------------------------- |
- * | Converter: |                                                          |v| |
- * |            -------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EclipseLinkConvert - * @see EclipseLinkBasicMappingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ - -//Removes the Define Converters section from orm basic, id, version mapping. -//This is supported in EclipseLink in version 1.1, but not 1.0 -public class OrmEclipseLinkConvert1_0Composite extends FormPane -{ - - /** - * A key used to represent the default value, this is required to convert - * the selected item from a combo to null. This key is most - * likely never typed the user and it will help to convert the value to - * null when it's time to set the new selected value into the - * model. - */ - protected static String DEFAULT_KEY = "?!#!?#?#?default?#?!#?!#?"; //$NON-NLS-1$ - - - /** - * Creates a new EnumTypeComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public OrmEclipseLinkConvert1_0Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiDetailsMessages.EclipseLinkConvertComposite_converterNameLabel, - buildConvertNameListHolder(), - buildConvertNameHolder(), - buildNameConverter(), - null - ); - SWTUtil.attachDefaultValueHandler(combo); - - new PaneEnabler(buildBooleanHolder(), this); - } - - protected final WritablePropertyValueModel buildConvertNameHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConvert.SPECIFIED_CONVERTER_NAME_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getSpecifiedConverterName(); - } - - @Override - protected void setValue_(String value) { - // Convert the default value or an empty string to null - if ((value != null) && - ((value.length() == 0) || value.startsWith(DEFAULT_KEY))) { - - value = null; - } - this.subject.setSpecifiedConverterName(value); - } - }; - } - private ListValueModel buildConvertNameListHolder() { - java.util.List> list = new ArrayList>(); - list.add(buildDefaultNameListHolder()); - list.add(buildReservedConverterNameListHolder()); - list.add(buildConverterNameListHolder()); - return new CompositeListValueModel, String>(list); - } - - protected ListValueModel buildDefaultNameListHolder() { - return new PropertyListValueModelAdapter( - buildDefaultNameHolder() - ); - } - - private WritablePropertyValueModel buildDefaultNameHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), EclipseLinkConvert.DEFAULT_CONVERTER_NAME_PROPERTY) { - @Override - protected String buildValue_() { - String name = this.subject.getDefaultConverterName(); - - if (name == null) { - name = DEFAULT_KEY; - } - else { - name = DEFAULT_KEY + name; - } - - return name; - } - }; - } - - private StringConverter buildNameConverter() { - return new StringConverter() { - public String convertToString(String value) { - - if (getSubject() == null) { - return value; - } - - if (value == null) { - value = getSubject().getDefaultConverterName(); - - if (value != null) { - value = DEFAULT_KEY + value; - } - else { - value = DEFAULT_KEY; - } - } - - if (value.startsWith(DEFAULT_KEY)) { - String defaultName = value.substring(DEFAULT_KEY.length()); - - if (defaultName.length() > 0) { - value = NLS.bind( - JptUiDetailsMessages.DefaultWithOneParam, - defaultName - ); - } - else { - value = JptUiDetailsMessages.DefaultEmpty; - } - } - - return value; - } - }; - } - - protected ListValueModel buildReservedConverterNameListHolder() { - return new StaticListValueModel(EclipseLinkConvert.RESERVED_CONVERTER_NAMES); - } - - protected ListValueModel buildConverterNameListHolder() { - return new ListAspectAdapter( - buildPersistenceUnitHolder(), - EclipseLinkPersistenceUnit.CONVERTERS_LIST)//TODO need EclipseLinkPersistenceUnit interface - { - @Override - protected ListIterator listIterator_() { - return CollectionTools.listIterator(ArrayTools.sort(this.subject.uniqueConverterNames())); - } - }; - } - - protected PropertyValueModel buildPersistenceUnitHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkPersistenceUnit buildValue_() { - return (EclipseLinkPersistenceUnit) getSubject().getPersistenceUnit(); - } - }; - } - - protected PropertyValueModel buildBooleanHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Boolean transform(EclipseLinkConvert value) { - if (getSubject() != null && getSubject().getParent().getPersistentAttribute().isVirtual()) { - return Boolean.FALSE; - } - return Boolean.valueOf(value != null); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvertersComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvertersComposite.java deleted file mode 100644 index 6a8ddcaf35..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkConvertersComposite.java +++ /dev/null @@ -1,412 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.window.Window; -import org.eclipse.jpt.core.context.NamedNativeQuery; -import org.eclipse.jpt.core.context.NamedQuery; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkObjectTypeConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkStructConverter; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkTypeConverter; -import org.eclipse.jpt.eclipselink.core.context.orm.EclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCustomConverterComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkObjectTypeConverterComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkStructConverterComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkTypeConverterComposite; -import org.eclipse.jpt.ui.internal.details.AbstractEntityComposite; -import org.eclipse.jpt.ui.internal.details.NamedNativeQueryPropertyComposite; -import org.eclipse.jpt.ui.internal.details.NamedQueryPropertyComposite; -import org.eclipse.jpt.ui.internal.util.ControlSwitcher; -import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; -import org.eclipse.jpt.utility.internal.Transformer; -import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.ItemPropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.swing.ObjectListSelectionModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.ui.part.PageBook; - -/** - * This pane shows the list of named queries and named native queries. - *

- * Here the layout of this pane: - *

- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | AddRemoveListPane                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ConverterComposite or ObjectTypeConverterComposite                    | |
- * | | or StructConverterComposite or TypeConverterComposite                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see Entity - * @see Query - * @see NamedNativeQuery - * @see NamedQuery - * @see AbstractEntityComposite - The parent container - * @see NamedNativeQueryPropertyComposite - * @see NamedQueryPropertyComposite - * - * @version 2.1 - * @since 2.1 - */ -public class OrmEclipseLinkConvertersComposite extends Pane -{ - private AddRemoveListPane listPane; - private EclipseLinkCustomConverterComposite converterComposite; - private EclipseLinkObjectTypeConverterComposite objectTypeConverterComposite; - private EclipseLinkStructConverterComposite structConverterComposite; - private EclipseLinkTypeConverterComposite typeConverterComposite; - private WritablePropertyValueModel selectedConverterHolder; - - public OrmEclipseLinkConvertersComposite( - FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent, false); - } - - @Override - protected void initialize() { - super.initialize(); - this.selectedConverterHolder = buildSelectedConverterHolder(); - } - - private WritablePropertyValueModel buildSelectedConverterHolder() { - return new SimplePropertyValueModel(); - } - - @Override - protected void initializeLayout(Composite container) { - - // List pane - this.listPane = addListPane(container); - - // Property pane - PageBook pageBook = new PageBook(container, SWT.NULL); - pageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - this.converterComposite = new EclipseLinkCustomConverterComposite( - buildCustomConverterHolder(), - pageBook, - getWidgetFactory() - ); - registerSubPane(this.converterComposite); - - this.objectTypeConverterComposite = new EclipseLinkObjectTypeConverterComposite( - buildObjectTypeConverterHolder(), - pageBook, - getWidgetFactory() - ); - registerSubPane(this.objectTypeConverterComposite); - - this.structConverterComposite = new EclipseLinkStructConverterComposite( - buildStructConverterHolder(), - pageBook, - getWidgetFactory() - ); - registerSubPane(this.structConverterComposite); - - this.typeConverterComposite = new EclipseLinkTypeConverterComposite( - buildTypeConverterHolder(), - pageBook, - getWidgetFactory() - ); - registerSubPane(this.typeConverterComposite); - - installPaneSwitcher(pageBook); - } - - private AddRemoveListPane addListPane(Composite container) { - - return new AddRemoveListPane( - this, - container, - buildConvertersAdapter(), - buildDisplayableConvertersListHolder(), - this.selectedConverterHolder, - buildConvertersListLabelProvider(), - null//JpaHelpContextIds.MAPPING_NAMED_QUERIES - ) { - //TODO yeah, this is weird, but i don't want this to be disabled just - //because the subject is null. i have no need for that and that is - //currently how AddRemovePane works. See OrmQueriesComposite where - //the work around there is yet another pane enabler. I want to change - //how this works in 2.2 - @Override - public void enableWidgets(boolean enabled) { - super.enableWidgets(true); - } - }; - } - - private void installPaneSwitcher(PageBook pageBook) { - new ControlSwitcher(this.selectedConverterHolder, buildPaneTransformer(), pageBook); - } - - private Adapter buildConvertersAdapter() { - - return new AddRemoveListPane.AbstractAdapter() { - - public void addNewItem(ObjectListSelectionModel listSelectionModel) { - addConverter(); - } - - public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - for (Object item : listSelectionModel.selectedValues()) { - if (((EclipseLinkConverter) item).getType() == EclipseLinkConverter.CUSTOM_CONVERTER) { - getSubject().removeCustomConverter((EclipseLinkCustomConverter) item); - } - else if (((EclipseLinkConverter) item).getType() == EclipseLinkConverter.OBJECT_TYPE_CONVERTER) { - getSubject().removeObjectTypeConverter((EclipseLinkObjectTypeConverter) item); - } - else if (((EclipseLinkConverter) item).getType() == EclipseLinkConverter.STRUCT_CONVERTER) { - getSubject().removeStructConverter((EclipseLinkStructConverter) item); - } - else if (((EclipseLinkConverter) item).getType() == EclipseLinkConverter.TYPE_CONVERTER) { - getSubject().removeTypeConverter((EclipseLinkTypeConverter) item); - } - } - } - }; - } - - private void addConverter() { - addEclipseLinkConverterFromDialog(buildEclipseLinkConverterDialog()); - } - - protected EclipseLinkConverterDialog buildEclipseLinkConverterDialog() { - return new EclipseLinkConverterDialog(getControl().getShell()); - } - - protected void addEclipseLinkConverterFromDialog(EclipseLinkConverterDialog dialog) { - if (dialog.open() != Window.OK) { - return; - } - String converterType = dialog.getConverterType(); - EclipseLinkConverter converter; - if (converterType == EclipseLinkConverter.CUSTOM_CONVERTER) { - converter = this.getSubject().addCustomConverter(getSubject().customConvertersSize()); - } - else if (converterType == EclipseLinkConverter.OBJECT_TYPE_CONVERTER) { - converter = this.getSubject().addObjectTypeConverter(getSubject().objectTypeConvertersSize()); - } - else if (converterType == EclipseLinkConverter.STRUCT_CONVERTER) { - converter = this.getSubject().addStructConverter(getSubject().structConvertersSize()); - } - else if (converterType == EclipseLinkConverter.TYPE_CONVERTER) { - converter = this.getSubject().addTypeConverter(getSubject().typeConvertersSize()); - } - else { - throw new IllegalArgumentException(); - } - converter.setName(dialog.getName()); - this.selectedConverterHolder.setValue(converter);//so that it gets selected in the List for the user to edit - } - - private Transformer buildPaneTransformer() { - return new Transformer() { - public Control transform(EclipseLinkConverter converter) { - if (converter == null) { - return null; - } - - if (converter.getType() == EclipseLinkConverter.CUSTOM_CONVERTER) { - return OrmEclipseLinkConvertersComposite.this.converterComposite.getControl(); - } - if (converter.getType() == EclipseLinkConverter.OBJECT_TYPE_CONVERTER) { - return OrmEclipseLinkConvertersComposite.this.objectTypeConverterComposite.getControl(); - } - if (converter.getType() == EclipseLinkConverter.STRUCT_CONVERTER) { - return OrmEclipseLinkConvertersComposite.this.structConverterComposite.getControl(); - } - if (converter.getType() == EclipseLinkConverter.TYPE_CONVERTER) { - return OrmEclipseLinkConvertersComposite.this.typeConverterComposite.getControl(); - } - - return null; - } - }; - } - - private ListValueModel buildDisplayableConvertersListHolder() { - return new ItemPropertyListValueModelAdapter( - buildEclipseLinkConvertersHolder(), - EclipseLinkConverter.NAME_PROPERTY - ); - } - - private ListValueModel buildEclipseLinkConvertersHolder() { - List> list = new ArrayList>(); - list.add(buildCustomConvertersListHolder()); - list.add(buildObjectTypeConvertersListHolder()); - list.add(buildStructConvertersListHolder()); - list.add(buildTypeConvertersListHolder()); - return new CompositeListValueModel, EclipseLinkConverter>(list); - } - - private ListValueModel buildCustomConvertersListHolder() { - return new ListAspectAdapter( - getSubjectHolder(), - EclipseLinkConverterHolder.CUSTOM_CONVERTERS_LIST) - { - @Override - protected ListIterator listIterator_() { - return this.subject.customConverters(); - } - - @Override - protected int size_() { - return this.subject.customConvertersSize(); - } - }; - } - - private ListValueModel buildObjectTypeConvertersListHolder() { - return new ListAspectAdapter( - getSubjectHolder(), - EclipseLinkConverterHolder.OBJECT_TYPE_CONVERTERS_LIST) - { - @Override - protected ListIterator listIterator_() { - return this.subject.objectTypeConverters(); - } - - @Override - protected int size_() { - return this.subject.objectTypeConvertersSize(); - } - }; - } - - private ListValueModel buildStructConvertersListHolder() { - return new ListAspectAdapter( - getSubjectHolder(), - EclipseLinkConverterHolder.STRUCT_CONVERTERS_LIST) - { - @Override - protected ListIterator listIterator_() { - return this.subject.structConverters(); - } - - @Override - protected int size_() { - return this.subject.structConvertersSize(); - } - }; - } - - private ListValueModel buildTypeConvertersListHolder() { - return new ListAspectAdapter( - getSubjectHolder(), - EclipseLinkConverterHolder.TYPE_CONVERTERS_LIST) - { - @Override - protected ListIterator listIterator_() { - return this.subject.typeConverters(); - } - - @Override - protected int size_() { - return this.subject.typeConvertersSize(); - } - }; - } - - private PropertyValueModel buildCustomConverterHolder() { - return new TransformationPropertyValueModel(this.selectedConverterHolder) { - @Override - protected EclipseLinkCustomConverter transform_(EclipseLinkConverter value) { - return value.getType() == EclipseLinkConverter.CUSTOM_CONVERTER ? (EclipseLinkCustomConverter) value : null; - } - }; - } - - private PropertyValueModel buildObjectTypeConverterHolder() { - return new TransformationPropertyValueModel(this.selectedConverterHolder) { - @Override - protected EclipseLinkObjectTypeConverter transform_(EclipseLinkConverter value) { - return value.getType() == EclipseLinkConverter.OBJECT_TYPE_CONVERTER ? (EclipseLinkObjectTypeConverter) value : null; - } - }; - } - - private PropertyValueModel buildStructConverterHolder() { - return new TransformationPropertyValueModel(this.selectedConverterHolder) { - @Override - protected EclipseLinkStructConverter transform_(EclipseLinkConverter value) { - return value.getType() == EclipseLinkConverter.STRUCT_CONVERTER ? (EclipseLinkStructConverter) value : null; - } - }; - } - - private PropertyValueModel buildTypeConverterHolder() { - return new TransformationPropertyValueModel(this.selectedConverterHolder) { - @Override - protected EclipseLinkTypeConverter transform_(EclipseLinkConverter value) { - return value.getType() == EclipseLinkConverter.TYPE_CONVERTER ? (EclipseLinkTypeConverter) value : null; - } - }; - } - - private ILabelProvider buildConvertersListLabelProvider() { - return new LabelProvider() { - @Override - public String getText(Object element) { - return ((EclipseLinkConverter) element).getName(); - } - }; - } - - @Override - public void enableWidgets(boolean enabled) { - super.enableWidgets(enabled); - this.listPane.enableWidgets(enabled); - } - - //TODO need to check the converter repository for this, should check all converters, except for the override case, hmm - //we at least need to check typeconverters, converters, structconverters, and objectypeconverters, on this particular - //object. or we need to give a warning about the case where you are overriding or an error if it's not an override? - private Iterator converterNames() { - return new TransformationIterator(getSubject().customConverters()) { - @Override - protected String transform(EclipseLinkCustomConverter next) { - return next.getName(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEmbeddableComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEmbeddableComposite.java deleted file mode 100644 index 66128c063e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEmbeddableComposite.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.Embeddable; -import org.eclipse.jpt.eclipselink.core.context.orm.EclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkEmbeddable; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkEmbeddableAdvancedComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.orm.MetadataCompleteComposite; -import org.eclipse.jpt.ui.internal.details.orm.OrmJavaClassChooser; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane does not have any widgets. - * - * @see Embeddable - * @see EmbeddableUiProvider - * - * @version 2.1 - * @since 2.1 - */ -public class OrmEclipseLinkEmbeddableComposite - extends FormPane - implements JpaComposite -{ - /** - * Creates a new EmbeddableComposite. - * - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkEmbeddableComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeConvertersPane(container); - initializeAdvancedPane(container); - } - - protected void initializeGeneralPane(Composite container) { - new OrmJavaClassChooser(this, getSubjectHolder(), container); - new AccessTypeComposite(this, buildAccessHolder(), container); - new MetadataCompleteComposite(this, getSubjectHolder(), container); - } - - protected PropertyValueModel buildAccessHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentType(); - } - }; - } - - protected void initializeConvertersPane(Composite container) { - - container = addCollapsableSection( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkConvertersComposite_Label - ); - - new OrmEclipseLinkConvertersComposite(this, buildConverterHolder(), container); - } - - private PropertyValueModel buildConverterHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkConverterHolder buildValue_() { - return this.subject.getConverterHolder(); - } - }; - } - - protected void initializeAdvancedPane(Composite container) { - new EclipseLinkEmbeddableAdvancedComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntityComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntityComposite.java deleted file mode 100644 index ede8d0d13b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntityComposite.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.orm.OrmEntity; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkEntityComposite extends AbstractOrmEclipseLinkEntityComposite -{ - public OrmEclipseLinkEntityComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkExistenceCheckingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkExistenceCheckingComposite.java deleted file mode 100644 index 824b37a081..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkExistenceCheckingComposite.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Oracle. - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import java.util.Collection; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkExistenceType; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * Here is the layout of this pane: - *
- * -------------------------------------------------------------------------
- * |       			  		---------------------------------------------- |
- * | x Existence Checking:  |                                          |v| |
- * |       					---------------------------------------------- |
- * -------------------------------------------------------------------------
- * - * @see EclipseLinkCaching - * @see CachingComposite - A container of this widget - * - * @version 2.1 - * @since 2.1 - */ -public class OrmEclipseLinkExistenceCheckingComposite extends FormPane { - - /** - * Creates a new ExistenceCheckingComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public OrmEclipseLinkExistenceCheckingComposite(FormPane parentPane, - Composite parent) { - - super(parentPane, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - - addLabeledComposite( - container, - EclipseLinkUiDetailsMessages.EclipseLinkExistenceCheckingComposite_label, - addExistenceCheckingTypeCombo(container).getControl(), - null - ); - } - - private EnumFormComboViewer addExistenceCheckingTypeCombo(Composite container) { - - return new EnumFormComboViewer(this, container) { - - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(EclipseLinkCaching.DEFAULT_EXISTENCE_TYPE_PROPERTY); - propertyNames.add(EclipseLinkCaching.SPECIFIED_EXISTENCE_TYPE_PROPERTY); - } - - @Override - protected EclipseLinkExistenceType[] getChoices() { - return EclipseLinkExistenceType.values(); - } - - @Override - protected EclipseLinkExistenceType getDefaultValue() { - return getSubject().getDefaultExistenceType(); - } - - @Override - protected String displayString(EclipseLinkExistenceType value) { - return buildDisplayString( - EclipseLinkUiDetailsMessages.class, - OrmEclipseLinkExistenceCheckingComposite.this, - value - ); - } - - @Override - protected EclipseLinkExistenceType getValue() { - return getSubject().getSpecifiedExistenceType(); - } - - @Override - protected void setValue(EclipseLinkExistenceType value) { - getSubject().setSpecifiedExistenceType(value); - } - - @Override - protected boolean sortChoices() { - return false; - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkIdMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkIdMappingComposite.java deleted file mode 100644 index 053306b10c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkIdMappingComposite.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.IdMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkIdMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -//Remove the Converters section from 1.0 orm id mappings. -//This is supported in EclipseLink in version 1.1, but not 1.0 -public class OrmEclipseLinkIdMappingComposite extends EclipseLinkIdMappingComposite -{ - /** - * Creates a new EclipseLinkOrmIdMappingComposite. - * - * @param subjectHolder The holder of the subject IdMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkIdMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - //everything but the 'Define Converter' section. This is not supported in eclipselink 1.0, but is in 1.1 - protected Pane buildConvertComposite(PropertyValueModel convertHolder, Composite container) { - return new OrmEclipseLinkConvert1_0Composite(convertHolder, container, getWidgetFactory()); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclassComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclassComposite.java deleted file mode 100644 index 568385f69d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclassComposite.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkMappedSuperclass; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkMappedSuperclassComposite extends AbstractOrmEclipseLinkMappedSuperclassComposite -{ - public OrmEclipseLinkMappedSuperclassComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkTransformationMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkTransformationMappingUiDefinition.java deleted file mode 100644 index f4e8c994f4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkTransformationMappingUiDefinition.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.eclipselink.core.internal.context.orm.OrmEclipseLinkTransformationMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkTransformationMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkTransformationMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkTransformationMappingUiDefinition - extends EclipseLinkTransformationMappingUiDefinition - implements OrmAttributeMappingUiDefinition -{ - // singleton - private static final OrmEclipseLinkTransformationMappingUiDefinition INSTANCE = - new OrmEclipseLinkTransformationMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static OrmAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private OrmEclipseLinkTransformationMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - OrmXmlUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - return new EclipseLinkTransformationMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVariableOneToOneMappingUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVariableOneToOneMappingUiDefinition.java deleted file mode 100644 index 6fdd2dd426..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVariableOneToOneMappingUiDefinition.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.eclipselink.core.internal.context.orm.OrmEclipseLinkVariableOneToOneMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVariableOneToOneMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkVariableOneToOneMappingUiDefinition - extends EclipseLinkVariableOneToOneMappingUiDefinition - implements OrmAttributeMappingUiDefinition -{ - // singleton - private static final OrmEclipseLinkVariableOneToOneMappingUiDefinition INSTANCE = - new OrmEclipseLinkVariableOneToOneMappingUiDefinition(); - - /** - * Return the singleton. - */ - public static OrmAttributeMappingUiDefinition instance() { - return INSTANCE; - } - - - /** - * Ensure single instance. - */ - private OrmEclipseLinkVariableOneToOneMappingUiDefinition() { - super(); - } - - public JpaComposite buildAttributeMappingComposite( - OrmXmlUiFactory factory, - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new EclipseLinkVariableOneToOneMappingComposite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVersionMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVersionMappingComposite.java deleted file mode 100644 index d5c7a5f2a2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/details/orm/OrmEclipseLinkVersionMappingComposite.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.details.orm; - -import org.eclipse.jpt.core.context.VersionMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkConvert; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVersionMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -//Remove the Converters section from 1.0 orm version mappings. -//This is supported in EclipseLink in version 1.1, but not 1.0 -public class OrmEclipseLinkVersionMappingComposite extends EclipseLinkVersionMappingComposite implements JpaComposite -{ - /** - * Creates a new EclipseLinkOrmVersionMappingComposite. - * - * @param subjectHolder The holder of the subject VersionMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkVersionMappingComposite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - - @Override - //everything but the 'Defaine Converter' section. This is not supported in eclipselink 1.0, but is in 1.1 - protected Pane buildConvertComposite(PropertyValueModel convertHolder, Composite container) { - return new OrmEclipseLinkConvert1_0Composite(convertHolder, container, getWidgetFactory()); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiDefinition.java deleted file mode 100644 index 1f53e72c1c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiDefinition.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence; - -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.JptCorePlugin; -import org.eclipse.jpt.eclipselink.ui.internal.structure.EclipseLinkPersistenceResourceModelStructureProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.internal.persistence.details.AbstractPersistenceXmlResourceUiDefinition; -import org.eclipse.jpt.ui.internal.persistence.details.PersistenceXmlUiFactory; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkPersistenceXmlUiDefinition extends AbstractPersistenceXmlResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLinkPersistenceXmlUiDefinition(); - - - /** - * Return the singleton - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkPersistenceXmlUiDefinition() { - super(); - } - - - @Override - protected PersistenceXmlUiFactory buildPersistenceXmlUiFactory() { - return new EclipseLinkPersistenceXmlUiFactory(); - } - - public boolean providesUi(JpaResourceType resourceType) { - return resourceType.equals(JptCorePlugin.PERSISTENCE_XML_1_0_RESOURCE_TYPE); - } - - public JpaStructureProvider getStructureProvider() { - return EclipseLinkPersistenceResourceModelStructureProvider.instance(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiFactory.java deleted file mode 100644 index 21835c5775..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/EclipseLinkPersistenceXmlUiFactory.java +++ /dev/null @@ -1,215 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence; - -import java.util.ArrayList; -import java.util.ListIterator; - -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceUnit; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.PersistenceXmlCachingTab; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.connection.PersistenceXmlConnectionTab; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.customization.PersistenceXmlCustomizationTab; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.general.EclipseLinkPersistenceUnitGeneralComposite; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.logging.PersistenceXmlLoggingTab; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.options.PersistenceXmlOptionsTab; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation.PersistenceXmlSchemaGenerationTab; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaPageComposite; -import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitPropertiesComposite; -import org.eclipse.jpt.ui.internal.persistence.details.PersistenceXmlUiFactory; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkPersistenceXmlUiFactory implements PersistenceXmlUiFactory -{ - // ********** constructors ********** - - public EclipseLinkPersistenceXmlUiFactory() { - super(); - } - - // **************** persistence unit composites **************************** - - public ListIterator createPersistenceUnitComposites( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - ArrayList pages = new ArrayList(8); - - PropertyValueModel eclipseLinkPersistenceUnitHolder = - this.buildEclipseLinkPersistenceUnitHolder(subjectHolder); - - pages.add(this.buildGeneralTab(subjectHolder, parent, widgetFactory)); - pages.add(this.buildConnectionTab(subjectHolder, parent, widgetFactory)); - pages.add(this.buildCustomizationTab(eclipseLinkPersistenceUnitHolder, parent, widgetFactory)); - pages.add(this.buildCachingTab(eclipseLinkPersistenceUnitHolder, parent, widgetFactory)); - pages.add(this.buildLoggingTab(eclipseLinkPersistenceUnitHolder, parent, widgetFactory)); - pages.add(this.buildOptionsTab(subjectHolder, parent, widgetFactory)); - pages.add(this.buildSchemaGenerationTab(eclipseLinkPersistenceUnitHolder, parent, widgetFactory)); - pages.add(this.buildPropertiesTab(subjectHolder, parent, widgetFactory)); - - return pages.listIterator(); - } - - // ********** persistence unit tabs ********** - - protected EclipseLinkPersistenceUnitGeneralComposite buildGeneralTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - return new EclipseLinkPersistenceUnitGeneralComposite(subjectHolder, parent, widgetFactory); - } - - protected PersistenceXmlConnectionTab buildConnectionTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel connectionHolder = this.buildConnectionHolder(subjectHolder); - - return new PersistenceXmlConnectionTab(connectionHolder, parent, widgetFactory); - } - - protected PersistenceXmlCustomizationTab buildCustomizationTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel customizationHolder = this.buildCustomizationHolder(subjectHolder); - - return new PersistenceXmlCustomizationTab(customizationHolder, parent, widgetFactory); - } - - protected PersistenceXmlCachingTab buildCachingTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel cachingHolder = this.buildCachingHolder(subjectHolder); - - return new PersistenceXmlCachingTab(cachingHolder, parent, widgetFactory); - } - - protected PersistenceXmlLoggingTab buildLoggingTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel loggingHolder = this.buildLoggingHolder(subjectHolder); - - return new PersistenceXmlLoggingTab(loggingHolder, parent, widgetFactory); - } - - protected PersistenceXmlOptionsTab buildOptionsTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel optionsHolder = this.buildOptionsHolder(subjectHolder); - - return new PersistenceXmlOptionsTab(optionsHolder, parent, widgetFactory); - } - - protected PersistenceXmlSchemaGenerationTab buildSchemaGenerationTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel schemaGenHolder = this.buildSchemaGenerationHolder(subjectHolder); - - return new PersistenceXmlSchemaGenerationTab(schemaGenHolder, parent, widgetFactory); - } - - protected PersistenceUnitPropertiesComposite buildPropertiesTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - return new PersistenceUnitPropertiesComposite(subjectHolder, parent, widgetFactory); - } - - // ********** private methods ********** - - private PropertyValueModel buildEclipseLinkPersistenceUnitHolder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected EclipseLinkPersistenceUnit transform_(PersistenceUnit value) { - return (EclipseLinkPersistenceUnit) value; - } - }; - } - - private PropertyValueModel buildConnectionHolder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected Connection transform_(PersistenceUnit value) { - - return ((EclipseLinkPersistenceUnit)value).getConnection(); - } - }; - } - - private PropertyValueModel buildCustomizationHolder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected Customization transform_(EclipseLinkPersistenceUnit value) { - return value.getCustomization(); - } - }; - } - - protected PropertyValueModel buildCachingHolder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected Caching transform_(EclipseLinkPersistenceUnit value) { - return value.getCaching(); - } - }; - } - - private PropertyValueModel buildLoggingHolder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected Logging transform_(EclipseLinkPersistenceUnit value) { - return value.getLogging(); - } - }; - } - - private PropertyValueModel buildOptionsHolder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected Options transform_(PersistenceUnit value) { - - return ((EclipseLinkPersistenceUnit)value).getOptions(); - } - }; - } - - private PropertyValueModel buildSchemaGenerationHolder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected SchemaGeneration transform_(EclipseLinkPersistenceUnit value) { - return value.getSchemaGeneration(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheDefaultsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheDefaultsComposite.java deleted file mode 100644 index bd16b75278..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheDefaultsComposite.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * CacheDefaultsComposite - */ -public class CacheDefaultsComposite extends FormPane -{ - public CacheDefaultsComposite(FormPane subjectHolder, - Composite container) { - - super(subjectHolder, container); - } - - @Override - protected void initializeLayout(Composite parent) { - - this.initializeCacheDefaultsPane(parent); - } - - protected void initializeCacheDefaultsPane(Composite parent) { - - Composite defaultPane = this.addTitledGroup( - parent, - EclipseLinkUiMessages.CacheDefaultsComposite_groupTitle - ); - - this.initializeCacheDefaultsComposites(defaultPane); - } - - protected void initializeCacheDefaultsComposites(Composite parent) { - - // Default Cache Type - new DefaultCacheTypeComposite(this, parent); - - // Default Cache Size - new DefaultCacheSizeComposite(this, parent); - - // Default Shared Cache - new DefaultSharedCacheComposite(this, parent); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheSizeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheSizeComposite.java deleted file mode 100644 index 936de3acd8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheSizeComposite.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.Entity; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * CacheSizeComposite - */ -public class CacheSizeComposite extends Pane -{ - /** - * Creates a new CacheTypeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public CacheSizeComposite(Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - this.addCacheSizeCombo(container); - } - - private void addCacheSizeCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.CacheSizeComposite_cacheSize; - } - - @Override - protected String getHelpId() { - return EclipseLinkHelpContextIds.PERSISTENCE_CACHING; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(buildCachingHolder(), Caching.CACHE_SIZE_DEFAULT_PROPERTY) { - @Override - protected Integer buildValue_() { - Integer value = this.subject.getCacheSizeDefault(); - if (value == null) { - value = this.subject.getDefaultCacheSizeDefault(); - } - return value; - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Entity.CACHE_SIZE_PROPERTY) { - @Override - protected Integer buildValue_() { - return getSubjectParent().getCacheSizeOf(getSubjectName()); - } - - @Override - protected void setValue_(Integer value) { - getSubjectParent().setCacheSizeOf(getSubjectName(), value); - } - }; - } - }; - } - - private String getSubjectName() { - return this.getSubjectHolder().getValue().getName(); - } - - private Caching getSubjectParent() { - return this.getSubjectHolder().getValue().getParent(); - } - - private PropertyValueModel buildCachingHolder() { - return new TransformationPropertyValueModel(this.getSubjectHolder()) { - @Override - protected Caching transform_(Entity value) { - return value.getParent(); - } - }; - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheTypeComposite.java deleted file mode 100644 index 1ebfc9d4b8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/CacheTypeComposite.java +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.CacheType; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.Entity; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.listeners.SWTPropertyChangeListenerWrapper; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.event.PropertyChangeEvent; -import org.eclipse.jpt.utility.model.listener.PropertyChangeListener; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * CacheTypeComposite - */ -public class CacheTypeComposite extends Pane -{ - /** - * Creates a new CacheTypeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public CacheTypeComposite(Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlCachingTab_cacheTypeLabel, - new CacheTypeCombo(container), - EclipseLinkHelpContextIds.PERSISTENCE_CACHING - ); - } - - private class CacheTypeCombo extends EnumFormComboViewer { - - private CacheTypeCombo(Composite parent) { - super(CacheTypeComposite.this, parent); - } - - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(Entity.CACHE_TYPE_PROPERTY); - } - - private PropertyValueModel buildCachingHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected Caching transform_(Entity value) { - return value.getParent(); - } - }; - } - - private PropertyValueModel buildDefaultCacheTypeHolder() { - return new PropertyAspectAdapter(buildCachingHolder(), Caching.CACHE_TYPE_DEFAULT_PROPERTY) { - @Override - protected CacheType buildValue_() { - CacheType cacheType = subject.getCacheTypeDefault(); - if (cacheType == null) { - cacheType = subject.getDefaultCacheTypeDefault(); - } - return cacheType; - } - }; - } - - private PropertyChangeListener buildDefaultCachingTypePropertyChangeListener() { - return new SWTPropertyChangeListenerWrapper( - buildDefaultCachingTypePropertyChangeListener_() - ); - } - - private PropertyChangeListener buildDefaultCachingTypePropertyChangeListener_() { - return new PropertyChangeListener() { - public void propertyChanged(PropertyChangeEvent e) { - if ((e.getNewValue() != null) && !getCombo().isDisposed()) { - CacheTypeCombo.this.doPopulate(); - } - } - }; - } - - @Override - protected CacheType[] getChoices() { - return CacheType.values(); - } - - @Override - protected CacheType getDefaultValue() { - return getSubjectParent().getDefaultCacheType(); - } - - @Override - protected String displayString(CacheType value) { - return buildDisplayString( - EclipseLinkUiMessages.class, - CacheTypeComposite.this, - value - ); - } - - @Override - protected void doPopulate() { - // This is required to allow the class loader to let the listener - // written above to access this method - super.doPopulate(); - } - - @Override - protected CacheType getValue() { - return getSubjectParent().getCacheTypeOf(getSubjectName()); - } - - @Override - protected void initialize() { - super.initialize(); - - PropertyValueModel defaultCacheTypeHolder = - buildDefaultCacheTypeHolder(); - - defaultCacheTypeHolder.addPropertyChangeListener( - PropertyValueModel.VALUE, - buildDefaultCachingTypePropertyChangeListener() - ); - } - - @Override - protected void setValue(CacheType value) { - getSubjectParent().setCacheTypeOf(getSubjectName(), value); - } - - @Override - protected boolean sortChoices() { - return false; - } - } - - private String getSubjectName() { - return this.getSubjectHolder().getValue().getName(); - } - - private Caching getSubjectParent() { - return this.getSubjectHolder().getValue().getParent(); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheSizeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheSizeComposite.java deleted file mode 100644 index 5d745a6da3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheSizeComposite.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * CacheSizeComposite - */ -public class DefaultCacheSizeComposite extends Pane -{ - /** - * Creates a new CacheTypeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public DefaultCacheSizeComposite(Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - - - @Override - protected void initializeLayout(Composite container) { - addDefaultCacheSizeCombo(container); - } - - private void addDefaultCacheSizeCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.DefaultCacheSizeComposite_defaultCacheSize; - } - - @Override - protected String getHelpId() { - return EclipseLinkHelpContextIds.PERSISTENCE_CACHING_DEFAULT_SIZE; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultCacheSizeDefault(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Caching.CACHE_SIZE_DEFAULT_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getCacheSizeDefault(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setCacheSizeDefault(value); - } - }; - } - }; - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheTypeComposite.java deleted file mode 100644 index 90f7b49657..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultCacheTypeComposite.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.CacheType; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * DefaultCacheTypeComposite - */ -public class DefaultCacheTypeComposite extends FormPane -{ - /** - * Creates a new DefaultCacheTypeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public DefaultCacheTypeComposite( - FormPane parentComposite, - Composite parent) { - - super( parentComposite, parent); - } - - private EnumFormComboViewer buildDefaultCacheTypeCombo(Composite container) { - return new EnumFormComboViewer(this, container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(Caching.CACHE_TYPE_DEFAULT_PROPERTY); - } - - @Override - protected CacheType[] getChoices() { - return CacheType.values(); - } - - @Override - protected boolean sortChoices() { - return false; - } - - @Override - protected CacheType getDefaultValue() { - return getSubject().getDefaultCacheTypeDefault(); - } - - @Override - protected String displayString(CacheType value) { - return buildDisplayString(EclipseLinkUiMessages.class, DefaultCacheTypeComposite.this, value); - } - - @Override - protected CacheType getValue() { - return getSubject().getCacheTypeDefault(); - } - - @Override - protected void setValue(CacheType value) { - getSubject().setCacheTypeDefault(value); - } - }; - } - - @Override - protected void initializeLayout( Composite container) { - - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlCachingTab_defaultCacheTypeLabel, - this.buildDefaultCacheTypeCombo( container), - EclipseLinkHelpContextIds.PERSISTENCE_CACHING_DEFAULT_TYPE - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultSharedCacheComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultSharedCacheComposite.java deleted file mode 100644 index c44b985fa4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/DefaultSharedCacheComposite.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * DefaultShareCacheComposite - */ -public class DefaultSharedCacheComposite extends FormPane -{ - /** - * Creates a new DefaultShareCacheComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public DefaultSharedCacheComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCachingTab_sharedCacheDefaultLabel, - this.buildDefaultSharedCacheHolder(), - this.buildDefaultSharedCacheStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CACHING_DEFAULT_SHARED - ); - } - - private WritablePropertyValueModel buildDefaultSharedCacheHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Caching.SHARED_CACHE_DEFAULT_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSharedCacheDefault(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSharedCacheDefault(value); - } - }; - } - - private PropertyValueModel buildDefaultSharedCacheStringHolder() { - return new TransformationPropertyValueModel(buildDefaultDefaultSharedCacheHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCachingTab_defaultSharedCacheDefaultLabel, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCachingTab_sharedCacheDefaultLabel; - } - }; - } - private PropertyValueModel buildDefaultDefaultSharedCacheHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Caching.SHARED_CACHE_DEFAULT_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSharedCacheDefault() != null) { - return null; - } - return this.subject.getDefaultSharedCacheDefault(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EclipseLinkCachingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EclipseLinkCachingComposite.java deleted file mode 100644 index 1b08156548..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EclipseLinkCachingComposite.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLinkCachingComposite - */ -public class EclipseLinkCachingComposite extends FormPane -{ - public EclipseLinkCachingComposite(FormPane subjectHolder, - Composite container) { - - super(subjectHolder, container); - } - - @Override - protected void initializeLayout(Composite parent) { - - Composite container = this.addSection( - parent, - EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionTitle, - EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionDescription - ); - - // Defaults - new CacheDefaultsComposite(this, container); - // EntitiesList - new EntityListComposite(this, container); - // Flush Clear Cache - new FlushClearCacheComposite(this, container); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityCachingPropertyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityCachingPropertyComposite.java deleted file mode 100644 index b658f03dbf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityCachingPropertyComposite.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.Entity; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * @version 2.0 - * @since 2.0 - */ -public class EntityCachingPropertyComposite extends Pane { - - /** - * Creates a new EntityCachingPropertyComposite. - * - * @param parentPane The parent container of this one - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - */ - public EntityCachingPropertyComposite(Pane parentComposite, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentComposite, subjectHolder, parent); - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - // Cache Type - new CacheTypeComposite(this, container); - - // Cache Size - new CacheSizeComposite(this, container); - - // Share Cache - new SharedCacheComposite(this, container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityListComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityListComposite.java deleted file mode 100644 index dfbca9ad71..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/EntityListComposite.java +++ /dev/null @@ -1,228 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2007, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import java.util.ListIterator; -import org.eclipse.core.resources.IProject; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.search.IJavaSearchScope; -import org.eclipse.jdt.core.search.SearchEngine; -import org.eclipse.jdt.ui.IJavaElementSearchConstants; -import org.eclipse.jdt.ui.JavaUI; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.window.Window; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.Entity; -import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.swing.ObjectListSelectionModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.SelectionDialog; -import org.eclipse.ui.progress.IProgressService; - -/** - * EntityListComposite - */ -public class EntityListComposite extends Pane -{ - WritablePropertyValueModel entityHolder; - - public EntityListComposite(Pane parentComposite, Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initialize() { - super.initialize(); - this.entityHolder = this.buildEntityHolder(); - } - - @Override - protected void initializeLayout(Composite container) { - - container = this.addTitledGroup( - container, - EclipseLinkUiMessages.CachingEntityListComposite_groupTitle - ); - - // Entities add/remove list pane - new AddRemoveListPane( - this, - container, - this.buildEntitiesAdapter(), - this.buildEntitiesListHolder(), - this.entityHolder, - this.buildEntityLabelProvider(), - EclipseLinkHelpContextIds.PERSISTENCE_CACHING - ); - - // Entity Caching property pane - EntityCachingPropertyComposite pane = new EntityCachingPropertyComposite( - this, - this.entityHolder, - container - ); - this.installPaneEnabler(this.entityHolder, pane); - } - - private AddRemoveListPane.Adapter buildEntitiesAdapter() { - return new AddRemoveListPane.AbstractAdapter() { - public void addNewItem(ObjectListSelectionModel listSelectionModel) { - EntityListComposite.this.addEntities(listSelectionModel); - } - - public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - Caching caching = getSubject(); - for (Object item : listSelectionModel.selectedValues()) { - Entity entityCaching = (Entity) item; - caching.removeEntity(entityCaching.getName()); - } - } - }; - } - - private void addEntities(ObjectListSelectionModel listSelectionModel) { - - IType type = this.chooseEntity(); - - if (type != null) { - String entityName = this.getEntityName(type.getFullyQualifiedName()); - if (entityName == null) { - entityName = type.getElementName(); - } - - if( ! this.getSubject().entityExists(entityName)) { - this.getSubject().addEntity(entityName); - int index = CollectionTools.indexOf(this.getSubject().entityNames(), entityName); - Entity entity = (Entity) listSelectionModel.getListModel().getElementAt(index); - listSelectionModel.setSelectedValue(entity); - this.entityHolder.setValue(entity); - } - } - } - - private String getEntityName(String fullyQualifiedTypeName) { - - org.eclipse.jpt.core.context.Entity entity = getSubject().getPersistenceUnit().getEntity(fullyQualifiedTypeName); - return (entity != null) ? entity.getName() : null; - } - - private IType chooseEntity() { - - IPackageFragmentRoot root = getPackageFragmentRoot(); - if (root == null) { - return null; - } - IJavaElement[] elements = new IJavaElement[] { root.getJavaProject() }; - IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements); - IProgressService service = PlatformUI.getWorkbench().getProgressService(); - SelectionDialog typeSelectionDialog; - - try { - typeSelectionDialog = JavaUI.createTypeDialog( - getShell(), - service, - scope, - IJavaElementSearchConstants.CONSIDER_CLASSES, - false, - "" - ); - } - catch (JavaModelException e) { - JptEclipseLinkUiPlugin.log(e); - return null; - } - typeSelectionDialog.setTitle(EclipseLinkUiMessages.CachingEntityListComposite_dialogTitle); - typeSelectionDialog.setMessage(EclipseLinkUiMessages.CachingEntityListComposite_dialogMessage); - - if (typeSelectionDialog.open() == Window.OK) { - return (IType) typeSelectionDialog.getResult()[0]; - } - return null; - } - - private IPackageFragmentRoot getPackageFragmentRoot() { - IProject project = getSubject().getJpaProject().getProject(); - IJavaProject root = JavaCore.create(project); - - try { - return root.getAllPackageFragmentRoots()[0]; - } - catch (JavaModelException e) { - JptEclipseLinkUiPlugin.log(e); - } - return null; - } - - private ILabelProvider buildEntityLabelProvider() { - return new LabelProvider() { - @Override - public String getText(Object element) { - Entity entityCaching = (Entity) element; - return entityCaching.getName(); - } - }; - } - - private WritablePropertyValueModel buildEntityHolder() { - return new SimplePropertyValueModel(); - } - - private ListValueModel buildEntitiesListHolder() { - return new ListAspectAdapter( - this.getSubjectHolder(), Caching.ENTITIES_LIST) { - @Override - protected ListIterator listIterator_() { - return this.subject.entities(); - } - @Override - protected int size_() { - return this.subject.entitiesSize(); - } - }; - } - - private void installPaneEnabler(WritablePropertyValueModel entityHolder, - EntityCachingPropertyComposite pane) { - - new PaneEnabler( - this.buildPaneEnablerHolder(entityHolder), - pane - ); - } - - private PropertyValueModel buildPaneEnablerHolder(WritablePropertyValueModel entityHolder) { - return new TransformationPropertyValueModel(entityHolder) { - @Override - protected Boolean transform_(Entity value) { - return value.entityNameIsValid(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/FlushClearCacheComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/FlushClearCacheComposite.java deleted file mode 100644 index 60e2756aed..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/FlushClearCacheComposite.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.FlushClearCache; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * FlushClearCacheComposite - */ -public class FlushClearCacheComposite extends FormPane -{ - /** - * Creates a new FlushClearCacheComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public FlushClearCacheComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite parent) { - this.addLabeledComposite( - parent, - EclipseLinkUiMessages.PersistenceXmlCachingTab_FlushClearCacheLabel, - this.addFlushClearCacheCombo(parent), - EclipseLinkHelpContextIds.PERSISTENCE_CACHING - ); - } - - private EnumFormComboViewer addFlushClearCacheCombo(Composite container) { - return new EnumFormComboViewer(this, container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(Caching.FLUSH_CLEAR_CACHE_PROPERTY); - } - - @Override - protected FlushClearCache[] getChoices() { - return FlushClearCache.values(); - } - - @Override - protected boolean sortChoices() { - return false; - } - - @Override - protected FlushClearCache getDefaultValue() { - return this.getSubject().getDefaultFlushClearCache(); - } - - @Override - protected String displayString(FlushClearCache value) { - return this.buildDisplayString(EclipseLinkUiMessages.class, FlushClearCacheComposite.class, value); - } - - @Override - protected FlushClearCache getValue() { - return this.getSubject().getFlushClearCache(); - } - - @Override - protected void setValue(FlushClearCache value) { - this.getSubject().setFlushClearCache(value); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/PersistenceXmlCachingTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/PersistenceXmlCachingTab.java deleted file mode 100644 index a1d325ef2f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/PersistenceXmlCachingTab.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2007, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaPageComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlCachingTab - */ -public class PersistenceXmlCachingTab - extends FormPane - implements JpaPageComposite -{ - public PersistenceXmlCachingTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - new EclipseLinkCachingComposite(this, container); - } - - // ********** JpaPageComposite implementation ********** - - public String getHelpID() { - return EclipseLinkHelpContextIds.PERSISTENCE_CACHING; - } - - public Image getPageImage() { - return null; - } - public String getPageText() { - return EclipseLinkUiMessages.PersistenceXmlCachingTab_title; - } - - // ********** Layout ********** - - @Override - protected Composite addContainer(Composite parent) { - GridLayout layout = new GridLayout(1, true); - layout.marginHeight = 0; - layout.marginWidth = 0; - layout.marginTop = 0; - layout.marginLeft = 0; - layout.marginBottom = 0; - layout.marginRight = 0; - layout.verticalSpacing = 15; - - Composite container = addPane(parent, layout); - updateGridData(container); - - return container; - } - - private void updateGridData(Composite container) { - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = SWT.FILL; - gridData.verticalAlignment = SWT.FILL; - container.setLayoutData(gridData); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/SharedCacheComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/SharedCacheComposite.java deleted file mode 100644 index 1540bd7fb6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/caching/SharedCacheComposite.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.caching; - -import java.util.ArrayList; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.Entity; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.ui.internal.widgets.TriStateCheckBox; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.ListPropertyValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * SharedCacheComposite - */ -public class SharedCacheComposite extends Pane -{ - private TriStateCheckBox sharedCacheCheckBox; - - /** - * Creates a new ShareCacheComposite. - * - * @param parentController The parent container of this one - * @param parent The parent container - */ - public SharedCacheComposite(Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - private PropertyValueModel buildCachingHolder() { - return new TransformationPropertyValueModel(this.getSubjectHolder()) { - @Override - protected Caching transform_(Entity value) { - return value.getParent(); - } - }; - } - - private PropertyValueModel buildDefaultAndNonDefaultSharedCacheHolder() { - return new ListPropertyValueModelAdapter( - buildDefaultAndNonDefaultSharedCacheListHolder() - ) { - @Override - protected Boolean buildValue() { - // If the number of ListValueModel equals 1, that means the shared - // Cache properties is not set (partially selected), which means we - // want to see the default value appended to the text - if (this.listHolder.size() == 1) { - return (Boolean) this.listHolder.listIterator().next(); - } - return null; - } - }; - } - - private ListValueModel buildDefaultAndNonDefaultSharedCacheListHolder() { - ArrayList> holders = new ArrayList>(2); - holders.add(buildSharedCacheListHolder()); - holders.add(buildDefaultSharedCacheListHolder()); - - return new CompositeListValueModel, Boolean>( - holders - ); - } - - private PropertyValueModel buildDefaultSharedCacheHolder() { - return new PropertyAspectAdapter(buildCachingHolder(), Caching.SHARED_CACHE_DEFAULT_PROPERTY) { - @Override - protected Boolean buildValue_() { - Boolean value = this.subject.getSharedCacheDefault(); - if (value == null) { - value = this.subject.getDefaultSharedCacheDefault(); - } - return value; - } - }; - } - - private ListValueModel buildDefaultSharedCacheListHolder() { - return new PropertyListValueModelAdapter( - buildDefaultSharedCacheHolder() - ); - } - - private WritablePropertyValueModel buildSharedCacheHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), Entity.SHARED_CACHE_PROPERTY) { - @Override - protected Boolean buildValue_() { - return getSubjectParent().getSharedCacheOf(getSubjectName()); - } - - @Override - protected void setValue_(Boolean value) { - getSubjectParent().setSharedCacheOf(getSubjectName(), value); - } - }; - } - - private String getSubjectName() { - return this.getSubjectHolder().getValue().getName(); - } - - private Caching getSubjectParent() { - return this.getSubjectHolder().getValue().getParent(); - } - - private ListValueModel buildSharedCacheListHolder() { - return new PropertyListValueModelAdapter( - buildSharedCacheHolder() - ); - } - - private PropertyValueModel buildSharedCacheStringHolder() { - return new TransformationPropertyValueModel(buildDefaultAndNonDefaultSharedCacheHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCachingTab_defaultSharedCacheLabel, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCachingTab_sharedCacheLabel; - } - }; - } - - @Override - public void enableWidgets(boolean enabled) { - super.enableWidgets(enabled); - this.sharedCacheCheckBox.setEnabled(enabled); - } - - @Override - protected void initializeLayout(Composite container) { - - this.sharedCacheCheckBox = this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCachingTab_sharedCacheLabel, - this.buildSharedCacheHolder(), - this.buildSharedCacheStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CACHING - ); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/BatchWritingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/BatchWritingComposite.java deleted file mode 100644 index 30b562d6b8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/BatchWritingComposite.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.BatchWriting; -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * BatchWritingComposite - */ -public class BatchWritingComposite - extends FormPane -{ - /** - * Creates a new BatchWritingComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public BatchWritingComposite( - FormPane parentComposite, - Composite parent) { - - super( parentComposite, parent); - } - - private EnumFormComboViewer addBatchWritingCombo(Composite container) { - return new EnumFormComboViewer(this, container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(Connection.BATCH_WRITING_PROPERTY); - } - - @Override - protected BatchWriting[] getChoices() { - return BatchWriting.values(); - } - - @Override - protected BatchWriting getDefaultValue() { - return getSubject().getDefaultBatchWriting(); - } - - @Override - protected String displayString(BatchWriting value) { - return buildDisplayString(EclipseLinkUiMessages.class, BatchWritingComposite.this, value); - } - - @Override - protected BatchWriting getValue() { - return getSubject().getBatchWriting(); - } - - @Override - protected void setValue(BatchWriting value) { - getSubject().setBatchWriting(value); - } - }; - } - - @Override - protected void initializeLayout( Composite container) { - - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_batchWritingLabel, - this.addBatchWritingCombo( container), - JpaHelpContextIds.PERSISTENCE_XML_CONNECTION - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/CacheStatementsPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/CacheStatementsPropertiesComposite.java deleted file mode 100644 index 0a4e0e5572..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/CacheStatementsPropertiesComposite.java +++ /dev/null @@ -1,135 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * CacheStatementsPropertiesComposite - */ -public class CacheStatementsPropertiesComposite - extends Pane -{ - public CacheStatementsPropertiesComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - WritablePropertyValueModel cacheStatementsHolder = buildCacheStatementsHolder(); - - container = this.addSubPane(container, 3, 5, 0, 0, 0); - - this.addTriStateCheckBox( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_cacheStatementsLabel, - cacheStatementsHolder, - JpaHelpContextIds.PERSISTENCE_XML_CONNECTION - ); - IntegerCombo combo = addCacheStatementsSizeCombo(container); - - this.installControlEnabler(cacheStatementsHolder, combo); - } - - private WritablePropertyValueModel buildCacheStatementsHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.CACHE_STATEMENTS_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getCacheStatements(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setCacheStatements(value); - } - - @Override - protected void subjectChanged() { - Object oldValue = this.getValue(); - super.subjectChanged(); - Object newValue = this.getValue(); - - // Make sure the default value is appended to the text - if (oldValue == newValue && newValue == null) { - this.fireAspectChanged(Boolean.TRUE, newValue); - } - } - }; - } - - private IntegerCombo addCacheStatementsSizeCombo(Composite container) { - return new IntegerCombo(this, container) { - - @Override - protected CCombo addIntegerCombo(Composite container) { - return this.addEditableCCombo( - container, - buildDefaultListHolder(), - buildSelectedItemStringHolder(), - StringConverter.Default.instance()); - } - - @Override - protected String getLabelText() { - throw new UnsupportedOperationException(); - } - - @Override - protected String getHelpId() { - return JpaHelpContextIds.PERSISTENCE_XML_CONNECTION; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultCacheStatementsSize(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.CACHE_STATEMENTS_SIZE_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getCacheStatementsSize(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setCacheStatementsSize(value); - } - }; - } - }; - } - - private void installControlEnabler(WritablePropertyValueModel cacheStatementsHolder, IntegerCombo combo) { - - new PaneEnabler(cacheStatementsHolder, combo); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/ConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/ConnectionPropertiesComposite.java deleted file mode 100644 index f0c4e80ce0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/ConnectionPropertiesComposite.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.swt.widgets.Composite; - -/** - * ConnectionPropertiesComposite - */ -public class ConnectionPropertiesComposite - extends Pane -{ - public ConnectionPropertiesComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - container = addTitledGroup( - container, - EclipseLinkUiMessages.ConnectionPropertiesComposite_Database_GroupBox - ); - - new DataSourcePropertiesComposite(this, container); - new JdbcPropertiesComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/DataSourcePropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/DataSourcePropertiesComposite.java deleted file mode 100644 index f72867eb89..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/DataSourcePropertiesComposite.java +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.utility.swt.SWTTools; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; - -/** - * @version 2.0 - * @since 2.0 - */ -public class DataSourcePropertiesComposite - extends Pane -{ - /** - * Creates a new DataSourcePropertiesComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public DataSourcePropertiesComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - private WritablePropertyValueModel buildJtaDataSourceHolder() { - return new PropertyAspectAdapter(buildPersistenceUnitHolder(), PersistenceUnit.JTA_DATA_SOURCE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getJtaDataSource(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setJtaDataSource(value); - } - }; - } - - private PropertyValueModel buildJTADataSourceHolder() { - return new TransformationPropertyValueModel(buildTransactionTypeHolder()) { - @Override - protected Boolean transform(PersistenceUnitTransactionType value) { - return value == null || value == PersistenceUnitTransactionType.JTA; - } - }; - } - - private WritablePropertyValueModel buildNonJtaDataSourceHolder() { - return new PropertyAspectAdapter(buildPersistenceUnitHolder(), PersistenceUnit.NON_JTA_DATA_SOURCE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getNonJtaDataSource(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setNonJtaDataSource(value); - } - }; - } - - private PropertyValueModel buildNonJTADataSourceHolder() { - return new TransformationPropertyValueModel(buildTransactionTypeHolder()) { - @Override - protected Boolean transform(PersistenceUnitTransactionType value) { - return Boolean.valueOf(value == PersistenceUnitTransactionType.RESOURCE_LOCAL); - } - }; - } - - private PropertyValueModel buildTransactionTypeHolder() { - return new PropertyAspectAdapter( - buildPersistenceUnitHolder(), - PersistenceUnit.SPECIFIED_TRANSACTION_TYPE_PROPERTY, - PersistenceUnit.DEFAULT_TRANSACTION_TYPE_PROPERTY) { - @Override - protected PersistenceUnitTransactionType buildValue_() { - return this.subject.getTransactionType(); - } - }; - } - - private PropertyValueModel buildPersistenceUnitHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected PersistenceUnit buildValue_() { - return this.subject.getPersistenceUnit(); - } - }; - - } - - @Override - protected void initializeLayout(Composite container) { - - int groupBoxMargin = getGroupBoxMargin(); - - container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - - // JTA Data Source - Label jtaLabel = addUnmanagedLabel(container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_jtaDataSourceLabel); - Text text = addUnmanagedText(container, this.buildJtaDataSourceHolder(), this.getHelpID()); - this.addLabeledComposite(container, jtaLabel, text, this.getHelpID()); - - this.installJTADataSourceControlEnabler(text, jtaLabel); - - // Non-JTA Data Source - Label nonJtaLabel = addUnmanagedLabel(container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_nonJtaDataSourceLabel); - Text nonJtaText = addUnmanagedText(container, buildNonJtaDataSourceHolder(), this.getHelpID()); - this.addLabeledComposite(container, nonJtaLabel, nonJtaText, this.getHelpID()); - - this.installNonJTADataSourceControlEnabler(nonJtaText, nonJtaLabel); - } - - private void installJTADataSourceControlEnabler(Text text, Label label) { - SWTTools.controlEnabledState(buildJTADataSourceHolder(), text, label); - } - - private void installNonJTADataSourceControlEnabler(Text text, Label label) { - SWTTools.controlEnabledState(buildNonJTADataSourceHolder(), text, label); - } - - public String getHelpID() { - return JpaHelpContextIds.PERSISTENCE_XML_CONNECTION; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/EclipseLinkConnectionComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/EclipseLinkConnectionComposite.java deleted file mode 100644 index 2f230bb204..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/EclipseLinkConnectionComposite.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLinkConnectionComposite - */ -public class EclipseLinkConnectionComposite - extends FormPane -{ - public EclipseLinkConnectionComposite( - FormPane subjectHolder, - Composite container) { - super(subjectHolder, container, false); - } - - @Override - protected void initializeLayout(Composite container) { - - int groupBoxMargin = getGroupBoxMargin() * 2; - - container = addSection( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_sectionTitle, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_sectionDescription - ); - - Composite subPane = addSubPane( - container, - 0, groupBoxMargin, 10, groupBoxMargin - ); - - new TransactionTypeComposite(this, subPane); - - new BatchWritingComposite(this, subPane); - - new CacheStatementsPropertiesComposite(this, subPane); - - new NativeSqlComposite(this, subPane); - - new ConnectionPropertiesComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcBindParametersComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcBindParametersComposite.java deleted file mode 100644 index 10f2e9c9ff..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcBindParametersComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcBindParametersComposite - */ -public class JdbcBindParametersComposite extends Pane -{ - /** - * Creates a new JdbcBindParametersComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public JdbcBindParametersComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_bindParametersLabel, - this.buildBindParametersHolder(), - this.buildBindParametersStringHolder(), - JpaHelpContextIds.PERSISTENCE_XML_CONNECTION - ); - } - - private WritablePropertyValueModel buildBindParametersHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.BIND_PARAMETERS_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getBindParameters(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setBindParameters(value); - } - }; - } - - private PropertyValueModel buildBindParametersStringHolder() { - return new TransformationPropertyValueModel(buildDefaultBindParametersHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlConnectionTab_bindParametersLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_bindParametersLabel; - } - }; - } - - private PropertyValueModel buildDefaultBindParametersHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Connection.BIND_PARAMETERS_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getBindParameters() != null) { - return null; - } - return this.subject.getDefaultBindParameters(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcConnectionPropertiesComposite.java deleted file mode 100644 index feb5e35c9e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcConnectionPropertiesComposite.java +++ /dev/null @@ -1,343 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import java.util.Comparator; -import java.util.Iterator; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.IDialogSettings; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jpt.db.ConnectionProfile; -import org.eclipse.jpt.db.ConnectionProfileFactory; -import org.eclipse.jpt.db.JptDbPlugin; -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.JptUiPlugin; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.StringTools; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; - -/** - * JdbcConnectionPropertiesComposite - */ -@SuppressWarnings("nls") -public class JdbcConnectionPropertiesComposite - extends Pane -{ - /** - * The constant ID used to retrieve the dialog settings. - */ - private static final String DIALOG_SETTINGS = "org.eclipse.jpt.eclipselink.ui.dialogs.ConnectionDialog"; - - public JdbcConnectionPropertiesComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - private WritablePropertyValueModel buildPasswordHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.PASSWORD_PROPERTY) { - @Override - protected String buildValue_() { - return subject.getPassword(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - subject.setPassword(value); - } - }; - } - - private Runnable buildPopulateFromConnectionAction() { - return new Runnable() { - public void run() { - promptConnection(); - } - }; - } - - private WritablePropertyValueModel buildUrlHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.URL_PROPERTY) { - @Override - protected String buildValue_() { - return subject.getUrl(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - subject.setUrl(value); - } - }; - } - - private WritablePropertyValueModel buildUserHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.USER_PROPERTY) { - @Override - protected String buildValue_() { - return subject.getUser(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - subject.setUser(value); - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - - // Populate from Connection hyperlink - this.addHyperlink( - container, - "Populate from Connection...", - buildPopulateFromConnectionAction() - ); - - // Driver - new JdbcDriverComposite(this, container); - - // Url - this.addLabeledText( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_urlLabel, - buildUrlHolder() - ); - - // User - this.addLabeledText( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_userLabel, - buildUserHolder() - ); - - // Password - this.addLabeledPasswordText( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_passwordLabel, - buildPasswordHolder() - ); - - // Bind Parameters - new JdbcBindParametersComposite(this, container); - } - - void promptConnection() { - - ConnectionSelectionDialog dialog = new ConnectionSelectionDialog(); - - if (dialog.open() != IDialogConstants.OK_ID) { - return; - } - - String name = (String) dialog.getResult()[0]; - ConnectionProfile cp = this.getConnectionProfileFactory().buildConnectionProfile(name); - - Connection connection = getSubject(); - connection.setUrl((cp == null) ? "" : cp.getURL()); - connection.setUser((cp == null) ? "" : cp.getUserName()); - connection.setPassword((cp == null) ? "" : cp.getUserPassword()); - connection.setDriver((cp == null) ? "" : cp.getDriverClassName()); - } - - ConnectionProfileFactory getConnectionProfileFactory() { - // we allow the user to select any connection profile and simply - // take the settings from it (user, password, etc.) and give them - // to the EclipseLink connection, so we go - // to the db plug-in directly to get the factory - return JptDbPlugin.instance().getConnectionProfileFactory(); - } - - // broaden access a bit - Shell getShell_() { - return this.getShell(); - } - - /** - * This dialog shows the list of possible connection names and lets the user - * the option to filter them using a search field. - */ - protected class ConnectionSelectionDialog extends FilteredItemsSelectionDialog { - - /** - * Creates a new MappingSelectionDialog. - */ - protected ConnectionSelectionDialog() { - super(JdbcConnectionPropertiesComposite.this.getShell_(), false); - setMessage(EclipseLinkUiMessages.JdbcConnectionPropertiesComposite_ConnectionDialog_Message); - setTitle(EclipseLinkUiMessages.JdbcConnectionPropertiesComposite_ConnectionDialog_Title); - setListLabelProvider(buildLabelProvider()); - setDetailsLabelProvider(buildLabelProvider()); - } - - protected ILabelProvider buildLabelProvider() { - return new LabelProvider() { - @Override - public Image getImage(Object element) { - return null; - } - - @Override - public String getText(Object element) { - return (element == null) ? "" : element.toString(); - } - }; - } - - /* - * (non-Javadoc) - */ - @Override - protected Control createExtendedContentArea(Composite parent) { - return null; - } - - /* - * (non-Javadoc) - */ - @Override - protected ItemsFilter createFilter() { - return new ConnectionItemsFilter(); - } - - /* - * (non-Javadoc) - */ - @Override - protected void fillContentProvider(AbstractContentProvider provider, - ItemsFilter itemsFilter, - IProgressMonitor monitor) throws CoreException { - - monitor.beginTask(null, -1); - - try { - // Add the connection names to the dialog - for (Iterator stream = this.connectionProfileNames(); stream.hasNext(); ) { - provider.add(stream.next(), itemsFilter); - } - } - finally { - monitor.done(); - } - } - - private Iterator connectionProfileNames() { - return JdbcConnectionPropertiesComposite.this.getConnectionProfileFactory().connectionProfileNames(); - } - - /* - * (non-Javadoc) - */ - @Override - protected IDialogSettings getDialogSettings() { - - IDialogSettings dialogSettings = JptUiPlugin.instance().getDialogSettings(); - IDialogSettings settings = dialogSettings.getSection(DIALOG_SETTINGS); - - if (settings == null) { - settings = dialogSettings.addNewSection(DIALOG_SETTINGS); - } - - return settings; - } - - /* - * (non-Javadoc) - */ - @Override - public String getElementName(Object object) { - return object.toString(); - } - - /* - * (non-Javadoc) - */ - @Override - protected Comparator getItemsComparator() { - return new Comparator() { - public int compare(String item1, String item2) { - return item1.compareTo(item2); - } - }; - } - - /* - * (non-Javadoc) - */ - @Override - protected IStatus validateItem(Object item) { - - if (item == null) { - return new Status(IStatus.ERROR, JptUiPlugin.PLUGIN_ID, IStatus.ERROR, "", null); - } - - return Status.OK_STATUS; - } - - /** - * Create the filter responsible to remove any connection name based on - * the pattern entered in the text field. - */ - private class ConnectionItemsFilter extends ItemsFilter { - - /** - * Creates a new ConnectionItemsFilter. - */ - ConnectionItemsFilter() { - - super(); - - // Make sure that if the pattern is empty, we specify * in order - // to show all the mapping types - if (StringTools.stringIsEmpty(getPattern())) { - patternMatcher.setPattern("*"); - } - } - - /* - * (non-Javadoc) - */ - @Override - public boolean isConsistentItem(Object item) { - return true; - } - - /* - * (non-Javadoc) - */ - @Override - public boolean matchItem(Object item) { - return matches(item.toString()); - } - } - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcDriverComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcDriverComposite.java deleted file mode 100644 index 7f11918ce4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcDriverComposite.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcDriverComposite - */ -public class JdbcDriverComposite extends Pane -{ - /** - * Creates a new EventListenerComposite. - * - * @param parentPane The parent pane of this one - * @param parent The parent container - */ - public JdbcDriverComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private ClassChooserPane initializeClassChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter( - this.getSubjectHolder(), Connection.DRIVER_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getDriver(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - this.subject.setDriver(value); - } - }; - } - - @Override - protected String getClassName() { - return this.getSubject().getDriver(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_driverLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - @Override - protected void setClassName(String className) { - this.getSubject().setDriver(className); - } - - @Override - protected boolean allowTypeCreation() { - //Does not make sense to allow the user to create a new Driver class - return false; - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - this.initializeClassChooser(container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcPropertiesComposite.java deleted file mode 100644 index abbe8c2b71..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcPropertiesComposite.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcPropertiesComposite - */ -public class JdbcPropertiesComposite - extends Pane -{ - public JdbcPropertiesComposite(Pane parentComposite, Composite parent) { - - super(parentComposite, parent); - } - - private PropertyValueModel buildPaneEnablerHolder() { - return new TransformationPropertyValueModel(buildTransactionTypeHolder()) { - @Override - protected Boolean transform(PersistenceUnitTransactionType value) { - return value == PersistenceUnitTransactionType.RESOURCE_LOCAL; - } - }; - } - - private PropertyValueModel buildTransactionTypeHolder() { - return new PropertyAspectAdapter( - buildPersistenceUnitHolder(), - PersistenceUnit.SPECIFIED_TRANSACTION_TYPE_PROPERTY, - PersistenceUnit.DEFAULT_TRANSACTION_TYPE_PROPERTY) { - @Override - protected PersistenceUnitTransactionType buildValue_() { - return this.subject.getTransactionType(); - } - }; - } - - private PropertyValueModel buildPersistenceUnitHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected PersistenceUnit buildValue_() { - return this.subject.getPersistenceUnit(); - } - }; - - } - - @Override - protected void initializeLayout(Composite container) { - - container = addTitledGroup( - addSubPane(container, 10), - EclipseLinkUiMessages.JdbcPropertiesComposite_EclipseLinkConnectionPool_GroupBox - ); - - new JdbcConnectionPropertiesComposite(this, container); - - container = addPane(container, new GridLayout(2, true)); - - new JdbcReadConnectionPropertiesComposite(this, container); - new JdbcWriteConnectionPropertiesComposite(this, container); - - this.installPaneEnabler(); - } - - private void installPaneEnabler() { - new PaneEnabler(buildPaneEnablerHolder(), this); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionPropertiesComposite.java deleted file mode 100644 index 87c5f39d5b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionPropertiesComposite.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcReadConnectionPropertiesComposite - */ -public class JdbcReadConnectionPropertiesComposite - extends Pane -{ - public JdbcReadConnectionPropertiesComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - - container = this.addSection( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsSectionTitle - ); - - GridData data = (GridData) container.getLayoutData(); - data.verticalAlignment = SWT.TOP; - - data = (GridData) getControl().getLayoutData(); - data.verticalAlignment = SWT.TOP; - - // Read Connections Shared - new JdbcReadConnectionsSharedComposite(this, container); - - // Read Connections Minimum - new JdbcReadConnectionsMinComposite(this, container); - - // Read Connections Maximum - new JdbcReadConnectionsMaxComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMaxComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMaxComposite.java deleted file mode 100644 index 7567047e91..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMaxComposite.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcReadConnectionsMaxComposite - */ -public class JdbcReadConnectionsMaxComposite - extends Pane -{ - /** - * Creates a new JdbcReadConnectionsMaxComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public JdbcReadConnectionsMaxComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - - @Override - protected void initializeLayout(Composite container) { - addReadConnectionsMaxCombo(container); - } - - private void addReadConnectionsMaxCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsMaxLabel; - } - - @Override - protected String getHelpId() { - return JpaHelpContextIds.PERSISTENCE_XML_CONNECTION; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultReadConnectionsMax(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.READ_CONNECTIONS_MAX_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getReadConnectionsMax(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setReadConnectionsMax(value); - } - }; - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMinComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMinComposite.java deleted file mode 100644 index 2b4333624c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsMinComposite.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcReadConnectionsMinComposite - */ -public class JdbcReadConnectionsMinComposite - extends Pane -{ - /** - * Creates a new JdbcReadConnectionsMinComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public JdbcReadConnectionsMinComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addReadConnectionsMinCombo(container); - } - - private void addReadConnectionsMinCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsMinLabel; - } - - @Override - protected String getHelpId() { - return JpaHelpContextIds.PERSISTENCE_XML_CONNECTION; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultReadConnectionsMin(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.READ_CONNECTIONS_MIN_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getReadConnectionsMin(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setReadConnectionsMin(value); - } - }; - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsSharedComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsSharedComposite.java deleted file mode 100644 index 2bd8bd9bba..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcReadConnectionsSharedComposite.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * ReadConnectionsSharedComposite - */ -public class JdbcReadConnectionsSharedComposite - extends Pane -{ - /** - * Creates a new ReadConnectionsSharedComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public JdbcReadConnectionsSharedComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsSharedLabel, - this.buildReadConnectionsSharedHolder(), - this.buildReadConnectionsSharedStringHolder(), - JpaHelpContextIds.PERSISTENCE_XML_CONNECTION - ); - } - - private WritablePropertyValueModel buildReadConnectionsSharedHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.READ_CONNECTIONS_SHARED_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getReadConnectionsShared(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setReadConnectionsShared(value); - } - }; - } - - private PropertyValueModel buildReadConnectionsSharedStringHolder() { - return new TransformationPropertyValueModel(buildDefaultReadConnectionsSharedHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsSharedLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsSharedLabel; - } - }; - } - - private PropertyValueModel buildDefaultReadConnectionsSharedHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Connection.READ_CONNECTIONS_SHARED_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getReadConnectionsShared() != null) { - return null; - } - return this.subject.getDefaultReadConnectionsShared(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionPropertiesComposite.java deleted file mode 100644 index 2a0629fad9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionPropertiesComposite.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcWriteConnectionPropertiesComposite - */ -@SuppressWarnings("nls") -public class JdbcWriteConnectionPropertiesComposite - extends Pane -{ - public JdbcWriteConnectionPropertiesComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - - container = this.addSection( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_writeConnectionsSectionTitle - ); - - GridData data = (GridData) container.getLayoutData(); - data.verticalAlignment = SWT.TOP; - - data = (GridData) getControl().getLayoutData(); - data.verticalAlignment = SWT.TOP; - - // This will add space to have the same layout than read connection pool - Button space = this.getWidgetFactory().createCheckBox(container, "m"); - Point size = space.computeSize(SWT.DEFAULT, SWT.DEFAULT); - container = this.addSubPane(container, size.y + 5); - space.dispose(); - - // Write Connections Minimum - new JdbcWriteConnectionsMinComposite(this, container); - - // Write Connections Maximum - new JdbcWriteConnectionsMaxComposite(this, container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMaxComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMaxComposite.java deleted file mode 100644 index aeec73a6e7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMaxComposite.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcWriteConnectionsMaxComposite - */ -public class JdbcWriteConnectionsMaxComposite - extends Pane -{ - /** - * Creates a new JdbcWriteConnectionsMaxComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public JdbcWriteConnectionsMaxComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addWriteConnectionsMaxCombo(container); - } - - private void addWriteConnectionsMaxCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_writeConnectionsMaxLabel; - } - - @Override - protected String getHelpId() { - return JpaHelpContextIds.PERSISTENCE_XML_CONNECTION; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultWriteConnectionsMax(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.WRITE_CONNECTIONS_MAX_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getWriteConnectionsMax(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setWriteConnectionsMax(value); - } - }; - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMinComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMinComposite.java deleted file mode 100644 index 9f3ce2d877..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/JdbcWriteConnectionsMinComposite.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * JdbcWriteConnectionsMinComposite - */ -public class JdbcWriteConnectionsMinComposite - extends Pane -{ - /** - * Creates a new JdbcWriteConnectionsMinComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public JdbcWriteConnectionsMinComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addWriteConnectionsMinCombo(container); - } - - private void addWriteConnectionsMinCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_writeConnectionsMinLabel; - } - - @Override - protected String getHelpId() { - return JpaHelpContextIds.PERSISTENCE_XML_CONNECTION; - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultWriteConnectionsMin(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.WRITE_CONNECTIONS_MIN_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getWriteConnectionsMin(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setWriteConnectionsMin(value); - } - }; - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/NativeSqlComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/NativeSqlComposite.java deleted file mode 100644 index bcc7396f2e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/NativeSqlComposite.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * NativeSqlComposite - */ -public class NativeSqlComposite - extends Pane -{ - /** - * Creates a new NativeSqlComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public NativeSqlComposite( - Pane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_nativeSqlLabel, - this.buildNativeSqlHolder(), - this.buildNativeSqlStringHolder(), - JpaHelpContextIds.PERSISTENCE_XML_CONNECTION - ); - } - - private WritablePropertyValueModel buildNativeSqlHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Connection.NATIVE_SQL_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getNativeSql(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setNativeSql(value); - } - - }; - } - - private PropertyValueModel buildNativeSqlStringHolder() { - return new TransformationPropertyValueModel(buildDefaultNativeSqlHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlConnectionTab_nativeSqlLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_nativeSqlLabel; - } - }; - } - - private PropertyValueModel buildDefaultNativeSqlHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Connection.NATIVE_SQL_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getNativeSql() != null) { - return null; - } - return this.subject.getDefaultNativeSql(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/PersistenceXmlConnectionTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/PersistenceXmlConnectionTab.java deleted file mode 100644 index b2e6fdcb62..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/PersistenceXmlConnectionTab.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaPageComposite; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlConnectionTab - */ -public class PersistenceXmlConnectionTab - extends FormPane - implements JpaPageComposite -{ - // ********** constructors/initialization ********** - public PersistenceXmlConnectionTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new EclipseLinkConnectionComposite(this, container); - } - - // ********** JpaPageComposite implementation ********** - - public String getHelpID() { - return JpaHelpContextIds.PERSISTENCE_XML_CONNECTION; - } - - public Image getPageImage() { - return null; - } - - public String getPageText() { - return EclipseLinkUiMessages.PersistenceXmlConnectionTab_title; - } - - // ********** Layout ********** - @Override - protected Composite addContainer(Composite parent) { - GridLayout layout = new GridLayout(1, true); - layout.marginHeight = 0; - layout.marginWidth = 0; - layout.marginTop = 0; - layout.marginLeft = 0; - layout.marginBottom = 0; - layout.marginRight = 0; - layout.verticalSpacing = 15; - Composite container = this.addPane(parent, layout); - this.updateGridData(container); - return container; - } - - private void updateGridData(Composite container) { - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = SWT.FILL; - gridData.verticalAlignment = SWT.FILL; - container.setLayoutData(gridData); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/TransactionTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/TransactionTypeComposite.java deleted file mode 100644 index bc15e1bc17..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/connection/TransactionTypeComposite.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.connection; - -import java.util.Collection; - -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; -import org.eclipse.jpt.eclipselink.core.context.persistence.connection.Connection; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * TransactionTypeComposite - */ -public class TransactionTypeComposite - extends FormPane -{ - /** - * Creates a new TransactionTypeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public TransactionTypeComposite( - FormPane parentComposite, - Composite parent) { - - super( parentComposite, parent); - } - - private EnumFormComboViewer addTransactionTypeCombo(Composite container) { - return new EnumFormComboViewer(this, buildPersistenceUnitHolder(), container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(PersistenceUnit.SPECIFIED_TRANSACTION_TYPE_PROPERTY); - propertyNames.add(PersistenceUnit.DEFAULT_TRANSACTION_TYPE_PROPERTY); - } - - @Override - protected PersistenceUnitTransactionType[] getChoices() { - return PersistenceUnitTransactionType.values(); - } - - @Override - protected PersistenceUnitTransactionType getDefaultValue() { - return getSubject().getDefaultTransactionType(); - } - - @Override - protected String displayString(PersistenceUnitTransactionType value) { - return buildDisplayString(EclipseLinkUiMessages.class, TransactionTypeComposite.this, value); - } - - @Override - protected PersistenceUnitTransactionType getValue() { - return getSubject().getSpecifiedTransactionType(); - } - - @Override - protected void setValue(PersistenceUnitTransactionType value) { - getSubject().setSpecifiedTransactionType(value); - - if (value == PersistenceUnitTransactionType.RESOURCE_LOCAL) { - clearJTAProperties(); - } - else { - clearResourceLocalProperties(); - } - } - }; - } - - private PropertyValueModel buildPersistenceUnitHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected PersistenceUnit buildValue_() { - return this.subject.getPersistenceUnit(); - } - }; - - } - - private void clearJTAProperties() { - getSubject().getPersistenceUnit().setJtaDataSource(null); - } - - private void clearResourceLocalProperties() { - Connection connection = getSubject(); - connection.getPersistenceUnit().setNonJtaDataSource(null); - connection.setDriver(null); - connection.setUrl(null); - connection.setUser(null); - connection.setPassword(null); - connection.setBindParameters(null); - connection.setWriteConnectionsMax(null); - connection.setWriteConnectionsMin(null); - connection.setReadConnectionsMax(null); - connection.setReadConnectionsMin(null); - connection.setReadConnectionsShared(null); - } - - @Override - protected void initializeLayout( Composite container) { - - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_transactionTypeLabel, - this.addTransactionTypeCombo( container), - JpaHelpContextIds.PERSISTENCE_XML_CONNECTION - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/CustomizerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/CustomizerComposite.java deleted file mode 100644 index ee345a17e3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/CustomizerComposite.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCustomizer; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.customization.Entity; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * CustomizerComposite - */ -public class CustomizerComposite extends Pane -{ - /** - * Creates a new CustomizerComposite. - * - * @param parentPane The parent pane of this one - * @param parent The parent container - */ - public CustomizerComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private ClassChooserPane initializeClassChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter( - this.getSubjectHolder(), Entity.DESCRIPTOR_CUSTOMIZER_PROPERTY) { - @Override - protected String buildValue_() { - return getSubjectParent().getDescriptorCustomizerOf(getSubjectName()); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - getSubjectParent().setDescriptorCustomizerOf(getSubjectName(), value); - } - }; - } - - @Override - protected String getClassName() { - return getSubjectParent().getDescriptorCustomizerOf(getSubjectName()); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_customizerLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubjectParent().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - getSubjectParent().setDescriptorCustomizerOf(getSubjectName(), className); - } - - @Override - protected String getSuperInterfaceName() { - return EclipseLinkCustomizer.ECLIPSELINK_DESCRIPTOR_CUSTOMIZER_CLASS_NAME; - } - }; - } - - private String getSubjectName() { - return this.getSubjectHolder().getValue().getName(); - } - - private Customization getSubjectParent() { - return this.getSubjectHolder().getValue().getParent(); - } - - @Override - protected void initializeLayout(Composite container) { - this.initializeClassChooser(container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EclipseLinkCustomizationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EclipseLinkCustomizationComposite.java deleted file mode 100644 index 5eaea381eb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EclipseLinkCustomizationComposite.java +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.forms.widgets.ExpandableComposite; -import org.eclipse.ui.forms.widgets.Section; - -/** - * PersistenceUnitCustomizationComposite - */ -public class EclipseLinkCustomizationComposite extends FormPane -{ - public EclipseLinkCustomizationComposite(FormPane subjectHolder, - Composite container) { - - super(subjectHolder, container); - } - - @Override - protected void initializeLayout(Composite parent) { - Section section = getWidgetFactory().createSection(parent, SWT.FLAT | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION); - section.setText(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_sectionTitle); - section.setDescription(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_sectionDescription); - section.setLayoutData(new GridData(GridData.FILL_BOTH)); - - Composite composite = this.addSubPane(section); - section.setClient(composite); - - // Default pane - int groupBoxMargin = this.getGroupBoxMargin(); - - Composite defaultPane = this.addSubPane( - composite, - 0, groupBoxMargin, 0, groupBoxMargin - ); - - // Weaving - new WeavingComposite(this, defaultPane); - - // Weaving Lazy - new WeavingLazyComposite(this, defaultPane); - - // Weaving Fetch Groups - new WeavingFetchGroupsComposite(this, defaultPane); - - // Weaving Internal - new WeavingInternalComposite(this, defaultPane); - - // Weaving Eager - new WeavingEagerComposite(this, defaultPane); - - // Weaving Change Tracking - new WeavingChangeTrackingComposite(this, defaultPane); - - // Throw Exceptions - new ThrowExceptionsComposite(this, defaultPane); - - // Exception Handler - new ExceptionHandlerComposite(this, defaultPane); - - // Session Customizer - new SessionCustomizersComposite(this, composite); - - // EntitiesList - new EntityListComposite(this, composite); - - // Validation Only - new ValidationOnlyComposite(this, composite); - - // Profiler: - new ProfilerComposite(this, composite); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityCustomizationPropertyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityCustomizationPropertyComposite.java deleted file mode 100644 index c8b944fc6d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityCustomizationPropertyComposite.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.customization.Entity; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * EntityCustomizationPropertyComposite - */ -public class EntityCustomizationPropertyComposite extends Pane { - - /** - * Creates a new EntityCustomizationPropertyComposite. - * - * @param parentPane The parent container of this one - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - */ - public EntityCustomizationPropertyComposite(Pane parentComposite, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentComposite, subjectHolder, parent); - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - // Customizer - new CustomizerComposite(this, container); - - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityListComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityListComposite.java deleted file mode 100644 index c08bc35d49..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/EntityListComposite.java +++ /dev/null @@ -1,228 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2007, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import java.util.ListIterator; -import org.eclipse.core.resources.IProject; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.search.IJavaSearchScope; -import org.eclipse.jdt.core.search.SearchEngine; -import org.eclipse.jdt.ui.IJavaElementSearchConstants; -import org.eclipse.jdt.ui.JavaUI; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.window.Window; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.customization.Entity; -import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.swing.ObjectListSelectionModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.SelectionDialog; -import org.eclipse.ui.progress.IProgressService; - -/** - * EntityListComposite - */ -public class EntityListComposite extends Pane -{ - private WritablePropertyValueModel entityHolder; - - public EntityListComposite(Pane parentComposite, Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initialize() { - super.initialize(); - this.entityHolder = this.buildEntityHolder(); - } - - @Override - protected void initializeLayout(Composite container) { - - container = this.addTitledGroup( - container, - EclipseLinkUiMessages.CustomizationEntityListComposite_groupTitle - ); - - // Entities add/remove list pane - new AddRemoveListPane( - this, - container, - this.buildEntitiesAdapter(), - this.buildEntitiesListHolder(), - this.entityHolder, - this.buildEntityLabelProvider(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - - // Entity Customization property pane - EntityCustomizationPropertyComposite pane = new EntityCustomizationPropertyComposite( - this, - this.entityHolder, - container - ); - this.installPaneEnabler(this.entityHolder, pane); - } - - private AddRemoveListPane.Adapter buildEntitiesAdapter() { - return new AddRemoveListPane.AbstractAdapter() { - public void addNewItem(ObjectListSelectionModel listSelectionModel) { - EntityListComposite.this.addEntities(listSelectionModel); - } - - public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - Customization customization = getSubject(); - for (Object item : listSelectionModel.selectedValues()) { - Entity entityCustomization = (Entity) item; - customization.removeEntity(entityCustomization.getName()); - } - } - }; - } - - private void addEntities(ObjectListSelectionModel listSelectionModel) { - - IType type = this.chooseEntity(); - - if (type != null) { - String entityName = this.getEntityName(type.getFullyQualifiedName()); - if (entityName == null) { - entityName = type.getElementName(); - } - - if( ! this.getSubject().entityExists(entityName)) { - this.getSubject().addEntity(entityName); - int index = CollectionTools.indexOf(this.getSubject().entityNames(), entityName); - Entity entity = (Entity) listSelectionModel.getListModel().getElementAt(index); - listSelectionModel.setSelectedValue(entity); - this.entityHolder.setValue(entity); - } - } - } - - private String getEntityName(String fullyQualifiedTypeName) { - - org.eclipse.jpt.core.context.Entity entity = getSubject().getPersistenceUnit().getEntity(fullyQualifiedTypeName); - return entity != null ? entity.getName() : null; - } - - private IType chooseEntity() { - - IPackageFragmentRoot root = getPackageFragmentRoot(); - if (root == null) { - return null; - } - IJavaElement[] elements = new IJavaElement[] { root.getJavaProject() }; - IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements); - IProgressService service = PlatformUI.getWorkbench().getProgressService(); - SelectionDialog typeSelectionDialog; - - try { - typeSelectionDialog = JavaUI.createTypeDialog( - getShell(), - service, - scope, - IJavaElementSearchConstants.CONSIDER_CLASSES, - false, - "" - ); - } - catch (JavaModelException e) { - JptEclipseLinkUiPlugin.log(e); - return null; - } - typeSelectionDialog.setTitle(EclipseLinkUiMessages.CustomizationEntityListComposite_dialogTitle); - typeSelectionDialog.setMessage(EclipseLinkUiMessages.CustomizationEntityListComposite_dialogMessage); - - if (typeSelectionDialog.open() == Window.OK) { - return (IType) typeSelectionDialog.getResult()[0]; - } - return null; - } - - private IPackageFragmentRoot getPackageFragmentRoot() { - IProject project = getSubject().getJpaProject().getProject(); - IJavaProject root = JavaCore.create(project); - - try { - return root.getAllPackageFragmentRoots()[0]; - } - catch (JavaModelException e) { - JptEclipseLinkUiPlugin.log(e); - } - return null; - } - - private ILabelProvider buildEntityLabelProvider() { - return new LabelProvider() { - @Override - public String getText(Object element) { - Entity entityCustomization = (Entity) element; - return entityCustomization.getName(); - } - }; - } - - private WritablePropertyValueModel buildEntityHolder() { - return new SimplePropertyValueModel(); - } - - private ListValueModel buildEntitiesListHolder() { - return new ListAspectAdapter( - this.getSubjectHolder(), Customization.ENTITIES_LIST) { - @Override - protected ListIterator listIterator_() { - return this.subject.entities(); - } - @Override - protected int size_() { - return this.subject.entitiesSize(); - } - }; - } - - private void installPaneEnabler(WritablePropertyValueModel entityHolder, - EntityCustomizationPropertyComposite pane) { - - new PaneEnabler( - this.buildPaneEnablerHolder(entityHolder), - pane - ); - } - - private PropertyValueModel buildPaneEnablerHolder(WritablePropertyValueModel entityHolder) { - return new TransformationPropertyValueModel(entityHolder) { - @Override - protected Boolean transform_(Entity value) { - return value.entityNameIsValid(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ExceptionHandlerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ExceptionHandlerComposite.java deleted file mode 100644 index a70d9dfe7e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ExceptionHandlerComposite.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * ExceptionHandlerComposite - */ -public class ExceptionHandlerComposite extends Pane -{ - /** - * Creates a new ExceptionHandlerComposite. - * - * @param parentPane The parent pane of this one - * @param parent The parent container - */ - public ExceptionHandlerComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private ClassChooserPane initializeClassChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter( - this.getSubjectHolder(), Customization.EXCEPTION_HANDLER_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getExceptionHandler(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - this.subject.setExceptionHandler(value); - } - }; - } - - @Override - protected String getClassName() { - return this.getSubject().getExceptionHandler(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_exceptionHandlerLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - this.getSubject().setExceptionHandler(className); - } - - @Override - protected String getSuperInterfaceName() { - return Customization.ECLIPSELINK_EXCEPTION_HANDLER_CLASS_NAME; - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - this.initializeClassChooser(container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/PersistenceXmlCustomizationTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/PersistenceXmlCustomizationTab.java deleted file mode 100644 index 3c7991b3fc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/PersistenceXmlCustomizationTab.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaPageComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlCustomizationTabItem - */ -public class PersistenceXmlCustomizationTab - extends FormPane - implements JpaPageComposite -{ - public PersistenceXmlCustomizationTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - new EclipseLinkCustomizationComposite(this, container); - } - - // ********** JpaPageComposite implementation ********** - - public String getHelpID() { - return EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION; - } - - public Image getPageImage() { - return null; - } - - public String getPageText() { - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_title; - } - - // ********** Layout ********** - - @Override - protected Composite addContainer(Composite parent) { - GridLayout layout = new GridLayout(1, true); - layout.marginHeight = 0; - layout.marginWidth = 0; - layout.marginTop = 0; - layout.marginLeft = 0; - layout.marginBottom = 0; - layout.marginRight = 0; - layout.verticalSpacing = 15; - - Composite container = addPane(parent, layout); - updateGridData(container); - - return container; - } - - private void updateGridData(Composite container) { - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = SWT.FILL; - gridData.verticalAlignment = SWT.FILL; - container.setLayoutData(gridData); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ProfilerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ProfilerComposite.java deleted file mode 100644 index fa4dd1ec08..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ProfilerComposite.java +++ /dev/null @@ -1,207 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import com.ibm.icu.text.Collator; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.Iterator; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Profiler; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserComboPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimpleCollectionValueModel; -import org.eclipse.jpt.utility.internal.model.value.SortedListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.CollectionValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * ProfilerComposite - */ -public class ProfilerComposite extends ClassChooserComboPane -{ - - /** - * Creates a new ProfilerComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public ProfilerComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - @Override - protected String getClassName() { - return Profiler.getProfilerClassName(this.getSubject().getProfiler()); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_profilerLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Customization.PROFILER_PROPERTY) { - @Override - protected String buildValue_() { - - String name = this.subject.getProfiler(); - if (name == null) { - name = ProfilerComposite.this.getDefaultValue(this.subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (getDefaultValue(this.subject).equals(value)) { - value = null; - } - this.subject.setProfiler(value); - } - }; - } - - private PropertyValueModel buildDefaultProfilerHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Customization.DEFAULT_PROFILER) { - @Override - protected String buildValue_() { - return ProfilerComposite.this.getDefaultValue(this.subject); - } - }; - } - - private ListValueModel buildDefaultProfilerListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultProfilerHolder() - ); - } - - private String buildDisplayString(String profilerName) { - - switch (Profiler.valueOf(profilerName)) { - case no_profiler: { - return EclipseLinkUiMessages.ProfilerComposite_no_profiler; - } - case performance_profiler: { - return EclipseLinkUiMessages.ProfilerComposite_performance_profiler; - } - case query_monitor: { - return EclipseLinkUiMessages.ProfilerComposite_query_monitor; - } - default: { - return null; - } - } - } - - private Comparator buildProfilerComparator() { - return new Comparator() { - public int compare(String profiler1, String profiler2) { - profiler1 = buildDisplayString(profiler1); - profiler2 = buildDisplayString(profiler2); - return Collator.getInstance().compare(profiler1, profiler2); - } - }; - } - - @Override - protected StringConverter buildClassConverter() { - return new StringConverter() { - public String convertToString(String value) { - try { - Profiler.valueOf(value); - value = buildDisplayString(value); - } - catch (Exception e) { - // Ignore since the value is not a Profiler - } - return value; - } - }; - } - - - @Override - protected ListValueModel buildClassListHolder() { - ArrayList> holders = new ArrayList>(2); - holders.add(this.buildDefaultProfilerListHolder()); - holders.add(this.buildProfilersListHolder()); - return new CompositeListValueModel, String>(holders); - } - - private Iterator buildProfilers() { - return new TransformationIterator(CollectionTools.iterator(Profiler.values())) { - @Override - protected String transform(Profiler next) { - return next.name(); - } - }; - } - - private CollectionValueModel buildProfilersCollectionHolder() { - return new SimpleCollectionValueModel( - CollectionTools.collection(this.buildProfilers()) - ); - } - - private ListValueModel buildProfilersListHolder() { - return new SortedListValueModelAdapter( - this.buildProfilersCollectionHolder(), - this.buildProfilerComparator() - ); - } - - private String getDefaultValue(Customization subject) { - String defaultValue = subject.getDefaultProfiler(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_defaultWithOneParam, - defaultValue - ); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_defaultEmpty; - } - - @Override - protected void setClassName(String className) { - this.getSubject().setProfiler(className); - } - - @Override - protected String getSuperInterfaceName() { - return Customization.ECLIPSELINK_SESSION_PROFILER_CLASS_NAME; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/SessionCustomizersComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/SessionCustomizersComposite.java deleted file mode 100644 index 24e390084f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/SessionCustomizersComposite.java +++ /dev/null @@ -1,213 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import java.util.ListIterator; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.search.IJavaSearchScope; -import org.eclipse.jdt.core.search.SearchEngine; -import org.eclipse.jdt.ui.IJavaElementSearchConstants; -import org.eclipse.jdt.ui.JavaUI; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.window.Window; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JptUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.swing.ObjectListSelectionModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Table; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.SelectionDialog; -import org.eclipse.ui.progress.IProgressService; - -/** - * SessionCustomizersComposite - */ -public class SessionCustomizersComposite extends Pane -{ - /** - * Creates a new SessionCustomizerComposite. - * - * @param parentPane The parent pane of this one - * @param parent The parent container - */ - public SessionCustomizersComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - - private void addSessionCustomizerClass(ObjectListSelectionModel listSelectionModel) { - - IType type = chooseType(); - - if (type != null) { - String className = type.getFullyQualifiedName('.'); - if( ! this.getSubject().sessionCustomizerExists(className)) { - - String classRef = this.getSubject().addSessionCustomizer(className); - listSelectionModel.setSelectedValue(classRef); - } - } - } - - private Adapter buildAdapter() { - return new AddRemoveListPane.AbstractAdapter() { - public void addNewItem(ObjectListSelectionModel listSelectionModel) { - addSessionCustomizerClass(listSelectionModel); - } - - public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - for (Object item : listSelectionModel.selectedValues()) { - getSubject().removeSessionCustomizer((String) item); - } - } - }; - } - - private ILabelProvider buildLabelProvider() { - return new LabelProvider() { - - @Override - public String getText(Object element) { - String name = (String) element; - - if (name == null) { - name = EclipseLinkUiMessages.PersistenceXmlCustomizationTab_noName; - } - return name; - } - }; - } - - private ListValueModel buildListHolder() { - return new ListAspectAdapter(getSubjectHolder(), Customization.SESSION_CUSTOMIZER_LIST) { - @Override - protected ListIterator listIterator_() { - return subject.sessionCustomizers(); - } - - @Override - protected int size_() { - return subject.sessionCustomizersSize(); - } - }; - } - - private WritablePropertyValueModel buildSelectedItemHolder() { - return new SimplePropertyValueModel(); - } - - /** - * Prompts the user the Open Type dialog. - * - * @return Either the selected type or null if the user - * cancelled the dialog - */ - private IType chooseType() { - - IPackageFragmentRoot root = packageFragmentRoot(); - - if (root == null) { - return null; - } - - IJavaElement[] elements = new IJavaElement[] { root.getJavaProject() }; - IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements); - IProgressService service = PlatformUI.getWorkbench().getProgressService(); - SelectionDialog typeSelectionDialog; - - try { - typeSelectionDialog = JavaUI.createTypeDialog( - getShell(), - service, - scope, - IJavaElementSearchConstants.CONSIDER_CLASSES, - false, - "" - ); - } - catch (JavaModelException e) { - JptEclipseLinkUiPlugin.log(e); - return null; - } - - typeSelectionDialog.setTitle(JptUiMessages.ClassChooserPane_dialogTitle); - typeSelectionDialog.setMessage(JptUiMessages.ClassChooserPane_dialogMessage); - - if (typeSelectionDialog.open() == Window.OK) { - return (IType) typeSelectionDialog.getResult()[0]; - } - - return null; - } - - @Override - protected void initializeLayout(Composite container) { - // Description - container = addTitledGroup( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_sessionCustomizerLabel - ); - - // List pane - new AddRemoveListPane( - this, - container, - buildAdapter(), - buildListHolder(), - buildSelectedItemHolder(), - buildLabelProvider() - ) - { - @Override - protected void initializeTable(Table table) { - super.initializeTable(table); - - Composite container = table.getParent(); - GridData gridData = (GridData) container.getLayoutData(); - gridData.heightHint = 75; - } - }; - } - - private IPackageFragmentRoot packageFragmentRoot() { - IProject project = getSubject().getJpaProject().getProject(); - IJavaProject root = JavaCore.create(project); - - try { - return root.getAllPackageFragmentRoots()[0]; - } - catch (JavaModelException e) { - JptEclipseLinkUiPlugin.log(e); - } - - return null; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ThrowExceptionsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ThrowExceptionsComposite.java deleted file mode 100644 index ec033c8130..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ThrowExceptionsComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * ThrowExceptionsComposite - */ -public class ThrowExceptionsComposite extends FormPane -{ - /** - * Creates a new ThrowExceptionsComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public ThrowExceptionsComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_throwExceptionsLabel, - this.buildThrowExceptionsHolder(), - this.buildThrowExceptionsStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - - private WritablePropertyValueModel buildThrowExceptionsHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Customization.THROW_EXCEPTIONS_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getThrowExceptions(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setThrowExceptions(value); - } - }; - } - - private PropertyValueModel buildThrowExceptionsStringHolder() { - return new TransformationPropertyValueModel(buildDefaultThrowExceptionsHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_throwExceptionsLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_throwExceptionsLabel; - } - }; - } - - private PropertyValueModel buildDefaultThrowExceptionsHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Customization.THROW_EXCEPTIONS_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getThrowExceptions() != null) { - return null; - } - return this.subject.getDefaultThrowExceptions(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ValidationOnlyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ValidationOnlyComposite.java deleted file mode 100644 index 15d5dde03a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/ValidationOnlyComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * ValidationOnlyComposite - */ -public class ValidationOnlyComposite extends FormPane -{ - /** - * Creates a new ValidationOnlyComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public ValidationOnlyComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_validationOnlyLabel, - this.buildValidationOnlyHolder(), - this.buildValidationOnlyStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - - private WritablePropertyValueModel buildValidationOnlyHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Customization.VALIDATION_ONLY_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getValidationOnly(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setValidationOnly(value); - } - }; - } - - private PropertyValueModel buildValidationOnlyStringHolder() { - return new TransformationPropertyValueModel(buildDefaultValidationOnlyHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_validationOnlyLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_validationOnlyLabel; - } - }; - } - - private PropertyValueModel buildDefaultValidationOnlyHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Customization.VALIDATION_ONLY_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getValidationOnly() != null) { - return null; - } - return this.subject.getDefaultValidationOnly(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingChangeTrackingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingChangeTrackingComposite.java deleted file mode 100644 index d4e4acef1f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingChangeTrackingComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * WeavingChangeTrackingComposite - */ -public class WeavingChangeTrackingComposite extends FormPane -{ - /** - * Creates a new WeavingChangeTrackingComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public WeavingChangeTrackingComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingChangeTrackingLabel, - this.buildWeavingChangeTrackingHolder(), - this.buildWeavingChangeTrackingStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - - private WritablePropertyValueModel buildWeavingChangeTrackingHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Customization.WEAVING_CHANGE_TRACKING_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getWeavingChangeTracking(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setWeavingChangeTracking(value); - } - }; - } - - private PropertyValueModel buildWeavingChangeTrackingStringHolder() { - return new TransformationPropertyValueModel(buildDefaultWeavingChangeTrackingHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingChangeTrackingLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingChangeTrackingLabel; - } - }; - } - - private PropertyValueModel buildDefaultWeavingChangeTrackingHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Customization.WEAVING_CHANGE_TRACKING_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getWeavingChangeTracking() != null) { - return null; - } - return this.subject.getDefaultWeavingChangeTracking(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingComposite.java deleted file mode 100644 index 161406dc1b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingComposite.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Weaving; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * WeavingComposite - */ -public class WeavingComposite extends FormPane -{ - /** - * Creates a new WeavingComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public WeavingComposite( - FormPane parentComposite, - Composite parent) { - - super( parentComposite, parent); - } - - private EnumFormComboViewer addWeavingCombo(Composite container) { - return new EnumFormComboViewer(this, container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(Customization.WEAVING_PROPERTY); - } - - @Override - protected Weaving[] getChoices() { - return Weaving.values(); - } - - @Override - protected Weaving getDefaultValue() { - return getSubject().getDefaultWeaving(); - } - - @Override - protected String displayString(Weaving value) { - return buildDisplayString(EclipseLinkUiMessages.class, WeavingComposite.this, value); - } - - @Override - protected Weaving getValue() { - return getSubject().getWeaving(); - } - - @Override - protected void setValue(Weaving value) { - getSubject().setWeaving(value); - } - }; - } - - @Override - protected void initializeLayout( Composite container) { - - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingLabel, - this.addWeavingCombo( container), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingEagerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingEagerComposite.java deleted file mode 100644 index 9a8c1199e2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingEagerComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * WeavingEagerComposite - */ -public class WeavingEagerComposite extends FormPane -{ - /** - * Creates a new WeavingEagerComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public WeavingEagerComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingEagerLabel, - this.buildWeavingEagerHolder(), - this.buildWeavingEagerStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - - private WritablePropertyValueModel buildWeavingEagerHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Customization.WEAVING_EAGER_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getWeavingEager(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setWeavingEager(value); - } - }; - } - - private PropertyValueModel buildWeavingEagerStringHolder() { - return new TransformationPropertyValueModel(buildDefaultWeavingEagerHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingEagerLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingEagerLabel; - } - }; - } - - private PropertyValueModel buildDefaultWeavingEagerHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Customization.WEAVING_EAGER_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getWeavingEager() != null) { - return null; - } - return this.subject.getDefaultWeavingEager(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingFetchGroupsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingFetchGroupsComposite.java deleted file mode 100644 index a4d211a5fa..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingFetchGroupsComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * WeavingFetchGroupsComposite - */ -public class WeavingFetchGroupsComposite extends FormPane -{ - /** - * Creates a new WeavingFetchGroupsComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public WeavingFetchGroupsComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingFetchGroupsLabel, - this.buildWeavingFetchGroupsHolder(), - this.buildWeavingFetchGroupsStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - - private WritablePropertyValueModel buildWeavingFetchGroupsHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Customization.WEAVING_FETCH_GROUPS_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getWeavingFetchGroups(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setWeavingFetchGroups(value); - } - }; - } - - private PropertyValueModel buildWeavingFetchGroupsStringHolder() { - return new TransformationPropertyValueModel(buildDefaultWeavingFetchGroupsHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingFetchGroupsLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingFetchGroupsLabel; - } - }; - } - - private PropertyValueModel buildDefaultWeavingFetchGroupsHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Customization.WEAVING_FETCH_GROUPS_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getWeavingFetchGroups() != null) { - return null; - } - return this.subject.getDefaultWeavingFetchGroups(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingInternalComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingInternalComposite.java deleted file mode 100644 index e5c3d710e3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingInternalComposite.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * WeavingInternalComposite - */ -public class WeavingInternalComposite extends FormPane -{ - /** - * Creates a new WeavingInternalComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public WeavingInternalComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingInternalLabel, - this.buildWeavingInternalHolder(), - this.buildWeavingInternalStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - - private WritablePropertyValueModel buildWeavingInternalHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Customization.WEAVING_INTERNAL_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getWeavingInternal(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setWeavingInternal(value); - } - }; - } - - private PropertyValueModel buildWeavingInternalStringHolder() { - return new TransformationPropertyValueModel(buildDefaultWeavingInternalHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingInternalLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingInternalLabel; - } - }; - } - - - private PropertyValueModel buildDefaultWeavingInternalHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Customization.WEAVING_INTERNAL_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getWeavingInternal() != null) { - return null; - } - return this.subject.getDefaultWeavingInternal(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingLazyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingLazyComposite.java deleted file mode 100644 index 8f9db29905..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/customization/WeavingLazyComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.customization; - -import org.eclipse.jpt.eclipselink.core.context.persistence.customization.Customization; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * WeavingLazyComposite - */ -public class WeavingLazyComposite extends FormPane -{ - /** - * Creates a new WeavingLazyComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public WeavingLazyComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingLazyLabel, - this.buildWeavingLazyHolder(), - this.buildWeavingLazyStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_CUSTOMIZATION - ); - } - - private WritablePropertyValueModel buildWeavingLazyHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Customization.WEAVING_LAZY_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getWeavingLazy(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setWeavingLazy(value); - } - }; - } - - private PropertyValueModel buildWeavingLazyStringHolder() { - return new TransformationPropertyValueModel(buildDefaultWeavingLazyHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingLazyLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingLazyLabel; - } - }; - } - - private PropertyValueModel buildDefaultWeavingLazyHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Customization.WEAVING_LAZY_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getWeavingLazy() != null) { - return null; - } - return this.subject.getDefaultWeavingLazy(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitGeneralComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitGeneralComposite.java deleted file mode 100644 index cb91ca3665..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitGeneralComposite.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.general; - -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.persistence.JptUiPersistenceMessages; -import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitGeneralComposite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLinkPersistenceUnitGeneralComposite - */ -public class EclipseLinkPersistenceUnitGeneralComposite - extends PersistenceUnitGeneralComposite -{ - // ********** constructors ********** - public EclipseLinkPersistenceUnitGeneralComposite( - PropertyValueModel subjectHolder, - Composite container, - WidgetFactory widgetFactory) { - super(subjectHolder, container, widgetFactory); - } - - // ********** initialization ********** - @Override - protected void initializeLayout(Composite container) { - this.initializeGeneralPane(container); - this.initializeMappedClassesPane(container); - this.initializeJPAMappingDescriptorsPane(container); - this.initializeJarFilesPane(container); - } - - protected void initializeJPAMappingDescriptorsPane(Composite container) { - - container = addCollapsableSection( - container, - JptUiPersistenceMessages.PersistenceUnitGeneralComposite_jpaMappingDescriptors, - JptUiPersistenceMessages.PersistenceUnitGeneralComposite_jpaMappingDescriptors_description - ); - - updateGridData(container); - updateGridData(container.getParent()); - - new EclipseLinkPersistenceUnitMappingFilesComposite(this, container); - } - - protected void initializeJarFilesPane(Composite container) { - - container = addCollapsableSection( - container, - JptUiPersistenceMessages.PersistenceUnitGeneralComposite_jarFiles - ); - - updateGridData(container); - updateGridData(container.getParent()); - - new EclipseLinkPersistenceUnitJarFilesComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitJarFilesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitJarFilesComposite.java deleted file mode 100644 index 2449678ffc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitJarFilesComposite.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.general; - -import org.eclipse.core.resources.IFile; -import org.eclipse.jpt.core.JptCorePlugin; -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.ui.internal.persistence.details.ArchiveFileSelectionDialog; -import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitJarFilesComposite; -import org.eclipse.jpt.ui.internal.persistence.details.ArchiveFileSelectionDialog.DeploymentPathCalculator; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkPersistenceUnitJarFilesComposite - extends PersistenceUnitJarFilesComposite -{ - public EclipseLinkPersistenceUnitJarFilesComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - - @Override - protected DeploymentPathCalculator buildJarFileDeploymentPathCalculator() { - return new EclipseLinkDeploymentPathCalculator(); - } - - - private static class EclipseLinkDeploymentPathCalculator - extends ArchiveFileSelectionDialog.ModuleDeploymentPathCalculator - { - @Override - public String calculateDeploymentPath(IFile file) { - String baseDeploymentPath = super.calculateDeploymentPath(file); - if (JptCorePlugin.projectHasWebFacet(file.getProject())) { - return "../" + baseDeploymentPath; - } - else { - return baseDeploymentPath; - } - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitMappingFilesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitMappingFilesComposite.java deleted file mode 100644 index 8b028d29b5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/general/EclipseLinkPersistenceUnitMappingFilesComposite.java +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.general; - -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.eclipselink.core.context.persistence.general.GeneralProperties; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceUnit; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitMappingFilesComposite; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | AddRemoveListPane                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see PersistenceUnit - * @see PersistenceUnitGeneralComposite - The parent container - * @see AddRemoveListPane - * - * @version 2.0 - * @since 2.0 - */ -public class EclipseLinkPersistenceUnitMappingFilesComposite extends PersistenceUnitMappingFilesComposite -{ - /** - * Creates a new PersistenceUnitMappingFilesComposite. - * - * @param parentPane The parent pane of this one - * @param parent The parent container - */ - public EclipseLinkPersistenceUnitMappingFilesComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - this.addMappingFilesList(container); - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlGeneralTab_excludeEclipselinkOrm, - this.buildExcludeEclipselinkOrmHolder(), - this.buildExcludeEclipselinkOrmStringHolder(), - JpaHelpContextIds.PERSISTENCE_XML_GENERAL - ); - } - - protected PropertyValueModel buildGeneralPropertiesHolder() { - return new TransformationPropertyValueModel(getSubjectHolder()) { - @Override - protected GeneralProperties transform_(PersistenceUnit persistenceUnit) { - return ((EclipseLinkPersistenceUnit) persistenceUnit).getGeneralProperties(); - } - }; - } - - private WritablePropertyValueModel buildExcludeEclipselinkOrmHolder() { - return new PropertyAspectAdapter( - buildGeneralPropertiesHolder(), - GeneralProperties.EXCLUDE_ECLIPSELINK_ORM_PROPERTY) - { - @Override - protected Boolean buildValue_() { - return this.subject.getExcludeEclipselinkOrm(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setExcludeEclipselinkOrm(value); - } - }; - } - - private PropertyValueModel buildExcludeEclipselinkOrmStringHolder() { - return new TransformationPropertyValueModel(buildDefaultExcludeEclipselinkOrmHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlGeneralTab_excludeEclipselinkOrmWithDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlGeneralTab_excludeEclipselinkOrm; - } - }; - } - - private PropertyValueModel buildDefaultExcludeEclipselinkOrmHolder() { - return new PropertyAspectAdapter( - buildGeneralPropertiesHolder(), - GeneralProperties.EXCLUDE_ECLIPSELINK_ORM_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getExcludeEclipselinkOrm() != null) { - return null; - } - return this.subject.getDefaultExcludeEclipselinkOrm(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/EclipseLinkLoggingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/EclipseLinkLoggingComposite.java deleted file mode 100644 index 16bebf45b9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/EclipseLinkLoggingComposite.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.forms.widgets.ExpandableComposite; -import org.eclipse.ui.forms.widgets.Section; - -/** - * EclipseLinkLoggingComposite - */ -public class EclipseLinkLoggingComposite - extends FormPane -{ - public EclipseLinkLoggingComposite( - FormPane subjectHolder, - Composite container) { - super(subjectHolder, container, false); - } - - @Override - protected void initializeLayout(Composite parent) { - Section section = getWidgetFactory().createSection(parent, SWT.FLAT | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION); - section.setText(EclipseLinkUiMessages.PersistenceXmlLoggingTab_sectionTitle); - section.setDescription(EclipseLinkUiMessages.PersistenceXmlLoggingTab_sectionDescription); - Composite composite = getWidgetFactory().createComposite(section); - composite.setLayout(new GridLayout(1, false)); - section.setClient(composite); - this.updateGridData(composite); - this.updateGridData(composite.getParent()); - - // LoggingLevel: - new LoggingLevelComposite(this, composite); - - // Timestamp: - new TimestampComposite(this, composite); - - // Thread: - new ThreadComposite(this, composite); - - // Session: - new SessionComposite(this, composite); - - // Exceptions: - new ExceptionsComposite(this, composite); - - // LoggingFile: - new LoggingFileLocationComposite(this, composite); - - // Logger: - new LoggerComposite(this, composite); - - return; - } - - private void updateGridData(Composite container) { - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = SWT.FILL; - gridData.verticalAlignment = SWT.FILL; - container.setLayoutData(gridData); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ExceptionsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ExceptionsComposite.java deleted file mode 100644 index c5a4807d3a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ExceptionsComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * ExceptionsComposite - */ -public class ExceptionsComposite extends FormPane -{ - /** - * Creates a new ExceptionsComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public ExceptionsComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlLoggingTab_exceptionsLabel, - this.buildExceptionsHolder(), - this.buildExceptionsStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_LOGGING_EXCEPTIONS - ); - } - - private WritablePropertyValueModel buildExceptionsHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Logging.EXCEPTIONS_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getExceptions(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setExceptions(value); - } - }; - } - - private PropertyValueModel buildExceptionsStringHolder() { - return new TransformationPropertyValueModel(buildDefaultExceptionsHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_exceptionsLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_exceptionsLabel; - } - }; - } - - private PropertyValueModel buildDefaultExceptionsHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Logging.EXCEPTIONS_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getExceptions() != null) { - return null; - } - return this.subject.getDefaultExceptions(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggerComposite.java deleted file mode 100644 index d2eb9f2840..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggerComposite.java +++ /dev/null @@ -1,207 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import com.ibm.icu.text.Collator; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.Iterator; -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logger; -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserComboPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimpleCollectionValueModel; -import org.eclipse.jpt.utility.internal.model.value.SortedListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.CollectionValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * LoggerComposite - */ -public class LoggerComposite extends ClassChooserComboPane -{ - /** - * Creates a new LoggerComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public LoggerComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - @Override - protected String getClassName() { - if (this.getSubject().getLogger() == null) { - return Logger.DEFAULT_LOGGER_CLASS_NAME; - } - return Logger.getLoggerClassName(this.getSubject().getLogger()); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_loggerLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected String getSuperInterfaceName() { - return Logging.ECLIPSELINK_LOGGER_CLASS_NAME; - } - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Logging.LOGGER_PROPERTY) { - @Override - protected String buildValue_() { - - String name = this.subject.getLogger(); - if (name == null) { - name = LoggerComposite.this.getDefaultValue(this.subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (getDefaultValue(this.subject).equals(value)) { - value = null; - } - this.subject.setLogger(value); - } - }; - } - - private PropertyValueModel buildDefaultLoggerHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Logging.DEFAULT_LOGGER) { - @Override - protected String buildValue_() { - return LoggerComposite.this.getDefaultValue(this.subject); - } - }; - } - - private ListValueModel buildDefaultLoggerListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultLoggerHolder() - ); - } - - private String buildDisplayString(String loggerName) { - - switch (Logger.valueOf(loggerName)) { - case default_logger: { - return EclipseLinkUiMessages.LoggerComposite_default_logger; - } - case java_logger: { - return EclipseLinkUiMessages.LoggerComposite_java_logger; - } - case server_logger: { - return EclipseLinkUiMessages.LoggerComposite_server_logger; - } - default: { - return null; - } - } - } - - private Comparator buildLoggerComparator() { - return new Comparator() { - public int compare(String logger1, String logger2) { - logger1 = buildDisplayString(logger1); - logger2 = buildDisplayString(logger2); - return Collator.getInstance().compare(logger1, logger2); - } - }; - } - - @Override - protected StringConverter buildClassConverter() { - return new StringConverter() { - public String convertToString(String value) { - try { - Logger.valueOf(value); - value = buildDisplayString(value); - } - catch (Exception e) { - // Ignore since the value is not a Logger - } - return value; - } - }; - } - - @Override - protected ListValueModel buildClassListHolder() { - ArrayList> holders = new ArrayList>(2); - holders.add(this.buildDefaultLoggerListHolder()); - holders.add(this.buildLoggersListHolder()); - return new CompositeListValueModel, String>(holders); - } - - private Iterator buildLoggers() { - return new TransformationIterator(CollectionTools.iterator(Logger.values())) { - @Override - protected String transform(Logger next) { - return next.name(); - } - }; - } - - private CollectionValueModel buildLoggersCollectionHolder() { - return new SimpleCollectionValueModel( - CollectionTools.collection(this.buildLoggers()) - ); - } - - private ListValueModel buildLoggersListHolder() { - return new SortedListValueModelAdapter( - this.buildLoggersCollectionHolder(), - this.buildLoggerComparator() - ); - } - - private String getDefaultValue(Logging subject) { - String defaultValue = subject.getDefaultLogger(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlLoggingTab_defaultWithOneParam, - defaultValue - ); - } - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_defaultEmpty; - } - - @Override - protected void setClassName(String className) { - this.getSubject().setLogger(className); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingFileLocationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingFileLocationComposite.java deleted file mode 100644 index fb50b34c3f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingFileLocationComposite.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FolderChooserPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * LoggingFileLocationComposite - */ -public class LoggingFileLocationComposite extends Pane -{ - public LoggingFileLocationComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - new FolderChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), Logging.LOG_FILE_LOCATION_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getLogFileLocation(); - if (name == null) { - name = defaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (defaultValue(subject).equals(value)) { - value = null; - } - subject.setLogFileLocation(value); - } - }; - } - - private String defaultValue(Logging subject) { - String defaultValue = subject.getDefaultLogFileLocation(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlLoggingTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_defaultEmpty; - } - } - - @Override - protected String getDialogMessage() { - return EclipseLinkUiMessages.LoggingFileLocationComposite_dialogMessage; - } - - @Override - protected String getDialogTitle() { - return EclipseLinkUiMessages.LoggingFileLocationComposite_dialogTitle; - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_loggingFileLabel; - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingLevelComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingLevelComposite.java deleted file mode 100644 index 0d08d6383e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/LoggingLevelComposite.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.LoggingLevel; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * LoggingLevelComposite - */ -public class LoggingLevelComposite extends FormPane -{ - /** - * Creates a new LoggingLevelComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public LoggingLevelComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - private EnumFormComboViewer addLoggingLevelCombo(Composite container) { - return new EnumFormComboViewer(this, container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(Logging.LEVEL_PROPERTY); - } - - @Override - protected LoggingLevel[] getChoices() { - return LoggingLevel.values(); - } - - @Override - protected boolean sortChoices() { - return false; - } - - @Override - protected LoggingLevel getDefaultValue() { - return this.getSubject().getDefaultLevel(); - } - - @Override - protected String displayString(LoggingLevel value) { - return this.buildDisplayString(EclipseLinkUiMessages.class, LoggingLevelComposite.this, value); - } - - @Override - protected LoggingLevel getValue() { - return this.getSubject().getLevel(); - } - - @Override - protected void setValue(LoggingLevel value) { - this.getSubject().setLevel(value); - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlLoggingTab_loggingLevelLabel, - this.addLoggingLevelCombo(container), - EclipseLinkHelpContextIds.PERSISTENCE_LOGGING_LEVEL - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/PersistenceXmlLoggingTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/PersistenceXmlLoggingTab.java deleted file mode 100644 index 09c75f0d98..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/PersistenceXmlLoggingTab.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaPageComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlLoggingTab - */ -public class PersistenceXmlLoggingTab - extends FormPane - implements JpaPageComposite -{ - // ********** constructors/initialization ********** - public PersistenceXmlLoggingTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new EclipseLinkLoggingComposite(this, container); - } - - // ********** JpaPageComposite implementation ********** - - public String getHelpID() { - return EclipseLinkHelpContextIds.PERSISTENCE_LOGGING; - } - - public Image getPageImage() { - return null; - } - - public String getPageText() { - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_title; - } - - // ********** Layout ********** - @Override - protected Composite addContainer(Composite parent) { - GridLayout layout = new GridLayout(1, true); - layout.marginHeight = 0; - layout.marginWidth = 0; - layout.marginTop = 0; - layout.marginLeft = 0; - layout.marginBottom = 0; - layout.marginRight = 0; - layout.verticalSpacing = 15; - Composite container = this.addPane(parent, layout); - this.updateGridData(container); - return container; - } - - private void updateGridData(Composite container) { - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = SWT.FILL; - gridData.verticalAlignment = SWT.FILL; - container.setLayoutData(gridData); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/SessionComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/SessionComposite.java deleted file mode 100644 index 4236980c11..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/SessionComposite.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * SessionComposite - */ -public class SessionComposite extends FormPane -{ - /** - * Creates a new SessionComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public SessionComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlLoggingTab_sessionLabel, - this.buildSessionHolder(), - this.buildSessionStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_LOGGING_SESSION - ); - } - - private WritablePropertyValueModel buildSessionHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Logging.SESSION_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSession(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSession(value); - } - }; - } - - private PropertyValueModel buildSessionStringHolder() { - return new TransformationPropertyValueModel(buildDefaultSessionHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_sessionLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_sessionLabel; - } - }; - } - - private PropertyValueModel buildDefaultSessionHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Logging.SESSION_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSession() != null) { - return null; - } - return this.subject.getDefaultSession(); - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ThreadComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ThreadComposite.java deleted file mode 100644 index 74e58b4dd5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/ThreadComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * ThreadComposite - */ -public class ThreadComposite extends FormPane -{ - /** - * Creates a new ThreadComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public ThreadComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlLoggingTab_threadLabel, - this.buildThreadHolder(), - this.buildThreadStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_LOGGING_THREAD - ); - } - - private WritablePropertyValueModel buildThreadHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Logging.THREAD_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getThread(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setThread(value); - } - }; - } - - private PropertyValueModel buildThreadStringHolder() { - return new TransformationPropertyValueModel(buildDefaultThreadHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_threadLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_threadLabel; - } - }; - } - - private PropertyValueModel buildDefaultThreadHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Logging.THREAD_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getThread() != null) { - return null; - } - return this.subject.getDefaultThread(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/TimestampComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/TimestampComposite.java deleted file mode 100644 index 569cadb40c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/logging/TimestampComposite.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.logging; - -import org.eclipse.jpt.eclipselink.core.context.persistence.logging.Logging; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * TimestampComposite - */ -public class TimestampComposite extends FormPane -{ - /** - * Creates a new TimestampComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public TimestampComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlLoggingTab_timestampLabel, - this.buildTimestampHolder(), - this.buildTimestampStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_LOGGING_TIMESTAMP - ); - } - - private WritablePropertyValueModel buildTimestampHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Logging.TIMESTAMP_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getTimestamp(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setTimestamp(value); - } - }; - } - - private PropertyValueModel buildTimestampStringHolder() { - return new TransformationPropertyValueModel(buildDefaultTimestampHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_timestampLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlLoggingTab_timestampLabel; - } - }; - } - private PropertyValueModel buildDefaultTimestampHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Logging.TIMESTAMP_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getTimestamp() != null) { - return null; - } - return this.subject.getDefaultTimestamp(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EclipseLinkOptionsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EclipseLinkOptionsComposite.java deleted file mode 100644 index 887ae2c247..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EclipseLinkOptionsComposite.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLinkOptionsComposite - */ -public class EclipseLinkOptionsComposite extends FormPane -{ - public EclipseLinkOptionsComposite( - FormPane subjectHolder, - Composite container) { - - super(subjectHolder, container, false); - } - - @Override - protected void initializeLayout(Composite parent) { - this.initializeSessionOptionsPane(parent); - this.initializeMiscellaneousPane(parent); - } - - private void initializeSessionOptionsPane(Composite parent) { - Composite composite = this.addSection(parent, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_sessionSectionTitle, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_sessionSectionDescription); - - this.updateGridData(composite); - this.updateGridData(composite.getParent()); - - new SessionNameComposite(this, composite); - - new SessionsXmlComposite(this, composite); - - new TargetDatabaseComposite(this, composite); - - new TargetServerComposite(this, composite); - - new EventListenerComposite(this, composite); - - new IncludeDescriptorQueriesComposite(this, composite); - - return; - } - - protected Composite initializeMiscellaneousPane(Composite container) { - - this.updateGridData(container); - this.updateGridData(container.getParent()); - - Composite composite = this.addSection(container, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_miscellaneousSectionTitle, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_miscellaneousSectionDescription); - - this.updateGridData(composite); - this.updateGridData(composite.getParent()); - - new TemporalMutableComposite(this, composite); - - return composite; - } - - private void updateGridData(Composite container) { - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = SWT.FILL; - gridData.verticalAlignment = SWT.FILL; - container.setLayoutData(gridData); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EventListenerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EventListenerComposite.java deleted file mode 100644 index 0f44786a9c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/EventListenerComposite.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * EventListenerComposite - */ -public class EventListenerComposite extends Pane -{ - /** - * Creates a new EventListenerComposite. - * - * @param parentPane The parent pane of this one - * @param parent The parent container - */ - public EventListenerComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private ClassChooserPane initializeClassChooser(Composite container) { - - return new ClassChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter( - this.getSubjectHolder(), Options.SESSION_EVENT_LISTENER_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getEventListener(); - } - - @Override - protected void setValue_(String value) { - - if (value.length() == 0) { - value = null; - } - this.subject.setEventListener(value); - } - }; - } - - @Override - protected String getClassName() { - return this.getSubject().getEventListener(); - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_eventListenerLabel; - } - - @Override - protected JpaProject getJpaProject() { - return getSubject().getJpaProject(); - } - - @Override - protected void setClassName(String className) { - this.getSubject().setEventListener(className); - } - - @Override - protected String getSuperInterfaceName() { - return Options.ECLIPSELINK_EVENT_LISTENER_CLASS_NAME; - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - this.initializeClassChooser(container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/IncludeDescriptorQueriesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/IncludeDescriptorQueriesComposite.java deleted file mode 100644 index 0e9f27f0c9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/IncludeDescriptorQueriesComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * IncludeDescriptorQueriesComposite - */ -public class IncludeDescriptorQueriesComposite extends FormPane -{ - /** - * Creates a new IncludeDescriptorQueriesComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public IncludeDescriptorQueriesComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_includeDescriptorQueriesLabel, - this.buildIncludeDescriptorQueriesHolder(), - this.buildIncludeDescriptorQueriesStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_OPTIONS - ); - } - - private WritablePropertyValueModel buildIncludeDescriptorQueriesHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Options.SESSION_INCLUDE_DESCRIPTOR_QUERIES_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getIncludeDescriptorQueries(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setIncludeDescriptorQueries(value); - } - }; - } - - private PropertyValueModel buildIncludeDescriptorQueriesStringHolder() { - return new TransformationPropertyValueModel(buildDefaultIncludeDescriptorQueriesHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlOptionsTab_includeDescriptorQueriesLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_includeDescriptorQueriesLabel; - } - }; - } - - private PropertyValueModel buildDefaultIncludeDescriptorQueriesHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Options.SESSION_INCLUDE_DESCRIPTOR_QUERIES_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getIncludeDescriptorQueries() != null) { - return null; - } - return this.subject.getDefaultIncludeDescriptorQueries(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/PersistenceXmlOptionsTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/PersistenceXmlOptionsTab.java deleted file mode 100644 index 1f277f6ce4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/PersistenceXmlOptionsTab.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaPageComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlOptionsTab - */ -public class PersistenceXmlOptionsTab - extends FormPane - implements JpaPageComposite -{ - // ********** constructors/initialization ********** - public PersistenceXmlOptionsTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new EclipseLinkOptionsComposite(this, container); - } - - // ********** JpaPageComposite implementation ********** - - public String getHelpID() { - return EclipseLinkHelpContextIds.PERSISTENCE_OPTIONS; - } - - public Image getPageImage() { - return null; - } - - public String getPageText() { - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_title; - } - - // ********** Layout ********** - @Override - protected Composite addContainer(Composite parent) { - GridLayout layout = new GridLayout(1, true); - layout.marginHeight = 0; - layout.marginWidth = 0; - layout.marginTop = 0; - layout.marginLeft = 0; - layout.marginBottom = 0; - layout.marginRight = 0; - layout.verticalSpacing = 15; - Composite container = this.addPane(parent, layout); - this.updateGridData(container); - return container; - } - - private void updateGridData(Composite container) { - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = SWT.FILL; - gridData.verticalAlignment = SWT.FILL; - container.setLayoutData(gridData); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionNameComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionNameComposite.java deleted file mode 100644 index 8ff99cd903..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionNameComposite.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * SessionNameComposite - */ -public class SessionNameComposite extends Pane -{ - /** - * Creates a new SessionNameComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public SessionNameComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private PropertyValueModel buildDefaultSessionNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.DEFAULT_SESSION_NAME) { - @Override - protected String buildValue_() { - return SessionNameComposite.this.getDefaultValue(subject); - } - }; - } - - private ListValueModel buildDefaultSessionNameListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultSessionNameHolder() - ); - } - - private WritablePropertyValueModel buildSessionNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.SESSION_NAME_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getSessionName(); - if (name == null) { - name = SessionNameComposite.this.getDefaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (getDefaultValue(subject).equals(value)) { - value = null; - } - subject.setSessionName(value); - } - }; - } - - private String getDefaultValue(Options subject) { - String defaultValue = subject.getDefaultSessionName(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultEmpty; - } - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_sessionName, - this.buildDefaultSessionNameListHolder(), - this.buildSessionNameHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_OPTIONS_SESSION_NAME - ); - SWTUtil.attachDefaultValueHandler(combo); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionsXmlComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionsXmlComposite.java deleted file mode 100644 index e4d5efcc15..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/SessionsXmlComposite.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * SessionsXmlComposite - */ -public class SessionsXmlComposite extends Pane -{ - /** - * Creates a new SessionsXmlComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public SessionsXmlComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private PropertyValueModel buildDefaultSessionsXmlFileNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.DEFAULT_SESSIONS_XML) { - @Override - protected String buildValue_() { - return SessionsXmlComposite.this.getDefaultValue(subject); - } - }; - } - - private ListValueModel buildDefaultSessionsXmlFileNameListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultSessionsXmlFileNameHolder() - ); - } - - private WritablePropertyValueModel buildSessionsXmlFileNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.SESSIONS_XML_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getSessionsXml(); - if (name == null) { - name = SessionsXmlComposite.this.getDefaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (getDefaultValue(subject).equals(value)) { - value = null; - } - subject.setSessionsXml(value); - } - }; - } - - private String getDefaultValue(Options subject) { - String defaultValue = subject.getDefaultSessionsXml(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultEmpty; - } - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_sessionsXml, - this.buildDefaultSessionsXmlFileNameListHolder(), - this.buildSessionsXmlFileNameHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_OPTIONS_SESSIONS_XML - ); - SWTUtil.attachDefaultValueHandler(combo); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetDatabaseComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetDatabaseComposite.java deleted file mode 100644 index 2b7d12fddd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetDatabaseComposite.java +++ /dev/null @@ -1,188 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import com.ibm.icu.text.Collator; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.Iterator; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.core.context.persistence.options.TargetDatabase; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimpleCollectionValueModel; -import org.eclipse.jpt.utility.internal.model.value.SortedListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.CollectionValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * TargetDatabaseComposite - */ -public class TargetDatabaseComposite extends Pane -{ - /** - * Creates a new TargetDatabaseComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public TargetDatabaseComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private PropertyValueModel buildDefaultTargetDatabaseHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.DEFAULT_TARGET_DATABASE) { - @Override - protected String buildValue_() { - return TargetDatabaseComposite.this.getDefaultValue(subject); - } - }; - } - - private ListValueModel buildDefaultTargetDatabaseListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultTargetDatabaseHolder() - ); - } - - private String buildDisplayString(String targetDatabaseName) { - - return SWTUtil.buildDisplayString( - EclipseLinkUiMessages.class, - this.getClass(), - TargetDatabase.valueOf(targetDatabaseName)); - } - - private Comparator buildTargetDatabaseComparator() { - return new Comparator() { - public int compare(String targetDatabase1, String targetDatabase2) { - targetDatabase1 = buildDisplayString(targetDatabase1); - targetDatabase2 = buildDisplayString(targetDatabase2); - return Collator.getInstance().compare(targetDatabase1, targetDatabase2); - } - }; - } - - private StringConverter buildTargetDatabaseConverter() { - return new StringConverter() { - public String convertToString(String value) { - try { - TargetDatabase.valueOf(value); - value = buildDisplayString(value); - } - catch (Exception e) { - // Ignore since the value is not a TargetDatabase - } - return value; - } - }; - } - - private WritablePropertyValueModel buildTargetDatabaseHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.TARGET_DATABASE_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getTargetDatabase(); - if (name == null) { - name = TargetDatabaseComposite.this.getDefaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (getDefaultValue(subject).equals(value)) { - value = null; - } - subject.setTargetDatabase(value); - } - }; - } - - private ListValueModel buildTargetDatabaseListHolder() { - ArrayList> holders = new ArrayList>(2); - holders.add(buildDefaultTargetDatabaseListHolder()); - holders.add(buildTargetDatabasesListHolder()); - return new CompositeListValueModel, String>(holders); - } - - private Iterator buildTargetDatabases() { - return new TransformationIterator(CollectionTools.iterator(TargetDatabase.values())) { - @Override - protected String transform(TargetDatabase next) { - return next.name(); - } - }; - } - - private CollectionValueModel buildTargetDatabasesCollectionHolder() { - return new SimpleCollectionValueModel( - CollectionTools.collection(buildTargetDatabases()) - ); - } - - private ListValueModel buildTargetDatabasesListHolder() { - return new SortedListValueModelAdapter( - buildTargetDatabasesCollectionHolder(), - buildTargetDatabaseComparator() - ); - } - - private String getDefaultValue(Options subject) { - String defaultValue = subject.getDefaultTargetDatabase(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultEmpty; - } - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_targetDatabaseLabel, - this.buildTargetDatabaseListHolder(), - this.buildTargetDatabaseHolder(), - this.buildTargetDatabaseConverter(), - EclipseLinkHelpContextIds.PERSISTENCE_OPTIONS_TARGET_DATABASE - ); - - SWTUtil.attachDefaultValueHandler(combo); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetServerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetServerComposite.java deleted file mode 100644 index e577b77721..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TargetServerComposite.java +++ /dev/null @@ -1,188 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import com.ibm.icu.text.Collator; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.Iterator; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.core.context.persistence.options.TargetServer; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.StringConverter; -import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; -import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimpleCollectionValueModel; -import org.eclipse.jpt.utility.internal.model.value.SortedListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.CollectionValueModel; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * TargetServerComposite - */ -public class TargetServerComposite extends Pane -{ - /** - * Creates a new TargetServerComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public TargetServerComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private PropertyValueModel buildDefaultTargetServerHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.DEFAULT_TARGET_SERVER) { - @Override - protected String buildValue_() { - return TargetServerComposite.this.getDefaultValue(subject); - } - }; - } - - private ListValueModel buildDefaultTargetServerListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultTargetServerHolder() - ); - } - - private String buildDisplayString(String targetServerName) { - - return SWTUtil.buildDisplayString( - EclipseLinkUiMessages.class, - this.getClass(), - TargetServer.valueOf(targetServerName)); - } - - private Comparator buildTargetServerComparator() { - return new Comparator() { - public int compare(String targetServer1, String targetServer2) { - targetServer1 = buildDisplayString(targetServer1); - targetServer2 = buildDisplayString(targetServer2); - return Collator.getInstance().compare(targetServer1, targetServer2); - } - }; - } - - private StringConverter buildTargetServerConverter() { - return new StringConverter() { - public String convertToString(String value) { - try { - TargetServer.valueOf(value); - value = buildDisplayString(value); - } - catch (Exception e) { - // Ignore since the value is not a TargetServer - } - return value; - } - }; - } - - private WritablePropertyValueModel buildTargetServerHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options.TARGET_SERVER_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getTargetServer(); - if (name == null) { - name = TargetServerComposite.this.getDefaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (getDefaultValue(subject).equals(value)) { - value = null; - } - subject.setTargetServer(value); - } - }; - } - - private ListValueModel buildTargetServerListHolder() { - ArrayList> holders = new ArrayList>(2); - holders.add(buildDefaultTargetServerListHolder()); - holders.add(buildTargetServersListHolder()); - return new CompositeListValueModel, String>(holders); - } - - private Iterator buildTargetServers() { - return new TransformationIterator(CollectionTools.iterator(TargetServer.values())) { - @Override - protected String transform(TargetServer next) { - return next.name(); - } - }; - } - - private CollectionValueModel buildTargetServersCollectionHolder() { - return new SimpleCollectionValueModel( - CollectionTools.collection(buildTargetServers()) - ); - } - - private ListValueModel buildTargetServersListHolder() { - return new SortedListValueModelAdapter( - buildTargetServersCollectionHolder(), - buildTargetServerComparator() - ); - } - - private String getDefaultValue(Options subject) { - String defaultValue = subject.getDefaultTargetServer(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_defaultEmpty; - } - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_targetServerLabel, - this.buildTargetServerListHolder(), - this.buildTargetServerHolder(), - this.buildTargetServerConverter(), - EclipseLinkHelpContextIds.PERSISTENCE_OPTIONS_TARGET_SERVER - ); - - SWTUtil.attachDefaultValueHandler(combo); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TemporalMutableComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TemporalMutableComposite.java deleted file mode 100644 index 9775fa67a5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/options/TemporalMutableComposite.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.options; - -import org.eclipse.jpt.eclipselink.core.context.persistence.options.Options; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * TemporalMutableComposite - */ -public class TemporalMutableComposite extends FormPane -{ - /** - * Creates a new TemporalMutableComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public TemporalMutableComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - this.addTriStateCheckBoxWithDefault( - container, - EclipseLinkUiMessages.PersistenceXmlOptionsTab_temporalMutableLabel, - this.buildTemporalMutableHolder(), - this.buildTemporalMutableStringHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_OPTIONS - ); - } - - private WritablePropertyValueModel buildTemporalMutableHolder() { - return new PropertyAspectAdapter(getSubjectHolder(), Options.TEMPORAL_MUTABLE_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getTemporalMutable(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setTemporalMutable(value); - } - }; - } - - private PropertyValueModel buildTemporalMutableStringHolder() { - return new TransformationPropertyValueModel(buildDefaultTemporalMutableHolder()) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; - return NLS.bind(EclipseLinkUiMessages.PersistenceXmlOptionsTab_temporalMutableLabelDefault, defaultStringValue); - } - return EclipseLinkUiMessages.PersistenceXmlOptionsTab_temporalMutableLabel; - } - }; - } - - private PropertyValueModel buildDefaultTemporalMutableHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), - Options.TEMPORAL_MUTABLE_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getTemporalMutable() != null) { - return null; - } - return this.subject.getDefaultTemporalMutable(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/CreateDdlFileNameComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/CreateDdlFileNameComposite.java deleted file mode 100644 index 624e927c04..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/CreateDdlFileNameComposite.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation; - -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * CreateDdlFileNameComposite - */ -public class CreateDdlFileNameComposite extends Pane -{ - /** - * Creates a new CreateDdlFileNameComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public CreateDdlFileNameComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private PropertyValueModel buildDefaultCreateDdlFileNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), SchemaGeneration.DEFAULT_SCHEMA_GENERATION_CREATE_FILE_NAME) { - @Override - protected String buildValue_() { - return CreateDdlFileNameComposite.this.getDefaultValue(subject); - } - }; - } - - private ListValueModel buildDefaultCreateDdlFileNameListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultCreateDdlFileNameHolder() - ); - } - - private WritablePropertyValueModel buildCreateDdlFileNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), SchemaGeneration.CREATE_FILE_NAME_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getCreateFileName(); - if (name == null) { - name = CreateDdlFileNameComposite.this.getDefaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (getDefaultValue(subject).equals(value)) { - value = null; - } - subject.setCreateFileName(value); - } - }; - } - - private String getDefaultValue(SchemaGeneration subject) { - String defaultValue = subject.getDefaultCreateFileName(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_defaultEmpty; - } - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_createDdlFileNameLabel, - this.buildDefaultCreateDdlFileNameListHolder(), - this.buildCreateDdlFileNameHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_SCHEMA_GENERATION - ); - SWTUtil.attachDefaultValueHandler(combo); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationLocationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationLocationComposite.java deleted file mode 100644 index bf2f35ef60..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationLocationComposite.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation; - -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FolderChooserPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * DdlGenerationLocationComposite - */ -public class DdlGenerationLocationComposite extends Pane -{ - public DdlGenerationLocationComposite(Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - @Override - protected void initializeLayout(Composite container) { - - new FolderChooserPane(this, container) { - - @Override - protected WritablePropertyValueModel buildTextHolder() { - return new PropertyAspectAdapter( - getSubjectHolder(), SchemaGeneration.APPLICATION_LOCATION_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getApplicationLocation(); - if (name == null) { - name = defaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (defaultValue(subject).equals(value)) { - value = null; - } - subject.setApplicationLocation(value); - } - }; - } - - private String defaultValue(SchemaGeneration subject) { - String defaultValue = subject.getDefaultApplicationLocation(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_defaultEmpty; - } - } - - @Override - protected String getDialogMessage() { - return EclipseLinkUiMessages.DdlGenerationLocationComposite_dialogMessage; - } - - @Override - protected String getDialogTitle() { - return EclipseLinkUiMessages.DdlGenerationLocationComposite_dialogTitle; - } - - @Override - protected String getLabelText() { - return EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_ddlGenerationLocationLabel; - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationTypeComposite.java deleted file mode 100644 index de541eed89..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DdlGenerationTypeComposite.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.DdlGenerationType; -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * DdlGenerationTypeComposite - */ -public class DdlGenerationTypeComposite - extends FormPane -{ - /** - * Creates a new DdlGenerationTypeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public DdlGenerationTypeComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - private EnumFormComboViewer addDdlGenerationTypeCombo(Composite container) { - return new EnumFormComboViewer(this, container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(SchemaGeneration.DDL_GENERATION_TYPE_PROPERTY); - } - - @Override - protected DdlGenerationType[] getChoices() { - return DdlGenerationType.values(); - } - - @Override - protected DdlGenerationType getDefaultValue() { - return this.getSubject().getDefaultDdlGenerationType(); - } - - @Override - protected String displayString(DdlGenerationType value) { - return this.buildDisplayString(EclipseLinkUiMessages.class, DdlGenerationTypeComposite.this, value); - } - - @Override - protected DdlGenerationType getValue() { - return this.getSubject().getDdlGenerationType(); - } - - @Override - protected void setValue(DdlGenerationType value) { - this.getSubject().setDdlGenerationType(value); - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_ddlGenerationTypeLabel, - addDdlGenerationTypeCombo( container), - EclipseLinkHelpContextIds.PERSISTENCE_SCHEMA_GENERATION - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DropDdlFileNameComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DropDdlFileNameComposite.java deleted file mode 100644 index 7c927926ae..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/DropDdlFileNameComposite.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation; - -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter; -import org.eclipse.jpt.utility.model.value.ListValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.widgets.Composite; - -/** - * DropDdlFileNameComposite - */ -public class DropDdlFileNameComposite extends Pane -{ - /** - * Creates a new DropDdlFileNameComposite. - * - * @param parentPane The parent container of this one - * @param parent The parent container - */ - public DropDdlFileNameComposite( - Pane parentPane, - Composite parent) { - - super(parentPane, parent); - } - - private PropertyValueModel buildDefaultDropDdlFileNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), SchemaGeneration.DEFAULT_SCHEMA_GENERATION_DROP_FILE_NAME) { - @Override - protected String buildValue_() { - return DropDdlFileNameComposite.this.getDefaultValue(subject); - } - }; - } - - private ListValueModel buildDefaultDropDdlFileNameListHolder() { - return new PropertyListValueModelAdapter( - this.buildDefaultDropDdlFileNameHolder() - ); - } - - private WritablePropertyValueModel buildDropDdlFileNameHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), SchemaGeneration.DROP_FILE_NAME_PROPERTY) { - @Override - protected String buildValue_() { - - String name = subject.getDropFileName(); - if (name == null) { - name = DropDdlFileNameComposite.this.getDefaultValue(subject); - } - return name; - } - - @Override - protected void setValue_(String value) { - - if (DropDdlFileNameComposite.this.getDefaultValue(subject).equals(value)) { - value = null; - } - subject.setDropFileName(value); - } - }; - } - - private String getDefaultValue(SchemaGeneration subject) { - String defaultValue = subject.getDefaultDropFileName(); - - if (defaultValue != null) { - return NLS.bind( - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_defaultWithOneParam, - defaultValue - ); - } - else { - return EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_defaultEmpty; - } - } - - /* - * (non-Javadoc) - */ - @Override - protected void initializeLayout(Composite container) { - - CCombo combo = addLabeledEditableCCombo( - container, - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_dropDdlFileNameLabel, - this.buildDefaultDropDdlFileNameListHolder(), - this.buildDropDdlFileNameHolder(), - EclipseLinkHelpContextIds.PERSISTENCE_SCHEMA_GENERATION - ); - SWTUtil.attachDefaultValueHandler(combo); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/EclipseLinkSchemaGenerationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/EclipseLinkSchemaGenerationComposite.java deleted file mode 100644 index 8f5d84e6f3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/EclipseLinkSchemaGenerationComposite.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation; - -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLinkSchemaGenerationComposite - */ -public class EclipseLinkSchemaGenerationComposite - extends FormPane -{ - public EclipseLinkSchemaGenerationComposite( - FormPane subjectHolder, - Composite container) { - super(subjectHolder, container, false); - } - - @Override - protected void initializeLayout(Composite container) { - - container = addSection( - container, - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_sectionTitle, - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_sectionDescription - ); - - // DDL Generation Type: - new DdlGenerationTypeComposite(this, container); - // Output Mode: - new OutputModeComposite(this, container); - // DDL Generation Location - new DdlGenerationLocationComposite(this, container); - // Create DDL File Name: - new CreateDdlFileNameComposite(this, container); - // Drop DDL File Name: - new DropDdlFileNameComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/OutputModeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/OutputModeComposite.java deleted file mode 100644 index d7f22332b8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/OutputModeComposite.java +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation; - -import java.util.Collection; - -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.OutputMode; -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * OutputModeComposite - */ -public class OutputModeComposite extends FormPane -{ - /** - * Creates a new OutputModeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public OutputModeComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - private EnumFormComboViewer addBuildOutputModeCombo(Composite container) { - return new EnumFormComboViewer(this, container) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(SchemaGeneration.OUTPUT_MODE_PROPERTY); - } - - @Override - protected OutputMode[] getChoices() { - return OutputMode.values(); - } - - @Override - protected OutputMode getDefaultValue() { - return this.getSubject().getDefaultOutputMode(); - } - - @Override - protected String displayString(OutputMode value) { - return this.buildDisplayString(EclipseLinkUiMessages.class, OutputModeComposite.this, value); - } - - @Override - protected OutputMode getValue() { - return this.getSubject().getOutputMode(); - } - - @Override - protected void setValue(OutputMode value) { - this.getSubject().setOutputMode(value); - } - }; - } - - @Override - protected void initializeLayout(Composite container) { - this.addLabeledComposite( - container, - EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_outputModeLabel, - this.addBuildOutputModeCombo(container), - EclipseLinkHelpContextIds.PERSISTENCE_SCHEMA_GENERATION - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/PersistenceXmlSchemaGenerationTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/PersistenceXmlSchemaGenerationTab.java deleted file mode 100644 index 0d4275f868..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistence/schema/generation/PersistenceXmlSchemaGenerationTab.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistence.schema.generation; - -import org.eclipse.jpt.eclipselink.core.context.persistence.schema.generation.SchemaGeneration; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaPageComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlSchemaGenerationTab - */ -public class PersistenceXmlSchemaGenerationTab - extends FormPane - implements JpaPageComposite -{ - // ********** constructors/initialization ********** - public PersistenceXmlSchemaGenerationTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new EclipseLinkSchemaGenerationComposite(this, container); - } - - // ********** JpaPageComposite implementation ********** - - public String getHelpID() { - return EclipseLinkHelpContextIds.PERSISTENCE_SCHEMA_GENERATION; - } - - public Image getPageImage() { - return null; - } - - public String getPageText() { - return EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_title; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemContentProviderFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemContentProviderFactory.java deleted file mode 100644 index f921d3bc40..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemContentProviderFactory.java +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistencexml.details; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.jpt.core.context.JpaContextNode; -import org.eclipse.jpt.core.context.MappingFile; -import org.eclipse.jpt.core.context.persistence.MappingFileRef; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceUnit; -import org.eclipse.jpt.ui.internal.jface.DelegatingTreeContentAndLabelProvider; -import org.eclipse.jpt.ui.internal.platform.generic.GenericNavigatorItemContentProviderFactory; -import org.eclipse.jpt.ui.jface.DelegatingContentAndLabelProvider; -import org.eclipse.jpt.ui.jface.TreeItemContentProvider; -import org.eclipse.jpt.ui.jface.TreeItemContentProviderFactory; -import org.eclipse.jpt.utility.internal.model.value.CompositeCollectionValueModel; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyCollectionValueModelAdapter; -import org.eclipse.jpt.utility.model.value.CollectionValueModel; - -/** - * EclipseLinkNavigatorItemContentProviderFactory - */ -public class EclipseLinkNavigatorItemContentProviderFactory - extends GenericNavigatorItemContentProviderFactory - implements TreeItemContentProviderFactory -{ - @Override - public TreeItemContentProvider buildItemContentProvider( - Object item, DelegatingContentAndLabelProvider contentAndLabelProvider) { - DelegatingTreeContentAndLabelProvider treeContentAndLabelProvider = - (DelegatingTreeContentAndLabelProvider) contentAndLabelProvider; - - if (item instanceof EclipseLinkPersistenceUnit) { - return new EclipseLinkPersistenceUnitItemContentProvider( - (EclipseLinkPersistenceUnit) item, treeContentAndLabelProvider); - } - - return super.buildItemContentProvider(item, contentAndLabelProvider); - } - - - public static class EclipseLinkPersistenceUnitItemContentProvider - extends PersistenceUnitItemContentProvider - { - public EclipseLinkPersistenceUnitItemContentProvider( - EclipseLinkPersistenceUnit persistenceUnit, DelegatingTreeContentAndLabelProvider contentProvider) { - super(persistenceUnit, contentProvider); - } - - @Override - public EclipseLinkPersistenceUnit getModel() { - return (EclipseLinkPersistenceUnit) super.getModel(); - } - - @Override - protected CollectionValueModel buildChildrenModel() { - List> list = new ArrayList>(); - list.add(buildSpecifiedOrmXmlCvm()); - list.add(buildImpliedMappingFileCvm()); - list.add(buildImpliedEclipseLinkMappingFileCvm()); - list.add(buildPersistentTypeCvm()); - list.add(buildJarFileCvm()); - return new CompositeCollectionValueModel, JpaContextNode>(list); - } - - private CollectionValueModel buildImpliedEclipseLinkMappingFileCvm() { - return new PropertyCollectionValueModelAdapter( - new PropertyAspectAdapter( - new PropertyAspectAdapter( - EclipseLinkPersistenceUnit.IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY, - getModel()) { - @Override - protected MappingFileRef buildValue_() { - return subject.getImpliedEclipseLinkMappingFileRef(); - } - }, - MappingFileRef.MAPPING_FILE_PROPERTY) { - @Override - protected MappingFile buildValue_() { - return subject.getMappingFile(); - } - } - ); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemLabelProviderFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemLabelProviderFactory.java deleted file mode 100644 index 6fa03d383d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/persistencexml/details/EclipseLinkNavigatorItemLabelProviderFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.persistencexml.details; - -import org.eclipse.jpt.ui.internal.platform.generic.GenericNavigatorItemLabelProviderFactory; -import org.eclipse.jpt.ui.jface.ItemLabelProviderFactory; - -/** - * EclipseLinkNavigatorItemLabelProviderFactory - */ -public class EclipseLinkNavigatorItemLabelProviderFactory - extends GenericNavigatorItemLabelProviderFactory - implements ItemLabelProviderFactory -{ - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUi.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUi.java deleted file mode 100644 index c25757f34e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUi.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.platform; - -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jpt.core.JpaProject; -import org.eclipse.jpt.eclipselink.ui.internal.ddlgen.EclipseLinkDDLGeneratorUi; -import org.eclipse.jpt.ui.JpaPlatformUiProvider; -import org.eclipse.jpt.ui.internal.platform.base.BaseJpaPlatformUi; -import org.eclipse.jpt.ui.navigator.JpaNavigatorProvider; - -public class EclipseLinkJpaPlatformUi - extends BaseJpaPlatformUi -{ - public EclipseLinkJpaPlatformUi( - JpaNavigatorProvider navigatorProvider, - JpaPlatformUiProvider platformUiProvider) - { - super(navigatorProvider, platformUiProvider); - } - - // ********** DDL generation ********** - - public void generateDDL(JpaProject project, IStructuredSelection selection) { - EclipseLinkDDLGeneratorUi.generate(project); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiFactory.java deleted file mode 100644 index bcbd6e975e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.platform; - -import org.eclipse.jpt.ui.JpaPlatformUi; -import org.eclipse.jpt.ui.JpaPlatformUiFactory; - -public class EclipseLinkJpaPlatformUiFactory implements JpaPlatformUiFactory -{ - - /** - * Zero arg constructor for extension point - */ - public EclipseLinkJpaPlatformUiFactory() { - super(); - } - - public JpaPlatformUi buildJpaPlatformUi() { - return new EclipseLinkJpaPlatformUi( - new EclipseLinkNavigatorProvider(), - EclipseLinkJpaPlatformUiProvider.instance() - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiProvider.java deleted file mode 100644 index 00f1582bf6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUiProvider.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.platform; - -import java.util.List; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.EclipseLinkJavaResourceUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkEntityMappingsDetailsProvider; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkOrmXmlUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.EclipseLinkPersistenceXmlUiDefinition; -import org.eclipse.jpt.ui.JpaPlatformUiProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.JpaDetailsProvider; -import org.eclipse.jpt.ui.internal.AbstractJpaPlatformUiProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.EntityMappingsDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmXmlUiDefinition; - -public class EclipseLinkJpaPlatformUiProvider extends AbstractJpaPlatformUiProvider -{ - - // singleton - private static final JpaPlatformUiProvider INSTANCE = new EclipseLinkJpaPlatformUiProvider(); - - /** - * Return the singleton. - */ - public static JpaPlatformUiProvider instance() { - return INSTANCE; - } - - /** - * Ensure single instance. - */ - private EclipseLinkJpaPlatformUiProvider() { - super(); - } - - - // ********** details providers ********** - - @Override - protected void addDetailsProvidersTo(List providers) { - providers.add(JavaPersistentTypeDetailsProvider.instance()); - providers.add(JavaPersistentAttributeDetailsProvider.instance()); - providers.add(EntityMappingsDetailsProvider.instance()); - providers.add(OrmPersistentTypeDetailsProvider.instance()); - providers.add(OrmPersistentAttributeDetailsProvider.instance()); - providers.add(EclipseLinkEntityMappingsDetailsProvider.instance()); - } - - - // ********** resource ui definitions ********** - - @Override - protected void addResourceUiDefinitionsTo(List definitions) { - definitions.add(EclipseLinkJavaResourceUiDefinition.instance()); - definitions.add(OrmXmlUiDefinition.instance()); - definitions.add(EclipseLinkOrmXmlUiDefinition.instance()); - definitions.add(EclipseLinkPersistenceXmlUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkNavigatorProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkNavigatorProvider.java deleted file mode 100644 index f8e5c4b3d3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkNavigatorProvider.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.platform; - -import org.eclipse.jpt.eclipselink.ui.internal.persistencexml.details.EclipseLinkNavigatorItemContentProviderFactory; -import org.eclipse.jpt.eclipselink.ui.internal.persistencexml.details.EclipseLinkNavigatorItemLabelProviderFactory; -import org.eclipse.jpt.ui.jface.ItemLabelProviderFactory; -import org.eclipse.jpt.ui.jface.TreeItemContentProviderFactory; -import org.eclipse.jpt.ui.navigator.JpaNavigatorProvider; - -/** - * EclipseLinkNavigatorProvider - */ -public class EclipseLinkNavigatorProvider implements JpaNavigatorProvider -{ - public ItemLabelProviderFactory getItemLabelProviderFactory() { - return new EclipseLinkNavigatorItemLabelProviderFactory(); - } - - public TreeItemContentProviderFactory getTreeItemContentProviderFactory() { - return new EclipseLinkNavigatorItemContentProviderFactory(); - } - - public void dispose() { - - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkOrmResourceModelStructureProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkOrmResourceModelStructureProvider.java deleted file mode 100644 index 3d3e08d31d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkOrmResourceModelStructureProvider.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.structure; - -import org.eclipse.jpt.ui.internal.structure.OrmItemContentProviderFactory; -import org.eclipse.jpt.ui.internal.structure.OrmItemLabelProviderFactory; -import org.eclipse.jpt.ui.jface.ItemLabelProviderFactory; -import org.eclipse.jpt.ui.jface.TreeItemContentProviderFactory; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkOrmResourceModelStructureProvider - implements JpaStructureProvider -{ - // singleton - private static final JpaStructureProvider INSTANCE = new EclipseLinkOrmResourceModelStructureProvider(); - - - /** - * Return the singleton - */ - public static JpaStructureProvider instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkOrmResourceModelStructureProvider() { - super(); - } - - - public TreeItemContentProviderFactory getTreeItemContentProviderFactory() { - return new OrmItemContentProviderFactory(); - } - - public ItemLabelProviderFactory getItemLabelProviderFactory() { - return new OrmItemLabelProviderFactory(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceItemContentProviderFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceItemContentProviderFactory.java deleted file mode 100644 index 2e89f7f8e0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceItemContentProviderFactory.java +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.structure; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; - -import org.eclipse.jpt.core.JpaStructureNode; -import org.eclipse.jpt.core.context.persistence.ClassRef; -import org.eclipse.jpt.core.context.persistence.MappingFileRef; -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceUnit; -import org.eclipse.jpt.ui.internal.jface.DelegatingTreeContentAndLabelProvider; -import org.eclipse.jpt.ui.internal.structure.PersistenceItemContentProviderFactory; -import org.eclipse.jpt.ui.jface.DelegatingContentAndLabelProvider; -import org.eclipse.jpt.ui.jface.TreeItemContentProvider; -import org.eclipse.jpt.utility.internal.model.value.CollectionAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.CompositeCollectionValueModel; -import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.ListCollectionValueModelAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.PropertyCollectionValueModelAdapter; -import org.eclipse.jpt.utility.model.value.CollectionValueModel; - -public class EclipseLinkPersistenceItemContentProviderFactory - extends PersistenceItemContentProviderFactory -{ - @Override - public TreeItemContentProvider buildItemContentProvider( - Object item, DelegatingContentAndLabelProvider contentAndLabelProvider) { - DelegatingTreeContentAndLabelProvider treeContentProvider = (DelegatingTreeContentAndLabelProvider) contentAndLabelProvider; - if (item instanceof EclipseLinkPersistenceUnit) { - return new EclipseLinkPersistenceUnitItemContentProvider((EclipseLinkPersistenceUnit) item, treeContentProvider); - } - return super.buildItemContentProvider(item, contentAndLabelProvider); - } - - - public static class EclipseLinkPersistenceUnitItemContentProvider - extends PersistenceUnitItemContentProvider - { - public EclipseLinkPersistenceUnitItemContentProvider( - EclipseLinkPersistenceUnit persistenceUnit, DelegatingTreeContentAndLabelProvider contentProvider) { - super(persistenceUnit, contentProvider); - } - - @Override - public EclipseLinkPersistenceUnit getModel() { - return (EclipseLinkPersistenceUnit) super.getModel(); - } - - @Override - protected CollectionValueModel buildChildrenModel() { - CollectionValueModel specifiedMappingFileCvm = - new ListCollectionValueModelAdapter( - new ListAspectAdapter( - PersistenceUnit.SPECIFIED_MAPPING_FILE_REFS_LIST, - getModel()) { - @Override - protected ListIterator listIterator_() { - return subject.specifiedMappingFileRefs(); - } - @Override - protected int size_() { - return subject.specifiedMappingFileRefsSize(); - } - }); - - CollectionValueModel impliedMappingFileCvm = - new PropertyCollectionValueModelAdapter( - new PropertyAspectAdapter( - PersistenceUnit.IMPLIED_MAPPING_FILE_REF_PROPERTY, - getModel()) { - @Override - protected MappingFileRef buildValue_() { - return subject.getImpliedMappingFileRef(); - } - } - ); - CollectionValueModel impliedEclipseLinkMappingFileCvm = - new PropertyCollectionValueModelAdapter( - new PropertyAspectAdapter( - EclipseLinkPersistenceUnit.IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY, - getModel()) { - @Override - protected MappingFileRef buildValue_() { - return subject.getImpliedEclipseLinkMappingFileRef(); - } - } - ); - CollectionValueModel specifiedClassCvm = - new ListCollectionValueModelAdapter( - new ListAspectAdapter( - PersistenceUnit.SPECIFIED_CLASS_REFS_LIST, - getModel()) { - @Override - protected ListIterator listIterator_() { - return subject.specifiedClassRefs(); - } - @Override - protected int size_() { - return subject.specifiedClassRefsSize(); - } - }); - CollectionValueModel impliedClassCvm = - new CollectionAspectAdapter( - PersistenceUnit.IMPLIED_CLASS_REFS_COLLECTION, - getModel()) { - @Override - protected Iterator iterator_() { - return subject.impliedClassRefs(); - } - @Override - protected int size_() { - return subject.impliedClassRefsSize(); - } - }; - List> list = new ArrayList>(4); - list.add(specifiedMappingFileCvm); - list.add(impliedMappingFileCvm); - list.add(impliedEclipseLinkMappingFileCvm); - list.add(specifiedClassCvm); - list.add(impliedClassCvm); - - return new CompositeCollectionValueModel, JpaStructureNode>(list); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceResourceModelStructureProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceResourceModelStructureProvider.java deleted file mode 100644 index dc3b569088..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/structure/EclipseLinkPersistenceResourceModelStructureProvider.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.structure; - -import org.eclipse.jpt.ui.internal.structure.PersistenceItemLabelProviderFactory; -import org.eclipse.jpt.ui.jface.ItemLabelProviderFactory; -import org.eclipse.jpt.ui.jface.TreeItemContentProviderFactory; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkPersistenceResourceModelStructureProvider - implements JpaStructureProvider -{ - // singleton - private static final JpaStructureProvider INSTANCE = new EclipseLinkPersistenceResourceModelStructureProvider(); - - - /** - * Return the singleton - */ - public static JpaStructureProvider instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkPersistenceResourceModelStructureProvider() { - super(); - } - - - public TreeItemContentProviderFactory getTreeItemContentProviderFactory() { - return new EclipseLinkPersistenceItemContentProviderFactory(); - } - - public ItemLabelProviderFactory getItemLabelProviderFactory() { - return new PersistenceItemLabelProviderFactory(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaResourceUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaResourceUiDefinition.java deleted file mode 100644 index bbee914b3c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaResourceUiDefinition.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java; - -import java.util.List; -import org.eclipse.jpt.core.context.AttributeMapping; -import org.eclipse.jpt.core.context.TypeMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.DefaultJavaEclipseLinkOneToManyMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.DefaultJavaEclipseLinkOneToOneMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkBasicCollectionMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkBasicMapMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkTransformationMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.java.DefaultJavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaTypeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.ui.internal.details.java.AbstractJavaResourceUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.DefaultBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.DefaultEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddableUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddedIdMappingUDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEntityUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaManyToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaManyToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaMappedSuperclassUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaOneToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaTransientMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaVersionMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.NullJavaAttributeMappingUiDefinition; - -public class EclipseLink1_1JavaResourceUiDefinition extends AbstractJavaResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLink1_1JavaResourceUiDefinition(); - - /** - * Return the singleton. - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * zero-argument constructor - */ - protected EclipseLink1_1JavaResourceUiDefinition() { - super(); - } - - @Override - protected JavaUiFactory buildJavaUiFactory() { - return new EclipseLink1_1JavaUiFactory(); - } - - @Override - protected void addSpecifiedAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(JavaIdMappingUiDefinition.instance()); - definitions.add(JavaEmbeddedIdMappingUDefinition.instance()); - definitions.add(JavaBasicMappingUiDefinition.instance()); - definitions.add(JavaVersionMappingUiDefinition.instance()); - definitions.add(JavaManyToOneMappingUiDefinition.instance()); - definitions.add(JavaOneToManyMappingUiDefinition.instance()); - definitions.add(JavaOneToOneMappingUiDefinition.instance()); - definitions.add(JavaManyToManyMappingUiDefinition.instance()); - definitions.add(JavaEmbeddedMappingUiDefinition.instance()); - definitions.add(JavaTransientMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkBasicCollectionMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkBasicMapMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkTransformationMappingUiDefinition.instance()); - } - - @Override - protected void addDefaultAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(DefaultBasicMappingUiDefinition.instance()); - definitions.add(DefaultEmbeddedMappingUiDefinition.instance()); - definitions.add(NullJavaAttributeMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkOneToOneMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkOneToManyMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - } - - @Override - protected void addSpecifiedTypeMappingUiDefinitionsTo(List> definitions) { - definitions.add(JavaEntityUiDefinition.instance()); - definitions.add(JavaMappedSuperclassUiDefinition.instance()); - definitions.add(JavaEmbeddableUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaUiFactory.java deleted file mode 100644 index bb441bec1c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/EclipseLink1_1JavaUiFactory.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java; - -import org.eclipse.jpt.core.context.java.JavaEmbeddable; -import org.eclipse.jpt.core.context.java.JavaEntity; -import org.eclipse.jpt.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.EclipseLinkJavaUiFactory; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java.JavaEclipseLinkEmbeddable1_1Composite; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java.JavaEclipseLinkEntity1_1Composite; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java.JavaEclipseLinkMappedSuperclass1_1Composite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLink1_1JavaUiFactory extends EclipseLinkJavaUiFactory -{ - public EclipseLink1_1JavaUiFactory() { - super(); - } - - - - // **************** java type mapping composites *************************** - - @Override - public JpaComposite createJavaMappedSuperclassComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkMappedSuperclass1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaEntityComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkEntity1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaEmbeddableComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkEmbeddable1_1Composite(subjectHolder, parent, widgetFactory); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEmbeddable1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEmbeddable1_1Composite.java deleted file mode 100644 index e3b8f21b2d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEmbeddable1_1Composite.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.java.JavaEmbeddable; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkConverterHolder; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkEmbeddable; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkEmbeddableAdvancedComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkConvertersComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane does not have any widgets. - * - * @see Embeddable - * @see JavaUiFactory - The factory creating this pane - * @see EmbeddableUiProvider - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkEmbeddable1_1Composite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EmbeddableComposite. - * - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkEmbeddable1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeConvertersPane(container); - initializeAdvancedPane(container); - } - - protected void initializeGeneralPane(Composite container) { - new AccessTypeComposite(this, buildAccessHolder(), container); - } - - protected PropertyValueModel buildAccessHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentType(); - } - }; - } - - protected void initializeConvertersPane(Composite container) { - - container = addCollapsableSection( - addSubPane(container, 5), - EclipseLinkUiDetailsMessages.EclipseLinkTypeMappingComposite_converters - ); - - new JavaEclipseLinkConvertersComposite(this, buildConverterHolderValueModel(), container); - } - - protected PropertyValueModel buildConverterHolderValueModel() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected JavaEclipseLinkConverterHolder buildValue_() { - return ((JavaEclipseLinkEmbeddable) this.subject).getConverterHolder(); - } - }; - } - - protected void initializeAdvancedPane(Composite container) { - new EclipseLinkEmbeddableAdvancedComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEntity1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEntity1_1Composite.java deleted file mode 100644 index b0ac97f50d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkEntity1_1Composite.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.java.JavaEntity; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkEntity; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.AbstractJavaEclipseLinkEntityComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.EntityNameComposite; -import org.eclipse.jpt.ui.internal.details.IdClassComposite; -import org.eclipse.jpt.ui.internal.details.TableComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink1.1 Java entity. - * - * @see JavaEclipseLinkEntity - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 2.2 - * @since 2.2 - */ -public class JavaEclipseLinkEntity1_1Composite extends AbstractJavaEclipseLinkEntityComposite -{ - /** - * Creates a new EclipseLinkJavaEntityComposite. - * - * @param subjectHolder The holder of the subject JavaEntity - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkEntity1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TableComposite(this, container); - new EntityNameComposite(this, addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin)); - new AccessTypeComposite(this, buildAccessHolder(), addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin)); - new IdClassComposite(this, addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin), false); - } - - protected PropertyValueModel buildAccessHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentType(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkMappedSuperclass1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkMappedSuperclass1_1Composite.java deleted file mode 100644 index bc6df04e00..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/java/JavaEclipseLinkMappedSuperclass1_1Composite.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.AbstractJavaEclipseLinkMappedSuperclassComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.IdClassComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink Java Mapped Superclass. - * - * @see EclipseLinkMappedSuperclass - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 2.1 - * @since 2.1 - */ -public class JavaEclipseLinkMappedSuperclass1_1Composite extends AbstractJavaEclipseLinkMappedSuperclassComposite -{ - /** - * Creates a new MappedSuperclassComposite. - * - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkMappedSuperclass1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeGeneralPane(Composite container) { - new AccessTypeComposite(this, buildAccessHolder(), container); - new IdClassComposite(this, container); - } - - protected PropertyValueModel buildAccessHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentType(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiDefinition.java deleted file mode 100644 index 269d59a67a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiDefinition.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import java.util.List; -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.context.AttributeMapping; -import org.eclipse.jpt.core.context.TypeMapping; -import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkBasicCollectionMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkBasicMapMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkTransformationMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.structure.EclipseLinkOrmResourceModelStructureProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmTypeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.ui.internal.details.orm.AbstractOrmXmlResourceUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddableUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEntityUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmMappedSuperclassUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmTransientMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmVersionMappingUiDefinition; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkOrmXml1_1UiDefinition extends AbstractOrmXmlResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLinkOrmXml1_1UiDefinition(); - - - /** - * Return the singleton - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkOrmXml1_1UiDefinition() { - super(); - } - - - @Override - protected OrmXmlUiFactory buildOrmXmlUiFactory() { - return new EclipseLinkOrmXml1_1UiFactory(); - } - - public boolean providesUi(JpaResourceType resourceType) { - return resourceType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_1_1_RESOURCE_TYPE); - } - - public JpaStructureProvider getStructureProvider() { - return EclipseLinkOrmResourceModelStructureProvider.instance(); - } - - @Override - protected void addOrmAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmIdMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedIdMappingUiDefinition.instance()); - definitions.add(OrmBasicMappingUiDefinition.instance()); - definitions.add(OrmVersionMappingUiDefinition.instance()); - definitions.add(OrmManyToOneMappingUiDefinition.instance()); - definitions.add(OrmOneToManyMappingUiDefinition.instance()); - definitions.add(OrmOneToOneMappingUiDefinition.instance()); - definitions.add(OrmManyToManyMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedMappingUiDefinition.instance()); - definitions.add(OrmTransientMappingUiDefinition.instance()); - - definitions.add(OrmEclipseLinkBasicCollectionMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkBasicMapMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkTransformationMappingUiDefinition.instance()); - } - - @Override - protected void addOrmTypeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmEntityUiDefinition.instance()); - definitions.add(OrmMappedSuperclassUiDefinition.instance()); - definitions.add(OrmEmbeddableUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiFactory.java deleted file mode 100644 index b4dee2bab3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/EclipseLinkOrmXml1_1UiFactory.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.orm.OrmBasicMapping; -import org.eclipse.jpt.core.context.orm.OrmEmbeddedIdMapping; -import org.eclipse.jpt.core.context.orm.OrmEmbeddedMapping; -import org.eclipse.jpt.core.context.orm.OrmIdMapping; -import org.eclipse.jpt.core.context.orm.OrmManyToManyMapping; -import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping; -import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping; -import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping; -import org.eclipse.jpt.core.context.orm.OrmVersionMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.BaseEclipseLinkOrmXmlUiFactory; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkOrmXml1_1UiFactory extends BaseEclipseLinkOrmXmlUiFactory -{ - // **************** orm attribute mapping composites *********************** - - @Override - public JpaComposite createOrmIdMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkIdMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmEmbeddedIdMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkEmbeddedIdMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmBasicMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkBasicMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmVersionMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkVersionMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmManyToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkManyToOneMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmOneToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkOneToManyMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmOneToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkOneToOneMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmManyToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkManyToManyMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmEmbeddedMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkEmbeddedMapping1_1Composite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicCollectionMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicCollectionMapping1_1Composite.java deleted file mode 100644 index f6918303ca..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicCollectionMapping1_1Composite.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicCollectionMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkBasicCollectionMapping1_1Composite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLinkBasicCollectionMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkBasicCollectionMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapMapping1_1Composite.java deleted file mode 100644 index 576c6c3448..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapMapping1_1Composite.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicMapMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkBasicMapMapping1_1Composite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLinkBasicCollectionMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkBasicMapMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapping1_1Composite.java deleted file mode 100644 index 6d44aa6187..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkBasicMapping1_1Composite.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.BasicMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkBasicMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkMutableComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkBasicMapping1_1Composite extends EclipseLinkBasicMappingComposite -{ - /** - * Creates a new EclipseLink1_1OrmBasicMappingComposite. - * - * @param subjectHolder The holder of the subject BasicMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkBasicMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new ColumnComposite(this, buildColumnHolder(), container); - - // Align the widgets under the ColumnComposite - container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - new FetchTypeComposite(this, container); - new OptionalComposite(this, addSubPane(container, 4)); - - // Mutable widgets - new EclipseLinkMutableComposite(this, buildMutableHolder(), container); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedIdMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedIdMapping1_1Composite.java deleted file mode 100644 index 91951d0c2e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedIdMapping1_1Composite.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.EmbeddedIdMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.EmbeddedMappingOverridesComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here's the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EmbeddedAttributeOverridesComposite                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EmbeddedIdMapping - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkEmbeddedIdMapping1_1Composite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EclipseLink1_1OrmEmbeddedIdMappingComposite. - * - * @param subjectHolder The holder of the subject EmbeddedIdMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkEmbeddedIdMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - - new EmbeddedMappingOverridesComposite( - this, - container - ); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedMapping1_1Composite.java deleted file mode 100644 index 1375ad4ea2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkEmbeddedMapping1_1Composite.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.EmbeddedMapping; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.EmbeddedMappingOverridesComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EmbeddedAttributeOverridesComposite                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EmbeddedMapping - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkEmbeddedMapping1_1Composite extends FormPane - implements JpaComposite -{ - /** - * Creates a new EmbeddedMappingComposite. - * - * @param subjectHolder The holder of the subject EmbeddedMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkEmbeddedMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - - new EmbeddedMappingOverridesComposite( - this, - container - ); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkIdMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkIdMapping1_1Composite.java deleted file mode 100644 index ed10c15e2a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkIdMapping1_1Composite.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.IdMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkIdMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkMutableComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkIdMapping1_1Composite extends EclipseLinkIdMappingComposite -{ - /** - * Creates a new -public. - * - * @param subjectHolder The holder of the subject IdMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkIdMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - // Column widgets - new ColumnComposite(this, buildColumnHolder(), container); - - // Align the widgets under the ColumnComposite - container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - new EclipseLinkMutableComposite(this, buildMutableHolder(), container); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToManyMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToManyMapping1_1Composite.java deleted file mode 100644 index a27b66021e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToManyMapping1_1Composite.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.ManyToManyMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkManyToManyMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.ManyToManyJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OrderingComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | JoiningStrategyComposite                                              | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrderingComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link ManyToManyMapping} - * @see {@link TargetEntityComposite} - * @see {@link ManyToManyJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link CascadeComposite} - * @see {@link OrderingComposite} - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkManyToManyMapping1_1Composite extends EclipseLinkManyToManyMappingComposite -{ - /** - * Creates a new ManyToManyMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToManyMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkManyToManyMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new ManyToManyJoiningStrategyPane(this, buildJoiningHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - new OrderingComposite(this, container); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToOneMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToOneMapping1_1Composite.java deleted file mode 100644 index 55935cb277..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkManyToOneMapping1_1Composite.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.ManyToOneMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkManyToOneMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.ManyToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | JoiningStrategyComposite                                              | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link ManyToOneMapping} - * @see {@link TargetEntityComposite} - * @see {@link ManyToOneJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link OptionalComposite} - * @see {@link CascadeComposite} - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkManyToOneMapping1_1Composite extends EclipseLinkManyToOneMappingComposite -{ - /** - * Creates a new EclipseLink1_1ManyToOneMappingComposite. - * - * @param subjectHolder The holder of the subject ManyToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkManyToOneMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new ManyToOneJoiningStrategyPane(this, buildJoiningHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new OptionalComposite(this, addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToManyMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToManyMapping1_1Composite.java deleted file mode 100644 index de6f9c1541..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToManyMapping1_1Composite.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToManyMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToManyJoiningStrategyPane; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToManyMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkPrivateOwnedComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OrderingComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - - -public class OrmEclipseLinkOneToManyMapping1_1Composite - extends EclipseLinkOneToManyMappingComposite -{ - public OrmEclipseLinkOneToManyMapping1_1Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkOneToManyJoiningStrategyPane(this, buildJoiningHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, buildPrivateOwnableHolder(), addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - new OrderingComposite(this, container); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToOneMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToOneMapping1_1Composite.java deleted file mode 100644 index 5ebc7c32e7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkOneToOneMapping1_1Composite.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.OneToOneMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToOneMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToOneMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkPrivateOwnedComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OneToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | AccessTypeComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OneToOneJoiningStrategyPane                                           | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkJoinFetchComposite                                         | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkPrivateOwnedComposite                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see OneToOneMapping - * @see AccessTypeComposite - * @see CascadeComposite - * @see EclipseLinkJoinFetchComposite - * @see EclipseLinkPrivateOwnedComposite - * @see FetchTypeComposite - * @see MappedByPane - * @see OneToOneJoiningStrategyPane - * @see OptionalComposite - * @see TargetEntityComposite - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkOneToOneMapping1_1Composite -extends EclipseLinkOneToOneMappingComposite -{ - /** - * Creates a new Eclipselink1_1OneToOneMappingComposite. - * - * @param subjectHolder The holder of the subject IOneToOneMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkOneToOneMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new OneToOneJoiningStrategyPane(this, buildJoiningHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new OptionalComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, buildPrivateOwnableHolder(), addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkVersionMapping1_1Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkVersionMapping1_1Composite.java deleted file mode 100644 index a4e275403c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/details/orm/OrmEclipseLinkVersionMapping1_1Composite.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.VersionMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkMutableComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkVersionMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkVersionMapping1_1Composite extends EclipseLinkVersionMappingComposite -{ - /** - * Creates a new EclipseLinkOrmVersionMappingComposite. - * - * @param subjectHolder The holder of the subject VersionMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkVersionMapping1_1Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - // Column widgets - new ColumnComposite(this, buildColumnHolder(), container); - - // Align the widgets under the ColumnComposite - container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); - - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - new EclipseLinkMutableComposite(this, buildMutableHolder(), container); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiFactory.java deleted file mode 100644 index b0b6dd0fd5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.platform; - -import org.eclipse.jpt.eclipselink.ui.internal.platform.EclipseLinkJpaPlatformUi; -import org.eclipse.jpt.eclipselink.ui.internal.platform.EclipseLinkNavigatorProvider; -import org.eclipse.jpt.ui.JpaPlatformUi; -import org.eclipse.jpt.ui.JpaPlatformUiFactory; - -public class EclipseLink1_1JpaPlatformUiFactory implements JpaPlatformUiFactory -{ - - /** - * Zero arg constructor for extension point - */ - public EclipseLink1_1JpaPlatformUiFactory() { - super(); - } - - public JpaPlatformUi buildJpaPlatformUi() { - return new EclipseLinkJpaPlatformUi( - new EclipseLinkNavigatorProvider(), - EclipseLink1_1JpaPlatformUiProvider.instance() - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiProvider.java deleted file mode 100644 index abe022d2eb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/platform/EclipseLink1_1JpaPlatformUiProvider.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_1.platform; - -import java.util.List; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkEntityMappingsDetailsProvider; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkOrmXmlUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.EclipseLinkPersistenceXmlUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java.EclipseLink1_1JavaResourceUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.EclipseLinkOrmXml1_1UiDefinition; -import org.eclipse.jpt.ui.JpaPlatformUiProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.JpaDetailsProvider; -import org.eclipse.jpt.ui.internal.AbstractJpaPlatformUiProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.EntityMappingsDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmXmlUiDefinition; - -public class EclipseLink1_1JpaPlatformUiProvider extends AbstractJpaPlatformUiProvider -{ - - // singleton - private static final JpaPlatformUiProvider INSTANCE = new EclipseLink1_1JpaPlatformUiProvider(); - - /** - * Return the singleton. - */ - public static JpaPlatformUiProvider instance() { - return INSTANCE; - } - - /** - * Ensure single instance. - */ - private EclipseLink1_1JpaPlatformUiProvider() { - super(); - } - - - // ********** details providers ********** - - @Override - protected void addDetailsProvidersTo(List providers) { - providers.add(JavaPersistentTypeDetailsProvider.instance()); - providers.add(JavaPersistentAttributeDetailsProvider.instance()); - providers.add(EntityMappingsDetailsProvider.instance()); - providers.add(OrmPersistentTypeDetailsProvider.instance()); - providers.add(OrmPersistentAttributeDetailsProvider.instance()); - providers.add(EclipseLinkEntityMappingsDetailsProvider.instance()); - } - - - // ********** resource ui definitions ********** - - @Override - protected void addResourceUiDefinitionsTo(List definitions) { - definitions.add(EclipseLink1_1JavaResourceUiDefinition.instance()); - definitions.add(OrmXmlUiDefinition.instance()); - definitions.add(EclipseLinkOrmXmlUiDefinition.instance()); - definitions.add(EclipseLinkOrmXml1_1UiDefinition.instance()); - definitions.add(EclipseLinkPersistenceXmlUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/details/orm/EclipseLinkOrmXml1_2UiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/details/orm/EclipseLinkOrmXml1_2UiDefinition.java deleted file mode 100644 index eb0ba4a1d7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/details/orm/EclipseLinkOrmXml1_2UiDefinition.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_2.details.orm; - -import java.util.List; -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.context.AttributeMapping; -import org.eclipse.jpt.core.context.TypeMapping; -import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkBasicCollectionMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkBasicMapMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkTransformationMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.structure.EclipseLinkOrmResourceModelStructureProvider; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.EclipseLinkOrmXml1_1UiFactory; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmTypeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.ui.internal.details.orm.AbstractOrmXmlResourceUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddableUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEntityUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmMappedSuperclassUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmTransientMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmVersionMappingUiDefinition; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkOrmXml1_2UiDefinition extends AbstractOrmXmlResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLinkOrmXml1_2UiDefinition(); - - - /** - * Return the singleton - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkOrmXml1_2UiDefinition() { - super(); - } - - - @Override - protected OrmXmlUiFactory buildOrmXmlUiFactory() { - return new EclipseLinkOrmXml1_1UiFactory(); - } - - public boolean providesUi(JpaResourceType resourceType) { - return resourceType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_1_2_RESOURCE_TYPE); - } - - public JpaStructureProvider getStructureProvider() { - return EclipseLinkOrmResourceModelStructureProvider.instance(); - } - - @Override - protected void addOrmAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmIdMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedIdMappingUiDefinition.instance()); - definitions.add(OrmBasicMappingUiDefinition.instance()); - definitions.add(OrmVersionMappingUiDefinition.instance()); - definitions.add(OrmManyToOneMappingUiDefinition.instance()); - definitions.add(OrmOneToManyMappingUiDefinition.instance()); - definitions.add(OrmOneToOneMappingUiDefinition.instance()); - definitions.add(OrmManyToManyMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedMappingUiDefinition.instance()); - definitions.add(OrmTransientMappingUiDefinition.instance()); - - definitions.add(OrmEclipseLinkBasicCollectionMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkBasicMapMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkTransformationMappingUiDefinition.instance()); - } - - @Override - protected void addOrmTypeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmEntityUiDefinition.instance()); - definitions.add(OrmMappedSuperclassUiDefinition.instance()); - definitions.add(OrmEmbeddableUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiFactory.java deleted file mode 100644 index e2e8ce411d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_2.platform; - -import org.eclipse.jpt.eclipselink.ui.internal.platform.EclipseLinkJpaPlatformUi; -import org.eclipse.jpt.eclipselink.ui.internal.platform.EclipseLinkNavigatorProvider; -import org.eclipse.jpt.ui.JpaPlatformUi; -import org.eclipse.jpt.ui.JpaPlatformUiFactory; - -public class EclipseLink1_2JpaPlatformUiFactory implements JpaPlatformUiFactory -{ - - /** - * Zero arg constructor for extension point - */ - public EclipseLink1_2JpaPlatformUiFactory() { - super(); - } - - public JpaPlatformUi buildJpaPlatformUi() { - return new EclipseLinkJpaPlatformUi( - new EclipseLinkNavigatorProvider(), - EclipseLink1_2JpaPlatformUiProvider.instance() - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiProvider.java deleted file mode 100644 index 319a698649..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_2/platform/EclipseLink1_2JpaPlatformUiProvider.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v1_2.platform; - -import java.util.List; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkEntityMappingsDetailsProvider; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkOrmXmlUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.EclipseLinkPersistenceXmlUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java.EclipseLink1_1JavaResourceUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.EclipseLinkOrmXml1_1UiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v1_2.details.orm.EclipseLinkOrmXml1_2UiDefinition; -import org.eclipse.jpt.ui.JpaPlatformUiProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.JpaDetailsProvider; -import org.eclipse.jpt.ui.internal.AbstractJpaPlatformUiProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.EntityMappingsDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmXmlUiDefinition; - -public class EclipseLink1_2JpaPlatformUiProvider extends AbstractJpaPlatformUiProvider -{ - - // singleton - private static final JpaPlatformUiProvider INSTANCE = new EclipseLink1_2JpaPlatformUiProvider(); - - /** - * Return the singleton. - */ - public static JpaPlatformUiProvider instance() { - return INSTANCE; - } - - /** - * Ensure single instance. - */ - private EclipseLink1_2JpaPlatformUiProvider() { - super(); - } - - - // ********** details providers ********** - - @Override - protected void addDetailsProvidersTo(List providers) { - providers.add(JavaPersistentTypeDetailsProvider.instance()); - providers.add(JavaPersistentAttributeDetailsProvider.instance()); - providers.add(EntityMappingsDetailsProvider.instance()); - providers.add(OrmPersistentTypeDetailsProvider.instance()); - providers.add(OrmPersistentAttributeDetailsProvider.instance()); - providers.add(EclipseLinkEntityMappingsDetailsProvider.instance()); - } - - - // ********** resource ui definitions ********** - - @Override - protected void addResourceUiDefinitionsTo(List definitions) { - definitions.add(EclipseLink1_1JavaResourceUiDefinition.instance()); - definitions.add(OrmXmlUiDefinition.instance()); - definitions.add(EclipseLinkOrmXmlUiDefinition.instance()); - definitions.add(EclipseLinkOrmXml1_1UiDefinition.instance()); - definitions.add(EclipseLinkOrmXml1_2UiDefinition.instance()); - definitions.add(EclipseLinkPersistenceXmlUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/EclipseLinkCaching2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/EclipseLinkCaching2_0Composite.java deleted file mode 100644 index 7aab5afd40..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/EclipseLinkCaching2_0Composite.java +++ /dev/null @@ -1,188 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details; - -import java.util.ArrayList; -import java.util.Collection; -import org.eclipse.jpt.core.context.Entity; -import org.eclipse.jpt.core.jpa2.context.Cacheable2_0; -import org.eclipse.jpt.core.jpa2.context.CacheableHolder2_0; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkAlwaysRefreshComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheCoordinationTypeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheSizeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheTypeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkDisableHitsComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkExpiryComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkRefreshOnlyIfNewerComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkUiDetailsMessages; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkEntityComposite; -import org.eclipse.jpt.ui.internal.JpaHelpContextIds; -import org.eclipse.jpt.ui.internal.details.JptUiDetailsMessages; -import org.eclipse.jpt.ui.internal.jpa2.details.JptUiDetailsMessages2_0; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane shows the caching options. - *

- * Here the layout of this pane: - *

- * -----------------------------------------------------------------------------
- * | x Shared                                                                  |
- * |    CacheTypeComposite                                                     |
- * |    CacheSizeComposite                                                     |
- * |    > Advanced   	                                                       |
- * |    	ExpiryComposite                                                    |
- * |    	AlwaysRefreshComposite                                             |
- * |   		RefreshOnlyIfNewerComposite                                        |
- * |    	DisableHitsComposite                                               |
- * |    	CacheCoordinationComposite                                         |
- * | ExistenceTypeComposite                                                    |
- * -----------------------------------------------------------------------------
- * - * @see Entity - * @see EclipseLinkCaching - * @see JavaEclipseLinkEntityComposite - The parent container - * @see EclipseLinkCacheTypeComposite - * @see EclipseLinkCacheSizeComposite - * @see EclipseLinkAlwaysRefreshComposite - * @see EclipseLinkRefreshOnlyIfNewerComposite - * @see EclipseLinkDisableHitsComposite - * - * @version 3.0 - * @since 3.0 - */ -public abstract class EclipseLinkCaching2_0Composite extends FormPane -{ - - protected EclipseLinkCaching2_0Composite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent, false); - } - - @Override - protected void initializeLayout(Composite container) { - PropertyValueModel cacheableHolder = buildCacheableHolder(); - - //Shared Check box, uncheck this and the rest of the panel is disabled - addTriStateCheckBoxWithDefault( - addSubPane(container, 8), - JptUiDetailsMessages2_0.Entity_cacheableLabel, - buildSpecifiedCacheableHolder(cacheableHolder), - buildCacheableStringHolder(cacheableHolder), - JpaHelpContextIds.ENTITY_CACHEABLE - ); - - Composite subPane = addSubPane(container, 0, 16); - - Collection> panes = new ArrayList>(); - - panes.add(new EclipseLinkCacheTypeComposite(this, subPane)); - panes.add(new EclipseLinkCacheSizeComposite(this, subPane)); - - // Advanced sub-pane - Composite advancedSection = addCollapsableSubSection( - subPane, - EclipseLinkUiDetailsMessages.EclipseLinkCachingComposite_advanced, - new SimplePropertyValueModel(Boolean.FALSE) - ); - - initializeAdvancedPane(addSubPane(advancedSection, 0, 16), panes); - - new PaneEnabler(buildCacheableEnabler(cacheableHolder), panes); - - initializeExistenceCheckingComposite(addSubPane(container, 8)); - } - - protected PropertyValueModel buildCacheableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected Cacheable2_0 buildValue_() { - return ((CacheableHolder2_0) this.subject).getCacheable(); - } - }; - } - - protected void initializeAdvancedPane(Composite container, Collection> panes) { - panes.add(new EclipseLinkExpiryComposite(this, container)); - panes.add(new EclipseLinkAlwaysRefreshComposite(this, container)); - panes.add(new EclipseLinkRefreshOnlyIfNewerComposite(this, container)); - panes.add(new EclipseLinkDisableHitsComposite(this, container)); - panes.add(new EclipseLinkCacheCoordinationTypeComposite(this, container)); - } - - protected abstract void initializeExistenceCheckingComposite(Composite parent); - - private PropertyValueModel buildCacheableEnabler(PropertyValueModel cacheableHolder) { - return new PropertyAspectAdapter( - cacheableHolder, - Cacheable2_0.SPECIFIED_CACHEABLE_PROPERTY, - Cacheable2_0.DEFAULT_CACHEABLE_PROPERTY) { - @Override - protected Boolean buildValue_() { - return Boolean.valueOf(this.subject.isCacheable()); - } - }; - } - - private WritablePropertyValueModel buildSpecifiedCacheableHolder(PropertyValueModel cacheableHolder) { - return new PropertyAspectAdapter(cacheableHolder, Cacheable2_0.SPECIFIED_CACHEABLE_PROPERTY) { - @Override - protected Boolean buildValue_() { - return this.subject.getSpecifiedCacheable(); - } - - @Override - protected void setValue_(Boolean value) { - this.subject.setSpecifiedCacheable(value); - } - }; - } - - private PropertyValueModel buildCacheableStringHolder(PropertyValueModel cacheableHolder) { - return new TransformationPropertyValueModel(buildDefaultCacheableHolder(cacheableHolder)) { - @Override - protected String transform(Boolean value) { - if (value != null) { - String defaultStringValue = value.booleanValue() ? JptUiDetailsMessages.Boolean_True : JptUiDetailsMessages.Boolean_False; - return NLS.bind(JptUiDetailsMessages2_0.Entity_cacheableWithDefaultLabel, defaultStringValue); - } - return JptUiDetailsMessages2_0.Entity_cacheableLabel; - } - }; - } - - private PropertyValueModel buildDefaultCacheableHolder(PropertyValueModel cacheableHolder) { - return new PropertyAspectAdapter( - cacheableHolder, - Cacheable2_0.SPECIFIED_CACHEABLE_PROPERTY, - Cacheable2_0.DEFAULT_CACHEABLE_PROPERTY) - { - @Override - protected Boolean buildValue_() { - if (this.subject.getSpecifiedCacheable() != null) { - return null; - } - return Boolean.valueOf(this.subject.isDefaultCacheable()); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaResourceUiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaResourceUiDefinition.java deleted file mode 100644 index f4b4abfb0b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaResourceUiDefinition.java +++ /dev/null @@ -1,108 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import java.util.List; -import org.eclipse.jpt.core.context.AttributeMapping; -import org.eclipse.jpt.core.context.TypeMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.DefaultJavaEclipseLinkOneToManyMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.DefaultJavaEclipseLinkOneToOneMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkBasicCollectionMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkBasicMapMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkTransformationMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.java.DefaultJavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaTypeMappingUiDefinition; -import org.eclipse.jpt.ui.details.java.JavaUiFactory; -import org.eclipse.jpt.ui.internal.details.java.AbstractJavaResourceUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.DefaultBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.DefaultEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddableUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddedIdMappingUDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaEntityUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaManyToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaManyToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaMappedSuperclassUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaOneToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaTransientMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.JavaVersionMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.java.NullJavaAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.internal.jpa2.details.java.JavaElementCollectionMapping2_0UiDefinition; - -public class EclipseLink2_0JavaResourceUiDefinition extends AbstractJavaResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLink2_0JavaResourceUiDefinition(); - - /** - * Return the singleton. - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * zero-argument constructor - */ - protected EclipseLink2_0JavaResourceUiDefinition() { - super(); - } - - @Override - protected JavaUiFactory buildJavaUiFactory() { - return new EclipseLink2_0JavaUiFactory(); - } - - @Override - protected void addSpecifiedAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(JavaIdMappingUiDefinition.instance()); - definitions.add(JavaEmbeddedIdMappingUDefinition.instance()); - definitions.add(JavaBasicMappingUiDefinition.instance()); - definitions.add(JavaVersionMappingUiDefinition.instance()); - definitions.add(JavaManyToOneMappingUiDefinition.instance()); - definitions.add(JavaOneToManyMappingUiDefinition.instance()); - definitions.add(JavaOneToOneMappingUiDefinition.instance()); - definitions.add(JavaManyToManyMappingUiDefinition.instance()); - definitions.add(JavaEmbeddedMappingUiDefinition.instance()); - definitions.add(JavaTransientMappingUiDefinition.instance()); - - definitions.add(JavaEclipseLinkBasicCollectionMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkBasicMapMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - definitions.add(JavaEclipseLinkTransformationMappingUiDefinition.instance()); - - definitions.add(JavaElementCollectionMapping2_0UiDefinition.instance()); - } - - @Override - protected void addDefaultAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(DefaultBasicMappingUiDefinition.instance()); - definitions.add(DefaultEmbeddedMappingUiDefinition.instance()); - definitions.add(NullJavaAttributeMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkOneToOneMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkOneToManyMappingUiDefinition.instance()); - definitions.add(DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - } - - @Override - protected void addSpecifiedTypeMappingUiDefinitionsTo(List> definitions) { - definitions.add(JavaEntityUiDefinition.instance()); - definitions.add(JavaMappedSuperclassUiDefinition.instance()); - definitions.add(JavaEmbeddableUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaUiFactory.java deleted file mode 100644 index 486a876165..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/EclipseLink2_0JavaUiFactory.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.context.java.JavaEntity; -import org.eclipse.jpt.core.context.java.JavaIdMapping; -import org.eclipse.jpt.core.context.java.JavaManyToOneMapping; -import org.eclipse.jpt.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.core.context.java.JavaOneToManyMapping; -import org.eclipse.jpt.core.context.java.JavaOneToOneMapping; -import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.java.EclipseLink1_1JavaUiFactory; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.ElementCollectionMapping2_0Composite; -import org.eclipse.jpt.ui.jpa2.details.java.JavaUiFactory2_0; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLink2_0JpaUiFactory - */ -public class EclipseLink2_0JavaUiFactory - extends EclipseLink1_1JavaUiFactory - implements JavaUiFactory2_0 -{ - public EclipseLink2_0JavaUiFactory() { - super(); - } - - - // **************** java type mapping composites *************************** - - @Override - public JpaComposite createJavaEntityComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkEntity2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaMappedSuperclassComposite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - return new JavaEclipseLinkMappedSuperclass2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaIdMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new JavaEclipseLinkIdMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - public JpaComposite createJavaElementCollectionMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new ElementCollectionMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaOneToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new JavaEclipseLinkOneToManyMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaOneToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new JavaEclipseLinkOneToOneMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createJavaManyToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new JavaEclipseLinkManyToOneMapping2_0Composite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkCaching2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkCaching2_0Composite.java deleted file mode 100644 index e6cd8e24f6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkCaching2_0Composite.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.context.Entity; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkAlwaysRefreshComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheSizeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheTypeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkDisableHitsComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkRefreshOnlyIfNewerComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkEntityComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkExistenceCheckingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.EclipseLinkCaching2_0Composite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane shows the caching options. - *

- * Here the layout of this pane: - *

- * -----------------------------------------------------------------------------
- * | x Shared                                                                  |
- * |    CacheTypeComposite                                                     |
- * |    CacheSizeComposite                                                     |
- * |    > Advanced   	                                                       |
- * |    	ExpiryComposite                                                    |
- * |    	AlwaysRefreshComposite                                             |
- * |   		RefreshOnlyIfNewerComposite                                        |
- * |    	DisableHitsComposite                                               |
- * |    	CacheCoordinationComposite                                         |
- * | ExistenceTypeComposite                                                    |
- * -----------------------------------------------------------------------------
- * - * @see Entity - * @see EclipseLinkCaching - * @see JavaEclipseLinkEntityComposite - The parent container - * @see EclipseLinkCacheTypeComposite - * @see EclipseLinkCacheSizeComposite - * @see EclipseLinkAlwaysRefreshComposite - * @see EclipseLinkRefreshOnlyIfNewerComposite - * @see EclipseLinkDisableHitsComposite - * - * @version 3.0 - * @since 3.0 - */ -public class JavaEclipseLinkCaching2_0Composite extends EclipseLinkCaching2_0Composite -{ - - public JavaEclipseLinkCaching2_0Composite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeExistenceCheckingComposite(Composite parent) { - new JavaEclipseLinkExistenceCheckingComposite(this, parent); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkEntity2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkEntity2_0Composite.java deleted file mode 100644 index 991a522355..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkEntity2_0Composite.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.GeneratorContainer; -import org.eclipse.jpt.core.context.QueryContainer; -import org.eclipse.jpt.core.context.java.JavaEntity; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkEntity; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.AbstractJavaEclipseLinkEntityComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.EntityNameComposite; -import org.eclipse.jpt.ui.internal.details.IdClassComposite; -import org.eclipse.jpt.ui.internal.details.TableComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.Entity2_0OverridesComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.Generation2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.Queries2_0Composite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink1.1 Java entity. - * - * @see JavaEclipseLinkEntity - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 2.2 - * @since 2.2 - */ -public class JavaEclipseLinkEntity2_0Composite extends AbstractJavaEclipseLinkEntityComposite -{ - /** - * Creates a new EclipseLinkJavaEntityComposite. - * - * @param subjectHolder The holder of the subject JavaEntity - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkEntity2_0Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TableComposite(this, container); - new EntityNameComposite(this, addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin)); - new AccessTypeComposite(this, buildAccessHolder(), addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin)); - new IdClassComposite(this, addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin), false); - } - - protected PropertyValueModel buildAccessHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentType(); - } - }; - } - - @Override - protected void addAttributeOverridesComposite(Composite container) { - new Entity2_0OverridesComposite(this, container); - } - - @Override - protected void addGeneratorsComposite(Composite container, PropertyValueModel generatorContainerHolder) { - new Generation2_0Composite(this, generatorContainerHolder, container); - } - - @Override - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new JavaEclipseLinkCaching2_0Composite(this, cachingHolder, container); - } - - @Override - protected void addQueriesComposite(Composite container, PropertyValueModel queryContainerHolder) { - new Queries2_0Composite(this, queryContainerHolder, container); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkIdMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkIdMapping2_0Composite.java deleted file mode 100644 index 5e520e0ee9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkIdMapping2_0Composite.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.context.IdMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkIdMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.ui.internal.details.IdMappingGenerationComposite; -import org.eclipse.jpt.ui.internal.details.TemporalTypeComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.IdMappingGeneration2_0Composite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ColumnComposite                                                       | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TemporalTypeComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | GenerationComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see IdMapping - * @see JavaUiFactory - The factory creating this pane - * @see ColumnComposite - * @see TemporalTypeComposite - * @see IdMappingGenerationComposite - * - * @version 2.2 - * @since 2.1 - */ -public class JavaEclipseLinkIdMapping2_0Composite extends EclipseLinkIdMappingComposite - implements JpaComposite -{ - /** - * Creates a new IdMappingComposite. - * - * @param subjectHolder The holder of the subject IIdMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkIdMapping2_0Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - initializeGeneralPane(container); - initializeTypePane(container); - - // Generation pane - new IdMappingGeneration2_0Composite(this, container); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkManyToOneMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkManyToOneMapping2_0Composite.java deleted file mode 100644 index 717dac7193..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkManyToOneMapping2_0Composite.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneMapping2_0; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.ManyToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.AbstractManyToOneMapping2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.DerivedId2_0Pane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | DerivedId2_0Pane                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ManyToOneJoiningStrategyPane                                          | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link JavaManyToOneMapping2_0} - * @see {@link TargetEntityComposite} - * @see {@link DerivedId2_0Pane} - * @see {@link ManyToOneJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link OptionalComposite} - * @see {@link CascadeComposite} - */ -public class JavaEclipseLinkManyToOneMapping2_0Composite - extends AbstractManyToOneMapping2_0Composite -{ - public JavaEclipseLinkManyToOneMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new DerivedId2_0Pane(this, buildDerivedIdHolder(), addPane(container, groupBoxMargin)); - new ManyToOneJoiningStrategyPane(this, buildJoiningHolder(), container); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new OptionalComposite(this, addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkMappedSuperclass2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkMappedSuperclass2_0Composite.java deleted file mode 100644 index afea6af5cf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkMappedSuperclass2_0Composite.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.eclipselink.core.context.java.JavaEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.AbstractJavaEclipseLinkMappedSuperclassComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.IdClassComposite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * The pane used for an EclipseLink Java Mapped Superclass. - * - * @see EclipseLinkMappedSuperclass - * @see EclipselinkJpaUiFactory - The factory creating this pane - * - * @version 3.0 - * @since 3.0 - */ -public class JavaEclipseLinkMappedSuperclass2_0Composite extends AbstractJavaEclipseLinkMappedSuperclassComposite -{ - /** - * Creates a new MappedSuperclassComposite. - * - * @param subjectHolder The holder of this pane's subject - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public JavaEclipseLinkMappedSuperclass2_0Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeGeneralPane(Composite container) { - new AccessTypeComposite(this, buildAccessHolder(), container); - new IdClassComposite(this, container); - } - - protected PropertyValueModel buildAccessHolder() { - return new PropertyAspectAdapter( - getSubjectHolder()) - { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentType(); - } - }; - } - - @Override - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new JavaEclipseLinkCaching2_0Composite(this, cachingHolder, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToManyMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToManyMapping2_0Composite.java deleted file mode 100644 index e94cb94e18..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToManyMapping2_0Composite.java +++ /dev/null @@ -1,151 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.jpa2.context.OrphanRemovable2_0; -import org.eclipse.jpt.core.jpa2.context.OrphanRemovalHolder2_0; -import org.eclipse.jpt.core.jpa2.context.java.JavaOneToManyMapping2_0; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToManyRelationshipReference; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkPrivateOwned; -import org.eclipse.jpt.eclipselink.core.v2_0.context.EclipseLinkOneToManyMapping2_0; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToManyJoiningStrategyPane; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkPrivateOwnedComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AbstractOneToManyMappingComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OrderingComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.Ordering2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.OrphanRemoval2_0Composite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkOneToManyJoiningStrategyPane                  | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkJoinFetchComposite                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkPrivateOwnedComposite                             | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrphanRemoval2_0Composite                                       | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrderingComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link JavaOneToManyMapping2_0} - * @see {@link TargetEntityComposite} - * @see {@link EclipseLinkOneToManyJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link EclipseLinkJoinFetchComposite} - * @see {@link EclipseLinkPrivateOwnedComposite} - * @see {@link CascadeComposite} - * @see {@link OrphanRemoval2_0Composite} - * @see {@link OrderingComposite} - */ -public class JavaEclipseLinkOneToManyMapping2_0Composite - extends AbstractOneToManyMappingComposite -{ - public JavaEclipseLinkOneToManyMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = this.getGroupBoxMargin(); - - new TargetEntityComposite(this, this.addPane(container, groupBoxMargin)); - new EclipseLinkOneToManyJoiningStrategyPane(this, this.buildEclipseLinkJoiningHolder(), container); - new FetchTypeComposite(this, this.addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, this.buildJoinFetchableHolder(), this.addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, this.buildPrivateOwnableHolder(), this.addPane(container, groupBoxMargin)); - new OrphanRemoval2_0Composite(this, this.buildOrphanRemovableHolder(), this.addPane(container, groupBoxMargin)); - new CascadeComposite(this, this.buildCascadeHolder(), this.addSubPane(container, 5)); - new Ordering2_0Composite(this, container); - } - - protected PropertyValueModel buildEclipseLinkJoiningHolder() { - return new TransformationPropertyValueModel(this.getSubjectHolder()) { - @Override - protected EclipseLinkOneToManyRelationshipReference transform_(T value) { - return value.getRelationshipReference(); - } - }; - } - - protected PropertyValueModel buildJoinFetchableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected EclipseLinkJoinFetch buildValue_() { - return this.subject.getJoinFetch(); - } - }; - } - - protected PropertyValueModel buildPrivateOwnableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected EclipseLinkPrivateOwned buildValue_() { - return this.subject.getPrivateOwned(); - } - }; - } - - protected PropertyValueModel buildOrphanRemovableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected OrphanRemovable2_0 buildValue_() { - return ((OrphanRemovalHolder2_0) this.subject).getOrphanRemoval(); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToOneMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToOneMapping2_0Composite.java deleted file mode 100644 index 52c7e80d03..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/java/JavaEclipseLinkOneToOneMapping2_0Composite.java +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java; - -import org.eclipse.jpt.core.jpa2.context.OrphanRemovable2_0; -import org.eclipse.jpt.core.jpa2.context.OrphanRemovalHolder2_0; -import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneMapping2_0; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToOneMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkPrivateOwned; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkPrivateOwnedComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OneToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.AbstractOneToOneMapping2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.DerivedId2_0Pane; -import org.eclipse.jpt.ui.internal.jpa2.details.OrphanRemoval2_0Composite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | DerivedId2_0Pane                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OneToOneJoiningStrategyPane                                           | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrphanRemoval2_0Composite                                       | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link JavaOneToOneMapping2_0} - * @see {@link TargetEntityComposite} - * @see {@link DerivedId2_0Pane} - * @see {@link OneToOneJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link OptionalComposite} - * @see {@link CascadeComposite} - * @see {@link OrphanRemoval2_0Composite} - */ -public class JavaEclipseLinkOneToOneMapping2_0Composite - extends AbstractOneToOneMapping2_0Composite -{ - public JavaEclipseLinkOneToOneMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = this.getGroupBoxMargin(); - - new TargetEntityComposite(this, this.addPane(container, groupBoxMargin)); - new DerivedId2_0Pane(this, this.buildDerivedIdHolder(), this.addPane(container, groupBoxMargin)); - new OneToOneJoiningStrategyPane(this, this.buildJoiningHolder(), container); - new FetchTypeComposite(this, this.addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, this.buildJoinFetchableHolder(), this.addPane(container, groupBoxMargin)); - new OptionalComposite(this, this.addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, this.buildPrivateOwnableHolder(), this.addPane(container, groupBoxMargin)); - new OrphanRemoval2_0Composite(this, this.buildOrphanRemovableHolder(), this.addPane(container, groupBoxMargin)); - new CascadeComposite(this, this.buildCascadeHolder(), this.addSubPane(container, 5)); - } - - - protected PropertyValueModel buildJoinFetchableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected EclipseLinkJoinFetch buildValue_() { - return ((EclipseLinkOneToOneMapping) this.subject).getJoinFetch(); - } - }; - } - - protected PropertyValueModel buildPrivateOwnableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected EclipseLinkPrivateOwned buildValue_() { - return ((EclipseLinkOneToOneMapping) this.subject).getPrivateOwned(); - } - }; - } - - protected PropertyValueModel buildOrphanRemovableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected OrphanRemovable2_0 buildValue_() { - return ((OrphanRemovalHolder2_0) this.subject).getOrphanRemoval(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsPage.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsPage.java deleted file mode 100644 index 881c486178..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsPage.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.orm.EntityMappings; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.AbstractEclipseLinkEntityMappingsDetailsPage; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.db.CatalogCombo; -import org.eclipse.jpt.ui.internal.details.db.SchemaCombo; -import org.eclipse.jpt.ui.internal.details.orm.EntityMappingsGeneratorsComposite; -import org.eclipse.jpt.ui.internal.details.orm.OrmPackageChooser; -import org.eclipse.jpt.ui.internal.details.orm.OrmQueriesComposite; -import org.eclipse.jpt.ui.internal.details.orm.PersistenceUnitMetadataComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.orm.EntityMappingsGenerators2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.orm.OrmQueries2_0Composite; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | XmlPackageChooser                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * |              ------------------------------------------------------------ |
- * | Schema:      | SchemaCombo                                              | |
- * |              ------------------------------------------------------------ |
- * |              ------------------------------------------------------------ |
- * | Catalog:     | CatalogCombo                                             | |
- * |              ------------------------------------------------------------ |
- * |              ------------------------------------------------------------ |
- * | Access Type: |                                                        |v| |
- * |              ------------------------------------------------------------ |
- * |                                                                           |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | PersistenceUnitMetadataComposite                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrmGeneratorsComposite                                                | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrmQueriesComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ConvertersComposite                                                   | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see EntityMappings - * @see EclipseLinkEntityMappings2_0DetailsPage - The parent container - * @see CatalogCombo - * @see EnumFormComboViewer - * @see EntityMappingsGeneratorsComposite - * @see OrmPackageChooser - * @see OrmQueriesComposite - * @see PersistenceUnitMetadataComposite - * @see SchemaCombo - * - * @version 2.2 - * @since 2.1 - */ -public class EclipseLinkEntityMappings2_0DetailsPage extends AbstractEclipseLinkEntityMappingsDetailsPage -{ - /** - * Creates a new EclipseLinkEntityMappingsDetailsPage. - * - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public EclipseLinkEntityMappings2_0DetailsPage(Composite parent, - WidgetFactory widgetFactory) { - - super(parent, widgetFactory); - } - - @Override - protected void buildEntityMappingsGeneratorsComposite(Composite container) { - new EntityMappingsGenerators2_0Composite( - this, - container - ); - } - - @Override - protected void buildOrmQueriesComposite(Composite container) { - new OrmQueries2_0Composite(this, container); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsProvider.java deleted file mode 100644 index d83c492116..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkEntityMappings2_0DetailsProvider.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.JpaStructureNode; -import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaDetailsPage; -import org.eclipse.jpt.ui.details.JpaDetailsProvider; -import org.eclipse.jpt.ui.internal.details.AbstractEntityMappingsDetailsProvider; -import org.eclipse.swt.widgets.Composite; - -/** - * This provider is responsible for creating the {@link JpaDetailsPage} - * when the information comes from the XML file (either from the persistence - * configuration or from the Mappings Descriptor). - * - * @version 2.2 - * @since 2.2 - */ -public class EclipseLinkEntityMappings2_0DetailsProvider - extends AbstractEntityMappingsDetailsProvider -{ - // singleton - private static final JpaDetailsProvider INSTANCE = new EclipseLinkEntityMappings2_0DetailsProvider(); - - - /** - * Return the singleton - */ - public static JpaDetailsProvider instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkEntityMappings2_0DetailsProvider() { - super(); - } - - - @Override - protected boolean providesDetails(JpaResourceType resourceType) { - return resourceType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_2_0_RESOURCE_TYPE); - } - - public JpaDetailsPage buildDetailsPage( - Composite parent, - WidgetFactory widgetFactory) { - - return new EclipseLinkEntityMappings2_0DetailsPage(parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiDefinition.java deleted file mode 100644 index 91602d28a0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiDefinition.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import java.util.List; -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.context.AttributeMapping; -import org.eclipse.jpt.core.context.TypeMapping; -import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkBasicCollectionMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkBasicMapMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkTransformationMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkVariableOneToOneMappingUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.structure.EclipseLinkOrmResourceModelStructureProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmAttributeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmTypeMappingUiDefinition; -import org.eclipse.jpt.ui.details.orm.OrmXmlUiFactory; -import org.eclipse.jpt.ui.internal.details.orm.AbstractOrmXmlResourceUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmBasicMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddableUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEmbeddedMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmEntityUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmIdMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmManyToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmMappedSuperclassUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToManyMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmOneToOneMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmTransientMappingUiDefinition; -import org.eclipse.jpt.ui.internal.details.orm.OrmVersionMappingUiDefinition; -import org.eclipse.jpt.ui.internal.jpa2.details.orm.OrmElementCollectionMapping2_0UiDefinition; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkOrmXml2_0UiDefinition extends AbstractOrmXmlResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLinkOrmXml2_0UiDefinition(); - - - /** - * Return the singleton - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkOrmXml2_0UiDefinition() { - super(); - } - - - @Override - protected OrmXmlUiFactory buildOrmXmlUiFactory() { - return new EclipseLinkOrmXml2_0UiFactory(); - } - - public boolean providesUi(JpaResourceType resourceType) { - return resourceType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_2_0_RESOURCE_TYPE); - } - - public JpaStructureProvider getStructureProvider() { - return EclipseLinkOrmResourceModelStructureProvider.instance(); - } - - @Override - protected void addOrmAttributeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmIdMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedIdMappingUiDefinition.instance()); - definitions.add(OrmBasicMappingUiDefinition.instance()); - definitions.add(OrmVersionMappingUiDefinition.instance()); - definitions.add(OrmManyToOneMappingUiDefinition.instance()); - definitions.add(OrmOneToManyMappingUiDefinition.instance()); - definitions.add(OrmOneToOneMappingUiDefinition.instance()); - definitions.add(OrmManyToManyMappingUiDefinition.instance()); - definitions.add(OrmEmbeddedMappingUiDefinition.instance()); - definitions.add(OrmTransientMappingUiDefinition.instance()); - - definitions.add(OrmEclipseLinkBasicCollectionMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkBasicMapMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkVariableOneToOneMappingUiDefinition.instance()); - definitions.add(OrmEclipseLinkTransformationMappingUiDefinition.instance()); - - definitions.add(OrmElementCollectionMapping2_0UiDefinition.instance()); - } - - @Override - protected void addOrmTypeMappingUiDefinitionsTo(List> definitions) { - definitions.add(OrmEntityUiDefinition.instance()); - definitions.add(OrmMappedSuperclassUiDefinition.instance()); - definitions.add(OrmEmbeddableUiDefinition.instance()); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiFactory.java deleted file mode 100644 index 4f2c1c9d37..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/EclipseLinkOrmXml2_0UiFactory.java +++ /dev/null @@ -1,140 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.orm.OrmBasicMapping; -import org.eclipse.jpt.core.context.orm.OrmEmbeddedIdMapping; -import org.eclipse.jpt.core.context.orm.OrmEmbeddedMapping; -import org.eclipse.jpt.core.context.orm.OrmEntity; -import org.eclipse.jpt.core.context.orm.OrmIdMapping; -import org.eclipse.jpt.core.context.orm.OrmManyToManyMapping; -import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping; -import org.eclipse.jpt.core.context.orm.OrmMappedSuperclass; -import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping; -import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping; -import org.eclipse.jpt.core.context.orm.OrmVersionMapping; -import org.eclipse.jpt.core.jpa2.context.orm.OrmElementCollectionMapping2_0; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.BaseEclipseLinkOrmXmlUiFactory; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.OrmEclipseLinkBasicMapping1_1Composite; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.OrmEclipseLinkEmbeddedIdMapping1_1Composite; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.OrmEclipseLinkVersionMapping1_1Composite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.orm.OrmElementCollectionMapping2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.orm.OrmEmbeddedMapping2_0Composite; -import org.eclipse.jpt.ui.jpa2.details.orm.OrmXmlUiFactory2_0; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLinkOrmXml2_0UiFactory - extends BaseEclipseLinkOrmXmlUiFactory - implements OrmXmlUiFactory2_0 -{ - @Override - public JpaComposite createOrmEntityComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkEntity2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmMappedSuperclassComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkMappedSuperclass2_0Composite(subjectHolder, parent, widgetFactory); - } - - // **************** orm attribute mapping composites *********************** - - @Override - public JpaComposite createOrmIdMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkIdMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmEmbeddedMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEmbeddedMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmEmbeddedIdMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkEmbeddedIdMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmBasicMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkBasicMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmVersionMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkVersionMapping1_1Composite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmManyToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkManyToOneMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmOneToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkOneToManyMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - @SuppressWarnings("unchecked") - public JpaComposite createOrmOneToOneMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkOneToOneMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - @Override - public JpaComposite createOrmManyToManyMappingComposite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmEclipseLinkManyToManyMapping2_0Composite(subjectHolder, parent, widgetFactory); - } - - public JpaComposite createOrmElementCollectionMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - return new OrmElementCollectionMapping2_0Composite(subjectHolder, parent, widgetFactory); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkCaching2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkCaching2_0Composite.java deleted file mode 100644 index afe63cb254..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkCaching2_0Composite.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkAlwaysRefreshComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheSizeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkCacheTypeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkDisableHitsComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkRefreshOnlyIfNewerComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.java.JavaEclipseLinkEntityComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.OrmEclipseLinkExistenceCheckingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.EclipseLinkCaching2_0Composite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * This pane shows the caching options. - *

- * Here the layout of this pane: - *

- * -----------------------------------------------------------------------------
- * | x Shared                                                                  |
- * |    CacheTypeComposite                                                     |
- * |    CacheSizeComposite                                                     |
- * |    > Advanced   	                                                       |
- * |    	ExpiryComposite                                                    |
- * |    	AlwaysRefreshComposite                                             |
- * |   		RefreshOnlyIfNewerComposite                                        |
- * |    	DisableHitsComposite                                               |
- * |    	CacheCoordinationComposite                                         |
- * | ExistenceTypeComposite                                                    |
- * -----------------------------------------------------------------------------
- * - * @see Entity - * @see EclipseLinkCaching - * @see JavaEclipseLinkEntityComposite - The parent container - * @see EclipseLinkCacheTypeComposite - * @see EclipseLinkCacheSizeComposite - * @see EclipseLinkAlwaysRefreshComposite - * @see EclipseLinkRefreshOnlyIfNewerComposite - * @see EclipseLinkDisableHitsComposite - * - * @version 3.0 - * @since 3.0 - */ -public class OrmEclipseLinkCaching2_0Composite extends EclipseLinkCaching2_0Composite -{ - - public OrmEclipseLinkCaching2_0Composite(FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeExistenceCheckingComposite(Composite parent) { - new OrmEclipseLinkExistenceCheckingComposite(this, parent); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkEntity2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkEntity2_0Composite.java deleted file mode 100644 index fad681ca3e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkEntity2_0Composite.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.GeneratorContainer; -import org.eclipse.jpt.core.context.QueryContainer; -import org.eclipse.jpt.core.context.orm.OrmEntity; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.AbstractOrmEclipseLinkEntityComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.jpa2.details.Entity2_0OverridesComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.Generation2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.Queries2_0Composite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkEntity2_0Composite extends AbstractOrmEclipseLinkEntityComposite -{ - public OrmEclipseLinkEntity2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void addAttributeOverridesComposite(Composite container) { - new Entity2_0OverridesComposite(this, container); - } - - @Override - protected void addGeneratorsComposite(Composite container, PropertyValueModel generatorContainerHolder) { - new Generation2_0Composite(this, generatorContainerHolder, container); - } - - @Override - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new OrmEclipseLinkCaching2_0Composite(this, cachingHolder, container); - } - - @Override - protected void addQueriesComposite(Composite container, PropertyValueModel queryContainerHolder) { - new Queries2_0Composite(this, queryContainerHolder, container); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkIdMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkIdMapping2_0Composite.java deleted file mode 100644 index 930e353cbc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkIdMapping2_0Composite.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.IdMapping; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.OrmEclipseLinkIdMapping1_1Composite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.ColumnComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.IdMappingGeneration2_0Composite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkIdMapping2_0Composite extends OrmEclipseLinkIdMapping1_1Composite -{ - /** - * Creates a new -public. - * - * @param subjectHolder The holder of the subject IdMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkIdMapping2_0Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - // Column widgets - new ColumnComposite(this, buildColumnHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), container); - - initializeTypePane(container); - - // Generation pane - new IdMappingGeneration2_0Composite(this, addSubPane(container, 10)); - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToManyMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToManyMapping2_0Composite.java deleted file mode 100644 index 416e4a2b12..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToManyMapping2_0Composite.java +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.ManyToManyMapping; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkManyToManyMappingComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.ManyToManyJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OrderingComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | JoiningStrategyComposite                                              | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrderingComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link ManyToManyMapping} - * @see {@link TargetEntityComposite} - * @see {@link ManyToManyJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link CascadeComposite} - * @see {@link OrderingComposite} - * - * @version 2.2 - * @since 2.2 - */ -public class OrmEclipseLinkManyToManyMapping2_0Composite extends EclipseLinkManyToManyMappingComposite -{ - /** - * Creates a new ManyToManyMappingComposite. - * - * @param subjectHolder The holder of the subject IManyToManyMapping - * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets - */ - public OrmEclipseLinkManyToManyMapping2_0Composite(PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new ManyToManyJoiningStrategyPane(this, buildJoiningHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - new OrderingComposite(this, container); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToOneMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToOneMapping2_0Composite.java deleted file mode 100644 index a97de06555..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkManyToOneMapping2_0Composite.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneMapping2_0; -import org.eclipse.jpt.core.jpa2.context.orm.OrmManyToOneMapping2_0; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.ManyToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.AbstractManyToOneMapping2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.DerivedId2_0Pane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | DerivedId2_0Pane                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | ManyToOneJoiningStrategyPane                                          | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link JavaManyToOneMapping2_0} - * @see {@link TargetEntityComposite} - * @see {@link DerivedId2_0Pane} - * @see {@link ManyToOneJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link OptionalComposite} - * @see {@link CascadeComposite} - */ -public class OrmEclipseLinkManyToOneMapping2_0Composite - extends AbstractManyToOneMapping2_0Composite -{ - public OrmEclipseLinkManyToOneMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new DerivedId2_0Pane(this, buildDerivedIdHolder(), addPane(container, groupBoxMargin)); - new ManyToOneJoiningStrategyPane(this, buildJoiningHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new OptionalComposite(this, addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkMappedSuperclass2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkMappedSuperclass2_0Composite.java deleted file mode 100644 index b61cef7628..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkMappedSuperclass2_0Composite.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkCaching; -import org.eclipse.jpt.eclipselink.core.context.orm.OrmEclipseLinkMappedSuperclass; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.AbstractOrmEclipseLinkMappedSuperclassComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class OrmEclipseLinkMappedSuperclass2_0Composite extends AbstractOrmEclipseLinkMappedSuperclassComposite -{ - public OrmEclipseLinkMappedSuperclass2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void addCachingComposite(Composite container, PropertyValueModel cachingHolder) { - new OrmEclipseLinkCaching2_0Composite(this, cachingHolder, container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToManyMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToManyMapping2_0Composite.java deleted file mode 100644 index ae6eae0407..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToManyMapping2_0Composite.java +++ /dev/null @@ -1,138 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.OneToManyMapping; -import org.eclipse.jpt.core.jpa2.context.OrphanRemovable2_0; -import org.eclipse.jpt.core.jpa2.context.OrphanRemovalHolder2_0; -import org.eclipse.jpt.eclipselink.core.v2_0.context.EclipseLinkOneToManyMapping2_0; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToManyJoiningStrategyPane; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkOneToManyMappingComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkPrivateOwnedComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OrderingComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.Ordering2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.OrphanRemoval2_0Composite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkOneToManyJoiningStrategyPane                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | AccessTypeComposite                                                | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkJoinFetchComposite                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | EclipseLinkPrivateOwnedComposite                                | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrphanRemoval2_0Composite                                       | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OrderingComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see OneToManyMapping - * @see TargetEntityComposite - * @see EclipseLinkOneToManyJoiningStrategyPane - * @see AccessTypeComposite - * @see FetchTypeComposite - * @see EclipseLinkJoinFetchComposite - * @see EclipseLinkPrivateOwnedComposite - * @see OrphanRemoval2_0Composite - * @see CascadeComposite - * @see OrderingComposite - */ -public class OrmEclipseLinkOneToManyMapping2_0Composite - extends EclipseLinkOneToManyMappingComposite -{ - public OrmEclipseLinkOneToManyMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = this.getGroupBoxMargin(); - - new TargetEntityComposite(this, this.addPane(container, groupBoxMargin)); - new EclipseLinkOneToManyJoiningStrategyPane(this, this.buildJoiningHolder(), container); - new AccessTypeComposite(this, this.buildAccessHolderHolder(), this.addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, this.addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, this.buildJoinFetchableHolder(), this.addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, this.buildPrivateOwnableHolder(), this.addPane(container, groupBoxMargin)); - new OrphanRemoval2_0Composite(this, this.buildOrphanRemovableHolder(), this.addPane(container, groupBoxMargin)); - new CascadeComposite(this, this.buildCascadeHolder(), this.addSubPane(container, 5)); - new Ordering2_0Composite(this, container); - } - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } - - protected PropertyValueModel buildOrphanRemovableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected OrphanRemovable2_0 buildValue_() { - return ((OrphanRemovalHolder2_0) this.subject).getOrphanRemoval(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToOneMapping2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToOneMapping2_0Composite.java deleted file mode 100644 index 5b530e1683..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/details/orm/OrmEclipseLinkOneToOneMapping2_0Composite.java +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm; - -import org.eclipse.jpt.core.context.AccessHolder; -import org.eclipse.jpt.core.context.OneToOneMapping; -import org.eclipse.jpt.core.jpa2.context.OrphanRemovable2_0; -import org.eclipse.jpt.core.jpa2.context.OrphanRemovalHolder2_0; -import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneMapping2_0; -import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToOneMapping2_0; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkJoinFetch; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToOneMapping; -import org.eclipse.jpt.eclipselink.core.context.EclipseLinkPrivateOwned; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkJoinFetchComposite; -import org.eclipse.jpt.eclipselink.ui.internal.details.EclipseLinkPrivateOwnedComposite; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.details.AccessTypeComposite; -import org.eclipse.jpt.ui.internal.details.CascadeComposite; -import org.eclipse.jpt.ui.internal.details.FetchTypeComposite; -import org.eclipse.jpt.ui.internal.details.OneToOneJoiningStrategyPane; -import org.eclipse.jpt.ui.internal.details.OptionalComposite; -import org.eclipse.jpt.ui.internal.details.TargetEntityComposite; -import org.eclipse.jpt.ui.internal.jpa2.details.AbstractOneToOneMapping2_0Composite; -import org.eclipse.jpt.ui.internal.jpa2.details.DerivedId2_0Pane; -import org.eclipse.jpt.ui.internal.jpa2.details.OrphanRemoval2_0Composite; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * Here the layout of this pane: - *
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | TargetEntityComposite                                                 | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | DerivedId2_0Pane                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OneToOneJoiningStrategyPane                                           | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | FetchTypeComposite                                                    | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | OptionalComposite                                                     | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | |                                                                       | |
- * | | CascadeComposite                                                      | |
- * | |                                                                       | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------
- * - * @see {@link JavaOneToOneMapping2_0} - * @see {@link TargetEntityComposite} - * @see {@link DerivedId2_0Pane} - * @see {@link OneToOneJoiningStrategyPane} - * @see {@link FetchTypeComposite} - * @see {@link OptionalComposite} - * @see {@link CascadeComposite} - */ -public class OrmEclipseLinkOneToOneMapping2_0Composite - extends AbstractOneToOneMapping2_0Composite -{ - public OrmEclipseLinkOneToOneMapping2_0Composite( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - - @Override - protected void initializeLayout(Composite container) { - int groupBoxMargin = getGroupBoxMargin(); - - - new TargetEntityComposite(this, addPane(container, groupBoxMargin)); - new DerivedId2_0Pane(this, buildDerivedIdHolder(), addPane(container, groupBoxMargin)); - new OneToOneJoiningStrategyPane(this, buildJoiningHolder(), container); - new AccessTypeComposite(this, buildAccessHolderHolder(), addPane(container, groupBoxMargin)); - new FetchTypeComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkJoinFetchComposite(this, buildJoinFetchableHolder(), addPane(container, groupBoxMargin)); - new OptionalComposite(this, addPane(container, groupBoxMargin)); - new EclipseLinkPrivateOwnedComposite(this, buildPrivateOwnableHolder(), addPane(container, groupBoxMargin)); - new OrphanRemoval2_0Composite(this, this.buildOrphanRemovableHolder(), this.addPane(container, groupBoxMargin)); - new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); - } - - - protected PropertyValueModel buildAccessHolderHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected AccessHolder buildValue_() { - return this.subject.getPersistentAttribute(); - } - }; - } - - protected PropertyValueModel buildJoinFetchableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkJoinFetch buildValue_() { - return ((EclipseLinkOneToOneMapping) this.subject).getJoinFetch(); - } - }; - } - - protected PropertyValueModel buildPrivateOwnableHolder() { - return new PropertyAspectAdapter(getSubjectHolder()) { - @Override - protected EclipseLinkPrivateOwned buildValue_() { - return ((EclipseLinkOneToOneMapping) this.subject).getPrivateOwned(); - } - }; - } - - protected PropertyValueModel buildOrphanRemovableHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected OrphanRemovable2_0 buildValue_() { - return ((OrphanRemovalHolder2_0) this.subject).getOrphanRemoval(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLink2_0PersistenceXmlUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLink2_0PersistenceXmlUiFactory.java deleted file mode 100644 index 6afec0f82f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLink2_0PersistenceXmlUiFactory.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence; - -import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceUnit; -import org.eclipse.jpt.eclipselink.core.v2_0.context.persistence.options.Options2_0; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.EclipseLinkPersistenceXmlUiFactory; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.PersistenceXmlCachingTab; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.options.PersistenceXmlOptionsTab; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.caching.PersistenceXmlCaching2_0Tab; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options.PersistenceXmlOptions2_0Tab; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -public class EclipseLink2_0PersistenceXmlUiFactory extends EclipseLinkPersistenceXmlUiFactory -{ - // ********** constructors ********** - - public EclipseLink2_0PersistenceXmlUiFactory() { - super(); - } - - // ********** persistence unit tabs ********** - - @Override - protected PersistenceXmlCachingTab buildCachingTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel cachingHolder = this.buildCachingHolder(subjectHolder); - - return new PersistenceXmlCaching2_0Tab(cachingHolder, parent, widgetFactory); - } - - @Override - protected PersistenceXmlOptionsTab buildOptionsTab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - PropertyValueModel options2_0Holder = this.buildOptions2_0Holder(subjectHolder); - - return new PersistenceXmlOptions2_0Tab(options2_0Holder, parent, widgetFactory); - } - - // ********** private methods ********** - - private PropertyValueModel buildOptions2_0Holder( - PropertyValueModel subjectHolder) { - return new TransformationPropertyValueModel(subjectHolder) { - @Override - protected Options2_0 transform_(PersistenceUnit value) { - - return (Options2_0) ((PersistenceUnit2_0)value).getOptions(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_0UiDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_0UiDefinition.java deleted file mode 100644 index 6651bd1d1b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_0UiDefinition.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence; - -import org.eclipse.jpt.core.JpaResourceType; -import org.eclipse.jpt.core.JptCorePlugin; -import org.eclipse.jpt.eclipselink.ui.internal.structure.EclipseLinkPersistenceResourceModelStructureProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.internal.persistence.details.AbstractPersistenceXmlResourceUiDefinition; -import org.eclipse.jpt.ui.internal.persistence.details.PersistenceXmlUiFactory; -import org.eclipse.jpt.ui.structure.JpaStructureProvider; - -public class EclipseLinkPersistenceXml2_0UiDefinition extends AbstractPersistenceXmlResourceUiDefinition -{ - // singleton - private static final ResourceUiDefinition INSTANCE = new EclipseLinkPersistenceXml2_0UiDefinition(); - - - /** - * Return the singleton - */ - public static ResourceUiDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private EclipseLinkPersistenceXml2_0UiDefinition() { - super(); - } - - - @Override - protected PersistenceXmlUiFactory buildPersistenceXmlUiFactory() { - return new EclipseLink2_0PersistenceXmlUiFactory(); - } - - public boolean providesUi(JpaResourceType resourceType) { - return resourceType.equals(JptCorePlugin.PERSISTENCE_XML_2_0_RESOURCE_TYPE); - } - - public JpaStructureProvider getStructureProvider() { - return EclipseLinkPersistenceResourceModelStructureProvider.instance(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java deleted file mode 100644 index a1954dd065..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.caching; - -import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0; -import org.eclipse.jpt.core.jpa2.context.persistence.options.SharedCacheMode; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.CacheDefaultsComposite; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.DefaultCacheSizeComposite; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.DefaultCacheTypeComposite; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * CacheDefaults2_0Composite - */ -public class CacheDefaults2_0Composite extends CacheDefaultsComposite -{ - public CacheDefaults2_0Composite(FormPane subjectHolder, - Composite container) { - - super(subjectHolder, container); - } - - @Override - protected void initializeLayout(Composite parent) { - super.initializeLayout(parent); - - this.installPaneEnabler(); - } - - @Override - protected void initializeCacheDefaultsComposites(Composite parent) { - - // Default Cache Type - new DefaultCacheTypeComposite(this, parent); - - // Default Cache Size - new DefaultCacheSizeComposite(this, parent); - - } - - // ********** private methods ********** - - private void installPaneEnabler() { - new PaneEnabler(this.buildPaneEnablerHolder(), this); - } - - private PropertyValueModel buildPaneEnablerHolder() { - return new TransformationPropertyValueModel(this.buildSharedCacheModeHolder()) { - @Override - protected Boolean transform(SharedCacheMode value) { - return value != SharedCacheMode.NONE; - } - }; - } - - private PropertyValueModel buildSharedCacheModeHolder() { - return new PropertyAspectAdapter( - this.buildPersistenceUnit2_0Holder(), - PersistenceUnit2_0.SPECIFIED_SHARED_CACHE_MODE_PROPERTY, - PersistenceUnit2_0.DEFAULT_SHARED_CACHE_MODE_PROPERTY) { - @Override - protected SharedCacheMode buildValue_() { - return this.subject.getSharedCacheMode(); - } - }; - } - - private PropertyValueModel buildPersistenceUnit2_0Holder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected PersistenceUnit2_0 buildValue_() { - return (PersistenceUnit2_0) this.subject.getPersistenceUnit(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java deleted file mode 100644 index c987faa430..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.caching; - -import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.EclipseLinkCachingComposite; -import org.eclipse.jpt.ui.internal.jpa2.persistence.options.SharedCacheModeComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLinkCaching2_0Composite - */ -public class EclipseLinkCaching2_0Composite extends EclipseLinkCachingComposite -{ - public EclipseLinkCaching2_0Composite( - FormPane subjectHolder, - Composite container) { - super(subjectHolder, container); - } - - @Override - protected void initializeLayout(Composite parent) { - - Composite container = this.addSection( - parent, - EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionTitle, - EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionDescription - ); - - // SharedCacheMode - new SharedCacheModeComposite(this, this.buildPersistenceUnit2_0Holder(), container); - // Defaults - new CacheDefaults2_0Composite(this, container); - // Flush Clear Cache - new FlushClearCache2_0Composite(this, container); - } - - private PropertyValueModel buildPersistenceUnit2_0Holder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected PersistenceUnit2_0 buildValue_() { - return (PersistenceUnit2_0) this.subject.getPersistenceUnit(); - } - }; - } - -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/FlushClearCache2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/FlushClearCache2_0Composite.java deleted file mode 100644 index 1348f8f8d0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/FlushClearCache2_0Composite.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.caching; - -import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0; -import org.eclipse.jpt.core.jpa2.context.persistence.options.SharedCacheMode; -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.FlushClearCacheComposite; -import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * FlushClearCache2_0Composite - */ -public class FlushClearCache2_0Composite extends FlushClearCacheComposite -{ - /** - * Creates a new FlushClearCache2_0Composite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public FlushClearCache2_0Composite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite parent) { - super.initializeLayout(parent); - - this.installPaneEnabler(); - } - - // ********** private methods ********** - - private void installPaneEnabler() { - new PaneEnabler(this.buildPaneEnablerHolder(), this); - } - - private PropertyValueModel buildPaneEnablerHolder() { - return new TransformationPropertyValueModel(this.buildSharedCacheModeHolder()) { - @Override - protected Boolean transform(SharedCacheMode value) { - return value != SharedCacheMode.NONE; - } - }; - } - - private PropertyValueModel buildSharedCacheModeHolder() { - return new PropertyAspectAdapter( - this.buildPersistenceUnit2_0Holder(), - PersistenceUnit2_0.SPECIFIED_SHARED_CACHE_MODE_PROPERTY, - PersistenceUnit2_0.DEFAULT_SHARED_CACHE_MODE_PROPERTY) { - @Override - protected SharedCacheMode buildValue_() { - return this.subject.getSharedCacheMode(); - } - }; - } - - private PropertyValueModel buildPersistenceUnit2_0Holder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected PersistenceUnit2_0 buildValue_() { - return (PersistenceUnit2_0) this.subject.getPersistenceUnit(); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/PersistenceXmlCaching2_0Tab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/PersistenceXmlCaching2_0Tab.java deleted file mode 100644 index 6d2447bc0a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/PersistenceXmlCaching2_0Tab.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.caching; - -import org.eclipse.jpt.eclipselink.core.context.persistence.caching.Caching; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.caching.PersistenceXmlCachingTab; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlCaching2_0Tab - */ -public class PersistenceXmlCaching2_0Tab extends PersistenceXmlCachingTab -{ - public PersistenceXmlCaching2_0Tab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - - new EclipseLinkCaching2_0Composite(this, container); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/EclipseLinkOptions2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/EclipseLinkOptions2_0Composite.java deleted file mode 100644 index 06508b7b45..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/EclipseLinkOptions2_0Composite.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options; - -import org.eclipse.jpt.eclipselink.core.v2_0.context.persistence.options.Options2_0; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.options.EclipseLinkOptionsComposite; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.swt.widgets.Composite; - -/** - * EclipseLinkOptions2_0Composite - */ -public class EclipseLinkOptions2_0Composite extends EclipseLinkOptionsComposite -{ - public EclipseLinkOptions2_0Composite( - FormPane subjectHolder, - Composite container) { - super(subjectHolder, container); - } - - @Override - protected Composite initializeMiscellaneousPane(Composite container) { - Composite composite = super.initializeMiscellaneousPane(container); - - new LockingConfigurationComposite(this, composite); - new QueryConfigurationComposite(this, composite); - new ValidationConfigurationComposite(this, composite); - return composite; - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/LockingConfigurationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/LockingConfigurationComposite.java deleted file mode 100644 index 91a658c53e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/LockingConfigurationComposite.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options; - -import org.eclipse.jpt.eclipselink.core.v2_0.context.persistence.options.Options2_0; -import org.eclipse.jpt.ui.internal.jpa2.Jpt2_0UiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * LockingConfigurationComposite - */ -public class LockingConfigurationComposite extends FormPane -{ - /** - * Creates a new LockingConfigurationComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public LockingConfigurationComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - addLockTimeoutCombo(container); - } - - private void addLockTimeoutCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return Jpt2_0UiMessages.LockingConfigurationComposite_lockTimeoutLabel; - } - - @Override - protected String getHelpId() { - return null; // TODO - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultLockTimeout(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options2_0.LOCK_TIMEOUT_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getLockTimeout(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setLockTimeout(value); - } - }; - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/PersistenceXmlOptions2_0Tab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/PersistenceXmlOptions2_0Tab.java deleted file mode 100644 index f6637b82ca..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/PersistenceXmlOptions2_0Tab.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options; - -import org.eclipse.jpt.eclipselink.core.v2_0.context.persistence.options.Options2_0; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.options.PersistenceXmlOptionsTab; -import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * PersistenceXmlOptions2_0Tab - */ -public class PersistenceXmlOptions2_0Tab extends PersistenceXmlOptionsTab -{ - // ********** constructors/initialization ********** - public PersistenceXmlOptions2_0Tab( - PropertyValueModel subjectHolder, - Composite parent, - WidgetFactory widgetFactory) { - - super(subjectHolder, parent, widgetFactory); - } - - @Override - protected void initializeLayout(Composite container) { - new EclipseLinkOptions2_0Composite(this, container); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/QueryConfigurationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/QueryConfigurationComposite.java deleted file mode 100644 index 3bb3bb1c91..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/QueryConfigurationComposite.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options; - -import org.eclipse.jpt.eclipselink.core.v2_0.context.persistence.options.Options2_0; -import org.eclipse.jpt.ui.internal.jpa2.Jpt2_0UiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.ui.internal.widgets.IntegerCombo; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * QueryConfigurationComposite - */ -public class QueryConfigurationComposite extends FormPane -{ - /** - * Creates a new QueryConfigurationComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public QueryConfigurationComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite container) { - this.addQueryTimeoutCombo(container); - } - - private void addQueryTimeoutCombo(Composite container) { - new IntegerCombo(this, container) { - - @Override - protected String getLabelText() { - return Jpt2_0UiMessages.QueryConfigurationComposite_queryTimeoutLabel; - } - - @Override - protected String getHelpId() { - return null; // TODO - } - - @Override - protected PropertyValueModel buildDefaultHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder()) { - @Override - protected Integer buildValue_() { - return this.subject.getDefaultQueryTimeout(); - } - }; - } - - @Override - protected WritablePropertyValueModel buildSelectedItemHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options2_0.QUERY_TIMEOUT_PROPERTY) { - @Override - protected Integer buildValue_() { - return this.subject.getQueryTimeout(); - } - - @Override - protected void setValue_(Integer value) { - this.subject.setQueryTimeout(value); - } - }; - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationConfigurationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationConfigurationComposite.java deleted file mode 100644 index 745bf9ae2e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationConfigurationComposite.java +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options; - -import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0; -import org.eclipse.jpt.eclipselink.core.v2_0.context.persistence.options.Options2_0; -import org.eclipse.jpt.ui.internal.jpa2.Jpt2_0UiMessages; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; -import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * ValidationConfigurationComposite - */ -public class ValidationConfigurationComposite extends FormPane -{ - /** - * Creates a new ValidationGroupComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public ValidationConfigurationComposite( - FormPane parentComposite, - Composite parent) { - - super(parentComposite, parent); - } - - @Override - protected void initializeLayout(Composite parent) { - - // ValidationMode - new ValidationModeComposite(this, this.buildPersistenceUnit2_0Holder(), parent); - - // GroupPrePersist - this.addLabeledText( - parent, - Jpt2_0UiMessages.ValidationConfigurationComposite_groupPrePersistLabel, - this.buildValidationGroupPrePersistHolder() - ); - - // ValidationGroupPreUpdate - this.addLabeledText( - parent, - Jpt2_0UiMessages.ValidationConfigurationComposite_groupPreUpdateLabel, - this.buildValidationGroupPreUpdateHolder() - ); - - // ValidationGroupPreRemove - this.addLabeledText( - parent, - Jpt2_0UiMessages.ValidationConfigurationComposite_groupPreRemoveLabel, - this.buildValidationGroupPreRemoveHolder() - ); - } - - private PropertyValueModel buildPersistenceUnit2_0Holder() { - return new TransformationPropertyValueModel(this.getSubjectHolder()) { - @Override - protected PersistenceUnit2_0 transform_(Options2_0 value) { - return (PersistenceUnit2_0) value.getPersistenceUnit(); - } - }; - } - - private WritablePropertyValueModel buildValidationGroupPrePersistHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options2_0.VALIDATION_GROUP_PRE_PERSIST_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getValidationGroupPrePersist(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setValidationGroupPrePersist(value); - } - }; - } - - private WritablePropertyValueModel buildValidationGroupPreUpdateHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options2_0.VALIDATION_GROUP_PRE_UPDATE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getValidationGroupPreUpdate(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setValidationGroupPreUpdate(value); - } - }; - } - - private WritablePropertyValueModel buildValidationGroupPreRemoveHolder() { - return new PropertyAspectAdapter(this.getSubjectHolder(), Options2_0.VALIDATION_GROUP_PRE_REMOVE_PROPERTY) { - @Override - protected String buildValue_() { - return this.subject.getValidationGroupPreRemove(); - } - - @Override - protected void setValue_(String value) { - if (value.length() == 0) { - value = null; - } - this.subject.setValidationGroupPreRemove(value); - } - }; - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationModeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationModeComposite.java deleted file mode 100644 index e0aec4a6dc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/options/ValidationModeComposite.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.options; - -import java.util.Collection; - -import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0; -import org.eclipse.jpt.core.jpa2.context.persistence.options.ValidationMode; -import org.eclipse.jpt.ui.internal.jpa2.Jpt2_0UiMessages; -import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; -import org.eclipse.jpt.ui.internal.widgets.FormPane; -import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; - -/** - * ValidationModeComposite - */ -public class ValidationModeComposite extends FormPane -{ - /** - * Creates a new ValidationModeComposite. - * - * @param parentController - * The parent container of this one - * @param parent - * The parent container - */ - public ValidationModeComposite( - FormPane parentPane, - PropertyValueModel subjectHolder, - Composite parent) { - - super(parentPane, subjectHolder, parent); - } - - @Override - protected void initializeLayout(Composite parent) { - this.addLabeledComposite( - parent, - Jpt2_0UiMessages.ValidationModeComposite_validationModeLabel, - this.addValidationModeCombo(parent), - null // TODO - ); - } - - private EnumFormComboViewer addValidationModeCombo(Composite parent) { - - return new EnumFormComboViewer(this, this.getSubjectHolder(), parent) { - @Override - protected void addPropertyNames(Collection propertyNames) { - super.addPropertyNames(propertyNames); - propertyNames.add(PersistenceUnit2_0.SPECIFIED_VALIDATION_MODE_PROPERTY); - } - - @Override - protected ValidationMode[] getChoices() { - return ValidationMode.values(); - } - - @Override - protected boolean sortChoices() { - return false; - } - - @Override - protected ValidationMode getDefaultValue() { - return this.getSubject().getDefaultValidationMode(); - } - - @Override - protected String displayString(ValidationMode value) { - return this.buildDisplayString(Jpt2_0UiMessages.class, ValidationModeComposite.this, value); - } - - @Override - protected ValidationMode getValue() { - return this.getSubject().getSpecifiedValidationMode(); - } - - @Override - protected void setValue(ValidationMode value) { - this.getSubject().setSpecifiedValidationMode(value); - } - }; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiFactory.java deleted file mode 100644 index 4d70c2c8b5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.platform; - -import org.eclipse.jpt.eclipselink.ui.internal.platform.EclipseLinkJpaPlatformUi; -import org.eclipse.jpt.eclipselink.ui.internal.platform.EclipseLinkNavigatorProvider; -import org.eclipse.jpt.ui.JpaPlatformUi; -import org.eclipse.jpt.ui.JpaPlatformUiFactory; - -/** - * EclipseLink2_0JpaPlatformUiFactory - */ -public class EclipseLink2_0JpaPlatformUiFactory implements JpaPlatformUiFactory -{ - - /** - * Zero arg constructor for extension point - */ - public EclipseLink2_0JpaPlatformUiFactory() { - super(); - } - - public JpaPlatformUi buildJpaPlatformUi() { - return new EclipseLinkJpaPlatformUi( - new EclipseLinkNavigatorProvider(), - EclipseLink2_0JpaPlatformUiProvider.instance() - ); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiProvider.java deleted file mode 100644 index a0af4c0d3c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/platform/EclipseLink2_0JpaPlatformUiProvider.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.v2_0.platform; - -import java.util.List; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkEntityMappingsDetailsProvider; -import org.eclipse.jpt.eclipselink.ui.internal.details.orm.EclipseLinkOrmXmlUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.persistence.EclipseLinkPersistenceXmlUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v1_1.details.orm.EclipseLinkOrmXml1_1UiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v1_2.details.orm.EclipseLinkOrmXml1_2UiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.java.EclipseLink2_0JavaResourceUiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm.EclipseLinkEntityMappings2_0DetailsProvider; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.details.orm.EclipseLinkOrmXml2_0UiDefinition; -import org.eclipse.jpt.eclipselink.ui.internal.v2_0.persistence.EclipseLinkPersistenceXml2_0UiDefinition; -import org.eclipse.jpt.ui.JpaPlatformUiProvider; -import org.eclipse.jpt.ui.ResourceUiDefinition; -import org.eclipse.jpt.ui.details.JpaDetailsProvider; -import org.eclipse.jpt.ui.internal.AbstractJpaPlatformUiProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.java.JavaPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.EntityMappingsDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentAttributeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmPersistentTypeDetailsProvider; -import org.eclipse.jpt.ui.internal.details.orm.OrmXmlUiDefinition; -import org.eclipse.jpt.ui.internal.jpa2.details.orm.EntityMappings2_0DetailsProvider; -import org.eclipse.jpt.ui.internal.jpa2.details.orm.OrmXml2_0UiDefinition; - -/** - * EclipseLink2_0JpaPlatformUiProvider - */ -public class EclipseLink2_0JpaPlatformUiProvider extends AbstractJpaPlatformUiProvider -{ - - // singleton - private static final JpaPlatformUiProvider INSTANCE = new EclipseLink2_0JpaPlatformUiProvider(); - - /** - * Return the singleton. - */ - public static JpaPlatformUiProvider instance() { - return INSTANCE; - } - - /** - * Ensure single instance. - */ - private EclipseLink2_0JpaPlatformUiProvider() { - super(); - } - - - // ********** details providers ********** - - @Override - protected void addDetailsProvidersTo(List providers) { - providers.add(JavaPersistentTypeDetailsProvider.instance()); - providers.add(JavaPersistentAttributeDetailsProvider.instance()); - providers.add(EntityMappingsDetailsProvider.instance()); - providers.add(OrmPersistentTypeDetailsProvider.instance()); - providers.add(OrmPersistentAttributeDetailsProvider.instance()); - providers.add(EntityMappings2_0DetailsProvider.instance()); - providers.add(EclipseLinkEntityMappingsDetailsProvider.instance()); - providers.add(EclipseLinkEntityMappings2_0DetailsProvider.instance()); - } - - // ********** resource ui definitions ********** - - @Override - protected void addResourceUiDefinitionsTo(List definitions) { - definitions.add(EclipseLink2_0JavaResourceUiDefinition.instance()); - definitions.add(OrmXmlUiDefinition.instance()); - definitions.add(OrmXml2_0UiDefinition.instance()); - definitions.add(EclipseLinkOrmXmlUiDefinition.instance()); - definitions.add(EclipseLinkOrmXml1_1UiDefinition.instance()); - definitions.add(EclipseLinkOrmXml1_2UiDefinition.instance()); - definitions.add(EclipseLinkOrmXml2_0UiDefinition.instance()); - definitions.add(EclipseLinkPersistenceXmlUiDefinition.instance()); - definitions.add(EclipseLinkPersistenceXml2_0UiDefinition.instance()); - } -} \ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizard.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizard.java deleted file mode 100644 index ce9e1172fa..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizard.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.wizards; - -import org.eclipse.jpt.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider; -import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.wizards.orm.MappingFileWizard; -import org.eclipse.jpt.ui.internal.wizards.orm.MappingFileWizardPage; -import org.eclipse.ui.INewWizard; -import org.eclipse.wst.common.frameworks.datamodel.IDataModel; -import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider; - -/** - * This is referenced in the plugin.xml as an org.eclipse.ui.newWizards extension - */ -public class EclipseLinkMappingFileWizard extends MappingFileWizard - implements INewWizard -{ - public EclipseLinkMappingFileWizard() { - this(null); - } - - public EclipseLinkMappingFileWizard(IDataModel dataModel) { - super(dataModel); - setWindowTitle(EclipseLinkUiMessages.MappingFileWizard_title); - } - - - @Override - protected MappingFileWizardPage buildMappingFileWizardPage() { - return new EclipseLinkMappingFileWizardPage(getDataModel(), "Page_1", EclipseLinkUiMessages.MappingFileWizardPage_title, EclipseLinkUiMessages.MappingFileWizardPage_desc); - } - - @Override - protected IDataModelProvider getDefaultProvider() { - return new EclipseLinkOrmFileCreationDataModelProvider(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizardPage.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizardPage.java deleted file mode 100644 index 5f168cd5ed..0000000000 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/wizards/EclipseLinkMappingFileWizardPage.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.wizards; - -import org.eclipse.jpt.ui.internal.wizards.orm.MappingFileWizardPage; -import org.eclipse.wst.common.frameworks.datamodel.IDataModel; - -public class EclipseLinkMappingFileWizardPage extends MappingFileWizardPage -{ - public EclipseLinkMappingFileWizardPage(IDataModel dataModel, String pageName, String title, String desc) { - super(dataModel, pageName); - setTitle(title); - setDescription(desc); - setPageComplete(false); - } -} -- cgit v1.2.3