diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/orm/details/EclipseLink1_1OrmOneToOneMappingUiProvider.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/orm/details/EclipseLink1_1OrmOneToOneMappingUiProvider.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/orm/details/EclipseLink1_1OrmOneToOneMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/orm/details/EclipseLink1_1OrmOneToOneMappingUiProvider.java new file mode 100644 index 0000000000..9876b35557 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v1_1/orm/details/EclipseLink1_1OrmOneToOneMappingUiProvider.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * 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.orm.details; + +import org.eclipse.core.runtime.content.IContentType; +import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin; +import org.eclipse.jpt.eclipselink.core.internal.context.orm.EclipseLinkOrmOneToOneMapping; +import org.eclipse.jpt.ui.JpaUiFactory; +import org.eclipse.jpt.ui.WidgetFactory; +import org.eclipse.jpt.ui.details.AttributeMappingUiProvider; +import org.eclipse.jpt.ui.details.JpaComposite; +import org.eclipse.jpt.ui.internal.details.AbstractOneToOneMappingUiProvider; +import org.eclipse.jpt.utility.model.value.PropertyValueModel; +import org.eclipse.swt.widgets.Composite; + +public class EclipseLink1_1OrmOneToOneMappingUiProvider + extends AbstractOneToOneMappingUiProvider<EclipseLinkOrmOneToOneMapping> +{ + // singleton + private static final EclipseLink1_1OrmOneToOneMappingUiProvider INSTANCE = + new EclipseLink1_1OrmOneToOneMappingUiProvider(); + + /** + * Return the singleton. + */ + public static AttributeMappingUiProvider<EclipseLinkOrmOneToOneMapping> instance() { + return INSTANCE; + } + + + /** + * Ensure single instance. + */ + private EclipseLink1_1OrmOneToOneMappingUiProvider() { + super(); + } + + public IContentType getContentType() { + return JptEclipseLinkCorePlugin.ECLIPSELINK1_1_ORM_XML_CONTENT_TYPE; + } + + public JpaComposite buildAttributeMappingComposite( + JpaUiFactory factory, + PropertyValueModel<EclipseLinkOrmOneToOneMapping> subjectHolder, + Composite parent, + WidgetFactory widgetFactory) { + return new EclipseLink1_1OrmOneToOneMappingComposite(subjectHolder, parent, widgetFactory); + } +} |