diff options
author | tle | 2008-04-07 16:47:43 +0000 |
---|---|---|
committer | tle | 2008-04-07 16:47:43 +0000 |
commit | c9917e482233b34c24e0cf62364de1967384ac09 (patch) | |
tree | a5f6bc603c2470c24ed0ba13346d0351416e1b0e /jpa/plugins | |
parent | 0048aca897f0d93f72c930ef801b43eafe5656f6 (diff) | |
download | webtools.dali-c9917e482233b34c24e0cf62364de1967384ac09.tar.gz webtools.dali-c9917e482233b34c24e0cf62364de1967384ac09.tar.xz webtools.dali-c9917e482233b34c24e0cf62364de1967384ac09.zip |
Added Logging properties.
Diffstat (limited to 'jpa/plugins')
7 files changed, 122 insertions, 60 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.eclipselink.core/META-INF/MANIFEST.MF index 8be2537d07..a13aad657c 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/META-INF/MANIFEST.MF +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/META-INF/MANIFEST.MF @@ -16,5 +16,6 @@ Export-Package: org.eclipse.jpt.eclipselink.core.internal;x-friends:="org.eclips org.eclipse.jpt.eclipselink.core.internal.context;x-friends:="org.eclipse.jpt.eclipselink.ui,org.eclipse.jpt.eclipselink.core.tests", org.eclipse.jpt.eclipselink.core.internal.context.caching, org.eclipse.jpt.eclipselink.core.internal.context.customization, + org.eclipse.jpt.eclipselink.core.internal.context.logging, org.eclipse.jpt.eclipselink.core.internal.context.schema.generation Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkJpaProperties.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkJpaProperties.java index 204c029698..539a178524 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkJpaProperties.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkJpaProperties.java @@ -17,6 +17,8 @@ import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.core.internal.context.caching.EclipseLinkCaching; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.EclipseLinkCustomization; +import org.eclipse.jpt.eclipselink.core.internal.context.logging.EclipseLinkLogging; +import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.EclipseLinkSchemaGeneration; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.utility.internal.model.AbstractModel; @@ -35,11 +37,11 @@ public class EclipseLinkJpaProperties extends AbstractModel { private PersistenceUnit persistenceUnit; - private SchemaGeneration schemaGeneration; private Caching caching; private Customization customization; - - // private Logging logging; + private Logging logging; + private SchemaGeneration schemaGeneration; + private ListValueModel<Property> propertiesAdapter; private ListValueModel<Property> propertyListAdapter; @@ -57,11 +59,10 @@ public class EclipseLinkJpaProperties extends AbstractModel this.propertiesAdapter = this.buildPropertiesAdapter(persistenceUnitHolder); this.propertyListAdapter = this.buildPropertyListAdapter(this.propertiesAdapter); - this.schemaGeneration = this.buildSchemaGeneration(); this.caching = this.buildCaching(); this.customization = this.buildCustomization(); - // TODO - // this.logging = this.buildLogging(); + this.logging = this.buildLogging(); + this.schemaGeneration = this.buildSchemaGeneration(); } private ListValueModel<Property> buildPropertyListAdapter(ListValueModel<Property> propertiesAdapter) { @@ -82,10 +83,6 @@ public class EclipseLinkJpaProperties extends AbstractModel }; } - private SchemaGeneration buildSchemaGeneration() { - return new EclipseLinkSchemaGeneration(this.persistenceUnit(), this.propertyListAdapter()); - } - private Caching buildCaching() { return new EclipseLinkCaching(this.persistenceUnit(), this.propertyListAdapter()); } @@ -94,16 +91,15 @@ public class EclipseLinkJpaProperties extends AbstractModel return new EclipseLinkCustomization(this.persistenceUnit(), this.propertyListAdapter()); } - // TODO - // private Logging buildLogging() { - // return new EclipseLinkLogging( this.persistenceUnit()); - // } - - // ******** Behavior ********* - public SchemaGeneration getSchemaGeneration() { - return this.schemaGeneration; + private Logging buildLogging() { + return new EclipseLinkLogging(this.persistenceUnit(), this.propertyListAdapter()); } + private SchemaGeneration buildSchemaGeneration() { + return new EclipseLinkSchemaGeneration(this.persistenceUnit(), this.propertyListAdapter()); + } + + // ******** Behavior ********* public Caching getCaching() { return this.caching; } @@ -112,13 +108,12 @@ public class EclipseLinkJpaProperties extends AbstractModel return this.customization; } - // TODO - // public Logging getLogging() { - // return this.logging; - // } + public Logging getLogging() { + return this.logging; + } - public EclipseLinkProperties eclipseLinkProperties() { - return this; + public SchemaGeneration getSchemaGeneration() { + return this.schemaGeneration; } public ListValueModel<Property> propertiesAdapter() { diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkPersistenceUnit.java index cd5fa4c730..ce58d2c3b5 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkPersistenceUnit.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkPersistenceUnit.java @@ -14,6 +14,7 @@ import org.eclipse.jpt.core.internal.context.persistence.GenericPersistenceUnit; import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; +import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; /** @@ -34,10 +35,6 @@ public class EclipseLinkPersistenceUnit extends GenericPersistenceUnit } // ******** Behavior ********* - public SchemaGeneration getSchemaGeneration() { - return this.eclipseLinkProperties.getSchemaGeneration(); - } - public Caching getCaching() { return this.eclipseLinkProperties.getCaching(); } @@ -46,4 +43,12 @@ public class EclipseLinkPersistenceUnit extends GenericPersistenceUnit return this.eclipseLinkProperties.getCustomization(); } + public Logging getLogging() { + return this.eclipseLinkProperties.getLogging(); + } + + public SchemaGeneration getSchemaGeneration() { + return this.eclipseLinkProperties.getSchemaGeneration(); + } + } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkProperties.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkProperties.java index c7c10fa374..0a848ae235 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkProperties.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/EclipseLinkProperties.java @@ -11,6 +11,7 @@ package org.eclipse.jpt.eclipselink.core.internal.context; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; +import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; /** @@ -18,17 +19,16 @@ import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.Schem */ public interface EclipseLinkProperties extends PersistenceUnitProperties { - SchemaGeneration getSchemaGeneration(); - static final String SCHEMA_GENERATION_PROPERTY = "schemaGenerationProperty"; - Caching getCaching(); static final String CACHING_PROPERTY = "cachingProperty"; Customization getCustomization(); static final String CUSTOMIZATION_PROPERTY = "customizationProperty"; -//TODO -// Logging getLogging(); - static final String LOGGING_PROPERTY = "loggingProperty"; + Logging getLogging(); + static final String LOGGING_PROPERTY = "loggingProperty"; + + SchemaGeneration getSchemaGeneration(); + static final String SCHEMA_GENERATION_PROPERTY = "schemaGenerationProperty"; } 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 index f14e301cfb..bb03f82575 100644 --- 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 @@ -13,19 +13,6 @@ PersistenceXmlGeneralTab_provider = Provider: PersistenceXmlGeneralTab_browse = Browse... PersistenceXmlGeneralTab_description = Description: -PersistenceXmlLoggingTab_loggingLevelLabel = Logging Level: -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_logFileLabel = Log File -PersistenceXmlLoggingTab_logFileLabelDefault = Log File ({0}) -PersistenceXmlLoggingTab_loggersLabel = Loggers: - # SchemaGeneration PersistenceXmlSchemaGenerationTab_title = Schema Generation PersistenceXmlSchemaGenerationTab_sectionTitle = Persistence Unit Schema Generation @@ -104,3 +91,38 @@ CustomizationEntityListComposite_editButton = Edit... PersistenceXmlCustomizationTab_customizerLabel = Customizer: PersistenceXmlCustomizationTab_sessionCustomizerLabel = Session Customizer: +# 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 + +PersistenceXmlLoggingTab_loggerLabel = Logger: + +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_logFileLabel = Log File +PersistenceXmlLoggingTab_logFileLabelDefault = Log File ({0}) +PersistenceXmlLoggingTab_loggersLabel = Loggers: 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 index 0257f285a1..24a7147d67 100644 --- 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 @@ -34,19 +34,6 @@ public class EclipseLinkUiMessages extends NLS public static String PersistenceXmlGeneralTab_browse; public static String PersistenceXmlGeneralTab_description; - public static String PersistenceXmlLoggingTab_loggingLevelLabel; - 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_logFileLabel; - public static String PersistenceXmlLoggingTab_logFileLabelDefault; - public static String PersistenceXmlLoggingTab_loggersLabel; - // SchemaGeneration public static String PersistenceXmlSchemaGenerationTab_title; public static String PersistenceXmlSchemaGenerationTab_sectionTitle; @@ -125,6 +112,42 @@ public class EclipseLinkUiMessages extends NLS public static String PersistenceXmlCustomizationTab_customizerLabel; public static String PersistenceXmlCustomizationTab_sessionCustomizerLabel; + // 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 PersistenceXmlLoggingTab_loggerLabel; + + 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_logFileLabel; + public static String PersistenceXmlLoggingTab_logFileLabelDefault; + public static String PersistenceXmlLoggingTab_loggersLabel; + private EclipseLinkUiMessages() { throw new UnsupportedOperationException(); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkUiFactory.java index 8fcd68f27d..5dce911e88 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkUiFactory.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkUiFactory.java @@ -16,9 +16,11 @@ import org.eclipse.jpt.core.context.persistence.PersistenceUnit; import org.eclipse.jpt.eclipselink.core.internal.context.EclipseLinkPersistenceUnit; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; +import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.eclipselink.ui.internal.caching.PersistenceXmlCachingTab; import org.eclipse.jpt.eclipselink.ui.internal.customization.PersistenceXmlCustomizationTab; +import org.eclipse.jpt.eclipselink.ui.internal.logging.PersistenceXmlLoggingTab; import org.eclipse.jpt.eclipselink.ui.internal.schema.generation.PersistenceXmlSchemaGenerationTab; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaPageComposite; @@ -58,10 +60,24 @@ public class EclipseLinkUiFactory extends BaseJpaUiFactory PropertyValueModel<Customization> customizationHolder = this.buildCustomizationHolder(eclipseLinkPersistenceUnitHolder); pages.add(new PersistenceXmlCustomizationTab(customizationHolder, parent, widgetFactory)); + + PropertyValueModel<Logging> loggingHolder = + this.buildLoggingHolder(eclipseLinkPersistenceUnitHolder); + pages.add(new PersistenceXmlLoggingTab(loggingHolder, parent, widgetFactory)); return pages.listIterator(); } + private PropertyValueModel<Logging> buildLoggingHolder( + PropertyValueModel<EclipseLinkPersistenceUnit> subjectHolder) { + return new TransformationPropertyValueModel<EclipseLinkPersistenceUnit, Logging>(subjectHolder) { + @Override + protected Logging transform_(EclipseLinkPersistenceUnit value) { + return value.getLogging(); + } + }; + } + private PropertyValueModel<Customization> buildCustomizationHolder( PropertyValueModel<EclipseLinkPersistenceUnit> subjectHolder) { return new TransformationPropertyValueModel<EclipseLinkPersistenceUnit, Customization>(subjectHolder) { |