diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse')
18 files changed, 842 insertions, 17 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/EclipseLinkJpaUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/EclipseLinkJpaUiFactory.java new file mode 100644 index 0000000000..102380be55 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/EclipseLinkJpaUiFactory.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * 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; + +import org.eclipse.jpt.ui.JpaUiFactory; + +/** + * + * + * 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 interface EclipseLinkJpaUiFactory extends JpaUiFactory +{ + +} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/JptEclipseLinkUiPlugin.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/JptEclipseLinkUiPlugin.java index 638046d4de..63e2d93f19 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/JptEclipseLinkUiPlugin.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/JptEclipseLinkUiPlugin.java @@ -7,7 +7,7 @@ * Contributors: * Oracle - initial API and implementation *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal; +package org.eclipse.jpt.eclipselink.ui; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -18,6 +18,13 @@ 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 { @@ -82,6 +89,7 @@ public class JptEclipseLinkUiPlugin extends AbstractUIPlugin * * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ + @Override public void start(BundleContext context) throws Exception { super.start(context); plugin = this; @@ -92,6 +100,7 @@ public class JptEclipseLinkUiPlugin extends AbstractUIPlugin * * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ + @Override public void stop(BundleContext context) throws Exception { plugin = 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 new file mode 100644 index 0000000000..9f80930978 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkHelpContextIds.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * 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; + +import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; + +/** + * Help context ids for the Dali EclipseLink UI. + * <p> + * This interface contains constants only; it is not intended to be + * implemented. + * </p> + */ +@SuppressWarnings("nls") +public interface EclipseLinkHelpContextIds { + + //ContextID prefix + public static final String PREFIX = JptEclipseLinkUiPlugin.PLUGIN_ID + "."; + + //Persistent Type composites + public static final String CACHING_CACHE_TYPE = PREFIX + "caching_cacheType"; + public static final String CACHING_SHARED = PREFIX + "caching_shared"; + public static final String CACHING_ALWAYS_REFRESH = PREFIX + "caching_alwaysRefresh"; + public static final String CACHING_REFRESH_ONLY_IF_NEWER = PREFIX + "caching_refreshOnlyIfNewer"; + public static final String CACHING_DISABLE_HITS = PREFIX + "caching_disableHits"; + + +} 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/EclipseLinkJpaUiFactoryImpl.java index aef68fcbcd..ee35381ba1 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/EclipseLinkJpaUiFactoryImpl.java @@ -7,11 +7,11 @@ * Contributors: * Oracle - initial API and implementation *******************************************************************************/ -package org.eclipse.jpt.eclipselink.ui.internal.platform; +package org.eclipse.jpt.eclipselink.ui.internal; import java.util.ArrayList; import java.util.ListIterator; - +import org.eclipse.jpt.core.context.java.JavaEntity; 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; @@ -20,13 +20,16 @@ import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customiza import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; +import org.eclipse.jpt.eclipselink.ui.EclipseLinkJpaUiFactory; import org.eclipse.jpt.eclipselink.ui.internal.caching.PersistenceXmlCachingTab; import org.eclipse.jpt.eclipselink.ui.internal.connection.PersistenceXmlConnectionTab; import org.eclipse.jpt.eclipselink.ui.internal.customization.PersistenceXmlCustomizationTab; +import org.eclipse.jpt.eclipselink.ui.internal.java.details.EclipseLinkJavaEntityComposite; import org.eclipse.jpt.eclipselink.ui.internal.logging.PersistenceXmlLoggingTab; import org.eclipse.jpt.eclipselink.ui.internal.options.PersistenceXmlOptionsTab; import org.eclipse.jpt.eclipselink.ui.internal.schema.generation.PersistenceXmlSchemaGenerationTab; import org.eclipse.jpt.ui.WidgetFactory; +import org.eclipse.jpt.ui.details.JpaComposite; import org.eclipse.jpt.ui.details.JpaPageComposite; import org.eclipse.jpt.ui.internal.BaseJpaUiFactory; import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitGeneralComposite; @@ -36,15 +39,24 @@ import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; /** - * EclipseLinkUiFactory + * EclipseLinkJpaUiFactory */ -public class EclipseLinkUiFactory extends BaseJpaUiFactory +public class EclipseLinkJpaUiFactoryImpl extends BaseJpaUiFactory implements EclipseLinkJpaUiFactory { - public EclipseLinkUiFactory() { + public EclipseLinkJpaUiFactoryImpl() { super(); } @Override + public JpaComposite createJavaEntityComposite( + PropertyValueModel<JavaEntity> subjectHolder, + Composite parent, + WidgetFactory widgetFactory) { + + return new EclipseLinkJavaEntityComposite(subjectHolder, parent, widgetFactory); + } + + @Override public ListIterator<JpaPageComposite> createPersistenceUnitComposites( PropertyValueModel<PersistenceUnit> subjectHolder, Composite parent, diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityListComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityListComposite.java index b2398b5182..76ab8848b0 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityListComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityListComposite.java @@ -30,8 +30,8 @@ import org.eclipse.jpt.core.context.Entity; import org.eclipse.jpt.core.context.PersistentType; import org.eclipse.jpt.core.context.TypeMapping; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; +import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.JptEclipseLinkUiPlugin; import org.eclipse.jpt.ui.internal.util.PaneEnabler; import org.eclipse.jpt.ui.internal.widgets.AbstractPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcDriverComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcDriverComposite.java index 03422763f7..44dde05c93 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcDriverComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcDriverComposite.java @@ -16,8 +16,8 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; +import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.JptEclipseLinkUiPlugin; import org.eclipse.jpt.ui.internal.widgets.AbstractPane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/CustomizerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/CustomizerComposite.java index 0c7bc630c3..b68e09205f 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/CustomizerComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/CustomizerComposite.java @@ -16,8 +16,8 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; +import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.JptEclipseLinkUiPlugin; import org.eclipse.jpt.ui.internal.widgets.AbstractPane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityListComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityListComposite.java index 6556d52807..c34b8d9b5b 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityListComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityListComposite.java @@ -30,8 +30,8 @@ import org.eclipse.jpt.core.context.Entity; import org.eclipse.jpt.core.context.PersistentType; import org.eclipse.jpt.core.context.TypeMapping; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; +import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.JptEclipseLinkUiPlugin; import org.eclipse.jpt.ui.internal.util.PaneEnabler; import org.eclipse.jpt.ui.internal.widgets.AbstractPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/SessionCustomizerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/SessionCustomizerComposite.java index 03537a4d3d..5cc9cecfff 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/SessionCustomizerComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/SessionCustomizerComposite.java @@ -16,8 +16,8 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; +import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.JptEclipseLinkUiPlugin; import org.eclipse.jpt.ui.internal.widgets.AbstractPane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/java/details/EclipseLinkJavaEntityComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/java/details/EclipseLinkJavaEntityComposite.java new file mode 100644 index 0000000000..c01aa2e3b8 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/java/details/EclipseLinkJavaEntityComposite.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * 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.java.details; + +import org.eclipse.jpt.core.context.java.JavaEntity; +import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; +import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaEntity; +import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages; +import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.CachingComposite; +import org.eclipse.jpt.ui.WidgetFactory; +import org.eclipse.jpt.ui.internal.java.details.JavaInheritanceComposite; +import org.eclipse.jpt.ui.internal.java.details.JavaSecondaryTablesComposite; +import org.eclipse.jpt.ui.internal.mappings.details.AbstractEntityComposite; +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 EclipseLinkJavaEntity + * @see EclipselinkJpaUiFactory - The factory creating this pane + * + * @version 2.0 + * @since 1.0 + */ +public class EclipseLinkJavaEntityComposite extends AbstractEntityComposite<JavaEntity> +{ + /** + * Creates a new <code>JavaEntityComposite</code>. + * + * @param subjectHolder The holder of the subject <code>JavaEntity</code> + * @param parent The parent container + * @param widgetFactory The factory used to create various common widgets + */ + public EclipseLinkJavaEntityComposite(PropertyValueModel<? extends JavaEntity> 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); + initializeSecondaryTablesPane(container); + } + + protected void initializeCachingPane(Composite container) { + + container = buildCollapsableSection( + buildSubPane(container, 5), + EclipseLinkUiMappingsMessages.EclipseLinkJavaEntityComposite_caching + ); + + new CachingComposite(this, buildCachingHolder(), container); + } + + private PropertyAspectAdapter<JavaEntity, EclipseLinkCaching> buildCachingHolder() { + return new PropertyAspectAdapter<JavaEntity, EclipseLinkCaching>( + getSubjectHolder()) + { + @Override + protected EclipseLinkCaching buildValue_() { + return ((EclipseLinkJavaEntity) this.subject).getCaching(); + } + }; + + } + + @Override + protected void buildSecondaryTablesComposite(Composite container) { + new JavaSecondaryTablesComposite(this, container); + } + + @Override + protected void buildInheritanceComposite(Composite container) { + new JavaInheritanceComposite(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/mappings/EclipseLinkUiMappingsMessages.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/EclipseLinkUiMappingsMessages.java new file mode 100644 index 0000000000..901ed4dfdf --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/EclipseLinkUiMappingsMessages.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * 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.mappings; + +import org.eclipse.osgi.util.NLS; + +/** + * The localized strings used by the mapping panes. + * + * @version 2.0 + * @since 1.0 + */ +@SuppressWarnings("nls") +public class EclipseLinkUiMappingsMessages extends NLS { + + public static String CacheTypeComposite_label; + public static String CacheTypeComposite_full; + public static String CacheTypeComposite_weak; + public static String CacheTypeComposite_soft; + public static String CacheTypeComposite_soft_weak; + public static String CacheTypeComposite_hard_weak; + public static String CacheTypeComposite_cache; + public static String CacheTypeComposite_none; + public static String EclipseLinkJavaEntityComposite_caching; + + public static String CachingComposite_sharedLabelDefault; + public static String CachingComposite_sharedLabel; + public static String AlwaysRefreshComposite_alwaysRefreshDefault; + public static String AlwaysRefreshComposite_alwaysRefreshLabel; + public static String RefreshOnlyIfNewerComposite_refreshOnlyIfNewerDefault; + public static String RefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel; + public static String DisableHitsComposite_disableHitsDefault; + public static String DisableHitsComposite_disableHitsLabel; + + static { + NLS.initializeMessages("eclipselink_ui_mappings", EclipseLinkUiMappingsMessages.class); + } + + private EclipseLinkUiMappingsMessages() { + 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/mappings/details/AlwaysRefreshComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/AlwaysRefreshComposite.java new file mode 100644 index 0000000000..28b8b8bfe5 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/AlwaysRefreshComposite.java @@ -0,0 +1,116 @@ +/******************************************************************************* + * 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.mappings.details; + +import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; +import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; +import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages; +import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; +import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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 CachingComposite - A container of this widget + * + * @version 2.1 + * @since 2.1 + */ +public class AlwaysRefreshComposite extends AbstractFormPane<EclipseLinkCaching> +{ + /** + * Creates a new <code>OptionalComposite</code>. + * + * @param parentPane The parent container of this one + * @param parent The parent container + */ + public AlwaysRefreshComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + Composite parent) + { + super(parentPane, parent); + } + + private WritablePropertyValueModel<Boolean> buildAlwaysRefreshHolder() { + return new PropertyAspectAdapter<EclipseLinkCaching, Boolean>(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_ALWAYS_REFRESH_PROPERTY) { + @Override + protected Boolean buildValue_() { + return this.subject.getSpecifiedAlwaysRefresh(); + } + + @Override + protected void setValue_(Boolean value) { + this.subject.setSpecifiedAlwaysRefresh(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.fireAspectChange(Boolean.TRUE, newValue); + } + } + }; + } + + private PropertyValueModel<String> buildAlwaysRefreshStringHolder() { + + return new TransformationPropertyValueModel<Boolean, String>(buildAlwaysRefreshHolder()) { + + @Override + protected String transform(Boolean value) { + + if ((subject() != null) && (value == null)) { + + Boolean defaultValue = subject().getDefaultAlwaysRefresh(); + + if (defaultValue != null) { + + String defaultStringValue = defaultValue ? JptUiMappingsMessages.Boolean_True : + JptUiMappingsMessages.Boolean_False; + + return NLS.bind( + EclipseLinkUiMappingsMessages.AlwaysRefreshComposite_alwaysRefreshDefault, + defaultStringValue + ); + } + } + + return EclipseLinkUiMappingsMessages.AlwaysRefreshComposite_alwaysRefreshLabel; + } + }; + } + + /* + * (non-Javadoc) + */ + @Override + protected void initializeLayout(Composite container) { + + buildTriStateCheckBoxWithDefault( + container, + EclipseLinkUiMappingsMessages.AlwaysRefreshComposite_alwaysRefreshLabel, + buildAlwaysRefreshHolder(), + buildAlwaysRefreshStringHolder(), + EclipseLinkHelpContextIds.CACHING_ALWAYS_REFRESH + ); + } +}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheTypeComposite.java new file mode 100644 index 0000000000..4fccac255b --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheTypeComposite.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * 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.mappings.details; + +import java.util.Collection; +import org.eclipse.jpt.eclipselink.core.context.CacheType; +import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; +import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; +import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages; +import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; +import org.eclipse.swt.widgets.Composite; + +/** + * Here is the layout of this pane: + * <pre> + * ---------------------------------------------------------------------------- + * | ------------------------------------------------------------------ | + * | Type: | |v| | + * | ------------------------------------------------------------------ | + * ----------------------------------------------------------------------------</pre> + * + * @see EclipseLinkCaching + * @see CachingComposite - A container of this widget + * + * @version 2.1 + * @since 2.1 + */ +public class CacheTypeComposite extends AbstractFormPane<EclipseLinkCaching> { + + /** + * Creates a new <code>FetchTypeComposite</code>. + * + * @param parentPane The parent container of this one + * @param parent The parent container + */ + public CacheTypeComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + Composite parent) { + + super(parentPane, parent); + } + + private EnumFormComboViewer<EclipseLinkCaching, CacheType> buildCacheTypeCombo(Composite container) { + + return new EnumFormComboViewer<EclipseLinkCaching, CacheType>(this, container) { + + @Override + protected void addPropertyNames(Collection<String> propertyNames) { + super.addPropertyNames(propertyNames); + propertyNames.add(EclipseLinkCaching.DEFAULT_CACHE_TYPE_PROPERTY); + propertyNames.add(EclipseLinkCaching.SPECIFIED_CACHE_TYPE_PROPERTY); + } + + @Override + protected CacheType[] choices() { + return CacheType.values(); + } + + @Override + protected CacheType defaultValue() { + return subject().getDefaultCacheType(); + } + + @Override + protected String displayString(CacheType value) { + return buildDisplayString( + EclipseLinkUiMappingsMessages.class, + CacheTypeComposite.this, + value + ); + } + + @Override + protected CacheType getValue() { + return subject().getSpecifiedCacheType(); + } + + @Override + protected void setValue(CacheType value) { + subject().setSpecifiedCacheType(value); + } + + @Override + protected boolean sortChoices() { + return false; + } + }; + } + + /* + * (non-Javadoc) + */ + @Override + protected void initializeLayout(Composite container) { + + buildLabeledComposite( + container, + EclipseLinkUiMappingsMessages.CacheTypeComposite_label, + buildCacheTypeCombo(container), + EclipseLinkHelpContextIds.CACHING_CACHE_TYPE + ); + } +} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CachingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CachingComposite.java new file mode 100644 index 0000000000..871c49314a --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CachingComposite.java @@ -0,0 +1,144 @@ +/******************************************************************************* + * 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.mappings.details; + +import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; +import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; +import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages; +import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; +import org.eclipse.jpt.ui.internal.util.PaneEnabler; +import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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 pane shows the caching options. + * <p> + * Here the layout of this pane: + * <pre> + * ----------------------------------------------------------------------------- + * | x Shared | + * | CacheTypeComposite | + * | AlwaysRefreshComposite | + * | RefreshOnlyIfNewerComposite | + * | DisableHitsComposite | + * -----------------------------------------------------------------------------</pre> + * + * @see Entity + * @see EclipseLinkCaching + * @see EclipseLinkJavaEntityComposite - The parent container + * @see CacheTypeComposite + * @see AlwaysRefreshComposite + * @see RefreshOnlyIfNewerComposite + * @see DisableHitsComposite + * + * @version 2.1 + * @since 2.1 + */ +public class CachingComposite extends AbstractFormPane<EclipseLinkCaching> +{ + + public CachingComposite(AbstractFormPane<?> parentPane, + PropertyValueModel<EclipseLinkCaching> subjectHolder, + Composite parent) { + + super(parentPane, subjectHolder, parent); + } + + @Override + protected void initializeLayout(Composite container) { + + //Shared Check box, uncheck this and the rest of the panel is disabled + buildTriStateCheckBoxWithDefault( + buildSubPane(container, 8), + EclipseLinkUiMappingsMessages.CachingComposite_sharedLabel, + buildSharedHolder(), + buildSharedStringHolder(), + EclipseLinkHelpContextIds.CACHING_SHARED + ); + + Composite subPane = buildSubPane(container, 0, 16); + + new PaneEnabler(buildSharedCacheEnabler(), + new CacheTypeComposite(this, subPane), + new AlwaysRefreshComposite(this, subPane), + new RefreshOnlyIfNewerComposite(this, subPane), + new DisableHitsComposite(this, subPane) + ); + } + + + private PropertyValueModel<Boolean> buildSharedCacheEnabler() { + return new PropertyAspectAdapter<EclipseLinkCaching, Boolean>(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_SHARED_PROPERTY) { + @Override + protected Boolean buildValue_() { + return this.subject.getShared(); + } + }; + } + private WritablePropertyValueModel<Boolean> buildSharedHolder() { + return new PropertyAspectAdapter<EclipseLinkCaching, Boolean>(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_SHARED_PROPERTY) { + @Override + protected Boolean buildValue_() { + return this.subject.getSpecifiedShared(); + } + + @Override + protected void setValue_(Boolean value) { + this.subject.setSpecifiedShared(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.fireAspectChange(Boolean.TRUE, newValue); + } + } + }; + } + + private PropertyValueModel<String> buildSharedStringHolder() { + + return new TransformationPropertyValueModel<Boolean, String>(buildSharedHolder()) { + + @Override + protected String transform(Boolean value) { + + if ((subject() != null) && (value == null)) { + + Boolean defaultValue = subject().getDefaultShared(); + + if (defaultValue != null) { + + String defaultStringValue = defaultValue ? JptUiMappingsMessages.Boolean_True : + JptUiMappingsMessages.Boolean_False; + + return NLS.bind( + EclipseLinkUiMappingsMessages.CachingComposite_sharedLabelDefault, + defaultStringValue + ); + } + } + + return EclipseLinkUiMappingsMessages.CachingComposite_sharedLabel; + } + }; + } + +}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/DisableHitsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/DisableHitsComposite.java new file mode 100644 index 0000000000..f509f4d3cb --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/DisableHitsComposite.java @@ -0,0 +1,115 @@ +/******************************************************************************* + * 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.mappings.details; + +import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; +import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; +import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages; +import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; +import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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 CachingComposite - A container of this widget + * + * @version 2.1 + * @since 2.1 + */ +public class DisableHitsComposite extends AbstractFormPane<EclipseLinkCaching> +{ + /** + * Creates a new <code>OptionalComposite</code>. + * + * @param parentPane The parent container of this one + * @param parent The parent container + */ + public DisableHitsComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + Composite parent) + { + super(parentPane, parent); + } + + private WritablePropertyValueModel<Boolean> buildDisableHitsHolder() { + return new PropertyAspectAdapter<EclipseLinkCaching, Boolean>(getSubjectHolder(), EclipseLinkCaching.SPECIFIED_DISABLE_HITS_PROPERTY) { + @Override + protected Boolean buildValue_() { + return this.subject.getSpecifiedDisableHits(); + } + + @Override + protected void setValue_(Boolean value) { + this.subject.setSpecifiedDisableHits(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.fireAspectChange(Boolean.TRUE, newValue); + } + } + }; + } + + private PropertyValueModel<String> buildDisableHitsStringHolder() { + + return new TransformationPropertyValueModel<Boolean, String>(buildDisableHitsHolder()) { + + @Override + protected String transform(Boolean value) { + + if ((subject() != null) && (value == null)) { + + Boolean defaultValue = subject().getDefaultDisableHits(); + + if (defaultValue != null) { + + String defaultStringValue = defaultValue ? JptUiMappingsMessages.Boolean_True : + JptUiMappingsMessages.Boolean_False; + + return NLS.bind( + EclipseLinkUiMappingsMessages.DisableHitsComposite_disableHitsDefault, + defaultStringValue + ); + } + } + + return EclipseLinkUiMappingsMessages.DisableHitsComposite_disableHitsLabel; + } + }; + } + + /* + * (non-Javadoc) + */ + @Override + protected void initializeLayout(Composite container) { + + buildTriStateCheckBoxWithDefault( + container, + EclipseLinkUiMappingsMessages.DisableHitsComposite_disableHitsLabel, + buildDisableHitsHolder(), + buildDisableHitsStringHolder(), + EclipseLinkHelpContextIds.CACHING_DISABLE_HITS + ); + } +}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/RefreshOnlyIfNewerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/RefreshOnlyIfNewerComposite.java new file mode 100644 index 0000000000..8f99e664b3 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/RefreshOnlyIfNewerComposite.java @@ -0,0 +1,115 @@ +/******************************************************************************* + * 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.mappings.details; + +import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; +import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkHelpContextIds; +import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages; +import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; +import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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 CachingComposite - A container of this widget + * + * @version 2.1 + * @since 2.1 + */ +public class RefreshOnlyIfNewerComposite extends AbstractFormPane<EclipseLinkCaching> +{ + /** + * Creates a new <code>OptionalComposite</code>. + * + * @param parentPane The parent container of this one + * @param parent The parent container + */ + public RefreshOnlyIfNewerComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + Composite parent) + { + super(parentPane, parent); + } + + private WritablePropertyValueModel<Boolean> buildRefreshOnlyIfNewerHolder() { + return new PropertyAspectAdapter<EclipseLinkCaching, Boolean>(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); + } + + @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.fireAspectChange(Boolean.TRUE, newValue); + } + } + }; + } + + private PropertyValueModel<String> buildRefreshOnlyIfNewerStringHolder() { + + return new TransformationPropertyValueModel<Boolean, String>(buildRefreshOnlyIfNewerHolder()) { + + @Override + protected String transform(Boolean value) { + + if ((subject() != null) && (value == null)) { + + Boolean defaultValue = subject().getDefaultRefreshOnlyIfNewer(); + + if (defaultValue != null) { + + String defaultStringValue = defaultValue ? JptUiMappingsMessages.Boolean_True : + JptUiMappingsMessages.Boolean_False; + + return NLS.bind( + EclipseLinkUiMappingsMessages.RefreshOnlyIfNewerComposite_refreshOnlyIfNewerDefault, + defaultStringValue + ); + } + } + + return EclipseLinkUiMappingsMessages.RefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel; + } + }; + } + + /* + * (non-Javadoc) + */ + @Override + protected void initializeLayout(Composite container) { + + buildTriStateCheckBoxWithDefault( + container, + EclipseLinkUiMappingsMessages.RefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel, + buildRefreshOnlyIfNewerHolder(), + buildRefreshOnlyIfNewerStringHolder(), + EclipseLinkHelpContextIds.CACHING_REFRESH_ONLY_IF_NEWER + ); + } +}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EventListenerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EventListenerComposite.java index 82c57733b2..6e7dca94d0 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EventListenerComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EventListenerComposite.java @@ -16,8 +16,8 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; +import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.eclipselink.ui.internal.JptEclipseLinkUiPlugin; import org.eclipse.jpt.ui.internal.widgets.AbstractPane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkPlatformUI.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUI.java index 7c7f7518d1..176e2eefd0 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkPlatformUI.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUI.java @@ -18,9 +18,10 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jpt.core.JpaProject; import org.eclipse.jpt.core.context.AttributeMapping; import org.eclipse.jpt.core.context.TypeMapping; +import org.eclipse.jpt.eclipselink.ui.EclipseLinkJpaUiFactory; +import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkJpaUiFactoryImpl; import org.eclipse.jpt.eclipselink.ui.internal.ddlgen.EclipseLinkDDLGeneratorUi; import org.eclipse.jpt.eclipselink.ui.internal.persistencexml.details.PersistenceDetailsProvider; -import org.eclipse.jpt.ui.JpaUiFactory; import org.eclipse.jpt.ui.details.AttributeMappingUiProvider; import org.eclipse.jpt.ui.details.JpaDetailsProvider; import org.eclipse.jpt.ui.details.TypeMappingUiProvider; @@ -32,9 +33,9 @@ import org.eclipse.swt.widgets.Shell; /** * EclipseLinkPlatformUI */ -public class EclipseLinkPlatformUI extends BaseJpaPlatformUi +public class EclipseLinkJpaPlatformUI extends BaseJpaPlatformUi { - public EclipseLinkPlatformUI() { + public EclipseLinkJpaPlatformUI() { super(); } @@ -44,8 +45,8 @@ public class EclipseLinkPlatformUI extends BaseJpaPlatformUi } @Override - protected JpaUiFactory createJpaUiFactory() { - return new EclipseLinkUiFactory(); + protected EclipseLinkJpaUiFactory createJpaUiFactory() { + return new EclipseLinkJpaUiFactoryImpl(); } public void generateDDL(JpaProject project, IStructuredSelection selection) { |