diff options
author | kmoore | 2008-08-25 15:33:03 +0000 |
---|---|---|
committer | kmoore | 2008-08-25 15:33:03 +0000 |
commit | fb46aff6d4eef0285a24454e1d71fd2ee72aed9a (patch) | |
tree | 78085fd9fef9f4b32dd135531c4c4393a8c48735 /jpa | |
parent | d9ff2e82b2a3e9c07c6f27d614c8256e8215955e (diff) | |
download | webtools.dali-fb46aff6d4eef0285a24454e1d71fd2ee72aed9a.tar.gz webtools.dali-fb46aff6d4eef0285a24454e1d71fd2ee72aed9a.tar.xz webtools.dali-fb46aff6d4eef0285a24454e1d71fd2ee72aed9a.zip |
Renamed AbstractPane to Pane, changed how enablement is managed, renamed build methods to add methods for widgets since adding it is the side effect, renamed methods to get*
Diffstat (limited to 'jpa')
215 files changed, 2948 insertions, 3602 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java index f33a87a30a..fdbcdf295f 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Spinner; * CacheSizeComposite */ @SuppressWarnings("nls") -public class CacheSizeComposite extends AbstractPane<EntityCacheProperties> +public class CacheSizeComposite extends Pane<EntityCacheProperties> { /** * Creates a new <code>CacheTypeComposite</code>. @@ -39,7 +39,7 @@ public class CacheSizeComposite extends AbstractPane<EntityCacheProperties> * @param parent * The parent container */ - public CacheSizeComposite(AbstractPane<EntityCacheProperties> parentComposite, + public CacheSizeComposite(Pane<EntityCacheProperties> parentComposite, Composite parent) { super(parentComposite, parent); @@ -88,9 +88,9 @@ public class CacheSizeComposite extends AbstractPane<EntityCacheProperties> }; } - private Control buildDefaultCacheSizeLabel(Composite container) { + private Control addDefaultCacheSizeLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, EclipseLinkUiMessages.DefaultWithoutValue ); @@ -122,14 +122,15 @@ public class CacheSizeComposite extends AbstractPane<EntityCacheProperties> @Override protected void initializeLayout(Composite container) { - Spinner spinner = this.buildLabeledSpinner( + Spinner spinner = this.addLabeledSpinner( container, EclipseLinkUiMessages.CacheSizeComposite_cacheSize, this.buildCacheSizeHolder(), -1, -1, Integer.MAX_VALUE, - this.buildDefaultCacheSizeLabel(container) + this.addDefaultCacheSizeLabel(container), + null ); updateGridData(container, spinner); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheTypeComposite.java index 3eddefcb19..69138824d9 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheTypeComposite.java @@ -14,7 +14,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.caching.CacheType; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.listeners.SWTPropertyChangeListenerWrapper; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; @@ -26,7 +26,7 @@ import org.eclipse.swt.widgets.Composite; /** * CacheTypeComposite */ -public class CacheTypeComposite extends AbstractPane<EntityCacheProperties> +public class CacheTypeComposite extends Pane<EntityCacheProperties> { /** * Creates a new <code>CacheTypeComposite</code>. @@ -36,7 +36,7 @@ public class CacheTypeComposite extends AbstractPane<EntityCacheProperties> * @param parent * The parent container */ - public CacheTypeComposite(AbstractPane<EntityCacheProperties> parentComposite, + public CacheTypeComposite(Pane<EntityCacheProperties> parentComposite, Composite parent) { super(parentComposite, parent); @@ -45,7 +45,7 @@ public class CacheTypeComposite extends AbstractPane<EntityCacheProperties> @Override protected void initializeLayout(Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlCachingTab_cacheTypeLabel, new CacheTypeCombo(container), @@ -104,13 +104,13 @@ public class CacheTypeComposite extends AbstractPane<EntityCacheProperties> } @Override - protected CacheType[] choices() { + protected CacheType[] getChoices() { return CacheType.values(); } @Override - protected CacheType defaultValue() { - return this.subject().getDefaultCacheType(); + protected CacheType getDefaultValue() { + return this.getSubject().getDefaultCacheType(); } @Override @@ -131,7 +131,7 @@ public class CacheTypeComposite extends AbstractPane<EntityCacheProperties> @Override protected CacheType getValue() { - return this.subject().getCacheType(); + return this.getSubject().getCacheType(); } @Override @@ -149,7 +149,7 @@ public class CacheTypeComposite extends AbstractPane<EntityCacheProperties> @Override protected void setValue(CacheType value) { - this.subject().setCacheType(value); + this.getSubject().setCacheType(value); } @Override diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheSizeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheSizeComposite.java index e0df6d77cc..7aac96cde4 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheSizeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheSizeComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Spinner; * CacheSizeComposite */ @SuppressWarnings("nls") -public class DefaultCacheSizeComposite extends AbstractPane<Caching> +public class DefaultCacheSizeComposite extends Pane<Caching> { /** * Creates a new <code>CacheTypeComposite</code>. @@ -39,7 +39,7 @@ public class DefaultCacheSizeComposite extends AbstractPane<Caching> * @param parent * The parent container */ - public DefaultCacheSizeComposite(AbstractPane<Caching> parentComposite, + public DefaultCacheSizeComposite(Pane<Caching> parentComposite, Composite parent) { super(parentComposite, parent); @@ -88,9 +88,9 @@ public class DefaultCacheSizeComposite extends AbstractPane<Caching> }; } - private Control buildDefaultCacheSizeLabel(Composite container) { + private Control addDefaultCacheSizeLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, EclipseLinkUiMessages.DefaultWithoutValue ); @@ -122,14 +122,15 @@ public class DefaultCacheSizeComposite extends AbstractPane<Caching> @Override protected void initializeLayout(Composite container) { - Spinner spinner = this.buildLabeledSpinner( + Spinner spinner = this.addLabeledSpinner( container, EclipseLinkUiMessages.DefaultCacheSizeComposite_defaultCacheSize, this.buildCacheSizeHolder(), -1, -1, Integer.MAX_VALUE, - this.buildDefaultCacheSizeLabel(container) + this.addDefaultCacheSizeLabel(container), + null ); updateGridData(container, spinner); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheTypeComposite.java index ffba8d4f94..cd945a1288 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultCacheTypeComposite.java @@ -14,14 +14,14 @@ import java.util.Collection; import org.eclipse.jpt.eclipselink.core.internal.context.caching.CacheType; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; /** * DefaultCacheTypeComposite */ -public class DefaultCacheTypeComposite extends AbstractFormPane<Caching> +public class DefaultCacheTypeComposite extends FormPane<Caching> { /** * Creates a new <code>DefaultCacheTypeComposite</code>. @@ -32,7 +32,7 @@ public class DefaultCacheTypeComposite extends AbstractFormPane<Caching> * The parent container */ public DefaultCacheTypeComposite( - AbstractFormPane<? extends Caching> parentComposite, + FormPane<? extends Caching> parentComposite, Composite parent) { super( parentComposite, parent); @@ -47,7 +47,7 @@ public class DefaultCacheTypeComposite extends AbstractFormPane<Caching> } @Override - protected CacheType[] choices() { + protected CacheType[] getChoices() { return CacheType.values(); } @@ -57,8 +57,8 @@ public class DefaultCacheTypeComposite extends AbstractFormPane<Caching> } @Override - protected CacheType defaultValue() { - return subject().getDefaultCacheTypeDefault(); + protected CacheType getDefaultValue() { + return getSubject().getDefaultCacheTypeDefault(); } @Override @@ -68,12 +68,12 @@ public class DefaultCacheTypeComposite extends AbstractFormPane<Caching> @Override protected CacheType getValue() { - return subject().getCacheTypeDefault(); + return getSubject().getCacheTypeDefault(); } @Override protected void setValue(CacheType value) { - subject().setCacheTypeDefault(value); + getSubject().setCacheTypeDefault(value); } }; } @@ -81,7 +81,7 @@ public class DefaultCacheTypeComposite extends AbstractFormPane<Caching> @Override protected void initializeLayout( Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlCachingTab_defaultCacheTypeLabel, this.buildDefaultCacheTypeCombo( container), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultSharedCacheComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultSharedCacheComposite.java index 0dbe7500bc..25f4975d41 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultSharedCacheComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/DefaultSharedCacheComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.caching; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * DefaultShareCacheComposite */ -public class DefaultSharedCacheComposite extends AbstractFormPane<Caching> +public class DefaultSharedCacheComposite extends FormPane<Caching> { /** * Creates a new <code>DefaultShareCacheComposite</code>. @@ -33,7 +33,7 @@ public class DefaultSharedCacheComposite extends AbstractFormPane<Caching> * The parent container */ public DefaultSharedCacheComposite( - AbstractFormPane<? extends Caching> parentComposite, + FormPane<? extends Caching> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class DefaultSharedCacheComposite extends AbstractFormPane<Caching> return new TransformationPropertyValueModel<Boolean, String>(buildDefaultSharedCacheHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultSharedCacheDefault(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultSharedCacheDefault(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCachingTab_defaultSharedCacheDefaultLabel, defaultStringValue); @@ -84,7 +84,7 @@ public class DefaultSharedCacheComposite extends AbstractFormPane<Caching> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlCachingTab_sharedCacheDefaultLabel, this.buildDefaultSharedCacheHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EclipseLinkCachingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EclipseLinkCachingComposite.java index f726f88072..18b61c3abb 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EclipseLinkCachingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EclipseLinkCachingComposite.java @@ -11,15 +11,15 @@ package org.eclipse.jpt.eclipselink.ui.internal.caching; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.swt.widgets.Composite; /** * EclipseLinkCachingComposite */ -public class EclipseLinkCachingComposite extends AbstractFormPane<Caching> +public class EclipseLinkCachingComposite extends FormPane<Caching> { - public EclipseLinkCachingComposite(AbstractFormPane<Caching> subjectHolder, + public EclipseLinkCachingComposite(FormPane<Caching> subjectHolder, Composite container) { super(subjectHolder, container); @@ -28,16 +28,16 @@ public class EclipseLinkCachingComposite extends AbstractFormPane<Caching> @Override protected void initializeLayout(Composite container) { - container = buildSection( + container = addSection( container, EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionTitle, EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionDescription ); // Default pane - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); - Composite defaultPane = buildSubPane( + Composite defaultPane = addSubPane( container, 0, groupBoxMargin, 0, groupBoxMargin ); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityCachingPropertyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityCachingPropertyComposite.java index 5be8a632ce..e41c6aa850 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityCachingPropertyComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/EntityCachingPropertyComposite.java @@ -10,7 +10,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.caching; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -18,7 +18,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class EntityCachingPropertyComposite extends AbstractPane<EntityCacheProperties> { +public class EntityCachingPropertyComposite extends Pane<EntityCacheProperties> { /** * Creates a new <code>EntityCachingPropertyComposite</code>. @@ -27,7 +27,7 @@ public class EntityCachingPropertyComposite extends AbstractPane<EntityCacheProp * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public EntityCachingPropertyComposite(AbstractPane<Caching> parentComposite, + public EntityCachingPropertyComposite(Pane<Caching> parentComposite, PropertyValueModel<EntityCacheProperties> 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 76ab8848b0..31b69b40be 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 @@ -33,7 +33,7 @@ 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.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; @@ -51,9 +51,9 @@ import org.eclipse.ui.progress.IProgressService; /** * EntityListComposite */ -public class EntityListComposite extends AbstractPane<Caching> +public class EntityListComposite extends Pane<Caching> { - public EntityListComposite(AbstractPane<Caching> parentComposite, Composite parent) { + public EntityListComposite(Pane<Caching> parentComposite, Composite parent) { super(parentComposite, parent); } @@ -61,7 +61,7 @@ public class EntityListComposite extends AbstractPane<Caching> @Override protected void initializeLayout(Composite container) { - container = this.buildTitledPane( + container = this.addTitledGroup( container, EclipseLinkUiMessages.CachingEntityListComposite_groupTitle ); @@ -95,7 +95,7 @@ public class EntityListComposite extends AbstractPane<Caching> } public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - Caching caching = subject(); + Caching caching = getSubject(); for (Object item : listSelectionModel.selectedValues()) { EntityCacheProperties entityCaching = (EntityCacheProperties) item; caching.removeEntity(entityCaching.getEntityName()); @@ -114,8 +114,8 @@ public class EntityListComposite extends AbstractPane<Caching> entityName = type.getElementName(); } - if( ! this.subject().entityExists(entityName)) { - String entity = this.subject().addEntity(entityName); + if( ! this.getSubject().entityExists(entityName)) { + String entity = this.getSubject().addEntity(entityName); listSelectionModel.setSelectedValue(entity); } @@ -124,7 +124,7 @@ public class EntityListComposite extends AbstractPane<Caching> private String getEntityName(String fullyQualifiedTypeName) { - PersistentType persistentType = subject().persistenceUnit().getPersistentType(fullyQualifiedTypeName); + PersistentType persistentType = getSubject().persistenceUnit().getPersistentType(fullyQualifiedTypeName); if (persistentType != null && persistentType.getMappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { TypeMapping mapping = persistentType.getMapping(); @@ -137,7 +137,7 @@ public class EntityListComposite extends AbstractPane<Caching> private IType chooseEntity() { - IPackageFragmentRoot root = packageFragmentRoot(); + IPackageFragmentRoot root = getPackageFragmentRoot(); if (root == null) { return null; } @@ -148,7 +148,7 @@ public class EntityListComposite extends AbstractPane<Caching> try { typeSelectionDialog = JavaUI.createTypeDialog( - shell(), + getShell(), service, scope, IJavaElementSearchConstants.CONSIDER_CLASSES, @@ -169,8 +169,8 @@ public class EntityListComposite extends AbstractPane<Caching> return null; } - private IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + private IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -200,7 +200,7 @@ public class EntityListComposite extends AbstractPane<Caching> return new TransformationListValueModelAdapter<String, EntityCacheProperties>(buildEntitiesListHolder()) { @Override protected EntityCacheProperties transformItem(String item) { - return new EntityCacheProperties(subject(), item); + return new EntityCacheProperties(getSubject(), item); } }; } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/PersistenceXmlCachingTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/PersistenceXmlCachingTab.java index cf5e54d81c..3a63bec199 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/PersistenceXmlCachingTab.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/PersistenceXmlCachingTab.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; 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.AbstractFormPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * PersistenceXmlCachingTab */ public class PersistenceXmlCachingTab - extends AbstractFormPane<Caching> + extends FormPane<Caching> implements JpaPageComposite { public PersistenceXmlCachingTab( @@ -58,7 +58,7 @@ public class PersistenceXmlCachingTab // ********** Layout ********** @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; layout.marginWidth = 0; @@ -68,7 +68,7 @@ public class PersistenceXmlCachingTab layout.marginRight = 0; layout.verticalSpacing = 15; - Composite container = buildPane(parent, layout); + Composite container = addPane(parent, layout); updateGridData(container); return container; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/SharedCacheComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/SharedCacheComposite.java index 9e6febdc88..535f1386b4 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/SharedCacheComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/SharedCacheComposite.java @@ -13,7 +13,7 @@ import java.util.ArrayList; import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Composite; /** * SharedCacheComposite */ -public class SharedCacheComposite extends AbstractPane<EntityCacheProperties> +public class SharedCacheComposite extends Pane<EntityCacheProperties> { private TriStateCheckBox sharedCacheCheckBox; @@ -39,7 +39,7 @@ public class SharedCacheComposite extends AbstractPane<EntityCacheProperties> * @param parentController The parent container of this one * @param parent The parent container */ - public SharedCacheComposite(AbstractPane<EntityCacheProperties> parentComposite, + public SharedCacheComposite(Pane<EntityCacheProperties> parentComposite, Composite parent) { super(parentComposite, parent); @@ -143,7 +143,7 @@ public class SharedCacheComposite extends AbstractPane<EntityCacheProperties> @Override protected void initializeLayout(Composite container) { - this.sharedCacheCheckBox = this.buildTriStateCheckBoxWithDefault( + this.sharedCacheCheckBox = this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlCachingTab_sharedCacheLabel, this.buildSharedCacheHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/BatchWritingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/BatchWritingComposite.java index 6b0152186e..47c3e69e5b 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/BatchWritingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/BatchWritingComposite.java @@ -14,14 +14,14 @@ import java.util.Collection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.BatchWriting; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; /** * BatchWritingComposite */ -public class BatchWritingComposite extends AbstractFormPane<Connection> +public class BatchWritingComposite extends FormPane<Connection> { /** * Creates a new <code>BatchWritingComposite</code>. @@ -32,13 +32,13 @@ public class BatchWritingComposite extends AbstractFormPane<Connection> * The parent container */ public BatchWritingComposite( - AbstractFormPane<? extends Connection> parentComposite, + FormPane<? extends Connection> parentComposite, Composite parent) { super( parentComposite, parent); } - private EnumFormComboViewer<Connection, BatchWriting> buildBatchWritingCombo(Composite container) { + private EnumFormComboViewer<Connection, BatchWriting> addBatchWritingCombo(Composite container) { return new EnumFormComboViewer<Connection, BatchWriting>(this, container) { @Override protected void addPropertyNames(Collection<String> propertyNames) { @@ -47,13 +47,13 @@ public class BatchWritingComposite extends AbstractFormPane<Connection> } @Override - protected BatchWriting[] choices() { + protected BatchWriting[] getChoices() { return BatchWriting.values(); } @Override - protected BatchWriting defaultValue() { - return subject().getDefaultBatchWriting(); + protected BatchWriting getDefaultValue() { + return getSubject().getDefaultBatchWriting(); } @Override @@ -63,12 +63,12 @@ public class BatchWritingComposite extends AbstractFormPane<Connection> @Override protected BatchWriting getValue() { - return subject().getBatchWriting(); + return getSubject().getBatchWriting(); } @Override protected void setValue(BatchWriting value) { - subject().setBatchWriting(value); + getSubject().setBatchWriting(value); } }; } @@ -76,10 +76,10 @@ public class BatchWritingComposite extends AbstractFormPane<Connection> @Override protected void initializeLayout( Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_batchWritingLabel, - this.buildBatchWritingCombo( container), + this.addBatchWritingCombo( container), null // TODO IJpaHelpContextIds. ); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/CacheStatementsPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/CacheStatementsPropertiesComposite.java index 5f702580c1..591476a1bf 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/CacheStatementsPropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/CacheStatementsPropertiesComposite.java @@ -14,7 +14,7 @@ import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.ControlEnabler; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.TriStateCheckBox; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; @@ -31,9 +31,9 @@ import org.eclipse.swt.widgets.Spinner; * CacheStatementsPropertiesComposite */ @SuppressWarnings("nls") -public class CacheStatementsPropertiesComposite extends AbstractPane<Connection> +public class CacheStatementsPropertiesComposite extends Pane<Connection> { - public CacheStatementsPropertiesComposite(AbstractPane<Connection> parentComposite, Composite parent) { + public CacheStatementsPropertiesComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); } @@ -107,9 +107,9 @@ public class CacheStatementsPropertiesComposite extends AbstractPane<Connection> }; } - private Label buildDefaultCacheStatementsSizeLabel(Composite container) { + private Label addDefaultCacheStatementsSizeLabel(Composite container) { - Label label = buildLabel( + Label label = addUnmanagedLabel( container, EclipseLinkUiMessages.DefaultWithoutValue ); @@ -143,24 +143,25 @@ public class CacheStatementsPropertiesComposite extends AbstractPane<Connection> WritablePropertyValueModel<Boolean> cacheStatementsHolder = buildCacheStatementsHolder(); - TriStateCheckBox checkBox = this.buildTriStateCheckBox( + TriStateCheckBox checkBox = this.addTriStateCheckBox( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_cacheStatementsLabel, cacheStatementsHolder, null ); - Spinner spinner = this.buildSpinner( + Spinner spinner = this.addUnmanagedSpinner( container, this.buildCacheStatementsSizeHolder(), -1, -1, - Integer.MAX_VALUE + Integer.MAX_VALUE, + null ); - Label label = this.buildDefaultCacheStatementsSizeLabel(container); + Label label = this.addDefaultCacheStatementsSizeLabel(container); - this.buildLabeledComposite( + this.addLabeledComposite( container, checkBox.getCheckBox(), (spinner.getParent() == container) ? spinner : spinner.getParent(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/ConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/ConnectionPropertiesComposite.java index bdda408506..2c3b4b55ed 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/ConnectionPropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/ConnectionPropertiesComposite.java @@ -11,15 +11,15 @@ package org.eclipse.jpt.eclipselink.ui.internal.connection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** * ConnectionPropertiesComposite */ -public class ConnectionPropertiesComposite extends AbstractPane<Connection> +public class ConnectionPropertiesComposite extends Pane<Connection> { - public ConnectionPropertiesComposite(AbstractPane<Connection> parentComposite, Composite parent) { + public ConnectionPropertiesComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); } @@ -27,7 +27,7 @@ public class ConnectionPropertiesComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - container = buildTitledPane( + container = addTitledGroup( container, EclipseLinkUiMessages.ConnectionPropertiesComposite_Database_GroupBox ); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/DataSourcePropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/DataSourcePropertiesComposite.java index 11a2533d19..726b0689b1 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/DataSourcePropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/DataSourcePropertiesComposite.java @@ -13,19 +13,20 @@ import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.ControlEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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 AbstractPane<Connection> { +public class DataSourcePropertiesComposite extends Pane<Connection> { /** * Creates a new <code>DataSourcePropertiesComposite</code>. @@ -33,7 +34,7 @@ public class DataSourcePropertiesComposite extends AbstractPane<Connection> { * @param parentPane The parent container of this one * @param parent The parent container */ - public DataSourcePropertiesComposite(AbstractPane<Connection> parentComposite, + public DataSourcePropertiesComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -103,34 +104,30 @@ public class DataSourcePropertiesComposite extends AbstractPane<Connection> { @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); - container = buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); + container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); // JTA Data Source - Text text = this.buildLabeledText( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_jtaDataSourceLabel, - buildJtaDataSourceHolder() - ); + Label jtaLabel = addUnmanagedLabel(container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_jtaDataSourceLabel); + Text text = addUnmanagedText(container, buildJtaDataSourceHolder(), null); + this.addLabeledComposite(container, jtaLabel, text, null); - this.installJTADataSourceControlEnabler(text); + this.installJTADataSourceControlEnabler(text, jtaLabel); // Non-JTA Data Source - text = this.buildLabeledText( - container, - EclipseLinkUiMessages.PersistenceXmlConnectionTab_nonJtaDataSourceLabel, - buildNonJtaDataSourceHolder() - ); + Label nonJtaLabel = addUnmanagedLabel(container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_nonJtaDataSourceLabel); + Text nonJtaText = addUnmanagedText(container, buildNonJtaDataSourceHolder(), null); + this.addLabeledComposite(container, nonJtaLabel, nonJtaText, null); - this.installNonJTADataSourceControlEnabler(text); + this.installNonJTADataSourceControlEnabler(nonJtaText, nonJtaLabel); } - private void installJTADataSourceControlEnabler(Text text) { - new ControlEnabler(buildJTADataSourceHolder(), text); + private void installJTADataSourceControlEnabler(Text text, Label label) { + new ControlEnabler(buildJTADataSourceHolder(), text, label); } - private void installNonJTADataSourceControlEnabler(Text text) { - new ControlEnabler(buildNonJTADataSourceHolder(), text); + private void installNonJTADataSourceControlEnabler(Text text, Label label) { + new ControlEnabler(buildNonJTADataSourceHolder(), text, label); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/EclipseLinkConnectionComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/EclipseLinkConnectionComposite.java index b267a226cd..3e593a59e8 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/EclipseLinkConnectionComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/EclipseLinkConnectionComposite.java @@ -11,17 +11,17 @@ package org.eclipse.jpt.eclipselink.ui.internal.connection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.swt.widgets.Composite; /** * EclipseLinkConnectionComposite */ public class EclipseLinkConnectionComposite - extends AbstractFormPane<Connection> + extends FormPane<Connection> { public EclipseLinkConnectionComposite( - AbstractFormPane<Connection> subjectHolder, + FormPane<Connection> subjectHolder, Composite container) { super(subjectHolder, container, false); } @@ -29,15 +29,15 @@ public class EclipseLinkConnectionComposite @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin() * 2; + int groupBoxMargin = getGroupBoxMargin() * 2; - container = buildSection( + container = addSection( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_sectionTitle, EclipseLinkUiMessages.PersistenceXmlConnectionTab_sectionDescription ); - Composite subPane = buildSubPane( + Composite subPane = addSubPane( container, 0, groupBoxMargin, 10, groupBoxMargin ); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcBindParametersComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcBindParametersComposite.java index a1f80707c7..3e48e99fc6 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcBindParametersComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcBindParametersComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.connection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * JdbcBindParametersComposite */ -public class JdbcBindParametersComposite extends AbstractPane<Connection> +public class JdbcBindParametersComposite extends Pane<Connection> { /** * Creates a new <code>JdbcBindParametersComposite</code>. @@ -33,7 +33,7 @@ public class JdbcBindParametersComposite extends AbstractPane<Connection> * The parent container */ public JdbcBindParametersComposite( - AbstractPane<? extends Connection> parentComposite, + Pane<? extends Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class JdbcBindParametersComposite extends AbstractPane<Connection> return new TransformationPropertyValueModel<Boolean, String>(buildBindParametersHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultBindParameters(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultBindParameters(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlConnectionTab_bindParametersLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class JdbcBindParametersComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_bindParametersLabel, this.buildBindParametersHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcConnectionPropertiesComposite.java index d4b856724c..f034feed68 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcConnectionPropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcConnectionPropertiesComposite.java @@ -26,7 +26,7 @@ import org.eclipse.jpt.db.JptDbPlugin; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.JptUiPlugin; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -40,14 +40,14 @@ import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; * JdbcConnectionPropertiesComposite */ @SuppressWarnings("nls") -public class JdbcConnectionPropertiesComposite extends AbstractPane<Connection> +public class JdbcConnectionPropertiesComposite extends Pane<Connection> { /** * The constant ID used to retrieve the dialog settings. */ private static final String DIALOG_SETTINGS = "org.eclipse.jpt.eclipselink.ui.dialogs.ConnectionDialog"; - public JdbcConnectionPropertiesComposite(AbstractPane<Connection> parentComposite, Composite parent) { + public JdbcConnectionPropertiesComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); } @@ -115,7 +115,7 @@ public class JdbcConnectionPropertiesComposite extends AbstractPane<Connection> protected void initializeLayout(Composite container) { // Populate from Connection hyperlink - this.buildHyperLink( + this.addHyperlink( container, "Populate from Connection...", buildPopulateFromConnectionAction() @@ -125,21 +125,21 @@ public class JdbcConnectionPropertiesComposite extends AbstractPane<Connection> new JdbcDriverComposite(this, container); // Url - this.buildLabeledText( + this.addLabeledText( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_urlLabel, buildUrlHolder() ); // User - this.buildLabeledText( + this.addLabeledText( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_userLabel, buildUserHolder() ); // Password - this.buildLabeledPasswordText( + this.addLabeledPasswordText( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_passwordLabel, buildPasswordHolder() @@ -160,7 +160,7 @@ public class JdbcConnectionPropertiesComposite extends AbstractPane<Connection> String name = (String) dialog.getResult()[0]; ConnectionProfile cp = this.getConnectionProfileFactory().buildConnectionProfile(name); - Connection connection = subject(); + Connection connection = getSubject(); connection.setUrl((cp == null) ? "" : cp.getURL()); connection.setUser((cp == null) ? "" : cp.getUserName()); connection.setPassword((cp == null) ? "" : cp.getUserPassword()); @@ -176,8 +176,8 @@ public class JdbcConnectionPropertiesComposite extends AbstractPane<Connection> } // broaden access a bit - Shell shell_() { - return this.shell(); + Shell getShell_() { + return this.getShell(); } /** @@ -190,7 +190,7 @@ public class JdbcConnectionPropertiesComposite extends AbstractPane<Connection> * Creates a new <code>MappingSelectionDialog</code>. */ protected ConnectionSelectionDialog() { - super(JdbcConnectionPropertiesComposite.this.shell_(), false); + super(JdbcConnectionPropertiesComposite.this.getShell_(), false); setMessage(EclipseLinkUiMessages.JdbcConnectionPropertiesComposite_ConnectionDialog_Message); setTitle(EclipseLinkUiMessages.JdbcConnectionPropertiesComposite_ConnectionDialog_Title); setListLabelProvider(buildLabelProvider()); 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 44dde05c93..a128bc12f6 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 @@ -18,7 +18,7 @@ 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.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Composite; /** * JdbcDriverComposite */ -public class JdbcDriverComposite extends AbstractPane<Connection> +public class JdbcDriverComposite extends Pane<Connection> { /** * Creates a new <code>EventListenerComposite</code>. @@ -35,7 +35,7 @@ public class JdbcDriverComposite extends AbstractPane<Connection> * @param parentPane The parent pane of this one * @param parent The parent container */ - public JdbcDriverComposite(AbstractPane<? extends Connection> parentPane, + public JdbcDriverComposite(Pane<? extends Connection> parentPane, Composite parent) { super(parentPane, parent); @@ -66,18 +66,18 @@ public class JdbcDriverComposite extends AbstractPane<Connection> } @Override - protected String className() { - return this.subject().getDriver(); + protected String getClassName() { + return this.getSubject().getDriver(); } @Override - protected String labelText() { + protected String getLabelText() { return EclipseLinkUiMessages.PersistenceXmlConnectionTab_driverLabel; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = this.subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = this.getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -95,7 +95,7 @@ public class JdbcDriverComposite extends AbstractPane<Connection> if (type != null) { String className = type.getFullyQualifiedName('.'); - this.subject().setDriver(className); + this.getSubject().setDriver(className); } } }; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcPropertiesComposite.java index 065a074319..c9da0cd0d5 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcPropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcPropertiesComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; import org.eclipse.jpt.eclipselink.core.internal.context.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.AbstractPane; +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; @@ -23,9 +23,9 @@ import org.eclipse.swt.widgets.Composite; /** * JdbcPropertiesComposite */ -public class JdbcPropertiesComposite extends AbstractPane<Connection> +public class JdbcPropertiesComposite extends Pane<Connection> { - public JdbcPropertiesComposite(AbstractPane<Connection> parentComposite, Composite parent) { + public JdbcPropertiesComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); } @@ -51,14 +51,14 @@ public class JdbcPropertiesComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - container = buildTitledPane( - buildSubPane(container, 10), + container = addTitledGroup( + addSubPane(container, 10), EclipseLinkUiMessages.JdbcPropertiesComposite_EclipseLinkConnectionPool_GroupBox ); new JdbcConnectionPropertiesComposite(this, container); - container = buildPane(container, new GridLayout(2, true)); + container = addPane(container, new GridLayout(2, true)); new JdbcReadConnectionPropertiesComposite(this, container); new JdbcWriteConnectionPropertiesComposite(this, container); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionPropertiesComposite.java index 94fe416459..893070134d 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionPropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionPropertiesComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.connection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -19,9 +19,9 @@ import org.eclipse.swt.widgets.Composite; /** * JdbcReadConnectionPropertiesComposite */ -public class JdbcReadConnectionPropertiesComposite extends AbstractPane<Connection> +public class JdbcReadConnectionPropertiesComposite extends Pane<Connection> { - public JdbcReadConnectionPropertiesComposite(AbstractPane<Connection> parentComposite, Composite parent) { + public JdbcReadConnectionPropertiesComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent, false); } @@ -29,7 +29,7 @@ public class JdbcReadConnectionPropertiesComposite extends AbstractPane<Connecti @Override protected void initializeLayout(Composite container) { - container = this.buildSection( + container = this.addSection( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsSectionTitle ); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMaxComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMaxComposite.java index e27a93fc75..fe940d8c6c 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMaxComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMaxComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Spinner; * JdbcReadConnectionsMaxComposite */ @SuppressWarnings("nls") -public class JdbcReadConnectionsMaxComposite extends AbstractPane<Connection> +public class JdbcReadConnectionsMaxComposite extends Pane<Connection> { /** * Creates a new <code>JdbcReadConnectionsMaxComposite</code>. @@ -39,7 +39,7 @@ public class JdbcReadConnectionsMaxComposite extends AbstractPane<Connection> * @param parent * The parent container */ - public JdbcReadConnectionsMaxComposite(AbstractPane<Connection> parentComposite, + public JdbcReadConnectionsMaxComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -88,9 +88,9 @@ public class JdbcReadConnectionsMaxComposite extends AbstractPane<Connection> }; } - private Control buildDefaultReadConnectionsMaxLabel(Composite container) { + private Control addDefaultReadConnectionsMaxLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, EclipseLinkUiMessages.DefaultWithoutValue ); @@ -122,14 +122,15 @@ public class JdbcReadConnectionsMaxComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - Spinner spinner = this.buildLabeledSpinner( + Spinner spinner = this.addLabeledSpinner( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsMaxLabel, this.buildReadConnectionsMaxHolder(), -1, -1, Integer.MAX_VALUE, - this.buildDefaultReadConnectionsMaxLabel(container) + this.addDefaultReadConnectionsMaxLabel(container), + null ); updateGridData(container, spinner); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMinComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMinComposite.java index 07c5f88113..c5b4278a60 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMinComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsMinComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Spinner; * JdbcReadConnectionsMinComposite */ @SuppressWarnings("nls") -public class JdbcReadConnectionsMinComposite extends AbstractPane<Connection> +public class JdbcReadConnectionsMinComposite extends Pane<Connection> { /** * Creates a new <code>JdbcReadConnectionsMinComposite</code>. @@ -39,7 +39,7 @@ public class JdbcReadConnectionsMinComposite extends AbstractPane<Connection> * @param parent * The parent container */ - public JdbcReadConnectionsMinComposite(AbstractPane<Connection> parentComposite, + public JdbcReadConnectionsMinComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -88,9 +88,9 @@ public class JdbcReadConnectionsMinComposite extends AbstractPane<Connection> }; } - private Control buildDefaultReadConnectionsMinLabel(Composite container) { + private Control addDefaultReadConnectionsMinLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, EclipseLinkUiMessages.DefaultWithoutValue ); @@ -122,14 +122,15 @@ public class JdbcReadConnectionsMinComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - Spinner spinner = this.buildLabeledSpinner( + Spinner spinner = this.addLabeledSpinner( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsMinLabel, this.buildReadConnectionsMinHolder(), -1, -1, Integer.MAX_VALUE, - this.buildDefaultReadConnectionsMinLabel(container) + this.addDefaultReadConnectionsMinLabel(container), + null ); updateGridData(container, spinner); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsSharedComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsSharedComposite.java index 547b654c24..29c383c3cf 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsSharedComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcReadConnectionsSharedComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.connection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * ReadConnectionsSharedComposite */ -public class JdbcReadConnectionsSharedComposite extends AbstractPane<Connection> +public class JdbcReadConnectionsSharedComposite extends Pane<Connection> { /** * Creates a new <code>ReadConnectionsSharedComposite</code>. @@ -33,7 +33,7 @@ public class JdbcReadConnectionsSharedComposite extends AbstractPane<Connection> * The parent container */ public JdbcReadConnectionsSharedComposite( - AbstractPane<? extends Connection> parentComposite, + Pane<? extends Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class JdbcReadConnectionsSharedComposite extends AbstractPane<Connection> return new TransformationPropertyValueModel<Boolean, String>(buildReadConnectionsSharedHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultReadConnectionsShared(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultReadConnectionsShared(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsSharedLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class JdbcReadConnectionsSharedComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_readConnectionsSharedLabel, this.buildReadConnectionsSharedHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionPropertiesComposite.java index c62c741194..c8e8f3f2c6 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionPropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionPropertiesComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.connection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -22,9 +22,9 @@ import org.eclipse.swt.widgets.Composite; * JdbcWriteConnectionPropertiesComposite */ @SuppressWarnings("nls") -public class JdbcWriteConnectionPropertiesComposite extends AbstractPane<Connection> +public class JdbcWriteConnectionPropertiesComposite extends Pane<Connection> { - public JdbcWriteConnectionPropertiesComposite(AbstractPane<Connection> parentComposite, Composite parent) { + public JdbcWriteConnectionPropertiesComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent, false); } @@ -32,7 +32,7 @@ public class JdbcWriteConnectionPropertiesComposite extends AbstractPane<Connect @Override protected void initializeLayout(Composite container) { - container = this.buildSection( + container = this.addSection( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_writeConnectionsSectionTitle ); @@ -46,7 +46,7 @@ public class JdbcWriteConnectionPropertiesComposite extends AbstractPane<Connect // 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.buildSubPane(container, size.y + 5); + container = this.addSubPane(container, size.y + 5); space.dispose(); // Write Connections Minimum diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMaxComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMaxComposite.java index d5336af9f0..41e05c72e0 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMaxComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMaxComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Spinner; * JdbcWriteConnectionsMaxComposite */ @SuppressWarnings("nls") -public class JdbcWriteConnectionsMaxComposite extends AbstractPane<Connection> +public class JdbcWriteConnectionsMaxComposite extends Pane<Connection> { /** * Creates a new <code>JdbcWriteConnectionsMaxComposite</code>. @@ -39,7 +39,7 @@ public class JdbcWriteConnectionsMaxComposite extends AbstractPane<Connection> * @param parent * The parent container */ - public JdbcWriteConnectionsMaxComposite(AbstractPane<Connection> parentComposite, + public JdbcWriteConnectionsMaxComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -88,9 +88,9 @@ public class JdbcWriteConnectionsMaxComposite extends AbstractPane<Connection> }; } - private Control buildDefaultWriteConnectionsMaxLabel(Composite container) { + private Control addDefaultWriteConnectionsMaxLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, EclipseLinkUiMessages.DefaultWithoutValue ); @@ -122,14 +122,15 @@ public class JdbcWriteConnectionsMaxComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - Spinner spinner = this.buildLabeledSpinner( + Spinner spinner = this.addLabeledSpinner( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_writeConnectionsMaxLabel, this.buildWriteConnectionsMaxHolder(), -1, -1, Integer.MAX_VALUE, - this.buildDefaultWriteConnectionsMaxLabel(container) + this.addDefaultWriteConnectionsMaxLabel(container), + null ); updateGridData(container, spinner); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMinComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMinComposite.java index bc39035de9..1a92d2c514 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMinComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/JdbcWriteConnectionsMinComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Spinner; * JdbcWriteConnectionsMinComposite */ @SuppressWarnings("nls") -public class JdbcWriteConnectionsMinComposite extends AbstractPane<Connection> +public class JdbcWriteConnectionsMinComposite extends Pane<Connection> { /** * Creates a new <code>JdbcWriteConnectionsMinComposite</code>. @@ -39,7 +39,7 @@ public class JdbcWriteConnectionsMinComposite extends AbstractPane<Connection> * @param parent * The parent container */ - public JdbcWriteConnectionsMinComposite(AbstractPane<Connection> parentComposite, + public JdbcWriteConnectionsMinComposite(Pane<Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -88,9 +88,9 @@ public class JdbcWriteConnectionsMinComposite extends AbstractPane<Connection> }; } - private Control buildDefaultWriteConnectionsMinLabel(Composite container) { + private Control addDefaultWriteConnectionsMinLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, EclipseLinkUiMessages.DefaultWithoutValue ); @@ -122,14 +122,15 @@ public class JdbcWriteConnectionsMinComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - Spinner spinner = this.buildLabeledSpinner( + Spinner spinner = this.addLabeledSpinner( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_writeConnectionsMinLabel, this.buildWriteConnectionsMinHolder(), -1, -1, Integer.MAX_VALUE, - this.buildDefaultWriteConnectionsMinLabel(container) + this.addDefaultWriteConnectionsMinLabel(container), + null ); updateGridData(container, spinner); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/NativeSqlComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/NativeSqlComposite.java index ea891c7860..d075f9e519 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/NativeSqlComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/NativeSqlComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.connection; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * NativeSqlComposite */ -public class NativeSqlComposite extends AbstractPane<Connection> +public class NativeSqlComposite extends Pane<Connection> { /** * Creates a new <code>NativeSqlComposite</code>. @@ -33,7 +33,7 @@ public class NativeSqlComposite extends AbstractPane<Connection> * The parent container */ public NativeSqlComposite( - AbstractPane<? extends Connection> parentComposite, + Pane<? extends Connection> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class NativeSqlComposite extends AbstractPane<Connection> return new TransformationPropertyValueModel<Boolean, String>(buildNativeSqlHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultNativeSql(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultNativeSql(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlConnectionTab_nativeSqlLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class NativeSqlComposite extends AbstractPane<Connection> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_nativeSqlLabel, this.buildNativeSqlHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/PersistenceXmlConnectionTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/PersistenceXmlConnectionTab.java index b1c3058679..c0f767934b 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/PersistenceXmlConnectionTab.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/PersistenceXmlConnectionTab.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.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.widgets.AbstractFormPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * PersistenceXmlConnectionTab */ public class PersistenceXmlConnectionTab - extends AbstractFormPane<Connection> + extends FormPane<Connection> implements JpaPageComposite { // ********** constructors/initialization ********** @@ -57,7 +57,7 @@ public class PersistenceXmlConnectionTab // ********** Layout ********** @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; layout.marginWidth = 0; @@ -66,7 +66,7 @@ public class PersistenceXmlConnectionTab layout.marginBottom = 0; layout.marginRight = 0; layout.verticalSpacing = 15; - Composite container = this.buildPane(parent, layout); + Composite container = this.addPane(parent, layout); this.updateGridData(container); return container; } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/TransactionTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/TransactionTypeComposite.java index f8432780e6..954943009e 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/TransactionTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/connection/TransactionTypeComposite.java @@ -13,14 +13,14 @@ import java.util.Collection; import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; /** * TransactionTypeComposite */ -public class TransactionTypeComposite extends AbstractFormPane<Connection> +public class TransactionTypeComposite extends FormPane<Connection> { /** * Creates a new <code>TransactionTypeComposite</code>. @@ -31,13 +31,13 @@ public class TransactionTypeComposite extends AbstractFormPane<Connection> * The parent container */ public TransactionTypeComposite( - AbstractFormPane<? extends Connection> parentComposite, + FormPane<? extends Connection> parentComposite, Composite parent) { super( parentComposite, parent); } - private EnumFormComboViewer<Connection, PersistenceUnitTransactionType> buildTransactionTypeCombo(Composite container) { + private EnumFormComboViewer<Connection, PersistenceUnitTransactionType> addTransactionTypeCombo(Composite container) { return new EnumFormComboViewer<Connection, PersistenceUnitTransactionType>(this, container) { @Override protected void addPropertyNames(Collection<String> propertyNames) { @@ -46,13 +46,13 @@ public class TransactionTypeComposite extends AbstractFormPane<Connection> } @Override - protected PersistenceUnitTransactionType[] choices() { + protected PersistenceUnitTransactionType[] getChoices() { return PersistenceUnitTransactionType.values(); } @Override - protected PersistenceUnitTransactionType defaultValue() { - return subject().getDefaultTransactionType(); + protected PersistenceUnitTransactionType getDefaultValue() { + return getSubject().getDefaultTransactionType(); } @Override @@ -62,12 +62,12 @@ public class TransactionTypeComposite extends AbstractFormPane<Connection> @Override protected PersistenceUnitTransactionType getValue() { - return subject().getTransactionType(); + return getSubject().getTransactionType(); } @Override protected void setValue(PersistenceUnitTransactionType value) { - subject().setTransactionType(value); + getSubject().setTransactionType(value); if (value == PersistenceUnitTransactionType.RESOURCE_LOCAL) { clearJTAProperties(); @@ -80,11 +80,11 @@ public class TransactionTypeComposite extends AbstractFormPane<Connection> } private void clearJTAProperties() { - subject().setJtaDataSource(null); + getSubject().setJtaDataSource(null); } private void clearResourceLocalProperties() { - Connection connection = subject(); + Connection connection = getSubject(); connection.setNonJtaDataSource(null); connection.setDriver(null); connection.setUrl(null); @@ -101,10 +101,10 @@ public class TransactionTypeComposite extends AbstractFormPane<Connection> @Override protected void initializeLayout( Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlConnectionTab_transactionTypeLabel, - this.buildTransactionTypeCombo( container), + this.addTransactionTypeCombo( container), null // TODO IJpaHelpContextIds. ); } 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 b68e09205f..96d5c683ce 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 @@ -18,7 +18,7 @@ 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.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Composite; /** * CustomizerComposite */ -public class CustomizerComposite extends AbstractPane<EntityCustomizerProperties> +public class CustomizerComposite extends Pane<EntityCustomizerProperties> { /** * Creates a new <code>CustomizerComposite</code>. @@ -35,7 +35,7 @@ public class CustomizerComposite extends AbstractPane<EntityCustomizerProperties * @param parentPane The parent pane of this one * @param parent The parent container */ - public CustomizerComposite(AbstractPane<? extends EntityCustomizerProperties> parentPane, + public CustomizerComposite(Pane<? extends EntityCustomizerProperties> parentPane, Composite parent) { super(parentPane, parent); @@ -66,18 +66,18 @@ public class CustomizerComposite extends AbstractPane<EntityCustomizerProperties } @Override - protected String className() { - return subject().getDescriptorCustomizer(); + protected String getClassName() { + return getSubject().getDescriptorCustomizer(); } @Override - protected String labelText() { + protected String getLabelText() { return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_customizerLabel; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -95,7 +95,7 @@ public class CustomizerComposite extends AbstractPane<EntityCustomizerProperties if (type != null) { String className = type.getFullyQualifiedName('.'); - subject().setDescriptorCustomizer(className); + getSubject().setDescriptorCustomizer(className); } } }; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EclipseLinkCustomizationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EclipseLinkCustomizationComposite.java index 648b7fc1ae..723dca2750 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EclipseLinkCustomizationComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EclipseLinkCustomizationComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -21,9 +21,9 @@ import org.eclipse.ui.forms.widgets.Section; /** * PersistenceUnitCustomizationComposite */ -public class EclipseLinkCustomizationComposite extends AbstractFormPane<Customization> +public class EclipseLinkCustomizationComposite extends FormPane<Customization> { - public EclipseLinkCustomizationComposite(AbstractFormPane<Customization> subjectHolder, + public EclipseLinkCustomizationComposite(FormPane<Customization> subjectHolder, Composite container) { super(subjectHolder, container); @@ -36,13 +36,13 @@ public class EclipseLinkCustomizationComposite extends AbstractFormPane<Customiz section.setDescription(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_sectionDescription); section.setLayoutData(new GridData(GridData.FILL_BOTH)); - Composite composite = this.buildSubPane(section); + Composite composite = this.addSubPane(section); section.setClient(composite); // Default pane - int groupBoxMargin = this.groupBoxMargin(); + int groupBoxMargin = this.getGroupBoxMargin(); - Composite defaultPane = this.buildSubPane( + Composite defaultPane = this.addSubPane( composite, 0, groupBoxMargin, 0, groupBoxMargin ); diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityCustomizationPropertyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityCustomizationPropertyComposite.java index bdbfcb5d75..57059c6594 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityCustomizationPropertyComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/EntityCustomizationPropertyComposite.java @@ -10,14 +10,14 @@ package org.eclipse.jpt.eclipselink.ui.internal.customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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 AbstractPane<EntityCustomizerProperties> { +public class EntityCustomizationPropertyComposite extends Pane<EntityCustomizerProperties> { /** * Creates a new <code>EntityCustomizationPropertyComposite</code>. @@ -26,7 +26,7 @@ public class EntityCustomizationPropertyComposite extends AbstractPane<EntityCus * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public EntityCustomizationPropertyComposite(AbstractPane<Customization> parentComposite, + public EntityCustomizationPropertyComposite(Pane<Customization> parentComposite, PropertyValueModel<EntityCustomizerProperties> subjectHolder, Composite parent) { 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 c34b8d9b5b..2f93f06549 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 @@ -33,7 +33,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customiza import org.eclipse.jpt.eclipselink.ui.JptEclipseLinkUiPlugin; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; @@ -52,11 +52,11 @@ import org.eclipse.ui.progress.IProgressService; /** * EntityListComposite */ -public class EntityListComposite extends AbstractPane<Customization> +public class EntityListComposite extends Pane<Customization> { private WritablePropertyValueModel<EntityCustomizerProperties> entityHolder; - public EntityListComposite(AbstractPane<Customization> parentComposite, Composite parent) { + public EntityListComposite(Pane<Customization> parentComposite, Composite parent) { super(parentComposite, parent); } @@ -70,7 +70,7 @@ public class EntityListComposite extends AbstractPane<Customization> @Override protected void initializeLayout(Composite container) { - container = this.buildTitledPane( + container = this.addTitledGroup( container, EclipseLinkUiMessages.CustomizationEntityListComposite_groupTitle ); @@ -102,7 +102,7 @@ public class EntityListComposite extends AbstractPane<Customization> } public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - Customization customization = subject(); + Customization customization = getSubject(); for (Object item : listSelectionModel.selectedValues()) { EntityCustomizerProperties entityCustomization = (EntityCustomizerProperties) item; customization.removeEntity(entityCustomization.getEntityName()); @@ -121,10 +121,10 @@ public class EntityListComposite extends AbstractPane<Customization> entityName = type.getElementName(); } - if( ! this.subject().entityExists(entityName)) { - String entity = this.subject().addEntity(entityName); + if( ! this.getSubject().entityExists(entityName)) { + String entity = this.getSubject().addEntity(entityName); - int index = CollectionTools.indexOf(this.subject().entities(), entityName); + int index = CollectionTools.indexOf(this.getSubject().entities(), entityName); EntityCustomizerProperties item = (EntityCustomizerProperties) listSelectionModel.getListModel().getElementAt(index); entityHolder.setValue(item); } @@ -133,7 +133,7 @@ public class EntityListComposite extends AbstractPane<Customization> private String getEntityName(String fullyQualifiedTypeName) { - PersistentType persistentType = subject().persistenceUnit().getPersistentType(fullyQualifiedTypeName); + PersistentType persistentType = getSubject().persistenceUnit().getPersistentType(fullyQualifiedTypeName); if (persistentType != null && persistentType.getMappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { TypeMapping mapping = persistentType.getMapping(); @@ -146,7 +146,7 @@ public class EntityListComposite extends AbstractPane<Customization> private IType chooseEntity() { - IPackageFragmentRoot root = packageFragmentRoot(); + IPackageFragmentRoot root = getPackageFragmentRoot(); if (root == null) { return null; } @@ -157,7 +157,7 @@ public class EntityListComposite extends AbstractPane<Customization> try { typeSelectionDialog = JavaUI.createTypeDialog( - shell(), + getShell(), service, scope, IJavaElementSearchConstants.CONSIDER_CLASSES, @@ -178,8 +178,8 @@ public class EntityListComposite extends AbstractPane<Customization> return null; } - private IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + private IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -209,7 +209,7 @@ public class EntityListComposite extends AbstractPane<Customization> return new TransformationListValueModelAdapter<String, EntityCustomizerProperties>(buildEntitiesListHolder()) { @Override protected EntityCustomizerProperties transformItem(String item) { - return new EntityCustomizerProperties(subject(), item); + return new EntityCustomizerProperties(getSubject(), item); } }; } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/PersistenceXmlCustomizationTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/PersistenceXmlCustomizationTab.java index c547986f4c..2a63002656 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/PersistenceXmlCustomizationTab.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/PersistenceXmlCustomizationTab.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customiza 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.AbstractFormPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * PersistenceXmlCustomizationTabItem */ public class PersistenceXmlCustomizationTab - extends AbstractFormPane<Customization> + extends FormPane<Customization> implements JpaPageComposite { public PersistenceXmlCustomizationTab( @@ -58,7 +58,7 @@ public class PersistenceXmlCustomizationTab // ********** Layout ********** @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; layout.marginWidth = 0; @@ -68,7 +68,7 @@ public class PersistenceXmlCustomizationTab layout.marginRight = 0; layout.verticalSpacing = 15; - Composite container = buildPane(parent, layout); + Composite container = addPane(parent, layout); updateGridData(container); return container; 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 5cc9cecfff..80d97b181b 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 @@ -18,7 +18,7 @@ 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.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Composite; /** * SessionCustomizerComposite */ -public class SessionCustomizerComposite extends AbstractPane<Customization> +public class SessionCustomizerComposite extends Pane<Customization> { /** * Creates a new <code>SessionCustomizerComposite</code>. @@ -35,7 +35,7 @@ public class SessionCustomizerComposite extends AbstractPane<Customization> * @param parentPane The parent pane of this one * @param parent The parent container */ - public SessionCustomizerComposite(AbstractPane<? extends Customization> parentPane, + public SessionCustomizerComposite(Pane<? extends Customization> parentPane, Composite parent) { super(parentPane, parent); @@ -66,18 +66,18 @@ public class SessionCustomizerComposite extends AbstractPane<Customization> } @Override - protected String className() { - return subject().getSessionCustomizer(); + protected String getClassName() { + return getSubject().getSessionCustomizer(); } @Override - protected String labelText() { + protected String getLabelText() { return EclipseLinkUiMessages.PersistenceXmlCustomizationTab_sessionCustomizerLabel; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -95,7 +95,7 @@ public class SessionCustomizerComposite extends AbstractPane<Customization> if (type != null) { String className = type.getFullyQualifiedName('.'); - subject().setSessionCustomizer(className); + getSubject().setSessionCustomizer(className); } } }; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/ThrowExceptionsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/ThrowExceptionsComposite.java index 9257a1ca24..f6e4c75c48 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/ThrowExceptionsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/ThrowExceptionsComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * ThrowExceptionsComposite */ -public class ThrowExceptionsComposite extends AbstractFormPane<Customization> +public class ThrowExceptionsComposite extends FormPane<Customization> { /** * Creates a new <code>ThrowExceptionsComposite</code>. @@ -33,7 +33,7 @@ public class ThrowExceptionsComposite extends AbstractFormPane<Customization> * The parent container */ public ThrowExceptionsComposite( - AbstractFormPane<? extends Customization> parentComposite, + FormPane<? extends Customization> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class ThrowExceptionsComposite extends AbstractFormPane<Customization> return new TransformationPropertyValueModel<Boolean, String>(buildThrowExceptionsHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultThrowExceptions(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultThrowExceptions(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_throwExceptionsLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class ThrowExceptionsComposite extends AbstractFormPane<Customization> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlCustomizationTab_throwExceptionsLabel, this.buildThrowExceptionsHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingChangeTrackingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingChangeTrackingComposite.java index ff2b0d7d75..a5ab0f1d77 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingChangeTrackingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingChangeTrackingComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * WeavingChangeTrackingComposite */ -public class WeavingChangeTrackingComposite extends AbstractFormPane<Customization> +public class WeavingChangeTrackingComposite extends FormPane<Customization> { /** * Creates a new <code>WeavingChangeTrackingComposite</code>. @@ -33,7 +33,7 @@ public class WeavingChangeTrackingComposite extends AbstractFormPane<Customizati * The parent container */ public WeavingChangeTrackingComposite( - AbstractFormPane<? extends Customization> parentComposite, + FormPane<? extends Customization> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class WeavingChangeTrackingComposite extends AbstractFormPane<Customizati return new TransformationPropertyValueModel<Boolean, String>(buildWeavingChangeTrackingHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultWeavingChangeTracking(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultWeavingChangeTracking(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingChangeTrackingLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class WeavingChangeTrackingComposite extends AbstractFormPane<Customizati @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingChangeTrackingLabel, this.buildWeavingChangeTrackingHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingComposite.java index d1b078a77d..b0493c93ce 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingComposite.java @@ -14,14 +14,14 @@ import java.util.Collection; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Weaving; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; /** * WeavingComposite */ -public class WeavingComposite extends AbstractFormPane<Customization> +public class WeavingComposite extends FormPane<Customization> { /** * Creates a new <code>WeavingComposite</code>. @@ -32,13 +32,13 @@ public class WeavingComposite extends AbstractFormPane<Customization> * The parent container */ public WeavingComposite( - AbstractFormPane<? extends Customization> parentComposite, + FormPane<? extends Customization> parentComposite, Composite parent) { super( parentComposite, parent); } - private EnumFormComboViewer<Customization, Weaving> buildWeavingCombo(Composite container) { + private EnumFormComboViewer<Customization, Weaving> addWeavingCombo(Composite container) { return new EnumFormComboViewer<Customization, Weaving>(this, container) { @Override protected void addPropertyNames(Collection<String> propertyNames) { @@ -47,13 +47,13 @@ public class WeavingComposite extends AbstractFormPane<Customization> } @Override - protected Weaving[] choices() { + protected Weaving[] getChoices() { return Weaving.values(); } @Override - protected Weaving defaultValue() { - return subject().getDefaultWeaving(); + protected Weaving getDefaultValue() { + return getSubject().getDefaultWeaving(); } @Override @@ -63,12 +63,12 @@ public class WeavingComposite extends AbstractFormPane<Customization> @Override protected Weaving getValue() { - return subject().getWeaving(); + return getSubject().getWeaving(); } @Override protected void setValue(Weaving value) { - subject().setWeaving(value); + getSubject().setWeaving(value); } }; } @@ -76,10 +76,10 @@ public class WeavingComposite extends AbstractFormPane<Customization> @Override protected void initializeLayout( Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingLabel, - this.buildWeavingCombo( container), + this.addWeavingCombo( container), null // TODO IJpaHelpContextIds. ); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingFetchGroupsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingFetchGroupsComposite.java index 7e1f1829d8..5edda49ed2 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingFetchGroupsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingFetchGroupsComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * WeavingFetchGroupsComposite */ -public class WeavingFetchGroupsComposite extends AbstractFormPane<Customization> +public class WeavingFetchGroupsComposite extends FormPane<Customization> { /** * Creates a new <code>WeavingFetchGroupsComposite</code>. @@ -33,7 +33,7 @@ public class WeavingFetchGroupsComposite extends AbstractFormPane<Customization> * The parent container */ public WeavingFetchGroupsComposite( - AbstractFormPane<? extends Customization> parentComposite, + FormPane<? extends Customization> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class WeavingFetchGroupsComposite extends AbstractFormPane<Customization> return new TransformationPropertyValueModel<Boolean, String>(buildWeavingLazyHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultWeavingLazy(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultWeavingLazy(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingFetchGroupsLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class WeavingFetchGroupsComposite extends AbstractFormPane<Customization> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingFetchGroupsLabel, this.buildWeavingLazyHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingLazyComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingLazyComposite.java index 67d4adf1c5..421174b468 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingLazyComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/customization/WeavingLazyComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.customization; import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * WeavingLazyComposite */ -public class WeavingLazyComposite extends AbstractFormPane<Customization> +public class WeavingLazyComposite extends FormPane<Customization> { /** * Creates a new <code>WeavingLazyComposite</code>. @@ -33,7 +33,7 @@ public class WeavingLazyComposite extends AbstractFormPane<Customization> * The parent container */ public WeavingLazyComposite( - AbstractFormPane<? extends Customization> parentComposite, + FormPane<? extends Customization> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class WeavingLazyComposite extends AbstractFormPane<Customization> return new TransformationPropertyValueModel<Boolean, String>(buildWeavingLazyHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultWeavingLazy(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultWeavingLazy(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingLazyLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class WeavingLazyComposite extends AbstractFormPane<Customization> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlCustomizationTab_weavingLazyLabel, this.buildWeavingLazyHolder(), 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 index c01aa2e3b8..819f920f4c 100644 --- 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 @@ -61,8 +61,8 @@ public class EclipseLinkJavaEntityComposite extends AbstractEntityComposite<Java protected void initializeCachingPane(Composite container) { - container = buildCollapsableSection( - buildSubPane(container, 5), + container = addCollapsableSection( + addSubPane(container, 5), EclipseLinkUiMappingsMessages.EclipseLinkJavaEntityComposite_caching ); @@ -82,12 +82,12 @@ public class EclipseLinkJavaEntityComposite extends AbstractEntityComposite<Java } @Override - protected void buildSecondaryTablesComposite(Composite container) { + protected void addSecondaryTablesComposite(Composite container) { new JavaSecondaryTablesComposite(this, container); } @Override - protected void buildInheritanceComposite(Composite container) { + protected void addInheritanceComposite(Composite container) { new JavaInheritanceComposite(this, container); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/EclipseLinkLoggingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/EclipseLinkLoggingComposite.java index 2ec15d0a07..0ff2c77ccc 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/EclipseLinkLoggingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/EclipseLinkLoggingComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.logging; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -23,10 +23,10 @@ import org.eclipse.ui.forms.widgets.Section; * EclipseLinkLoggingComposite */ public class EclipseLinkLoggingComposite - extends AbstractFormPane<Logging> + extends FormPane<Logging> { public EclipseLinkLoggingComposite( - AbstractFormPane<Logging> subjectHolder, + FormPane<Logging> subjectHolder, Composite container) { super(subjectHolder, container, false); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ExceptionsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ExceptionsComposite.java index 80e6dbc130..bf422971db 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ExceptionsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ExceptionsComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.logging; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * ExceptionsComposite */ -public class ExceptionsComposite extends AbstractFormPane<Logging> +public class ExceptionsComposite extends FormPane<Logging> { /** * Creates a new <code>ExceptionsComposite</code>. @@ -33,7 +33,7 @@ public class ExceptionsComposite extends AbstractFormPane<Logging> * The parent container */ public ExceptionsComposite( - AbstractFormPane<? extends Logging> parentComposite, + FormPane<? extends Logging> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class ExceptionsComposite extends AbstractFormPane<Logging> return new TransformationPropertyValueModel<Boolean, String>(buildExceptionsHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultExceptions(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultExceptions(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_exceptionsLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class ExceptionsComposite extends AbstractFormPane<Logging> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlLoggingTab_exceptionsLabel, this.buildExceptionsHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggerComposite.java index c7d60bf24d..943acf62de 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggerComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggerComposite.java @@ -18,7 +18,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logger; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Composite; /** * LoggerComposite */ -public class LoggerComposite extends AbstractPane<Logging> +public class LoggerComposite extends Pane<Logging> { /** * Creates a new <code>LoggerComposite</code>. @@ -47,7 +47,7 @@ public class LoggerComposite extends AbstractPane<Logging> * @param parent The parent container */ public LoggerComposite( - AbstractPane<? extends Logging> parentPane, + Pane<? extends Logging> parentPane, Composite parent) { super(parentPane, parent); @@ -57,7 +57,7 @@ public class LoggerComposite extends AbstractPane<Logging> return new PropertyAspectAdapter<Logging, String>(this.getSubjectHolder(), Logging.DEFAULT_LOGGER) { @Override protected String buildValue_() { - return LoggerComposite.this.defaultValue(subject); + return LoggerComposite.this.getDefaultValue(subject); } }; } @@ -118,7 +118,7 @@ public class LoggerComposite extends AbstractPane<Logging> String name = subject.getLogger(); if (name == null) { - name = LoggerComposite.this.defaultValue(subject); + name = LoggerComposite.this.getDefaultValue(subject); } return name; } @@ -126,7 +126,7 @@ public class LoggerComposite extends AbstractPane<Logging> @Override protected void setValue_(String value) { - if (defaultValue(subject).equals(value)) { + if (getDefaultValue(subject).equals(value)) { value = null; } subject.setLogger(value); @@ -163,7 +163,7 @@ public class LoggerComposite extends AbstractPane<Logging> ); } - private String defaultValue(Logging subject) { + private String getDefaultValue(Logging subject) { String defaultValue = subject.getDefaultLogger(); if (defaultValue != null) { @@ -183,7 +183,7 @@ public class LoggerComposite extends AbstractPane<Logging> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, EclipseLinkUiMessages.PersistenceXmlLoggingTab_loggerLabel, this.buildLoggerListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingFileLocationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingFileLocationComposite.java index e034c2d729..b47852a459 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingFileLocationComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingFileLocationComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.logging; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.FolderChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -21,9 +21,9 @@ import org.eclipse.swt.widgets.Composite; /** * LoggingFileLocationComposite */ -public class LoggingFileLocationComposite extends AbstractPane<Logging> +public class LoggingFileLocationComposite extends Pane<Logging> { - public LoggingFileLocationComposite(AbstractPane<? extends Logging> parentPane, + public LoggingFileLocationComposite(Pane<? extends Logging> parentPane, Composite parent) { super(parentPane, parent); @@ -74,17 +74,17 @@ public class LoggingFileLocationComposite extends AbstractPane<Logging> } @Override - protected String dialogMessage() { + protected String getDialogMessage() { return EclipseLinkUiMessages.LoggingFileLocationComposite_dialogMessage; } @Override - protected String dialogTitle() { + protected String getDialogTitle() { return EclipseLinkUiMessages.LoggingFileLocationComposite_dialogTitle; } @Override - protected String labelText() { + protected String getLabelText() { return EclipseLinkUiMessages.PersistenceXmlLoggingTab_loggingFileLabel; } }; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingLevelComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingLevelComposite.java index 6b862f69d6..cf6e041df1 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingLevelComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/LoggingLevelComposite.java @@ -13,14 +13,14 @@ import java.util.Collection; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.core.internal.context.logging.LoggingLevel; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; /** * LoggingLevelComposite */ -public class LoggingLevelComposite extends AbstractFormPane<Logging> +public class LoggingLevelComposite extends FormPane<Logging> { /** * Creates a new <code>LoggingLevelComposite</code>. @@ -31,13 +31,13 @@ public class LoggingLevelComposite extends AbstractFormPane<Logging> * The parent container */ public LoggingLevelComposite( - AbstractFormPane<? extends Logging> parentComposite, + FormPane<? extends Logging> parentComposite, Composite parent) { super(parentComposite, parent); } - private EnumFormComboViewer<Logging, LoggingLevel> buildLoggingLevelCombo(Composite container) { + private EnumFormComboViewer<Logging, LoggingLevel> addLoggingLevelCombo(Composite container) { return new EnumFormComboViewer<Logging, LoggingLevel>(this, container) { @Override protected void addPropertyNames(Collection<String> propertyNames) { @@ -46,7 +46,7 @@ public class LoggingLevelComposite extends AbstractFormPane<Logging> } @Override - protected LoggingLevel[] choices() { + protected LoggingLevel[] getChoices() { return LoggingLevel.values(); } @@ -56,8 +56,8 @@ public class LoggingLevelComposite extends AbstractFormPane<Logging> } @Override - protected LoggingLevel defaultValue() { - return this.subject().getDefaultLevel(); + protected LoggingLevel getDefaultValue() { + return this.getSubject().getDefaultLevel(); } @Override @@ -67,22 +67,22 @@ public class LoggingLevelComposite extends AbstractFormPane<Logging> @Override protected LoggingLevel getValue() { - return this.subject().getLevel(); + return this.getSubject().getLevel(); } @Override protected void setValue(LoggingLevel value) { - this.subject().setLevel(value); + this.getSubject().setLevel(value); } }; } @Override protected void initializeLayout(Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlLoggingTab_loggingLevelLabel, - this.buildLoggingLevelCombo(container), + this.addLoggingLevelCombo(container), null // TODO IJpaHelpContextIds. ); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/PersistenceXmlLoggingTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/PersistenceXmlLoggingTab.java index 25f2c860f8..99660db62b 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/PersistenceXmlLoggingTab.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/PersistenceXmlLoggingTab.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; 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.AbstractFormPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * PersistenceXmlLoggingTab */ public class PersistenceXmlLoggingTab - extends AbstractFormPane<Logging> + extends FormPane<Logging> implements JpaPageComposite { // ********** constructors/initialization ********** @@ -57,7 +57,7 @@ public class PersistenceXmlLoggingTab // ********** Layout ********** @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; layout.marginWidth = 0; @@ -66,7 +66,7 @@ public class PersistenceXmlLoggingTab layout.marginBottom = 0; layout.marginRight = 0; layout.verticalSpacing = 15; - Composite container = this.buildPane(parent, layout); + Composite container = this.addPane(parent, layout); this.updateGridData(container); return container; } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/SessionComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/SessionComposite.java index 81c223f41f..e550559cf3 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/SessionComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/SessionComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.logging; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * SessionComposite */ -public class SessionComposite extends AbstractFormPane<Logging> +public class SessionComposite extends FormPane<Logging> { /** * Creates a new <code>SessionComposite</code>. @@ -33,7 +33,7 @@ public class SessionComposite extends AbstractFormPane<Logging> * The parent container */ public SessionComposite( - AbstractFormPane<? extends Logging> parentComposite, + FormPane<? extends Logging> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class SessionComposite extends AbstractFormPane<Logging> return new TransformationPropertyValueModel<Boolean, String>(buildSessionHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultSession(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultSession(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_sessionLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class SessionComposite extends AbstractFormPane<Logging> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlLoggingTab_sessionLabel, this.buildSessionHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ThreadComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ThreadComposite.java index 987c5332c1..dc33767768 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ThreadComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/ThreadComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.logging; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * ThreadComposite */ -public class ThreadComposite extends AbstractFormPane<Logging> +public class ThreadComposite extends FormPane<Logging> { /** * Creates a new <code>ThreadComposite</code>. @@ -33,7 +33,7 @@ public class ThreadComposite extends AbstractFormPane<Logging> * The parent container */ public ThreadComposite( - AbstractFormPane<? extends Logging> parentComposite, + FormPane<? extends Logging> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class ThreadComposite extends AbstractFormPane<Logging> return new TransformationPropertyValueModel<Boolean, String>(buildThreadHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultThread(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultThread(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_threadLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class ThreadComposite extends AbstractFormPane<Logging> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlLoggingTab_threadLabel, this.buildThreadHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/TimestampComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/TimestampComposite.java index c04f8735b7..5fa436b328 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/TimestampComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/logging/TimestampComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.logging; import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * TimestampComposite */ -public class TimestampComposite extends AbstractFormPane<Logging> +public class TimestampComposite extends FormPane<Logging> { /** * Creates a new <code>TimestampComposite</code>. @@ -33,7 +33,7 @@ public class TimestampComposite extends AbstractFormPane<Logging> * The parent container */ public TimestampComposite( - AbstractFormPane<? extends Logging> parentComposite, + FormPane<? extends Logging> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class TimestampComposite extends AbstractFormPane<Logging> return new TransformationPropertyValueModel<Boolean, String>(buildTimestampHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultTimestamp(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultTimestamp(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlLoggingTab_timestampLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class TimestampComposite extends AbstractFormPane<Logging> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlLoggingTab_timestampLabel, this.buildTimestampHolder(), 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 index 28b8b8bfe5..0dc9fbdf13 100644 --- 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 @@ -13,7 +13,7 @@ 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.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; @@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.1 * @since 2.1 */ -public class AlwaysRefreshComposite extends AbstractFormPane<EclipseLinkCaching> +public class AlwaysRefreshComposite extends FormPane<EclipseLinkCaching> { /** * Creates a new <code>OptionalComposite</code>. @@ -39,7 +39,7 @@ public class AlwaysRefreshComposite extends AbstractFormPane<EclipseLinkCaching> * @param parentPane The parent container of this one * @param parent The parent container */ - public AlwaysRefreshComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + public AlwaysRefreshComposite(FormPane<? extends EclipseLinkCaching> parentPane, Composite parent) { super(parentPane, parent); @@ -78,9 +78,9 @@ public class AlwaysRefreshComposite extends AbstractFormPane<EclipseLinkCaching> @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultAlwaysRefresh(); + Boolean defaultValue = getSubject().getDefaultAlwaysRefresh(); if (defaultValue != null) { @@ -105,7 +105,7 @@ public class AlwaysRefreshComposite extends AbstractFormPane<EclipseLinkCaching> @Override protected void initializeLayout(Composite container) { - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, EclipseLinkUiMappingsMessages.AlwaysRefreshComposite_alwaysRefreshLabel, buildAlwaysRefreshHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheCoordinationTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheCoordinationTypeComposite.java index f2bd9cb60e..00462928e2 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheCoordinationTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheCoordinationTypeComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.context.CacheCoordinationType; 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.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; @@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.1 * @since 2.1 */ -public class CacheCoordinationTypeComposite extends AbstractFormPane<EclipseLinkCaching> { +public class CacheCoordinationTypeComposite extends FormPane<EclipseLinkCaching> { /** * Creates a new <code>CacheTypeComposite</code>. @@ -40,13 +40,13 @@ public class CacheCoordinationTypeComposite extends AbstractFormPane<EclipseLink * @param parentPane The parent container of this one * @param parent The parent container */ - public CacheCoordinationTypeComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + public CacheCoordinationTypeComposite(FormPane<? extends EclipseLinkCaching> parentPane, Composite parent) { super(parentPane, parent); } - private EnumFormComboViewer<EclipseLinkCaching, CacheCoordinationType> buildCacheCoordinationTypeCombo(Composite container) { + private EnumFormComboViewer<EclipseLinkCaching, CacheCoordinationType> addCacheCoordinationTypeCombo(Composite container) { return new EnumFormComboViewer<EclipseLinkCaching, CacheCoordinationType>(this, container) { @@ -58,13 +58,13 @@ public class CacheCoordinationTypeComposite extends AbstractFormPane<EclipseLink } @Override - protected CacheCoordinationType[] choices() { + protected CacheCoordinationType[] getChoices() { return CacheCoordinationType.values(); } @Override - protected CacheCoordinationType defaultValue() { - return subject().getDefaultCoordinationType(); + protected CacheCoordinationType getDefaultValue() { + return getSubject().getDefaultCoordinationType(); } @Override @@ -78,12 +78,12 @@ public class CacheCoordinationTypeComposite extends AbstractFormPane<EclipseLink @Override protected CacheCoordinationType getValue() { - return subject().getSpecifiedCoordinationType(); + return getSubject().getSpecifiedCoordinationType(); } @Override protected void setValue(CacheCoordinationType value) { - subject().setSpecifiedCoordinationType(value); + getSubject().setSpecifiedCoordinationType(value); } @Override @@ -96,10 +96,10 @@ public class CacheCoordinationTypeComposite extends AbstractFormPane<EclipseLink @Override protected void initializeLayout(Composite container) { - buildLabeledComposite( + addLabeledComposite( container, EclipseLinkUiMappingsMessages.CacheCoordinationTypeComposite_label, - buildCacheCoordinationTypeCombo(container), + addCacheCoordinationTypeCombo(container), EclipseLinkHelpContextIds.CACHING_CACHE_COORDINATION_TYPE ); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheSizeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheSizeComposite.java index 3cf27cf686..15b60889e8 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheSizeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/CacheSizeComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMes import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -40,7 +40,7 @@ import org.eclipse.swt.widgets.Spinner; * @version 2.1 * @since 2.1 */ -public class CacheSizeComposite extends AbstractFormPane<EclipseLinkCaching> { +public class CacheSizeComposite extends FormPane<EclipseLinkCaching> { /** * Creates a new <code>CacheSizeComposite</code>. @@ -48,7 +48,7 @@ public class CacheSizeComposite extends AbstractFormPane<EclipseLinkCaching> { * @param parentPane The parent container of this one * @param parent The parent container */ - public CacheSizeComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + public CacheSizeComposite(FormPane<? extends EclipseLinkCaching> parentPane, Composite parent) { super(parentPane, parent); @@ -58,15 +58,15 @@ public class CacheSizeComposite extends AbstractFormPane<EclipseLinkCaching> { protected void initializeLayout(Composite container) { // Size widgets - Spinner sizeSpinner = buildLabeledSpinner( + Spinner sizeSpinner = addLabeledSpinner( container, EclipseLinkUiMappingsMessages.CacheSizeComposite_size, buildSizeHolder(), -1, -1, Integer.MAX_VALUE, - buildDefaultSizeLabel(container)//, - //TODO JpaHelpContextIds.MAPPING_COLUMN_LENGTH + addDefaultSizeLabel(container), + null//TODO JpaHelpContextIds.MAPPING_COLUMN_LENGTH ); updateGridData(container, sizeSpinner); @@ -110,9 +110,9 @@ public class CacheSizeComposite extends AbstractFormPane<EclipseLinkCaching> { }; } - private Control buildDefaultSizeLabel(Composite container) { + private Control addDefaultSizeLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, JptUiMappingsMessages.DefaultWithoutValue ); @@ -132,7 +132,7 @@ public class CacheSizeComposite extends AbstractFormPane<EclipseLinkCaching> { @Override protected String transform(Integer value) { - Integer defaultValue = (subject() != null) ? subject().getDefaultSize() : + Integer defaultValue = (getSubject() != null) ? getSubject().getDefaultSize() : EclipseLinkCaching.DEFAULT_SIZE; return NLS.bind( 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 index 2dae68f452..b3b86d4959 100644 --- 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 @@ -13,7 +13,7 @@ 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.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; @@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.1 * @since 2.1 */ -public class CacheTypeComposite extends AbstractFormPane<EclipseLinkCaching> { +public class CacheTypeComposite extends FormPane<EclipseLinkCaching> { /** * Creates a new <code>CacheTypeComposite</code>. @@ -40,13 +40,13 @@ public class CacheTypeComposite extends AbstractFormPane<EclipseLinkCaching> { * @param parentPane The parent container of this one * @param parent The parent container */ - public CacheTypeComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + public CacheTypeComposite(FormPane<? extends EclipseLinkCaching> parentPane, Composite parent) { super(parentPane, parent); } - private EnumFormComboViewer<EclipseLinkCaching, CacheType> buildCacheTypeCombo(Composite container) { + private EnumFormComboViewer<EclipseLinkCaching, CacheType> addCacheTypeCombo(Composite container) { return new EnumFormComboViewer<EclipseLinkCaching, CacheType>(this, container) { @@ -58,13 +58,13 @@ public class CacheTypeComposite extends AbstractFormPane<EclipseLinkCaching> { } @Override - protected CacheType[] choices() { + protected CacheType[] getChoices() { return CacheType.values(); } @Override - protected CacheType defaultValue() { - return subject().getDefaultType(); + protected CacheType getDefaultValue() { + return getSubject().getDefaultType(); } @Override @@ -78,12 +78,12 @@ public class CacheTypeComposite extends AbstractFormPane<EclipseLinkCaching> { @Override protected CacheType getValue() { - return subject().getSpecifiedType(); + return getSubject().getSpecifiedType(); } @Override protected void setValue(CacheType value) { - subject().setSpecifiedType(value); + getSubject().setSpecifiedType(value); } @Override @@ -96,10 +96,10 @@ public class CacheTypeComposite extends AbstractFormPane<EclipseLinkCaching> { @Override protected void initializeLayout(Composite container) { - buildLabeledComposite( + addLabeledComposite( container, EclipseLinkUiMappingsMessages.CacheTypeComposite_label, - buildCacheTypeCombo(container), + addCacheTypeCombo(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 index 9fbc9dbcb1..1b1aabdbea 100644 --- 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 @@ -16,8 +16,8 @@ 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.ui.internal.widgets.AbstractPane; +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; @@ -50,10 +50,10 @@ import org.eclipse.swt.widgets.Composite; * @version 2.1 * @since 2.1 */ -public class CachingComposite extends AbstractFormPane<EclipseLinkCaching> +public class CachingComposite extends FormPane<EclipseLinkCaching> { - public CachingComposite(AbstractFormPane<?> parentPane, + public CachingComposite(FormPane<?> parentPane, PropertyValueModel<EclipseLinkCaching> subjectHolder, Composite parent) { @@ -64,36 +64,36 @@ public class CachingComposite extends AbstractFormPane<EclipseLinkCaching> protected void initializeLayout(Composite container) { //Shared Check box, uncheck this and the rest of the panel is disabled - buildTriStateCheckBoxWithDefault( - buildSubPane(container, 8), + addTriStateCheckBoxWithDefault( + addSubPane(container, 8), EclipseLinkUiMappingsMessages.CachingComposite_sharedLabel, buildSharedHolder(), buildSharedStringHolder(), EclipseLinkHelpContextIds.CACHING_SHARED ); - Composite subPane = buildSubPane(container, 0, 16); + Composite subPane = addSubPane(container, 0, 16); - Collection<AbstractPane<?>> panes = new ArrayList<AbstractPane<?>>(); + Collection<Pane<?>> panes = new ArrayList<Pane<?>>(); panes.add(new CacheTypeComposite(this, subPane)); panes.add(new CacheSizeComposite(this, subPane)); // Advanced sub-pane - Composite advancedSection = buildCollapsableSubSection( + Composite advancedSection = addCollapsableSubSection( subPane, EclipseLinkUiMappingsMessages.CachingComposite_advanced, new SimplePropertyValueModel<Boolean>(Boolean.FALSE) ); - initializeAdvancedPane(buildSubPane(advancedSection, 0, 16), panes); + initializeAdvancedPane(addSubPane(advancedSection, 0, 16), panes); new PaneEnabler(buildSharedCacheEnabler(), panes); - new ExistenceCheckingComposite(this, buildSubPane(container, 8)); + new ExistenceCheckingComposite(this, addSubPane(container, 8)); } - private void initializeAdvancedPane(Composite container, Collection<AbstractPane<?>> panes) { + private void initializeAdvancedPane(Composite container, Collection<Pane<?>> panes) { panes.add(new AlwaysRefreshComposite(this, container)); panes.add(new RefreshOnlyIfNewerComposite(this, container)); panes.add(new DisableHitsComposite(this, container)); @@ -141,9 +141,9 @@ public class CachingComposite extends AbstractFormPane<EclipseLinkCaching> @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultShared(); + Boolean defaultValue = getSubject().getDefaultShared(); if (defaultValue != null) { 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 index f509f4d3cb..db24068788 100644 --- 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 @@ -13,7 +13,7 @@ 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.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; @@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.1 * @since 2.1 */ -public class DisableHitsComposite extends AbstractFormPane<EclipseLinkCaching> +public class DisableHitsComposite extends FormPane<EclipseLinkCaching> { /** * Creates a new <code>OptionalComposite</code>. @@ -38,7 +38,7 @@ public class DisableHitsComposite extends AbstractFormPane<EclipseLinkCaching> * @param parentPane The parent container of this one * @param parent The parent container */ - public DisableHitsComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + public DisableHitsComposite(FormPane<? extends EclipseLinkCaching> parentPane, Composite parent) { super(parentPane, parent); @@ -77,9 +77,9 @@ public class DisableHitsComposite extends AbstractFormPane<EclipseLinkCaching> @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultDisableHits(); + Boolean defaultValue = getSubject().getDefaultDisableHits(); if (defaultValue != null) { @@ -104,7 +104,7 @@ public class DisableHitsComposite extends AbstractFormPane<EclipseLinkCaching> @Override protected void initializeLayout(Composite container) { - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, EclipseLinkUiMappingsMessages.DisableHitsComposite_disableHitsLabel, buildDisableHitsHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/ExistenceCheckingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/ExistenceCheckingComposite.java index b8689bc377..238281d396 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/ExistenceCheckingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/ExistenceCheckingComposite.java @@ -12,7 +12,7 @@ import java.util.Collection; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkCaching; import org.eclipse.jpt.eclipselink.core.context.ExistenceType; import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.1 * @since 2.1 */ -public class ExistenceCheckingComposite extends AbstractFormPane<EclipseLinkCaching> { +public class ExistenceCheckingComposite extends FormPane<EclipseLinkCaching> { /** * Creates a new <code>ExistenceCheckingComposite</code>. @@ -41,7 +41,7 @@ public class ExistenceCheckingComposite extends AbstractFormPane<EclipseLinkCach * @param parentPane The parent container of this one * @param parent The parent container */ - public ExistenceCheckingComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + public ExistenceCheckingComposite(FormPane<? extends EclipseLinkCaching> parentPane, Composite parent) { super(parentPane, parent); @@ -49,19 +49,20 @@ public class ExistenceCheckingComposite extends AbstractFormPane<EclipseLinkCach @Override protected void initializeLayout(Composite container) { - Composite subPane = buildSubPane(container, 2, 8, 0, 0, 0); + Composite subPane = addSubPane(container, 2, 8, 0, 0, 0); - buildCheckBox( + addCheckBox( subPane, EclipseLinkUiMappingsMessages.ExistenceCheckingComposite_label, - buildExistenceCheckingHolder()); + buildExistenceCheckingHolder(), + null); - buildExistenceCheckingTypeCombo(subPane); + addExistenceCheckingTypeCombo(subPane); } - private EnumFormComboViewer<EclipseLinkCaching, ExistenceType> buildExistenceCheckingTypeCombo(Composite container) { + private EnumFormComboViewer<EclipseLinkCaching, ExistenceType> addExistenceCheckingTypeCombo(Composite container) { return new EnumFormComboViewer<EclipseLinkCaching, ExistenceType>(this, container) { @@ -73,13 +74,13 @@ public class ExistenceCheckingComposite extends AbstractFormPane<EclipseLinkCach } @Override - protected ExistenceType[] choices() { + protected ExistenceType[] getChoices() { return ExistenceType.values(); } @Override - protected ExistenceType defaultValue() { - return subject().getDefaultExistenceType(); + protected ExistenceType getDefaultValue() { + return getSubject().getDefaultExistenceType(); } @Override @@ -93,12 +94,12 @@ public class ExistenceCheckingComposite extends AbstractFormPane<EclipseLinkCach @Override protected ExistenceType getValue() { - return subject().getSpecifiedExistenceType(); + return getSubject().getSpecifiedExistenceType(); } @Override protected void setValue(ExistenceType value) { - subject().setSpecifiedExistenceType(value); + getSubject().setSpecifiedExistenceType(value); } @Override 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 index 8f99e664b3..0e6fc04cd6 100644 --- 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 @@ -13,7 +13,7 @@ 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.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; @@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.1 * @since 2.1 */ -public class RefreshOnlyIfNewerComposite extends AbstractFormPane<EclipseLinkCaching> +public class RefreshOnlyIfNewerComposite extends FormPane<EclipseLinkCaching> { /** * Creates a new <code>OptionalComposite</code>. @@ -38,7 +38,7 @@ public class RefreshOnlyIfNewerComposite extends AbstractFormPane<EclipseLinkCac * @param parentPane The parent container of this one * @param parent The parent container */ - public RefreshOnlyIfNewerComposite(AbstractFormPane<? extends EclipseLinkCaching> parentPane, + public RefreshOnlyIfNewerComposite(FormPane<? extends EclipseLinkCaching> parentPane, Composite parent) { super(parentPane, parent); @@ -77,9 +77,9 @@ public class RefreshOnlyIfNewerComposite extends AbstractFormPane<EclipseLinkCac @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultRefreshOnlyIfNewer(); + Boolean defaultValue = getSubject().getDefaultRefreshOnlyIfNewer(); if (defaultValue != null) { @@ -104,7 +104,7 @@ public class RefreshOnlyIfNewerComposite extends AbstractFormPane<EclipseLinkCac @Override protected void initializeLayout(Composite container) { - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, EclipseLinkUiMappingsMessages.RefreshOnlyIfNewerComposite_refreshOnlyIfNewerLabel, buildRefreshOnlyIfNewerHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EclipseLinkOptionsComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EclipseLinkOptionsComposite.java index 930b858ce9..ad375c914c 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EclipseLinkOptionsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/EclipseLinkOptionsComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.options; import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -23,10 +23,10 @@ import org.eclipse.ui.forms.widgets.Section; * EclipseLinkOptionsComposite */ public class EclipseLinkOptionsComposite - extends AbstractFormPane<Options> + extends FormPane<Options> { public EclipseLinkOptionsComposite( - AbstractFormPane<Options> subjectHolder, + FormPane<Options> subjectHolder, Composite container) { super(subjectHolder, container, false); } 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 6e7dca94d0..3f9eb58ab2 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 @@ -18,7 +18,7 @@ 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.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Composite; /** * EventListenerComposite */ -public class EventListenerComposite extends AbstractPane<Options> +public class EventListenerComposite extends Pane<Options> { /** * Creates a new <code>EventListenerComposite</code>. @@ -35,7 +35,7 @@ public class EventListenerComposite extends AbstractPane<Options> * @param parentPane The parent pane of this one * @param parent The parent container */ - public EventListenerComposite(AbstractPane<? extends Options> parentPane, + public EventListenerComposite(Pane<? extends Options> parentPane, Composite parent) { super(parentPane, parent); @@ -66,18 +66,18 @@ public class EventListenerComposite extends AbstractPane<Options> } @Override - protected String className() { - return this.subject().getEventListener(); + protected String getClassName() { + return this.getSubject().getEventListener(); } @Override - protected String labelText() { + protected String getLabelText() { return EclipseLinkUiMessages.PersistenceXmlOptionsTab_eventListenerLabel; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = this.subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = this.getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -95,7 +95,7 @@ public class EventListenerComposite extends AbstractPane<Options> if (type != null) { String className = type.getFullyQualifiedName('.'); - this.subject().setEventListener(className); + this.getSubject().setEventListener(className); } } }; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/IncludeDescriptorQueriesComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/IncludeDescriptorQueriesComposite.java index dc37254192..df681ce7bb 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/IncludeDescriptorQueriesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/IncludeDescriptorQueriesComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.options; import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; /** * IncludeDescriptorQueriesComposite */ -public class IncludeDescriptorQueriesComposite extends AbstractFormPane<Options> +public class IncludeDescriptorQueriesComposite extends FormPane<Options> { /** * Creates a new <code>IncludeDescriptorQueriesComposite</code>. @@ -33,7 +33,7 @@ public class IncludeDescriptorQueriesComposite extends AbstractFormPane<Options> * The parent container */ public IncludeDescriptorQueriesComposite( - AbstractFormPane<? extends Options> parentComposite, + FormPane<? extends Options> parentComposite, Composite parent) { super(parentComposite, parent); @@ -69,8 +69,8 @@ public class IncludeDescriptorQueriesComposite extends AbstractFormPane<Options> return new TransformationPropertyValueModel<Boolean, String>(buildIncludeDescriptorQueriesHolder()) { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultIncludeDescriptorQueries(); + if ((getSubject() != null) && (value == null)) { + Boolean defaultValue = getSubject().getDefaultIncludeDescriptorQueries(); if (defaultValue != null) { String defaultStringValue = defaultValue ? EclipseLinkUiMessages.Boolean_True : EclipseLinkUiMessages.Boolean_False; return NLS.bind(EclipseLinkUiMessages.PersistenceXmlOptionsTab_includeDescriptorQueriesLabelDefault, defaultStringValue); @@ -84,7 +84,7 @@ public class IncludeDescriptorQueriesComposite extends AbstractFormPane<Options> @Override protected void initializeLayout(Composite container) { - this.buildTriStateCheckBoxWithDefault( + this.addTriStateCheckBoxWithDefault( container, EclipseLinkUiMessages.PersistenceXmlOptionsTab_includeDescriptorQueriesLabel, this.buildIncludeDescriptorQueriesHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/PersistenceXmlOptionsTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/PersistenceXmlOptionsTab.java index 1ba4b2f8af..64fe404061 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/PersistenceXmlOptionsTab.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/PersistenceXmlOptionsTab.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; 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.AbstractFormPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * PersistenceXmlOptionsTab */ public class PersistenceXmlOptionsTab - extends AbstractFormPane<Options> + extends FormPane<Options> implements JpaPageComposite { // ********** constructors/initialization ********** @@ -57,7 +57,7 @@ public class PersistenceXmlOptionsTab // ********** Layout ********** @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; layout.marginWidth = 0; @@ -66,7 +66,7 @@ public class PersistenceXmlOptionsTab layout.marginBottom = 0; layout.marginRight = 0; layout.verticalSpacing = 15; - Composite container = this.buildPane(parent, layout); + Composite container = this.addPane(parent, layout); this.updateGridData(container); return container; } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionNameComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionNameComposite.java index 81148be0ce..0370c05e9f 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionNameComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionNameComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.options; import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; /** * SessionNameComposite */ -public class SessionNameComposite extends AbstractPane<Options> +public class SessionNameComposite extends Pane<Options> { /** * Creates a new <code>SessionNameComposite</code>. @@ -34,7 +34,7 @@ public class SessionNameComposite extends AbstractPane<Options> * @param parent The parent container */ public SessionNameComposite( - AbstractPane<? extends Options> parentPane, + Pane<? extends Options> parentPane, Composite parent) { super(parentPane, parent); @@ -44,7 +44,7 @@ public class SessionNameComposite extends AbstractPane<Options> return new PropertyAspectAdapter<Options, String>(this.getSubjectHolder(), Options.DEFAULT_SESSION_NAME) { @Override protected String buildValue_() { - return SessionNameComposite.this.defaultValue(subject); + return SessionNameComposite.this.getDefaultValue(subject); } }; } @@ -62,7 +62,7 @@ public class SessionNameComposite extends AbstractPane<Options> String name = subject.getSessionName(); if (name == null) { - name = SessionNameComposite.this.defaultValue(subject); + name = SessionNameComposite.this.getDefaultValue(subject); } return name; } @@ -70,7 +70,7 @@ public class SessionNameComposite extends AbstractPane<Options> @Override protected void setValue_(String value) { - if (defaultValue(subject).equals(value)) { + if (getDefaultValue(subject).equals(value)) { value = null; } subject.setSessionName(value); @@ -78,7 +78,7 @@ public class SessionNameComposite extends AbstractPane<Options> }; } - private String defaultValue(Options subject) { + private String getDefaultValue(Options subject) { String defaultValue = subject.getDefaultSessionName(); if (defaultValue != null) { @@ -98,7 +98,7 @@ public class SessionNameComposite extends AbstractPane<Options> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, EclipseLinkUiMessages.PersistenceXmlOptionsTab_sessionName, this.buildDefaultSessionNameListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionsXmlComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionsXmlComposite.java index e6596c6e6b..34d60b6320 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionsXmlComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/SessionsXmlComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.options; import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; /** * SessionsXmlComposite */ -public class SessionsXmlComposite extends AbstractPane<Options> +public class SessionsXmlComposite extends Pane<Options> { /** * Creates a new <code>SessionsXmlComposite</code>. @@ -34,7 +34,7 @@ public class SessionsXmlComposite extends AbstractPane<Options> * @param parent The parent container */ public SessionsXmlComposite( - AbstractPane<? extends Options> parentPane, + Pane<? extends Options> parentPane, Composite parent) { super(parentPane, parent); @@ -44,7 +44,7 @@ public class SessionsXmlComposite extends AbstractPane<Options> return new PropertyAspectAdapter<Options, String>(this.getSubjectHolder(), Options.DEFAULT_SESSIONS_XML) { @Override protected String buildValue_() { - return SessionsXmlComposite.this.defaultValue(subject); + return SessionsXmlComposite.this.getDefaultValue(subject); } }; } @@ -62,7 +62,7 @@ public class SessionsXmlComposite extends AbstractPane<Options> String name = subject.getSessionsXml(); if (name == null) { - name = SessionsXmlComposite.this.defaultValue(subject); + name = SessionsXmlComposite.this.getDefaultValue(subject); } return name; } @@ -70,7 +70,7 @@ public class SessionsXmlComposite extends AbstractPane<Options> @Override protected void setValue_(String value) { - if (defaultValue(subject).equals(value)) { + if (getDefaultValue(subject).equals(value)) { value = null; } subject.setSessionsXml(value); @@ -78,7 +78,7 @@ public class SessionsXmlComposite extends AbstractPane<Options> }; } - private String defaultValue(Options subject) { + private String getDefaultValue(Options subject) { String defaultValue = subject.getDefaultSessionsXml(); if (defaultValue != null) { @@ -98,7 +98,7 @@ public class SessionsXmlComposite extends AbstractPane<Options> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, EclipseLinkUiMessages.PersistenceXmlOptionsTab_sessionsXml, this.buildDefaultSessionsXmlFileNameListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetDatabaseComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetDatabaseComposite.java index 3a0bd59e11..7b46597b2f 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetDatabaseComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetDatabaseComposite.java @@ -18,7 +18,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; import org.eclipse.jpt.eclipselink.core.internal.context.options.TargetDatabase; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Composite; /** * TargetDatabaseComposite */ -public class TargetDatabaseComposite extends AbstractPane<Options> +public class TargetDatabaseComposite extends Pane<Options> { /** * Creates a new <code>TargetDatabaseComposite</code>. @@ -47,7 +47,7 @@ public class TargetDatabaseComposite extends AbstractPane<Options> * @param parent The parent container */ public TargetDatabaseComposite( - AbstractPane<? extends Options> parentPane, + Pane<? extends Options> parentPane, Composite parent) { super(parentPane, parent); @@ -57,7 +57,7 @@ public class TargetDatabaseComposite extends AbstractPane<Options> return new PropertyAspectAdapter<Options, String>(this.getSubjectHolder(), Options.DEFAULT_TARGET_DATABASE) { @Override protected String buildValue_() { - return TargetDatabaseComposite.this.defaultValue(subject); + return TargetDatabaseComposite.this.getDefaultValue(subject); } }; } @@ -108,7 +108,7 @@ public class TargetDatabaseComposite extends AbstractPane<Options> String name = subject.getTargetDatabase(); if (name == null) { - name = TargetDatabaseComposite.this.defaultValue(subject); + name = TargetDatabaseComposite.this.getDefaultValue(subject); } return name; } @@ -116,7 +116,7 @@ public class TargetDatabaseComposite extends AbstractPane<Options> @Override protected void setValue_(String value) { - if (defaultValue(subject).equals(value)) { + if (getDefaultValue(subject).equals(value)) { value = null; } subject.setTargetDatabase(value); @@ -153,7 +153,7 @@ public class TargetDatabaseComposite extends AbstractPane<Options> ); } - private String defaultValue(Options subject) { + private String getDefaultValue(Options subject) { String defaultValue = subject.getDefaultTargetDatabase(); if (defaultValue != null) { @@ -173,7 +173,7 @@ public class TargetDatabaseComposite extends AbstractPane<Options> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, EclipseLinkUiMessages.PersistenceXmlOptionsTab_targetDatabaseLabel, this.buildTargetDatabaseListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetServerComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetServerComposite.java index 54d8cf3823..f6ad577e4f 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetServerComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/options/TargetServerComposite.java @@ -18,7 +18,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.options.Options; import org.eclipse.jpt.eclipselink.core.internal.context.options.TargetServer; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Composite; /** * TargetServerComposite */ -public class TargetServerComposite extends AbstractPane<Options> +public class TargetServerComposite extends Pane<Options> { /** * Creates a new <code>TargetServerComposite</code>. @@ -47,7 +47,7 @@ public class TargetServerComposite extends AbstractPane<Options> * @param parent The parent container */ public TargetServerComposite( - AbstractPane<? extends Options> parentPane, + Pane<? extends Options> parentPane, Composite parent) { super(parentPane, parent); @@ -57,7 +57,7 @@ public class TargetServerComposite extends AbstractPane<Options> return new PropertyAspectAdapter<Options, String>(this.getSubjectHolder(), Options.DEFAULT_TARGET_SERVER) { @Override protected String buildValue_() { - return TargetServerComposite.this.defaultValue(subject); + return TargetServerComposite.this.getDefaultValue(subject); } }; } @@ -108,7 +108,7 @@ public class TargetServerComposite extends AbstractPane<Options> String name = subject.getTargetServer(); if (name == null) { - name = TargetServerComposite.this.defaultValue(subject); + name = TargetServerComposite.this.getDefaultValue(subject); } return name; } @@ -116,7 +116,7 @@ public class TargetServerComposite extends AbstractPane<Options> @Override protected void setValue_(String value) { - if (defaultValue(subject).equals(value)) { + if (getDefaultValue(subject).equals(value)) { value = null; } subject.setTargetServer(value); @@ -153,7 +153,7 @@ public class TargetServerComposite extends AbstractPane<Options> ); } - private String defaultValue(Options subject) { + private String getDefaultValue(Options subject) { String defaultValue = subject.getDefaultTargetServer(); if (defaultValue != null) { @@ -173,7 +173,7 @@ public class TargetServerComposite extends AbstractPane<Options> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, EclipseLinkUiMessages.PersistenceXmlOptionsTab_targetServerLabel, this.buildTargetServerListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/CreateDdlFileNameComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/CreateDdlFileNameComposite.java index 52f159c2e7..4fa13441cd 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/CreateDdlFileNameComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/CreateDdlFileNameComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.schema.generation; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; /** * CreateDdlFileNameComposite */ -public class CreateDdlFileNameComposite extends AbstractPane<SchemaGeneration> +public class CreateDdlFileNameComposite extends Pane<SchemaGeneration> { /** * Creates a new <code>CreateDdlFileNameComposite</code>. @@ -34,7 +34,7 @@ public class CreateDdlFileNameComposite extends AbstractPane<SchemaGeneration> * @param parent The parent container */ public CreateDdlFileNameComposite( - AbstractPane<? extends SchemaGeneration> parentPane, + Pane<? extends SchemaGeneration> parentPane, Composite parent) { super(parentPane, parent); @@ -44,7 +44,7 @@ public class CreateDdlFileNameComposite extends AbstractPane<SchemaGeneration> return new PropertyAspectAdapter<SchemaGeneration, String>(this.getSubjectHolder(), SchemaGeneration.DEFAULT_SCHEMA_GENERATION_CREATE_FILE_NAME) { @Override protected String buildValue_() { - return CreateDdlFileNameComposite.this.defaultValue(subject); + return CreateDdlFileNameComposite.this.getDefaultValue(subject); } }; } @@ -62,7 +62,7 @@ public class CreateDdlFileNameComposite extends AbstractPane<SchemaGeneration> String name = subject.getCreateFileName(); if (name == null) { - name = CreateDdlFileNameComposite.this.defaultValue(subject); + name = CreateDdlFileNameComposite.this.getDefaultValue(subject); } return name; } @@ -70,7 +70,7 @@ public class CreateDdlFileNameComposite extends AbstractPane<SchemaGeneration> @Override protected void setValue_(String value) { - if (defaultValue(subject).equals(value)) { + if (getDefaultValue(subject).equals(value)) { value = null; } subject.setCreateFileName(value); @@ -78,7 +78,7 @@ public class CreateDdlFileNameComposite extends AbstractPane<SchemaGeneration> }; } - private String defaultValue(SchemaGeneration subject) { + private String getDefaultValue(SchemaGeneration subject) { String defaultValue = subject.getDefaultCreateFileName(); if (defaultValue != null) { @@ -98,7 +98,7 @@ public class CreateDdlFileNameComposite extends AbstractPane<SchemaGeneration> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_createDdlFileNameLabel, this.buildDefaultCreateDdlFileNameListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationLocationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationLocationComposite.java index 83c370228c..07d8ecf3b0 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationLocationComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationLocationComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.schema.generation; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.FolderChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -21,9 +21,9 @@ import org.eclipse.swt.widgets.Composite; /** * DdlGenerationLocationComposite */ -public class DdlGenerationLocationComposite extends AbstractPane<SchemaGeneration> +public class DdlGenerationLocationComposite extends Pane<SchemaGeneration> { - public DdlGenerationLocationComposite(AbstractPane<? extends SchemaGeneration> parentPane, + public DdlGenerationLocationComposite(Pane<? extends SchemaGeneration> parentPane, Composite parent) { super(parentPane, parent); @@ -74,17 +74,17 @@ public class DdlGenerationLocationComposite extends AbstractPane<SchemaGeneratio } @Override - protected String dialogMessage() { + protected String getDialogMessage() { return EclipseLinkUiMessages.DdlGenerationLocationComposite_dialogMessage; } @Override - protected String dialogTitle() { + protected String getDialogTitle() { return EclipseLinkUiMessages.DdlGenerationLocationComposite_dialogTitle; } @Override - protected String labelText() { + protected String getLabelText() { return EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_ddlGenerationLocationLabel; } }; diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationTypeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationTypeComposite.java index cba5e59fb8..3723fdb64a 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DdlGenerationTypeComposite.java @@ -14,7 +14,7 @@ import java.util.Collection; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.DdlGenerationType; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; * DdlGenerationTypeComposite */ public class DdlGenerationTypeComposite - extends AbstractFormPane<SchemaGeneration> + extends FormPane<SchemaGeneration> { /** * Creates a new <code>DdlGenerationTypeComposite</code>. @@ -33,13 +33,13 @@ public class DdlGenerationTypeComposite * The parent container */ public DdlGenerationTypeComposite( - AbstractFormPane<? extends SchemaGeneration> parentComposite, + FormPane<? extends SchemaGeneration> parentComposite, Composite parent) { super(parentComposite, parent); } - private EnumFormComboViewer<SchemaGeneration, DdlGenerationType> buildDdlGenerationTypeCombo(Composite container) { + private EnumFormComboViewer<SchemaGeneration, DdlGenerationType> addDdlGenerationTypeCombo(Composite container) { return new EnumFormComboViewer<SchemaGeneration, DdlGenerationType>(this, container) { @Override protected void addPropertyNames(Collection<String> propertyNames) { @@ -48,13 +48,13 @@ public class DdlGenerationTypeComposite } @Override - protected DdlGenerationType[] choices() { + protected DdlGenerationType[] getChoices() { return DdlGenerationType.values(); } @Override - protected DdlGenerationType defaultValue() { - return this.subject().getDefaultDdlGenerationType(); + protected DdlGenerationType getDefaultValue() { + return this.getSubject().getDefaultDdlGenerationType(); } @Override @@ -64,12 +64,12 @@ public class DdlGenerationTypeComposite @Override protected DdlGenerationType getValue() { - return this.subject().getDdlGenerationType(); + return this.getSubject().getDdlGenerationType(); } @Override protected void setValue(DdlGenerationType value) { - this.subject().setDdlGenerationType(value); + this.getSubject().setDdlGenerationType(value); } }; } @@ -77,10 +77,10 @@ public class DdlGenerationTypeComposite @Override protected void initializeLayout(Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_ddlGenerationTypeLabel, - buildDdlGenerationTypeCombo( container), + addDdlGenerationTypeCombo( container), null // TODO IJpaHelpContextIds. ); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DropDdlFileNameComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DropDdlFileNameComposite.java index 986ce3762c..b63f831b3b 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DropDdlFileNameComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/DropDdlFileNameComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.ui.internal.schema.generation; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; /** * DropDdlFileNameComposite */ -public class DropDdlFileNameComposite extends AbstractPane<SchemaGeneration> +public class DropDdlFileNameComposite extends Pane<SchemaGeneration> { /** * Creates a new <code>DropDdlFileNameComposite</code>. @@ -34,7 +34,7 @@ public class DropDdlFileNameComposite extends AbstractPane<SchemaGeneration> * @param parent The parent container */ public DropDdlFileNameComposite( - AbstractPane<? extends SchemaGeneration> parentPane, + Pane<? extends SchemaGeneration> parentPane, Composite parent) { super(parentPane, parent); @@ -44,7 +44,7 @@ public class DropDdlFileNameComposite extends AbstractPane<SchemaGeneration> return new PropertyAspectAdapter<SchemaGeneration, String>(this.getSubjectHolder(), SchemaGeneration.DEFAULT_SCHEMA_GENERATION_DROP_FILE_NAME) { @Override protected String buildValue_() { - return DropDdlFileNameComposite.this.defaultValue(subject); + return DropDdlFileNameComposite.this.getDefaultValue(subject); } }; } @@ -62,7 +62,7 @@ public class DropDdlFileNameComposite extends AbstractPane<SchemaGeneration> String name = subject.getDropFileName(); if (name == null) { - name = DropDdlFileNameComposite.this.defaultValue(subject); + name = DropDdlFileNameComposite.this.getDefaultValue(subject); } return name; } @@ -70,7 +70,7 @@ public class DropDdlFileNameComposite extends AbstractPane<SchemaGeneration> @Override protected void setValue_(String value) { - if (DropDdlFileNameComposite.this.defaultValue(subject).equals(value)) { + if (DropDdlFileNameComposite.this.getDefaultValue(subject).equals(value)) { value = null; } subject.setDropFileName(value); @@ -78,7 +78,7 @@ public class DropDdlFileNameComposite extends AbstractPane<SchemaGeneration> }; } - private String defaultValue(SchemaGeneration subject) { + private String getDefaultValue(SchemaGeneration subject) { String defaultValue = subject.getDefaultDropFileName(); if (defaultValue != null) { @@ -98,7 +98,7 @@ public class DropDdlFileNameComposite extends AbstractPane<SchemaGeneration> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_dropDdlFileNameLabel, this.buildDefaultDropDdlFileNameListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/EclipseLinkSchemaGenerationComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/EclipseLinkSchemaGenerationComposite.java index 993483bc59..18154f4999 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/EclipseLinkSchemaGenerationComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/EclipseLinkSchemaGenerationComposite.java @@ -11,17 +11,17 @@ package org.eclipse.jpt.eclipselink.ui.internal.schema.generation; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.swt.widgets.Composite; /** * EclipseLinkSchemaGenerationComposite */ public class EclipseLinkSchemaGenerationComposite - extends AbstractFormPane<SchemaGeneration> + extends FormPane<SchemaGeneration> { public EclipseLinkSchemaGenerationComposite( - AbstractFormPane<SchemaGeneration> subjectHolder, + FormPane<SchemaGeneration> subjectHolder, Composite container) { super(subjectHolder, container, false); } @@ -29,7 +29,7 @@ public class EclipseLinkSchemaGenerationComposite @Override protected void initializeLayout(Composite container) { - container = buildSection( + container = addSection( container, EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_sectionTitle, EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_sectionDescription diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/OutputModeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/OutputModeComposite.java index 6bfac27ba1..845b74611f 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/OutputModeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/OutputModeComposite.java @@ -14,14 +14,14 @@ import java.util.Collection; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.OutputMode; import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration; import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkUiMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; /** * OutputModeComposite */ -public class OutputModeComposite extends AbstractFormPane<SchemaGeneration> +public class OutputModeComposite extends FormPane<SchemaGeneration> { /** * Creates a new <code>OutputModeComposite</code>. @@ -32,13 +32,13 @@ public class OutputModeComposite extends AbstractFormPane<SchemaGeneration> * The parent container */ public OutputModeComposite( - AbstractFormPane<? extends SchemaGeneration> parentComposite, + FormPane<? extends SchemaGeneration> parentComposite, Composite parent) { super(parentComposite, parent); } - private EnumFormComboViewer<SchemaGeneration, OutputMode> buildOutputModeCombo(Composite container) { + private EnumFormComboViewer<SchemaGeneration, OutputMode> addBuildOutputModeCombo(Composite container) { return new EnumFormComboViewer<SchemaGeneration, OutputMode>(this, container) { @Override protected void addPropertyNames(Collection<String> propertyNames) { @@ -47,13 +47,13 @@ public class OutputModeComposite extends AbstractFormPane<SchemaGeneration> } @Override - protected OutputMode[] choices() { + protected OutputMode[] getChoices() { return OutputMode.values(); } @Override - protected OutputMode defaultValue() { - return this.subject().getDefaultOutputMode(); + protected OutputMode getDefaultValue() { + return this.getSubject().getDefaultOutputMode(); } @Override @@ -63,22 +63,22 @@ public class OutputModeComposite extends AbstractFormPane<SchemaGeneration> @Override protected OutputMode getValue() { - return this.subject().getOutputMode(); + return this.getSubject().getOutputMode(); } @Override protected void setValue(OutputMode value) { - this.subject().setOutputMode(value); + this.getSubject().setOutputMode(value); } }; } @Override protected void initializeLayout(Composite container) { - this.buildLabeledComposite( + this.addLabeledComposite( container, EclipseLinkUiMessages.PersistenceXmlSchemaGenerationTab_outputModeLabel, - this.buildOutputModeCombo(container), + this.addBuildOutputModeCombo(container), null // TODO IJpaHelpContextIds. ); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/PersistenceXmlSchemaGenerationTab.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/PersistenceXmlSchemaGenerationTab.java index 2fcc449065..eae1137c1a 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/PersistenceXmlSchemaGenerationTab.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/schema/generation/PersistenceXmlSchemaGenerationTab.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.Schem 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.AbstractFormPane; +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; @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; * PersistenceXmlSchemaGenerationTab */ public class PersistenceXmlSchemaGenerationTab - extends AbstractFormPane<SchemaGeneration> + extends FormPane<SchemaGeneration> implements JpaPageComposite { // ********** constructors/initialization ********** diff --git a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties index d57f26e591..c12511554a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties +++ b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties @@ -8,7 +8,7 @@ # Oracle - initial API and implementation ################################################################################ -AbstractChooserPane_browseButton=Browse... +ChooserPane_browseButton=Browse... AddPersistentAttributeDialog_title=Add Persistent Attribute AddPersistentAttributeDialog_attributeLabel=Attribute: diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JptUiPlugin.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JptUiPlugin.java index 657265b2e0..60dba5c8dc 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JptUiPlugin.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JptUiPlugin.java @@ -92,7 +92,8 @@ public class JptUiPlugin extends AbstractUIPlugin /** * Return the JPA platform UI corresponding to the given JPA platform */ + //TODO rename this to getJpaPlatformUi public JpaPlatformUi jpaPlatformUi(JpaPlatform jpaPlatform) { - return JpaPlatformUiRegistry.instance().jpaPlatform(jpaPlatform.getId()); + return JpaPlatformUiRegistry.instance().getJpaPlatformUi(jpaPlatform.getId()); } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java index ff6754d68a..0779a3dfe0 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java @@ -19,7 +19,7 @@ import org.eclipse.osgi.util.NLS; */ public class JptUiMessages { - public static String AbstractChooserPane_browseButton; + public static String ChooserPane_browseButton; public static String AddPersistentAttributeDialog_attributeLabel; public static String AddPersistentAttributeDialog_mappingLabel; public static String AddPersistentAttributeDialog_noMappingKeyError; diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/ProjectAction.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/ProjectAction.java index 64739ed559..ee7bf74f4f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/ProjectAction.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/ProjectAction.java @@ -76,7 +76,7 @@ public abstract class ProjectAction implements IObjectActionDelegate { protected JpaPlatformUi jpaPlatformUi(JpaProject project) { String coreJpaPlatformId = project.getJpaPlatform().getId(); - return JpaPlatformUiRegistry.instance().jpaPlatform(coreJpaPlatformId); + return JpaPlatformUiRegistry.instance().getJpaPlatformUi(coreJpaPlatformId); } protected void execute(IProject project) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/AbstractJpaDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/AbstractJpaDetailsPage.java index 8dab43841f..2cd2b551ba 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/AbstractJpaDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/AbstractJpaDetailsPage.java @@ -15,7 +15,7 @@ import org.eclipse.jpt.ui.JpaUiFactory; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaDetailsPage; import org.eclipse.jpt.ui.internal.platform.JpaPlatformUiRegistry; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.ScrolledForm; @@ -29,7 +29,7 @@ import org.eclipse.ui.forms.widgets.ScrolledForm; * @since 1.0 */ public abstract class AbstractJpaDetailsPage<T extends JpaStructureNode> - extends AbstractFormPane<T> + extends FormPane<T> implements JpaDetailsPage<T> { /** @@ -45,8 +45,8 @@ public abstract class AbstractJpaDetailsPage<T extends JpaStructureNode> } protected JpaPlatformUi jpaPlatformUi() { - String platformId = subject().getJpaProject().getJpaPlatform().getId(); - return JpaPlatformUiRegistry.instance().jpaPlatform(platformId); + String platformId = getSubject().getJpaProject().getJpaPlatform().getId(); + return JpaPlatformUiRegistry.instance().getJpaPlatformUi(platformId); } protected JpaUiFactory jpaUiFactory() { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentAttributeDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentAttributeDetailsPage.java index bd5e3fee6a..dca4595f4d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentAttributeDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentAttributeDetailsPage.java @@ -125,12 +125,12 @@ public abstract class PersistentAttributeDetailsPage<T extends PersistentAttribu } protected Label buildMappingLabel(Composite parent) { - return buildLabel(parent, JptUiMessages.PersistentAttributePage_mapAs); + return addLabel(parent, JptUiMessages.PersistentAttributePage_mapAs); } protected PageBook buildMappingPageBook(Composite parent) { this.mappingPageBook = new PageBook(parent, SWT.NONE); - this.mappingPageBook.showPage(this.buildLabel(this.mappingPageBook, "")); + this.mappingPageBook.showPage(this.addLabel(this.mappingPageBook, "")); return this.mappingPageBook; } @@ -208,8 +208,8 @@ public abstract class PersistentAttributeDetailsPage<T extends PersistentAttribu private AttributeMappingUiProvider<? extends AttributeMapping> mappingUIProvider(String key) { - if (this.subject().getMapping() == null || - this.subject().getMapping().isDefault()) { + if (this.getSubject().getMapping() == null || + this.getSubject().getMapping().isDefault()) { return defaultAttributeMappingUiProvider(key); } @@ -277,7 +277,7 @@ public abstract class PersistentAttributeDetailsPage<T extends PersistentAttribu // Show an error message // TODO: Replace the blank label with the error page - this.mappingPageBook.showPage(this.buildLabel(this.mappingPageBook, "")); + this.mappingPageBook.showPage(this.addLabel(this.mappingPageBook, "")); } } else { @@ -286,7 +286,7 @@ public abstract class PersistentAttributeDetailsPage<T extends PersistentAttribu "PersistentAttributeDetailsPage.populateMappingPage() no page to show" ); - this.mappingPageBook.showPage(this.buildLabel(this.mappingPageBook, "")); + this.mappingPageBook.showPage(this.addLabel(this.mappingPageBook, "")); } this.repaintDetailsView(this.mappingPageBook); } @@ -314,7 +314,7 @@ public abstract class PersistentAttributeDetailsPage<T extends PersistentAttribu } private void updateMappingPage() { - AttributeMapping mapping = (this.subject() != null) ? this.subject().getMapping() : null; + AttributeMapping mapping = (this.getSubject() != null) ? this.getSubject().getMapping() : null; populateMappingPage(mapping == null ? null : mapping.getKey()); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentTypeDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentTypeDetailsPage.java index faf5250426..540625a125 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentTypeDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/PersistentTypeDetailsPage.java @@ -109,7 +109,7 @@ public abstract class PersistentTypeDetailsPage<T extends PersistentType> extend protected PageBook buildTypeMappingPageBook(Composite parent) { this.typeMappingPageBook = new PageBook(parent, SWT.NONE); - this.typeMappingPageBook.showPage(this.buildLabel(this.typeMappingPageBook, "")); + this.typeMappingPageBook.showPage(this.addLabel(this.typeMappingPageBook, "")); GridData gridData = new GridData(); gridData.horizontalAlignment = SWT.FILL; @@ -230,7 +230,7 @@ public abstract class PersistentTypeDetailsPage<T extends PersistentType> extend // Show an error message // TODO: Replace the blank label with the error page - this.typeMappingPageBook.showPage(this.buildLabel(this.typeMappingPageBook, "")); + this.typeMappingPageBook.showPage(this.addLabel(this.typeMappingPageBook, "")); } } // Clear the mapping pane and show a blank page @@ -240,7 +240,7 @@ public abstract class PersistentTypeDetailsPage<T extends PersistentType> extend "PersistentTypeDetailsPage.populateMappingPage() no page to show" ); - this.typeMappingPageBook.showPage(this.buildLabel(this.typeMappingPageBook, "")); + this.typeMappingPageBook.showPage(this.addLabel(this.typeMappingPageBook, "")); } this.repaintDetailsView(this.typeMappingPageBook); } @@ -270,7 +270,7 @@ public abstract class PersistentTypeDetailsPage<T extends PersistentType> extend protected abstract Iterator<TypeMappingUiProvider<? extends TypeMapping>> typeMappingUiProviders(); private void updateMappingPage() { - TypeMapping mapping = (this.subject() != null) ? this.subject().getMapping() : null; + TypeMapping mapping = (this.getSubject() != null) ? this.getSubject().getMapping() : null; populateMappingPage(mapping == null ? null : mapping.getKey()); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/editors/PersistenceEditor.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/editors/PersistenceEditor.java index b4c546d26f..95d9e9fec7 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/editors/PersistenceEditor.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/editors/PersistenceEditor.java @@ -124,7 +124,7 @@ public class PersistenceEditor extends FormEditor } String platformId = jpaProject.getJpaPlatform().getId(); - JpaPlatformUi jpaPlatformUI = JpaPlatformUiRegistry.instance().jpaPlatform(platformId); + JpaPlatformUi jpaPlatformUI = JpaPlatformUiRegistry.instance().getJpaPlatformUi(platformId); JpaUiFactory uiFactory = jpaPlatformUI.getJpaUiFactory(); ListIterator<JpaPageComposite> pages = uiFactory.createPersistenceUnitComposites( diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaEntityComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaEntityComposite.java index 5c237ca702..e9480ec3ab 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaEntityComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaEntityComposite.java @@ -42,12 +42,12 @@ public class JavaEntityComposite extends AbstractEntityComposite<JavaEntity> } @Override - protected void buildSecondaryTablesComposite(Composite container) { + protected void addSecondaryTablesComposite(Composite container) { new JavaSecondaryTablesComposite(this, container); } @Override - protected void buildInheritanceComposite(Composite container) { + protected void addInheritanceComposite(Composite container) { new JavaInheritanceComposite(this, container); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaInheritanceComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaInheritanceComposite.java index be087bfbcc..6c6a31d33f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaInheritanceComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaInheritanceComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.java.details; import org.eclipse.jpt.core.context.java.JavaEntity; import org.eclipse.jpt.ui.internal.mappings.details.AbstractInheritanceComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** @@ -31,14 +31,14 @@ public class JavaInheritanceComposite extends AbstractInheritanceComposite<JavaE * @param parentPane The parent container of this one * @param parent The parent container */ - public JavaInheritanceComposite(AbstractPane<JavaEntity> parentPane, + public JavaInheritanceComposite(Pane<JavaEntity> parentPane, Composite parent) { super(parentPane, parent); } @Override - protected void buildPrimaryKeyJoinColumnsComposite(Composite container) { + protected void addPrimaryKeyJoinColumnsComposite(Composite container) { new JavaPrimaryKeyJoinColumnsComposite(this, container); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java index 50ae6cc683..0aacf9c697 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java @@ -120,7 +120,7 @@ public class JavaPersistentAttributeDetailsPage extends PersistentAttributeDetai // Map as composite new JavaPersistentAttributeMapAsComposite( this, - buildSubPane(container, 0, 0, 5, 0) + addSubPane(container, 0, 0, 5, 0) ); // Mapping properties page diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeMapAsComposite.java index da1e043e18..cf1bfd8620 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeMapAsComposite.java @@ -14,7 +14,7 @@ import org.eclipse.jpt.core.context.AttributeMapping; import org.eclipse.jpt.core.context.java.JavaPersistentAttribute; import org.eclipse.jpt.ui.details.AttributeMappingUiProvider; import org.eclipse.jpt.ui.internal.mappings.details.PersistentAttributeMapAsComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** @@ -35,7 +35,7 @@ public class JavaPersistentAttributeMapAsComposite extends PersistentAttributeMa * @param parentPane The parent pane of this one * @param parent The parent container */ - public JavaPersistentAttributeMapAsComposite(AbstractPane<? extends JavaPersistentAttribute> parentPane, + public JavaPersistentAttributeMapAsComposite(Pane<? extends JavaPersistentAttribute> parentPane, Composite parent) { super(parentPane, parent); @@ -46,7 +46,7 @@ public class JavaPersistentAttributeMapAsComposite extends PersistentAttributeMa */ @Override protected Iterator<AttributeMappingUiProvider<? extends AttributeMapping>> attributeMappingUiProviders() { - return jpaPlatformUi().javaAttributeMappingUiProviders(); + return getJpaPlatformUi().javaAttributeMappingUiProviders(); } /* @@ -54,6 +54,6 @@ public class JavaPersistentAttributeMapAsComposite extends PersistentAttributeMa */ @Override protected Iterator<AttributeMappingUiProvider<? extends AttributeMapping>> defaultAttributeMappingUiProviders() { - return jpaPlatformUi().defaultJavaAttributeMappingUiProviders(); + return getJpaPlatformUi().defaultJavaAttributeMappingUiProviders(); } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentTypeDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentTypeDetailsPage.java index 78311b8fa6..41a0474498 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentTypeDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentTypeDetailsPage.java @@ -74,7 +74,7 @@ public class JavaPersistentTypeDetailsPage extends PersistentTypeDetailsPage<Jav // Map As composite new JavaPersistentTypeMapAsComposite( this, - buildSubPane(container, 0, 0, 5, 0) + addSubPane(container, 0, 0, 5, 0) ); // Type properties page diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPrimaryKeyJoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPrimaryKeyJoinColumnsComposite.java index f338e05901..34da43f2b7 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPrimaryKeyJoinColumnsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPrimaryKeyJoinColumnsComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.Entity; import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn; import org.eclipse.jpt.core.context.java.JavaEntity; import org.eclipse.jpt.ui.internal.mappings.details.AbstractPrimaryKeyJoinColumnsComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -36,7 +36,7 @@ public class JavaPrimaryKeyJoinColumnsComposite extends AbstractPrimaryKeyJoinCo * @param parentPane The parent controller of this one * @param parent The parent container */ - public JavaPrimaryKeyJoinColumnsComposite(AbstractPane<? extends JavaEntity> subjectHolder, + public JavaPrimaryKeyJoinColumnsComposite(Pane<? extends JavaEntity> subjectHolder, Composite parent) { super(subjectHolder, parent); @@ -58,13 +58,13 @@ public class JavaPrimaryKeyJoinColumnsComposite extends AbstractPrimaryKeyJoinCo @Override protected void switchDefaultToSpecified() { - PrimaryKeyJoinColumn defaultJoinColumn = subject().getDefaultPrimaryKeyJoinColumn(); + PrimaryKeyJoinColumn defaultJoinColumn = getSubject().getDefaultPrimaryKeyJoinColumn(); if (defaultJoinColumn != null) { String columnName = defaultJoinColumn.getDefaultName(); String referencedColumnName = defaultJoinColumn.getDefaultReferencedColumnName(); - PrimaryKeyJoinColumn pkJoinColumn = subject().addSpecifiedPrimaryKeyJoinColumn(0); + PrimaryKeyJoinColumn pkJoinColumn = getSubject().addSpecifiedPrimaryKeyJoinColumn(0); pkJoinColumn.setSpecifiedName(columnName); pkJoinColumn.setSpecifiedReferencedColumnName(referencedColumnName); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaSecondaryTablesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaSecondaryTablesComposite.java index aa051bf954..ee19421e82 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaSecondaryTablesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaSecondaryTablesComposite.java @@ -17,7 +17,7 @@ import org.eclipse.jpt.core.context.java.JavaEntity; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.details.AbstractSecondaryTablesComposite; import org.eclipse.jpt.ui.internal.mappings.details.PrimaryKeyJoinColumnsInSecondaryTableComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.utility.internal.model.value.ItemPropertyListValueModelAdapter; import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; @@ -59,7 +59,7 @@ public class JavaSecondaryTablesComposite extends AbstractSecondaryTablesComposi * @param parentPane The parent container of this one * @param parent The parent container */ - public JavaSecondaryTablesComposite(AbstractFormPane<? extends JavaEntity> parentPane, + public JavaSecondaryTablesComposite(FormPane<? extends JavaEntity> parentPane, Composite parent) { super(parentPane, parent); @@ -104,7 +104,7 @@ public class JavaSecondaryTablesComposite extends AbstractSecondaryTablesComposi @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); WritablePropertyValueModel<SecondaryTable> secondaryTableHolder = buildSecondaryTableHolder(); @@ -112,7 +112,7 @@ public class JavaSecondaryTablesComposite extends AbstractSecondaryTablesComposi // Secondary Tables add/remove list pane new AddRemoveListPane<Entity>( this, - buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin), + addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin), buildSecondaryTablesAdapter(), buildSecondaryTablesListModel(), secondaryTableHolder, diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullAttributeMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullAttributeMappingUiProvider.java index 7665b3eabd..2c2408b4bc 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullAttributeMappingUiProvider.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullAttributeMappingUiProvider.java @@ -17,7 +17,7 @@ import org.eclipse.jpt.ui.details.AttributeMappingUiProvider; import org.eclipse.jpt.ui.details.JpaComposite; import org.eclipse.jpt.ui.internal.JpaMappingImageHelper; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -76,7 +76,7 @@ public class NullAttributeMappingUiProvider return new NullComposite(subjectHolder, parent, widgetFactory); } - public static class NullComposite extends AbstractFormPane<AttributeMapping> + public static class NullComposite extends FormPane<AttributeMapping> implements JpaComposite{ NullComposite(PropertyValueModel<AttributeMapping> subjectHolder, diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullTypeMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullTypeMappingUiProvider.java index 5332a0e3cd..1bb7a95b74 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullTypeMappingUiProvider.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/NullTypeMappingUiProvider.java @@ -17,7 +17,7 @@ import org.eclipse.jpt.ui.details.JpaComposite; import org.eclipse.jpt.ui.details.TypeMappingUiProvider; import org.eclipse.jpt.ui.internal.JpaMappingImageHelper; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -66,7 +66,7 @@ public class NullTypeMappingUiProvider implements TypeMappingUiProvider<TypeMapp } - public static class NullComposite extends AbstractFormPane<TypeMapping> + public static class NullComposite extends FormPane<TypeMapping> implements JpaComposite { NullComposite(PropertyValueModel<TypeMapping> subjectHolder, diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/jface/ImageImageDescriptor.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/jface/ImageImageDescriptor.java index 7886475de5..4b69fd205c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/jface/ImageImageDescriptor.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/jface/ImageImageDescriptor.java @@ -27,33 +27,21 @@ public class ImageImageDescriptor extends ImageDescriptor */ public ImageImageDescriptor(Image image) { super(); - fImage = image; + this.fImage = image; } - /* - * (non-Javadoc) - * - * @see Object#equals(Object) - */ + @Override public boolean equals(Object obj) { - return (obj != null) && getClass().equals(obj.getClass()) && fImage.equals(((ImageImageDescriptor) obj).fImage); + return (obj != null) && getClass().equals(obj.getClass()) && this.fImage.equals(((ImageImageDescriptor) obj).fImage); } - /* - * (non-Javadoc) - * - * @see ImageDescriptor#getImageData() - */ + @Override public ImageData getImageData() { - return fImage.getImageData(); + return this.fImage.getImageData(); } - /* - * (non-Javadoc) - * - * @see Object#hashCode() - */ + @Override public int hashCode() { - return fImage.hashCode(); + return this.fImage.hashCode(); } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/CatalogCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/CatalogCombo.java index 404e2723da..d79bf11b7c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/CatalogCombo.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/CatalogCombo.java @@ -14,7 +14,7 @@ import java.util.Iterator; import org.eclipse.jpt.core.JpaNode; import org.eclipse.jpt.db.Database; import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.iterators.EmptyIterator; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public abstract class CatalogCombo<T extends JpaNode> extends AbstractDatabaseObjectCombo<T> +public abstract class CatalogCombo<T extends JpaNode> extends DatabaseObjectCombo<T> { /** * Creates a new <code>CatalogCombo</code>. @@ -33,7 +33,7 @@ public abstract class CatalogCombo<T extends JpaNode> extends AbstractDatabaseOb * @param parentPane The parent container of this one * @param parent The parent container */ - public CatalogCombo(AbstractPane<? extends T> parentPane, + public CatalogCombo(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -46,7 +46,7 @@ public abstract class CatalogCombo<T extends JpaNode> extends AbstractDatabaseOb * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public CatalogCombo(AbstractPane<?> parentPane, + public CatalogCombo(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -69,7 +69,7 @@ public abstract class CatalogCombo<T extends JpaNode> extends AbstractDatabaseOb @Override protected Iterator<String> values() { - Database db = this.database(); + Database db = this.getDatabase(); return (db == null) ? EmptyIterator.<String>instance() : db.catalogNames(); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/ColumnCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/ColumnCombo.java index b559df52ad..53986a0f60 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/ColumnCombo.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/ColumnCombo.java @@ -13,7 +13,7 @@ import java.util.Iterator; import org.eclipse.jpt.core.JpaNode; import org.eclipse.jpt.db.Table; import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.iterators.EmptyIterator; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public abstract class ColumnCombo<T extends JpaNode> extends AbstractDatabaseObjectCombo<T> +public abstract class ColumnCombo<T extends JpaNode> extends DatabaseObjectCombo<T> { /** * Creates a new <code>ColumnCombo</code>. @@ -33,7 +33,7 @@ public abstract class ColumnCombo<T extends JpaNode> extends AbstractDatabaseObj * @param parentPane The parent container of this one * @param parent The parent container */ - public ColumnCombo(AbstractPane<? extends T> parentPane, + public ColumnCombo(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -46,7 +46,7 @@ public abstract class ColumnCombo<T extends JpaNode> extends AbstractDatabaseObj * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public ColumnCombo(AbstractPane<?> parentPane, + public ColumnCombo(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -73,29 +73,29 @@ public abstract class ColumnCombo<T extends JpaNode> extends AbstractDatabaseObj * * @return The database table that supplies the column names. */ - protected abstract Table getDBTable_(); + protected abstract Table getDbTable_(); /** * Returns the database table that supplies the column names. * * @return The database table that supplies the column names. */ - protected Table getDBTable() { - return (this.subject() == null) ? null : this.getDBTable_(); + protected Table getDbTable() { + return (this.getSubject() == null) ? null : this.getDbTable_(); } @Override protected void tableChanged(Table table) { super.tableChanged(table); - if (this.getDBTable() == table) { + if (this.getDbTable() == table) { this.doPopulate(); } } @Override protected Iterator<String> values() { - Table table = this.getDBTable(); + Table table = this.getDbTable(); return (table == null) ? EmptyIterator.<String>instance() : table.columnNames(); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/AbstractDatabaseObjectCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/DatabaseObjectCombo.java index f23d1d8a8e..eeb429d3b1 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/AbstractDatabaseObjectCombo.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/DatabaseObjectCombo.java @@ -25,7 +25,7 @@ import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.internal.Tracing; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.ClassTools; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.StringTools; @@ -50,7 +50,7 @@ import org.eclipse.swt.widgets.Composite; * @since 2.0 */ @SuppressWarnings("nls") -public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends AbstractPane<T> +public abstract class DatabaseObjectCombo<T extends JpaNode> extends Pane<T> { /** * The main widget of this pane. @@ -69,7 +69,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * @param parentPane The parent container of this one * @param parent The parent container */ - protected AbstractDatabaseObjectCombo(AbstractPane<? extends T> parentPane, + protected DatabaseObjectCombo(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -82,7 +82,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - protected AbstractDatabaseObjectCombo(AbstractPane<?> parentPane, + protected DatabaseObjectCombo(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -96,7 +96,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * @param parent The parent container * @param widgetFactory The factory used to create various common widgets */ - protected AbstractDatabaseObjectCombo(PropertyValueModel<? extends T> subjectHolder, + protected DatabaseObjectCombo(PropertyValueModel<? extends T> subjectHolder, Composite parent, WidgetFactory widgetFactory) { @@ -119,7 +119,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "catalogChanged: " + catalog.getName()); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.catalogChanged(catalog); + DatabaseObjectCombo.this.catalogChanged(catalog); } } }); @@ -132,7 +132,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "closed"); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.repopulate(); + DatabaseObjectCombo.this.repopulate(); } } }); @@ -146,7 +146,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "columnChanged: " + column.getName()); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.columnChanged(column); + DatabaseObjectCombo.this.columnChanged(column); } } }); @@ -166,7 +166,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "foreignKeyChanged: " + foreignKey.getName()); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.foreignKeyChanged(foreignKey); + DatabaseObjectCombo.this.foreignKeyChanged(foreignKey); } } }); @@ -178,7 +178,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "modified"); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.repopulate(); + DatabaseObjectCombo.this.repopulate(); } } }); @@ -196,7 +196,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "opened"); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.repopulate(); + DatabaseObjectCombo.this.repopulate(); } } }); @@ -210,7 +210,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "schemaChanged: " + schema.getName()); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.schemaChanged(schema); + DatabaseObjectCombo.this.schemaChanged(schema); } } }); @@ -224,7 +224,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "sequenceChanged: " + sequence.getName()); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.sequenceChanged(sequence); + DatabaseObjectCombo.this.sequenceChanged(sequence); } } }); @@ -238,7 +238,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs log(Tracing.UI_DB, "tableChanged: " + table.getName()); if (!getCombo().isDisposed()) { - AbstractDatabaseObjectCombo.this.tableChanged(table); + DatabaseObjectCombo.this.tableChanged(table); } } }); @@ -308,7 +308,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * @return Whether the JPA project's connection profile is active. */ protected final boolean connectionProfileIsActive() { - JpaProject jpaProject = this.jpaProject(); + JpaProject jpaProject = this.getJpaProject(); return (jpaProject == null) ? false : jpaProject.getDataSource().connectionProfileIsActive(); } @@ -318,8 +318,8 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * @return The connection set in the project's properties or <code>null</code> * if it could not being retrieved */ - protected final ConnectionProfile connectionProfile() { - JpaProject jpaProject = this.jpaProject(); + protected final ConnectionProfile getConnectionProfile() { + JpaProject jpaProject = this.getJpaProject(); return (jpaProject == null) ? null : jpaProject.getConnectionProfile(); } @@ -329,8 +329,8 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * @return The online database or a <code>null</code> instance if no * connection profile was set or the */ - protected final Database database() { - ConnectionProfile cp = this.connectionProfile(); + protected final Database getDatabase() { + ConnectionProfile cp = this.getConnectionProfile(); return (cp == null) ? null : cp.getDatabase(); } @@ -340,14 +340,11 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * * @return The value that represents the default when no value was specified */ - protected abstract String defaultValue(); + protected abstract String getDefaultValue(); - /* - * (non-Javadoc) - */ @Override protected void disengageListeners(T subject) { - ConnectionProfile cp = this.connectionProfile(); + ConnectionProfile cp = this.getConnectionProfile(); if (cp != null) { cp.removeConnectionListener(this.connectionListener); } @@ -355,9 +352,6 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs super.disengageListeners(subject); } - /* - * (non-Javadoc) - */ @Override protected void doPopulate() { @@ -365,9 +359,6 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs populateCombo(); } - /* - * (non-Javadoc) - */ @Override public void enableWidgets(boolean enabled) { @@ -378,14 +369,11 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs } } - /* - * (non-Javadoc) - */ @Override protected void engageListeners(T subject) { super.engageListeners(subject); - ConnectionProfile cp = this.connectionProfile(); + ConnectionProfile cp = this.getConnectionProfile(); if (cp != null) { cp.addConnectionListener(this.connectionListener); } @@ -403,22 +391,16 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs return this.combo; } - /* - * (non-Javadoc) - */ @Override protected void initialize() { super.initialize(); this.connectionListener = buildConnectionListener(); } - /* - * (non-Javadoc) - */ @Override protected void initializeLayout(Composite container) { - this.combo = buildEditableCCombo(container); + this.combo = addEditableCCombo(container); this.combo.addModifyListener(buildModifyListener()); SWTUtil.attachDefaultValueHandler(this.combo); } @@ -439,13 +421,10 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * * @return The JPA project */ - protected JpaProject jpaProject() { - return subject() == null ? null : subject().getJpaProject(); + protected JpaProject getJpaProject() { + return getSubject() == null ? null : getSubject().getJpaProject(); } - /* - * (non-Javadoc) - */ @Override protected void log(String flag, String message) { @@ -489,7 +468,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs */ private void populateDefaultValue() { - String defaultValue = (subject() != null) ? defaultValue() : null; + String defaultValue = (getSubject() != null) ? getDefaultValue() : null; if (defaultValue != null) { combo.add(NLS.bind( @@ -502,9 +481,6 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs } } - /* - * (non-Javadoc) - */ @Override protected void propertyChanged(String propertyName) { super.propertyChanged(propertyName); @@ -552,10 +528,10 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs */ private void updateSelectedItem() { - T subject = subject(); + T subject = getSubject(); - String value = (subject != null) ? value() : null; - String defaultValue = (subject != null) ? defaultValue() : null; + String value = (subject != null) ? getValue() : null; + String defaultValue = (subject != null) ? getDefaultValue() : null; String displayString = JptUiMappingsMessages.ColumnComposite_defaultEmpty; if (defaultValue != null) { @@ -601,7 +577,7 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs * * @return The current value */ - protected abstract String value(); + protected abstract String getValue(); /** * The selection has changed, update the model if required. @@ -610,13 +586,13 @@ public abstract class AbstractDatabaseObjectCombo<T extends JpaNode> extends Abs */ protected void valueChanged(String value) { - JpaNode subject = subject(); + JpaNode subject = getSubject(); if ((subject == null) && !isBuildSubjectAllowed()) { return; } - String oldValue = (subject != null) ? value() : null; + String oldValue = (subject != null) ? getValue() : null; // Check for null value if (StringTools.stringIsEmpty(value)) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SchemaCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SchemaCombo.java index 10713dfc94..7426247454 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SchemaCombo.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SchemaCombo.java @@ -14,7 +14,7 @@ import java.util.Iterator; import org.eclipse.jpt.core.JpaNode; import org.eclipse.jpt.db.Database; import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.iterators.EmptyIterator; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public abstract class SchemaCombo<T extends JpaNode> extends AbstractDatabaseObjectCombo<T> +public abstract class SchemaCombo<T extends JpaNode> extends DatabaseObjectCombo<T> { /** * Creates a new <code>SchemaCombo</code>. @@ -33,7 +33,7 @@ public abstract class SchemaCombo<T extends JpaNode> extends AbstractDatabaseObj * @param parentPane The parent container of this one * @param parent The parent container */ - public SchemaCombo(AbstractPane<? extends T> parentPane, + public SchemaCombo(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -46,7 +46,7 @@ public abstract class SchemaCombo<T extends JpaNode> extends AbstractDatabaseObj * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public SchemaCombo(AbstractPane<?> parentPane, + public SchemaCombo(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -69,7 +69,7 @@ public abstract class SchemaCombo<T extends JpaNode> extends AbstractDatabaseObj @Override protected Iterator<String> values() { - Database db = this.database(); + Database db = this.getDatabase(); return (db == null) ? EmptyIterator.<String>instance() : db.schemaNames(); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SequenceCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SequenceCombo.java index 7d4bfcaa9f..40939e5af4 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SequenceCombo.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/SequenceCombo.java @@ -13,7 +13,7 @@ import java.util.Iterator; import org.eclipse.jpt.core.JpaNode; import org.eclipse.jpt.db.Schema; import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.iterators.EmptyIterator; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public abstract class SequenceCombo<T extends JpaNode> extends AbstractDatabaseObjectCombo<T> +public abstract class SequenceCombo<T extends JpaNode> extends DatabaseObjectCombo<T> { /** * Creates a new <code>SequenceCombo</code>. @@ -33,7 +33,7 @@ public abstract class SequenceCombo<T extends JpaNode> extends AbstractDatabaseO * @param parentPane The parent container of this one * @param parent The parent container */ - public SequenceCombo(AbstractPane<? extends T> parentPane, Composite parent) + public SequenceCombo(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); } @@ -45,7 +45,7 @@ public abstract class SequenceCombo<T extends JpaNode> extends AbstractDatabaseO * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public SequenceCombo(AbstractPane<?> parentPane, + public SequenceCombo(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -66,11 +66,11 @@ public abstract class SequenceCombo<T extends JpaNode> extends AbstractDatabaseO super(subjectHolder, parent, widgetFactory); } - protected abstract Schema schema(); + protected abstract Schema getSchema(); @Override protected Iterator<String> values() { - Schema schema = schema(); + Schema schema = getSchema(); return (schema == null) ? EmptyIterator.<String>instance() : schema.sequenceNames(); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/TableCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/TableCombo.java index 6d06783e5b..d80462a10b 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/TableCombo.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/db/TableCombo.java @@ -15,7 +15,7 @@ import org.eclipse.jpt.db.Database; import org.eclipse.jpt.db.Schema; import org.eclipse.jpt.db.Table; import org.eclipse.jpt.ui.WidgetFactory; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.iterators.EmptyIterator; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -26,7 +26,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public abstract class TableCombo<T extends JpaNode> extends AbstractDatabaseObjectCombo<T> +public abstract class TableCombo<T extends JpaNode> extends DatabaseObjectCombo<T> { /** * Creates a new <code>TableCombo</code>. @@ -34,7 +34,7 @@ public abstract class TableCombo<T extends JpaNode> extends AbstractDatabaseObje * @param parentPane The parent container of this one * @param parent The parent container */ - public TableCombo(AbstractPane<? extends T> parentPane, + public TableCombo(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -47,7 +47,7 @@ public abstract class TableCombo<T extends JpaNode> extends AbstractDatabaseObje * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public TableCombo(AbstractPane<?> parentPane, + public TableCombo(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -73,7 +73,7 @@ public abstract class TableCombo<T extends JpaNode> extends AbstractDatabaseObje * * @return The table's schema name */ - protected abstract String schemaName(); + protected abstract String getSchemaName(); /* * (non-Javadoc) @@ -82,7 +82,7 @@ public abstract class TableCombo<T extends JpaNode> extends AbstractDatabaseObje protected void tableChanged(Table table) { super.tableChanged(table); - if (table == table()) { + if (table == getDbTable()) { this.doPopulate(); } } @@ -92,7 +92,7 @@ public abstract class TableCombo<T extends JpaNode> extends AbstractDatabaseObje * * @return The selected table */ - protected abstract Table table(); + protected abstract Table getDbTable(); /* * (non-Javadoc) @@ -100,12 +100,12 @@ public abstract class TableCombo<T extends JpaNode> extends AbstractDatabaseObje @Override protected Iterator<String> values() { - Database db = this.database(); + Database db = this.getDatabase(); if (db == null) { return EmptyIterator.instance(); } - String schemaName = this.schemaName(); + String schemaName = this.getSchemaName(); if (schemaName == null) { return EmptyIterator.instance(); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEmbeddedMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEmbeddedMappingComposite.java index 5740efb602..d0dcea727d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEmbeddedMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEmbeddedMappingComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.BaseEmbeddedMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public abstract class AbstractEmbeddedMappingComposite<T extends BaseEmbeddedMapping> extends AbstractFormPane<T> +public abstract class AbstractEmbeddedMappingComposite<T extends BaseEmbeddedMapping> extends FormPane<T> implements JpaComposite { /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEntityComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEntityComposite.java index fa80c318e0..a81bcf4db1 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEntityComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractEntityComposite.java @@ -14,7 +14,7 @@ import org.eclipse.jpt.core.context.Table; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -88,7 +88,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public abstract class AbstractEntityComposite<T extends Entity> extends AbstractFormPane<T> +public abstract class AbstractEntityComposite<T extends Entity> extends FormPane<T> implements JpaComposite { /** @@ -105,9 +105,9 @@ public abstract class AbstractEntityComposite<T extends Entity> extends Abstract super(subjectHolder, parent, widgetFactory); } - protected abstract void buildSecondaryTablesComposite(Composite container); + protected abstract void addSecondaryTablesComposite(Composite container); - protected abstract void buildInheritanceComposite(Composite container); + protected abstract void addInheritanceComposite(Composite container); private PropertyValueModel<Table> buildTableHolder() { return new TransformationPropertyValueModel<Entity, Table>(getSubjectHolder()) { @@ -131,12 +131,12 @@ public abstract class AbstractEntityComposite<T extends Entity> extends Abstract protected void initializeGeneralPane(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); // Entity Name widgets new EntityNameComposite( this, - buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin) + addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin) ); // Table widgets @@ -149,13 +149,13 @@ public abstract class AbstractEntityComposite<T extends Entity> extends Abstract // Primary Key Class widgets new IdClassComposite( this, - buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin) + addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin) ); } protected void initializeQueriesPane(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.EntityComposite_queries ); @@ -165,7 +165,7 @@ public abstract class AbstractEntityComposite<T extends Entity> extends Abstract protected void initializeAttributeOverridesPane(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.AttributeOverridesComposite_attributeOverrides ); @@ -175,17 +175,17 @@ public abstract class AbstractEntityComposite<T extends Entity> extends Abstract protected void initializeInheritancePane(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.EntityComposite_inheritance ); - buildInheritanceComposite(container); + addInheritanceComposite(container); } protected void initializeGeneratorsPane(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.IdMappingComposite_primaryKeyGeneration ); @@ -195,11 +195,11 @@ public abstract class AbstractEntityComposite<T extends Entity> extends Abstract protected void initializeSecondaryTablesPane(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.SecondaryTablesComposite_secondaryTables ); - buildSecondaryTablesComposite(container); + addSecondaryTablesComposite(container); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractInheritanceComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractInheritanceComposite.java index b3ac8fcd41..a246bf862e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractInheritanceComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractInheritanceComposite.java @@ -21,7 +21,7 @@ import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.mappings.db.ColumnCombo; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.jpt.utility.internal.StringConverter; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; @@ -81,7 +81,7 @@ import org.eclipse.swt.widgets.Spinner; * @since 2.0 */ @SuppressWarnings("nls") -public abstract class AbstractInheritanceComposite<T extends Entity> extends AbstractPane<T> { +public abstract class AbstractInheritanceComposite<T extends Entity> extends Pane<T> { /** * A key used to represent the default value, this is required to convert @@ -98,7 +98,7 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs * @param parentPane The parent container of this one * @param parent The parent container */ - public AbstractInheritanceComposite(AbstractPane<? extends T> parentPane, + public AbstractInheritanceComposite(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent, false); @@ -167,9 +167,9 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs }; } - private Control buildDefaultLengthLabel(Composite container) { + private Control addDefaultLengthLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, JptUiMappingsMessages.DefaultWithoutValue ); @@ -189,7 +189,7 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs @Override protected String transform(Integer value) { - Integer defaultValue = (subject() != null) ? subject().getDiscriminatorColumn().getDefaultLength() : + Integer defaultValue = (getSubject() != null) ? getSubject().getDiscriminatorColumn().getDefaultLength() : DiscriminatorColumn.DEFAULT_LENGTH; return NLS.bind( @@ -200,7 +200,7 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs }; } - private ColumnCombo<DiscriminatorColumn> buildDiscriminatorColumnCombo( + private ColumnCombo<DiscriminatorColumn> addDiscriminatorColumnCombo( Composite container, PropertyValueModel<DiscriminatorColumn> discriminatorColumnHolder) { @@ -218,23 +218,23 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs } @Override - protected String defaultValue() { - return subject().getDefaultName(); + protected String getDefaultValue() { + return getSubject().getDefaultName(); } @Override protected void setValue(String value) { - subject().setSpecifiedName(value); + getSubject().setSpecifiedName(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedName(); + protected String getValue() { + return getSubject().getSpecifiedName(); } }; } @@ -248,7 +248,7 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs }; } - private EnumFormComboViewer<DiscriminatorColumn, DiscriminatorType> buildDiscriminatorTypeCombo( + private EnumFormComboViewer<DiscriminatorColumn, DiscriminatorType> addDiscriminatorTypeCombo( Composite container, PropertyValueModel<DiscriminatorColumn> discriminatorColumnHolder) { @@ -265,13 +265,13 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs } @Override - protected DiscriminatorType[] choices() { + protected DiscriminatorType[] getChoices() { return DiscriminatorType.values(); } @Override - protected DiscriminatorType defaultValue() { - return subject().getDefaultDiscriminatorType(); + protected DiscriminatorType getDefaultValue() { + return getSubject().getDefaultDiscriminatorType(); } @Override @@ -285,12 +285,12 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs @Override protected DiscriminatorType getValue() { - return subject().getSpecifiedDiscriminatorType(); + return getSubject().getSpecifiedDiscriminatorType(); } @Override protected void setValue(DiscriminatorType value) { - subject().setSpecifiedDiscriminatorType(value); + getSubject().setSpecifiedDiscriminatorType(value); } }; } @@ -299,12 +299,12 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs return new StringConverter<String>() { public String convertToString(String value) { - if (subject() == null) { + if (getSubject() == null) { return null; } if (value == null) { - value = subject().getDefaultDiscriminatorValue(); + value = getSubject().getDefaultDiscriminatorValue(); if (value != null) { value = DEFAULT_KEY + value; @@ -377,7 +377,7 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs }; } - private EnumFormComboViewer<Entity, InheritanceType> buildStrategyCombo(Composite container) { + private EnumFormComboViewer<Entity, InheritanceType> addStrategyCombo(Composite container) { return new EnumFormComboViewer<Entity, InheritanceType>(this, container) { @@ -389,13 +389,13 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs } @Override - protected InheritanceType[] choices() { + protected InheritanceType[] getChoices() { return InheritanceType.values(); } @Override - protected InheritanceType defaultValue() { - return subject().getDefaultInheritanceStrategy(); + protected InheritanceType getDefaultValue() { + return getSubject().getDefaultInheritanceStrategy(); } @Override @@ -409,12 +409,12 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs @Override protected InheritanceType getValue() { - return subject().getSpecifiedInheritanceStrategy(); + return getSubject().getSpecifiedInheritanceStrategy(); } @Override protected void setValue(InheritanceType value) { - subject().setSpecifiedInheritanceStrategy(value); + getSubject().setSpecifiedInheritanceStrategy(value); } }; } @@ -425,43 +425,43 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs buildDiscriminatorColumnHolder(); // Name widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.DiscriminatorColumnComposite_name, - buildDiscriminatorColumnCombo(container, discriminatorColumnHolder), + addDiscriminatorColumnCombo(container, discriminatorColumnHolder), JpaHelpContextIds.ENTITY_INHERITANCE_DISCRIMINATOR_COLUMN ); // Discriminator Type widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.DiscriminatorColumnComposite_discriminatorType, - buildDiscriminatorTypeCombo(container, discriminatorColumnHolder), + addDiscriminatorTypeCombo(container, discriminatorColumnHolder), JpaHelpContextIds.ENTITY_INHERITANCE_DISCRIMINATOR_TYPE ); - container = buildCollapsableSubSection( - buildSubPane(container, 10), + container = addCollapsableSubSection( + addSubPane(container, 10), JptUiMappingsMessages.InheritanceComposite_detailsGroupBox, new SimplePropertyValueModel<Boolean>(Boolean.FALSE) ); // Length widgets - Spinner lengthSpinner = buildLabeledSpinner( + Spinner lengthSpinner = addLabeledSpinner( container, JptUiMappingsMessages.ColumnComposite_length, buildLengthHolder(discriminatorColumnHolder), -1, -1, Integer.MAX_VALUE, - buildDefaultLengthLabel(container), + addDefaultLengthLabel(container), JpaHelpContextIds.MAPPING_COLUMN_LENGTH ); updateGridData(container, lengthSpinner); // Column Definition widgets - buildLabeledText( + addLabeledText( container, JptUiMappingsMessages.ColumnComposite_columnDefinition, buildColumnDefinitionHolder(discriminatorColumnHolder) @@ -474,22 +474,22 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); - Composite subPane = buildSubPane( + Composite subPane = addSubPane( container, 0, groupBoxMargin, 0, groupBoxMargin ); // Strategy widgets - buildLabeledComposite( + addLabeledComposite( subPane, JptUiMappingsMessages.InheritanceComposite_strategy, - buildStrategyCombo(subPane), + addStrategyCombo(subPane), JpaHelpContextIds.ENTITY_INHERITANCE_STRATEGY ); // Discrinator Value widgets - CCombo discriminatorValueCombo = buildLabeledEditableCCombo( + CCombo discriminatorValueCombo = addLabeledEditableCCombo( subPane, JptUiMappingsMessages.InheritanceComposite_discriminatorValue, buildDiscriminatorValueListHolder(), @@ -499,18 +499,18 @@ public abstract class AbstractInheritanceComposite<T extends Entity> extends Abs ); // Discriminator Column sub-pane - Composite discriminatorColumnContainer = buildTitledPane( - buildSubPane(container, 10), + Composite discriminatorColumnContainer = addTitledGroup( + addSubPane(container, 10), JptUiMappingsMessages.InheritanceComposite_discriminatorColumnGroupBox ); initializeDiscriminatorColumnPane(discriminatorColumnContainer); // Primary Key Join Columns widgets - buildPrimaryKeyJoinColumnsComposite(buildSubPane(container, 5)); + addPrimaryKeyJoinColumnsComposite(addSubPane(container, 5)); } - protected abstract void buildPrimaryKeyJoinColumnsComposite(Composite container); + protected abstract void addPrimaryKeyJoinColumnsComposite(Composite container); /** * Changes the layout of the given container by changing which widget will diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractPrimaryKeyJoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractPrimaryKeyJoinColumnsComposite.java index 1671a1da28..8bf44d738f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractPrimaryKeyJoinColumnsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractPrimaryKeyJoinColumnsComposite.java @@ -21,7 +21,7 @@ import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.PostExecution; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.AbstractAdapter; @@ -60,7 +60,7 @@ import org.eclipse.swt.widgets.Group; * @version 2.0 * @since 2.0 */ -public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> extends AbstractPane<T> +public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> extends Pane<T> { protected WritablePropertyValueModel<PrimaryKeyJoinColumn> joinColumnHolder; @@ -70,7 +70,7 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e * @param parentPane The parent controller of this one * @param parent The parent container */ - public AbstractPrimaryKeyJoinColumnsComposite(AbstractPane<? extends T> subjectHolder, + public AbstractPrimaryKeyJoinColumnsComposite(Pane<? extends T> subjectHolder, Composite parent) { super(subjectHolder, parent); @@ -78,7 +78,7 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e private void addJoinColumn(PrimaryKeyJoinColumnStateObject stateObject) { - Entity subject = subject(); + Entity subject = getSubject(); int index = subject.specifiedPrimaryKeyJoinColumnsSize(); PrimaryKeyJoinColumn joinColumn = subject.addSpecifiedPrimaryKeyJoinColumn(index); @@ -88,8 +88,8 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e private void addPrimaryKeyJoinColumn() { PrimaryKeyJoinColumnDialog dialog = new PrimaryKeyJoinColumnDialog( - shell(), - subject(), + getShell(), + getSubject(), null ); @@ -100,7 +100,7 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e return new PostExecution<PrimaryKeyJoinColumnDialog>() { public void execute(PrimaryKeyJoinColumnDialog dialog) { if (dialog.wasConfirmed()) { - addJoinColumn(dialog.subject()); + addJoinColumn(dialog.getSubject()); } } }; @@ -112,7 +112,7 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e return new PostExecution<PrimaryKeyJoinColumnDialog>() { public void execute(PrimaryKeyJoinColumnDialog dialog) { if (dialog.wasConfirmed()) { - editJoinColumn(dialog.subject()); + editJoinColumn(dialog.getSubject()); } } }; @@ -186,7 +186,7 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { int[] selectedIndices = listSelectionModel.selectedIndices(); - Entity entity = subject(); + Entity entity = getSubject(); for (int index = selectedIndices.length; --index >= 0; ) { entity.removeSpecifiedPrimaryKeyJoinColumn(selectedIndices[index]); @@ -248,8 +248,8 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e PrimaryKeyJoinColumn joinColumn = (PrimaryKeyJoinColumn) listSelectionModel.selectedValue(); PrimaryKeyJoinColumnDialog dialog = new PrimaryKeyJoinColumnDialog( - shell(), - subject(), + getShell(), + getSubject(), joinColumn ); @@ -272,16 +272,17 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e protected void initializeLayout(Composite container) { // Primary Key Join Columns group pane - Group groupPane = buildTitledPane( + Group groupPane = addTitledGroup( container, JptUiMappingsMessages.PrimaryKeyJoinColumnsComposite_primaryKeyJoinColumn ); // Override Default Join Columns check box - buildCheckBox( - buildSubPane(groupPane, 8), + addCheckBox( + addSubPane(groupPane, 8), JptUiMappingsMessages.PrimaryKeyJoinColumnsComposite_overrideDefaultPrimaryKeyJoinColumns, - buildOverrideDefaultJoinColumnHolder() + buildOverrideDefaultJoinColumnHolder(), + null ); // Primary Key Join Columns list pane @@ -322,8 +323,8 @@ public abstract class AbstractPrimaryKeyJoinColumnsComposite<T extends Entity> e } // Remove all the specified join columns else { - for (int index = subject().specifiedPrimaryKeyJoinColumnsSize(); --index >= 0; ) { - subject().removeSpecifiedPrimaryKeyJoinColumn(index); + for (int index = getSubject().specifiedPrimaryKeyJoinColumnsSize(); --index >= 0; ) { + getSubject().removeSpecifiedPrimaryKeyJoinColumn(index); } } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractSecondaryTablesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractSecondaryTablesComposite.java index e7cccff23c..6cf4773f5e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractSecondaryTablesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/AbstractSecondaryTablesComposite.java @@ -15,7 +15,7 @@ import org.eclipse.jface.window.Window; import org.eclipse.jpt.core.context.Entity; import org.eclipse.jpt.core.context.SecondaryTable; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; import org.eclipse.jpt.utility.internal.model.value.swing.ObjectListSelectionModel; @@ -48,7 +48,7 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory; * @version 2.0 * @since 1.0 */ -public abstract class AbstractSecondaryTablesComposite<T extends Entity> extends AbstractFormPane<T> +public abstract class AbstractSecondaryTablesComposite<T extends Entity> extends FormPane<T> { /** * Creates a new <code>SecondaryTablesComposite</code>. @@ -56,7 +56,7 @@ public abstract class AbstractSecondaryTablesComposite<T extends Entity> extends * @param parentPane The parent container of this one * @param parent The parent container */ - public AbstractSecondaryTablesComposite(AbstractFormPane<? extends T> parentPane, + public AbstractSecondaryTablesComposite(FormPane<? extends T> parentPane, Composite parent) { super(parentPane, parent, false); @@ -79,11 +79,11 @@ public abstract class AbstractSecondaryTablesComposite<T extends Entity> extends private void addSecondaryTableFromDialog(SecondaryTableDialog dialog, ObjectListSelectionModel listSelectionModel) { if (dialog.open() == Window.OK) { - int index = this.subject().specifiedSecondaryTablesSize(); + int index = this.getSubject().specifiedSecondaryTablesSize(); String name = dialog.getSelectedName(); String catalog = dialog.getSelectedCatalog(); String schema = dialog.getSelectedSchema(); - SecondaryTable secondaryTable = this.subject().addSpecifiedSecondaryTable(index); + SecondaryTable secondaryTable = this.getSubject().addSpecifiedSecondaryTable(index); secondaryTable.setSpecifiedName(name); if (!dialog.isDefaultCatalogSelected()) { secondaryTable.setSpecifiedCatalog(catalog); @@ -115,7 +115,7 @@ public abstract class AbstractSecondaryTablesComposite<T extends Entity> extends } protected SecondaryTableDialog buildSecondaryTableDialogForAdd() { - return new SecondaryTableDialog(getControl().getShell(), subject().getJpaProject(), subject().getTable().getDefaultSchema(), subject().getTable().getDefaultCatalog()); + return new SecondaryTableDialog(getControl().getShell(), getSubject().getJpaProject(), getSubject().getTable().getDefaultSchema(), getSubject().getTable().getDefaultCatalog()); } protected AddRemoveListPane.Adapter buildSecondaryTablesAdapter() { @@ -139,12 +139,12 @@ public abstract class AbstractSecondaryTablesComposite<T extends Entity> extends @Override public void optionOnSelection(ObjectListSelectionModel listSelectionModel) { SecondaryTable secondaryTable = (SecondaryTable) listSelectionModel.selectedValue(); - SecondaryTableDialog dialog = new SecondaryTableDialog(getControl().getShell(), secondaryTable, subject().getJpaProject()); + SecondaryTableDialog dialog = new SecondaryTableDialog(getControl().getShell(), secondaryTable, getSubject().getJpaProject()); editSecondaryTableFromDialog(dialog, secondaryTable); } public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - Entity entity = subject(); + Entity entity = getSubject(); int[] selectedIndices = listSelectionModel.selectedIndices(); for (int index = selectedIndices.length; --index >= 0; ) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialog.java index f00883a597..588fdff739 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialog.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.BaseJoinColumn; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractValidatingDialog; +import org.eclipse.jpt.ui.internal.widgets.ValidatingDialog; import org.eclipse.swt.widgets.Shell; /** @@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.Shell; * @version 2.0 * @since 1.0 */ -public abstract class BaseJoinColumnDialog<T extends BaseJoinColumnStateObject> extends AbstractValidatingDialog<T> { +public abstract class BaseJoinColumnDialog<T extends BaseJoinColumnStateObject> extends ValidatingDialog<T> { /** * Either the join column to edit or <code>null</code> if this state object @@ -58,7 +58,7 @@ public abstract class BaseJoinColumnDialog<T extends BaseJoinColumnStateObject> * (non-Javadoc) */ @Override - protected String description() { + protected String getDescription() { return JptUiMappingsMessages.JoinColumnDialog_description; } @@ -66,7 +66,7 @@ public abstract class BaseJoinColumnDialog<T extends BaseJoinColumnStateObject> * (non-Javadoc) */ @Override - protected String descriptionTitle() { + protected String getDescriptionTitle() { if (joinColumn == null) { return JptUiMappingsMessages.JoinColumnDialog_addJoinColumnDescriptionTitle; @@ -99,7 +99,7 @@ public abstract class BaseJoinColumnDialog<T extends BaseJoinColumnStateObject> * (non-Javadoc) */ @Override - protected String title() { + protected String getTitle() { if (joinColumn == null) { return JptUiMappingsMessages.JoinColumnDialog_addJoinColumnTitle; diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialogPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialogPane.java index cda5bb4dee..c358b4a1f1 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialogPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnDialogPane.java @@ -14,7 +14,7 @@ import java.util.ListIterator; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; 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; @@ -56,7 +56,7 @@ import org.eclipse.swt.widgets.Composite; * @since 2.0 */ @SuppressWarnings("nls") -public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> extends AbstractDialogPane<T> +public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> extends DialogPane<T> { /** * A key used to represent the default value, this is required to convert @@ -100,8 +100,8 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten * (non-Javadoc) */ @Override - protected Composite buildContainer(Composite parent) { - return buildSubPane(parent, 0, 7, 0, 5); + protected Composite addContainer(Composite parent) { + return addSubPane(parent, 0, 7, 0, 5); } private PropertyValueModel<String> buildDefaultNameHolder() { @@ -180,7 +180,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten return new StringConverter<String>() { public String convertToString(String value) { - if (subject() == null) { + if (getSubject() == null) { return null; } @@ -259,7 +259,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten private StringConverter<String> buildNameStringConverter() { return buildDisplayableStringConverter(new DefaultValueHandler() { public String getDefaultValue() { - return subject().getDefaultName(); + return getSubject().getDefaultName(); } }); } @@ -309,7 +309,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten private StringConverter<String> buildReferencedColumnNameStringConverter() { return buildDisplayableStringConverter(new DefaultValueHandler() { public String getDefaultValue() { - return subject().getDefaultReferencedColumnName(); + return getSubject().getDefaultReferencedColumnName(); } }); } @@ -355,7 +355,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten private StringConverter<String> buildTableStringConverter() { return buildDisplayableStringConverter(new DefaultValueHandler() { public String getDefaultValue() { - return subject().getDefaultTable(); + return getSubject().getDefaultTable(); } }); } @@ -367,7 +367,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten protected void initializeLayout(Composite container) { // Name widgets - Combo nameCombo = buildLabeledEditableCombo( + Combo nameCombo = addLabeledEditableCombo( container, JptUiMappingsMessages.JoinColumnDialog_name, buildNamesListHolder(), @@ -379,7 +379,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten SWTUtil.attachDefaultValueHandler(nameCombo); // Referenced Column Name widgets - Combo referencedColumnNameCombo = buildLabeledEditableCombo( + Combo referencedColumnNameCombo = addLabeledEditableCombo( container, JptUiMappingsMessages.JoinColumnDialog_referencedColumnName, buildReferencedColumnNamesListHolder(), @@ -393,7 +393,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten // Table widgets if (isTableEditable()) { - Combo tableCombo = buildLabeledEditableCombo( + Combo tableCombo = addLabeledEditableCombo( container, JptUiMappingsMessages.JoinColumnDialogPane_table, buildTablesListHolder(), @@ -405,7 +405,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten SWTUtil.attachDefaultValueHandler(tableCombo); } else { - Combo tableCombo = buildLabeledCombo( + Combo tableCombo = addLabeledCombo( container, JptUiMappingsMessages.JoinColumnDialogPane_table, buildTablesListHolder(), @@ -418,7 +418,7 @@ public class BaseJoinColumnDialogPane<T extends BaseJoinColumnStateObject> exten } // Column Definition widgets - buildLabeledText( + addLabeledText( container, JptUiMappingsMessages.JoinColumnDialogPane_columnDefinition, buildColumnDefinitionHolder() diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnStateObject.java index 0a62f31055..0513200d3c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BaseJoinColumnStateObject.java @@ -279,7 +279,7 @@ public abstract class BaseJoinColumnStateObject extends AbstractNode this.owner = owner; this.joinColumn = joinColumn; - this.table = this.initialTable(); + this.table = this.getInitialTable(); if (joinColumn != null) { this.name = joinColumn.getSpecifiedName(); @@ -291,7 +291,7 @@ public abstract class BaseJoinColumnStateObject extends AbstractNode /** * Returns */ - protected abstract String initialTable(); + protected abstract String getInitialTable(); /** * Returns the column names if the database table can be resolved. diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BasicMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BasicMappingComposite.java index 1077b711d1..82c37cff28 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BasicMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/BasicMappingComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.BasicMapping; import org.eclipse.jpt.core.context.Column; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -66,7 +66,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class BasicMappingComposite extends AbstractFormPane<BasicMapping> +public class BasicMappingComposite extends FormPane<BasicMapping> implements JpaComposite { /** @@ -98,13 +98,13 @@ public class BasicMappingComposite extends AbstractFormPane<BasicMapping> @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); // Column widgets new ColumnComposite(this, buildColumnHolder(), container); // Align the widgets under the ColumnComposite - container = buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); + container = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); // Fetch Type widgets new FetchTypeComposite(this, container); @@ -116,7 +116,7 @@ public class BasicMappingComposite extends AbstractFormPane<BasicMapping> new EnumTypeComposite(this, container); // Optional widgets - new OptionalComposite(this, buildSubPane(container, 4)); + new OptionalComposite(this, addSubPane(container, 4)); // Lob check box new LobComposite(this, container); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CascadeComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CascadeComposite.java index 2201ff7caf..937760361d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CascadeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CascadeComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.Cascade; import org.eclipse.jpt.core.context.RelationshipMapping; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -41,7 +41,7 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory; * @version 2.0 * @since 1.0 */ -public class CascadeComposite extends AbstractFormPane<Cascade> +public class CascadeComposite extends FormPane<Cascade> { /** * Creates a new <code>CascadeComposite</code>. @@ -50,7 +50,7 @@ public class CascadeComposite extends AbstractFormPane<Cascade> * @param subjectHolder The holder of the subject <code>ICascade</code> * @param parent The parent container */ - public CascadeComposite(AbstractFormPane<? extends RelationshipMapping> parentPane, + public CascadeComposite(FormPane<? extends RelationshipMapping> parentPane, PropertyValueModel<? extends Cascade> subjectHolder, Composite parent) { @@ -148,47 +148,52 @@ public class CascadeComposite extends AbstractFormPane<Cascade> protected void initializeLayout(Composite container) { // Cascade group - Group cascadeGroup = buildTitledPane( + Group cascadeGroup = addTitledGroup( container, JptUiMappingsMessages.CascadeComposite_cascadeTitle ); // Container of the check boxes - container = buildSubPane(cascadeGroup, 5, 8, 0, 0, 0); + container = addSubPane(cascadeGroup, 5, 8, 0, 0, 0); // All check box - buildCheckBox( + addCheckBox( container, JptUiMappingsMessages.CascadeComposite_all, - buildCascadeTypeAllHolder() + buildCascadeTypeAllHolder(), + null ); // Persist check box - buildCheckBox( + addCheckBox( container, JptUiMappingsMessages.CascadeComposite_persist, - buildCascadeTypePersistHolder() + buildCascadeTypePersistHolder(), + null ); // Merge check box - buildCheckBox( + addCheckBox( container, JptUiMappingsMessages.CascadeComposite_merge, - buildCascadeTypeMergeHolder() + buildCascadeTypeMergeHolder(), + null ); // Remove check box - buildCheckBox( + addCheckBox( container, JptUiMappingsMessages.CascadeComposite_remove, - buildCascadeTypeRemoveHolder() + buildCascadeTypeRemoveHolder(), + null ); // Refresh check box - buildCheckBox( + addCheckBox( container, JptUiMappingsMessages.CascadeComposite_refresh, - buildCascadeTypeRefreshHolder() + buildCascadeTypeRefreshHolder(), + null ); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ColumnComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ColumnComposite.java index d24d0ab5c6..aa268b3550 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ColumnComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ColumnComposite.java @@ -11,16 +11,17 @@ package org.eclipse.jpt.ui.internal.mappings.details; import java.util.Collection; import java.util.Iterator; +import org.eclipse.jpt.core.context.BaseColumn; import org.eclipse.jpt.core.context.Column; +import org.eclipse.jpt.core.context.NamedColumn; import org.eclipse.jpt.db.Table; -import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.mappings.db.ColumnCombo; import org.eclipse.jpt.ui.internal.mappings.db.TableCombo; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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.SimplePropertyValueModel; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; @@ -83,7 +84,7 @@ import org.eclipse.swt.widgets.Spinner; * @version 2.0 * @since 1.0 */ -public class ColumnComposite extends AbstractFormPane<Column> { +public class ColumnComposite extends FormPane<Column> { /** * Creates a new <code>ColumnComposite</code>. @@ -92,7 +93,7 @@ public class ColumnComposite extends AbstractFormPane<Column> { * @param subjectHolder The holder of the subject <code>IColumn</code> * @param parent The parent container */ - public ColumnComposite(AbstractFormPane<?> parentPane, + public ColumnComposite(FormPane<?> parentPane, PropertyValueModel<? extends Column> subjectHolder, Composite parent) { @@ -109,26 +110,31 @@ public class ColumnComposite extends AbstractFormPane<Column> { * this pane aligned with the widgets of the given parent controller; * <code>false</code> to not align them */ - public ColumnComposite(AbstractFormPane<?> parentPane, + public ColumnComposite(FormPane<?> parentPane, PropertyValueModel<? extends Column> subjectHolder, Composite parent, boolean automaticallyAlignWidgets) { super(parentPane, subjectHolder, parent, automaticallyAlignWidgets); } - + /** * Creates a new <code>ColumnComposite</code>. * + * @param parentPane The parent container of this one * @param subjectHolder The holder of the subject <code>IColumn</code> * @param parent The parent container - * @param widgetFactory The factory used to create various common widgets + * @param automaticallyAlignWidgets <code>true</code> to make the widgets + * this pane aligned with the widgets of the given parent controller; + * <code>false</code> to not align them */ - public ColumnComposite(PropertyValueModel<? extends Column> subjectHolder, + public ColumnComposite(FormPane<?> parentPane, + PropertyValueModel<? extends Column> subjectHolder, Composite parent, - WidgetFactory widgetFactory) { + boolean automaticallyAlignWidgets, + boolean parentManagePane) { - super(subjectHolder, parent, widgetFactory); + super(parentPane, subjectHolder, parent, automaticallyAlignWidgets, parentManagePane); } private ColumnCombo<Column> buildColumnCombo(Composite container) { @@ -138,17 +144,17 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected void addPropertyNames(Collection<String> propertyNames) { super.addPropertyNames(propertyNames); - propertyNames.add(Column.DEFAULT_NAME_PROPERTY); - propertyNames.add(Column.SPECIFIED_NAME_PROPERTY); - propertyNames.add(Column.DEFAULT_TABLE_PROPERTY); - propertyNames.add(Column.SPECIFIED_TABLE_PROPERTY); + propertyNames.add(NamedColumn.DEFAULT_NAME_PROPERTY); + propertyNames.add(NamedColumn.SPECIFIED_NAME_PROPERTY); + propertyNames.add(BaseColumn.DEFAULT_TABLE_PROPERTY); + propertyNames.add(BaseColumn.SPECIFIED_TABLE_PROPERTY); } @Override protected void propertyChanged(String propertyName) { - if (propertyName == Column.DEFAULT_TABLE_PROPERTY || - propertyName == Column.SPECIFIED_TABLE_PROPERTY) { + if (propertyName == BaseColumn.DEFAULT_TABLE_PROPERTY || + propertyName == BaseColumn.SPECIFIED_TABLE_PROPERTY) { doPopulate(); } @@ -158,23 +164,23 @@ public class ColumnComposite extends AbstractFormPane<Column> { } @Override - protected String defaultValue() { - return subject().getDefaultName(); + protected String getDefaultValue() { + return getSubject().getDefaultName(); } @Override protected void setValue(String value) { - subject().setSpecifiedName(value); + getSubject().setSpecifiedName(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedName(); + protected String getValue() { + return getSubject().getSpecifiedName(); } }; } @@ -217,9 +223,9 @@ public class ColumnComposite extends AbstractFormPane<Column> { }; } - private Control buildDefaultLengthLabel(Composite container) { + private Control addDefaultLengthLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, JptUiMappingsMessages.DefaultWithoutValue ); @@ -239,7 +245,7 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected String transform(Integer value) { - Integer defaultValue = (subject() != null) ? subject().getDefaultLength() : + Integer defaultValue = (getSubject() != null) ? getSubject().getDefaultLength() : Column.DEFAULT_LENGTH; return NLS.bind( @@ -271,9 +277,9 @@ public class ColumnComposite extends AbstractFormPane<Column> { }; } - private Control buildDefaultPrecisionLabel(Composite container) { + private Control addDefaultPrecisionLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, JptUiMappingsMessages.DefaultWithoutValue ); @@ -293,7 +299,7 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected String transform(Integer value) { - Integer defaultValue = (subject() != null) ? subject().getDefaultPrecision() : + Integer defaultValue = (getSubject() != null) ? getSubject().getDefaultPrecision() : Column.DEFAULT_PRECISION; return NLS.bind( @@ -325,9 +331,9 @@ public class ColumnComposite extends AbstractFormPane<Column> { }; } - private Control buildDefaultScaleLabel(Composite container) { + private Control addDefaultScaleLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, JptUiMappingsMessages.DefaultWithoutValue ); @@ -347,7 +353,7 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected String transform(Integer value) { - Integer defaultValue = (subject() != null) ? subject().getDefaultScale() : + Integer defaultValue = (getSubject() != null) ? getSubject().getDefaultScale() : Column.DEFAULT_SCALE; return NLS.bind( @@ -379,9 +385,9 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultInsertable(); + Boolean defaultValue = getSubject().getDefaultInsertable(); if (defaultValue != null) { @@ -420,8 +426,8 @@ public class ColumnComposite extends AbstractFormPane<Column> { private WritablePropertyValueModel<Boolean> buildNullableHolder() { return new PropertyAspectAdapter<Column, Boolean>( getSubjectHolder(), - Column.DEFAULT_NULLABLE_PROPERTY, - Column.SPECIFIED_NULLABLE_PROPERTY) + BaseColumn.DEFAULT_NULLABLE_PROPERTY, + BaseColumn.SPECIFIED_NULLABLE_PROPERTY) { @Override protected Boolean buildValue_() { @@ -452,9 +458,9 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultNullable(); + Boolean defaultValue = getSubject().getDefaultNullable(); if (defaultValue != null) { @@ -507,45 +513,45 @@ public class ColumnComposite extends AbstractFormPane<Column> { }; } - private TableCombo<Column> buildTableCombo(Composite container) { + private TableCombo<Column> addTableCombo(Composite container) { return new TableCombo<Column>(this, container) { @Override protected void addPropertyNames(Collection<String> propertyNames) { super.addPropertyNames(propertyNames); - propertyNames.add(Column.DEFAULT_TABLE_PROPERTY); - propertyNames.add(Column.SPECIFIED_TABLE_PROPERTY); + propertyNames.add(BaseColumn.DEFAULT_TABLE_PROPERTY); + propertyNames.add(BaseColumn.SPECIFIED_TABLE_PROPERTY); } @Override - protected String defaultValue() { - return subject().getDefaultTable(); + protected String getDefaultValue() { + return getSubject().getDefaultTable(); } @Override - protected String schemaName() { + protected String getSchemaName() { return null; } @Override protected void setValue(String value) { - subject().setSpecifiedTable(value); + getSubject().setSpecifiedTable(value); } @Override - protected Table table() { - return subject().getDbTable(); + protected Table getDbTable() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedTable(); + protected String getValue() { + return getSubject().getSpecifiedTable(); } @Override protected Iterator<String> values() { - return subject().getOwner().getTypeMapping().associatedTableNamesIncludingInherited(); + return getSubject().getOwner().getTypeMapping().associatedTableNamesIncludingInherited(); } }; } @@ -553,8 +559,8 @@ public class ColumnComposite extends AbstractFormPane<Column> { private WritablePropertyValueModel<Boolean> buildUniqueHolder() { return new PropertyAspectAdapter<Column, Boolean>( getSubjectHolder(), - Column.DEFAULT_UNIQUE_PROPERTY, - Column.SPECIFIED_UNIQUE_PROPERTY) + BaseColumn.DEFAULT_UNIQUE_PROPERTY, + BaseColumn.SPECIFIED_UNIQUE_PROPERTY) { @Override protected Boolean buildValue_() { @@ -587,9 +593,9 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultUnique(); + Boolean defaultValue = getSubject().getDefaultUnique(); if (defaultValue != null) { @@ -611,8 +617,8 @@ public class ColumnComposite extends AbstractFormPane<Column> { private WritablePropertyValueModel<Boolean> buildUpdatableHolder() { return new PropertyAspectAdapter<Column, Boolean>( getSubjectHolder(), - Column.DEFAULT_UPDATABLE_PROPERTY, - Column.SPECIFIED_UPDATABLE_PROPERTY) + BaseColumn.DEFAULT_UPDATABLE_PROPERTY, + BaseColumn.SPECIFIED_UPDATABLE_PROPERTY) { @Override protected Boolean buildValue_() { @@ -645,9 +651,9 @@ public class ColumnComposite extends AbstractFormPane<Column> { @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultUpdatable(); + Boolean defaultValue = getSubject().getDefaultUpdatable(); if (defaultValue != null) { @@ -669,8 +675,8 @@ public class ColumnComposite extends AbstractFormPane<Column> { private void initializeDetailsPane(Composite container) { // Insertable tri-state check box - buildTriStateCheckBoxWithDefault( - buildSubPane(container, 4), + addTriStateCheckBoxWithDefault( + addSubPane(container, 4), JptUiMappingsMessages.ColumnComposite_insertable, buildInsertableHolder(), buildInsertableStringHolder(), @@ -678,7 +684,7 @@ public class ColumnComposite extends AbstractFormPane<Column> { ); // Updatable tri-state check box - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiMappingsMessages.ColumnComposite_updatable, buildUpdatableHolder(), @@ -687,7 +693,7 @@ public class ColumnComposite extends AbstractFormPane<Column> { ); // Unique tri-state check box - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiMappingsMessages.ColumnComposite_unique, buildUniqueHolder(), @@ -696,7 +702,7 @@ public class ColumnComposite extends AbstractFormPane<Column> { ); // Nullable tri-state check box - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiMappingsMessages.ColumnComposite_nullable, buildNullableHolder(), @@ -705,49 +711,49 @@ public class ColumnComposite extends AbstractFormPane<Column> { ); // Length widgets - Spinner lengthSpinner = buildLabeledSpinner( + Spinner lengthSpinner = addLabeledSpinner( container, JptUiMappingsMessages.ColumnComposite_length, buildLengthHolder(), -1, -1, Integer.MAX_VALUE, - buildDefaultLengthLabel(container), + addDefaultLengthLabel(container), JpaHelpContextIds.MAPPING_COLUMN_LENGTH ); updateGridData(container, lengthSpinner); // Precision widgets - Spinner precisionSpinner = buildLabeledSpinner( + Spinner precisionSpinner = addLabeledSpinner( container, JptUiMappingsMessages.ColumnComposite_precision, buildPrecisionHolder(), -1, -1, Integer.MAX_VALUE, - buildDefaultPrecisionLabel(container), + addDefaultPrecisionLabel(container), JpaHelpContextIds.MAPPING_COLUMN_PRECISION ); updateGridData(container, precisionSpinner); // Scale widgets - Spinner scaleSpinner = buildLabeledSpinner( + Spinner scaleSpinner = addLabeledSpinner( container, JptUiMappingsMessages.ColumnComposite_scale, buildScaleHolder(), -1, -1, Integer.MAX_VALUE, - buildDefaultScaleLabel(container), + addDefaultScaleLabel(container), JpaHelpContextIds.MAPPING_COLUMN_SCALE ); updateGridData(container, scaleSpinner); // Column Definition widgets - buildLabeledText( + addLabeledText( container, JptUiMappingsMessages.ColumnComposite_columnDefinition, buildColumnDefinitionHolder() @@ -761,13 +767,13 @@ public class ColumnComposite extends AbstractFormPane<Column> { protected void initializeLayout(Composite container) { // Column group pane - container = buildTitledPane( + container = addTitledGroup( container, JptUiMappingsMessages.ColumnComposite_columnSection ); // Column widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.ColumnComposite_name, buildColumnCombo(container), @@ -775,21 +781,21 @@ public class ColumnComposite extends AbstractFormPane<Column> { ); // Table widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.ColumnComposite_table, - buildTableCombo(container), + addTableCombo(container), JpaHelpContextIds.MAPPING_COLUMN_TABLE ); // Details sub-pane - container = buildCollapsableSubSection( + container = addCollapsableSubSection( container, JptUiMappingsMessages.ColumnComposite_details, new SimplePropertyValueModel<Boolean>(Boolean.FALSE) ); - initializeDetailsPane(buildSubPane(container, 0, 16)); + initializeDetailsPane(addSubPane(container, 0, 16)); } /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddableComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddableComposite.java index 1669982bec..37d6b0879f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddableComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.Embeddable; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -26,7 +26,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class EmbeddableComposite extends AbstractFormPane<Embeddable> +public class EmbeddableComposite extends FormPane<Embeddable> implements JpaComposite { /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddedAttributeOverridesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddedAttributeOverridesComposite.java index 478d7e8722..dd1c851240 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddedAttributeOverridesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EmbeddedAttributeOverridesComposite.java @@ -23,7 +23,7 @@ import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.ControlEnabler; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; import org.eclipse.jpt.utility.internal.StringTools; @@ -66,7 +66,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class EmbeddedAttributeOverridesComposite extends AbstractFormPane<BaseEmbeddedMapping> +public class EmbeddedAttributeOverridesComposite extends FormPane<BaseEmbeddedMapping> { private WritablePropertyValueModel<AttributeOverride> selectedAttributeOverrideHolder; @@ -78,7 +78,7 @@ public class EmbeddedAttributeOverridesComposite extends AbstractFormPane<BaseEm * @param parentPane The parent container of this one * @param parent The parent container */ - public EmbeddedAttributeOverridesComposite(AbstractFormPane<? extends BaseEmbeddedMapping> parentPane, + public EmbeddedAttributeOverridesComposite(FormPane<? extends BaseEmbeddedMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -108,7 +108,7 @@ public class EmbeddedAttributeOverridesComposite extends AbstractFormPane<BaseEm return new AddRemoveListPane<BaseEmbeddedMapping>( this, - buildSubPane(container, 8), + addSubPane(container, 8), buildAttributeOverridesAdapter(), buildAttributeOverridesListModel(), this.selectedAttributeOverrideHolder, @@ -130,7 +130,7 @@ public class EmbeddedAttributeOverridesComposite extends AbstractFormPane<BaseEm protected void initializeLayout(Composite container) { // Attribute Overrides group box - container = buildTitledPane( + container = addTitledGroup( container, JptUiMappingsMessages.AttributeOverridesComposite_attributeOverrides ); @@ -139,30 +139,31 @@ public class EmbeddedAttributeOverridesComposite extends AbstractFormPane<BaseEm initializeAttributeOverridesList(container); // Property pane - initializePropertyPane(buildSubPane(container, 5, 0)); + initializePropertyPane(addSubPane(container, 5, 0)); } private void initializePropertyPane(Composite container) { // Override Default check box - Button overrideDefaultButton = buildCheckBox( - buildSubPane(container, 0, groupBoxMargin()), + Button overrideDefaultButton = addUnmanagedCheckBox( + addSubPane(container, 0, getGroupBoxMargin()), JptUiMappingsMessages.AttributeOverridesComposite_overrideDefault, - getOverrideVirtualAttributeOverrideHolder() + getOverrideVirtualAttributeOverrideHolder(), + null ); - removeFromEnablementControl(overrideDefaultButton); installOverrideDefaultButtonEnabler(overrideDefaultButton); // Column widgets ColumnComposite columnComposite = new ColumnComposite( this, buildColumnHolder(this.selectedAttributeOverrideHolder), - container + container, + true, + false ); installColumnCompositeEnabler(columnComposite); - removeFromEnablementControl(columnComposite.getControl()); } private void installColumnCompositeEnabler(ColumnComposite columnComposite) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityNameComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityNameComposite.java index e748e275ef..beab28e1fd 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityNameComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityNameComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.Entity; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class EntityNameComposite extends AbstractPane<Entity> +public class EntityNameComposite extends Pane<Entity> { /** * Creates a new <code>EntityNameComposite</code>. @@ -46,7 +46,7 @@ public class EntityNameComposite extends AbstractPane<Entity> * @param parentPane The parent container of this one * @param parent The parent container */ - public EntityNameComposite(AbstractPane<? extends Entity> parentPane, + public EntityNameComposite(Pane<? extends Entity> parentPane, Composite parent) { super(parentPane, parent); @@ -55,7 +55,7 @@ public class EntityNameComposite extends AbstractPane<Entity> @Override protected void initializeLayout(Composite container) { - CCombo combo = buildLabeledEditableCCombo( + CCombo combo = addLabeledEditableCCombo( container, JptUiMappingsMessages.EntityNameComposite_name, buildDefaultEntityNameListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EnumTypeComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EnumTypeComposite.java index 568a746741..794f48aad7 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EnumTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EnumTypeComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.BasicMapping; import org.eclipse.jpt.core.context.EnumType; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; @@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class EnumTypeComposite extends AbstractFormPane<BasicMapping> +public class EnumTypeComposite extends FormPane<BasicMapping> { /** * Creates a new <code>FetchTypeComposite</code>. @@ -40,13 +40,13 @@ public class EnumTypeComposite extends AbstractFormPane<BasicMapping> * @param parentPane The parent container of this one * @param parent The parent container */ - public EnumTypeComposite(AbstractFormPane<? extends BasicMapping> parentPane, + public EnumTypeComposite(FormPane<? extends BasicMapping> parentPane, Composite parent) { super(parentPane, parent); } - private EnumFormComboViewer<BasicMapping, EnumType> buildEnumTypeCombo(Composite container) { + private EnumFormComboViewer<BasicMapping, EnumType> addEnumTypeCombo(Composite container) { return new EnumFormComboViewer<BasicMapping, EnumType>(this, container) { @@ -58,13 +58,13 @@ public class EnumTypeComposite extends AbstractFormPane<BasicMapping> } @Override - protected EnumType[] choices() { + protected EnumType[] getChoices() { return EnumType.values(); } @Override - protected EnumType defaultValue() { - return subject().getDefaultEnumerated(); + protected EnumType getDefaultValue() { + return getSubject().getDefaultEnumerated(); } @Override @@ -78,12 +78,12 @@ public class EnumTypeComposite extends AbstractFormPane<BasicMapping> @Override protected EnumType getValue() { - return subject().getSpecifiedEnumerated(); + return getSubject().getSpecifiedEnumerated(); } @Override protected void setValue(EnumType value) { - subject().setSpecifiedEnumerated(value); + getSubject().setSpecifiedEnumerated(value); } }; } @@ -94,10 +94,10 @@ public class EnumTypeComposite extends AbstractFormPane<BasicMapping> @Override protected void initializeLayout(Composite container) { - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.BasicGeneralSection_enumeratedLabel, - buildEnumTypeCombo(container), + addEnumTypeCombo(container), JpaHelpContextIds.MAPPING_ENUMERATED ); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/FetchTypeComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/FetchTypeComposite.java index 1275243c8c..ff148c374a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/FetchTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/FetchTypeComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.FetchType; import org.eclipse.jpt.core.context.Fetchable; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; @@ -36,7 +36,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class FetchTypeComposite extends AbstractFormPane<Fetchable> { +public class FetchTypeComposite extends FormPane<Fetchable> { /** * Creates a new <code>FetchTypeComposite</code>. @@ -44,13 +44,13 @@ public class FetchTypeComposite extends AbstractFormPane<Fetchable> { * @param parentPane The parent container of this one * @param parent The parent container */ - public FetchTypeComposite(AbstractFormPane<? extends Fetchable> parentPane, + public FetchTypeComposite(FormPane<? extends Fetchable> parentPane, Composite parent) { super(parentPane, parent); } - private EnumFormComboViewer<Fetchable, FetchType> buildFetchTypeCombo(Composite container) { + private EnumFormComboViewer<Fetchable, FetchType> addFetchTypeCombo(Composite container) { return new EnumFormComboViewer<Fetchable, FetchType>(this, container) { @@ -62,13 +62,13 @@ public class FetchTypeComposite extends AbstractFormPane<Fetchable> { } @Override - protected FetchType[] choices() { + protected FetchType[] getChoices() { return FetchType.values(); } @Override - protected FetchType defaultValue() { - return subject().getDefaultFetch(); + protected FetchType getDefaultValue() { + return getSubject().getDefaultFetch(); } @Override @@ -82,12 +82,12 @@ public class FetchTypeComposite extends AbstractFormPane<Fetchable> { @Override protected FetchType getValue() { - return subject().getSpecifiedFetch(); + return getSubject().getSpecifiedFetch(); } @Override protected void setValue(FetchType value) { - subject().setSpecifiedFetch(value); + getSubject().setSpecifiedFetch(value); } }; } @@ -98,10 +98,10 @@ public class FetchTypeComposite extends AbstractFormPane<Fetchable> { @Override protected void initializeLayout(Composite container) { - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.BasicGeneralSection_fetchLabel, - buildFetchTypeCombo(container), + addFetchTypeCombo(container), JpaHelpContextIds.MAPPING_FETCH_TYPE ); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratedValueComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratedValueComposite.java index 12499e1bf1..0bcef12a53 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratedValueComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratedValueComposite.java @@ -19,7 +19,7 @@ import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.listeners.SWTListChangeListenerWrapper; import org.eclipse.jpt.ui.internal.listeners.SWTPropertyChangeListenerWrapper; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.StringTools; @@ -57,7 +57,7 @@ import org.eclipse.swt.widgets.Composite; * @since 1.0 */ @SuppressWarnings("nls") -public class GeneratedValueComposite extends AbstractFormPane<IdMapping> +public class GeneratedValueComposite extends FormPane<IdMapping> { private PropertyChangeListener generatedValuePropertyChangeListener; private CCombo generatorNameCombo; @@ -70,7 +70,7 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> * @param parentPane The parent container of this one * @param parent The parent container */ - public GeneratedValueComposite(AbstractFormPane<? extends IdMapping> parentPane, + public GeneratedValueComposite(FormPane<? extends IdMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -110,7 +110,7 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> } String generatorName = ((CCombo) e.getSource()).getText(); - GeneratedValue generatedValue = subject().getGeneratedValue(); + GeneratedValue generatedValue = getSubject().getGeneratedValue(); if (StringTools.stringIsEmpty(generatorName)) { @@ -180,12 +180,12 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> return new PropertyAspectAdapter<IdMapping, GeneratedValue>(getSubjectHolder(), IdMapping.GENERATED_VALUE_PROPERTY) { @Override protected GeneratedValue buildValue_() { - return subject().getGeneratedValue(); + return getSubject().getGeneratedValue(); } }; } - private EnumFormComboViewer<GeneratedValue, GenerationType> buildStrategyComboViewer(Composite parent) { + private EnumFormComboViewer<GeneratedValue, GenerationType> addStrategyComboViewer(Composite parent) { return new EnumFormComboViewer<GeneratedValue, GenerationType>(this, buildGeneratorValueHolder(), parent) { @@ -197,13 +197,13 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> } @Override - protected GenerationType[] choices() { + protected GenerationType[] getChoices() { return GenerationType.values(); } @Override - protected GenerationType defaultValue() { - return subject().getDefaultStrategy(); + protected GenerationType getDefaultValue() { + return getSubject().getDefaultStrategy(); } @Override @@ -217,7 +217,7 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> @Override protected GenerationType getValue() { - return subject().getSpecifiedStrategy(); + return getSubject().getSpecifiedStrategy(); } @Override @@ -329,15 +329,15 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> protected void initializeLayout(Composite container) { // Strategy widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.GeneratedValueComposite_strategy, - buildStrategyComboViewer(container), + addStrategyComboViewer(container), JpaHelpContextIds.MAPPING_GENERATED_VALUE_STRATEGY ); // Generator Name widgets - generatorNameCombo = buildLabeledEditableCCombo( + generatorNameCombo = addLabeledEditableCCombo( container, JptUiMappingsMessages.GeneratedValueComposite_generatorName, buildGeneratorNameModifyListener(), @@ -348,7 +348,7 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> } private void populateGeneratorChoices() { - if (subject() == null) { + if (getSubject() == null) { this.generatorNameCombo.setItems(new String[0]); } else { @@ -357,11 +357,11 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> } private void populateGeneratorName() { - if (subject() == null) { + if (getSubject() == null) { this.generatorNameCombo.setText(""); } else { - GeneratedValue generatedValue = subject().getGeneratedValue(); + GeneratedValue generatedValue = getSubject().getGeneratedValue(); if (generatedValue == null) { this.generatorNameCombo.setText(""); @@ -385,13 +385,13 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> } private GeneratedValue retrieveGeneratedValue() { - GeneratedValue generatedValue = subject().getGeneratedValue(); + GeneratedValue generatedValue = getSubject().getGeneratedValue(); if (generatedValue == null) { setPopulating(true); try { - generatedValue = subject().addGeneratedValue(); + generatedValue = getSubject().addGeneratedValue(); } finally { setPopulating(false); @@ -405,7 +405,7 @@ public class GeneratedValueComposite extends AbstractFormPane<IdMapping> return CollectionTools.array( CollectionTools.sortedSet( new TransformationIterator<Generator, String>( - new FilteringIterator<Generator, Generator>(subject().getPersistenceUnit().allGenerators()) + new FilteringIterator<Generator, Generator>(getSubject().getPersistenceUnit().allGenerators()) { @Override protected boolean accept(Generator o) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GenerationComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GenerationComposite.java index b1bc1ab258..99ff4b843b 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GenerationComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GenerationComposite.java @@ -16,7 +16,7 @@ import org.eclipse.jpt.core.context.SequenceGenerator; import org.eclipse.jpt.core.context.TableGenerator; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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.SimplePropertyValueModel; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -65,7 +65,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class GenerationComposite extends AbstractFormPane<IdMapping> +public class GenerationComposite extends FormPane<IdMapping> { private WritablePropertyValueModel<Boolean> sequenceGeneratorExpansionStateHolder; private WritablePropertyValueModel<Boolean> tableGeneratorExpansionStateHolder; @@ -76,7 +76,7 @@ public class GenerationComposite extends AbstractFormPane<IdMapping> * @param parentPane The parent container of this one * @param parent The parent container */ - public GenerationComposite(AbstractFormPane<? extends IdMapping> parentPane, + public GenerationComposite(FormPane<? extends IdMapping> parentPane, Composite parent) { super(parentPane, parent, false); @@ -166,8 +166,8 @@ public class GenerationComposite extends AbstractFormPane<IdMapping> { super.doPopulate(); - sequenceGeneratorExpansionStateHolder.setValue(subject() != null && subject().getSequenceGenerator() != null); - tableGeneratorExpansionStateHolder .setValue(subject() != null && subject().getTableGenerator() != null); + sequenceGeneratorExpansionStateHolder.setValue(getSubject() != null && getSubject().getSequenceGenerator() != null); + tableGeneratorExpansionStateHolder .setValue(getSubject() != null && getSubject().getTableGenerator() != null); } /* @@ -188,14 +188,14 @@ public class GenerationComposite extends AbstractFormPane<IdMapping> protected void initializeLayout(Composite container) { // Primary Key Generation section - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.IdMappingComposite_primaryKeyGeneration, new SimplePropertyValueModel<Boolean>(Boolean.TRUE) ); // Primary Key Generation check box - Button primaryKeyGenerationCheckBox = buildCheckBox( + Button primaryKeyGenerationCheckBox = addCheckBox( container, JptUiMappingsMessages.IdMappingComposite_primaryKeyGeneration, buildPrimaryKeyGenerationHolder(), @@ -216,23 +216,23 @@ public class GenerationComposite extends AbstractFormPane<IdMapping> generatedValueComposite.getControl().setLayoutData(gridData); // Table Generator pane - initializeTableGeneratorPane(buildSubPane(container, 10)); + initializeTableGeneratorPane(addSubPane(container, 10)); // Sequence Generator pane - initializeSequenceGeneratorPane(buildSubPane(container, 10)); + initializeSequenceGeneratorPane(addSubPane(container, 10)); } private void initializeSequenceGeneratorPane(Composite container) { // Sequence Generator sub-section - container = buildCollapsableSubSection( + container = addCollapsableSubSection( container, JptUiMappingsMessages.IdMappingComposite_sequenceGenerator, sequenceGeneratorExpansionStateHolder ); // Sequence Generator check box - Button sequenceGeneratorCheckBox = buildCheckBox( + Button sequenceGeneratorCheckBox = addCheckBox( container, JptUiMappingsMessages.IdMappingComposite_sequenceGenerator, buildSequenceGeneratorBooleanHolder(), @@ -242,20 +242,20 @@ public class GenerationComposite extends AbstractFormPane<IdMapping> // Sequence Generator pane new SequenceGeneratorComposite( this, - buildSubPane(container, 0, sequenceGeneratorCheckBox.getBorderWidth() + 16) + addSubPane(container, 0, sequenceGeneratorCheckBox.getBorderWidth() + 16) ); } private void initializeTableGeneratorPane(Composite container) { // Table Generator sub-section - container = buildCollapsableSubSection( + container = addCollapsableSubSection( container, JptUiMappingsMessages.IdMappingComposite_tableGenerator, tableGeneratorExpansionStateHolder ); - Button tableGeneratorCheckBox = buildCheckBox( + Button tableGeneratorCheckBox = addCheckBox( container, JptUiMappingsMessages.IdMappingComposite_tableGenerator, buildTableGeneratorBooleanHolder(), @@ -264,7 +264,7 @@ public class GenerationComposite extends AbstractFormPane<IdMapping> new TableGeneratorComposite( this, - buildSubPane(container, 0, tableGeneratorCheckBox.getBorderWidth() + 16) + addSubPane(container, 0, tableGeneratorCheckBox.getBorderWidth() + 16) ); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorComposite.java index 6f70046bbe..c19ca63c3d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorComposite.java @@ -15,7 +15,7 @@ import org.eclipse.jpt.core.context.GeneratorHolder; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.LabeledControlUpdater; import org.eclipse.jpt.ui.internal.util.LabeledLabel; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -39,7 +39,7 @@ import org.eclipse.swt.widgets.Spinner; * @since 1.0 */ @SuppressWarnings("nls") -public abstract class GeneratorComposite<T extends Generator> extends AbstractPane<GeneratorHolder> +public abstract class GeneratorComposite<T extends Generator> extends Pane<GeneratorHolder> { /** * Creates a new <code>GeneratorComposite</code>. @@ -47,7 +47,7 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa * @param parentPane The parent container of this one * @param parent The parent container */ - public GeneratorComposite(AbstractPane<? extends GeneratorHolder> parentPane, + public GeneratorComposite(Pane<? extends GeneratorHolder> parentPane, Composite parent) { super(parentPane, parent); @@ -73,7 +73,7 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa if (value == -1) { return; } - retrieveGenerator(subject()).setSpecifiedAllocationSize(value); + retrieveGenerator(getSubject()).setSpecifiedAllocationSize(value); } @Override @@ -107,9 +107,9 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa }; } - private Control buildDefaultAllocationSizeLabel(Composite container) { + private Control addDefaultAllocationSizeLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, JptUiMappingsMessages.DefaultWithoutValue ); @@ -159,9 +159,9 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa }; } - private Control buildDefaultInitialValueLabel(Composite container) { + private Control addDefaultInitialValueLabel(Composite container) { - Label label = buildLabel( + Label label = addLabel( container, JptUiMappingsMessages.DefaultWithoutValue ); @@ -199,10 +199,10 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa protected abstract T buildGenerator(GeneratorHolder subject); private PropertyValueModel<Generator> buildGeneratorHolder() { - return new PropertyAspectAdapter<GeneratorHolder, Generator>(getSubjectHolder(), propertyName()) { + return new PropertyAspectAdapter<GeneratorHolder, Generator>(getSubjectHolder(), getPropertyName()) { @Override protected Generator buildValue_() { - return GeneratorComposite.this.generator(subject); + return GeneratorComposite.this.getGenerator(subject); } }; } @@ -223,7 +223,7 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa if (value.length() == 0) { return; } - retrieveGenerator(subject()).setName(value); + retrieveGenerator(getSubject()).setName(value); } @Override @@ -258,7 +258,7 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa if (value == -1) { return; } - retrieveGenerator(subject()).setSpecifiedInitialValue(value); + retrieveGenerator(getSubject()).setSpecifiedInitialValue(value); } @Override @@ -277,8 +277,8 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa * @return The <code>Generator</code> or <code>null</code> if it doesn't * exists */ - protected final T generator() { - return (this.subject() == null) ? null : this.generator(this.subject()); + protected final T getGenerator() { + return (this.getSubject() == null) ? null : this.getGenerator(this.getSubject()); } /** @@ -288,7 +288,7 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa * @return The <code>Generator</code> or <code>null</code> if it doesn't * exists */ - protected abstract T generator(GeneratorHolder subject); + protected abstract T getGenerator(GeneratorHolder subject); /** * Creates the labeled spinner responsible to edit the allocation size. The @@ -299,14 +299,15 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa */ protected void initializeAllocationSizeWidgets(Composite container) { - Spinner spinner = buildLabeledSpinner( + Spinner spinner = addLabeledSpinner( container, JptUiMappingsMessages.GeneratorComposite_allocationSize, buildAllocationSizeHolder(), -1, -1, Integer.MAX_VALUE, - buildDefaultAllocationSizeLabel(container) + addDefaultAllocationSizeLabel(container), + null ); updateGridData(container, spinner); @@ -321,14 +322,15 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa */ protected void initializeInitialValueWidgets(Composite container) { - Spinner spinner = buildLabeledSpinner( + Spinner spinner = addLabeledSpinner( container, JptUiMappingsMessages.GeneratorComposite_initialValue, buildInitialValueHolder(), -1, -1, Integer.MAX_VALUE, - buildDefaultInitialValueLabel(container) + addDefaultInitialValueLabel(container), + null ); @@ -340,8 +342,8 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa * * @return The JPA project or <code>null</code> if the subject is <code>null</code> */ - protected final JpaProject jpaProject() { - return this.subject() == null ? null : this.subject().getJpaProject(); + protected final JpaProject getJpaProject() { + return this.getSubject() == null ? null : this.getSubject().getJpaProject(); } /** @@ -350,7 +352,7 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa * * @return The property name associated with the generator */ - protected abstract String propertyName(); + protected abstract String getPropertyName(); /** * Retrieves the <code>Generator</code> and if it is <code>null</code>, then @@ -360,7 +362,7 @@ public abstract class GeneratorComposite<T extends Generator> extends AbstractPa * @return The <code>Generator</code> which should never be <code>null</code> */ protected final T retrieveGenerator(GeneratorHolder subject) { - T generator = this.generator(subject); + T generator = this.getGenerator(subject); if (generator == null) { generator = this.buildGenerator(subject); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorsComposite.java index 6f7bdb5c81..d141132187 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/GeneratorsComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.GeneratorHolder; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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.model.value.WritablePropertyValueModel; @@ -50,7 +50,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class GeneratorsComposite extends AbstractPane<GeneratorHolder> +public class GeneratorsComposite extends Pane<GeneratorHolder> { private WritablePropertyValueModel<Boolean> sequenceGeneratorExpansionStateHolder; private WritablePropertyValueModel<Boolean> tableGeneratorExpansionStateHolder; @@ -61,7 +61,7 @@ public class GeneratorsComposite extends AbstractPane<GeneratorHolder> * @param parentPane The parent container of this one * @param parent The parent container */ - public GeneratorsComposite(AbstractPane<? extends GeneratorHolder> parentPane, + public GeneratorsComposite(Pane<? extends GeneratorHolder> parentPane, Composite parent) { super(parentPane, parent, false); @@ -114,8 +114,8 @@ public class GeneratorsComposite extends AbstractPane<GeneratorHolder> protected void doPopulate() { super.doPopulate(); - sequenceGeneratorExpansionStateHolder.setValue(subject() != null && subject().getSequenceGenerator() != null); - tableGeneratorExpansionStateHolder .setValue(subject() != null && subject().getTableGenerator() != null); + sequenceGeneratorExpansionStateHolder.setValue(getSubject() != null && getSubject().getSequenceGenerator() != null); + tableGeneratorExpansionStateHolder .setValue(getSubject() != null && getSubject().getTableGenerator() != null); } /* @@ -142,15 +142,15 @@ public class GeneratorsComposite extends AbstractPane<GeneratorHolder> private void initializeSequenceGeneratorPane(Composite container) { // Sequence Generator sub-section - container = buildCollapsableSubSection( - buildSubPane(container, 10), + container = addCollapsableSubSection( + addSubPane(container, 10), JptUiMappingsMessages.IdMappingComposite_sequenceGenerator, sequenceGeneratorExpansionStateHolder ); // Sequence Generator check box - Button sequenceGeneratorCheckBox = buildCheckBox( - buildSubPane(container, 5), + Button sequenceGeneratorCheckBox = addCheckBox( + addSubPane(container, 5), JptUiMappingsMessages.IdMappingComposite_sequenceGenerator, buildSequenceGeneratorBooleanHolder(), JpaHelpContextIds.MAPPING_SEQUENCE_GENERATOR @@ -159,21 +159,21 @@ public class GeneratorsComposite extends AbstractPane<GeneratorHolder> // Sequence Generator pane new SequenceGeneratorComposite( this, - buildSubPane(container, 0, sequenceGeneratorCheckBox.getBorderWidth() + 16) + addSubPane(container, 0, sequenceGeneratorCheckBox.getBorderWidth() + 16) ); } private void initializeTableGeneratorPane(Composite container) { // Table Generator sub-section - container = buildCollapsableSubSection( + container = addCollapsableSubSection( container, JptUiMappingsMessages.IdMappingComposite_tableGenerator, tableGeneratorExpansionStateHolder ); - Button tableGeneratorCheckBox = buildCheckBox( - buildSubPane(container, 5), + Button tableGeneratorCheckBox = addCheckBox( + addSubPane(container, 5), JptUiMappingsMessages.IdMappingComposite_tableGenerator, buildTableGeneratorBooleanHolder(), JpaHelpContextIds.MAPPING_TABLE_GENERATOR @@ -181,7 +181,7 @@ public class GeneratorsComposite extends AbstractPane<GeneratorHolder> new TableGeneratorComposite( this, - buildSubPane(container, 0, tableGeneratorCheckBox.getBorderWidth() + 16) + addSubPane(container, 0, tableGeneratorCheckBox.getBorderWidth() + 16) ); } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdClassComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdClassComposite.java index 9572525351..d38658fe7a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdClassComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdClassComposite.java @@ -18,7 +18,7 @@ import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jpt.core.context.IdClass; import org.eclipse.jpt.ui.JptUiPlugin; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -41,7 +41,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class IdClassComposite extends AbstractPane<IdClass> +public class IdClassComposite extends Pane<IdClass> { /** * Creates a new <code>IdClassComposite</code>. @@ -49,13 +49,13 @@ public class IdClassComposite extends AbstractPane<IdClass> * @param parentPane The parent pane of this one * @param parent The parent container */ - public IdClassComposite(AbstractPane<? extends IdClass> parentPane, + public IdClassComposite(Pane<? extends IdClass> parentPane, Composite parent) { super(parentPane, parent); } - private ClassChooserPane<IdClass> initializeClassChooser(Composite container) { + private ClassChooserPane<IdClass> addClassChooser(Composite container) { return new ClassChooserPane<IdClass>(this, container) { @@ -80,18 +80,18 @@ public class IdClassComposite extends AbstractPane<IdClass> } @Override - protected String className() { - return subject().getIdClass(); + protected String getClassName() { + return getSubject().getIdClass(); } @Override - protected String labelText() { + protected String getLabelText() { return JptUiMappingsMessages.IdClassComposite_label; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -110,7 +110,7 @@ public class IdClassComposite extends AbstractPane<IdClass> if (type != null) { String className = type.getFullyQualifiedName('.'); - subject().setIdClass(className); + getSubject().setIdClass(className); } } }; @@ -121,6 +121,6 @@ public class IdClassComposite extends AbstractPane<IdClass> */ @Override protected void initializeLayout(Composite container) { - initializeClassChooser(container); + addClassChooser(container); } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdMappingComposite.java index 4cdddbd073..dc3ec6a641 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/IdMappingComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.Column; import org.eclipse.jpt.core.context.IdMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -48,7 +48,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class IdMappingComposite extends AbstractFormPane<IdMapping> +public class IdMappingComposite extends FormPane<IdMapping> implements JpaComposite { /** @@ -74,8 +74,8 @@ public class IdMappingComposite extends AbstractFormPane<IdMapping> }; } - private Composite buildPane(Composite container, int groupBoxMargin) { - return buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); + private Composite addPane(Composite container, int groupBoxMargin) { + return addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); } /* @@ -84,15 +84,15 @@ public class IdMappingComposite extends AbstractFormPane<IdMapping> @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); // Column widgets new ColumnComposite(this, buildColumnHolder(), container); // Temporal Type widgets - new TemporalTypeComposite(this, buildPane(container, groupBoxMargin)); + new TemporalTypeComposite(this, addPane(container, groupBoxMargin)); // Generation pane - new GenerationComposite(this, buildSubPane(container, 10)); + new GenerationComposite(this, addSubPane(container, 10)); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableDialog.java index f5bb927f0e..0697f0a77b 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableDialog.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.JoinColumn; import org.eclipse.jpt.core.context.JoinTable; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; @@ -45,9 +45,9 @@ public class InverseJoinColumnInJoinTableDialog extends BaseJoinColumnDialog<Inv * non-Javadoc) */ @Override - protected AbstractDialogPane<InverseJoinColumnInJoinTableStateObject> buildLayout(Composite container) { + protected DialogPane<InverseJoinColumnInJoinTableStateObject> buildLayout(Composite container) { return new JoinColumnDialogPane<InverseJoinColumnInJoinTableStateObject>( - subjectHolder(), + getSubjectHolder(), container ) diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java index 0fe221a43d..e0ddf5cea0 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java @@ -61,7 +61,7 @@ public class InverseJoinColumnInJoinTableStateObject extends JoinColumnStateObje @Override public Table getReferencedNameTable() { - Entity targetEntity = relationshipMapping().getResolvedTargetEntity(); + Entity targetEntity = getRelationshipMapping().getResolvedTargetEntity(); if (targetEntity == null) { return null; @@ -71,12 +71,12 @@ public class InverseJoinColumnInJoinTableStateObject extends JoinColumnStateObje } @Override - protected Schema getSchema() { + protected Schema getDbSchema() { return null; } @Override - protected String initialTable() { + protected String getInitialTable() { return getOwner().getName(); } @@ -90,12 +90,12 @@ public class InverseJoinColumnInJoinTableStateObject extends JoinColumnStateObje * * @return The owner of the join column to create or to edit */ - public RelationshipMapping relationshipMapping() { + public RelationshipMapping getRelationshipMapping() { return getOwner().getParent(); } @Override public ListIterator<String> tables() { - return new SingleElementListIterator<String>(initialTable()); + return new SingleElementListIterator<String>(getInitialTable()); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JavaPersistentTypeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JavaPersistentTypeMapAsComposite.java index de27d3438e..49c0010c56 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JavaPersistentTypeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JavaPersistentTypeMapAsComposite.java @@ -18,7 +18,7 @@ import org.eclipse.jpt.ui.details.TypeMappingUiProvider; import org.eclipse.jpt.ui.internal.JpaMappingImageHelper; import org.eclipse.jpt.ui.internal.JptUiMessages; import org.eclipse.jpt.ui.internal.java.details.NullTypeMappingUiProvider; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; @@ -41,7 +41,7 @@ public class JavaPersistentTypeMapAsComposite extends PersistentTypeMapAsComposi * @param parentPane The parent pane of this one * @param parent The parent container */ - public JavaPersistentTypeMapAsComposite(AbstractPane<? extends JavaPersistentType> parentPane, + public JavaPersistentTypeMapAsComposite(Pane<? extends JavaPersistentType> parentPane, Composite parent) { super(parentPane, parent); @@ -75,7 +75,7 @@ public class JavaPersistentTypeMapAsComposite extends PersistentTypeMapAsComposi protected Iterator<TypeMappingUiProvider<? extends TypeMapping>> typeMappingUiProviders() { Collection<TypeMappingUiProvider<? extends TypeMapping>> providers = - CollectionTools.collection(jpaPlatformUi().javaTypeMappingUiProviders()); + CollectionTools.collection(getJpaPlatformUi().javaTypeMappingUiProviders()); providers.remove(NullTypeMappingUiProvider.instance()); return providers.iterator(); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnComposite.java index 0eb9d0f334..92d0f23548 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnComposite.java @@ -21,7 +21,7 @@ import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; 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.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane; import org.eclipse.jpt.ui.internal.widgets.PostExecution; @@ -66,7 +66,7 @@ import org.eclipse.swt.widgets.Group; * @version 2.0 * @since 2.0 */ -public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapping> +public class JoinColumnComposite extends FormPane<SingleRelationshipMapping> { private WritablePropertyValueModel<JoinColumn> joinColumnHolder; private WritablePropertyValueModel<Boolean> joinColumnPaneEnablerHolder; @@ -77,7 +77,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp * @param parentPane The parent container of this one * @param parent The parent container */ - public JoinColumnComposite(AbstractFormPane<? extends SingleRelationshipMapping> parentPane, + public JoinColumnComposite(FormPane<? extends SingleRelationshipMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -100,14 +100,14 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp private void addJoinColumn() { JoinColumnInRelationshipMappingDialog dialog = - new JoinColumnInRelationshipMappingDialog(shell(), subject(), null); + new JoinColumnInRelationshipMappingDialog(getShell(), getSubject(), null); dialog.openDialog(buildAddJoinColumnPostExecution()); } private void addJoinColumn(JoinColumnInRelationshipMappingStateObject stateObject) { - SingleRelationshipMapping subject = subject(); + SingleRelationshipMapping subject = getSubject(); int index = subject.specifiedJoinColumnsSize(); JoinColumn joinColumn = subject.addSpecifiedJoinColumn(index); @@ -118,7 +118,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp return new PostExecution<JoinColumnInRelationshipMappingDialog>() { public void execute(JoinColumnInRelationshipMappingDialog dialog) { if (dialog.wasConfirmed()) { - addJoinColumn(dialog.subject()); + addJoinColumn(dialog.getSubject()); } } }; @@ -141,7 +141,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp return new PostExecution<JoinColumnInRelationshipMappingDialog>() { public void execute(JoinColumnInRelationshipMappingDialog dialog) { if (dialog.wasConfirmed()) { - updateJoinColumn(dialog.subject()); + updateJoinColumn(dialog.getSubject()); } } }; @@ -191,7 +191,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp } private SimplePropertyValueModel<Boolean> buildJoinColumnPaneEnablerHolder() { - return new SimplePropertyValueModel<Boolean>(Boolean.FALSE); + return new SimplePropertyValueModel<Boolean>(null); } private Adapter buildJoinColumnsAdapter() { @@ -264,10 +264,6 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp } }; } - - /* - * (non-Javadoc) - */ @Override protected void doPopulate() { super.doPopulate(); @@ -279,7 +275,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp JoinColumn joinColumn = (JoinColumn) listSelectionModel.selectedValue(); JoinColumnInRelationshipMappingDialog dialog = - new JoinColumnInRelationshipMappingDialog(shell(), subject(), joinColumn); + new JoinColumnInRelationshipMappingDialog(getShell(), getSubject(), joinColumn); dialog.openDialog(buildEditJoinColumnPostExecution()); } @@ -311,16 +307,17 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp protected void initializeLayout(Composite container) { // Join Columns group - Group groupPane = buildTitledPane( + Group groupPane = addTitledGroup( container, JptUiMappingsMessages.JoinColumnComposite_joinColumn ); // Override Default Join Columns check box - buildCheckBox( - buildSubPane(groupPane, 8), + addCheckBox( + addSubPane(groupPane, 8), JptUiMappingsMessages.JoinColumnComposite_overrideDefaultJoinColumns, - buildOverrideDefaultJoinColumnHolder() + buildOverrideDefaultJoinColumnHolder(), + null ); // Join Columns list pane @@ -332,11 +329,11 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp buildJoinColumnsListModel(), joinColumnHolder, buildJoinColumnsListLabelProvider(), - JpaHelpContextIds.MAPPING_JOIN_TABLE_COLUMNS + JpaHelpContextIds.MAPPING_JOIN_TABLE_COLUMNS, + false ); installJoinColumnsListPaneEnabler(joinColumnsListPane); - removeFromEnablementControl(joinColumnsListPane.getControl()); } private void installJoinColumnsListPaneEnabler(AddRemoveListPane<SingleRelationshipMapping> pane) { @@ -348,7 +345,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp int[] selectedIndices = listSelectionModel.selectedIndices(); for (int index = selectedIndices.length; --index >= 0; ) { - subject().removeSpecifiedJoinColumn(selectedIndices[index]); + getSubject().removeSpecifiedJoinColumn(selectedIndices[index]); } } @@ -358,7 +355,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp private void updateJoinColumnPaneEnablement(boolean enabled) { - SingleRelationshipMapping subject = subject(); + SingleRelationshipMapping subject = getSubject(); enabled &= (subject != null) && subject.containsSpecifiedJoinColumns(); joinColumnPaneEnablerHolder.setValue(enabled); } @@ -372,7 +369,7 @@ public class JoinColumnComposite extends AbstractFormPane<SingleRelationshipMapp setPopulating(true); try { - SingleRelationshipMapping subject = subject(); + SingleRelationshipMapping subject = getSubject(); // Add a join column by creating a specified one using the default // one if it exists diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialog.java index 419b1abdc6..e4fe61ef1a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialog.java @@ -10,7 +10,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.JoinColumn; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; @@ -42,8 +42,8 @@ public abstract class JoinColumnDialog<T extends JoinColumnStateObject> extends * (non-Javadoc) */ @Override - protected AbstractDialogPane<?> buildLayout(Composite container) { - return new JoinColumnDialogPane<T>(subjectHolder(), container); + protected DialogPane<?> buildLayout(Composite container) { + return new JoinColumnDialogPane<T>(getSubjectHolder(), container); } /* diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialogPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialogPane.java index af5589fe7c..7f318373d7 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialogPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnDialogPane.java @@ -91,9 +91,9 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultInsertable(); + Boolean defaultValue = getSubject().getDefaultInsertable(); if (defaultValue != null) { @@ -148,9 +148,9 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultNullable(); + Boolean defaultValue = getSubject().getDefaultNullable(); if (defaultValue != null) { @@ -205,9 +205,9 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultUnique(); + Boolean defaultValue = getSubject().getDefaultUnique(); if (defaultValue != null) { @@ -259,9 +259,9 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultUpdatable(); + Boolean defaultValue = getSubject().getDefaultUpdatable(); if (defaultValue != null) { @@ -289,8 +289,8 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ super.initializeLayout(container); // Insertable tri-state check box - buildTriStateCheckBoxWithDefault( - buildSubPane(container, 4), + addTriStateCheckBoxWithDefault( + addSubPane(container, 4), JptUiMappingsMessages.JoinColumnDialogPane_insertable, buildInsertableHolder(), buildInsertableStringHolder(), @@ -298,7 +298,7 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ ); // Updatable tri-state check box - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiMappingsMessages.JoinColumnDialogPane_updatable, buildUpdatableHolder(), @@ -307,7 +307,7 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ ); // Unique tri-state check box - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiMappingsMessages.ColumnComposite_unique, buildUniqueHolder(), @@ -316,7 +316,7 @@ public class JoinColumnDialogPane<T extends JoinColumnStateObject> extends BaseJ ); // Nullable tri-state check box - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiMappingsMessages.ColumnComposite_nullable, buildNullableHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java index 82e86c2bed..8989de1fab 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java @@ -45,7 +45,7 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO return getJoinColumn().getDefaultTable(); } - return typeMapping().getTableName(); + return getTypeMapping().getTableName(); } /* @@ -53,7 +53,7 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO */ @Override public Table getNameTable() { - return typeMapping().getPrimaryDbTable(); + return getTypeMapping().getPrimaryDbTable(); } /* @@ -90,8 +90,8 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO * (non-Javadoc) */ @Override - public Schema getSchema() { - return typeMapping().getDbSchema(); + public Schema getDbSchema() { + return getTypeMapping().getDbSchema(); } /** @@ -99,7 +99,7 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO * * @return The owner of the join column to create or to edit */ - public TypeMapping typeMapping() { + public TypeMapping getTypeMapping() { return getOwner().getOwner().getTypeMapping(); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableDialog.java index d514c6ecc5..d12185d617 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableDialog.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.JoinColumn; import org.eclipse.jpt.core.context.JoinTable; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; @@ -48,9 +48,9 @@ public class JoinColumnInJoinTableDialog extends BaseJoinColumnDialog<JoinColumn * non-Javadoc) */ @Override - protected AbstractDialogPane<JoinColumnInJoinTableStateObject> buildLayout(Composite container) { + protected DialogPane<JoinColumnInJoinTableStateObject> buildLayout(Composite container) { return new JoinColumnDialogPane<JoinColumnInJoinTableStateObject>( - subjectHolder(), + getSubjectHolder(), container ) { @Override diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java index bcf5eda735..5e4b566e45 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java @@ -60,16 +60,16 @@ public class JoinColumnInJoinTableStateObject extends JoinColumnStateObject @Override public Table getReferencedNameTable() { - return relationshipMapping().getTypeMapping().getPrimaryDbTable(); + return getRelationshipMapping().getTypeMapping().getPrimaryDbTable(); } @Override - protected Schema getSchema() { + protected Schema getDbSchema() { return null; } @Override - protected String initialTable() { + protected String getInitialTable() { return getOwner().getName(); } @@ -83,12 +83,12 @@ public class JoinColumnInJoinTableStateObject extends JoinColumnStateObject * * @return The parent of the join table */ - public RelationshipMapping relationshipMapping() { + public RelationshipMapping getRelationshipMapping() { return getOwner().getParent(); } @Override public ListIterator<String> tables() { - return new SingleElementListIterator<String>(initialTable()); + return new SingleElementListIterator<String>(getInitialTable()); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java index b29ee8bbdd..0768068c00 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java @@ -60,7 +60,7 @@ public class JoinColumnInRelationshipMappingStateObject extends JoinColumnStateO */ @Override public Table getNameTable() { - Schema schema = getSchema(); + Schema schema = getDbSchema(); if (schema == null) { return null; @@ -101,7 +101,7 @@ public class JoinColumnInRelationshipMappingStateObject extends JoinColumnStateO * (non-Javadoc) */ @Override - public Schema getSchema() { + public Schema getDbSchema() { return getOwner().getTypeMapping().getDbSchema(); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnStateObject.java index 137f350259..48013abeac 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnStateObject.java @@ -107,7 +107,7 @@ public abstract class JoinColumnStateObject extends BaseJoinColumnStateObject return nullable; } - protected abstract Schema getSchema(); + protected abstract Schema getDbSchema(); public Boolean getUnique() { return unique; @@ -133,7 +133,7 @@ public abstract class JoinColumnStateObject extends BaseJoinColumnStateObject } @Override - protected String initialTable() { + protected String getInitialTable() { JoinColumn joinColumn = getJoinColumn(); if (joinColumn == null) { @@ -176,7 +176,7 @@ public abstract class JoinColumnStateObject extends BaseJoinColumnStateObject */ @Override public ListIterator<String> tables() { - Schema schema = getSchema(); + Schema schema = getDbSchema(); if (schema == null) { return EmptyListIterator.instance(); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java index 5d0d973d66..ab8a67fbc5 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnsComposite.java @@ -20,7 +20,7 @@ import org.eclipse.jpt.core.context.NamedColumn; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.AbstractAdapter; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; @@ -54,7 +54,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class JoinColumnsComposite<T extends JpaNode> extends AbstractFormPane<T> +public class JoinColumnsComposite<T extends JpaNode> extends FormPane<T> { /** * The editor used to perform the common behaviors defined in the list pane. @@ -70,7 +70,7 @@ public class JoinColumnsComposite<T extends JpaNode> extends AbstractFormPane<T> * @param joinColumnsEditor The editor used to perform the common behaviors * defined in the list pane */ - public JoinColumnsComposite(AbstractFormPane<? extends T> parentPane, + public JoinColumnsComposite(FormPane<? extends T> parentPane, Composite parent, IJoinColumnsEditor<T> joinColumnsEditor) { @@ -89,7 +89,7 @@ public class JoinColumnsComposite<T extends JpaNode> extends AbstractFormPane<T> * @param joinColumnsEditor The editor used to perform the common behaviors * defined in the list pane */ - public JoinColumnsComposite(AbstractFormPane<?> parentPane, + public JoinColumnsComposite(FormPane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, IJoinColumnsEditor<T> joinColumnsEditor, @@ -117,7 +117,7 @@ public class JoinColumnsComposite<T extends JpaNode> extends AbstractFormPane<T> initializeLayout2(); } - private WritablePropertyValueModel<JoinColumn> buildJoinColumnHolder() { + private WritablePropertyValueModel<JoinColumn> buildSelectedJoinColumnHolder() { return new SimplePropertyValueModel<JoinColumn>(); } @@ -166,7 +166,7 @@ public class JoinColumnsComposite<T extends JpaNode> extends AbstractFormPane<T> return new AbstractAdapter() { public void addNewItem(ObjectListSelectionModel listSelectionModel) { - joinColumnsEditor.addJoinColumn(subject()); + joinColumnsEditor.addJoinColumn(getSubject()); } @Override @@ -182,11 +182,11 @@ public class JoinColumnsComposite<T extends JpaNode> extends AbstractFormPane<T> @Override public void optionOnSelection(ObjectListSelectionModel listSelectionModel) { JoinColumn joinColumn = (JoinColumn) listSelectionModel.selectedValue(); - joinColumnsEditor.editJoinColumn(subject(), joinColumn); + joinColumnsEditor.editJoinColumn(getSubject(), joinColumn); } public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { - joinColumnsEditor.removeJoinColumns(subject(), listSelectionModel.selectedIndices()); + joinColumnsEditor.removeJoinColumns(getSubject(), listSelectionModel.selectedIndices()); } }; } @@ -262,15 +262,10 @@ public class JoinColumnsComposite<T extends JpaNode> extends AbstractFormPane<T> getControl(), buildJoinColumnsAdapter(), buildJoinColumnsListModel(), - buildJoinColumnHolder(), + buildSelectedJoinColumnHolder(), buildJoinColumnsListLabelProvider(), JpaHelpContextIds.MAPPING_JOIN_TABLE_COLUMNS ); - - // Remove the list pane from this pane's enablement control because its - // enablement is managed by a PaneEnabler registered with this pane - removeFromEnablementControl(listPane.getMainControl()); - removeFromEnablementControl(listPane); } /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java index 7e86c88eb0..ad0c8a40c9 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java @@ -20,7 +20,7 @@ import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.mappings.db.TableCombo; import org.eclipse.jpt.ui.internal.mappings.details.JoinColumnsComposite.IJoinColumnsEditor; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.PostExecution; import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; @@ -71,7 +71,7 @@ import org.eclipse.swt.widgets.Group; * @version 2.0 * @since 1.0 */ -public class JoinTableComposite extends AbstractFormPane<JoinTable> +public class JoinTableComposite extends FormPane<JoinTable> { private WritablePropertyValueModel<Boolean> inverseJoinColumnsPaneEnablerHolder; private WritablePropertyValueModel<Boolean> joinColumnsPaneEnablerHolder; @@ -85,7 +85,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public JoinTableComposite(AbstractFormPane<?> parentPane, + public JoinTableComposite(FormPane<?> parentPane, PropertyValueModel<? extends JoinTable> subjectHolder, Composite parent) { @@ -109,14 +109,14 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> private void addInverseJoinColumn(JoinTable joinTable) { InverseJoinColumnInJoinTableDialog dialog = - new InverseJoinColumnInJoinTableDialog(shell(), joinTable, null); + new InverseJoinColumnInJoinTableDialog(getShell(), joinTable, null); dialog.openDialog(buildAddInverseJoinColumnPostExecution()); } private void addInverseJoinColumnFromDialog(InverseJoinColumnInJoinTableStateObject stateObject) { - JoinTable subject = subject(); + JoinTable subject = getSubject(); int index = subject.specifiedInverseJoinColumnsSize(); JoinColumn joinColumn = subject.addSpecifiedInverseJoinColumn(index); @@ -126,17 +126,17 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> private void addJoinColumn(JoinTable joinTable) { JoinColumnInJoinTableDialog dialog = - new JoinColumnInJoinTableDialog(shell(), joinTable, null); + new JoinColumnInJoinTableDialog(getShell(), joinTable, null); dialog.openDialog(buildAddJoinColumnPostExecution()); } private void addJoinColumnFromDialog(JoinColumnInJoinTableStateObject stateObject) { - JoinTable subject = subject(); + JoinTable subject = getSubject(); int index = subject.specifiedJoinColumnsSize(); - JoinColumn joinColumn = subject().addSpecifiedJoinColumn(index); + JoinColumn joinColumn = getSubject().addSpecifiedJoinColumn(index); stateObject.updateJoinColumn(joinColumn); } @@ -144,7 +144,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> return new PostExecution<InverseJoinColumnInJoinTableDialog>() { public void execute(InverseJoinColumnInJoinTableDialog dialog) { if (dialog.wasConfirmed()) { - addInverseJoinColumnFromDialog(dialog.subject()); + addInverseJoinColumnFromDialog(dialog.getSubject()); } } }; @@ -154,7 +154,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> return new PostExecution<JoinColumnInJoinTableDialog>() { public void execute(JoinColumnInJoinTableDialog dialog) { if (dialog.wasConfirmed()) { - addJoinColumnFromDialog(dialog.subject()); + addJoinColumnFromDialog(dialog.getSubject()); } } }; @@ -164,7 +164,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> return new PostExecution<InverseJoinColumnInJoinTableDialog>() { public void execute(InverseJoinColumnInJoinTableDialog dialog) { if (dialog.wasConfirmed()) { - editInverseJoinColumn(dialog.subject()); + editInverseJoinColumn(dialog.getSubject()); } } }; @@ -174,7 +174,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> return new PostExecution<JoinColumnInJoinTableDialog>() { public void execute(JoinColumnInJoinTableDialog dialog) { if (dialog.wasConfirmed()) { - editJoinColumn(dialog.subject()); + editJoinColumn(dialog.getSubject()); } } }; @@ -189,7 +189,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> } private SimplePropertyValueModel<Boolean> buildJoinColumnsPaneEnablerHolder() { - return new SimplePropertyValueModel<Boolean>(Boolean.FALSE); + return new SimplePropertyValueModel<Boolean>(null); } private WritablePropertyValueModel<Boolean> buildOverrideDefaultHolder() { @@ -214,11 +214,11 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> }; } - private Composite buildPane(Composite container, int groupBoxMargin) { - return buildSubPane(container, 0, groupBoxMargin, 10, groupBoxMargin); + private Composite addPane(Composite container, int groupBoxMargin) { + return addSubPane(container, 0, groupBoxMargin, 10, groupBoxMargin); } - private TableCombo<JoinTable> buildTableCombo(Composite container) { + private TableCombo<JoinTable> addTableCombo(Composite container) { return new TableCombo<JoinTable>(this, container) { @@ -245,28 +245,28 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> } @Override - protected String defaultValue() { - return subject().getDefaultName(); + protected String getDefaultValue() { + return getSubject().getDefaultName(); } @Override - protected String schemaName() { - return subject().getSchema(); + protected String getSchemaName() { + return getSubject().getSchema(); } @Override protected void setValue(String value) { - subject().setSpecifiedName(value); + getSubject().setSpecifiedName(value); } @Override - protected org.eclipse.jpt.db.Table table() { - return subject().getDbTable(); + protected org.eclipse.jpt.db.Table getDbTable() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedName(); + protected String getValue() { + return getSubject().getSpecifiedName(); } }; } @@ -287,7 +287,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> private void editInverseJoinColumn(JoinColumn joinColumn) { InverseJoinColumnInJoinTableDialog dialog = - new InverseJoinColumnInJoinTableDialog(shell(), subject(), joinColumn); + new InverseJoinColumnInJoinTableDialog(getShell(), getSubject(), joinColumn); dialog.openDialog(buildEditInverseJoinColumnPostExecution()); } @@ -295,7 +295,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> private void editJoinColumn(JoinColumn joinColumn) { JoinColumnInJoinTableDialog dialog = - new JoinColumnInJoinTableDialog(shell(), subject(), joinColumn); + new JoinColumnInJoinTableDialog(getShell(), getSubject(), joinColumn); dialog.openDialog(buildEditJoinColumnPostExecution()); } @@ -304,58 +304,50 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> stateObject.updateJoinColumn(stateObject.getJoinColumn()); } - /* - * (non-Javadoc) - */ @Override public void enableWidgets(boolean enabled) { super.enableWidgets(enabled); updateJoinColumnPanesEnablement(enabled); } - /* - * (non-Javadoc) - */ @Override protected void initialize() { super.initialize(); - joinColumnsPaneEnablerHolder = buildJoinColumnsPaneEnablerHolder(); - inverseJoinColumnsPaneEnablerHolder = buildJoinColumnsPaneEnablerHolder(); + this.joinColumnsPaneEnablerHolder = buildJoinColumnsPaneEnablerHolder(); + this.inverseJoinColumnsPaneEnablerHolder = buildJoinColumnsPaneEnablerHolder(); } - /* - * (non-Javadoc) - */ @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); // Name widgets - TableCombo<JoinTable> tableCombo = buildTableCombo(container); + TableCombo<JoinTable> tableCombo = addTableCombo(container); - buildLabeledComposite( - buildPane(container, groupBoxMargin), + addLabeledComposite( + addPane(container, groupBoxMargin), JptUiMappingsMessages.JoinTableComposite_name, tableCombo.getControl(), JpaHelpContextIds.MAPPING_JOIN_TABLE_NAME ); // Join Columns group pane - Group joinColumnGroupPane = buildTitledPane( + Group joinColumnGroupPane = addTitledGroup( container, JptUiMappingsMessages.JoinTableComposite_joinColumn ); // Override Default Join Columns check box - overrideDefaultJoinColumnsCheckBox = buildCheckBox( - buildSubPane(joinColumnGroupPane, 8), + this.overrideDefaultJoinColumnsCheckBox = addCheckBox( + addSubPane(joinColumnGroupPane, 8), JptUiMappingsMessages.JoinTableComposite_overrideDefaultJoinColumns, - buildOverrideDefaultHolder() + buildOverrideDefaultHolder(), + null ); - overrideDefaultJoinColumnsCheckBox.addSelectionListener( + this.overrideDefaultJoinColumnsCheckBox.addSelectionListener( buildOverrideDefaultSelectionListener() ); @@ -366,22 +358,22 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> ); installJoinColumnsPaneEnabler(joinColumnsComposite); - removeFromEnablementControl(joinColumnsComposite.getControl()); // Inverse Join Columns group pane - Group inverseJoinColumnGroupPane = buildTitledPane( + Group inverseJoinColumnGroupPane = addTitledGroup( container, JptUiMappingsMessages.JoinTableComposite_inverseJoinColumn ); // Override Default Inverse Join Columns check box - overrideDefaultInverseJoinColumnsCheckBox = buildCheckBox( - buildSubPane(inverseJoinColumnGroupPane, 8), + this.overrideDefaultInverseJoinColumnsCheckBox = addCheckBox( + addSubPane(inverseJoinColumnGroupPane, 8), JptUiMappingsMessages.JoinTableComposite_overrideDefaultInverseJoinColumns, - buildOverrideDefaultHolder() + buildOverrideDefaultHolder(), + null ); - overrideDefaultInverseJoinColumnsCheckBox.addSelectionListener( + this.overrideDefaultInverseJoinColumnsCheckBox.addSelectionListener( buildOverrideDefaultInverseSelectionListener() ); @@ -392,15 +384,14 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> ); installInverseJoinColumnsPaneEnabler(inverseJoinColumnsComposite); - removeFromEnablementControl(inverseJoinColumnsComposite.getControl()); } private void installInverseJoinColumnsPaneEnabler(JoinColumnsComposite<JoinTable> pane) { - new PaneEnabler(inverseJoinColumnsPaneEnablerHolder, pane); + new PaneEnabler(this.inverseJoinColumnsPaneEnablerHolder, pane); } private void installJoinColumnsPaneEnabler(JoinColumnsComposite<JoinTable> pane) { - new PaneEnabler(joinColumnsPaneEnablerHolder, pane); + new PaneEnabler(this.joinColumnsPaneEnablerHolder, pane); } private void updateInverseJoinColumns() { @@ -409,8 +400,8 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> return; } - JoinTable joinTable = subject(); - boolean selected = overrideDefaultInverseJoinColumnsCheckBox.getSelection(); + JoinTable joinTable = getSubject(); + boolean selected = this.overrideDefaultInverseJoinColumnsCheckBox.getSelection(); setPopulating(true); try { @@ -435,7 +426,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> } } - inverseJoinColumnsPaneEnablerHolder.setValue(selected); + this.inverseJoinColumnsPaneEnablerHolder.setValue(selected); } finally { setPopulating(false); @@ -444,15 +435,15 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> private void updateJoinColumnPanesEnablement(boolean globalEnablement) { - JoinTable subject = subject(); + JoinTable subject = getSubject(); boolean enabled = globalEnablement && (subject != null) && subject.containsSpecifiedJoinColumns(); boolean inverseEnabled = globalEnablement && (subject != null) && subject.containsSpecifiedInverseJoinColumns(); - overrideDefaultJoinColumnsCheckBox .setSelection(enabled); - overrideDefaultInverseJoinColumnsCheckBox.setSelection(inverseEnabled); + this.overrideDefaultJoinColumnsCheckBox .setSelection(enabled); + this.overrideDefaultInverseJoinColumnsCheckBox.setSelection(inverseEnabled); - joinColumnsPaneEnablerHolder .setValue(enabled); - inverseJoinColumnsPaneEnablerHolder.setValue(inverseEnabled); + this.joinColumnsPaneEnablerHolder .setValue(enabled); + this.inverseJoinColumnsPaneEnablerHolder.setValue(inverseEnabled); } private void updateJoinColumns() { @@ -461,8 +452,8 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> return; } - JoinTable joinTable = subject(); - boolean selected = overrideDefaultJoinColumnsCheckBox.getSelection(); + JoinTable joinTable = getSubject(); + boolean selected = this.overrideDefaultJoinColumnsCheckBox.getSelection(); setPopulating(true); try { @@ -487,7 +478,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> } } - joinColumnsPaneEnablerHolder.setValue(selected); + this.joinColumnsPaneEnablerHolder.setValue(selected); } finally { setPopulating(false); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/LobComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/LobComposite.java index 853fecb143..5d386be24c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/LobComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/LobComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.BasicMapping; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.swt.widgets.Composite; @@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class LobComposite extends AbstractFormPane<BasicMapping> +public class LobComposite extends FormPane<BasicMapping> { /** * Creates a new <code>LobComposite</code>. @@ -32,7 +32,7 @@ public class LobComposite extends AbstractFormPane<BasicMapping> * @param parentPane The parent container of this one * @param parent The parent container */ - public LobComposite(AbstractFormPane<? extends BasicMapping> parentPane, + public LobComposite(FormPane<? extends BasicMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -60,7 +60,7 @@ public class LobComposite extends AbstractFormPane<BasicMapping> @Override protected void initializeLayout(Composite container) { - buildCheckBox( + addCheckBox( container, JptUiMappingsMessages.BasicGeneralSection_lobLabel, buildLobHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToManyMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToManyMappingComposite.java index 9efea0bceb..261e3524fb 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToManyMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToManyMappingComposite.java @@ -15,7 +15,7 @@ import org.eclipse.jpt.core.context.ManyToManyMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -63,7 +63,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class ManyToManyMappingComposite extends AbstractFormPane<ManyToManyMapping> +public class ManyToManyMappingComposite extends FormPane<ManyToManyMapping> implements JpaComposite { /** @@ -98,25 +98,25 @@ public class ManyToManyMappingComposite extends AbstractFormPane<ManyToManyMappi }; } - private Composite buildPane(Composite container, int groupBoxMargin) { - return buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); + private Composite addPane(Composite container, int groupBoxMargin) { + return addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); } private void initializeGeneralPane(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); // Target Entity widgets - new TargetEntityComposite(this, buildPane(container, groupBoxMargin)); + new TargetEntityComposite(this, addPane(container, groupBoxMargin)); // Fetch Type widgets - new FetchTypeComposite(this, buildPane(container, groupBoxMargin)); + new FetchTypeComposite(this, addPane(container, groupBoxMargin)); // Mapped By widgets - new MappedByComposite(this, buildPane(container, groupBoxMargin)); + new MappedByComposite(this, addPane(container, groupBoxMargin)); // Cascade widgets - new CascadeComposite(this, buildCascadeHolder(), buildSubPane(container, 5)); + new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 5)); // Ordering widgets new OrderingComposite(this, container); @@ -124,7 +124,7 @@ public class ManyToManyMappingComposite extends AbstractFormPane<ManyToManyMappi private void initializeJoinTablePane(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.MultiRelationshipMappingComposite_joinTable ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToOneMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToOneMappingComposite.java index a2ac21201e..82811d676f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToOneMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/ManyToOneMappingComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.Cascade; import org.eclipse.jpt.core.context.ManyToOneMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -60,7 +60,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class ManyToOneMappingComposite extends AbstractFormPane<ManyToOneMapping> +public class ManyToOneMappingComposite extends FormPane<ManyToOneMapping> implements JpaComposite { /** @@ -86,8 +86,8 @@ public class ManyToOneMappingComposite extends AbstractFormPane<ManyToOneMapping }; } - private Composite buildPane(Composite container, int groupBoxMargin) { - return buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); + private Composite addPane(Composite container, int groupBoxMargin) { + return addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); } /* @@ -96,8 +96,8 @@ public class ManyToOneMappingComposite extends AbstractFormPane<ManyToOneMapping @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); - Composite subPane = buildPane(container, groupBoxMargin); + int groupBoxMargin = getGroupBoxMargin(); + Composite subPane = addPane(container, groupBoxMargin); // Target Entity widgets new TargetEntityComposite(this, subPane); @@ -106,7 +106,7 @@ public class ManyToOneMappingComposite extends AbstractFormPane<ManyToOneMapping new FetchTypeComposite(this, subPane); // Optional check box - new OptionalComposite(this, buildSubPane(subPane, 4)); + new OptionalComposite(this, addSubPane(subPane, 4)); // Cascade widgets new CascadeComposite(this, buildCascadeHolder(), container); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MapAsComposite.java index 941b891729..37f237fdff 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MapAsComposite.java @@ -26,7 +26,7 @@ import org.eclipse.jpt.ui.details.MappingUiProvider; import org.eclipse.jpt.ui.internal.JptUiMessages; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.PostExecution; import org.eclipse.jpt.utility.internal.StringTools; import org.eclipse.jpt.utility.model.Model; @@ -63,7 +63,7 @@ import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; * @since 2.0 */ @SuppressWarnings("nls") -public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { +public abstract class MapAsComposite<T extends Model> extends Pane<T> { private boolean dragEvent; private boolean enabled; @@ -87,7 +87,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { * @param parentPane The parent pane of this one * @param parent The parent container */ - public MapAsComposite(AbstractPane<? extends T> parentPane, + public MapAsComposite(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -196,7 +196,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { */ protected String buildText(String name, String mappingType) { return NLS.bind( - mappingChangeHandler.labelText(), + mappingChangeHandler.getLabelText(), name, mappingType ); @@ -256,7 +256,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { @Override protected void initializeLayout(Composite container) { - handCursor = shell().getDisplay().getSystemCursor(SWT.CURSOR_HAND); + handCursor = getShell().getDisplay().getSystemCursor(SWT.CURSOR_HAND); styledText = new StyledText(container, SWT.WRAP | SWT.READ_ONLY); styledText.addMouseListener(buildMouseListener()); @@ -276,7 +276,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { for (Iterator<? extends MappingUiProvider<?>> iter = mappingChangeHandler.providers(); iter.hasNext(); ) { MappingUiProvider<?> provider = iter.next(); - if (mappingKey() == provider.getMappingKey()) { + if (getMappingKey() == provider.getMappingKey()) { return provider; } } @@ -303,7 +303,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { * @return A non-<code>null</code> unique identifier representing the type * of the mapping being edited */ - protected abstract String mappingKey(); + protected abstract String getMappingKey(); /** * Aks the <code>MappingChangeHandler</code> to change the mapping type using @@ -346,7 +346,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { */ protected void updateLinkRange() { - Color linkColor = JFaceColors.getHyperlinkText(shell().getDisplay()); + Color linkColor = JFaceColors.getHyperlinkText(getShell().getDisplay()); // Make the name bold StyleRange styleRange = new StyleRange( @@ -375,13 +375,13 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { */ protected void updateText() { - String name = mappingChangeHandler.name(); + String name = mappingChangeHandler.getName(); if (name == null) { name = JptUiMappingsMessages.NoNameSet; } - String mappingType = mappingChangeHandler.mappingType(); + String mappingType = mappingChangeHandler.getMappingType(); String text = buildText(name, mappingType); mappingTypeStart = text.lastIndexOf(mappingType); @@ -406,14 +406,14 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { * @return A localized text with two arguments where the first one should * be replaced by the name and the second be replaced by the mapping type */ - String labelText(); + String getLabelText(); /** * Returns the displayable text representing the mapping type. * * @return A human readable text describing the mapping type */ - String mappingType(); + String getMappingType(); /** * Morphes the current mapping into a new type by using the given provider. @@ -427,7 +427,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { * * @return The displayable name of the mapping */ - String name(); + String getName(); /** * Returns the list of providers that are registered with the JPT plugin. @@ -449,7 +449,7 @@ public abstract class MapAsComposite<T extends Model> extends AbstractPane<T> { * Creates a new <code>MappingSelectionDialog</code>. */ private MappingSelectionDialog() { - super(MapAsComposite.this.shell(), false); + super(MapAsComposite.this.getShell(), false); setMessage(JptUiMessages.MapAsComposite_labelText); setTitle(JptUiMessages.MapAsComposite_dialogTitle); setListLabelProvider(buildLabelProvider()); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedByComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedByComposite.java index 7543af4735..414aa02648 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedByComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedByComposite.java @@ -17,7 +17,7 @@ import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.StringTools; import org.eclipse.jpt.utility.model.value.PropertyValueModel; @@ -45,7 +45,7 @@ import org.eclipse.swt.widgets.Composite; * @since 1.0 */ @SuppressWarnings("nls") -public class MappedByComposite extends AbstractFormPane<NonOwningMapping> +public class MappedByComposite extends FormPane<NonOwningMapping> { private CCombo combo; @@ -55,7 +55,7 @@ public class MappedByComposite extends AbstractFormPane<NonOwningMapping> * @param parentPane The parent container of this one * @param parent The parent container */ - public MappedByComposite(AbstractFormPane<? extends NonOwningMapping> parentPane, + public MappedByComposite(FormPane<? extends NonOwningMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -116,7 +116,7 @@ public class MappedByComposite extends AbstractFormPane<NonOwningMapping> @Override protected void initializeLayout(Composite container) { - combo = buildLabeledEditableCCombo( + combo = addLabeledEditableCCombo( container, JptUiMappingsMessages.NonOwningMapping_mappedByLabel, buildComboModifyListener(), @@ -131,7 +131,7 @@ public class MappedByComposite extends AbstractFormPane<NonOwningMapping> combo.removeAll(); combo.add(JptUiMappingsMessages.NoneSelected); - NonOwningMapping subject = subject(); + NonOwningMapping subject = getSubject(); if (subject != null) { Iterator<String> iter = subject.candidateMappedByAttributeNames(); @@ -168,7 +168,7 @@ public class MappedByComposite extends AbstractFormPane<NonOwningMapping> */ private void updateSelectedItem() { - NonOwningMapping subject = subject(); + NonOwningMapping subject = getSubject(); String value = (subject != null) ? subject.getMappedBy() : null; if (value != null) { @@ -183,7 +183,7 @@ public class MappedByComposite extends AbstractFormPane<NonOwningMapping> private void valueChanged(String value) { - NonOwningMapping subject = subject(); + NonOwningMapping subject = getSubject(); String oldValue = (subject != null) ? subject.getMappedBy() : null; // Check for null value diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedSuperclassComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedSuperclassComposite.java index ca2cc96e2d..62258301e8 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedSuperclassComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/MappedSuperclassComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.MappedSuperclass; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class MappedSuperclassComposite extends AbstractFormPane<MappedSuperclass> +public class MappedSuperclassComposite extends FormPane<MappedSuperclass> implements JpaComposite { /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedNativeQueryPropertyComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedNativeQueryPropertyComposite.java index 2122386850..99b477f82e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedNativeQueryPropertyComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedNativeQueryPropertyComposite.java @@ -19,7 +19,7 @@ import org.eclipse.jpt.core.context.NamedNativeQuery; import org.eclipse.jpt.core.context.Query; import org.eclipse.jpt.ui.JptUiPlugin; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.PropertyValueModel; @@ -56,7 +56,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class NamedNativeQueryPropertyComposite extends AbstractPane<NamedNativeQuery> +public class NamedNativeQueryPropertyComposite extends Pane<NamedNativeQuery> { private ClassChooserPane<NamedNativeQuery> resultClassChooserPane; @@ -67,14 +67,14 @@ public class NamedNativeQueryPropertyComposite extends AbstractPane<NamedNativeQ * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public NamedNativeQueryPropertyComposite(AbstractPane<?> parentPane, + public NamedNativeQueryPropertyComposite(Pane<?> parentPane, PropertyValueModel<? extends NamedNativeQuery> subjectHolder, Composite parent) { super(parentPane, subjectHolder, parent); } - private ClassChooserPane<NamedNativeQuery> buildClassChooser(Composite container) { + private ClassChooserPane<NamedNativeQuery> addClassChooser(Composite container) { return new ClassChooserPane<NamedNativeQuery>(this, container) { @@ -94,18 +94,18 @@ public class NamedNativeQueryPropertyComposite extends AbstractPane<NamedNativeQ } @Override - protected String className() { - return subject().getResultClass(); + protected String getClassName() { + return getSubject().getResultClass(); } @Override - protected String labelText() { + protected String getLabelText() { return JptUiMappingsMessages.NamedNativeQueryPropertyComposite_resultClass; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -124,7 +124,7 @@ public class NamedNativeQueryPropertyComposite extends AbstractPane<NamedNativeQ if (type != null) { String className = type.getFullyQualifiedName('.'); - subject().setResultClass(className); + getSubject().setResultClass(className); } } }; @@ -160,19 +160,20 @@ public class NamedNativeQueryPropertyComposite extends AbstractPane<NamedNativeQ protected void initializeLayout(Composite container) { // Result class chooser - resultClassChooserPane = buildClassChooser(container); + resultClassChooserPane = addClassChooser(container); // Query text area - buildLabeledMultiLineText( + addLabeledMultiLineText( container, JptUiMappingsMessages.NamedNativeQueryPropertyComposite_query, buildQueryHolder(), - 4 + 4, + null ); // Query Hints pane - container = buildTitledPane( - buildSubPane(container, 5), + container = addTitledGroup( + addSubPane(container, 5), JptUiMappingsMessages.NamedNativeQueryPropertyComposite_queryHintsGroupBox ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedQueryPropertyComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedQueryPropertyComposite.java index 8ddbf092a2..2d00b55db2 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedQueryPropertyComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/NamedQueryPropertyComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.NamedQuery; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -43,7 +43,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class NamedQueryPropertyComposite extends AbstractPane<NamedQuery> +public class NamedQueryPropertyComposite extends Pane<NamedQuery> { /** * Creates a new <code>NamedQueryPropertyComposite</code>. @@ -52,7 +52,7 @@ public class NamedQueryPropertyComposite extends AbstractPane<NamedQuery> * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public NamedQueryPropertyComposite(AbstractPane<?> parentPane, + public NamedQueryPropertyComposite(Pane<?> parentPane, PropertyValueModel<? extends NamedQuery> subjectHolder, Composite parent) { @@ -80,16 +80,17 @@ public class NamedQueryPropertyComposite extends AbstractPane<NamedQuery> protected void initializeLayout(Composite container) { // Query text area - buildLabeledMultiLineText( + addLabeledMultiLineText( container, JptUiMappingsMessages.NamedQueryPropertyComposite_query, buildQueryHolder(), - 4 + 4, + null ); // Query Hints pane - container = buildTitledPane( - buildSubPane(container, 5), + container = addTitledGroup( + addSubPane(container, 5), JptUiMappingsMessages.NamedQueryPropertyComposite_queryHintsGroupBox ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToManyMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToManyMappingComposite.java index 92b231f7dd..62d45412f8 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToManyMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToManyMappingComposite.java @@ -15,7 +15,7 @@ import org.eclipse.jpt.core.context.OneToManyMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -63,7 +63,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class OneToManyMappingComposite extends AbstractFormPane<OneToManyMapping> +public class OneToManyMappingComposite extends FormPane<OneToManyMapping> implements JpaComposite { /** @@ -100,8 +100,8 @@ public class OneToManyMappingComposite extends AbstractFormPane<OneToManyMapping private void initializeGeneralPane(Composite container) { - int groupBoxMargin = groupBoxMargin(); - Composite subPane = buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); + int groupBoxMargin = getGroupBoxMargin(); + Composite subPane = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); // Target Entity widgets new TargetEntityComposite(this, subPane); @@ -113,7 +113,7 @@ public class OneToManyMappingComposite extends AbstractFormPane<OneToManyMapping new MappedByComposite(this, subPane); // Cascade widgets - new CascadeComposite(this, buildCascadeHolder(), buildSubPane(container, 4)); + new CascadeComposite(this, buildCascadeHolder(), addSubPane(container, 4)); // Ordering widgets new OrderingComposite(this, container); @@ -121,7 +121,7 @@ public class OneToManyMappingComposite extends AbstractFormPane<OneToManyMapping private void initializeJoinTablePane(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiMappingsMessages.MultiRelationshipMappingComposite_joinTable ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToOneMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToOneMappingComposite.java index 00ccfb6dec..0efb3b1e5c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToOneMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OneToOneMappingComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.Cascade; import org.eclipse.jpt.core.context.OneToOneMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -66,7 +66,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class OneToOneMappingComposite extends AbstractFormPane<OneToOneMapping> +public class OneToOneMappingComposite extends FormPane<OneToOneMapping> implements JpaComposite { /** @@ -98,8 +98,8 @@ public class OneToOneMappingComposite extends AbstractFormPane<OneToOneMapping> @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); - Composite subPane = buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); + int groupBoxMargin = getGroupBoxMargin(); + Composite subPane = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin); // Target Entity widgets new TargetEntityComposite(this, subPane); @@ -111,7 +111,7 @@ public class OneToOneMappingComposite extends AbstractFormPane<OneToOneMapping> new MappedByComposite(this, subPane); // Optional check box - new OptionalComposite(this, buildSubPane(subPane, 4)); + new OptionalComposite(this, addSubPane(subPane, 4)); // Cascade widgets new CascadeComposite(this, buildCascadeHolder(), container); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OptionalComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OptionalComposite.java index e64e791fcb..ebd615016a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OptionalComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OptionalComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.Nullable; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Composite; * @version 1.0 * @since 2.0 */ -public class OptionalComposite extends AbstractFormPane<Nullable> +public class OptionalComposite extends FormPane<Nullable> { /** * Creates a new <code>OptionalComposite</code>. @@ -39,7 +39,7 @@ public class OptionalComposite extends AbstractFormPane<Nullable> * @param parentPane The parent container of this one * @param parent The parent container */ - public OptionalComposite(AbstractFormPane<? extends Nullable> parentPane, + public OptionalComposite(FormPane<? extends Nullable> parentPane, Composite parent) { super(parentPane, parent); @@ -78,9 +78,9 @@ public class OptionalComposite extends AbstractFormPane<Nullable> @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultOptional(); + Boolean defaultValue = getSubject().getDefaultOptional(); if (defaultValue != null) { @@ -105,7 +105,7 @@ public class OptionalComposite extends AbstractFormPane<Nullable> @Override protected void initializeLayout(Composite container) { - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiMappingsMessages.BasicGeneralSection_optionalLabel, buildOptionalHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrderingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrderingComposite.java index e77c720364..62706c71e2 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrderingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrderingComposite.java @@ -15,7 +15,7 @@ import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.ControlEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -50,7 +50,7 @@ import org.eclipse.swt.widgets.Text; * @since 1.0 */ @SuppressWarnings("nls") -public class OrderingComposite extends AbstractFormPane<MultiRelationshipMapping> +public class OrderingComposite extends FormPane<MultiRelationshipMapping> { private Text customOrderingText; @@ -60,7 +60,7 @@ public class OrderingComposite extends AbstractFormPane<MultiRelationshipMapping * @param parentPane The parent container of this one * @param parent The parent container */ - public OrderingComposite(AbstractFormPane<? extends MultiRelationshipMapping> parentPane, + public OrderingComposite(FormPane<? extends MultiRelationshipMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -116,21 +116,21 @@ public class OrderingComposite extends AbstractFormPane<MultiRelationshipMapping protected void initializeLayout(Composite container) { // Order By group - Group orderByGroup = buildTitledPane( + Group orderByGroup = addTitledGroup( container, JptUiMappingsMessages.OrderByComposite_orderByGroup, JpaHelpContextIds.MAPPING_ORDER_BY); // No Ordering radio button - buildRadioButton( - buildSubPane(orderByGroup, 8), + addRadioButton( + addSubPane(orderByGroup, 8), JptUiMappingsMessages.OrderByComposite_noOrdering, buildNoOrderingHolder(), JpaHelpContextIds.MAPPING_ORDER_BY_NO_ORDERING ); // Order by Primary Key radio button - buildRadioButton( + addRadioButton( orderByGroup, JptUiMappingsMessages.OrderByComposite_primaryKeyOrdering, buildPrimaryKeyOrderingHolder(), @@ -138,7 +138,7 @@ public class OrderingComposite extends AbstractFormPane<MultiRelationshipMapping ); // Custom Ordering radio button - buildRadioButton( + addRadioButton( orderByGroup, JptUiMappingsMessages.OrderByComposite_customOrdering, buildCustomOrderingHolder(), @@ -146,8 +146,8 @@ public class OrderingComposite extends AbstractFormPane<MultiRelationshipMapping ); // Custom Ordering text field - customOrderingText = buildText( - buildSubPane(orderByGroup, 0, 16), + customOrderingText = addUnmanagedText( + addSubPane(orderByGroup, 0, 16), JpaHelpContextIds.MAPPING_ORDER_BY ); @@ -202,8 +202,8 @@ public class OrderingComposite extends AbstractFormPane<MultiRelationshipMapping } private void populateCustomOrdering() { - if ((subject() != null) && subject().getOrderBy() != null) { - customOrderingText.setText(subject().getOrderBy()); + if ((getSubject() != null) && getSubject().getOrderBy() != null) { + customOrderingText.setText(getSubject().getOrderBy()); } else { customOrderingText.setText(""); @@ -227,7 +227,7 @@ public class OrderingComposite extends AbstractFormPane<MultiRelationshipMapping setPopulating(true); try { - subject().setOrderBy(value); + getSubject().setOrderBy(value); } finally { setPopulating(false); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentAttributeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentAttributeMapAsComposite.java index b72c6b29f7..d74bfd3634 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentAttributeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentAttributeMapAsComposite.java @@ -13,7 +13,7 @@ import java.util.Iterator; import org.eclipse.jpt.core.context.AttributeMapping; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.ui.details.AttributeMappingUiProvider; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** @@ -34,7 +34,7 @@ public class OrmPersistentAttributeMapAsComposite extends PersistentAttributeMap * @param parentPane The parent pane of this one * @param parent The parent container */ - public OrmPersistentAttributeMapAsComposite(AbstractPane<? extends OrmPersistentAttribute> parentPane, + public OrmPersistentAttributeMapAsComposite(Pane<? extends OrmPersistentAttribute> parentPane, Composite parent) { super(parentPane, parent); @@ -45,7 +45,7 @@ public class OrmPersistentAttributeMapAsComposite extends PersistentAttributeMap */ @Override protected Iterator<AttributeMappingUiProvider<? extends AttributeMapping>> attributeMappingUiProviders() { - return jpaPlatformUi().ormAttributeMappingUiProviders(); + return getJpaPlatformUi().ormAttributeMappingUiProviders(); } /* @@ -53,6 +53,6 @@ public class OrmPersistentAttributeMapAsComposite extends PersistentAttributeMap */ @Override protected Iterator<AttributeMappingUiProvider<? extends AttributeMapping>> defaultAttributeMappingUiProviders() { - return jpaPlatformUi().defaultOrmAttributeMappingUiProviders(); + return getJpaPlatformUi().defaultOrmAttributeMappingUiProviders(); } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentTypeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentTypeMapAsComposite.java index 97a6923344..af6b21c5d7 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentTypeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OrmPersistentTypeMapAsComposite.java @@ -14,7 +14,7 @@ import org.eclipse.jpt.core.context.TypeMapping; import org.eclipse.jpt.core.context.orm.OrmPersistentType; import org.eclipse.jpt.ui.details.MappingUiProvider; import org.eclipse.jpt.ui.details.TypeMappingUiProvider; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** @@ -35,7 +35,7 @@ public class OrmPersistentTypeMapAsComposite extends PersistentTypeMapAsComposit * @param parentPane The parent pane of this one * @param parent The parent container */ - public OrmPersistentTypeMapAsComposite(AbstractPane<? extends OrmPersistentType> parentPane, + public OrmPersistentTypeMapAsComposite(Pane<? extends OrmPersistentType> parentPane, Composite parent) { super(parentPane, parent); @@ -54,6 +54,6 @@ public class OrmPersistentTypeMapAsComposite extends PersistentTypeMapAsComposit */ @Override protected Iterator<TypeMappingUiProvider<? extends TypeMapping>> typeMappingUiProviders() { - return jpaPlatformUi().ormTypeMappingUiProviders(); + return getJpaPlatformUi().ormTypeMappingUiProviders(); } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java index 9c3a55f5b8..02b589d76c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/OverridesComposite.java @@ -26,7 +26,7 @@ import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.mappings.details.JoinColumnsComposite.IJoinColumnsEditor; import org.eclipse.jpt.ui.internal.util.ControlSwitcher; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.PostExecution; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; @@ -79,7 +79,7 @@ import org.eclipse.ui.part.PageBook; * @since 1.0 */ @SuppressWarnings("nls") -public class OverridesComposite extends AbstractFormPane<Entity> +public class OverridesComposite extends FormPane<Entity> { private Composite columnPane; private Composite joinColumnsPane; @@ -93,7 +93,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> * @param parentPane The parent controller of this one * @param parent The parent container */ - public OverridesComposite(AbstractFormPane<? extends Entity> parentPane, + public OverridesComposite(FormPane<? extends Entity> parentPane, Composite parent) { super(parentPane, parent, false); @@ -128,7 +128,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> protected void initializeLayout(Composite container) { // Overrides group pane - container = buildTitledPane( + container = addTitledGroup( container, JptUiMappingsMessages.AttributeOverridesComposite_attributeOverrides ); @@ -137,7 +137,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> initializeOverridesList(container); // Property pane - PageBook pageBook = buildPageBook(container); + PageBook pageBook = addPageBook(container); initializeJoinColumnsPane(pageBook); initializeColumnPane(pageBook); installOverrideControlSwitcher(this.selectedOverrideHolder, pageBook); @@ -147,7 +147,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> return new AddRemoveListPane<Entity>( this, - buildSubPane(container, 8), + addSubPane(container, 8), buildOverridesAdapter(), buildOverridesListModel(), this.selectedOverrideHolder, @@ -167,14 +167,15 @@ public class OverridesComposite extends AbstractFormPane<Entity> private void initializeColumnPane(PageBook pageBook) { - int groupBoxMargin = groupBoxMargin(); - this.columnPane = buildSubPane(pageBook, 5); + int groupBoxMargin = getGroupBoxMargin(); + this.columnPane = addSubPane(pageBook, 5); // Override Default check box - buildCheckBox( - buildSubPane(this.columnPane, 0, groupBoxMargin, 0, groupBoxMargin), + addCheckBox( + addSubPane(this.columnPane, 0, groupBoxMargin, 0, groupBoxMargin), JptUiMappingsMessages.AttributeOverridesComposite_overrideDefault, - getOverrideVirtualAttributeOverrideHolder() + getOverrideVirtualAttributeOverrideHolder(), + null ); // Column widgets (for IOverrideAttribute) @@ -198,16 +199,17 @@ public class OverridesComposite extends AbstractFormPane<Entity> private void initializeJoinColumnsPane(PageBook pageBook) { - this.joinColumnsPane = buildSubPane(pageBook); + this.joinColumnsPane = addSubPane(pageBook); // Override Default check box - buildCheckBox( - buildSubPane(this.joinColumnsPane, 5, groupBoxMargin()), + addCheckBox( + addSubPane(this.joinColumnsPane, 5, getGroupBoxMargin()), JptUiMappingsMessages.AttributeOverridesComposite_overrideDefault, - getOverrideVirtualAssociationOverrideHolder() + getOverrideVirtualAssociationOverrideHolder(), + null ); - Group joinColumnsGroupPane = buildTitledPane( + Group joinColumnsGroupPane = addTitledGroup( this.joinColumnsPane, JptUiMappingsMessages.OverridesComposite_joinColumn ); @@ -246,7 +248,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> private void addJoinColumn(AssociationOverride subject) { JoinColumnInAssociationOverrideDialog dialog = - new JoinColumnInAssociationOverrideDialog(shell(), subject, null); + new JoinColumnInAssociationOverrideDialog(getShell(), subject, null); dialog.openDialog(buildAddJoinColumnPostExecution()); } @@ -255,7 +257,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> return new PostExecution<JoinColumnInAssociationOverrideDialog>() { public void execute(JoinColumnInAssociationOverrideDialog dialog) { if (dialog.wasConfirmed()) { - addJoinColumn(dialog.subject()); + addJoinColumn(dialog.getSubject()); } } }; @@ -329,7 +331,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> return new PostExecution<JoinColumnInAssociationOverrideDialog>() { public void execute(JoinColumnInAssociationOverrideDialog dialog) { if (dialog.wasConfirmed()) { - editJoinColumn(dialog.subject()); + editJoinColumn(dialog.getSubject()); } } }; @@ -494,7 +496,7 @@ public class OverridesComposite extends AbstractFormPane<Entity> JoinColumnInAssociationOverrideDialog dialog = new JoinColumnInAssociationOverrideDialog( - shell(), + getShell(), (AssociationOverride) this.selectedOverrideHolder.getValue(), joinColumn ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java index c10b0d8fdd..a7039cb7e8 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java @@ -21,7 +21,7 @@ import org.eclipse.jpt.ui.internal.JpaMappingImageHelper; import org.eclipse.jpt.ui.internal.JptUiMessages; import org.eclipse.jpt.ui.internal.platform.JpaPlatformUiRegistry; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; @@ -44,7 +44,7 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr * @param parentPane The parent pane of this one * @param parent The parent container */ - public PersistentAttributeMapAsComposite(AbstractPane<? extends T> parentPane, + public PersistentAttributeMapAsComposite(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -74,19 +74,19 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr @Override protected MappingUiProvider<T> buildDefaultProvider() { - if (subject().getDefaultMappingKey() == null) { + if (getSubject().getDefaultMappingKey() == null) { return null; } return new MappingUiProvider<T>() { public Image getImage() { - String mappingKey = subject().getDefaultMappingKey(); + String mappingKey = getSubject().getDefaultMappingKey(); return JpaMappingImageHelper.imageForAttributeMapping(mappingKey); } public String getLabel() { - String mappingKey = subject().getDefaultMappingKey(); + String mappingKey = getSubject().getDefaultMappingKey(); return SWTUtil.buildDisplayString( JptUiMessages.class, @@ -108,27 +108,27 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr protected MappingChangeHandler buildMappingChangeHandler() { return new MappingChangeHandler() { - public String labelText() { - String mappingKey = subject().getMappingKey(); + public String getLabelText() { + String mappingKey = getSubject().getMappingKey(); if (mappingKey != MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY) { return JptUiMessages.MapAsComposite_mappedAttributeText; } - if (subject().isVirtual()) { + if (getSubject().isVirtual()) { return JptUiMessages.MapAsComposite_virtualAttributeText; } return JptUiMessages.MapAsComposite_unmappedAttributeText; } - public String mappingType() { - String mappingKey = subject().getMappingKey(); + public String getMappingType() { + String mappingKey = getSubject().getMappingKey(); if (mappingKey == null) { return JptUiMessages.MapAsComposite_changeMappingType; } - if (subject().getSpecifiedMapping() == null) { + if (getSubject().getSpecifiedMapping() == null) { return SWTUtil.buildDisplayString( JptUiMessages.class, MapAsComposite.class, @@ -144,11 +144,11 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr } public void morphMapping(MappingUiProvider<?> provider) { - subject().setSpecifiedMappingKey(provider.getMappingKey()); + getSubject().setSpecifiedMappingKey(provider.getMappingKey()); } - public String name() { - return subject().getName(); + public String getName() { + return getSubject().getName(); } public Iterator<? extends MappingUiProvider<?>> providers() { @@ -171,17 +171,17 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr * * @return The UI platform of the JPT plug-in */ - protected JpaPlatformUi jpaPlatformUi() { - String platformId = subject().getJpaProject().getJpaPlatform().getId(); - return JpaPlatformUiRegistry.instance().jpaPlatform(platformId); + protected JpaPlatformUi getJpaPlatformUi() { + String platformId = getSubject().getJpaProject().getJpaPlatform().getId(); + return JpaPlatformUiRegistry.instance().getJpaPlatformUi(platformId); } /* * (non-Javadoc) */ @Override - protected String mappingKey() { - return subject().getMappingKey(); + protected String getMappingKey() { + return getSubject().getMappingKey(); } /* diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java index ed09f3c7ff..21d2c6be99 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java @@ -19,7 +19,7 @@ import org.eclipse.jpt.ui.details.TypeMappingUiProvider; import org.eclipse.jpt.ui.internal.JptUiMessages; import org.eclipse.jpt.ui.internal.platform.JpaPlatformUiRegistry; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** @@ -40,7 +40,7 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext * @param parentPane The parent pane of this one * @param parent The parent container */ - public PersistentTypeMapAsComposite(AbstractPane<? extends T> parentPane, + public PersistentTypeMapAsComposite(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -63,8 +63,8 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext protected MappingChangeHandler buildMappingChangeHandler() { return new MappingChangeHandler() { - public String labelText() { - String mappingKey = subject().getMappingKey(); + public String getLabelText() { + String mappingKey = getSubject().getMappingKey(); if (mappingKey != null) { return JptUiMessages.MapAsComposite_mappedTypeText; @@ -73,8 +73,8 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext return JptUiMessages.MapAsComposite_unmappedTypeText; } - public String mappingType() { - String mappingKey = subject().getMappingKey(); + public String getMappingType() { + String mappingKey = getSubject().getMappingKey(); if (mappingKey == null) { return JptUiMessages.MapAsComposite_changeMappingType; @@ -88,11 +88,11 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext } public void morphMapping(MappingUiProvider<?> provider) { - subject().setMappingKey(provider.getMappingKey()); + getSubject().setMappingKey(provider.getMappingKey()); } - public String name() { - return subject().getName(); + public String getName() { + return getSubject().getName(); } public Iterator<? extends MappingUiProvider<?>> providers() { @@ -107,17 +107,17 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext * * @return The UI platform of the JPT plug-in */ - protected JpaPlatformUi jpaPlatformUi() { - String platformId = subject().getJpaProject().getJpaPlatform().getId(); - return JpaPlatformUiRegistry.instance().jpaPlatform(platformId); + protected JpaPlatformUi getJpaPlatformUi() { + String platformId = getSubject().getJpaProject().getJpaPlatform().getId(); + return JpaPlatformUiRegistry.instance().getJpaPlatformUi(platformId); } /* * (non-Javadoc) */ @Override - protected String mappingKey() { - return subject().getMappingKey(); + protected String getMappingKey() { + return getSubject().getMappingKey(); } /* diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnDialog.java index 2764e26f16..cdd99e9d66 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnDialog.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.Entity; import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; @@ -50,9 +50,9 @@ public class PrimaryKeyJoinColumnDialog extends BaseJoinColumnDialog<PrimaryKeyJ * (non-Javadoc) */ @Override - protected AbstractDialogPane<PrimaryKeyJoinColumnStateObject> buildLayout(Composite container) { + protected DialogPane<PrimaryKeyJoinColumnStateObject> buildLayout(Composite container) { return new BaseJoinColumnDialogPane<PrimaryKeyJoinColumnStateObject>( - subjectHolder(), + getSubjectHolder(), container ); } @@ -69,7 +69,7 @@ public class PrimaryKeyJoinColumnDialog extends BaseJoinColumnDialog<PrimaryKeyJ * (non-Javadoc) */ @Override - protected String descriptionTitle() { + protected String getDescriptionTitle() { if (getJoinColumn() == null) { return JptUiMappingsMessages.PrimaryKeyJoinColumnDialog_addDescriptionTitle; @@ -98,7 +98,7 @@ public class PrimaryKeyJoinColumnDialog extends BaseJoinColumnDialog<PrimaryKeyJ * (non-Javadoc) */ @Override - protected String title() { + protected String getTitle() { if (getJoinColumn() == null) { return JptUiMappingsMessages.PrimaryKeyJoinColumnDialog_addTitle; diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableDialog.java index a152911cc3..49f60bf512 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableDialog.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn; import org.eclipse.jpt.core.context.SecondaryTable; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; @@ -50,9 +50,9 @@ public class PrimaryKeyJoinColumnInSecondaryTableDialog extends BaseJoinColumnDi * (non-Javadoc) */ @Override - protected AbstractDialogPane<PrimaryKeyJoinColumnInSecondaryTableStateObject> buildLayout(Composite container) { + protected DialogPane<PrimaryKeyJoinColumnInSecondaryTableStateObject> buildLayout(Composite container) { return new BaseJoinColumnDialogPane<PrimaryKeyJoinColumnInSecondaryTableStateObject>( - subjectHolder(), + getSubjectHolder(), container ); } @@ -72,7 +72,7 @@ public class PrimaryKeyJoinColumnInSecondaryTableDialog extends BaseJoinColumnDi * (non-Javadoc) */ @Override - protected String descriptionTitle() { + protected String getDescriptionTitle() { if (getJoinColumn() == null) { return JptUiMappingsMessages.PrimaryKeyJoinColumnInSecondaryTableDialog_addDescriptionTitle; @@ -101,7 +101,7 @@ public class PrimaryKeyJoinColumnInSecondaryTableDialog extends BaseJoinColumnDi * (non-Javadoc) */ @Override - protected String title() { + protected String getTitle() { if (getJoinColumn() == null) { return JptUiMappingsMessages.PrimaryKeyJoinColumnInSecondaryTableDialog_addTitle; diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java index bda9510d43..b2c9cfb6c2 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java @@ -85,7 +85,7 @@ public class PrimaryKeyJoinColumnInSecondaryTableStateObject extends BaseJoinCol * (non-Javadoc) */ @Override - protected String initialTable() { + protected String getInitialTable() { return getOwner().getName(); } @@ -94,6 +94,6 @@ public class PrimaryKeyJoinColumnInSecondaryTableStateObject extends BaseJoinCol */ @Override public ListIterator<String> tables() { - return new SingleElementListIterator<String>(initialTable()); + return new SingleElementListIterator<String>(getInitialTable()); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java index fd319a1d76..42d59c12ab 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java @@ -86,7 +86,7 @@ public class PrimaryKeyJoinColumnStateObject extends BaseJoinColumnStateObject * (non-Javadoc) */ @Override - protected String initialTable() { + protected String getInitialTable() { return getOwner().getTableName(); } @@ -95,6 +95,6 @@ public class PrimaryKeyJoinColumnStateObject extends BaseJoinColumnStateObject */ @Override public ListIterator<String> tables() { - return new SingleElementListIterator<String>(initialTable()); + return new SingleElementListIterator<String>(getInitialTable()); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java index 08a33178bc..419f5999e4 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java @@ -22,7 +22,7 @@ import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.ControlEnabler; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane; import org.eclipse.jpt.ui.internal.widgets.PostExecution; @@ -67,7 +67,7 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory; * @version 2.0 * @since 1.0 */ -public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractFormPane<SecondaryTable> +public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends FormPane<SecondaryTable> { private WritablePropertyValueModel<PrimaryKeyJoinColumn> joinColumnHolder; @@ -78,7 +78,7 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public PrimaryKeyJoinColumnsInSecondaryTableComposite(AbstractFormPane<?> parentPane, + public PrimaryKeyJoinColumnsInSecondaryTableComposite(FormPane<?> parentPane, PropertyValueModel<? extends SecondaryTable> subjectHolder, Composite parent) { @@ -111,7 +111,7 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm private void addPrimaryKeyJoinColumn() { PrimaryKeyJoinColumnInSecondaryTableDialog dialog = - new PrimaryKeyJoinColumnInSecondaryTableDialog(shell(), subject(), null); + new PrimaryKeyJoinColumnInSecondaryTableDialog(getShell(), getSubject(), null); dialog.openDialog(buildAddPrimaryKeyJoinColumnPostExecution()); } @@ -120,7 +120,7 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm return new PostExecution<PrimaryKeyJoinColumnInSecondaryTableDialog>() { public void execute(PrimaryKeyJoinColumnInSecondaryTableDialog dialog) { if (dialog.wasConfirmed()) { - addJoinColumn(dialog.subject()); + addJoinColumn(dialog.getSubject()); } } }; @@ -157,7 +157,7 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm return new PostExecution<PrimaryKeyJoinColumnInSecondaryTableDialog>() { public void execute(PrimaryKeyJoinColumnInSecondaryTableDialog dialog) { if (dialog.wasConfirmed()) { - editPrimaryKeyJoinColumn(dialog.subject()); + editPrimaryKeyJoinColumn(dialog.getSubject()); } } }; @@ -286,8 +286,8 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm PrimaryKeyJoinColumnInSecondaryTableDialog dialog = new PrimaryKeyJoinColumnInSecondaryTableDialog( - shell(), - subject(), + getShell(), + getSubject(), joinColumn ); @@ -314,16 +314,17 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm protected void initializeLayout(Composite container) { // Primary Key Join Columns group pane - Group groupPane = buildTitledPane( + Group groupPane = addTitledGroup( container, JptUiMappingsMessages.PrimaryKeyJoinColumnsComposite_primaryKeyJoinColumn ); // Override Default check box - Button button = buildCheckBox( - buildSubPane(groupPane, 8), + Button button = addCheckBox( + addSubPane(groupPane, 8), JptUiMappingsMessages.PrimaryKeyJoinColumnsComposite_overrideDefaultPrimaryKeyJoinColumns, - buildOverrideDefaultJoinColumnHolder() + buildOverrideDefaultJoinColumnHolder(), + null ); installOverrideDefaultButtonEnabler(button); @@ -362,7 +363,7 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm int[] selectedIndices = listSelectionModel.selectedIndices(); for (int index = selectedIndices.length; --index >= 0; ) { - subject().removeSpecifiedPrimaryKeyJoinColumn(selectedIndices[index]); + getSubject().removeSpecifiedPrimaryKeyJoinColumn(selectedIndices[index]); } } @@ -375,7 +376,7 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm setPopulating(true); try { - SecondaryTable secondaryTable = subject(); + SecondaryTable secondaryTable = getSubject(); // Add a join column by creating a specified one using the default // one if it exists @@ -414,10 +415,10 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite extends AbstractForm @Override protected Boolean buildValue() { - if (subject() == null) { + if (getSubject() == null) { return Boolean.FALSE; } - return !subject().isVirtual() && listHolder.size() > 0; + return !getSubject().isVirtual() && listHolder.size() > 0; } public void setValue(Boolean value) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueriesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueriesComposite.java index 490cb27c25..4d848891ba 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueriesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueriesComposite.java @@ -22,7 +22,7 @@ import org.eclipse.jpt.core.context.QueryHolder; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.ControlSwitcher; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.NewNameDialog; import org.eclipse.jpt.ui.internal.widgets.NewNameDialogBuilder; @@ -77,7 +77,7 @@ import org.eclipse.ui.part.PageBook; * @version 2.0 * @since 2.0 */ -public class QueriesComposite extends AbstractPane<QueryHolder> +public class QueriesComposite extends Pane<QueryHolder> { private AddRemoveListPane<QueryHolder> listPane; private NamedNativeQueryPropertyComposite namedNativeQueryPane; @@ -90,7 +90,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> * @param parentPane The parent controller of this one * @param parent The parent container */ - public QueriesComposite(AbstractPane<? extends QueryHolder> parentPane, + public QueriesComposite(Pane<? extends QueryHolder> parentPane, Composite parent) { super(parentPane, parent); @@ -98,7 +98,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> private void addNamedNativeQuery(ObjectListSelectionModel listSelectionModel) { - NewNameDialogBuilder builder = new NewNameDialogBuilder(shell()); + NewNameDialogBuilder builder = new NewNameDialogBuilder(getShell()); builder.setDialogTitle(JptUiMappingsMessages.QueriesComposite_addNamedNativeQueryTitle); builder.setDescription(JptUiMappingsMessages.QueriesComposite_addNamedNativeQueryDescription); builder.setDescriptionTitle(JptUiMappingsMessages.QueriesComposite_addNamedNativeQueryDescriptionTitle); @@ -111,7 +111,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> private void addNamedQuery(ObjectListSelectionModel listSelectionModel) { - NewNameDialogBuilder builder = new NewNameDialogBuilder(shell()); + NewNameDialogBuilder builder = new NewNameDialogBuilder(getShell()); builder.setDialogTitle(JptUiMappingsMessages.QueriesComposite_addNamedQueryTitle); builder.setDescription(JptUiMappingsMessages.QueriesComposite_addNamedQueryDescription); builder.setDescriptionTitle(JptUiMappingsMessages.QueriesComposite_addNamedQueryDescriptionTitle); @@ -140,7 +140,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> }; } - private AddRemoveListPane<QueryHolder> buildListPane(Composite container) { + private AddRemoveListPane<QueryHolder> addListPane(Composite container) { return new AddRemoveListPane<QueryHolder>( this, @@ -156,7 +156,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> protected void addCustomButtonAfterAddButton(Composite container, String helpId) { - Button button = buildButton( + Button button = addButton( container, JptUiMappingsMessages.QueriesComposite_addNamedNativeQuery, helpId, @@ -232,7 +232,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> return new PostExecution<NewNameDialog>() { public void execute(NewNameDialog dialog) { if (dialog.wasConfirmed()) { - NamedNativeQuery namedNativeQuery = subject().addNamedNativeQuery(subject().namedNativeQueriesSize()); + NamedNativeQuery namedNativeQuery = getSubject().addNamedNativeQuery(getSubject().namedNativeQueriesSize()); namedNativeQuery.setName(dialog.getName()); queryHolder.setValue(namedNativeQuery); listSelectionModel.setSelectedValue(namedNativeQuery); @@ -245,7 +245,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> return new PostExecution<NewNameDialog>() { public void execute(NewNameDialog dialog) { if (dialog.wasConfirmed()) { - Query query = subject().addNamedQuery(subject().namedQueriesSize()); + Query query = getSubject().addNamedQuery(getSubject().namedQueriesSize()); query.setName(dialog.getName()); queryHolder.setValue(query); selectionModel.setSelectedValue(query); @@ -301,10 +301,10 @@ public class QueriesComposite extends AbstractPane<QueryHolder> public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { for (Object item : listSelectionModel.selectedValues()) { if (item instanceof NamedQuery) { - subject().removeNamedQuery((NamedQuery) item); + getSubject().removeNamedQuery((NamedQuery) item); } else { - subject().removeNamedNativeQuery((NamedNativeQuery) item); + getSubject().removeNamedNativeQuery((NamedNativeQuery) item); } } } @@ -329,10 +329,10 @@ public class QueriesComposite extends AbstractPane<QueryHolder> int index = -1; if (query instanceof NamedQuery) { - index = CollectionTools.indexOf(subject().namedQueries(), query); + index = CollectionTools.indexOf(getSubject().namedQueries(), query); } else { - index = CollectionTools.indexOf(subject().namedNativeQueries(), query); + index = CollectionTools.indexOf(getSubject().namedNativeQueries(), query); } name = NLS.bind(JptUiMappingsMessages.QueriesComposite_displayString, index); @@ -351,7 +351,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> Query query = queryHolder.getValue(); - NewNameDialogBuilder builder = new NewNameDialogBuilder(shell()); + NewNameDialogBuilder builder = new NewNameDialogBuilder(getShell()); builder.setLabelText(JptUiMappingsMessages.QueriesComposite_label); builder.setName(query.getName()); @@ -397,7 +397,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> protected void initializeLayout(Composite container) { // List pane - listPane = buildListPane(container); + listPane = addListPane(container); // Property pane PageBook pageBook = new PageBook(container, SWT.NULL); @@ -425,7 +425,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> } private Iterator<String> namedNativeQueryNames() { - return new TransformationIterator<Query, String>(subject().namedNativeQueries()) { + return new TransformationIterator<Query, String>(getSubject().namedNativeQueries()) { @Override protected String transform(Query next) { return next.getName(); @@ -434,7 +434,7 @@ public class QueriesComposite extends AbstractPane<QueryHolder> } private Iterator<String> namedQueryNames() { - return new TransformationIterator<Query, String>(subject().namedQueries()) { + return new TransformationIterator<Query, String>(getSubject().namedQueries()) { @Override protected String transform(Query next) { return next.getName(); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueryHintsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueryHintsComposite.java index acb346e8e9..ac9e8bdfb4 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueryHintsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/QueryHintsComposite.java @@ -23,7 +23,7 @@ import org.eclipse.jpt.core.context.QueryHint; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.swt.ColumnAdapter; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveTablePane; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; @@ -56,7 +56,7 @@ import org.eclipse.swt.widgets.TableItem; * @since 2.0 */ @SuppressWarnings("nls") -public class QueryHintsComposite extends AbstractPane<Query> +public class QueryHintsComposite extends Pane<Query> { private WritablePropertyValueModel<QueryHint> queryHintHolder; @@ -66,7 +66,7 @@ public class QueryHintsComposite extends AbstractPane<Query> * @param parentPane The parent pane of this one * @param parent The parent container */ - public QueryHintsComposite(AbstractPane<? extends Query> parentPane, + public QueryHintsComposite(Pane<? extends Query> parentPane, Composite container) { super(parentPane, container); @@ -84,13 +84,13 @@ public class QueryHintsComposite extends AbstractPane<Query> private Adapter buildQueryHintAdapter() { return new AddRemoveTablePane.AbstractAdapter() { public void addNewItem(ObjectListSelectionModel listSelectionModel) { - QueryHint queryHint = subject().addHint(subject().hintsSize()); + QueryHint queryHint = getSubject().addHint(getSubject().hintsSize()); queryHintHolder.setValue(queryHint); } public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { for (Object item : listSelectionModel.selectedValues()) { - subject().removeHint((QueryHint) item); + getSubject().removeHint((QueryHint) item); } } }; diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SequenceGeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SequenceGeneratorComposite.java index 89a0336f9f..92f612c8e4 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SequenceGeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SequenceGeneratorComposite.java @@ -17,7 +17,7 @@ import org.eclipse.jpt.db.Schema; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.mappings.db.SequenceCombo; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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.swt.widgets.Composite; @@ -56,7 +56,7 @@ public class SequenceGeneratorComposite extends GeneratorComposite<SequenceGener * @param parentPane The parent container of this one * @param parent The parent container */ - public SequenceGeneratorComposite(AbstractPane<? extends GeneratorHolder> parentPane, + public SequenceGeneratorComposite(Pane<? extends GeneratorHolder> parentPane, Composite parent) { super(parentPane, parent); @@ -93,13 +93,13 @@ public class SequenceGeneratorComposite extends GeneratorComposite<SequenceGener @Override protected void buildSubject() { SequenceGeneratorComposite.this.buildGenerator( - SequenceGeneratorComposite.this.subject() + SequenceGeneratorComposite.this.getSubject() ); } @Override - protected String defaultValue() { - return subject().getDefaultSequenceName(); + protected String getDefaultValue() { + return getSubject().getDefaultSequenceName(); } @Override @@ -108,24 +108,24 @@ public class SequenceGeneratorComposite extends GeneratorComposite<SequenceGener } @Override - protected JpaProject jpaProject() { - return SequenceGeneratorComposite.this.jpaProject(); + protected JpaProject getJpaProject() { + return SequenceGeneratorComposite.this.getJpaProject(); } @Override - protected Schema schema() { + protected Schema getSchema() { // TODO return null; } @Override protected void setValue(String value) { - subject().setSpecifiedSequenceName(value); + getSubject().setSpecifiedSequenceName(value); } @Override - protected String value() { - SequenceGenerator generator = generator(); + protected String getValue() { + SequenceGenerator generator = getGenerator(); if (generator != null) { return generator.getSpecifiedSequenceName(); @@ -140,7 +140,7 @@ public class SequenceGeneratorComposite extends GeneratorComposite<SequenceGener * (non-Javadoc) */ @Override - protected SequenceGenerator generator(GeneratorHolder subject) { + protected SequenceGenerator getGenerator(GeneratorHolder subject) { return subject.getSequenceGenerator(); } @@ -151,7 +151,7 @@ public class SequenceGeneratorComposite extends GeneratorComposite<SequenceGener protected void initializeLayout(Composite container) { // Name widgets - buildLabeledText( + addLabeledText( container, JptUiMappingsMessages.SequenceGeneratorComposite_name, buildGeneratorNameHolder(), @@ -159,7 +159,7 @@ public class SequenceGeneratorComposite extends GeneratorComposite<SequenceGener ); // Sequence Generator widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.SequenceGeneratorComposite_sequence, buildSequenceNameCombo(container), @@ -177,7 +177,7 @@ public class SequenceGeneratorComposite extends GeneratorComposite<SequenceGener * (non-Javadoc) */ @Override - protected String propertyName() { + protected String getPropertyName() { return GeneratorHolder.SEQUENCE_GENERATOR_PROPERTY; } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java index 62bdcad402..6861587a77 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java @@ -17,7 +17,7 @@ import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.mappings.db.CatalogCombo; import org.eclipse.jpt.ui.internal.mappings.db.SchemaCombo; import org.eclipse.jpt.ui.internal.mappings.db.TableCombo; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -51,7 +51,7 @@ import org.eclipse.swt.widgets.Group; * @version 2.0 * @since 1.0 */ -public class TableComposite extends AbstractFormPane<Table> +public class TableComposite extends FormPane<Table> { /** * Creates a new <code>TableComposite</code>. @@ -60,7 +60,7 @@ public class TableComposite extends AbstractFormPane<Table> * @param subjectHolder The holder of the subject * @param parent The parent container */ - public TableComposite(AbstractFormPane<?> parentPane, + public TableComposite(FormPane<?> parentPane, PropertyValueModel<? extends Table> subjectHolder, Composite parent) { @@ -81,7 +81,7 @@ public class TableComposite extends AbstractFormPane<Table> super(subjectHolder, parent, widgetFactory); } - private CatalogCombo<Table> buildCatalogCombo(Composite container) { + private CatalogCombo<Table> addCatalogCombo(Composite container) { return new CatalogCombo<Table>(this, container) { @@ -93,23 +93,23 @@ public class TableComposite extends AbstractFormPane<Table> } @Override - protected String defaultValue() { - return subject().getDefaultCatalog(); + protected String getDefaultValue() { + return getSubject().getDefaultCatalog(); } @Override protected void setValue(String value) { - subject().setSpecifiedCatalog(value); + getSubject().setSpecifiedCatalog(value); } @Override - protected String value() { - return subject().getSpecifiedCatalog(); + protected String getValue() { + return getSubject().getSpecifiedCatalog(); } }; } - private SchemaCombo<Table> buildSchemaCombo(Composite container) { + private SchemaCombo<Table> addSchemaCombo(Composite container) { return new SchemaCombo<Table>(this, container) { @@ -121,23 +121,23 @@ public class TableComposite extends AbstractFormPane<Table> } @Override - protected String defaultValue() { - return subject().getDefaultSchema(); + protected String getDefaultValue() { + return getSubject().getDefaultSchema(); } @Override protected void setValue(String value) { - subject().setSpecifiedSchema(value); + getSubject().setSpecifiedSchema(value); } @Override - protected String value() { - return subject().getSpecifiedSchema(); + protected String getValue() { + return getSubject().getSpecifiedSchema(); } }; } - private TableCombo<Table> buildTableCombo(Composite container) { + private TableCombo<Table> addTableCombo(Composite container) { return new TableCombo<Table>(this, container) { @@ -164,28 +164,28 @@ public class TableComposite extends AbstractFormPane<Table> } @Override - protected String defaultValue() { - return subject().getDefaultName(); + protected String getDefaultValue() { + return getSubject().getDefaultName(); } @Override - protected String schemaName() { - return subject().getSchema(); + protected String getSchemaName() { + return getSubject().getSchema(); } @Override protected void setValue(String value) { - subject().setSpecifiedName(value); + getSubject().setSpecifiedName(value); } @Override - protected org.eclipse.jpt.db.Table table() { - return subject().getDbTable(); + protected org.eclipse.jpt.db.Table getDbTable() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedName(); + protected String getValue() { + return getSubject().getSpecifiedName(); } }; } @@ -197,32 +197,32 @@ public class TableComposite extends AbstractFormPane<Table> protected void initializeLayout(Composite container) { // Table group pane - Group tableGroupPane = buildTitledPane( + Group tableGroupPane = addTitledGroup( container, JptUiMappingsMessages.TableComposite_tableSection ); // Table widgets - buildLabeledComposite( + addLabeledComposite( tableGroupPane, JptUiMappingsMessages.TableChooser_label, - buildTableCombo(tableGroupPane), + addTableCombo(tableGroupPane), JpaHelpContextIds.ENTITY_TABLE ); // Catalog widgets - buildLabeledComposite( + addLabeledComposite( tableGroupPane, JptUiMappingsMessages.CatalogChooser_label, - buildCatalogCombo(tableGroupPane), + addCatalogCombo(tableGroupPane), JpaHelpContextIds.ENTITY_CATALOG ); // Schema widgets - buildLabeledComposite( + addLabeledComposite( tableGroupPane, JptUiMappingsMessages.SchemaChooser_label, - buildSchemaCombo(tableGroupPane), + addSchemaCombo(tableGroupPane), JpaHelpContextIds.ENTITY_SCHEMA ); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java index d73e4ba544..0c7f589a85 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java @@ -20,7 +20,7 @@ import org.eclipse.jpt.ui.internal.mappings.db.CatalogCombo; import org.eclipse.jpt.ui.internal.mappings.db.ColumnCombo; import org.eclipse.jpt.ui.internal.mappings.db.SchemaCombo; import org.eclipse.jpt.ui.internal.mappings.db.TableCombo; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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.swt.widgets.Composite; @@ -77,13 +77,13 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> * @param parentPane The parent container of this one * @param parent The parent container */ - public TableGeneratorComposite(AbstractPane<? extends GeneratorHolder> parentPane, + public TableGeneratorComposite(Pane<? extends GeneratorHolder> parentPane, Composite parent) { super(parentPane, parent); } - private CatalogCombo<TableGenerator> buildCatalogCombo(Composite container) { + private CatalogCombo<TableGenerator> addCatalogCombo(Composite container) { return new CatalogCombo<TableGenerator>(this, buildTableGeneratorHolder(), container) { @@ -97,13 +97,13 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected void buildSubject() { TableGeneratorComposite.this.buildGenerator( - TableGeneratorComposite.this.subject() + TableGeneratorComposite.this.getSubject() ); } @Override - protected String defaultValue() { - return subject().getDefaultCatalog(); + protected String getDefaultValue() { + return getSubject().getDefaultCatalog(); } @Override @@ -112,18 +112,18 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> } @Override - protected JpaProject jpaProject() { - return TableGeneratorComposite.this.jpaProject(); + protected JpaProject getJpaProject() { + return TableGeneratorComposite.this.getJpaProject(); } @Override protected void setValue(String value) { - subject().setSpecifiedCatalog(value); + getSubject().setSpecifiedCatalog(value); } @Override - protected String value() { - return subject().getSpecifiedCatalog(); + protected String getValue() { + return getSubject().getSpecifiedCatalog(); } }; } @@ -136,7 +136,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> return subject.addTableGenerator(); } - private ColumnCombo<TableGenerator> buildPkColumnNameCombo(Composite parent) { + private ColumnCombo<TableGenerator> addPkColumnNameCombo(Composite parent) { return new ColumnCombo<TableGenerator>(this, buildTableGeneratorHolder(), parent) { @@ -150,13 +150,13 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected void buildSubject() { TableGeneratorComposite.this.buildGenerator( - TableGeneratorComposite.this.subject() + TableGeneratorComposite.this.getSubject() ); } @Override - protected String defaultValue() { - return subject().getDefaultPkColumnName(); + protected String getDefaultValue() { + return getSubject().getDefaultPkColumnName(); } @Override @@ -165,28 +165,28 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> } @Override - protected JpaProject jpaProject() { - return TableGeneratorComposite.this.jpaProject(); + protected JpaProject getJpaProject() { + return TableGeneratorComposite.this.getJpaProject(); } @Override protected void setValue(String value) { - subject().setSpecifiedPkColumnName(value); + getSubject().setSpecifiedPkColumnName(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedPkColumnName(); + protected String getValue() { + return getSubject().getSpecifiedPkColumnName(); } }; } - private ColumnCombo<TableGenerator> buildPkColumnValueCombo(Composite parent) { + private ColumnCombo<TableGenerator> addPkColumnValueCombo(Composite parent) { return new ColumnCombo<TableGenerator>(this, buildTableGeneratorHolder(), parent) { @@ -200,13 +200,13 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected void buildSubject() { TableGeneratorComposite.this.buildGenerator( - TableGeneratorComposite.this.subject() + TableGeneratorComposite.this.getSubject() ); } @Override - protected String defaultValue() { - return subject().getDefaultPkColumnValue(); + protected String getDefaultValue() { + return getSubject().getDefaultPkColumnValue(); } @Override @@ -215,28 +215,28 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> } @Override - protected JpaProject jpaProject() { - return TableGeneratorComposite.this.jpaProject(); + protected JpaProject getJpaProject() { + return TableGeneratorComposite.this.getJpaProject(); } @Override protected void setValue(String value) { - subject().setSpecifiedPkColumnValue(value); + getSubject().setSpecifiedPkColumnValue(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedPkColumnValue(); + protected String getValue() { + return getSubject().getSpecifiedPkColumnValue(); } }; } - private SchemaCombo<TableGenerator> buildSchemaCombo(Composite container) { + private SchemaCombo<TableGenerator> addSchemaCombo(Composite container) { return new SchemaCombo<TableGenerator>(this, buildTableGeneratorHolder(), container) { @@ -250,13 +250,13 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected void buildSubject() { TableGeneratorComposite.this.buildGenerator( - TableGeneratorComposite.this.subject() + TableGeneratorComposite.this.getSubject() ); } @Override - protected String defaultValue() { - return subject().getDefaultSchema(); + protected String getDefaultValue() { + return getSubject().getDefaultSchema(); } @Override @@ -265,18 +265,18 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> } @Override - protected JpaProject jpaProject() { - return TableGeneratorComposite.this.jpaProject(); + protected JpaProject getJpaProject() { + return TableGeneratorComposite.this.getJpaProject(); } @Override protected void setValue(String value) { - subject().setSpecifiedSchema(value); + getSubject().setSpecifiedSchema(value); } @Override - protected String value() { - return subject().getSpecifiedSchema(); + protected String getValue() { + return getSubject().getSpecifiedSchema(); } }; } @@ -290,7 +290,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> }; } - private TableCombo<TableGenerator> buildTableNameCombo(Composite parent) { + private TableCombo<TableGenerator> addTableNameCombo(Composite parent) { return new TableCombo<TableGenerator>(this, buildTableGeneratorHolder(), parent) { @@ -319,13 +319,13 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected void buildSubject() { TableGeneratorComposite.this.buildGenerator( - TableGeneratorComposite.this.subject() + TableGeneratorComposite.this.getSubject() ); } @Override - protected String defaultValue() { - return subject().getDefaultTable(); + protected String getDefaultValue() { + return getSubject().getDefaultTable(); } @Override @@ -334,39 +334,39 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> } @Override - protected JpaProject jpaProject() { - return TableGeneratorComposite.this.jpaProject(); + protected JpaProject getJpaProject() { + return TableGeneratorComposite.this.getJpaProject(); } @Override - protected String schemaName() { - if (subject() != null) { - return subject().getSchema(); + protected String getSchemaName() { + if (getSubject() != null) { + return getSubject().getSchema(); } - if (TableGeneratorComposite.this.subject().getEntityMappings() != null) { - return TableGeneratorComposite.this.subject().getEntityMappings().getSchema(); + if (TableGeneratorComposite.this.getSubject().getEntityMappings() != null) { + return TableGeneratorComposite.this.getSubject().getEntityMappings().getSchema(); } - return TableGeneratorComposite.this.subject().getPersistenceUnit().getDefaultSchema(); + return TableGeneratorComposite.this.getSubject().getPersistenceUnit().getDefaultSchema(); } @Override protected void setValue(String value) { - subject().setSpecifiedTable(value); + getSubject().setSpecifiedTable(value); } @Override - protected Table table() { - return subject().getDbTable(); + protected Table getDbTable() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedTable(); + protected String getValue() { + return getSubject().getSpecifiedTable(); } }; } - private ColumnCombo<TableGenerator> buildValueColumnCombo(Composite parent) { + private ColumnCombo<TableGenerator> addValueColumnCombo(Composite parent) { return new ColumnCombo<TableGenerator>(this, buildTableGeneratorHolder(), parent) { @@ -380,13 +380,13 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected void buildSubject() { TableGeneratorComposite.this.buildGenerator( - TableGeneratorComposite.this.subject() + TableGeneratorComposite.this.getSubject() ); } @Override - protected String defaultValue() { - return subject().getDefaultValueColumnName(); + protected String getDefaultValue() { + return getSubject().getDefaultValueColumnName(); } @Override @@ -395,23 +395,23 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> } @Override - protected JpaProject jpaProject() { - return TableGeneratorComposite.this.jpaProject(); + protected JpaProject getJpaProject() { + return TableGeneratorComposite.this.getJpaProject(); } @Override protected void setValue(String value) { - subject().setSpecifiedValueColumnName(value); + getSubject().setSpecifiedValueColumnName(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedValueColumnName(); + protected String getValue() { + return getSubject().getSpecifiedValueColumnName(); } }; } @@ -420,7 +420,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> * (non-Javadoc) */ @Override - protected TableGenerator generator(GeneratorHolder subject) { + protected TableGenerator getGenerator(GeneratorHolder subject) { return (subject != null) ? subject.getTableGenerator() : null; } @@ -431,7 +431,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> protected void initializeLayout(Composite container) { // Name widgets - buildLabeledText( + addLabeledText( container, JptUiMappingsMessages.TableGeneratorComposite_name, buildGeneratorNameHolder(), @@ -439,50 +439,50 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> ); // Table widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.TableGeneratorComposite_table, - buildTableNameCombo(container), + addTableNameCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_TABLE ); // Schema widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.TableGeneratorComposite_schema, - buildSchemaCombo(container), + addSchemaCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_SCHEMA ); // Catalog widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.TableGeneratorComposite_catalog, - buildCatalogCombo(container), + addCatalogCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_CATALOG ); // Primary Key Column widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.TableGeneratorComposite_pkColumn, - buildPkColumnNameCombo(container), + addPkColumnNameCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_PRIMARY_KEY_COLUMN ); // Value Column widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.TableGeneratorComposite_valueColumn, - buildValueColumnCombo(container), + addValueColumnCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_VALUE_COLUMN ); // Primary Key Column Value widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiMappingsMessages.TableGeneratorComposite_pkColumnValue, - buildPkColumnValueCombo(container), + addPkColumnValueCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_PRIMARY_KEY_COLUMN_VALUE ); @@ -497,7 +497,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> * (non-Javadoc) */ @Override - protected String propertyName() { + protected String getPropertyName() { return GeneratorHolder.TABLE_GENERATOR_PROPERTY; } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TargetEntityComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TargetEntityComposite.java index d4f03d87e0..6b55f52ba9 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TargetEntityComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TargetEntityComposite.java @@ -23,7 +23,7 @@ import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.StringTools; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.osgi.util.NLS; @@ -58,7 +58,7 @@ import org.eclipse.ui.forms.widgets.Hyperlink; * @since 1.0 */ @SuppressWarnings("nls") -public class TargetEntityComposite extends AbstractFormPane<RelationshipMapping> +public class TargetEntityComposite extends FormPane<RelationshipMapping> { private CCombo combo; @@ -68,7 +68,7 @@ public class TargetEntityComposite extends AbstractFormPane<RelationshipMapping> * @param parentPane The parent container of this one * @param parent The parent container */ - public TargetEntityComposite(AbstractFormPane<? extends RelationshipMapping> parentPane, + public TargetEntityComposite(FormPane<? extends RelationshipMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -131,8 +131,8 @@ public class TargetEntityComposite extends AbstractFormPane<RelationshipMapping> }; } - private Button buildTargetEntitySelectionButton(Composite parent) { - return buildPushButton( + private Button addTargetEntitySelectionButton(Composite parent) { + return addPushButton( parent, JptUiMappingsMessages.TargetEntityChooser_browse, buildOpenTypeAction() @@ -180,34 +180,34 @@ public class TargetEntityComposite extends AbstractFormPane<RelationshipMapping> @Override protected void initializeLayout(Composite container) { - combo = buildEditableCCombo(container); + combo = addEditableCCombo(container); combo.add(JptUiMappingsMessages.TargetEntityChooser_defaultEmpty); combo.addModifyListener(buildTargetEntityModifyListener()); SWTUtil.attachDefaultValueHandler(combo); - Hyperlink labelLink = buildHyperLink(container, + Hyperlink labelLink = addHyperlink(container, JptUiMappingsMessages.TargetEntityChooser_label, buildOpenTargetEntityAction() ); - buildLabeledComposite( + addLabeledComposite( container, labelLink, combo, - buildTargetEntitySelectionButton(container), + addTargetEntitySelectionButton(container), JpaHelpContextIds.MAPPING_TARGET_ENTITY ); } private void openEditor() { - String targetEntity = subject().getTargetEntity(); + String targetEntity = getSubject().getTargetEntity(); if (targetEntity != null) { try { - IType type = subject().getJpaProject().getJavaProject().findType(targetEntity); + IType type = getSubject().getJpaProject().getJavaProject().findType(targetEntity); if (type != null) { IJavaElement javaElement = type.getParent(); @@ -236,7 +236,7 @@ public class TargetEntityComposite extends AbstractFormPane<RelationshipMapping> */ private void populateDefaultValue() { - RelationshipMapping entity = subject(); + RelationshipMapping entity = getSubject(); String defaultValue = (entity != null) ? entity.getDefaultTargetEntity() : null; if (defaultValue != null) { @@ -273,7 +273,7 @@ public class TargetEntityComposite extends AbstractFormPane<RelationshipMapping> * selection to (0, 0) makes the entire text visible. */ private void updateSelectedItem() { - RelationshipMapping subject = subject(); + RelationshipMapping subject = getSubject(); String value = (subject != null) ? subject.getSpecifiedTargetEntity() : null; if (value != null) { @@ -305,7 +305,7 @@ public class TargetEntityComposite extends AbstractFormPane<RelationshipMapping> private void valueChanged(String value) { - RelationshipMapping subject = subject(); + RelationshipMapping subject = getSubject(); String oldValue = (subject != null) ? subject.getSpecifiedTargetEntity() : null; // Check for null value diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TemporalTypeComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TemporalTypeComposite.java index 7ef3e0e58a..e11fc82065 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TemporalTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TemporalTypeComposite.java @@ -18,7 +18,7 @@ import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.JptUiMessages; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.StringConverter; import org.eclipse.jpt.utility.internal.model.value.ExtendedListValueModelWrapper; @@ -46,7 +46,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class TemporalTypeComposite extends AbstractFormPane<ColumnMapping> { +public class TemporalTypeComposite extends FormPane<ColumnMapping> { /** * Creates a new <code>TemporalTypeComposite</code>. @@ -54,7 +54,7 @@ public class TemporalTypeComposite extends AbstractFormPane<ColumnMapping> { * @param parentPane The parent container of this one * @param parent The parent container */ - public TemporalTypeComposite(AbstractFormPane<? extends ColumnMapping> parentPane, + public TemporalTypeComposite(FormPane<? extends ColumnMapping> parentPane, Composite parent) { super(parentPane, parent); @@ -122,7 +122,7 @@ public class TemporalTypeComposite extends AbstractFormPane<ColumnMapping> { @Override protected void initializeLayout(Composite container) { - buildLabeledCCombo( + addLabeledCCombo( container, JptUiMappingsMessages.BasicGeneralSection_temporalLabel, buildTemporalTypeListHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TransientMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TransientMappingComposite.java index fa4206cd4d..97b0a68c2e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TransientMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TransientMappingComposite.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.ui.internal.mappings.details; import org.eclipse.jpt.core.context.TransientMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class TransientMappingComposite extends AbstractFormPane<TransientMapping> +public class TransientMappingComposite extends FormPane<TransientMapping> implements JpaComposite { /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/VersionMappingComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/VersionMappingComposite.java index 6748e46cd3..be3a77cb8e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/VersionMappingComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/VersionMappingComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.Column; import org.eclipse.jpt.core.context.VersionMapping; import org.eclipse.jpt.ui.WidgetFactory; import org.eclipse.jpt.ui.details.JpaComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -42,7 +42,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class VersionMappingComposite extends AbstractFormPane<VersionMapping> +public class VersionMappingComposite extends FormPane<VersionMapping> implements JpaComposite { /** @@ -74,7 +74,7 @@ public class VersionMappingComposite extends AbstractFormPane<VersionMapping> @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); // Column widgets new ColumnComposite(this, buildColumnHolder(), container); @@ -82,7 +82,7 @@ public class VersionMappingComposite extends AbstractFormPane<VersionMapping> // Temporal Type widgets new TemporalTypeComposite( this, - buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin) + addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin) ); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/navigator/JpaNavigatorProviderLookup.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/navigator/JpaNavigatorProviderLookup.java index 879a024c0a..3cdc3cdf01 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/navigator/JpaNavigatorProviderLookup.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/navigator/JpaNavigatorProviderLookup.java @@ -32,7 +32,7 @@ public class JpaNavigatorProviderLookup if (providers.containsKey(platformId)) { return providers.get(platformId); } - JpaPlatformUi platform = JpaPlatformUiRegistry.instance().jpaPlatform(platformId); + JpaPlatformUi platform = JpaPlatformUiRegistry.instance().getJpaPlatformUi(platformId); if (platform == null) { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/AccessTypeComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/AccessTypeComposite.java index 0844be523f..150de5abd5 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/AccessTypeComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/AccessTypeComposite.java @@ -13,7 +13,7 @@ import java.util.Collection; import org.eclipse.jpt.core.context.AccessType; import org.eclipse.jpt.core.context.orm.OrmTypeMapping; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class AccessTypeComposite extends AbstractFormPane<OrmTypeMapping> { +public class AccessTypeComposite extends FormPane<OrmTypeMapping> { /** * Creates a new <code>AccessTypeComposite</code>. @@ -42,14 +42,14 @@ public class AccessTypeComposite extends AbstractFormPane<OrmTypeMapping> { * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public AccessTypeComposite(AbstractFormPane<?> parentPane, + public AccessTypeComposite(FormPane<?> parentPane, PropertyValueModel<? extends OrmTypeMapping> subjectHolder, Composite parent) { super(parentPane, subjectHolder, parent); } - private EnumFormComboViewer<OrmTypeMapping, AccessType> buildAccessTypeComboViewer(Composite container) { + private EnumFormComboViewer<OrmTypeMapping, AccessType> addAccessTypeComboViewer(Composite container) { return new EnumFormComboViewer<OrmTypeMapping, AccessType>(this, container) { @@ -61,13 +61,13 @@ public class AccessTypeComposite extends AbstractFormPane<OrmTypeMapping> { } @Override - protected AccessType[] choices() { + protected AccessType[] getChoices() { return AccessType.values(); } @Override - protected AccessType defaultValue() { - return subject().getDefaultAccess(); + protected AccessType getDefaultValue() { + return getSubject().getDefaultAccess(); } @Override @@ -81,12 +81,12 @@ public class AccessTypeComposite extends AbstractFormPane<OrmTypeMapping> { @Override protected AccessType getValue() { - return subject().getSpecifiedAccess(); + return getSubject().getSpecifiedAccess(); } @Override protected void setValue(AccessType value) { - subject().setSpecifiedAccess(value); + getSubject().setSpecifiedAccess(value); } }; } @@ -98,9 +98,9 @@ public class AccessTypeComposite extends AbstractFormPane<OrmTypeMapping> { protected void initializeLayout(Composite container) { EnumFormComboViewer<OrmTypeMapping, AccessType> comboViewer = - buildAccessTypeComboViewer(container); + addAccessTypeComboViewer(container); - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.AccessTypeComposite_access, comboViewer.getControl() diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/EntityMappingsDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/EntityMappingsDetailsPage.java index 9f91caa1c0..15b9ab4eff 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/EntityMappingsDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/EntityMappingsDetailsPage.java @@ -87,7 +87,7 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp super(parent, widgetFactory); } - private EnumFormComboViewer<EntityMappings, AccessType> buildAccessTypeCombo(Composite container) { + private EnumFormComboViewer<EntityMappings, AccessType> addAccessTypeCombo(Composite container) { return new EnumFormComboViewer<EntityMappings, AccessType>(this, container) { @@ -99,13 +99,13 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp } @Override - protected AccessType[] choices() { + protected AccessType[] getChoices() { return AccessType.values(); } @Override - protected AccessType defaultValue() { - return subject().getDefaultAccess(); + protected AccessType getDefaultValue() { + return getSubject().getDefaultAccess(); } @Override @@ -119,17 +119,17 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp @Override protected AccessType getValue() { - return subject().getAccess(); + return getSubject().getAccess(); } @Override protected void setValue(AccessType value) { - subject().setSpecifiedAccess(value); + getSubject().setSpecifiedAccess(value); } }; } - private CatalogCombo<EntityMappings> buildCatalogCombo(Composite container) { + private CatalogCombo<EntityMappings> addCatalogCombo(Composite container) { return new CatalogCombo<EntityMappings>(this, container) { @@ -141,18 +141,18 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp } @Override - protected String defaultValue() { - return subject().getDefaultCatalog(); + protected String getDefaultValue() { + return getSubject().getDefaultCatalog(); } @Override protected void setValue(String value) { - subject().setSpecifiedCatalog(value); + getSubject().setSpecifiedCatalog(value); } @Override - protected String value() { - return subject().getSpecifiedCatalog(); + protected String getValue() { + return getSubject().getSpecifiedCatalog(); } }; } @@ -166,7 +166,7 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp }; } - private SchemaCombo<EntityMappings> buildSchemaCombo(Composite container) { + private SchemaCombo<EntityMappings> addSchemaCombo(Composite container) { return new SchemaCombo<EntityMappings>(this, container) { @@ -178,18 +178,18 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp } @Override - protected String defaultValue() { - return subject().getDefaultSchema(); + protected String getDefaultValue() { + return getSubject().getDefaultSchema(); } @Override protected void setValue(String value) { - subject().setSpecifiedSchema(value); + getSubject().setSpecifiedSchema(value); } @Override - protected String value() { - return subject().getSpecifiedSchema(); + protected String getValue() { + return getSubject().getSpecifiedSchema(); } }; } @@ -204,26 +204,26 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp new OrmPackageChooser(this, container); // Schema widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.EntityMappingsDetailsPage_schema, - buildSchemaCombo(container), + addSchemaCombo(container), JpaHelpContextIds.ENTITY_ORM_SCHEMA ); // Catalog widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.EntityMappingsDetailsPage_catalog, - buildCatalogCombo(container), + addCatalogCombo(container), JpaHelpContextIds.ENTITY_ORM_CATALOG ); // Access Type widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.EntityMappingsDetailsPage_access, - buildAccessTypeCombo(container), + addAccessTypeCombo(container), JpaHelpContextIds.ENTITY_ORM_ACCESS ); @@ -231,19 +231,19 @@ public class EntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMapp new PersistenceUnitMetadataComposite( this, buildPersistentUnitMetadaHolder(), - buildSubPane(container, 5) + addSubPane(container, 5) ); // Generators pane new OrmGeneratorsComposite( this, - buildSubPane(container, 5) + addSubPane(container, 5) ); // Queries pane new OrmQueriesComposite( this, - buildSubPane(container, 5) + addSubPane(container, 5) ); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmEntityComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmEntityComposite.java index 804df18739..ce98add623 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmEntityComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmEntityComposite.java @@ -42,12 +42,12 @@ public class OrmEntityComposite extends AbstractEntityComposite<OrmEntity> } @Override - protected void buildSecondaryTablesComposite(Composite container) { + protected void addSecondaryTablesComposite(Composite container) { new OrmSecondaryTablesComposite(this, container); } @Override - protected void buildInheritanceComposite(Composite container) { + protected void addInheritanceComposite(Composite container) { new OrmInheritanceComposite(this, container); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmGeneratorsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmGeneratorsComposite.java index f0aa440737..a97b5ae8ee 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmGeneratorsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmGeneratorsComposite.java @@ -23,7 +23,7 @@ import org.eclipse.jpt.core.context.orm.OrmTableGenerator; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; import org.eclipse.jpt.ui.internal.util.ControlSwitcher; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.NewNameDialog; import org.eclipse.jpt.ui.internal.widgets.NewNameDialogBuilder; @@ -78,7 +78,7 @@ import org.eclipse.ui.part.PageBook; * @version 2.0 * @since 2.0 */ -public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> +public class OrmGeneratorsComposite extends Pane<EntityMappings> { private WritablePropertyValueModel<OrmGenerator> generatorHolder; private OrmSequenceGeneratorComposite sequenceGeneratorPane; @@ -91,7 +91,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> * @param parentPane The parent container of this one * @param parent The parent container */ - public OrmGeneratorsComposite(AbstractPane<? extends EntityMappings> parentPane, + public OrmGeneratorsComposite(Pane<? extends EntityMappings> parentPane, Composite parent) { super(parentPane, parent); @@ -99,7 +99,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> private void addSequenceGenerator(ObjectListSelectionModel listSelectionModel) { - NewNameDialogBuilder builder = new NewNameDialogBuilder(shell()); + NewNameDialogBuilder builder = new NewNameDialogBuilder(getShell()); builder.setDialogTitle(JptUiOrmMessages.OrmGeneratorsComposite_addSequenceGeneratorTitle); builder.setDescription(JptUiOrmMessages.OrmGeneratorsComposite_addSequenceGeneratorDescription); builder.setDescriptionTitle(JptUiOrmMessages.OrmGeneratorsComposite_addSequenceGeneratorDescriptionTitle); @@ -112,7 +112,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> private void addTableGenerator(ObjectListSelectionModel listSelectionModel) { - NewNameDialogBuilder builder = new NewNameDialogBuilder(shell()); + NewNameDialogBuilder builder = new NewNameDialogBuilder(getShell()); builder.setDialogTitle(JptUiOrmMessages.OrmGeneratorsComposite_addTableGeneratorTitle); builder.setDescription(JptUiOrmMessages.OrmGeneratorsComposite_addTableGeneratorDescription); builder.setDescriptionTitle(JptUiOrmMessages.OrmGeneratorsComposite_addTableGeneratorDescriptionTitle); @@ -172,10 +172,10 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { for (Object item : listSelectionModel.selectedValues()) { if (item instanceof OrmSequenceGenerator) { - subject().removeSequenceGenerator((OrmSequenceGenerator) item); + getSubject().removeSequenceGenerator((OrmSequenceGenerator) item); } else { - subject().removeTableGenerator((OrmTableGenerator) item); + getSubject().removeTableGenerator((OrmTableGenerator) item); } } } @@ -197,10 +197,10 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> int index = -1; if (generator instanceof OrmSequenceGenerator) { - index = CollectionTools.indexOf(subject().sequenceGenerators(), generator); + index = CollectionTools.indexOf(getSubject().sequenceGenerators(), generator); } else { - index = CollectionTools.indexOf(subject().tableGenerators(), generator); + index = CollectionTools.indexOf(getSubject().tableGenerators(), generator); } name = NLS.bind(JptUiOrmMessages.OrmGeneratorsComposite_displayString, index); @@ -222,7 +222,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> return new PostExecution<NewNameDialog>() { public void execute(NewNameDialog dialog) { if (dialog.wasConfirmed()) { - OrmSequenceGenerator generator = subject().addSequenceGenerator(subject().sequenceGeneratorsSize()); + OrmSequenceGenerator generator = getSubject().addSequenceGenerator(getSubject().sequenceGeneratorsSize()); generator.setName(dialog.getName()); generatorHolder.setValue(generator); listSelectionModel.setSelectedValue(generator); @@ -243,7 +243,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> return new PostExecution<NewNameDialog>() { public void execute(NewNameDialog dialog) { if (dialog.wasConfirmed()) { - OrmTableGenerator generator = subject().addTableGenerator(subject().tableGeneratorsSize()); + OrmTableGenerator generator = getSubject().addTableGenerator(getSubject().tableGeneratorsSize()); generator.setName(dialog.getName()); generatorHolder.setValue(generator); listSelectionModel.setSelectedValue(generator); @@ -334,7 +334,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> OrmGenerator generator = generatorHolder.getValue(); - NewNameDialogBuilder builder = new NewNameDialogBuilder(shell()); + NewNameDialogBuilder builder = new NewNameDialogBuilder(getShell()); builder.setLabelText(JptUiOrmMessages.OrmGeneratorsComposite_label); builder.setName(generator.getName()); @@ -370,13 +370,13 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> @Override protected void initializeLayout(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiOrmMessages.OrmGeneratorsComposite_groupBox ); // List pane - listPane = buildListPane(container); + listPane = addListPane(container); installPaneEnabler(); // Property pane @@ -407,7 +407,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> installPaneSwitcher(pageBook); } - private AddRemoveListPane<EntityMappings> buildListPane(Composite container) { + private AddRemoveListPane<EntityMappings> addListPane(Composite container) { return new AddRemoveListPane<EntityMappings>( this, @@ -422,7 +422,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> protected void addCustomButtonAfterAddButton(Composite container, String helpId) { - Button button = buildButton( + Button button = addButton( container, JptUiOrmMessages.OrmGeneratorsComposite_addTableGenerator, helpId, @@ -446,7 +446,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> } private Iterator<String> sequenceGeneratorNames() { - return new TransformationIterator<OrmSequenceGenerator, String>(subject().sequenceGenerators()) { + return new TransformationIterator<OrmSequenceGenerator, String>(getSubject().sequenceGenerators()) { @Override protected String transform(OrmSequenceGenerator next) { return next.getName(); @@ -455,7 +455,7 @@ public class OrmGeneratorsComposite extends AbstractPane<EntityMappings> } private Iterator<String> tableGeneratorNames() { - return new TransformationIterator<OrmTableGenerator, String>(subject().tableGenerators()) { + return new TransformationIterator<OrmTableGenerator, String>(getSubject().tableGenerators()) { @Override protected String transform(OrmTableGenerator next) { return next.getName(); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmInheritanceComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmInheritanceComposite.java index 292a29943b..f4e69b690b 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmInheritanceComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmInheritanceComposite.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.orm.details; import org.eclipse.jpt.core.context.orm.OrmEntity; import org.eclipse.jpt.ui.internal.mappings.details.AbstractInheritanceComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** @@ -31,14 +31,14 @@ public class OrmInheritanceComposite extends AbstractInheritanceComposite<OrmEnt * @param parentPane The parent container of this one * @param parent The parent container */ - public OrmInheritanceComposite(AbstractPane<OrmEntity> parentPane, + public OrmInheritanceComposite(Pane<OrmEntity> parentPane, Composite parent) { super(parentPane, parent); } @Override - protected void buildPrimaryKeyJoinColumnsComposite(Composite container) { + protected void addPrimaryKeyJoinColumnsComposite(Composite container) { new OrmPrimaryKeyJoinColumnsComposite(this, container); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaAttributeChooser.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaAttributeChooser.java index 724b32a756..d5771ae0a9 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaAttributeChooser.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaAttributeChooser.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.orm.details; import org.eclipse.jpt.core.context.orm.OrmAttributeMapping; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.Text; * @version 2.0 * @since 1.0 */ -public class OrmJavaAttributeChooser extends AbstractFormPane<OrmAttributeMapping> +public class OrmJavaAttributeChooser extends FormPane<OrmAttributeMapping> { private Text text; @@ -35,7 +35,7 @@ public class OrmJavaAttributeChooser extends AbstractFormPane<OrmAttributeMappin * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public OrmJavaAttributeChooser(AbstractFormPane<?> parentPane, + public OrmJavaAttributeChooser(FormPane<?> parentPane, PropertyValueModel<OrmAttributeMapping> subjectHolder, Composite parent) { @@ -80,7 +80,7 @@ public class OrmJavaAttributeChooser extends AbstractFormPane<OrmAttributeMappin @Override protected void initializeLayout(Composite container) { - text = buildLabeledText( + text = addLabeledText( container, JptUiOrmMessages.OrmJavaAttributeChooser_javaAttribute, buildNameHolder() diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaClassChooser.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaClassChooser.java index 44dec7dcef..842ba00721 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaClassChooser.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmJavaClassChooser.java @@ -18,7 +18,7 @@ import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jpt.core.context.orm.OrmTypeMapping; import org.eclipse.jpt.ui.JptUiPlugin; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.ClassChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.PropertyValueModel; @@ -47,7 +47,7 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory; * @version 2.0 * @since 1.0 */ -public class OrmJavaClassChooser extends AbstractFormPane<OrmTypeMapping> { +public class OrmJavaClassChooser extends FormPane<OrmTypeMapping> { /** * Creates a new <code>XmlJavaClassChooser</code>. @@ -56,7 +56,7 @@ public class OrmJavaClassChooser extends AbstractFormPane<OrmTypeMapping> { * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public OrmJavaClassChooser(AbstractFormPane<?> parentPane, + public OrmJavaClassChooser(FormPane<?> parentPane, PropertyValueModel<? extends OrmTypeMapping> subjectHolder, Composite parent) { @@ -77,7 +77,7 @@ public class OrmJavaClassChooser extends AbstractFormPane<OrmTypeMapping> { super(subjectHolder, parent, widgetFactory); } - private ClassChooserPane<OrmTypeMapping> initializeClassChooser(Composite container) { + private ClassChooserPane<OrmTypeMapping> addClassChooser(Composite container) { return new ClassChooserPane<OrmTypeMapping>(this, container) { @@ -97,18 +97,18 @@ public class OrmJavaClassChooser extends AbstractFormPane<OrmTypeMapping> { } @Override - protected String className() { - return subject().getClass_(); + protected String getClassName() { + return getSubject().getClass_(); } @Override - protected String labelText() { + protected String getLabelText() { return JptUiOrmMessages.OrmJavaClassChooser_javaClass; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -127,7 +127,7 @@ public class OrmJavaClassChooser extends AbstractFormPane<OrmTypeMapping> { if (type != null) { String className = type.getFullyQualifiedName('.'); - subject().setClass(className); + getSubject().setClass(className); } } }; @@ -138,6 +138,6 @@ public class OrmJavaClassChooser extends AbstractFormPane<OrmTypeMapping> { */ @Override protected void initializeLayout(Composite container) { - initializeClassChooser(container); + addClassChooser(container); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPackageChooser.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPackageChooser.java index a5b555e3ab..690abe2f21 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPackageChooser.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPackageChooser.java @@ -18,7 +18,7 @@ import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jpt.core.context.orm.EntityMappings; import org.eclipse.jpt.ui.JptUiPlugin; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.PackageChooserPane; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel; @@ -40,7 +40,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class OrmPackageChooser extends AbstractFormPane<EntityMappings> +public class OrmPackageChooser extends FormPane<EntityMappings> { /** * Creates a new <code>XmlPackageChooser</code>. @@ -48,7 +48,7 @@ public class OrmPackageChooser extends AbstractFormPane<EntityMappings> * @param parentPane The parent controller of this one * @param parent The parent container */ - public OrmPackageChooser(AbstractFormPane<? extends EntityMappings> parentPane, + public OrmPackageChooser(FormPane<? extends EntityMappings> parentPane, Composite parent) { super(parentPane, parent); @@ -60,10 +60,10 @@ public class OrmPackageChooser extends AbstractFormPane<EntityMappings> @Override protected void initializeLayout(Composite container) { - initializePackageChooserPane(container); + addPackageChooserPane(container); } - private void initializePackageChooserPane(Composite container) { + private void addPackageChooserPane(Composite container) { new PackageChooserPane<EntityMappings>(this, container) { @Override @@ -82,13 +82,13 @@ public class OrmPackageChooser extends AbstractFormPane<EntityMappings> } @Override - protected String labelText() { + protected String getLabelText() { return JptUiOrmMessages.EntityMappingsDetailsPage_package; } @Override - protected IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + protected IPackageFragmentRoot getPackageFragmentRoot() { + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { @@ -102,8 +102,8 @@ public class OrmPackageChooser extends AbstractFormPane<EntityMappings> } @Override - protected String packageName() { - return subject().getPackage(); + protected String getPackageName() { + return getSubject().getPackage(); } @Override @@ -112,7 +112,7 @@ public class OrmPackageChooser extends AbstractFormPane<EntityMappings> if (packageFragment != null) { String packageName = packageFragment.getElementName(); - subject().setPackage(packageName); + getSubject().setPackage(packageName); } } }; diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentAttributeDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentAttributeDetailsPage.java index 9d072f5e95..7c22baa7f6 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentAttributeDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentAttributeDetailsPage.java @@ -21,7 +21,7 @@ import org.eclipse.jpt.ui.details.JpaComposite; import org.eclipse.jpt.ui.internal.details.PersistentAttributeDetailsPage; import org.eclipse.jpt.ui.internal.mappings.details.OrmPersistentAttributeMapAsComposite; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; @@ -128,12 +128,12 @@ public class OrmPersistentAttributeDetailsPage extends PersistentAttributeDetail @Override protected void initializeLayout(Composite container) { - ArrayList<AbstractPane<?>> panes = new ArrayList<AbstractPane<?>>(2); + ArrayList<Pane<?>> panes = new ArrayList<Pane<?>>(2); // Map As composite OrmPersistentAttributeMapAsComposite mapAsPane = new OrmPersistentAttributeMapAsComposite( this, - buildSubPane(container, 0, 0, 5, 0) + addSubPane(container, 0, 0, 5, 0) ); panes.add(mapAsPane); @@ -158,7 +158,7 @@ public class OrmPersistentAttributeDetailsPage extends PersistentAttributeDetail installPaneEnabler(panes); } - private void installPaneEnabler(ArrayList<AbstractPane<?>> panes) { + private void installPaneEnabler(ArrayList<Pane<?>> panes) { new PaneEnabler(buildPaneEnablerHolder(), panes); } @@ -172,8 +172,8 @@ public class OrmPersistentAttributeDetailsPage extends PersistentAttributeDetail } boolean enabled = false; - if (subject() != null && subject().getParent() != null) { - enabled = !subject().isVirtual(); + if (getSubject() != null && getSubject().getParent() != null) { + enabled = !getSubject().isVirtual(); } mappingComposite.enableWidgets(enabled); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentTypeDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentTypeDetailsPage.java index 1e9faf0bdf..acc987b861 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentTypeDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPersistentTypeDetailsPage.java @@ -129,9 +129,9 @@ public class OrmPersistentTypeDetailsPage extends PersistentTypeDetailsPage<OrmP @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - boolean defaultValue = subject().getMapping().isDefaultMetadataComplete(); + boolean defaultValue = getSubject().getMapping().isDefaultMetadataComplete(); String defaultStringValue = defaultValue ? JptUiOrmMessages.Boolean_True : JptUiOrmMessages.Boolean_False; @@ -155,7 +155,7 @@ public class OrmPersistentTypeDetailsPage extends PersistentTypeDetailsPage<OrmP // Type Mapping widgets new OrmPersistentTypeMapAsComposite( this, - buildSubPane(container, 0, 0, 5, 0) + addSubPane(container, 0, 0, 5, 0) ); // Java class widgets @@ -165,11 +165,12 @@ public class OrmPersistentTypeDetailsPage extends PersistentTypeDetailsPage<OrmP new AccessTypeComposite(this, buildMappingHolder(), container); // Metadata complete widgets - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiOrmMessages.OrmPersistentTypeDetailsPage_metadataComplete, buildMetadataCompleteHolder(), - buildMetadataCompleteStringHolder() + buildMetadataCompleteStringHolder(), + null ); // Type mapping pane diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPrimaryKeyJoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPrimaryKeyJoinColumnsComposite.java index 337a51aac8..240ef3e2cc 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPrimaryKeyJoinColumnsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmPrimaryKeyJoinColumnsComposite.java @@ -14,7 +14,7 @@ import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn; import org.eclipse.jpt.core.context.orm.OrmEntity; import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumn; import org.eclipse.jpt.ui.internal.mappings.details.AbstractPrimaryKeyJoinColumnsComposite; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; import org.eclipse.jpt.utility.model.value.ListValueModel; import org.eclipse.swt.widgets.Composite; @@ -35,7 +35,7 @@ public class OrmPrimaryKeyJoinColumnsComposite extends AbstractPrimaryKeyJoinCol * @param parentPane The parent controller of this one * @param parent The parent container */ - public OrmPrimaryKeyJoinColumnsComposite(AbstractPane<? extends OrmEntity> subjectHolder, + public OrmPrimaryKeyJoinColumnsComposite(Pane<? extends OrmEntity> subjectHolder, Composite parent) { super(subjectHolder, parent); @@ -61,7 +61,7 @@ public class OrmPrimaryKeyJoinColumnsComposite extends AbstractPrimaryKeyJoinCol @Override protected void switchDefaultToSpecified() { - ListIterator<OrmPrimaryKeyJoinColumn> defaultJoinColumns = subject().defaultPrimaryKeyJoinColumns(); + ListIterator<OrmPrimaryKeyJoinColumn> defaultJoinColumns = getSubject().defaultPrimaryKeyJoinColumns(); int index = 0; while (defaultJoinColumns.hasNext()) { @@ -69,7 +69,7 @@ public class OrmPrimaryKeyJoinColumnsComposite extends AbstractPrimaryKeyJoinCol String columnName = defaultJoinColumn.getName(); String referencedColumnName = defaultJoinColumn.getReferencedColumnName(); - PrimaryKeyJoinColumn pkJoinColumn = subject().addSpecifiedPrimaryKeyJoinColumn(index++); + PrimaryKeyJoinColumn pkJoinColumn = getSubject().addSpecifiedPrimaryKeyJoinColumn(index++); pkJoinColumn.setSpecifiedName(columnName); pkJoinColumn.setSpecifiedReferencedColumnName(referencedColumnName); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmQueriesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmQueriesComposite.java index b15e641cca..84d0f88a1e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmQueriesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmQueriesComposite.java @@ -13,7 +13,7 @@ import org.eclipse.jpt.core.context.orm.EntityMappings; import org.eclipse.jpt.ui.internal.mappings.details.QueriesComposite; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; @@ -36,7 +36,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class OrmQueriesComposite extends AbstractPane<EntityMappings> { +public class OrmQueriesComposite extends Pane<EntityMappings> { /** * Creates a new <code>OrmQueriesComposite</code>. @@ -44,7 +44,7 @@ public class OrmQueriesComposite extends AbstractPane<EntityMappings> { * @param parentPane The parent container of this one * @param parent The parent container */ - public OrmQueriesComposite(AbstractPane<? extends EntityMappings> parentPane, + public OrmQueriesComposite(Pane<? extends EntityMappings> parentPane, Composite parent) { super(parentPane, parent); @@ -65,7 +65,7 @@ public class OrmQueriesComposite extends AbstractPane<EntityMappings> { @Override protected void initializeLayout(Composite container) { - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiOrmMessages.OrmQueriesComposite_groupBox ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSecondaryTablesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSecondaryTablesComposite.java index 2a69d5928f..52534dc2d0 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSecondaryTablesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSecondaryTablesComposite.java @@ -23,7 +23,7 @@ import org.eclipse.jpt.ui.internal.mappings.details.AbstractSecondaryTablesCompo import org.eclipse.jpt.ui.internal.mappings.details.PrimaryKeyJoinColumnsInSecondaryTableComposite; import org.eclipse.jpt.ui.internal.mappings.details.SecondaryTableDialog; import org.eclipse.jpt.ui.internal.util.PaneEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.utility.internal.model.value.CompositeListValueModel; import org.eclipse.jpt.utility.internal.model.value.ItemPropertyListValueModelAdapter; @@ -67,7 +67,7 @@ public class OrmSecondaryTablesComposite extends AbstractSecondaryTablesComposit * @param parentPane The parent container of this one * @param parent The parent container */ - public OrmSecondaryTablesComposite(AbstractFormPane<? extends OrmEntity> parentPane, + public OrmSecondaryTablesComposite(FormPane<? extends OrmEntity> parentPane, Composite parent) { super(parentPane, parent); @@ -134,7 +134,7 @@ public class OrmSecondaryTablesComposite extends AbstractSecondaryTablesComposit @Override protected void initializeLayout(Composite container) { - int groupBoxMargin = groupBoxMargin(); + int groupBoxMargin = getGroupBoxMargin(); WritablePropertyValueModel<SecondaryTable> secondaryTableHolder = buildSecondaryTableHolder(); @@ -143,16 +143,17 @@ public class OrmSecondaryTablesComposite extends AbstractSecondaryTablesComposit buildDefineInXmlHolder(); // Override Define In XML check box - buildCheckBox( - buildSubPane(container, 0, groupBoxMargin), + addCheckBox( + addSubPane(container, 0, groupBoxMargin), JptUiMappingsMessages.OrmSecondaryTablesComposite_defineInXml, - defineInXmlHolder + defineInXmlHolder, + null ); // Secondary Tables add/remove list pane AddRemoveListPane<Entity> listPane = new AddRemoveListPane<Entity>( this, - buildSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin), + addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin), buildSecondaryTablesAdapter(), buildSecondaryTablesListModel(), secondaryTableHolder, @@ -179,7 +180,7 @@ public class OrmSecondaryTablesComposite extends AbstractSecondaryTablesComposit @Override protected SecondaryTableDialog buildSecondaryTableDialogForAdd() { //defaultSchema and defaultCatalog should not be taken from the Table in this case. The table default schema could be what is the specified schema on the java table. - return new SecondaryTableDialog(getControl().getShell(), subject().getJpaProject(), subject().getEntityMappings().getDefaultSchema(), subject().getEntityMappings().getDefaultCatalog()); + return new SecondaryTableDialog(getControl().getShell(), getSubject().getJpaProject(), getSubject().getEntityMappings().getDefaultSchema(), getSubject().getEntityMappings().getDefaultCatalog()); } private class DefineInXmlHolder extends ListPropertyValueModelAdapter<Boolean> @@ -191,14 +192,14 @@ public class OrmSecondaryTablesComposite extends AbstractSecondaryTablesComposit @Override protected Boolean buildValue() { - if (subject() == null) { + if (getSubject() == null) { return Boolean.FALSE; } - return Boolean.valueOf(subject().secondaryTablesDefinedInXml()); + return Boolean.valueOf(getSubject().secondaryTablesDefinedInXml()); } public void setValue(Boolean value) { - subject().setSecondaryTablesDefinedInXml(value.booleanValue()); + getSubject().setSecondaryTablesDefinedInXml(value.booleanValue()); } } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSequenceGeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSequenceGeneratorComposite.java index 18a8421638..26a5625df8 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSequenceGeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmSequenceGeneratorComposite.java @@ -10,13 +10,14 @@ package org.eclipse.jpt.ui.internal.orm.details; import java.util.Collection; +import org.eclipse.jpt.core.context.SequenceGenerator; import org.eclipse.jpt.core.context.orm.OrmSequenceGenerator; import org.eclipse.jpt.db.Schema; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages; import org.eclipse.jpt.ui.internal.mappings.db.SequenceCombo; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -42,7 +43,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class OrmSequenceGeneratorComposite extends AbstractPane<OrmSequenceGenerator> +public class OrmSequenceGeneratorComposite extends Pane<OrmSequenceGenerator> { /** * Creates a new <code>OrmSequenceGeneratorComposite</code>. @@ -51,7 +52,7 @@ public class OrmSequenceGeneratorComposite extends AbstractPane<OrmSequenceGener * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public OrmSequenceGeneratorComposite(AbstractPane<?> parentPane, + public OrmSequenceGeneratorComposite(Pane<?> parentPane, PropertyValueModel<OrmSequenceGenerator> subjectHolder, Composite parent) { @@ -72,36 +73,36 @@ public class OrmSequenceGeneratorComposite extends AbstractPane<OrmSequenceGener }; } - private SequenceCombo<OrmSequenceGenerator> buildSequenceNameCombo(Composite parent) { + private SequenceCombo<OrmSequenceGenerator> addSequenceNameCombo(Composite parent) { return new SequenceCombo<OrmSequenceGenerator>(this, parent) { @Override protected void addPropertyNames(Collection<String> propertyNames) { super.addPropertyNames(propertyNames); - propertyNames.add(OrmSequenceGenerator.DEFAULT_SEQUENCE_NAME_PROPERTY); - propertyNames.add(OrmSequenceGenerator.SPECIFIED_SEQUENCE_NAME_PROPERTY); + propertyNames.add(SequenceGenerator.DEFAULT_SEQUENCE_NAME_PROPERTY); + propertyNames.add(SequenceGenerator.SPECIFIED_SEQUENCE_NAME_PROPERTY); } @Override - protected String defaultValue() { + protected String getDefaultValue() { return JptUiMappingsMessages.SequenceGeneratorComposite_default; } @Override - protected Schema schema() { + protected Schema getSchema() { // TODO return null; } @Override protected void setValue(String value) { - subject().setSpecifiedSequenceName(value); + getSubject().setSpecifiedSequenceName(value); } @Override - protected String value() { - return subject().getSpecifiedSequenceName(); + protected String getValue() { + return getSubject().getSpecifiedSequenceName(); } }; } @@ -113,7 +114,7 @@ public class OrmSequenceGeneratorComposite extends AbstractPane<OrmSequenceGener protected void initializeLayout(Composite container) { // Name widgets - buildLabeledText( + addLabeledText( container, JptUiOrmMessages.OrmSequenceGeneratorComposite_name, buildGeneratorNameHolder(), @@ -121,10 +122,10 @@ public class OrmSequenceGeneratorComposite extends AbstractPane<OrmSequenceGener ); // Sequence Generator widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.OrmSequenceGeneratorComposite_sequence, - buildSequenceNameCombo(container), + addSequenceNameCombo(container), JpaHelpContextIds.MAPPING_SEQUENCE_GENERATOR_SEQUENCE ); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java index 3f0f24f1ed..a8760e79b6 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java @@ -18,7 +18,7 @@ import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.db.ColumnCombo; import org.eclipse.jpt.ui.internal.mappings.db.TableCombo; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; @@ -51,7 +51,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> +public class OrmTableGeneratorComposite extends Pane<OrmTableGenerator> { /** * Creates a new <code>OrmTableGeneratorComposite</code>. @@ -60,7 +60,7 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public OrmTableGeneratorComposite(AbstractPane<?> parentPane, + public OrmTableGeneratorComposite(Pane<?> parentPane, PropertyValueModel<OrmTableGenerator> subjectHolder, Composite parent) { @@ -81,7 +81,7 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> }; } - private ColumnCombo<OrmTableGenerator> buildPkColumnNameCombo(Composite parent) { + private ColumnCombo<OrmTableGenerator> addPkColumnNameCombo(Composite parent) { return new ColumnCombo<OrmTableGenerator>(this, parent) { @@ -93,28 +93,28 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> } @Override - protected String defaultValue() { - return subject().getDefaultPkColumnName(); + protected String getDefaultValue() { + return getSubject().getDefaultPkColumnName(); } @Override protected void setValue(String value) { - subject().setSpecifiedPkColumnName(value); + getSubject().setSpecifiedPkColumnName(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedPkColumnName(); + protected String getValue() { + return getSubject().getSpecifiedPkColumnName(); } }; } - private ColumnCombo<OrmTableGenerator> buildPkColumnValueCombo(Composite parent) { + private ColumnCombo<OrmTableGenerator> addPkColumnValueCombo(Composite parent) { return new ColumnCombo<OrmTableGenerator>(this, parent) { @@ -126,28 +126,28 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> } @Override - protected String defaultValue() { - return subject().getDefaultPkColumnValue(); + protected String getDefaultValue() { + return getSubject().getDefaultPkColumnValue(); } @Override protected void setValue(String value) { - subject().setSpecifiedPkColumnValue(value); + getSubject().setSpecifiedPkColumnValue(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedPkColumnValue(); + protected String getValue() { + return getSubject().getSpecifiedPkColumnValue(); } }; } - private TableCombo<OrmTableGenerator> buildTableNameCombo(Composite parent) { + private TableCombo<OrmTableGenerator> addTableNameCombo(Composite parent) { return new TableCombo<OrmTableGenerator>(this, parent) { @@ -174,33 +174,33 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> } @Override - protected String defaultValue() { - return subject().getDefaultTable(); + protected String getDefaultValue() { + return getSubject().getDefaultTable(); } @Override - protected String schemaName() { - return subject().getSchema(); + protected String getSchemaName() { + return getSubject().getSchema(); } @Override protected void setValue(String value) { - subject().setSpecifiedTable(value); + getSubject().setSpecifiedTable(value); } @Override - protected Table table() { - return subject().getDbTable(); + protected Table getDbTable() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedTable(); + protected String getValue() { + return getSubject().getSpecifiedTable(); } }; } - private ColumnCombo<OrmTableGenerator> buildValueColumnCombo(Composite parent) { + private ColumnCombo<OrmTableGenerator> addValueColumnCombo(Composite parent) { return new ColumnCombo<OrmTableGenerator>(this, parent) { @@ -212,23 +212,23 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> } @Override - protected String defaultValue() { - return subject().getDefaultValueColumnName(); + protected String getDefaultValue() { + return getSubject().getDefaultValueColumnName(); } @Override protected void setValue(String value) { - subject().setSpecifiedValueColumnName(value); + getSubject().setSpecifiedValueColumnName(value); } @Override - protected Table getDBTable_() { - return subject().getDbTable(); + protected Table getDbTable_() { + return getSubject().getDbTable(); } @Override - protected String value() { - return subject().getSpecifiedValueColumnName(); + protected String getValue() { + return getSubject().getSpecifiedValueColumnName(); } }; } @@ -240,7 +240,7 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> protected void initializeLayout(Composite container) { // Name widgets - buildLabeledText( + addLabeledText( container, JptUiOrmMessages.OrmTableGeneratorComposite_name, buildGeneratorNameHolder(), @@ -248,34 +248,34 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> ); // Table widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.OrmTableGeneratorComposite_table, - buildTableNameCombo(container), + addTableNameCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_TABLE ); // Primary Key Column widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.OrmTableGeneratorComposite_pkColumn, - buildPkColumnNameCombo(container), + addPkColumnNameCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_PRIMARY_KEY_COLUMN ); // Value Column widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.OrmTableGeneratorComposite_valueColumn, - buildValueColumnCombo(container), + addValueColumnCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_VALUE_COLUMN ); // Primary Key Column Value widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.OrmTableGeneratorComposite_pkColumnValue, - buildPkColumnValueCombo(container), + addPkColumnValueCombo(container), JpaHelpContextIds.MAPPING_TABLE_GENERATOR_PRIMARY_KEY_COLUMN_VALUE ); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/PersistenceUnitMetadataComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/PersistenceUnitMetadataComposite.java index afd330628f..272c0d37e6 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/PersistenceUnitMetadataComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/PersistenceUnitMetadataComposite.java @@ -17,7 +17,7 @@ import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.mappings.db.CatalogCombo; import org.eclipse.jpt.ui.internal.mappings.db.SchemaCombo; import org.eclipse.jpt.ui.internal.orm.JptUiOrmMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +import org.eclipse.jpt.ui.internal.widgets.FormPane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel; @@ -58,7 +58,7 @@ import org.eclipse.swt.widgets.Composite; * @since 2.0 */ @SuppressWarnings("nls") -public class PersistenceUnitMetadataComposite extends AbstractFormPane<PersistenceUnitMetadata> +public class PersistenceUnitMetadataComposite extends FormPane<PersistenceUnitMetadata> { /** * Creates a new <code>PersistenceUnitMetadataComposite</code>. @@ -67,14 +67,14 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public PersistenceUnitMetadataComposite(AbstractFormPane<?> parentPane, + public PersistenceUnitMetadataComposite(FormPane<?> parentPane, PropertyValueModel<? extends PersistenceUnitMetadata> subjectHolder, Composite parent) { super(parentPane, subjectHolder, parent); } - private EnumFormComboViewer<PersistenceUnitDefaults, AccessType> buildAccessTypeCombo(Composite container) { + private EnumFormComboViewer<PersistenceUnitDefaults, AccessType> addAccessTypeCombo(Composite container) { return new EnumFormComboViewer<PersistenceUnitDefaults, AccessType>(this, buildPersistenceUnitDefaultsHolder(), container) { @@ -85,12 +85,12 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten } @Override - protected AccessType[] choices() { + protected AccessType[] getChoices() { return AccessType.values(); } @Override - protected AccessType defaultValue() { + protected AccessType getDefaultValue() { return null; } @@ -105,12 +105,12 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten @Override protected AccessType getValue() { - return subject().getAccess(); + return getSubject().getAccess(); } @Override protected void setValue(AccessType value) { - subject().setAccess(value); + getSubject().setAccess(value); } }; } @@ -129,7 +129,7 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten }; } - private CatalogCombo<PersistenceUnitDefaults> buildCatalogCombo(Composite container) { + private CatalogCombo<PersistenceUnitDefaults> addCatalogCombo(Composite container) { return new CatalogCombo<PersistenceUnitDefaults>(this, buildPersistenceUnitDefaultsHolder(), container) { @@ -141,18 +141,18 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten } @Override - protected String defaultValue() { - return subject().getDefaultCatalog(); + protected String getDefaultValue() { + return getSubject().getDefaultCatalog(); } @Override protected void setValue(String value) { - subject().setSpecifiedCatalog(value); + getSubject().setSpecifiedCatalog(value); } @Override - protected String value() { - return subject().getSpecifiedCatalog(); + protected String getValue() { + return getSubject().getSpecifiedCatalog(); } }; } @@ -166,7 +166,7 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten }; } - private SchemaCombo<PersistenceUnitDefaults> buildSchemaCombo(Composite container) { + private SchemaCombo<PersistenceUnitDefaults> addSchemaCombo(Composite container) { return new SchemaCombo<PersistenceUnitDefaults>(this, buildPersistenceUnitDefaultsHolder(), container) { @@ -178,18 +178,18 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten } @Override - protected String defaultValue() { - return subject().getDefaultSchema(); + protected String getDefaultValue() { + return getSubject().getDefaultSchema(); } @Override protected void setValue(String value) { - subject().setSpecifiedSchema(value); + getSubject().setSpecifiedSchema(value); } @Override - protected String value() { - return subject().getSpecifiedSchema(); + protected String getValue() { + return getSubject().getSpecifiedSchema(); } }; } @@ -215,13 +215,13 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten protected void initializeLayout(Composite container) { // Section - container = buildCollapsableSection( + container = addCollapsableSection( container, JptUiOrmMessages.PersistenceUnitMetadataComposite_persistenceUnitSection ); // XML mapping metadata complete check box - buildCheckBox( + addCheckBox( container, JptUiOrmMessages.PersistenceUnitMetadataComposite_xmlMappingMetadataCompleteCheckBox, buildXmlMappingMetadataCompleteHolder(), @@ -229,7 +229,7 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten ); // Cascade Persist widgets - buildCheckBox( + addCheckBox( container, JptUiOrmMessages.PersistenceUnitMetadataComposite_cascadePersistCheckBox, buildCascadePersistHolder(), @@ -237,26 +237,26 @@ public class PersistenceUnitMetadataComposite extends AbstractFormPane<Persisten ); // Schema widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.PersistenceUnitMetadataComposite_schema, - buildSchemaCombo(container), + addSchemaCombo(container), JpaHelpContextIds.ENTITY_ORM_SCHEMA ); // Catalog widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.PersistenceUnitMetadataComposite_catalog, - buildCatalogCombo(container), + addCatalogCombo(container), JpaHelpContextIds.ENTITY_ORM_CATALOG ); // Access Type widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiOrmMessages.PersistenceUnitMetadataComposite_access, - buildAccessTypeCombo(container), + addAccessTypeCombo(container), JpaHelpContextIds.ENTITY_ORM_ACCESS ); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java index 1e1e61ec98..153b6ff05d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java @@ -32,7 +32,7 @@ import org.eclipse.jpt.ui.internal.JpaMappingImageHelper; import org.eclipse.jpt.ui.internal.JptUiIcons; import org.eclipse.jpt.ui.internal.JptUiMessages; import org.eclipse.jpt.ui.internal.persistence.JptUiPersistenceMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; import org.eclipse.jpt.utility.internal.model.value.ItemPropertyListValueModelAdapter; @@ -79,7 +79,7 @@ import org.eclipse.ui.progress.IProgressService; * @since 2.0 */ @SuppressWarnings("nls") -public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUnit> +public class PersistenceUnitClassesComposite extends Pane<PersistenceUnit> { /** * Creates a new <code>PersistenceUnitMappedClassesComposite</code>. @@ -87,7 +87,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni * @param parentPane The parent pane of this one * @param parent The parent container */ - public PersistenceUnitClassesComposite(AbstractPane<? extends PersistenceUnit> parentPane, + public PersistenceUnitClassesComposite(Pane<? extends PersistenceUnit> parentPane, Composite parent) { super(parentPane, parent); @@ -98,7 +98,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni IType type = chooseType(); if (type != null) { - ClassRef classRef = subject().addSpecifiedClassRef(); + ClassRef classRef = getSubject().addSpecifiedClassRef(); classRef.setClassName(type.getFullyQualifiedName('.')); listSelectionModel.setSelectedValue(classRef); } @@ -136,7 +136,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { for (Object item : listSelectionModel.selectedValues()) { - subject().removeSpecifiedClassRef((ClassRef) item); + getSubject().removeSpecifiedClassRef((ClassRef) item); } } }; @@ -179,9 +179,9 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni @Override protected String transform(Boolean value) { - if ((subject() != null) && (value == null)) { + if ((getSubject() != null) && (value == null)) { - Boolean defaultValue = subject().getDefaultExcludeUnlistedClasses(); + Boolean defaultValue = getSubject().getDefaultExcludeUnlistedClasses(); if (defaultValue != null) { @@ -280,7 +280,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni try { typeSelectionDialog = JavaUI.createTypeDialog( - shell(), + getShell(), service, scope, IJavaElementSearchConstants.CONSIDER_CLASSES, @@ -308,7 +308,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni if (className != null) { try { - return subject().getJpaProject().getJavaProject().findType(className); + return getSubject().getJpaProject().getJavaProject().findType(className); } catch (JavaModelException e) { JptUiPlugin.log(e); @@ -325,7 +325,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni protected void initializeLayout(Composite container) { // Description - buildMultiLineLabel( + addMultiLineLabel( container, JptUiPersistenceMessages.PersistenceUnitClassesComposite_description ); @@ -350,11 +350,12 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni } }; - buildTriStateCheckBoxWithDefault( + addTriStateCheckBoxWithDefault( container, JptUiPersistenceMessages.PersistenceUnitClassesComposite_excludeUnlistedMappedClasses, buildExcludeUnlistedMappedClassesHolder(), - buildExcludeUnlistedMappedClassesStringHolder() + buildExcludeUnlistedMappedClassesStringHolder(), + null ); } @@ -377,7 +378,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni } private IPackageFragmentRoot packageFragmentRoot() { - IProject project = subject().getJpaProject().getProject(); + IProject project = getSubject().getJpaProject().getProject(); IJavaProject root = JavaCore.create(project); try { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionComposite.java index 5069aef162..7071aa221a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionComposite.java @@ -14,7 +14,7 @@ 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.persistence.JptUiPersistenceMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -49,7 +49,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class PersistenceUnitConnectionComposite extends AbstractFormPane<PersistenceUnit> +public class PersistenceUnitConnectionComposite extends FormPane<PersistenceUnit> implements JpaPageComposite { /** @@ -70,7 +70,7 @@ public class PersistenceUnitConnectionComposite extends AbstractFormPane<Persist * (non-Javadoc) */ @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; @@ -81,7 +81,7 @@ public class PersistenceUnitConnectionComposite extends AbstractFormPane<Persist layout.marginRight = 0; layout.verticalSpacing = 15; - Composite container = buildPane(parent, layout); + Composite container = addPane(parent, layout); updateGridData(container); return container; @@ -96,7 +96,7 @@ public class PersistenceUnitConnectionComposite extends AbstractFormPane<Persist private void initializeDatabasePane(Composite container) { - container = buildSection( + container = addSection( container, JptUiPersistenceMessages.PersistenceUnitConnectionComposite_database ); @@ -106,7 +106,7 @@ public class PersistenceUnitConnectionComposite extends AbstractFormPane<Persist private void initializeGeneralPane(Composite container) { - container = buildSection( + container = addSection( container, JptUiPersistenceMessages.PersistenceUnitConnectionComposite_general ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionDatabaseComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionDatabaseComposite.java index 3c3a3aaeb2..826463384d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionDatabaseComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionDatabaseComposite.java @@ -13,12 +13,13 @@ import org.eclipse.jpt.core.context.persistence.PersistenceUnit; import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; import org.eclipse.jpt.ui.internal.persistence.JptUiPersistenceMessages; import org.eclipse.jpt.ui.internal.util.ControlEnabler; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +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; /** @@ -39,7 +40,7 @@ import org.eclipse.swt.widgets.Text; * @version 2.0 * @since 2.0 */ -public class PersistenceUnitConnectionDatabaseComposite extends AbstractPane<PersistenceUnit> +public class PersistenceUnitConnectionDatabaseComposite extends Pane<PersistenceUnit> { /** * Creates a new <code>PersistenceUnitConnectionDatabaseComposite</code>. @@ -47,7 +48,7 @@ public class PersistenceUnitConnectionDatabaseComposite extends AbstractPane<Per * @param parentPane The parent pane of this one * @param parent The parent container */ - public PersistenceUnitConnectionDatabaseComposite(AbstractPane<PersistenceUnit> subjectHolder, + public PersistenceUnitConnectionDatabaseComposite(Pane<PersistenceUnit> subjectHolder, Composite container) { super(subjectHolder, container); @@ -125,29 +126,38 @@ public class PersistenceUnitConnectionDatabaseComposite extends AbstractPane<Per protected void initializeLayout(Composite container) { // JTA Datasource Name widgets - Text text = buildLabeledText( + Label label = addUnmanagedLabel( + container, + JptUiPersistenceMessages.PersistenceUnitConnectionDatabaseComposite_jtaDatasourceName); + Text text = addUnmanagedText( container, - JptUiPersistenceMessages.PersistenceUnitConnectionDatabaseComposite_jtaDatasourceName, - buildJTADatasourceNameHolder() + buildJTADatasourceNameHolder(), + null ); - - installJTADatasourceNameEnabler(text); - + addLabeledComposite(container, label, text, null); + + installJTADatasourceNameEnabler(text, label); + + // Non-JTA Datasource Name widgets - text = buildLabeledText( + label = addUnmanagedLabel( + container, + JptUiPersistenceMessages.PersistenceUnitConnectionDatabaseComposite_nonJtaDatasourceName); + text = addUnmanagedText( container, - JptUiPersistenceMessages.PersistenceUnitConnectionDatabaseComposite_nonJtaDatasourceName, - buildNonJTADatasourceNameHolder() + buildNonJTADatasourceNameHolder(), + null ); + addLabeledComposite(container, label, text, null); - installNonJTADatasourceNameEnabler(text); + installNonJTADatasourceNameEnabler(text, label); } - private void installJTADatasourceNameEnabler(Text text) { - new ControlEnabler(buildJTADatasourceNameBooleanHolder(), text); + private void installJTADatasourceNameEnabler(Text text, Label label) { + new ControlEnabler(buildJTADatasourceNameBooleanHolder(), text, label); } - private void installNonJTADatasourceNameEnabler(Text text) { - new ControlEnabler(buildNonJTADatasourceNameBooleanHolder(), text); + private void installNonJTADatasourceNameEnabler(Text text, Label label) { + new ControlEnabler(buildNonJTADatasourceNameBooleanHolder(), text, label); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionGeneralComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionGeneralComposite.java index 4149abc57b..f8620d7ad2 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionGeneralComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitConnectionGeneralComposite.java @@ -13,7 +13,7 @@ import java.util.Collection; import org.eclipse.jpt.core.context.persistence.PersistenceUnit; import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType; import org.eclipse.jpt.ui.internal.persistence.JptUiPersistenceMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer; import org.eclipse.swt.widgets.Composite; @@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class PersistenceUnitConnectionGeneralComposite extends AbstractPane<PersistenceUnit> +public class PersistenceUnitConnectionGeneralComposite extends Pane<PersistenceUnit> { /** * Creates a new <code>PersistenceUnitConnectionGeneralComposite</code>. @@ -40,7 +40,7 @@ public class PersistenceUnitConnectionGeneralComposite extends AbstractPane<Pers * @param parentPane The parent pane of this one * @param parent The parent container */ - public PersistenceUnitConnectionGeneralComposite(AbstractPane<PersistenceUnit> subjectHolder, + public PersistenceUnitConnectionGeneralComposite(Pane<PersistenceUnit> subjectHolder, Composite container) { super(subjectHolder, container); @@ -58,13 +58,13 @@ public class PersistenceUnitConnectionGeneralComposite extends AbstractPane<Pers } @Override - protected PersistenceUnitTransactionType[] choices() { + protected PersistenceUnitTransactionType[] getChoices() { return PersistenceUnitTransactionType.values(); } @Override - protected PersistenceUnitTransactionType defaultValue() { - return subject().getDefaultTransactionType(); + protected PersistenceUnitTransactionType getDefaultValue() { + return getSubject().getDefaultTransactionType(); } @Override @@ -78,12 +78,12 @@ public class PersistenceUnitConnectionGeneralComposite extends AbstractPane<Pers @Override protected PersistenceUnitTransactionType getValue() { - return subject().getSpecifiedTransactionType(); + return getSubject().getSpecifiedTransactionType(); } @Override protected void setValue(PersistenceUnitTransactionType value) { - subject().setSpecifiedTransactionType(value); + getSubject().setSpecifiedTransactionType(value); } }; } @@ -95,7 +95,7 @@ public class PersistenceUnitConnectionGeneralComposite extends AbstractPane<Pers protected void initializeLayout(Composite container) { // Transaction Type widgets - buildLabeledComposite( + addLabeledComposite( container, JptUiPersistenceMessages.PersistenceUnitConnectionGeneralComposite_transactionType, buildTransactionTypeCombo(container).getControl() diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitGeneralComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitGeneralComposite.java index 841f062897..7833ef6915 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitGeneralComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitGeneralComposite.java @@ -14,7 +14,7 @@ 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.persistence.JptUiPersistenceMessages; -import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane; +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; @@ -68,7 +68,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class PersistenceUnitGeneralComposite extends AbstractFormPane<PersistenceUnit> +public class PersistenceUnitGeneralComposite extends FormPane<PersistenceUnit> implements JpaPageComposite { /** @@ -99,7 +99,7 @@ public class PersistenceUnitGeneralComposite extends AbstractFormPane<Persistenc * (non-Javadoc) */ @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; @@ -110,7 +110,7 @@ public class PersistenceUnitGeneralComposite extends AbstractFormPane<Persistenc layout.marginRight = 0; layout.verticalSpacing = 15; - Composite container = buildPane(parent, layout); + Composite container = addPane(parent, layout); updateGridData(container); return container; @@ -187,27 +187,27 @@ public class PersistenceUnitGeneralComposite extends AbstractFormPane<Persistenc private void initializeGeneralPane(Composite container) { - container = buildSection( + container = addSection( container, JptUiPersistenceMessages.PersistenceUnitGeneralComposite_general ); // Name widgets - buildLabeledText( + addLabeledText( container, JptUiPersistenceMessages.PersistenceUnitGeneralComposite_name, buildPersistenceUnitNameHolder() ); // Persistence Provider widgets - buildLabeledText( + addLabeledText( container, JptUiPersistenceMessages.PersistenceUnitGeneralComposite_persistenceProvider, buildPersistenceProviderHolder() ); // Description widgets - buildLabeledText( + addLabeledText( container, JptUiPersistenceMessages.PersistenceUnitGeneralComposite_description, buildPersistenceUnitDescriptionHolder() @@ -216,7 +216,7 @@ public class PersistenceUnitGeneralComposite extends AbstractFormPane<Persistenc private void initializeJPAMappingDescriptorsPane(Composite container) { - container = buildSection( + container = addSection( container, JptUiPersistenceMessages.PersistenceUnitGeneralComposite_jpaMappingDescriptors, JptUiPersistenceMessages.PersistenceUnitGeneralComposite_jpaMappingDescriptors_description @@ -243,7 +243,7 @@ public class PersistenceUnitGeneralComposite extends AbstractFormPane<Persistenc private void initializeMappedClassesPane(Composite container) { - container = buildSection( + container = addSection( container, JptUiPersistenceMessages.PersistenceUnitGeneralComposite_mappedClasses ); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitJarFilesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitJarFilesComposite.java index b924710d18..e844f546b0 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitJarFilesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitJarFilesComposite.java @@ -10,7 +10,7 @@ package org.eclipse.jpt.ui.internal.persistence.details; import org.eclipse.jpt.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.swt.widgets.Composite; /** @@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public class PersistenceUnitJarFilesComposite extends AbstractPane<PersistenceUnit> +public class PersistenceUnitJarFilesComposite extends Pane<PersistenceUnit> { /** * Creates a new <code>PersistenceUnitJPAMappingDescriptorsComposite</code>. @@ -42,7 +42,7 @@ public class PersistenceUnitJarFilesComposite extends AbstractPane<PersistenceUn * @param parentPane The parent pane of this one * @param parent The parent container */ - public PersistenceUnitJarFilesComposite(AbstractPane<? extends PersistenceUnit> parentPane, + public PersistenceUnitJarFilesComposite(Pane<? extends PersistenceUnit> parentPane, Composite parent) { super(parentPane, parent, false); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitMappingFilesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitMappingFilesComposite.java index 2d5b0b1ec5..b4a274c385 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitMappingFilesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitMappingFilesComposite.java @@ -37,7 +37,7 @@ import org.eclipse.jpt.ui.JptUiPlugin; import org.eclipse.jpt.ui.internal.JptUiIcons; import org.eclipse.jpt.ui.internal.persistence.JptUiPersistenceMessages; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveListPane; import org.eclipse.jpt.ui.internal.widgets.PostExecution; import org.eclipse.jpt.ui.internal.widgets.AddRemovePane.Adapter; @@ -81,7 +81,7 @@ import org.xml.sax.helpers.DefaultHandler; * @since 2.0 */ @SuppressWarnings("nls") -public class PersistenceUnitMappingFilesComposite extends AbstractPane<PersistenceUnit> +public class PersistenceUnitMappingFilesComposite extends Pane<PersistenceUnit> { /** * Creates a new <code>PersistenceUnitMappingFilesComposite</code>. @@ -89,7 +89,7 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten * @param parentPane The parent pane of this one * @param parent The parent container */ - public PersistenceUnitMappingFilesComposite(AbstractPane<? extends PersistenceUnit> parentPane, + public PersistenceUnitMappingFilesComposite(Pane<? extends PersistenceUnit> parentPane, Composite parent) { super(parentPane, parent); @@ -104,10 +104,10 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten */ private void addJPAMappingDescriptor(ObjectListSelectionModel listSelectionModel) { - IProject project = subject().getJpaProject().getProject(); + IProject project = getSubject().getJpaProject().getProject(); ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog( - shell(), + getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider() ); @@ -116,7 +116,7 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten dialog.setValidator(buildValidator()); dialog.setTitle(JptUiPersistenceMessages.PersistenceUnitMappingFilesComposite_mappingFileDialog_title); dialog.setMessage(JptUiPersistenceMessages.PersistenceUnitMappingFilesComposite_mappingFileDialog_message); - dialog.addFilter(new XmlFileViewerFilter(subject().getJpaProject().getJavaProject())); + dialog.addFilter(new XmlFileViewerFilter(getSubject().getJpaProject().getJavaProject())); dialog.setInput(project); dialog.setComparator(new ResourceComparator(ResourceComparator.NAME)); @@ -134,7 +134,7 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { for (Object item : listSelectionModel.selectedValues()) { - subject().removeSpecifiedMappingFileRef((MappingFileRef) item); + getSubject().removeSpecifiedMappingFileRef((MappingFileRef) item); } } }; @@ -144,7 +144,7 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten * (non-Javadoc) */ @Override - protected Composite buildContainer(Composite parent) { + protected Composite addContainer(Composite parent) { GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0; @@ -154,7 +154,7 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten layout.marginBottom = 0; layout.marginRight = 0; - Composite container = buildPane(parent, layout); + Composite container = addPane(parent, layout); updateGridData(container); return container; @@ -214,13 +214,13 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten return; } - int index = subject().specifiedMappingFileRefsSize(); + int index = getSubject().specifiedMappingFileRefsSize(); for (Object result : dialog.getResult()) { IFile file = (IFile) result; IPath filePath = removeSourcePath(file); - MappingFileRef mappingFileRef = subject().addSpecifiedMappingFileRef(index++); + MappingFileRef mappingFileRef = getSubject().addSpecifiedMappingFileRef(index++); mappingFileRef.setFileName(filePath.toPortableString()); listSelectionModel.addSelectedValue(mappingFileRef); @@ -264,8 +264,8 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten buildLabelProvider() ) { @Override - protected Composite buildContainer(Composite parent) { - parent = super.buildContainer(parent); + protected Composite addContainer(Composite parent) { + parent = super.addContainer(parent); updateGridData(parent); return parent; } @@ -286,7 +286,7 @@ public class PersistenceUnitMappingFilesComposite extends AbstractPane<Persisten * source path */ private IPath removeSourcePath(IFile file) { - IJavaProject javaProject = subject().getJpaProject().getJavaProject(); + IJavaProject javaProject = getSubject().getJpaProject().getJavaProject(); IPath filePath = file.getProjectRelativePath(); try { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitPropertiesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitPropertiesComposite.java index a12d7a0c09..425d2144e6 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitPropertiesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitPropertiesComposite.java @@ -24,7 +24,7 @@ import org.eclipse.jpt.ui.details.JpaPageComposite; import org.eclipse.jpt.ui.internal.JpaHelpContextIds; import org.eclipse.jpt.ui.internal.persistence.JptUiPersistenceMessages; import org.eclipse.jpt.ui.internal.swt.ColumnAdapter; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.ui.internal.widgets.AddRemoveTablePane; import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter; import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter; @@ -63,7 +63,7 @@ import org.eclipse.swt.widgets.TableItem; * @since 2.0 */ @SuppressWarnings("nls") -public class PersistenceUnitPropertiesComposite extends AbstractPane<PersistenceUnit> +public class PersistenceUnitPropertiesComposite extends Pane<PersistenceUnit> implements JpaPageComposite { private WritablePropertyValueModel<Property> propertyHolder; @@ -105,10 +105,10 @@ public class PersistenceUnitPropertiesComposite extends AbstractPane<Persistence return new AddRemoveTablePane.AbstractAdapter() { public void addNewItem(ObjectListSelectionModel listSelectionModel) { - Property property = subject().addProperty(); + Property property = getSubject().addProperty(); propertyHolder.setValue(property); - int index = subject().propertiesSize() - 1; + int index = getSubject().propertiesSize() - 1; TableItem tableItem = tablePane.getMainControl().getItem(index); tablePane.getMainControl().showItem(tableItem); @@ -120,7 +120,7 @@ public class PersistenceUnitPropertiesComposite extends AbstractPane<Persistence public void removeSelectedItems(ObjectListSelectionModel listSelectionModel) { for (Object item : listSelectionModel.selectedValues()) { - subject().removeProperty((Property) item); + getSubject().removeProperty((Property) item); } } }; @@ -162,7 +162,7 @@ public class PersistenceUnitPropertiesComposite extends AbstractPane<Persistence @Override protected void initializeLayout(Composite container) { - buildLabel( + addLabel( container, JptUiPersistenceMessages.PersistenceUnitPropertiesComposite_properties_description ); @@ -350,8 +350,8 @@ public class PersistenceUnitPropertiesComposite extends AbstractPane<Persistence } @Override - protected Composite buildContainer(Composite parent) { - Composite container = super.buildContainer(parent); + protected Composite addContainer(Composite parent) { + Composite container = super.addContainer(parent); container.setLayoutData(new GridData(GridData.FILL_BOTH)); return container; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/JpaPlatformUiRegistry.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/JpaPlatformUiRegistry.java index 269437354a..18bd94c033 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/JpaPlatformUiRegistry.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/JpaPlatformUiRegistry.java @@ -93,7 +93,7 @@ public class JpaPlatformUiRegistry this.jpaPlatforms.put(platformId, configElement); } - public JpaPlatformUi jpaPlatform(String platformId) { + public JpaPlatformUi getJpaPlatformUi(String platformId) { IConfigurationElement registeredConfigElement = this.jpaPlatforms.get(platformId); if (registeredConfigElement == null) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlEnabler.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlEnabler.java index 472918aecc..b2d816e52a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlEnabler.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlEnabler.java @@ -145,11 +145,11 @@ public class ControlEnabler extends StateController super(booleanHolder, wrap(controls), defaultValue); } - private static Collection<IControlHolder> wrap(Iterator<? extends Control> controls) { - return CollectionTools.collection(new TransformationIterator<Control, IControlHolder>(controls) { + private static Collection<ControlHolder> wrap(Iterator<? extends Control> controls) { + return CollectionTools.collection(new TransformationIterator<Control, ControlHolder>(controls) { @Override - protected IControlHolder transform(Control control) { - return new ControlHolder(control); + protected ControlHolder transform(Control control) { + return new ControlEnablerHolder(control); } }); } @@ -157,11 +157,11 @@ public class ControlEnabler extends StateController /** * This holder holds onto a <code>Control</code> and update its enabled state. */ - private static class ControlHolder implements IControlHolder { + private static class ControlEnablerHolder implements ControlHolder { private final Control control; - ControlHolder(Control control) { + ControlEnablerHolder(Control control) { super(); this.control = control; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlVisibilityEnabler.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlVisibilityEnabler.java index c74ab6a7e8..feadf63a7c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlVisibilityEnabler.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/ControlVisibilityEnabler.java @@ -145,11 +145,11 @@ public class ControlVisibilityEnabler extends StateController super(booleanHolder, wrap(controls), defaultValue); } - private static Collection<IControlHolder> wrap(Iterator<? extends Control> controls) { - return CollectionTools.collection(new TransformationIterator<Control, IControlHolder>(controls) { + private static Collection<ControlHolder> wrap(Iterator<? extends Control> controls) { + return CollectionTools.collection(new TransformationIterator<Control, ControlHolder>(controls) { @Override - protected IControlHolder transform(Control control) { - return new ControlHolder(control); + protected ControlHolder transform(Control control) { + return new ControlVisibilityHolder(control); } }); } @@ -157,10 +157,10 @@ public class ControlVisibilityEnabler extends StateController /** * This holder holds onto a <code>Control</code> and update its visible state. */ - private static class ControlHolder implements IControlHolder { + private static class ControlVisibilityHolder implements ControlHolder { private final Control control; - ControlHolder(Control control) { + ControlVisibilityHolder(Control control) { super(); this.control = control; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneEnabler.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneEnabler.java index 63685b1b52..6a12881bec 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneEnabler.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneEnabler.java @@ -11,11 +11,10 @@ package org.eclipse.jpt.ui.internal.util; import java.util.Collection; import java.util.Iterator; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; import org.eclipse.jpt.utility.model.value.PropertyValueModel; -import org.eclipse.swt.widgets.Composite; /** * This <code>PaneEnabler</code> keeps the "enabled" state of a collection of @@ -35,7 +34,7 @@ public class PaneEnabler extends StateController * boolean holder's value */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?> pane) { + Pane<?> pane) { this(booleanHolder, pane, false); } @@ -49,7 +48,7 @@ public class PaneEnabler extends StateController * with the boolean holder's value */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?>... panes) { + Pane<?>... panes) { this(booleanHolder, CollectionTools.collection(panes), false); } @@ -64,7 +63,7 @@ public class PaneEnabler extends StateController * <code>null</code> */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?> pane, + Pane<?> pane, boolean defaultValue) { this(booleanHolder, CollectionTools.singletonIterator(pane), false); @@ -80,7 +79,7 @@ public class PaneEnabler extends StateController * <code>null</code> */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?>[] panes, + Pane<?>[] panes, boolean defaultValue) { this(booleanHolder, CollectionTools.iterator(panes), defaultValue); @@ -95,7 +94,7 @@ public class PaneEnabler extends StateController * with the boolean holder's value */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - Collection<? extends AbstractPane<?>> panes) { + Collection<? extends Pane<?>> panes) { this(booleanHolder, panes, false); } @@ -110,7 +109,7 @@ public class PaneEnabler extends StateController * <code>null</code> */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - Collection<? extends AbstractPane<?>> panes, + Collection<? extends Pane<?>> panes, boolean defaultValue) { this(booleanHolder, panes.iterator(), defaultValue); @@ -125,7 +124,7 @@ public class PaneEnabler extends StateController * is kept in sync with the boolean holder's value */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - Iterator<? extends AbstractPane<?>> panes) { + Iterator<? extends Pane<?>> panes) { this(booleanHolder, panes, false); } @@ -140,51 +139,36 @@ public class PaneEnabler extends StateController * <code>null</code> */ public PaneEnabler(PropertyValueModel<Boolean> booleanHolder, - Iterator<? extends AbstractPane<?>> panes, + Iterator<? extends Pane<?>> panes, boolean defaultValue) { super(booleanHolder, wrap(panes), defaultValue); } - private static Collection<IControlHolder> wrap(Iterator<? extends AbstractPane<?>> panes) { - return CollectionTools.collection(new TransformationIterator<AbstractPane<?>, IControlHolder>(panes) { + private static Collection<ControlHolder> wrap(Iterator<? extends Pane<?>> panes) { + return CollectionTools.collection(new TransformationIterator<Pane<?>, ControlHolder>(panes) { @Override - protected IControlHolder transform(AbstractPane<?> pane) { + protected ControlHolder transform(Pane<?> pane) { return new PaneHolder(pane); } }); } /** - * This holder holds onto an <code>AbstractPane</code> and update its enabled + * This holder holds onto an <code>Pane</code> and update its enabled * state. */ - private static class PaneHolder implements IControlHolder { - private final AbstractPane<?> pane; + private static class PaneHolder implements ControlHolder { + private final Pane<?> pane; - PaneHolder(AbstractPane<?> pane) { + PaneHolder(Pane<?> pane) { super(); this.pane = pane; } public void updateState(boolean state) { - - Composite container = this.pane.getControl(); - - if (!container.isDisposed()) { - - // Remove the enablement from the pane's control since this enabler - // is responsible to manage its enablement state - boolean enablementManaged = this.pane.isEnablementManaged(container); - this.pane.addToEnablementControl(container); - - // Now we can change the enablement state of the pane's widgets + if (!this.pane.getControl().isDisposed()) { this.pane.enableWidgets(state); - - // Restore the enablement state - if (enablementManaged) { - this.pane.removeFromEnablementControl(container); - } } } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneVisibilityEnabler.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneVisibilityEnabler.java index aee7581b62..7e6f03d5a0 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneVisibilityEnabler.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/PaneVisibilityEnabler.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.internal.util; import java.util.Collection; import java.util.Iterator; -import org.eclipse.jpt.ui.internal.widgets.AbstractPane; +import org.eclipse.jpt.ui.internal.widgets.Pane; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; import org.eclipse.jpt.utility.model.value.PropertyValueModel; @@ -34,7 +34,7 @@ public class PaneVisibilityEnabler extends StateController * boolean holder's value */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?> pane) { + Pane<?> pane) { this(booleanHolder, pane, false); } @@ -48,7 +48,7 @@ public class PaneVisibilityEnabler extends StateController * with the boolean holder's value */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?>... panes) { + Pane<?>... panes) { this(booleanHolder, CollectionTools.collection(panes), false); } @@ -63,7 +63,7 @@ public class PaneVisibilityEnabler extends StateController * <code>null</code> */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?> pane, + Pane<?> pane, boolean defaultValue) { this(booleanHolder, CollectionTools.singletonIterator(pane), false); @@ -79,7 +79,7 @@ public class PaneVisibilityEnabler extends StateController * <code>null</code> */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - AbstractPane<?>[] panes, + Pane<?>[] panes, boolean defaultValue) { this(booleanHolder, CollectionTools.iterator(panes), defaultValue); @@ -94,7 +94,7 @@ public class PaneVisibilityEnabler extends StateController * with the boolean holder's value */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - Collection<? extends AbstractPane<?>> panes) { + Collection<? extends Pane<?>> panes) { this(booleanHolder, panes, false); } @@ -109,7 +109,7 @@ public class PaneVisibilityEnabler extends StateController * <code>null</code> */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - Collection<? extends AbstractPane<?>> panes, + Collection<? extends Pane<?>> panes, boolean defaultValue) { this(booleanHolder, panes.iterator(), defaultValue); @@ -124,7 +124,7 @@ public class PaneVisibilityEnabler extends StateController * is kept in sync with the boolean holder's value */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - Iterator<? extends AbstractPane<?>> panes) { + Iterator<? extends Pane<?>> panes) { this(booleanHolder, panes, false); } @@ -139,29 +139,29 @@ public class PaneVisibilityEnabler extends StateController * <code>null</code> */ public PaneVisibilityEnabler(PropertyValueModel<Boolean> booleanHolder, - Iterator<? extends AbstractPane<?>> panes, + Iterator<? extends Pane<?>> panes, boolean defaultValue) { super(booleanHolder, wrap(panes), defaultValue); } - private static Collection<IControlHolder> wrap(Iterator<? extends AbstractPane<?>> panes) { - return CollectionTools.collection(new TransformationIterator<AbstractPane<?>, IControlHolder>(panes) { + private static Collection<ControlHolder> wrap(Iterator<? extends Pane<?>> panes) { + return CollectionTools.collection(new TransformationIterator<Pane<?>, ControlHolder>(panes) { @Override - protected IControlHolder transform(AbstractPane<?> pane) { + protected ControlHolder transform(Pane<?> pane) { return new PaneHolder(pane); } }); } /** - * This holder holds onto an <code>AbstractPane</code> and update its visible + * This holder holds onto an <code>Pane</code> and update its visible * state. */ - private static class PaneHolder implements IControlHolder { - private final AbstractPane<?> pane; + private static class PaneHolder implements ControlHolder { + private final Pane<?> pane; - PaneHolder(AbstractPane<?> pane) { + PaneHolder(Pane<?> pane) { super(); this.pane = pane; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/StateController.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/StateController.java index 0cec7831c7..f2e051ab3c 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/StateController.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/util/StateController.java @@ -47,10 +47,10 @@ abstract class StateController private PropertyValueModel<Boolean> booleanHolder; /** - * The collection of <code>IControlHolder</code>s whose state is kept in sync + * The collection of <code>ControlHolder</code>s whose state is kept in sync * with the boolean holder's value. */ - private Collection<IControlHolder> controlHolders; + private Collection<ControlHolder> controlHolders; /** * The default setting for the state; for when the underlying model is @@ -71,11 +71,11 @@ abstract class StateController * <code>false</code>. * * @param booleanHolder A value model on the underlying boolean model - * @param controlHolders The collection of <code>IControlHolder</code>s whose + * @param controlHolders The collection of <code>ControlHolder</code>s whose * state is kept in sync with the boolean holder's value */ StateController(PropertyValueModel<Boolean> booleanHolder, - Collection<IControlHolder> controlHolders) { + Collection<ControlHolder> controlHolders) { this(booleanHolder, controlHolders, false); } @@ -85,13 +85,13 @@ abstract class StateController * <code>false</code>. * * @param booleanHolder A value model on the underlying boolean model - * @param controlHolders The collection of <code>IControlHolder</code>s whose + * @param controlHolders The collection of <code>ControlHolder</code>s whose * state is kept in sync with the boolean holder's value * @param defaultValue The value to use when the underlying model is * <code>null</code> */ StateController(PropertyValueModel<Boolean> booleanHolder, - Collection<IControlHolder> controlHolders, + Collection<ControlHolder> controlHolders, boolean defaultValue) { this(); @@ -103,11 +103,11 @@ abstract class StateController * <code>false</code>. * * @param booleanHolder A value model on the underlying boolean model - * @param controlHolder The <code>IControlHolder</code> whose state is kept + * @param controlHolder The <code>ControlHolder</code> whose state is kept * in sync with the boolean holder's value */ StateController(PropertyValueModel<Boolean> booleanHolder, - IControlHolder controlHolder) { + ControlHolder controlHolder) { this(booleanHolder, controlHolder, false); } @@ -117,11 +117,11 @@ abstract class StateController * <code>false</code>. * * @param booleanHolder A value model on the underlying boolean model - * @param controlHolders The collection of <code>IControlHolder</code>s whose + * @param controlHolders The collection of <code>ControlHolder</code>s whose * state is kept in sync with the boolean holder's value */ StateController(PropertyValueModel<Boolean> booleanHolder, - IControlHolder... controlHolders) { + ControlHolder... controlHolders) { this(booleanHolder, CollectionTools.collection(controlHolders), false); } @@ -131,29 +131,29 @@ abstract class StateController * <code>false</code>. * * @param booleanHolder A value model on the underlying boolean model - * @param controlHolder The <code>IControlHolder</code> whose state is kept + * @param controlHolder The <code>ControlHolder</code> whose state is kept * in sync with the boolean holder's value * @param defaultValue The value to use when the underlying model is * <code>null</code> */ StateController(PropertyValueModel<Boolean> booleanHolder, - IControlHolder controlHolder, + ControlHolder controlHolder, boolean defaultValue) { - this(booleanHolder, new IControlHolder[] { controlHolder }, false); + this(booleanHolder, new ControlHolder[] { controlHolder }, false); } /** * Creates a new <code>StateController</code>. * * @param booleanHolder A value model on the underlying boolean model - * @param controlHolders The collection of <code>IControlHolder</code>s whose + * @param controlHolders The collection of <code>ControlHolder</code>s whose * state is kept in sync with the boolean holder's value * @param defaultValue The value to use when the underlying model is * <code>null</code> */ StateController(PropertyValueModel<Boolean> booleanHolder, - IControlHolder[] controlHolders, + ControlHolder[] controlHolders, boolean defaultValue) { this(); @@ -166,11 +166,11 @@ abstract class StateController * * @param booleanHolder A value model on the underlying boolean model * @param controlHolders An iterator on the collection of - * <code>IControlHolder</code>s whose state is kept in sync with the boolean + * <code>ControlHolder</code>s whose state is kept in sync with the boolean * holder's value */ StateController(PropertyValueModel<Boolean> booleanHolder, - Iterator<IControlHolder> controlHolders) { + Iterator<ControlHolder> controlHolders) { this(booleanHolder, CollectionTools.collection(controlHolders), false); } @@ -180,13 +180,13 @@ abstract class StateController * * @param booleanHolder A value model on the underlying boolean model * @param controlHolders An iterator on the collection of - * <code>IControlHolder</code>s whose state is kept in sync with the boolean + * <code>ControlHolder</code>s whose state is kept in sync with the boolean * holder's value * @param defaultValue The value to use when the underlying model is * <code>null</code> */ StateController(PropertyValueModel<Boolean> booleanHolder, - Iterator<IControlHolder> controlHolders, + Iterator<ControlHolder> controlHolders, boolean defaultValue) { this(); @@ -243,12 +243,12 @@ abstract class StateController /** * Returns an <code>Iterator</code> over the collection of - * <code>IControlHolder</code>s. + * <code>ControlHolder</code>s. * - * @return The iteration of <code>IControlHolder</code>s + * @return The iteration of <code>ControlHolder</code>s */ - protected final Iterator<IControlHolder> controlHolders() { - return new CloneIterator<IControlHolder>(this.controlHolders); + protected final Iterator<ControlHolder> controlHolders() { + return new CloneIterator<ControlHolder>(this.controlHolders); } /** @@ -263,19 +263,19 @@ abstract class StateController * Initializes this <code>StateController</code> with the given state. * * @param booleanHolder A value model on the underlying boolean model - * @param controlHolders A <code>IControlHolder</code>s whose enablement state + * @param controlHolders A <code>ControlHolder</code>s whose enablement state * is kept in sync with the boolean holder's value * @param defaultValue The value to use when the underlying model is * <code>null</code> */ protected void initialize(PropertyValueModel<Boolean> booleanHolder, - Collection<IControlHolder> controlHolders, + Collection<ControlHolder> controlHolders, boolean defaultValue) { Assert.isNotNull(booleanHolder, "The holder of the boolean value cannot be null"); Assert.isNotNull(controlHolders, "The collection of ControlHolders cannot be null"); - this.controlHolders = new ArrayList<IControlHolder>(controlHolders); + this.controlHolders = new ArrayList<ControlHolder>(controlHolders); this.defaultValue = defaultValue; this.booleanHolder = booleanHolder; @@ -300,7 +300,7 @@ abstract class StateController * @param state The new state the widgets need to have */ protected void updateState(boolean state) { - for (IControlHolder controlHolder : this.controlHolders) { + for (ControlHolder controlHolder : this.controlHolders) { controlHolder.updateState(state); } } @@ -308,7 +308,7 @@ abstract class StateController /** * The holder of the actual widget. */ - static interface IControlHolder { + static interface ControlHolder { /** * Updates the state of the wrapped control. diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java index 3001902588..7c20c67aca 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java @@ -112,7 +112,7 @@ public class JpaDetailsView extends AbstractJpaView private JpaDetailsProvider getDetailsProvider(JpaStructureNode structureNode) { String platformId = structureNode.getJpaProject().getJpaPlatform().getId(); - JpaPlatformUi jpaPlatformUI = JpaPlatformUiRegistry.instance().jpaPlatform(platformId); + JpaPlatformUi jpaPlatformUI = JpaPlatformUiRegistry.instance().getJpaPlatformUi(platformId); return jpaPlatformUI.detailsProvider(structureNode); //TODO this view and the detailsProviders Map is not created on a per project basis. diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveListPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveListPane.java index 65465de16e..a2fe99f24e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveListPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveListPane.java @@ -85,7 +85,7 @@ public class AddRemoveListPane<T extends Model> extends AddRemovePane<T> * one item or no items are selected, then <code>null</code> will be passed * @param labelProvider The renderer used to format the table holder's items */ - public AddRemoveListPane(AbstractPane<? extends T> parentPane, + public AddRemoveListPane(Pane<? extends T> parentPane, Composite parent, Adapter adapter, ListValueModel<?> listHolder, @@ -112,7 +112,7 @@ public class AddRemoveListPane<T extends Model> extends AddRemovePane<T> * @param labelProvider The renderer used to format the table holder's items * @param helpId The topic help ID to be registered with this pane */ - public AddRemoveListPane(AbstractPane<? extends T> parentPane, + public AddRemoveListPane(Pane<? extends T> parentPane, Composite parent, Adapter adapter, ListValueModel<?> listHolder, @@ -128,6 +128,39 @@ public class AddRemoveListPane<T extends Model> extends AddRemovePane<T> labelProvider, helpId); } + + /** + * Creates a new <code>AddRemoveListPane</code>. + * + * @param parentPane The parent container of this one + * @param parent The parent container + * @param adapter + * @param listHolder The <code>ListValueModel</code> containing the items + * @param selectedItemHolder The holder of the selected item, if more than + * one item or no items are selected, then <code>null</code> will be passed + * @param labelProvider The renderer used to format the table holder's items + * @param helpId The topic help ID to be registered with this pane + * @param parentManagePane <code>true</code> to have the parent pane manage + * the enabled state of this pane + */ + public AddRemoveListPane(Pane<? extends T> parentPane, + Composite parent, + Adapter adapter, + ListValueModel<?> listHolder, + WritablePropertyValueModel<?> selectedItemHolder, + ILabelProvider labelProvider, + String helpId, + boolean parentManagePane) { + + super(parentPane, + parent, + adapter, + listHolder, + selectedItemHolder, + labelProvider, + helpId, + parentManagePane); + } /** * Creates a new <code>AddRemoveListPane</code>. @@ -141,7 +174,7 @@ public class AddRemoveListPane<T extends Model> extends AddRemovePane<T> * one item or no items are selected, then <code>null</code> will be passed * @param labelProvider The renderer used to format the table holder's items */ - public AddRemoveListPane(AbstractPane<?> parentPane, + public AddRemoveListPane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, Adapter adapter, @@ -171,7 +204,7 @@ public class AddRemoveListPane<T extends Model> extends AddRemovePane<T> * @param labelProvider The renderer used to format the table holder's items * @param helpId The topic help ID to be registered with this pane */ - public AddRemoveListPane(AbstractPane<?> parentPane, + public AddRemoveListPane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, Adapter adapter, @@ -304,9 +337,9 @@ public class AddRemoveListPane<T extends Model> extends AddRemovePane<T> }; } - private Composite buildTableContainer(Composite container) { + private Composite addTableContainer(Composite container) { - container = buildPane(container, buildTableContainerLayout()); + container = addPane(container, buildTableContainerLayout()); container.setLayoutData(new GridData(GridData.FILL_BOTH)); return container; } @@ -437,13 +470,12 @@ public class AddRemoveListPane<T extends Model> extends AddRemovePane<T> IBaseLabelProvider labelProvider, String helpId) { - table = buildTable( - buildTableContainer(container), + table = addUnmanagedTable( + addTableContainer(container), SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI, helpId ); - removeFromEnablementControl(table); TableModelAdapter model = TableModelAdapter.adapt( (ListValueModel<Object>) listHolder, diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemovePane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemovePane.java index 96ae1cc920..23f4bfc3a0 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemovePane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemovePane.java @@ -36,7 +36,7 @@ import org.eclipse.swt.widgets.Composite; * @version 1.0 * @since 2.0 */ -public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> +public abstract class AddRemovePane<T extends Model> extends Pane<T> { private Adapter adapter; private Button addButton; @@ -62,7 +62,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> * one item or no items are selected, then <code>null</code> will be passed * @param labelProvider The renderer used to format the list holder's items */ - protected AddRemovePane(AbstractPane<? extends T> parentPane, + protected AddRemovePane(Pane<? extends T> parentPane, Composite parent, Adapter adapter, ListValueModel<?> listHolder, @@ -92,7 +92,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> * @param labelProvider The renderer used to format the list holder's items * @param helpId The topic help ID to be registered with this pane */ - protected AddRemovePane(AbstractPane<? extends T> parentPane, + protected AddRemovePane(Pane<? extends T> parentPane, Composite parent, Adapter adapter, ListValueModel<?> listHolder, @@ -100,7 +100,41 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> IBaseLabelProvider labelProvider, String helpId) { - super(parentPane, parent); + this(parentPane, + parent, + adapter, + listHolder, + selectedItemHolder, + labelProvider, + helpId, + true); + } + /** + * Creates a new <code>AddRemovePane</code>. + * + * @param parentPane The parent container of this one + * @param parent The parent container + * @param adapter This <code>Adapter</code> is used to dictacte the behavior + * of this <code>AddRemovePane</code> and by delegating to it some of the + * behavior + * @param listHolder The <code>ListValueModel</code> containing the items + * @param selectedItemHolder The holder of the selected item, if more than + * one item or no items are selected, then <code>null</code> will be passed + * @param labelProvider The renderer used to format the list holder's items + * @param helpId The topic help ID to be registered with this pane + * @param parentManagePane <code>true</code> to have the parent pane manage + * the enabled state of this pane + */ + protected AddRemovePane(Pane<? extends T> parentPane, + Composite parent, + Adapter adapter, + ListValueModel<?> listHolder, + WritablePropertyValueModel<?> selectedItemHolder, + IBaseLabelProvider labelProvider, + String helpId, + boolean parentManagePane) { + + super(parentPane, parent, true, parentManagePane); initialize( adapter, @@ -132,7 +166,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> * one item or no items are selected, then <code>null</code> will be passed * @param labelProvider The renderer used to format the list holder's items */ - protected AddRemovePane(AbstractPane<?> parentPane, + protected AddRemovePane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, Adapter adapter, @@ -165,7 +199,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> * @param labelProvider The renderer used to format the list holder's items * @param helpId The topic help ID to be registered with this pane */ - protected AddRemovePane(AbstractPane<?> parentPane, + protected AddRemovePane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, Adapter adapter, @@ -235,8 +269,8 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> /** * @category Add */ - protected Button buildAddButton(Composite parent) { - return buildButton( + protected Button addAddButton(Composite parent) { + return addUnmanagedButton( parent, adapter.addButtonText(), buildAddItemAction() @@ -337,8 +371,8 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> /** * @category Option */ - protected Button buildOptionalButton(Composite container) { - return buildButton( + protected Button addOptionalButton(Composite container) { + return addUnmanagedButton( container, adapter.optionalButtonText(), buildOptionalAction() @@ -348,8 +382,8 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> /** * @category Add */ - protected Button buildRemoveButton(Composite parent) { - return buildButton( + protected Button addRemoveButton(Composite parent) { + return addUnmanagedButton( parent, adapter.removeButtonText(), buildRemoveItemsAction() @@ -463,7 +497,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> */ protected void initializeButtonPane(Composite container, String helpId) { - container = buildSubPane(container); + container = addSubPane(container); GridData gridData = new GridData(); gridData.grabExcessVerticalSpace = true; @@ -471,35 +505,32 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> container.setLayoutData(gridData); // Add button - addButton = buildAddButton(container); - addAlignRight(addButton); - removeFromEnablementControl(addButton); + this.addButton = addAddButton(container); + addAlignRight(this.addButton); // Custom button addCustomButtonAfterAddButton(container, helpId); // Optional button - if (adapter.hasOptionalButton()) { - optionalButton = buildOptionalButton(container); - removeFromEnablementControl(optionalButton); - addAlignRight(optionalButton); + if (this.adapter.hasOptionalButton()) { + this.optionalButton = addOptionalButton(container); + addAlignRight(this.optionalButton); } // Custom button addCustomButtonAfterOptionalButton(container, helpId); // Remove button - removeButton = buildRemoveButton(container); - removeFromEnablementControl(removeButton); + removeButton = addRemoveButton(container); addAlignRight(removeButton); // Update the help topic ID if (helpId != null) { - helpSystem().setHelp(addButton, helpId); - helpSystem().setHelp(removeButton, helpId); + getHelpSystem().setHelp(addButton, helpId); + getHelpSystem().setHelp(removeButton, helpId); if (optionalButton != null) { - helpSystem().setHelp(optionalButton, helpId); + getHelpSystem().setHelp(optionalButton, helpId); } } } @@ -534,7 +565,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> helpId); initializeButtonPane(container, helpId); - enableWidgets(subject() != null); + enableWidgets(getSubject() != null); } /** @@ -542,7 +573,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> */ @Override protected void initializeLayout(Composite container) { - this.container = buildSubPane(container, 2, 0, 0, 0, 0); + this.container = addSubPane(container, 2, 0, 0, 0, 0); } /** @@ -608,7 +639,7 @@ public abstract class AddRemovePane<T extends Model> extends AbstractPane<T> protected void updateAddButton(Button addButton) { addButton.setEnabled( enabled && - subject() != null + getSubject() != null ); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveTablePane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveTablePane.java index 4d16676401..a5503c98fe 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveTablePane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AddRemoveTablePane.java @@ -73,7 +73,7 @@ public abstract class AddRemoveTablePane<T extends Model> extends AddRemovePane< * one item or no items are selected, then <code>null</code> will be passed * @param labelProvider The renderer used to format the list holder's items */ - public AddRemoveTablePane(AbstractPane<? extends T> parentPane, + public AddRemoveTablePane(Pane<? extends T> parentPane, Composite parent, Adapter adapter, ListValueModel<?> listHolder, @@ -101,7 +101,7 @@ public abstract class AddRemoveTablePane<T extends Model> extends AddRemovePane< * @param labelProvider The renderer used to format the list holder's items * @param helpId The topic help ID to be registered with this pane */ - public AddRemoveTablePane(AbstractPane<? extends T> parentPane, + public AddRemoveTablePane(Pane<? extends T> parentPane, Composite parent, Adapter adapter, ListValueModel<?> listHolder, @@ -130,7 +130,7 @@ public abstract class AddRemoveTablePane<T extends Model> extends AddRemovePane< * one item or no items are selected, then <code>null</code> will be passed * @param labelProvider The renderer used to format the list holder's items */ - public AddRemoveTablePane(AbstractPane<?> parentPane, + public AddRemoveTablePane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, Adapter adapter, @@ -160,7 +160,7 @@ public abstract class AddRemoveTablePane<T extends Model> extends AddRemovePane< * @param labelProvider The renderer used to format the list holder's items * @param helpId The topic help ID to be registered with this pane */ - public AddRemoveTablePane(AbstractPane<?> parentPane, + public AddRemoveTablePane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, Adapter adapter, @@ -249,11 +249,9 @@ public abstract class AddRemoveTablePane<T extends Model> extends AddRemovePane< IBaseLabelProvider labelProvider, String helpId) { - table = buildTable(container, helpId); + table = addUnmanagedTable(container, helpId); table.setHeaderVisible(true); - removeFromEnablementControl(table); - TableModelAdapter<Object> tableModel = TableModelAdapter.adapt( (ListValueModel<Object>) listHolder, buildSelectedItemHolder(), diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractChooserPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ChooserPane.java index 0c28ac9214..05e3e1d302 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractChooserPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ChooserPane.java @@ -26,7 +26,7 @@ import org.eclipse.swt.widgets.Control; * @version 2.0 * @since 2.0 */ -public abstract class AbstractChooserPane<T extends Model> extends AbstractPane<T> +public abstract class ChooserPane<T extends Model> extends Pane<T> { /** * The control shown after the label (left control). @@ -39,25 +39,25 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< private Control rightControl; /** - * Creates a new <code>AbstractChooserPane</code>. + * Creates a new <code>ChooserPane</code>. * * @param parentPane The parent pane of this one * @param parent The parent container */ - public AbstractChooserPane(AbstractPane<? extends T> parentPane, + public ChooserPane(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); } /** - * Creates a new <code>AbstractChooserPane</code>. + * Creates a new <code>ChooserPane</code>. * * @param parentPane The parent container of this one * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public AbstractChooserPane(AbstractPane<?> parentPane, + public ChooserPane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -70,8 +70,8 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< * * @return "Browse..." */ - protected String browseButtonText() { - return JptUiMessages.AbstractChooserPane_browseButton; + protected String getBrowseButtonText() { + return JptUiMessages.ChooserPane_browseButton; } /** @@ -90,8 +90,8 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< * @param container The parent container * @return The newly created left control */ - protected Control buildLeftControl(Composite container) { - return buildLabel(container, labelText()); + protected Control addLeftControl(Composite container) { + return addLabel(container, getLabelText()); } /** @@ -100,7 +100,7 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< * @param container The parent container * @return The newly created main control */ - protected abstract Control buildMainControl(Composite container); + protected abstract Control addMainControl(Composite container); /** * Creates the right control. By default a browse button is created and its @@ -110,10 +110,10 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< * @param container The parent container * @return The newly created right control */ - protected Control buildRightControl(Composite container) { - return buildButton( + protected Control addRightControl(Composite container) { + return addButton( container, - browseButtonText(), + getBrowseButtonText(), buildBrowseAction() ); } @@ -140,7 +140,7 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< * * @return <code>null</code> is returned otherwise the subclass can return an ID */ - protected String helpId() { + protected String getHelpId() { return null; } @@ -150,15 +150,15 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< @Override protected void initializeLayout(Composite container) { - mainControl = buildMainControl(container); - rightControl = buildRightControl(container); + mainControl = addMainControl(container); + rightControl = addRightControl(container); - buildLabeledComposite( + addLabeledComposite( container, - buildLeftControl(container), + addLeftControl(container), mainControl, rightControl, - helpId() + getHelpId() ); } @@ -169,5 +169,5 @@ public abstract class AbstractChooserPane<T extends Model> extends AbstractPane< * @return The localized text of the left control (which is a label by * default) */ - protected abstract String labelText(); + protected abstract String getLabelText(); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ClassChooserPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ClassChooserPane.java index 9e18102b33..ce9d0c02c3 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ClassChooserPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ClassChooserPane.java @@ -49,7 +49,7 @@ import org.eclipse.ui.progress.IProgressService; * @since 2.0 */ @SuppressWarnings("nls") -public abstract class ClassChooserPane<T extends Model> extends AbstractChooserPane<T> +public abstract class ClassChooserPane<T extends Model> extends ChooserPane<T> { /** * The code completion manager. @@ -62,7 +62,7 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP * @param parentPane The parent pane of this one * @param parent The parent container */ - public ClassChooserPane(AbstractPane<? extends T> parentPane, + public ClassChooserPane(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -75,7 +75,7 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public ClassChooserPane(AbstractPane<?> parentPane, + public ClassChooserPane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -98,9 +98,9 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP * {@inheritDoc} */ @Override - protected Control buildMainControl(Composite container) { + protected Control addMainControl(Composite container) { - Text text = buildText(container, buildTextHolder()); + Text text = addText(container, buildTextHolder()); ControlContentAssistHelper.createTextContentAssistant( text, @@ -125,7 +125,7 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP */ protected IType chooseType() { - IPackageFragmentRoot root = packageFragmentRoot(); + IPackageFragmentRoot root = getPackageFragmentRoot(); if (root == null) { return null; @@ -138,12 +138,12 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP try { typeSelectionDialog = JavaUI.createTypeDialog( - shell(), + getShell(), service, scope, IJavaElementSearchConstants.CONSIDER_CLASSES, false, - className() != null ? ClassTools.shortNameForClassNamed(className()) : "" + getClassName() != null ? ClassTools.shortNameForClassNamed(getClassName()) : "" ); } catch (JavaModelException e) { @@ -166,7 +166,7 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP * * @return The class name or <code>null</code> if none is defined */ - protected abstract String className(); + protected abstract String getClassName(); /** * {@inheritDoc} @@ -194,7 +194,7 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP * @return Either the root of the package fragment or <code>null</code> if it * can't be retrieved */ - protected abstract IPackageFragmentRoot packageFragmentRoot(); + protected abstract IPackageFragmentRoot getPackageFragmentRoot(); /** * The browse button was clicked, its action invokes this action which should @@ -204,8 +204,8 @@ public abstract class ClassChooserPane<T extends Model> extends AbstractChooserP private void updatePackageFragment() { - if (subject() != null) { - IPackageFragmentRoot root = packageFragmentRoot(); + if (getSubject() != null) { + IPackageFragmentRoot root = getPackageFragmentRoot(); if (root != null) { javaTypeCompletionProcessor.setPackageFragment(root.getPackageFragment("")); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/Dialog.java index 5a269e9aa1..0b21714aee 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/Dialog.java @@ -28,23 +28,23 @@ import org.eclipse.ui.help.IWorkbenchHelpSystem; * The abstract implementation of a dialog using a "state object" (model object) * for behavior. * <p> - * The main pane of this dialog should be extending <code>AbstractDialogPane</code> + * The main pane of this dialog should be extending <code>DialogPane</code> * for creating the right type of widgets and it has the "state object" (subject) * behavior built-in. * * @see Node - * @see AbstractDialogPane + * @see DialogPane * * @version 2.0 * @since 2.0 */ @SuppressWarnings("nls") -public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog +public abstract class Dialog<T extends Node> extends TitleAreaDialog { /** * The main content pane of this dialog. */ - private AbstractDialogPane<?> pane; + private DialogPane<?> pane; /** * The holder of the "state object" used by this dialog. @@ -58,21 +58,21 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog private String title; /** - * Creates a new <code>AbstractDialog</code>. + * Creates a new <code>Dialog</code>. * * @param parent The parent shell */ - protected AbstractDialog(Shell parent) { + protected Dialog(Shell parent) { this(parent, ""); } /** - * Creates a new <code>AbstractDialog</code>. + * Creates a new <code>Dialog</code>. * * @param parent The parent shell * @param title The dialog's title */ - protected AbstractDialog(Shell parent, String title) { + protected Dialog(Shell parent, String title) { super(parent); this.title = title; initialize(); @@ -86,7 +86,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog * @param container The container to which the widgets should be added to, * the layout is already set */ - protected abstract AbstractDialogPane<?> buildLayout(Composite container); + protected abstract DialogPane<?> buildLayout(Composite container); /** * Creates the state object (model object) that will be used to keep track @@ -131,7 +131,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog @Override protected void configureShell(Shell shell) { super.configureShell(shell); - shell.setText(title()); + shell.setText(getTitle()); } /** @@ -217,7 +217,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog /** * Determines whether the description area (where a title, description and - * image) should be visible or hidden. <code>AbstractValidatingDialog</code> + * image) should be visible or hidden. <code>ValidatingDialog</code> * automatically show the description area in order to show problems. * * @return <code>false</code> by default, which means the methods used to @@ -235,7 +235,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog * * @category Helper */ - protected final IWorkbenchHelpSystem helpSystem() { + protected final IWorkbenchHelpSystem getHelpSystem() { return PlatformUI.getWorkbench().getHelpSystem(); } @@ -284,7 +284,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog * @param postExecution This interface let the caller to invoke a piece of * code once the dialog is disposed */ - public final void openDialog(PostExecution<? extends AbstractDialog<T>> execution) { + public final void openDialog(PostExecution<? extends Dialog<T>> execution) { SWTUtil.setUserInterfaceActive(false); SWTUtil.show(this, execution); } @@ -294,7 +294,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog * * @return The pane showing the custom widgets */ - AbstractDialogPane<?> pane() { + DialogPane<?> getPane() { return pane; } @@ -304,7 +304,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog * @return The subject of this dialog or <code>null</code> if no subject was * used */ - public T subject() { + public T getSubject() { return subjectHolder.getValue(); } @@ -312,9 +312,9 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog * Returns the holder of the subject. * * @return The subject holder used to be passed to the dialog pane, which is - * an instance of <code>AbstractDialogPane</code> + * an instance of <code>DialogPane</code> */ - protected final PropertyValueModel<T> subjectHolder() { + protected final PropertyValueModel<T> getSubjectHolder() { return subjectHolder; } @@ -325,7 +325,7 @@ public abstract class AbstractDialog<T extends Node> extends TitleAreaDialog * * @return Either the title passed to the constructor or a different title */ - protected String title() { + protected String getTitle() { return title; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractDialogPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/DialogPane.java index 18bf5a5868..1789087f76 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractDialogPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/DialogPane.java @@ -14,31 +14,31 @@ import org.eclipse.jpt.utility.model.value.PropertyValueModel; import org.eclipse.swt.widgets.Composite; /** - * The abstract pane to use when the pane is shown in an <code>AbstractDialog</code>. + * The abstract pane to use when the pane is shown in an <code>Dialog</code>. * - * @see AbstractDialog + * @see Dialog * * @version 2.0 * @since 2.0 */ -public abstract class AbstractDialogPane<T extends Node> extends AbstractPane<T> { +public abstract class DialogPane<T extends Node> extends Pane<T> { /** - * Creates a new <code>AbstractDialog</code>. + * Creates a new <code>DialogPane</code>. * * @param parentPane The parent controller of this one * @param parent The parent container * * @category Constructor */ - protected AbstractDialogPane(AbstractDialogPane<? extends T> parentPane, + protected DialogPane(DialogPane<? extends T> parentPane, Composite parent) { super(parentPane, parent); } /** - * Creates a new <code>AbstractDialogPane</code>. + * Creates a new <code>DialogPane</code>. * * @param parentPane The parent container of this one * @param parent The parent container @@ -49,7 +49,7 @@ public abstract class AbstractDialogPane<T extends Node> extends AbstractPane<T> * * @category Constructor */ - protected AbstractDialogPane(AbstractDialogPane<? extends T> parentPane, + protected DialogPane(DialogPane<? extends T> parentPane, Composite parent, boolean automaticallyAlignWidgets) { @@ -57,7 +57,7 @@ public abstract class AbstractDialogPane<T extends Node> extends AbstractPane<T> } /** - * Creates a new <code>AbstractDialogPane</code>. + * Creates a new <code>DialogPane</code>. * * @param parentPane The parent container of this one * @param subjectHolder The holder of this pane's subject @@ -65,7 +65,7 @@ public abstract class AbstractDialogPane<T extends Node> extends AbstractPane<T> * * @category Constructor */ - protected AbstractDialogPane(AbstractDialogPane<?> parentPane, + protected DialogPane(DialogPane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -73,7 +73,7 @@ public abstract class AbstractDialogPane<T extends Node> extends AbstractPane<T> } /** - * Creates a new <code>AbstractDialogPane</code>. + * Creates a new <code>DialogPane</code>. * * @param parentPane The parent container of this one * @param subjectHolder The holder of this pane's subject @@ -85,7 +85,7 @@ public abstract class AbstractDialogPane<T extends Node> extends AbstractPane<T> * * @category Constructor */ - protected AbstractDialogPane(AbstractDialogPane<?> parentPane, + protected DialogPane(DialogPane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, boolean automaticallyAlignWidgets) { @@ -94,14 +94,14 @@ public abstract class AbstractDialogPane<T extends Node> extends AbstractPane<T> } /** - * Creates a new <code>AbstractDialogPane</code>. + * Creates a new <code>DialogPane</code>. * * @param subjectHolder The holder of this pane's subject * @param parent The parent container * * @category Constructor */ - protected AbstractDialogPane(PropertyValueModel<? extends T> subjectHolder, + protected DialogPane(PropertyValueModel<? extends T> subjectHolder, Composite parent) { super(subjectHolder, parent, DefaultWidgetFactory.instance()); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractEnumComboViewer.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumComboViewer.java index 4c7ff02ba1..6b4d572e07 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractEnumComboViewer.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumComboViewer.java @@ -42,7 +42,7 @@ import org.eclipse.swt.widgets.Composite; * @since 1.0 */ @SuppressWarnings("nls") -abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane<T> +abstract class EnumComboViewer<T extends Model, V> extends Pane<T> { /** * The main widget of this pane. @@ -55,26 +55,26 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< public static final String NULL_VALUE = "null"; /** - * Creates a new <code>AbstractEnumComboViewer</code>. + * Creates a new <code>EnumComboViewer</code>. * * @param parentPane The parent container of this one * @param parent The parent container * @param widgetFactory The factory used to create various widgets */ - AbstractEnumComboViewer(AbstractPane<? extends T> parentPane, + EnumComboViewer(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); } /** - * Creates a new <code>AbstractEnumComboViewer</code>. + * Creates a new <code>EnumComboViewer</code>. * * @param parentPane The parent container of this one * @param parent The parent container * @param widgetFactory The factory used to create various widgets */ - AbstractEnumComboViewer(AbstractPane<?> parentPane, + EnumComboViewer(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -82,13 +82,13 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< } /** - * Creates a new <code>AbstractEnumComboViewer</code>. + * Creates a new <code>EnumComboViewer</code>. * * @param subjectHolder The holder of this pane's subject * @param parent The parent container * @param widgetFactory The factory used to create various widgets */ - AbstractEnumComboViewer(PropertyValueModel<? extends T> subjectHolder, + EnumComboViewer(PropertyValueModel<? extends T> subjectHolder, Composite parent, WidgetFactory widgetFactory) { @@ -102,7 +102,7 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< * @return The combo's choices including the default value */ private Object[] buildChoices() { - V[] choices = choices(); + V[] choices = getChoices(); if (sortChoices()) { Arrays.sort(choices, buildComparator()); } @@ -128,7 +128,7 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< * @param container The container of the combo * @return A new <code>ComboViewer</code> containing the right combo widget */ - abstract ComboViewer buildComboViewer(Composite container); + abstract ComboViewer addComboViewer(Composite container); private Comparator<Object> buildComparator() { return new Comparator<Object>() { @@ -189,7 +189,7 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< @SuppressWarnings("unchecked") private String buildDisplayString(Object value) { if (value == NULL_VALUE) { - V defaultValue = (subject() != null) ? defaultValue() : null; + V defaultValue = (getSubject() != null) ? getDefaultValue() : null; if (defaultValue != null) { String displayString = displayString(defaultValue); @@ -213,7 +213,7 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< } private ISelection buildSelection() { - Object value = (subject() != null) ? getValue() : null; + Object value = (getSubject() != null) ? getValue() : null; if (value == null) { value = NULL_VALUE; @@ -238,7 +238,7 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< * * @return The items to show in the combos */ - protected abstract V[] choices(); + protected abstract V[] getChoices(); /** * Returns the default value, this method is not called if the subject is @@ -247,7 +247,7 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< * @return The value that is declared as being the default when it is not * defined or <code>null</code> if there is no default value */ - protected abstract V defaultValue(); + protected abstract V getDefaultValue(); /** * Returns the displayable string for the given value. @@ -288,7 +288,7 @@ abstract class AbstractEnumComboViewer<T extends Model, V> extends AbstractPane< @Override protected final void initializeLayout(Composite container) { - this.comboViewer = this.buildComboViewer(container); + this.comboViewer = this.addComboViewer(container); this.comboViewer.addSelectionChangedListener(buildSelectionChangedListener()); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumDialogComboViewer.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumDialogComboViewer.java index 40e01305bf..6d42df411a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumDialogComboViewer.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumDialogComboViewer.java @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 2.0 */ -public abstract class EnumDialogComboViewer<T extends Model, V> extends AbstractEnumComboViewer<T, V> +public abstract class EnumDialogComboViewer<T extends Model, V> extends EnumComboViewer<T, V> { /** * Creates a new <code>EnumDialogComboViewer</code>. @@ -31,7 +31,7 @@ public abstract class EnumDialogComboViewer<T extends Model, V> extends Abstract * @param parent The parent container * @param widgetFactory The factory used to create various widgets */ - protected EnumDialogComboViewer(AbstractDialogPane<? extends T> parentPane, + protected EnumDialogComboViewer(DialogPane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -44,7 +44,7 @@ public abstract class EnumDialogComboViewer<T extends Model, V> extends Abstract * @param parent The parent container * @param widgetFactory The factory used to create various widgets */ - protected EnumDialogComboViewer(AbstractDialogPane<?> parentPane, + protected EnumDialogComboViewer(DialogPane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -55,8 +55,8 @@ public abstract class EnumDialogComboViewer<T extends Model, V> extends Abstract * (non-Javadoc) */ @Override - ComboViewer buildComboViewer(Composite container) { - ComboViewer comboViewer = buildComboViewer(container, buildLabelProvider()); + ComboViewer addComboViewer(Composite container) { + ComboViewer comboViewer = addComboViewer(container, buildLabelProvider()); comboViewer.getCombo().setVisibleItemCount(Integer.MAX_VALUE); return comboViewer; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumFormComboViewer.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumFormComboViewer.java index 6f387ab236..6f867d24cb 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumFormComboViewer.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/EnumFormComboViewer.java @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite; * @version 2.0 * @since 1.0 */ -public abstract class EnumFormComboViewer<T extends Model, V> extends AbstractEnumComboViewer<T, V> +public abstract class EnumFormComboViewer<T extends Model, V> extends EnumComboViewer<T, V> { /** * Creates a new <code>EnumFormComboViewer</code>. @@ -31,7 +31,7 @@ public abstract class EnumFormComboViewer<T extends Model, V> extends AbstractEn * @param parent The parent container * @param widgetFactory The factory used to create various widgets */ - protected EnumFormComboViewer(AbstractPane<? extends T> parentPane, + protected EnumFormComboViewer(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -44,7 +44,7 @@ public abstract class EnumFormComboViewer<T extends Model, V> extends AbstractEn * @param parent The parent container * @param widgetFactory The factory used to create various widgets */ - protected EnumFormComboViewer(AbstractPane<?> parentPane, + protected EnumFormComboViewer(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -55,8 +55,8 @@ public abstract class EnumFormComboViewer<T extends Model, V> extends AbstractEn * (non-Javadoc) */ @Override - ComboViewer buildComboViewer(Composite container) { - ComboViewer comboViewer = buildCComboViewer(container, buildLabelProvider()); + ComboViewer addComboViewer(Composite container) { + ComboViewer comboViewer = addCComboViewer(container, buildLabelProvider()); comboViewer.getCCombo().setVisibleItemCount(Integer.MAX_VALUE); return comboViewer; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FileChooserPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FileChooserPane.java index 764aa02ddc..f1fffc3f46 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FileChooserPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FileChooserPane.java @@ -43,7 +43,7 @@ import org.eclipse.ui.views.navigator.ResourceComparator; * @since 2.0 */ @SuppressWarnings("nls") -public abstract class FileChooserPane<T extends Model> extends AbstractChooserPane<T> +public abstract class FileChooserPane<T extends Model> extends ChooserPane<T> { private WritablePropertyValueModel<String> textHolder; @@ -53,7 +53,7 @@ public abstract class FileChooserPane<T extends Model> extends AbstractChooserPa * @param parentPane The parent pane of this one * @param parent The parent container */ - public FileChooserPane(AbstractPane<? extends T> parentPane, + public FileChooserPane(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -66,7 +66,7 @@ public abstract class FileChooserPane<T extends Model> extends AbstractChooserPa * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public FileChooserPane(AbstractPane<?> parentPane, + public FileChooserPane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -107,8 +107,8 @@ public abstract class FileChooserPane<T extends Model> extends AbstractChooserPa * (non-Javadoc) */ @Override - protected Control buildMainControl(Composite container) { - return buildText(container, textHolder); + protected Control addMainControl(Composite container) { + return addText(container, textHolder); } private PostExecution<ElementTreeSelectionDialog> buildSelectionDialogPostExecution() { @@ -153,14 +153,14 @@ public abstract class FileChooserPane<T extends Model> extends AbstractChooserPa * @return A non-<code>null</code> string shown above the text field of the * selection dialog */ - protected abstract String dialogMessage(); + protected abstract String getDialogMessage(); /** * Returns the selection dialog's title. * * @return A non-<code>null</code> string */ - protected abstract String dialogTitle(); + protected abstract String getDialogTitle(); /** * Retrieves the root input that will be used by the selection dialog. @@ -185,15 +185,15 @@ public abstract class FileChooserPane<T extends Model> extends AbstractChooserPa protected void promptFile() { ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog( - shell(), + getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider() ); dialog.setHelpAvailable(false); dialog.setValidator(buildValidator()); - dialog.setTitle(dialogTitle()); - dialog.setMessage(dialogMessage()); + dialog.setTitle(getDialogTitle()); + dialog.setMessage(getDialogMessage()); dialog.addFilter(buildFilter()); dialog.setInput(getDialogInput()); dialog.setComparator(new ResourceComparator(ResourceComparator.NAME)); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FolderChooserPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FolderChooserPane.java index 618578bc65..0fc53b644b 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FolderChooserPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FolderChooserPane.java @@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.DirectoryDialog; * @version 2.0 * @since 2.0 */ -public abstract class FolderChooserPane<T extends Model> extends AbstractChooserPane<T> +public abstract class FolderChooserPane<T extends Model> extends ChooserPane<T> { private WritablePropertyValueModel<String> textHolder; @@ -40,7 +40,7 @@ public abstract class FolderChooserPane<T extends Model> extends AbstractChooser * @param parentPane The parent pane of this one * @param parent The parent container */ - public FolderChooserPane(AbstractPane<? extends T> parentPane, + public FolderChooserPane(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -53,7 +53,7 @@ public abstract class FolderChooserPane<T extends Model> extends AbstractChooser * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public FolderChooserPane(AbstractPane<?> parentPane, + public FolderChooserPane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -76,8 +76,8 @@ public abstract class FolderChooserPane<T extends Model> extends AbstractChooser * {@inheritDoc} */ @Override - protected Control buildMainControl(Composite container) { - return buildText(container, textHolder); + protected Control addMainControl(Composite container) { + return addText(container, textHolder); } /** @@ -93,14 +93,14 @@ public abstract class FolderChooserPane<T extends Model> extends AbstractChooser * @return A non-<code>null</code> string shown above the text field of the * selection dialog */ - protected abstract String dialogMessage(); + protected abstract String getDialogMessage(); /** * Returns the selection dialog's title. * * @return A non-<code>null</code> string */ - protected abstract String dialogTitle(); + protected abstract String getDialogTitle(); /** * Returns the path that the dialog will use to filter the directories it @@ -132,9 +132,9 @@ public abstract class FolderChooserPane<T extends Model> extends AbstractChooser */ protected void promptFolder() { - DirectoryDialog dialog = new DirectoryDialog(shell()); - dialog.setMessage(dialogMessage()); - dialog.setText(dialogTitle()); + DirectoryDialog dialog = new DirectoryDialog(getShell()); + dialog.setMessage(getDialogMessage()); + dialog.setText(getDialogTitle()); dialog.setFilterPath(filterPath()); String directory = dialog.open(); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractFormPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FormPane.java index 40937a12d5..145240245d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractFormPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/FormPane.java @@ -24,24 +24,24 @@ import org.eclipse.ui.forms.widgets.FormToolkit; * @version 2.0 * @since 2.0 */ -public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> +public abstract class FormPane<T extends Model> extends Pane<T> { /** - * Creates a new <code>AbstractFormPane</code>. + * Creates a new <code>FormPane</code>. * * @param parentPane The parent controller of this one * @param parent The parent container * * @category Constructor */ - protected AbstractFormPane(AbstractFormPane<? extends T> parentPane, + protected FormPane(FormPane<? extends T> parentPane, Composite parent) { super(parentPane, parent); } /** - * Creates a new <code>AbstractFormPane</code>. + * Creates a new <code>FormPane</code>. * * @param parentPane The parent container of this one * @param parent The parent container @@ -52,7 +52,7 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> * * @category Constructor */ - protected AbstractFormPane(AbstractFormPane<? extends T> parentPane, + protected FormPane(FormPane<? extends T> parentPane, Composite parent, boolean automaticallyAlignWidgets) { @@ -60,7 +60,7 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> } /** - * Creates a new <code>AbstractFormPane</code>. + * Creates a new <code>FormPane</code>. * * @param parentPane The parent container of this one * @param subjectHolder The holder of this pane's subject @@ -68,7 +68,7 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> * * @category Constructor */ - protected AbstractFormPane(AbstractFormPane<?> parentPane, + protected FormPane(FormPane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -76,7 +76,7 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> } /** - * Creates a new <code>AbstractFormPane</code>. + * Creates a new <code>FormPane</code>. * * @param parentPane The parent container of this one * @param subjectHolder The holder of this pane's subject @@ -88,16 +88,38 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> * * @category Constructor */ - protected AbstractFormPane(AbstractFormPane<?> parentPane, + protected FormPane(FormPane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, boolean automaticallyAlignWidgets) { super(parentPane, subjectHolder, parent, automaticallyAlignWidgets); } + + /** + * Creates a new <code>FormPane</code>. + * + * @param parentPane The parent container of this one + * @param subjectHolder The holder of this pane's subject + * @param parent The parent container + * @param widgetFactory The factory used to create various widgets + * @param automaticallyAlignWidgets <code>true</code> to make the widgets + * this pane aligned with the widgets of the given parent controller; + * <code>false</code> to not align them + * + * @category Constructor + */ + protected FormPane(FormPane<?> parentPane, + PropertyValueModel<? extends T> subjectHolder, + Composite parent, + boolean automaticallyAlignWidgets, + boolean parentManagePane) { + + super(parentPane, subjectHolder, parent, automaticallyAlignWidgets, parentManagePane); + } /** - * Creates a new <code>AbstractFormPane</code>. + * Creates a new <code>FormPane</code>. * * @param subjectHolder The holder of this pane's subject * @param parent The parent container @@ -105,7 +127,7 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> * * @category Constructor */ - protected AbstractFormPane(PropertyValueModel<? extends T> subjectHolder, + protected FormPane(PropertyValueModel<? extends T> subjectHolder, Composite parent, WidgetFactory widgetFactory) { @@ -113,7 +135,7 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> } /** - * Creates a new <code>AbstractFormPane</code>. + * Creates a new <code>FormPane</code>. * * @param subjectHolder The holder of this pane's subject * @param parent The parent container @@ -121,7 +143,7 @@ public abstract class AbstractFormPane<T extends Model> extends AbstractPane<T> * * @category Constructor */ - protected AbstractFormPane(PropertyValueModel<? extends T> subjectHolder, + protected FormPane(PropertyValueModel<? extends T> subjectHolder, Composite parent, FormToolkit widgetFactory) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/NewNameDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/NewNameDialog.java index 9632ba0e10..3fb83f8b52 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/NewNameDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/NewNameDialog.java @@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.Text; * @version 2.0 * @since 2.0 */ -public class NewNameDialog extends AbstractValidatingDialog<NewNameStateObject> +public class NewNameDialog extends ValidatingDialog<NewNameStateObject> { private String description; private Image descriptionImage; @@ -67,8 +67,8 @@ public class NewNameDialog extends AbstractValidatingDialog<NewNameStateObject> * (non-Javadoc) */ @Override - protected AbstractDialogPane<NewNameStateObject> buildLayout(Composite container) { - return new DialogPane(container); + protected DialogPane<NewNameStateObject> buildLayout(Composite container) { + return new NewNameDialogPane(container); } /* @@ -86,7 +86,7 @@ public class NewNameDialog extends AbstractValidatingDialog<NewNameStateObject> public void create() { super.create(); - DialogPane pane = (DialogPane) pane(); + NewNameDialogPane pane = (NewNameDialogPane) getPane(); pane.selectAll(); getButton(OK).setEnabled(false); @@ -96,7 +96,7 @@ public class NewNameDialog extends AbstractValidatingDialog<NewNameStateObject> * (non-Javadoc) */ @Override - protected String description() { + protected String getDescription() { return description; } @@ -104,14 +104,14 @@ public class NewNameDialog extends AbstractValidatingDialog<NewNameStateObject> * (non-Javadoc) */ @Override - protected Image descriptionImage() { + protected Image getDescriptionImage() { return descriptionImage; } /* (non-Javadoc) */ @Override - protected String descriptionTitle() { + protected String getDescriptionTitle() { return descriptionTitle; } @@ -121,15 +121,15 @@ public class NewNameDialog extends AbstractValidatingDialog<NewNameStateObject> * @return The name the user entered */ public String getName() { - return subject().getName(); + return getSubject().getName(); } - private class DialogPane extends AbstractDialogPane<NewNameStateObject> { + private class NewNameDialogPane extends DialogPane<NewNameStateObject> { private Text text; - DialogPane(Composite parent) { - super(NewNameDialog.this.subjectHolder(), parent); + NewNameDialogPane(Composite parent) { + super(NewNameDialog.this.getSubjectHolder(), parent); } private WritablePropertyValueModel<String> buildNameHolder() { @@ -152,7 +152,7 @@ public class NewNameDialog extends AbstractValidatingDialog<NewNameStateObject> @Override protected void initializeLayout(Composite container) { - text = buildLabeledText( + text = addLabeledText( container, labelText, buildNameHolder() diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/PackageChooserPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/PackageChooserPane.java index 8d1cb19b2c..4737ff42d0 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/PackageChooserPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/PackageChooserPane.java @@ -45,7 +45,7 @@ import org.eclipse.ui.dialogs.SelectionDialog; * @version 2.0 * @since 2.0 */ -public abstract class PackageChooserPane<T extends Model> extends AbstractChooserPane<T> +public abstract class PackageChooserPane<T extends Model> extends ChooserPane<T> { /** * The code completion manager. @@ -58,7 +58,7 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose * @param parentPane The parent pane of this one * @param parent The parent container */ - public PackageChooserPane(AbstractPane<? extends T> parentPane, + public PackageChooserPane(Pane<? extends T> parentPane, Composite parent) { super(parentPane, parent); @@ -71,7 +71,7 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose * @param subjectHolder The holder of this pane's subject * @param parent The parent container */ - public PackageChooserPane(AbstractPane<?> parentPane, + public PackageChooserPane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -94,7 +94,7 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose * (non-Javadoc) */ @Override - protected Control buildMainControl(Composite container) { + protected Control addMainControl(Composite container) { WritablePropertyValueModel<String> textHolder = buildTextHolder(); @@ -103,7 +103,7 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose buildTextChangeListener() ); - Text text = buildText(container, textHolder); + Text text = addText(container, textHolder); ControlContentAssistHelper.createTextContentAssistant( text, @@ -120,8 +120,8 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose private PropertyChangeListener buildTextChangeListener_() { return new PropertyChangeListener() { public void propertyChanged(PropertyChangeEvent e) { - if (subject() != null) { - IPackageFragmentRoot root = packageFragmentRoot(); + if (getSubject() != null) { + IPackageFragmentRoot root = getPackageFragmentRoot(); if (root != null) { javaPackageCompletionProcessor.setPackageFragmentRoot(root); @@ -150,8 +150,8 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose try { selectionDialog = JavaUI.createPackageDialog( - shell(), - packageFragmentRoot() + getShell(), + getPackageFragmentRoot() ); } catch (JavaModelException e) { @@ -162,7 +162,7 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose selectionDialog.setTitle(JptUiMessages.ClassChooserPane_dialogTitle); selectionDialog.setMessage(JptUiMessages.ClassChooserPane_dialogMessage); - IPackageFragment pack = packageFragment(); + IPackageFragment pack = getPackageFragment(); if (pack != null) { selectionDialog.setInitialSelections(new Object[] { pack }); @@ -188,14 +188,14 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose ); } - private IPackageFragment packageFragment() { - String packageName = packageName(); + private IPackageFragment getPackageFragment() { + String packageName = getPackageName(); if (packageName == null) { return null; } - return packageFragmentRoot().getPackageFragment(packageName); + return getPackageFragmentRoot().getPackageFragment(packageName); } /** @@ -204,14 +204,14 @@ public abstract class PackageChooserPane<T extends Model> extends AbstractChoose * @return Either the root of the package fragment or <code>null</code> if it * can't be retrieved */ - protected abstract IPackageFragmentRoot packageFragmentRoot(); + protected abstract IPackageFragmentRoot getPackageFragmentRoot(); /** * Returns the package name from its subject. * * @return The package name or <code>null</code> if none is defined */ - protected abstract String packageName(); + protected abstract String getPackageName(); /** * The browse button was clicked, its action invokes this action which should diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/Pane.java index 97705009ad..8e4a270bb5 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/Pane.java @@ -63,6 +63,7 @@ import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.widgets.ExpandableComposite; +import org.eclipse.ui.forms.widgets.FormText; import org.eclipse.ui.forms.widgets.Hyperlink; import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.help.IWorkbenchHelpSystem; @@ -80,14 +81,14 @@ import org.eclipse.ui.part.PageBook; * are of interest and {@link #propertyChanged(String)} is used to notify the * pane when the property has changed. * - * @see AbstractFormPane - * @see AbstractDialogPane + * @see FormPane + * @see DialogPane * * @version 2.0 * @since 2.0 */ @SuppressWarnings("nls") -public abstract class AbstractPane<T extends Model> +public abstract class Pane<T extends Model> { /** * The listener registered with the subject in order to be notified when a @@ -102,11 +103,6 @@ public abstract class AbstractPane<T extends Model> private Composite container; /** - * - */ - private ArrayList<AbstractPane<?>> internalPanesForEnablementControl; - - /** * The aligner responsible to align the left controls. */ private ControlAligner leftControlAligner; @@ -137,7 +133,7 @@ public abstract class AbstractPane<T extends Model> * when listeners need to be engaged or disengaged or when to populate its * widgets. */ - private Collection<AbstractPane<?>> subPanes; + private Collection<Pane<?>> subPanes; /** * The factory used to create various common widgets. @@ -149,34 +145,41 @@ public abstract class AbstractPane<T extends Model> * which will have their enablement state updated when * {@link #enableWidgets(boolean)} is called. */ - private ArrayList<Control> widgets; + private ArrayList<Control> managedWidgets; + + /** + * The collection of <code>Pane</code>s that are displayed in this pane, + * which will have their enablement state updated when + * {@link #enableWidgets(boolean)} is called. + */ + private ArrayList<Pane<?>> managedSubPanes; /** - * Creates a new <code>AbstractSubjectPane</code>. + * Creates a new <code>Pane</code>. * * @category Constructor */ @SuppressWarnings("unused") - private AbstractPane() { + private Pane() { super(); } /** - * Creates a new <code>AbstractSubjectPane</code>. + * Creates a new <code>Pane</code>. * * @param parentPane The parent pane of this one * @param parent The parent container * * @category Constructor */ - protected AbstractPane(AbstractPane<? extends T> parentPane, + protected Pane(Pane<? extends T> parentPane, Composite parent) { this(parentPane, parent, true); } /** - * Creates a new <code>AbstractSubjectPane</code>. + * Creates a new <code>Pane</code>. * * @param parentPane The parent container of this one * @param parent The parent container @@ -187,7 +190,7 @@ public abstract class AbstractPane<T extends Model> * * @category Constructor */ - protected AbstractPane(AbstractPane<? extends T> parentPane, + protected Pane(Pane<? extends T> parentPane, Composite parent, boolean automaticallyAlignWidgets) { @@ -198,7 +201,31 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new <code>AbstractSubjectPane</code>. + * Creates a new <code>Pane</code>. + * + * @param parentPane The parent container of this one + * @param parent The parent container + * @param widgetFactory The factory used to create various widgets + * @param automaticallyAlignWidgets <code>true</code> to make the widgets + * this pane aligned with the widgets of the given parent pane; + * <code>false</code> to not align them + * + * @category Constructor + */ + protected Pane(Pane<? extends T> parentPane, + Composite parent, + boolean automaticallyAlignWidgets, + boolean parentManagePane) { + + this(parentPane, + parentPane.getSubjectHolder(), + parent, + automaticallyAlignWidgets, + parentManagePane); + } + + /** + * Creates a new <code>Pane</code>. * * @param parentPane The parent container of this one * @param subjectHolder The holder of this pane's subject @@ -206,7 +233,7 @@ public abstract class AbstractPane<T extends Model> * * @category Constructor */ - protected AbstractPane(AbstractPane<?> parentPane, + protected Pane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent) { @@ -214,7 +241,7 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new <code>AbstractSubjectPane</code>. + * Creates a new <code>Pane</code>. * * @param parentPane The parent container of this one * @param subjectHolder The holder of this pane's subject @@ -226,7 +253,7 @@ public abstract class AbstractPane<T extends Model> * * @category Constructor */ - protected AbstractPane(AbstractPane<?> parentPane, + protected Pane(Pane<?> parentPane, PropertyValueModel<? extends T> subjectHolder, Composite parent, boolean automaticallyAlignWidgets) { @@ -235,11 +262,38 @@ public abstract class AbstractPane<T extends Model> parent, parentPane.getWidgetFactory()); - initialize(parentPane, automaticallyAlignWidgets); + initialize(parentPane, automaticallyAlignWidgets, true); + } + /** + * Creates a new <code>Pane</code>. + * + * @param parentPane The parent container of this one + * @param subjectHolder The holder of this pane's subject + * @param parent The parent container + * @param widgetFactory The factory used to create various widgets + * @param automaticallyAlignWidgets <code>true</code> to make the widgets + * this pane aligned with the widgets of the given parent pane; + * <code>false</code> to not align them + * @param parentManagePane <code>true</code> to have the parent pane manage + * the enabled state of this pane + * + * @category Constructor + */ + protected Pane(Pane<?> parentPane, + PropertyValueModel<? extends T> subjectHolder, + Composite parent, + boolean automaticallyAlignWidgets, + boolean parentManagePane) { + + this(subjectHolder, + parent, + parentPane.getWidgetFactory()); + + initialize(parentPane, automaticallyAlignWidgets, parentManagePane); } /** - * Creates a new <code>AbstractSubjectPane</code>. + * Creates a new <code>Pane</code>. * * @param subjectHolder The holder of this pane's subject * @param parent The parent container @@ -247,7 +301,7 @@ public abstract class AbstractPane<T extends Model> * * @category Constructor */ - protected AbstractPane(PropertyValueModel<? extends T> subjectHolder, + protected Pane(PropertyValueModel<? extends T> subjectHolder, Composite parent, WidgetFactory widgetFactory) { @@ -258,13 +312,104 @@ public abstract class AbstractPane<T extends Model> try { this.populating = true; - this.container = this.buildContainer(parent); + this.container = this.addContainer(parent); this.initializeLayout(this.container); } finally { this.populating = false; } } + + /** + * Initializes this <code>Pane</code>. + * + * @category Initialization + */ + protected void initialize() { + } + + /** + * Registers this pane with the parent pane. + * + * @param parentPane The parent pane + * @param automaticallyAlignWidgets <code>true</code> to make the widgets + * this pane aligned with the widgets of the given parent pane; + * <code>false</code> to not align them + * @param parentManagePane <code>true</code> to have the parent pane manage + * the enabled state of this pane + * + * @category Initialization + */ + private void initialize(Pane<?> parentPane, + boolean automaticallyAlignWidgets, + boolean parentManagePane) { + + // Register this pane with the parent pane, it will call the methods + // automatically (engageListeners(), disengageListeners(), populate(), + // dispose(), etc) + parentPane.registerSubPane(this); + + if (parentManagePane) { + parentPane.manageSubPane(this); + } + + // Align the left and right controls with the controls from the parent + // pane + if (automaticallyAlignWidgets) { + parentPane.leftControlAligner .add(this.leftControlAligner); + parentPane.rightControlAligner.add(this.rightControlAligner); + } + } + + /** + * Initializes this <code>Pane</code>. + * + * @param subjectHolder The holder of this pane's subject + * @param widgetFactory The factory used to create various widgets + * + * @category Initialization + */ + @SuppressWarnings("unchecked") + private void initialize(PropertyValueModel<? extends T> subjectHolder, + WidgetFactory widgetFactory) + { + Assert.isNotNull(subjectHolder, "The subject holder cannot be null"); + + this.subjectHolder = (PropertyValueModel<T>) subjectHolder; + this.widgetFactory = widgetFactory; + this.subPanes = new ArrayList<Pane<?>>(); + this.managedWidgets = new ArrayList<Control>(); + this.managedSubPanes = new ArrayList<Pane<?>>(); + this.leftControlAligner = new ControlAligner(); + this.rightControlAligner = new ControlAligner(); + this.subjectChangeListener = this.buildSubjectChangeListener(); + this.aspectChangeListener = this.buildAspectChangeListener(); + + this.initialize(); + } + + /** + * Initializes the layout of this pane. + * + * @param container The parent container + * + * @category Layout + */ + protected abstract void initializeLayout(Composite container); + + private void manageWidget(Control control) { + if (this.managedWidgets.contains(control)) { + throw new IllegalStateException(); + } + this.managedWidgets.add(control); + } + + private void manageSubPane(Pane<?> subPane) { + if (this.managedSubPanes.contains(subPane)) { + throw new IllegalStateException(); + } + this.managedSubPanes.add(subPane); + } /** * Adds the given pane's widgets (those that were registered with its @@ -276,7 +421,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final void addAlignLeft(AbstractPane<?> container) { + protected final void addAlignLeft(Pane<?> container) { this.leftControlAligner.add(container.leftControlAligner); } @@ -303,7 +448,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final void addAlignRight(AbstractPane<?> container) { + protected final void addAlignRight(Pane<?> container) { this.rightControlAligner.add(container.rightControlAligner); } @@ -329,7 +474,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final void addPaneForAlignment(AbstractPane<?> container) { + protected final void addPaneForAlignment(Pane<?> container) { addAlignLeft(container); addAlignRight(container); } @@ -344,19 +489,6 @@ public abstract class AbstractPane<T extends Model> protected void addPropertyNames(Collection<String> propertyNames) { } - /** - * Indicates that the given <code>Control</code> has its enablement state - * managed by this pane, i.e. through {@link #enableWidgets(boolean)}. - * - * @param control The <code>Control</code> to manage its enablement state - * automatically - * - * @category Layout - */ - public final void addToEnablementControl(Control control) { - control.setData("enablement", null); - } - private PropertyChangeListener buildAspectChangeListener() { return new SWTPropertyChangeListenerWrapper(buildAspectChangeListener_()); } @@ -366,7 +498,7 @@ public abstract class AbstractPane<T extends Model> public void propertyChanged(PropertyChangeEvent e) { //subject() could have changed or is null because of the possibility of //"jumping" on the UI thread here and a selection change occuring - if (e.getSource() == subject()) { + if (e.getSource() == getSubject()) { updatePane(e.getPropertyName()); } } @@ -383,11 +515,30 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Button buildButton(Composite container, + protected final Button addButton(Composite container, + String text, + final Runnable buttonAction) { + + return this.addButton(container, text, null, buttonAction); + } + + /** + * Creates a new unmanaged <code>Button</code> widget. Unmanaged means + * that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. + * + * @param parent The parent container + * @param buttonText The button's text + * @param buttonAction The action to be invoked when the button is pressed + * @return The newly created <code>Button</code> + * + * @category Layout + */ + protected final Button addUnmanagedButton(Composite container, String text, final Runnable buttonAction) { - return this.buildButton(container, text, null, buttonAction); + return this.addUnmanagedButton(container, text, null, buttonAction); } /** @@ -401,7 +552,31 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Button buildButton(Composite container, + protected final Button addButton(Composite container, + String text, + String helpId, + final Runnable buttonAction) { + + Button button = addUnmanagedButton(container, text, helpId, buttonAction); + this.manageWidget(button); + + return button; + } + + /** + * Creates a new unmanaged <code>Button</code> widget. Unmanaged means + * that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. + * + * @param parent The parent container + * @param buttonText The button's text + * @param helpId The topic help ID to be registered for the new check box + * @param buttonAction The action to be invoked when the button is pressed + * @return The newly created <code>Button</code> + * + * @category Layout + */ + protected final Button addUnmanagedButton(Composite container, String text, String helpId, final Runnable buttonAction) { @@ -415,7 +590,7 @@ public abstract class AbstractPane<T extends Model> }); if (helpId != null) { - helpSystem().setHelp(button, helpId); + getHelpSystem().setHelp(button, helpId); } GridData gridData = new GridData(); @@ -434,10 +609,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final CCombo buildCCombo(Composite container) { + protected final CCombo addCCombo(Composite container) { CCombo combo = this.widgetFactory.createCCombo(container); combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + this.manageWidget(combo); return combo; } @@ -451,11 +627,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> CCombo buildCCombo(Composite container, + protected final <V> CCombo addCCombo(Composite container, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder) { - return this.buildCCombo( + return this.addCCombo( container, listHolder, selectedItemHolder, @@ -475,12 +651,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> CCombo buildCCombo(Composite container, + protected final <V> CCombo addCCombo(Composite container, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter) { - CCombo combo = this.buildCCombo(container); + CCombo combo = this.addCCombo(container); CComboModelAdapter.adapt( listHolder, @@ -502,10 +678,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final ComboViewer buildCComboViewer(Composite container, + protected final ComboViewer addCComboViewer(Composite container, IBaseLabelProvider labelProvider) { - CCombo combo = this.buildCCombo(container); + CCombo combo = this.addCCombo(container); ComboViewer viewer = new ComboViewer(combo); viewer.setLabelProvider(labelProvider); return viewer; @@ -517,19 +693,29 @@ public abstract class AbstractPane<T extends Model> * @param parent The parent container * @param buttonText The button's text * @param booleanHolder The holder of the selection state + * @param helpId The topic help ID to be registered for the new check box * @return The newly created <code>Button</code> * * @category Layout */ - protected final Button buildCheckBox(Composite parent, + protected final Button addCheckBox(Composite parent, String buttonText, - WritablePropertyValueModel<Boolean> booleanHolder) { + WritablePropertyValueModel<Boolean> booleanHolder, + String helpId) { - return this.buildCheckBox(parent, buttonText, booleanHolder, null); + return this.addToggleButton( + parent, + buttonText, + booleanHolder, + helpId, + SWT.CHECK + ); } - + /** - * Creates a new check box using the given information. + * Creates a new unmanaged checkbox <code>Button</code> widget. Unmanaged means + * that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. * * @param parent The parent container * @param buttonText The button's text @@ -539,12 +725,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Button buildCheckBox(Composite parent, + protected final Button addUnmanagedCheckBox(Composite parent, String buttonText, WritablePropertyValueModel<Boolean> booleanHolder, String helpId) { - return this.buildToggleButton( + return this.addUnmanagedToggleButton( parent, buttonText, booleanHolder, @@ -563,10 +749,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildCollapsableSection(Composite container, + protected final Composite addCollapsableSection(Composite container, String sectionText) { - return this.buildCollapsableSection( + return this.addCollapsableSection( container, sectionText, new SimplePropertyValueModel<Boolean>(Boolean.FALSE) @@ -586,12 +772,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - private Composite buildCollapsableSection(Composite container, + private Composite addCollapsableSection(Composite container, String sectionText, int type, PropertyValueModel<Boolean> expandedStateHolder) { - Composite subPane = this.buildSection( + Composite subPane = this.addSection( container, sectionText, ExpandableComposite.TWISTIE | type @@ -623,11 +809,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildCollapsableSection(Composite container, + protected final Composite addCollapsableSection(Composite container, String sectionText, PropertyValueModel<Boolean> expandedStateHolder) { - return this.buildCollapsableSection( + return this.addCollapsableSection( container, sectionText, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE, @@ -647,11 +833,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildCollapsableSubSection(Composite container, + protected final Composite addCollapsableSubSection(Composite container, String sectionText, PropertyValueModel<Boolean> expandedStateHolder) { - return this.buildCollapsableSection( + return this.addCollapsableSection( container, sectionText, SWT.NULL, @@ -667,10 +853,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Combo buildCombo(Composite container) { + protected final Combo addCombo(Composite container) { Combo combo = this.widgetFactory.createCombo(container); combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + this.manageWidget(combo); return combo; } @@ -680,40 +867,18 @@ public abstract class AbstractPane<T extends Model> * @param container The parent container * @param listHolder The <code>ListValueHolder</code> * @param selectedItemHolder The holder of the selected item - * @return The newly created <code>Combo</code> - * - * @category Layout - */ - protected final <V> Combo buildCombo(Composite container, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder) { - - return this.buildCombo( - container, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance() - ); - } - - /** - * Creates a new non-editable <code>Combo</code>. - * - * @param container The parent container - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item * @param stringConverter The converter responsible to transform each item * into a string representation * @return The newly created <code>Combo</code> * * @category Layout */ - protected final <V> Combo buildCombo(Composite container, + protected final <V> Combo addCombo(Composite container, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter) { - Combo combo = this.buildCombo(container); + Combo combo = this.addCombo(container); ComboModelAdapter.adapt( listHolder, @@ -735,10 +900,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final ComboViewer buildComboViewer(Composite container, + protected final ComboViewer addComboViewer(Composite container, IBaseLabelProvider labelProvider) { - Combo combo = this.buildCombo(container); + Combo combo = this.addCombo(container); ComboViewer viewer = new ComboViewer(combo); viewer.setLabelProvider(labelProvider); return viewer; @@ -754,8 +919,8 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected Composite buildContainer(Composite parent) { - return this.buildSubPane(parent); + protected Composite addContainer(Composite parent) { + return this.addSubPane(parent); } /** @@ -766,10 +931,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final CCombo buildEditableCCombo(Composite container) { + protected final CCombo addEditableCCombo(Composite container) { CCombo combo = this.widgetFactory.createEditableCCombo(container); combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + this.manageWidget(combo); return combo; } @@ -779,40 +945,18 @@ public abstract class AbstractPane<T extends Model> * @param container The parent container * @param listHolder The <code>ListValueHolder</code> * @param selectedItemHolder The holder of the selected item - * @return The newly created <code>CCombo</code> - * - * @category Layout - */ - protected final <V> CCombo buildEditableCCombo(Composite container, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder) { - - return this.buildEditableCCombo( - container, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance() - ); - } - - /** - * Creates a new editable <code>CCombo</code>. - * - * @param container The parent container - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item * @param stringConverter The converter responsible to transform each item * into a string representation * @return The newly created <code>CCombo</code> * * @category Layout */ - protected final <V> CCombo buildEditableCCombo(Composite container, + protected final <V> CCombo addEditableCCombo(Composite container, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter) { - CCombo combo = this.buildEditableCCombo(container); + CCombo combo = this.addEditableCCombo(container); CComboModelAdapter.adapt( listHolder, @@ -834,10 +978,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final ComboViewer buildEditableCComboViewer(Composite container, + protected final ComboViewer addEditableCComboViewer(Composite container, IBaseLabelProvider labelProvider) { - CCombo combo = this.buildEditableCCombo(container); + CCombo combo = this.addEditableCCombo(container); ComboViewer viewer = new ComboViewer(combo); viewer.setLabelProvider(labelProvider); return viewer; @@ -851,10 +995,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Combo buildEditableCombo(Composite container) { + protected final Combo addEditableCombo(Composite container) { Combo combo = this.widgetFactory.createEditableCombo(container); combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + this.manageWidget(combo); return combo; } @@ -864,40 +1009,18 @@ public abstract class AbstractPane<T extends Model> * @param container The parent container * @param listHolder The <code>ListValueHolder</code> * @param selectedItemHolder The holder of the selected item - * @return The newly created <code>Combo</code> - * - * @category Layout - */ - protected final <V> Combo buildEditableCombo(Composite container, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder) { - - return this.buildEditableCombo( - container, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance() - ); - } - - /** - * Creates a new editable <code>Combo</code>. - * - * @param container The parent container - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item * @param stringConverter The converter responsible to transform each item * into a string representation * @return The newly created <code>Combo</code> * * @category Layout */ - protected final <V> Combo buildEditableCombo(Composite container, + protected final <V> Combo addEditableCombo(Composite container, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter) { - Combo combo = this.buildEditableCombo(container); + Combo combo = this.addEditableCombo(container); ComboModelAdapter.adapt( listHolder, @@ -919,10 +1042,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final ComboViewer buildEditableComboViewer(Composite container, + protected final ComboViewer addEditableComboViewer(Composite container, IBaseLabelProvider labelProvider) { - Combo combo = this.buildEditableCombo(container); + Combo combo = this.addEditableCombo(container); ComboViewer viewer = new ComboViewer(combo); viewer.setLabelProvider(labelProvider); return viewer; @@ -956,12 +1079,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Hyperlink buildHyperLink(Composite parent, + protected final Hyperlink addHyperlink(Composite parent, String text, final Runnable hyperLinkAction) { Hyperlink link = this.widgetFactory.createHyperlink(parent, text); - this.widgets.add(link); + this.manageWidget(link); link.addMouseListener(new MouseAdapter() { @Override @@ -979,47 +1102,35 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new lable using the given information. + * Creates a new label using the given information. * * @param parent The parent container * @param labelText The label's text * * @category Layout */ - protected final Label buildLabel(Composite container, + protected final Label addLabel(Composite container, String labelText) { - - return this.widgetFactory.createLabel(container, labelText); + + Label label = addUnmanagedLabel(container, labelText); + manageWidget(label); + return label; } /** - * Creates a new container that will have the given center control labeled - * with the given label. + * Creates a new unmanaged <code>Label</code> widget. Unmanaged means + * that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. * - * @param container The parent container - * @param labelText The text of the label - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The newly created <code>CCombo</code> + * @param parent The parent container + * @param labelText The label's text * * @category Layout */ - protected final <V> CCombo buildLabeledCCombo(Composite container, - String labelText, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder, - String helpId) { + protected final Label addUnmanagedLabel(Composite container, + String labelText) { - return this.buildLabeledCCombo( - container, - labelText, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance(), - helpId - ); + return this.widgetFactory.createLabel(container, labelText); } /** @@ -1037,7 +1148,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> CCombo buildLabeledCCombo(Composite container, + protected final <V> CCombo addLabeledCCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, @@ -1045,14 +1156,14 @@ public abstract class AbstractPane<T extends Model> Control rightControl, String helpId) { - CCombo combo = this.buildCCombo( + CCombo combo = this.addCCombo( container, listHolder, selectedItemHolder, stringConverter ); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, (combo.getParent() != container) ? combo.getParent() : combo, @@ -1078,14 +1189,14 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> CCombo buildLabeledCCombo(Composite container, + protected final <V> CCombo addLabeledCCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter, String helpId) { - return this.buildLabeledCCombo( + return this.addLabeledCCombo( container, labelText, listHolder, @@ -1102,131 +1213,6 @@ public abstract class AbstractPane<T extends Model> * * @param container The parent container * @param labelText The text of the label - * @param comboListener The listener that will be notified when the selection - * changes - * @param rightControl The control shown to the right of the main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The newly created <code>CCombo</code> - * - * @category Layout - */ - protected final CCombo buildLabeledCCombo(Composite container, - String labelText, - ModifyListener comboListener, - Control rightControl, - String helpId) { - - CCombo combo = this.buildCCombo(container); - combo.addModifyListener(comboListener); - - this.buildLabeledComposite( - container, - labelText, - (combo.getParent() != container) ? combo.getParent() : combo, - rightControl, - helpId - ); - - return combo; - } - - /** - * Creates a new container that will have the given center control labeled - * with the given label. - * - * @param container The parent container - * @param leftControl The widget shown to the left of the main widget - * @param centerControl The main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The newly created <code>CCombo</code> - * - * @category Layout - */ - protected final CCombo buildLabeledCCombo(Composite container, - String labelText, - ModifyListener comboListener, - String helpId) { - - return this.buildLabeledCCombo( - container, - labelText, - comboListener, - null, - helpId - ); - } - - /** - * Creates a new container that will have a non-editable combo labeled with - * the given text. - * - * @param container The parent container - * @param labelText The text of the label - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item - * @param rightControl The control shown to the right of the main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final <V> Combo buildLabeledCombo(Composite container, - String labelText, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder, - Control rightControl, - String helpId) { - - return this.buildLabeledCombo( - container, - labelText, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance(), - rightControl, - helpId - ); - } - - /** - * Creates a new container that will have the given center control labeled - * with the given label. - * - * @param container The parent container - * @param labelText The text of the label - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final <V> Combo buildLabeledCombo(Composite container, - String labelText, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder, - String helpId) { - - return this.buildLabeledCombo( - container, - labelText, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance(), - helpId - ); - } - - /** - * Creates a new container that will have a non-editable combo labeled with - * the given text. - * - * @param container The parent container - * @param labelText The text of the label * @param listHolder The <code>ListValueHolder</code> * @param selectedItemHolder The holder of the selected item * @param rightControl The control shown to the right of the main widget @@ -1236,7 +1222,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> Combo buildLabeledCombo(Composite container, + protected final <V> Combo addLabeledCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, @@ -1244,14 +1230,14 @@ public abstract class AbstractPane<T extends Model> Control rightControl, String helpId) { - Combo combo = this.buildCombo( + Combo combo = this.addCombo( container, listHolder, selectedItemHolder, stringConverter ); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, (combo.getParent() != container) ? combo.getParent() : combo, @@ -1276,14 +1262,14 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> Combo buildLabeledCombo(Composite container, + protected final <V> Combo addLabeledCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter, String helpId) { - return this.buildLabeledCombo( + return this.addLabeledCombo( container, labelText, listHolder, @@ -1295,68 +1281,6 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new container that will have a non-editable combo labeled with - * the given text. - * - * @param container The parent container - * @param labelText The text of the label - * @param comboListener The listener that will be notified when the selection - * changes - * @param rightControl The control shown to the right of the main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final Combo buildLabeledCombo(Composite container, - String labelText, - ModifyListener comboListener, - Control rightControl, - String helpId) { - - Combo combo = this.buildCombo(container); - combo.addModifyListener(comboListener); - - this.buildLabeledComposite( - container, - labelText, - (combo.getParent() != container) ? combo.getParent() : combo, - rightControl, - helpId - ); - - return combo; - } - - /** - * Creates a new container that will have the given center control labeled - * with the given label. - * - * @param container The parent container - * @param leftControl The widget shown to the left of the main widget - * @param centerControl The main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final Combo buildLabeledCombo(Composite container, - String labelText, - ModifyListener comboListener, - String helpId) { - - return this.buildLabeledCombo( - container, - labelText, - comboListener, - null, - helpId - ); - } - - /** * Creates a new container that will have the given center control labeled * with the given label. * @@ -1370,14 +1294,14 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildLabeledComposite(Composite container, - Control leftControl, + protected final Composite addLabeledComposite(Composite container, + Control leftControl, Control centerControl, Control rightControl, String helpId) { // Container for the label and main composite - container = this.buildSubPane(container, 3, 5, 0, 0, 0); + container = this.addSubPane(container, 3, 5, 0, 0, 0); // Left control GridData gridData = new GridData(); @@ -1388,23 +1312,21 @@ public abstract class AbstractPane<T extends Model> // Re-parent the left control to the new sub pane leftControl.setParent(container); this.leftControlAligner.add(leftControl); - this.widgets.add(leftControl); // Center control centerControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - this.widgets.add(centerControl); // Re-parent the center control to the new sub pane centerControl.setParent(container); // Register the help id for the center control if (helpId != null) { - helpSystem().setHelp(centerControl, helpId); + getHelpSystem().setHelp(centerControl, helpId); } // Right control if (rightControl == null) { - Composite spacer = this.buildPane(container); + Composite spacer = this.addPane(container); spacer.setLayout(this.buildSpacerLayout()); rightControl = spacer; } @@ -1413,7 +1335,7 @@ public abstract class AbstractPane<T extends Model> // Register the help id for the right control if (helpId != null) { - helpSystem().setHelp(rightControl, helpId); + getHelpSystem().setHelp(rightControl, helpId); } } @@ -1423,11 +1345,10 @@ public abstract class AbstractPane<T extends Model> rightControl.setLayoutData(gridData); this.rightControlAligner.add(rightControl); - this.widgets.add(rightControl); return container; } - + /** * Creates a new container that will have the given center control labeled * with the given label. @@ -1441,12 +1362,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildLabeledComposite(Composite container, - Control label, + protected final Composite addLabeledComposite(Composite container, + Control label, Control centerControl, String helpId) { - return this.buildLabeledComposite( + return this.addLabeledComposite( container, label, centerControl, @@ -1456,58 +1377,6 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new container that will have the given center control labeled - * with the given label. - * - * @param container The parent container - * @param label The label used to describe the center control - * @param centerControl The main widget - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final Composite buildLabeledComposite(Composite container, - Label label, - Control centerControl) { - - return this.buildLabeledComposite( - container, - label, - centerControl, - null - ); - } - - /** - * Creates a new container that will have the given center composite labeled - * with the given label text. - * - * @param container The parent container - * @param labelText The text to label the main composite - * @param centerPane The main widget - * @param rightControl The control shown to the right of the main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final Composite buildLabeledComposite(Composite container, - String labelText, - AbstractPane<?> centerPane, - Control rightCentrol, - String helpId) { - - return this.buildLabeledComposite( - container, - labelText, - centerPane.getControl(), - rightCentrol, - helpId - ); - } - - /** * Creates a new container that will have the given center composite labeled * with the given label text. * @@ -1520,12 +1389,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildLabeledComposite(Composite container, + protected final Composite addLabeledComposite(Composite container, String labelText, - AbstractPane<?> centerPane, + Pane<?> centerPane, String helpId) { - return this.buildLabeledComposite( + return this.addLabeledComposite( container, labelText, centerPane.getControl(), @@ -1544,12 +1413,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildLabeledComposite(Composite container, + protected final Composite addLabeledComposite(Composite container, String labelText, Control centerControl) { - return this.buildLabeledComposite( + return this.addLabeledComposite( container, labelText, centerControl, @@ -1566,50 +1435,23 @@ public abstract class AbstractPane<T extends Model> * @param labelText The text to label the main composite * @param centerControl The main widget * @param rightControl The control shown to the right of the main widget - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final Composite buildLabeledComposite(Composite container, - String labelText, - Control centerControl, - Control rightControl) { - - - return this.buildLabeledComposite( - container, - labelText, - centerControl, - rightControl, - null - ); - } - - /** - * Creates a new container that will have the given center composite labeled - * with the given label text. - * - * @param container The parent container - * @param labelText The text to label the main composite - * @param centerControl The main widget - * @param rightControl The control shown to the right of the main widget * @param helpId The topic help ID to be registered for the given center * compositer * @return The container of the label and the given center control * * @category Layout */ - protected final Composite buildLabeledComposite(Composite container, + protected final Composite addLabeledComposite(Composite container, String labelText, Control centerControl, - Control rightCentrol, + Control rightControl, String helpId) { - return this.buildLabeledComposite( + return this.addLabeledComposite( container, - this.buildLabel(container, labelText), + this.addLabel(container, labelText), centerControl, - rightCentrol, + rightControl, helpId ); } @@ -1627,14 +1469,14 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildLabeledComposite(Composite container, + protected final Composite addLabeledComposite(Composite container, String labelText, Control centerControl, String helpId) { - Label label = this.buildLabel(container, labelText); + Label label = this.addLabel(container, labelText); - return this.buildLabeledComposite( + return this.addLabeledComposite( container, label, centerControl, @@ -1643,39 +1485,6 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new container that will have the given center control labeled - * with the given label. - * - * @param container The parent container - * @param labelText The text of the label - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item - * @param rightControl The control shown to the right of the main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The newly created <code>CCombo</code> - * - * @category Layout - */ - protected final <V> CCombo buildLabeledEditableCCombo(Composite container, - String labelText, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder, - Control rightControl, - String helpId) { - - return this.buildLabeledEditableCCombo( - container, - labelText, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance(), - rightControl, - helpId - ); - } - - /** * Creates a new container that will have an editable combo labeled with the * given text. * @@ -1689,13 +1498,13 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> CCombo buildLabeledEditableCCombo(Composite container, + protected final <V> CCombo addLabeledEditableCCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, String helpId) { - return this.buildLabeledEditableCCombo( + return this.addLabeledEditableCCombo( container, labelText, listHolder, @@ -1723,7 +1532,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> CCombo buildLabeledEditableCCombo(Composite container, + protected final <V> CCombo addLabeledEditableCCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, @@ -1731,14 +1540,14 @@ public abstract class AbstractPane<T extends Model> Control rightControl, String helpId) { - CCombo combo = this.buildEditableCCombo( + CCombo combo = this.addEditableCCombo( container, listHolder, selectedItemHolder, stringConverter ); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, (combo.getParent() != container) ? combo.getParent() : combo, @@ -1765,14 +1574,14 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> CCombo buildLabeledEditableCCombo(Composite container, + protected final <V> CCombo addLabeledEditableCCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter, String helpId) { - return this.buildLabeledEditableCCombo( + return this.addLabeledEditableCCombo( container, labelText, listHolder, @@ -1797,16 +1606,16 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final CCombo buildLabeledEditableCCombo(Composite container, + protected final CCombo addLabeledEditableCCombo(Composite container, String labelText, ModifyListener comboListener, Control rightControl, String helpId) { - CCombo combo = this.buildEditableCCombo(container); + CCombo combo = this.addEditableCCombo(container); combo.addModifyListener(comboListener); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, (combo.getParent() != container) ? combo.getParent() : combo, @@ -1831,12 +1640,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final CCombo buildLabeledEditableCCombo(Composite container, + protected final CCombo addLabeledEditableCCombo(Composite container, String labelText, ModifyListener comboListener, String helpId) { - return this.buildLabeledEditableCCombo( + return this.addLabeledEditableCCombo( container, labelText, comboListener, @@ -1861,14 +1670,14 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final CCombo buildLabeledEditableCComboViewer(Composite container, + protected final CCombo addLabeledEditableCComboViewer(Composite container, String labelText, ModifyListener comboListener, ILabelProvider labelProvider, Control rightControl, String helpId) { - ComboViewer comboViewer = this.buildEditableCComboViewer( + ComboViewer comboViewer = this.addEditableCComboViewer( container, labelProvider ); @@ -1876,7 +1685,7 @@ public abstract class AbstractPane<T extends Model> CCombo combo = comboViewer.getCCombo(); combo.addModifyListener(comboListener); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, (combo.getParent() != container) ? combo.getParent() : combo, @@ -1903,80 +1712,17 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final CCombo buildLabeledEditableCComboViewer(Composite container, + protected final CCombo addLabeledEditableCComboViewer(Composite container, String labelText, ModifyListener comboListener, ILabelProvider labelProvider, String helpId) { - return this.buildLabeledEditableCComboViewer( + return this.addLabeledEditableCComboViewer( container, labelText, comboListener, - null, - helpId - ); - } - - /** - * Creates a new container that will have the given center control labeled - * with the given label. - * - * @param container The parent container - * @param labelText The text of the label - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item - * @param rightControl The control shown to the right of the main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The newly created <code>Combo</code> - * - * @category Layout - */ - protected final <V> Combo buildLabeledEditableCombo(Composite container, - String labelText, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder, - Control rightControl, - String helpId) { - - return this.buildLabeledEditableCombo( - container, - labelText, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance(), - rightControl, - helpId - ); - } - - /** - * Creates a new container that will have an editable combo labeled with the - * given text. - * - * @param container The parent container - * @param labelText The text of the label - * @param listHolder The <code>ListValueHolder</code> - * @param selectedItemHolder The holder of the selected item - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The newly created <code>Combo</code> - * - * @category Layout - */ - protected final <V> Combo buildLabeledEditableCombo(Composite container, - String labelText, - ListValueModel<V> listHolder, - WritablePropertyValueModel<V> selectedItemHolder, - String helpId) { - - return this.buildLabeledEditableCombo( - container, - labelText, - listHolder, - selectedItemHolder, - StringConverter.Default.<V>instance(), + labelProvider, null, helpId ); @@ -1999,7 +1745,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> Combo buildLabeledEditableCombo(Composite container, + protected final <V> Combo addLabeledEditableCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, @@ -2007,14 +1753,14 @@ public abstract class AbstractPane<T extends Model> Control rightControl, String helpId) { - Combo combo = this.buildEditableCombo( + Combo combo = this.addEditableCombo( container, listHolder, selectedItemHolder, stringConverter ); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, (combo.getParent() != container) ? combo.getParent() : combo, @@ -2041,14 +1787,14 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final <V> Combo buildLabeledEditableCombo(Composite container, + protected final <V> Combo addLabeledEditableCombo(Composite container, String labelText, ListValueModel<V> listHolder, WritablePropertyValueModel<V> selectedItemHolder, StringConverter<V> stringConverter, String helpId) { - return this.buildLabeledEditableCombo( + return this.addLabeledEditableCombo( container, labelText, listHolder, @@ -2060,149 +1806,6 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new container that will have the given center control labeled - * with the given label. - * - * @param container The parent container - * @param leftControl The widget shown to the left of the main widget - * @param centerControl The main widget - * @param rightControl The control shown to the right of the main widget - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final Combo buildLabeledEditableCombo(Composite container, - String labelText, - ModifyListener comboListener, - Control rightControl, - String helpId) { - - Combo combo = this.buildEditableCombo(container); - combo.addModifyListener(comboListener); - - this.buildLabeledComposite( - container, - labelText, - (combo.getParent() != container) ? combo.getParent() : combo, - rightControl, - helpId - ); - - return combo; - } - - /** - * Creates a new container that will have an editable combo labeled with the - * given text. - * - * @param container The parent container - * @param labelText The text of the label - * @param comboListener The listener that will be notified when the selection - * changes - * @param helpId The topic help ID to be registered for the given center - * compositer - * @return The container of the label and the given center control - * - * @category Layout - */ - protected final Combo buildLabeledEditableCombo(Composite container, - String labelText, - ModifyListener comboListener, - String helpId) { - - return this.buildLabeledEditableCombo( - container, - labelText, - comboListener, - null, - helpId - ); - } - - /** - * Creates a new container that will have a text field as the center control - * labeled with the given label. - * - * @param container The parent container - * @param labelText The text area's label - * @param textHolder The holder of the text field's input - * @return The newly created <code>Text</code> - * - * @category Layout - */ - protected final Text buildLabeledMultiLineText(Composite container, - String labelText, - WritablePropertyValueModel<String> textHolder) { - - return this.buildLabeledMultiLineText( - container, - labelText, - textHolder, - null - ); - } - - /** - * Creates a new container that will have a text field as the center control - * labeled with the given label. - * - * @param container The parent container - * @param labelText The text area's label - * @param textHolder The holder of the text field's input - * @param rightControl The widget to be placed to the right of the text area - * @param helpId The topic help ID to be registered for the text field - * @return The newly created <code>Text</code> - * - * @category Layout - */ - protected final Text buildLabeledMultiLineText(Composite container, - String labelText, - WritablePropertyValueModel<String> textHolder, - Control rightControl, - String helpId) { - - Text text = this.buildMultiLineText(container, textHolder); - - this.buildLabeledComposite( - container, - labelText, - text, - rightControl, - helpId - ); - - return text; - } - - /** - * Creates a new container that will have a text field as the center control - * labeled with the given label. - * - * @param container The parent container - * @param labelText The text area's label - * @param textHolder The holder of the text field's input - * @param lineCount The number of lines the text area should display - * @return The newly created <code>Text</code> - * - * @category Layout - */ - protected final Text buildLabeledMultiLineText(Composite container, - String labelText, - WritablePropertyValueModel<String> textHolder, - int lineCount) { - - return this.buildLabeledMultiLineText( - container, - labelText, - textHolder, - lineCount, - null - ); - } - - /** * Creates a new container that will have a text field as the center control * labeled with the given label. * @@ -2215,15 +1818,15 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildLabeledMultiLineText(Composite container, + protected final Text addLabeledMultiLineText(Composite container, String labelText, WritablePropertyValueModel<String> textHolder, int lineCount, String helpId) { - Text text = this.buildMultiLineText(container, textHolder, lineCount); + Text text = this.addMultiLineText(container, textHolder, lineCount); - container = this.buildLabeledComposite( + container = this.addLabeledComposite( container, labelText, text, @@ -2252,42 +1855,16 @@ public abstract class AbstractPane<T extends Model> * labeled with the given label. * * @param container The parent container - * @param labelText The text area's label * @param textHolder The holder of the text field's input - * @param helpId The topic help ID to be registered for the text field * @return The newly created <code>Text</code> * * @category Layout */ - protected final Text buildLabeledMultiLineText(Composite container, - String labelText, - WritablePropertyValueModel<String> textHolder, - String helpId) { - - return this.buildLabeledMultiLineText( - container, - labelText, - textHolder, - 3, - helpId - ); - } - - /** - * Creates a new container that will have a text field as the center control - * labeled with the given label. - * - * @param container The parent container - * @param textHolder The holder of the text field's input - * @return The newly created <code>Text</code> - * - * @category Layout - */ - protected final Text buildLabeledPasswordText(Composite container, + protected final Text addLabeledPasswordText(Composite container, String labelText, WritablePropertyValueModel<String> textHolder) { - return this.buildLabeledPasswordText( + return this.addLabeledPasswordText( container, labelText, textHolder, @@ -2309,19 +1886,19 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildLabeledPasswordText(Composite container, + protected final Text addLabeledPasswordText(Composite container, String labelText, WritablePropertyValueModel<String> textHolder, - Control rightComponent, + Control rightControl, String helpId) { - Text text = this.buildPasswordText(container, textHolder); + Text text = this.addPasswordText(container, textHolder); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, text, - rightComponent, + rightControl, helpId ); @@ -2339,37 +1916,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildLabeledPasswordText(Composite container, + protected final Text addLabeledPasswordText(Composite container, String labelText, WritablePropertyValueModel<String> textHolder, String helpId) { - return this.buildLabeledPasswordText( - container, - labelText, - textHolder, - null, - helpId - ); - } - - /** - * Creates a new container that will have a text field as the center control - * labeled with the given label. - * - * @param container The parent container - * @param textHolder The holder of the text field's input - * @param helpId The topic help ID to be registered for the text field - * @return The newly created <code>Text</code> - * - * @category Layout - */ - protected final Text buildLabeledPawordText(Composite container, - String labelText, - WritablePropertyValueModel<String> textHolder, - String helpId) { - - return this.buildLabeledPasswordText( + return this.addLabeledPasswordText( container, labelText, textHolder, @@ -2385,98 +1937,6 @@ public abstract class AbstractPane<T extends Model> * @param labelText The label's text * @param numberHolder The holder of the integer value * @param defaultValue The value shown when the holder has <code>null</code> - * @return The newly created <code>Spinner</code> - * - * @category Layout - */ - protected final Spinner buildLabeledSpinner(Composite parent, - String labelText, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue) { - - return this.buildLabeledSpinner( - container, - labelText, - numberHolder, - defaultValue, - 0, - Integer.MAX_VALUE, - null, - null - ); - } - - /** - * Creates a new spinner. - * - * @param parent The parent container - * @param labelText The label's text - * @param numberHolder The holder of the integer value - * @param defaultValue The value shown when the holder has <code>null</code> - * @param rightControl The widget to be placed to the right of spinner - * @return The newly created <code>Spinner</code> - * - * @category Layout - */ - protected final Spinner buildLabeledSpinner(Composite parent, - String labelText, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue, - Control rightControl) { - - return this.buildLabeledSpinner( - container, - labelText, - numberHolder, - defaultValue, - 0, - Integer.MAX_VALUE, - rightControl, - null - ); - } - - /** - * Creates a new spinner. - * - * @param parent The parent container - * @param labelText The label's text - * @param numberHolder The holder of the integer value - * @param defaultValue The value shown when the holder has <code>null</code> - * @param minimumValue The minimum value that the spinner will allow - * @param maximumValue The maximum value that the spinner will allow - * @param rightControl The widget to be placed to the right of spinner - * @return The newly created <code>Spinner</code> - * - * @category Layout - */ - protected final Spinner buildLabeledSpinner(Composite parent, - String labelText, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue, - int minimumValue, - int maximumValue, - Control rightControl) { - - return this.buildLabeledSpinner( - parent, - labelText, - numberHolder, - defaultValue, - minimumValue, - maximumValue, - rightControl, - null - ); - } - - /** - * Creates a new spinner. - * - * @param parent The parent container - * @param labelText The label's text - * @param numberHolder The holder of the integer value - * @param defaultValue The value shown when the holder has <code>null</code> * @param minimumValue The minimum value that the spinner will allow * @param maximumValue The maximum value that the spinner will allow * @param rightControl The widget to be placed to the right of spinner @@ -2485,7 +1945,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Spinner buildLabeledSpinner(Composite parent, + protected final Spinner addLabeledSpinner(Composite parent, String labelText, WritablePropertyValueModel<Integer> numberHolder, int defaultValue, @@ -2494,17 +1954,18 @@ public abstract class AbstractPane<T extends Model> Control rightControl, String helpId) { - Spinner spinner = this.buildSpinner( + Spinner spinner = this.addSpinner( parent, numberHolder, defaultValue, minimumValue, - maximumValue + maximumValue, + helpId ); - - buildLabeledComposite( + Label label = addLabel(parent, labelText); + addLabeledComposite( parent, - labelText, + label, (spinner.getParent() != parent) ? spinner.getParent() : spinner, rightControl, helpId @@ -2517,69 +1978,67 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new spinner. + * Creates a new managed spinner. Managed means that this Pane will + * handle enabling/disabling of this widget if a PaneEnabler is used. * * @param parent The parent container - * @param labelText The label's text * @param numberHolder The holder of the integer value * @param defaultValue The value shown when the holder has <code>null</code> * @param minimumValue The minimum value that the spinner will allow * @param maximumValue The maximum value that the spinner will allow - * @param helpId The topic help ID to be registered for the spinner + * @param helpId The topic help ID to be registered for the new button * @return The newly created <code>Spinner</code> * * @category Layout */ - protected final Spinner buildLabeledSpinner(Composite parent, - String labelText, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue, - int minimumValue, - int maximumValue, - String helpId) { + protected final Spinner addSpinner(Composite parent, + WritablePropertyValueModel<Integer> numberHolder, + int defaultValue, + int minimumValue, + int maximumValue, + String helpId) { - return this.buildLabeledSpinner( - parent, - labelText, - numberHolder, - defaultValue, - 0, - Integer.MAX_VALUE, - null, - helpId - ); + Spinner spinner = addUnmanagedSpinner(parent, numberHolder, defaultValue, minimumValue, maximumValue, helpId); + this.manageWidget(spinner); + return spinner; } /** - * Creates a new spinner. + * Creates a new unmanaged spinner. Unmanaged means that this Pane will + * not handle the enabling/disabling of this widget. The owning object will handle + * it with its own PaneEnabler or ControlEnabler. * * @param parent The parent container - * @param labelText The label's text * @param numberHolder The holder of the integer value * @param defaultValue The value shown when the holder has <code>null</code> - * @param helpId The topic help ID to be registered for the spinner + * @param minimumValue The minimum value that the spinner will allow + * @param maximumValue The maximum value that the spinner will allow + * @param helpId The topic help ID to be registered for the new button * @return The newly created <code>Spinner</code> * * @category Layout */ - protected final Spinner buildLabeledSpinner(Composite parent, - String labelText, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue, - String helpId) { + protected final Spinner addUnmanagedSpinner(Composite parent, + WritablePropertyValueModel<Integer> numberHolder, + int defaultValue, + int minimumValue, + int maximumValue, + String helpId) { - return this.buildLabeledSpinner( - parent, - labelText, - numberHolder, - defaultValue, - 0, - Integer.MAX_VALUE, - null, - null - ); - } + Spinner spinner = this.widgetFactory.createSpinner(parent); + spinner.setMinimum(minimumValue); + spinner.setMaximum(maximumValue); + spinner.setLayoutData(new GridData(GridData.BEGINNING)); + SpinnerModelAdapter.adapt(numberHolder, spinner, defaultValue); + + if (helpId != null) { + getHelpSystem().setHelp(spinner, helpId); + } + + return spinner; + } + /** * Creates a new container that will have a text field as the center control * labeled with the given label. @@ -2590,11 +2049,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildLabeledText(Composite container, + protected final Text addLabeledText(Composite container, String labelText, WritablePropertyValueModel<String> textHolder) { - return this.buildLabeledText(container, labelText, textHolder, null); + return this.addLabeledText(container, labelText, textHolder, null); } /** @@ -2611,16 +2070,15 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildLabeledText(Composite container, + protected final Text addLabeledText(Composite container, String labelText, WritablePropertyValueModel<String> textHolder, Control rightComponent, String helpId) { - Text text = this.buildText(container); - TextFieldModelAdapter.adapt(textHolder, text); + Text text = this.addText(container, textHolder); - this.buildLabeledComposite( + this.addLabeledComposite( container, labelText, text, @@ -2630,6 +2088,39 @@ public abstract class AbstractPane<T extends Model> return text; } + /** + * + * Creates a new container that will have a text field as the center control + * labeled with the given label. + * + * @param container The parent container + * @param labelText The text field's label + * @param rightComponent The component to be placed to the right of the text + * field + * @param textHolder The holder of the text field's input + * @param helpId The topic help ID to be registered for the text field + * @return The newly created <code>Text</code> + * + * @category Layout + */ + protected final Text addLabeledText(Composite container, + Label label, + WritablePropertyValueModel<String> textHolder, + Control rightComponent, + String helpId) { + + Text text = this.addText(container, textHolder); + + this.addLabeledComposite( + container, + label, + text, + rightComponent, + helpId + ); + + return text; + } /** * Creates a new container that will have a text field as the center control @@ -2642,12 +2133,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildLabeledText(Composite container, + protected final Text addLabeledText(Composite container, String labelText, WritablePropertyValueModel<String> textHolder, String helpId) { - return this.buildLabeledText( + return this.addLabeledText( container, labelText, textHolder, @@ -2657,17 +2148,28 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new list and notify the given selection holder when the - * selection changes. If the selection count is different than one than the - * holder will receive <code>null</code>. + * Creates a new container that will have a text field as the center control + * labeled with the given label. * * @param container The parent container - * @return The newly created <code>List</code> + * @param textHolder The holder of the text field's input + * @param helpId The topic help ID to be registered for the text field + * @return The newly created <code>Text</code> * * @category Layout */ - protected final List buildList(Composite container) { - return this.buildList(container, (String) null); + protected final Text addLabeledText(Composite container, + Label label, + WritablePropertyValueModel<String> textHolder, + String helpId) { + + return this.addLabeledText( + container, + label, + textHolder, + null, + helpId + ); } /** @@ -2681,9 +2183,9 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final List buildList(Composite container, String helpId) { + protected final List addList(Composite container, String helpId) { - return this.buildList( + return this.addList( container, new SimplePropertyValueModel<String>(), helpId @@ -2697,20 +2199,27 @@ public abstract class AbstractPane<T extends Model> * * @param container The parent container * @param selectionHolder The holder of the unique selected item + * @param helpId The topic help ID to be registered for the new radio button * @return The newly created <code>List</code> * * @category Layout */ - protected final List buildList(Composite container, - WritablePropertyValueModel<String> selectionHolder) { + protected final List addList(Composite container, + WritablePropertyValueModel<String> selectionHolder, + String helpId) { - return this.buildList(container, selectionHolder, null); - } + List list = this.addList(container, selectionHolder, helpId); + this.manageWidget(list); + return list; + } + /** - * Creates a new list and notify the given selection holder when the + * Creates a new unmanaged list and notify the given selection holder when the * selection changes. If the selection count is different than one than the - * holder will receive <code>null</code>. + * holder will receive <code>null</code>. + * Unmanaged means that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. * * @param container The parent container * @param selectionHolder The holder of the unique selected item @@ -2719,7 +2228,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final List buildList(Composite container, + protected final List addUnmanagedList(Composite container, WritablePropertyValueModel<String> selectionHolder, String helpId) { @@ -2730,10 +2239,9 @@ public abstract class AbstractPane<T extends Model> list.addSelectionListener(buildSelectionListener(selectionHolder)); list.setLayoutData(new GridData(GridData.FILL_BOTH)); - this.widgets.add(list); if (helpId != null) { - helpSystem().setHelp(list, helpId); + getHelpSystem().setHelp(list, helpId); } return list; @@ -2747,10 +2255,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final void buildMultiLineLabel(Composite container, + protected final FormText addMultiLineLabel(Composite container, String labelText) { - this.widgetFactory.createMultiLineLabel(container, labelText); + FormText label = this.widgetFactory.createMultiLineLabel(container, labelText); + manageWidget(label); + return label; } /** @@ -2759,12 +2269,15 @@ public abstract class AbstractPane<T extends Model> * @param container The parent container * @return The newly created <code>Text</code> widget * - * @category Layout */ - protected final Text buildMultiLineText(Composite container) { - return this.buildMultiLineText(container, 3, null); - } + protected final Text addMultiLineText(Composite container) { + Text text = this.widgetFactory.createMultiLineText(container); + this.manageWidget(text); + + return text; + } + /** * Creates a new <code>Text</code> widget that has multiple lines. * @@ -2775,18 +2288,18 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildMultiLineText(Composite container, + protected final Text addMultiLineText(Composite container, int lineCount, String helpId) { - Text text = this.widgetFactory.createMultiLineText(container); - + Text text = this.addMultiLineText(container); + GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.heightHint = text.getLineHeight() * lineCount; text.setLayoutData(gridData); if (helpId != null) { - helpSystem().setHelp(text, helpId); + getHelpSystem().setHelp(text, helpId); } return text; @@ -2796,46 +2309,17 @@ public abstract class AbstractPane<T extends Model> * Creates a new <code>Text</code> widget that has multiple lines. * * @param container The parent container - * @param helpId The topic help ID to be registered for the new text - * @return The newly created <code>Text</code> widget - * - * @category Layout - */ - protected final Text buildMultiLineText(Composite container, String helpId) { - - return this.buildMultiLineText(container, 3, helpId); - } - - /** - * Creates a new <code>Text</code> widget that has multiple lines. - * - * @param container The parent container - * @param textHolder The holder of the text field's input - * @return The newly created <code>Text</code> widget - * - * @category Layout - */ - protected final Text buildMultiLineText(Composite container, - WritablePropertyValueModel<String> textHolder) { - - return this.buildMultiLineText(container, textHolder, null); - } - - /** - * Creates a new <code>Text</code> widget that has multiple lines. - * - * @param container The parent container * @param textHolder The holder of the text field's input * @param lineCount The number of lines the text area should display * @return The newly created <code>Text</code> widget * * @category Layout */ - protected final Text buildMultiLineText(Composite container, + protected final Text addMultiLineText(Composite container, WritablePropertyValueModel<String> textHolder, int lineCount) { - return this.buildMultiLineText(container, textHolder, lineCount, null); + return this.addMultiLineText(container, textHolder, lineCount, null); } /** @@ -2848,34 +2332,17 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildMultiLineText(Composite container, + protected final Text addMultiLineText(Composite container, WritablePropertyValueModel<String> textHolder, int lineCount, String helpId) { - Text text = this.buildMultiLineText(container, lineCount, helpId); + Text text = this.addMultiLineText(container, lineCount, helpId); TextFieldModelAdapter.adapt(textHolder, text); return text; } /** - * Creates a new <code>Text</code> widget that has multiple lines. - * - * @param container The parent container - * @param textHolder The holder of the text field's input - * @param helpId The topic help ID to be registered for the new text - * @return The newly created <code>Text</code> widget - * - * @category Layout - */ - protected final Text buildMultiLineText(Composite container, - WritablePropertyValueModel<String> textHolder, - String helpId) { - - return this.buildMultiLineText(container, textHolder, 3, helpId); - } - - /** * Creates a new <code>PageBook</code> and set the proper layout and layout * data. * @@ -2884,7 +2351,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final PageBook buildPageBook(Composite container) { + protected final PageBook addPageBook(Composite container) { PageBook pageBook = new PageBook(container, SWT.NULL); pageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -2899,7 +2366,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildPane(Composite parent) { + protected final Composite addPane(Composite parent) { return this.widgetFactory.createComposite(parent); } @@ -2912,9 +2379,9 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildPane(Composite container, Layout layout) { + protected final Composite addPane(Composite container, Layout layout) { - container = this.widgetFactory.createComposite(container); + container = this.addPane(container); container.setLayout(layout); container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); return container; @@ -2929,14 +2396,30 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildPasswordText(Composite container, + protected final Text addPasswordText(Composite container, WritablePropertyValueModel<String> textHolder) { + Text text = this.addPasswordText(container); + TextFieldModelAdapter.adapt(textHolder, text); + + return text; + } + + /** + * Creates a new <code>Text</code> widget. + * + * @param container The parent container + * @param textHolder The holder of the text field's input + * @return The newly created <code>Text</code> widget + * + * @category Layout + */ + protected final Text addPasswordText(Composite container) { + Text text = this.widgetFactory.createPasswordText(container); text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - TextFieldModelAdapter.adapt(textHolder, text); - + this.manageWidget(text); return text; } @@ -2950,11 +2433,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Button buildPushButton(Composite parent, + protected final Button addPushButton(Composite parent, String buttonText, final Runnable buttonAction) { - return this.buildPushButton(parent, buttonText, null, buttonAction); + return this.addPushButton(parent, buttonText, null, buttonAction); } /** @@ -2968,13 +2451,13 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Button buildPushButton(Composite parent, + protected final Button addPushButton(Composite parent, String buttonText, String helpId, final Runnable buttonAction) { Button button = this.widgetFactory.createPushButton(parent, buttonText); - + manageWidget(button); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -2985,30 +2468,13 @@ public abstract class AbstractPane<T extends Model> button.setLayoutData(new GridData()); if (helpId != null) { - helpSystem().setHelp(button, helpId); + getHelpSystem().setHelp(button, helpId); } return button; } /** - * Creates a new radio button using the given information. - * - * @param parent The parent container - * @param buttonText The button's text - * @param booleanHolder The holder of the selection state - * @return The newly created <code>Button</code> - * - * @category Layout - */ - protected final Button buildRadioButton(Composite parent, - String buttonText, - WritablePropertyValueModel<Boolean> booleanHolder) { - - return this.buildRadioButton(parent, buttonText, booleanHolder, null); - } - - /** * Creates a new check box using the given information. * * @param parent The parent container @@ -3019,12 +2485,12 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Button buildRadioButton(Composite parent, + protected final Button addRadioButton(Composite parent, String buttonText, WritablePropertyValueModel<Boolean> booleanHolder, String helpId) { - return this.buildToggleButton( + return this.addToggleButton( parent, buttonText, booleanHolder, @@ -3043,10 +2509,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSection(Composite container, + protected final Composite addSection(Composite container, String sectionText) { - return this.buildSection( + return this.addSection( container, sectionText, ExpandableComposite.TITLE_BAR @@ -3066,11 +2532,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - private Composite buildSection(Composite container, + private Composite addSection(Composite container, String sectionText, int type) { - return this.buildSection(container, sectionText, null, type); + return this.addSection(container, sectionText, null, type); } /** @@ -3084,11 +2550,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSection(Composite container, + protected final Composite addSection(Composite container, String sectionText, String description) { - return this.buildSection( + return this.addSection( container, sectionText, description, @@ -3111,7 +2577,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - private Composite buildSection(Composite container, + private Composite addSection(Composite container, String sectionText, String description, int type) { @@ -3121,12 +2587,12 @@ public abstract class AbstractPane<T extends Model> section.setText(sectionText); section.marginWidth = 0; section.marginHeight = 0; - + if (description != null) { section.setDescription(description); } - Composite subPane = this.buildSubPane(section); + Composite subPane = this.addSubPane(section); section.setClient(subPane); return subPane; @@ -3174,91 +2640,6 @@ public abstract class AbstractPane<T extends Model> }; } - /** - * Creates a new spinner. - * - * @param parent The parent container - * @param numberHolder The holder of the integer value - * @param defaultValue The value shown when the holder has <code>null</code> - * @return The newly created <code>Spinner</code> - * - * @category Layout - */ - protected final Spinner buildSpinner(Composite parent, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue) { - - return this.buildSpinner( - parent, - numberHolder, - defaultValue, - 0, - Integer.MAX_VALUE - ); - } - - /** - * Creates a new spinner. - * - * @param parent The parent container - * @param numberHolder The holder of the integer value - * @param defaultValue The value shown when the holder has <code>null</code> - * @param minimumValue The minimum value that the spinner will allow - * @param maximumValue The maximum value that the spinner will allow - * @return The newly created <code>Spinner</code> - * - * @category Layout - */ - protected final Spinner buildSpinner(Composite parent, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue, - int minimumValue, - int maximumValue) { - - return this.buildSpinner( - parent, - numberHolder, - defaultValue, - minimumValue, - maximumValue, - null - ); - } - - /** - * Creates a new spinner. - * - * @param parent The parent container - * @param numberHolder The holder of the integer value - * @param defaultValue The value shown when the holder has <code>null</code> - * @param minimumValue The minimum value that the spinner will allow - * @param maximumValue The maximum value that the spinner will allow - * @param helpId The topic help ID to be registered for the new button - * @return The newly created <code>Spinner</code> - * - * @category Layout - */ - protected final Spinner buildSpinner(Composite parent, - WritablePropertyValueModel<Integer> numberHolder, - int defaultValue, - int minimumValue, - int maximumValue, - String helpId) { - - Spinner spinner = this.widgetFactory.createSpinner(parent); - spinner.setMinimum(minimumValue); - spinner.setMaximum(maximumValue); - spinner.setLayoutData(new GridData(GridData.BEGINNING)); - - SpinnerModelAdapter.adapt(numberHolder, spinner, defaultValue); - - if (helpId != null) { - helpSystem().setHelp(spinner, helpId); - } - - return spinner; - } - private PropertyChangeListener buildSubjectChangeListener() { return new SWTPropertyChangeListenerWrapper(this.buildSubjectChangeListener_()); } @@ -3267,7 +2648,7 @@ public abstract class AbstractPane<T extends Model> return new PropertyChangeListener() { @SuppressWarnings("unchecked") public void propertyChanged(PropertyChangeEvent e) { - AbstractPane.this.subjectChanged((T) e.getOldValue(), (T) e.getNewValue()); + Pane.this.subjectChanged((T) e.getOldValue(), (T) e.getNewValue()); } }; } @@ -3280,8 +2661,8 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSubPane(Composite container) { - return this.buildSubPane(container, 0); + protected final Composite addSubPane(Composite container) { + return this.addSubPane(container, 0); } /** @@ -3293,8 +2674,8 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSubPane(Composite container, int topMargin) { - return this.buildSubPane(container, topMargin, 0); + protected final Composite addSubPane(Composite container, int topMargin) { + return this.addSubPane(container, topMargin, 0); } /** @@ -3307,11 +2688,11 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSubPane(Composite container, + protected final Composite addSubPane(Composite container, int topMargin, int leftMargin) { - return this.buildSubPane(container, topMargin, leftMargin, 0, 0); + return this.addSubPane(container, topMargin, leftMargin, 0, 0); } /** @@ -3328,13 +2709,13 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSubPane(Composite container, + protected final Composite addSubPane(Composite container, int topMargin, int leftMargin, int bottomMargin, int rightMargin) { - return this.buildSubPane( + return this.addSubPane( container, 1, topMargin, @@ -3357,7 +2738,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSubPane(Composite container, + protected final Composite addSubPane(Composite container, int columnCount, int topMargin, int leftMargin, @@ -3372,7 +2753,7 @@ public abstract class AbstractPane<T extends Model> layout.marginBottom = bottomMargin; layout.marginRight = rightMargin; - container = this.buildPane(container, layout); + container = this.addPane(container, layout); return container; } @@ -3387,10 +2768,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Composite buildSubSection(Composite container, + protected final Composite addSubSection(Composite container, String sectionText) { - return this.buildCollapsableSubSection( + return this.addCollapsableSubSection( container, sectionText, new SimplePropertyValueModel<Boolean>(Boolean.TRUE) @@ -3401,29 +2782,26 @@ public abstract class AbstractPane<T extends Model> * Creates a new table. * * @param container The parent container - * @return The newly created <code>Table</code> - * - * @category Layout - */ - protected final Table buildTable(Composite container) { - return this.buildTable(container, null); - } - - /** - * Creates a new table. - * - * @param container The parent container * @param style The style to apply to the table + * @param helpId The topic help ID to be registered for the new table or + * <code>null</code> if no help ID is required * @return The newly created <code>Table</code> * * @category Layout */ - protected final Table buildTable(Composite container, int style) { - return this.buildTable(container, style, null); - } + protected final Table addTable(Composite container, + int style, + String helpId) { + + Table table = addUnmanagedTable(container, style, helpId); + this.manageWidget(table); + return table; + } /** - * Creates a new table. + * Creates a new unmanaged table. Unmanaged means that this Pane will + * not handle the enabling/disabling of this widget. The owning object will handle + * it with its own PaneEnabler or ControlEnabler. * * @param container The parent container * @param style The style to apply to the table @@ -3433,7 +2811,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Table buildTable(Composite container, + protected final Table addUnmanagedTable(Composite container, int style, String helpId) { @@ -3444,10 +2822,9 @@ public abstract class AbstractPane<T extends Model> GridData gridData = new GridData(GridData.FILL_BOTH); gridData.heightHint = table.getItemHeight() * 4; table.setLayoutData(gridData); - this.widgets.add(table); if (helpId != null) { - helpSystem().setHelp(table, helpId); + getHelpSystem().setHelp(table, helpId); } return table; @@ -3463,9 +2840,30 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Table buildTable(Composite container, String helpId) { + protected final Table addTable(Composite container, String helpId) { + + return this.addTable( + container, + SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.MULTI, + helpId + ); + } + + /** + * Creates a new unmanaged table. Unmanaged means that this Pane will + * not handle the enabling/disabling of this widget. The owning object will handle + * it with its own PaneEnabler or ControlEnabler. + * + * @param container The parent container + * @param helpId The topic help ID to be registered for the new table or + * <code>null</code> if no help ID is required + * @return The newly created <code>Table</code> + * + * @category Layout + */ + protected final Table addUnmanagedTable(Composite container, String helpId) { - return this.buildTable( + return this.addUnmanagedTable( container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.MULTI, helpId @@ -3473,15 +2871,32 @@ public abstract class AbstractPane<T extends Model> } /** - * Creates a new <code>Text</code> widget. + * Creates a new managed <code>Text</code> widget. * * @param container The parent container * @return The newly created <code>Text</code> widget * * @category Layout */ - protected final Text buildText(Composite container) { - return this.widgetFactory.createText(container); + protected final Text addText(Composite container) { + Text text = this.addUnmanagedText(container); + this.manageWidget(text); + return text; + } + + /** + * Creates a new unmanaged <code>Text</code> widget. Unmanaged means + * that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. + * + * @param container The parent container + * @return The newly created <code>Text</code> widget + * + * @category Layout + */ + protected final Text addUnmanagedText(Composite container) { + Text text = this.widgetFactory.createText(container); + return text; } /** @@ -3493,18 +2908,41 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildText(Composite container, String helpId) { + protected final Text addText(Composite container, String helpId) { - Text text = this.widgetFactory.createText(container); + Text text = this.addText(container); text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); if (helpId != null) { - helpSystem().setHelp(text, helpId); + getHelpSystem().setHelp(text, helpId); } return text; } + + /** + * Creates a new unmanaged <code>Text</code> widget. Unmanaged means + * that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. + * + * @param container The parent container + * @param helpId The topic help ID to be registered for the new text + * @return The newly created <code>Text</code> widget + * + * @category Layout + */ + protected final Text addUnmanagedText(Composite container, String helpId) { + + Text text = this.addUnmanagedText(container); + text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + if (helpId != null) { + getHelpSystem().setHelp(text, helpId); + } + + return text; + } + /** * Creates a new <code>Text</code> widget. * @@ -3514,10 +2952,10 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildText(Composite container, + protected final Text addText(Composite container, WritablePropertyValueModel<String> textHolder) { - return this.buildText(container, textHolder, null); + return this.addText(container, textHolder, null); } /** @@ -3530,18 +2968,34 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Text buildText(Composite container, + protected final Text addText(Composite container, WritablePropertyValueModel<String> textHolder, String helpId) { - Text text = this.widgetFactory.createText(container); - text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - + Text text = this.addText(container, helpId); TextFieldModelAdapter.adapt(textHolder, text); - if (helpId != null) { - helpSystem().setHelp(text, helpId); - } + return text; + } + + /** + * Creates a new unmanaged <code>Text</code> widget. Unmanaged means + * that this Pane will not handle the enabling/disabling of this widget. + * The owning object will handle it with its own PaneEnabler or ControlEnabler. + * + * @param container The parent container + * @param textHolder The holder of the text field's input + * @param helpId The topic help ID to be registered for the new text + * @return The newly created <code>Text</code> widget + * + * @category Layout + */ + protected final Text addUnmanagedText(Composite container, + WritablePropertyValueModel<String> textHolder, + String helpId) { + + Text text = this.addUnmanagedText(container, helpId); + TextFieldModelAdapter.adapt(textHolder, text); return text; } @@ -3555,8 +3009,8 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Group buildTitledPane(Composite container, String title) { - return this.buildTitledPane(container, title, null); + protected final Group addTitledGroup(Composite container, String title) { + return this.addTitledGroup(container, title, null); } /** @@ -3569,11 +3023,13 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final Group buildTitledPane(Composite container, + protected final Group addTitledGroup(Composite container, String title, String helpId) { Group group = this.widgetFactory.createGroup(container, title); + //manageWidget(group); TODO unsure if I want to manage groups, + //also should probably rename this addUnmanagedTitledPane group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); GridLayout layout = new GridLayout(1, false); @@ -3586,15 +3042,17 @@ public abstract class AbstractPane<T extends Model> group.setLayout(layout); if (helpId != null) { - helpSystem().setHelp(group, helpId); + getHelpSystem().setHelp(group, helpId); } return group; } /** - * Creates a new toggle button (radio button or check box) using the given - * information. + * Creates a new unmanaged new toggle button (radio button or check box). + * Unmanaged means that this Pane will not handle the enabling/disabling + * of this widget. The owning object will handle it with its own PaneEnabler + * or ControlEnabler. * * @param parent The parent container * @param buttonText The button's text @@ -3604,7 +3062,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - private Button buildToggleButton(Composite parent, + private Button addUnmanagedToggleButton(Composite parent, String buttonText, WritablePropertyValueModel<Boolean> booleanHolder, String helpId, @@ -3627,32 +3085,34 @@ public abstract class AbstractPane<T extends Model> button.setLayoutData(new GridData()); BooleanButtonModelAdapter.adapt(booleanHolder, button); - this.widgets.add(button); if (helpId != null) { - helpSystem().setHelp(button, helpId); + getHelpSystem().setHelp(button, helpId); } return button; } - + /** - * Creates a new check box that can have 3 selection states (selected, - * unselected and partially selected. + * Creates a new toggle button (radio button or check box) using the given + * information. * * @param parent The parent container - * @param text The button's text - * @param booleanHolder The holder of the boolean value where <code>null</code> - * means partially selected - * @return The newly created <code>TriStateCheckBox</code> + * @param buttonText The button's text + * @param booleanHolder The holder of the selection state + * @param helpId The topic help ID to be registered for the new button + * @return The newly created <code>Button</code> * * @category Layout */ - protected final TriStateCheckBox buildTriStateCheckBox(Composite parent, - String text, - WritablePropertyValueModel<Boolean> booleanHolder) { - - return this.buildTriStateCheckBox(parent, text, booleanHolder, null); + private Button addToggleButton(Composite parent, + String buttonText, + WritablePropertyValueModel<Boolean> booleanHolder, + String helpId, + int toggleButtonType) { + Button button = addUnmanagedToggleButton(parent, buttonText, booleanHolder, helpId, toggleButtonType); + this.manageWidget(button); + return button; } /** @@ -3668,7 +3128,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final TriStateCheckBox buildTriStateCheckBox(Composite parent, + protected final TriStateCheckBox addTriStateCheckBox(Composite parent, String text, WritablePropertyValueModel<Boolean> booleanHolder, String helpId) { @@ -3679,15 +3139,15 @@ public abstract class AbstractPane<T extends Model> this.getWidgetFactory() ); + this.manageWidget(checkBox.getCheckBox()); + TriStateCheckBoxModelAdapter.adapt( booleanHolder, checkBox ); - this.widgets.add(checkBox.getCheckBox()); - if (helpId != null) { - helpSystem().setHelp(checkBox.getCheckBox(), helpId); + getHelpSystem().setHelp(checkBox.getCheckBox(), helpId); } return checkBox; @@ -3703,46 +3163,18 @@ public abstract class AbstractPane<T extends Model> * means partially selected * @param stringHolder The holder of the string to put in parenthesis after * the check box's text when it is partially selected - * @return The newly created <code>TriStateCheckBox</code> - * - * @category Layout - */ - protected final TriStateCheckBox buildTriStateCheckBoxWithDefault(Composite parent, - String text, - WritablePropertyValueModel<Boolean> booleanHolder, - PropertyValueModel<String> stringHolder) { - - return this.buildTriStateCheckBoxWithDefault( - parent, - text, - booleanHolder, - stringHolder, - null - ); - } - - /** - * Creates a new check box that can have 3 selection states (selected, - * unselected and partially selected. - * - * @param parent The parent container - * @param text The button's text - * @param booleanHolder The holder of the boolean value where <code>null</code> - * means partially selected - * @param stringHolder The holder of the string to put in parenthesis after - * the check box's text when it is partially selected * @param helpId The topic help ID to be registered for the new check box * @return The newly created <code>TriStateCheckBox</code> * * @category Layout */ - protected final TriStateCheckBox buildTriStateCheckBoxWithDefault(Composite parent, + protected final TriStateCheckBox addTriStateCheckBoxWithDefault(Composite parent, String text, WritablePropertyValueModel<Boolean> booleanHolder, PropertyValueModel<String> stringHolder, String helpId) { - TriStateCheckBox checkBox = this.buildTriStateCheckBox( + TriStateCheckBox checkBox = this.addTriStateCheckBox( parent, text, booleanHolder, @@ -3758,45 +3190,6 @@ public abstract class AbstractPane<T extends Model> } /** - * Uninstalls any listeners from the subject in order to stop being notified - * for changes made outside of this panes. - * - * @category Populate - */ - protected void disengageListeners() { - - this.log(Tracing.UI_LAYOUT, " ->disengageListeners()"); - - this.subjectHolder.removePropertyChangeListener( - PropertyValueModel.VALUE, - this.subjectChangeListener - ); - - this.disengageListeners(this.subject()); - - for (AbstractPane<?> subPane : this.subPanes) { - subPane.disengageListeners(); - } - } - - /** - * Removes any property change listeners from the given subject. - * - * @param subject The old subject - * - * @category Populate - */ - protected void disengageListeners(T subject) { - if (subject != null) { -// this.log(" ->disengageListeners() from " + subject); - - for (String propertyName : this.propertyNames()) { - subject.removePropertyChangeListener(propertyName, this.aspectChangeListener); - } - } - } - - /** * Notifies this pane is should dispose itself. * * @category Populate @@ -3839,19 +3232,8 @@ public abstract class AbstractPane<T extends Model> * @category Layout */ private void enableChildren(boolean enabled) { - - // Only update the enablement state of the child widgets if this pane - // has its enablement managed by enableWidgets() (i.e. not done manually) - if (this.isEnablementManaged(container)) { - - for (Control control : this.widgets) { - - // Make sure to check if the child control doesn't have its - // enablement state manually managed - if (this.isEnablementManaged(control)) { - control.setEnabled(enabled); - } - } + for (Control control : this.managedWidgets) { + control.setEnabled(enabled); } } @@ -3865,13 +3247,11 @@ public abstract class AbstractPane<T extends Model> */ public void enableWidgets(boolean enabled) { - if (!container.isDisposed()) { + if (!this.container.isDisposed()) { this.enableChildren(enabled); - for (AbstractPane<?> subPane : this.subPanes) { - if (this.isPaneEnablementManaged(subPane)) { - subPane.enableWidgets(enabled); - } + for (Pane<?> subPane : this.managedSubPanes) { + subPane.enableWidgets(enabled); } } } @@ -3887,9 +3267,9 @@ public abstract class AbstractPane<T extends Model> this.log(Tracing.UI_LAYOUT, " ->engageListeners()"); this.engageSubjectHolder(); - this.engageListeners(this.subject()); + this.engageListeners(this.getSubject()); - for (AbstractPane<?> subPane : this.subPanes) { + for (Pane<?> subPane : this.subPanes) { subPane.engageListeners(); } } @@ -3906,18 +3286,61 @@ public abstract class AbstractPane<T extends Model> // this.log(" ->engageListeners() on " + subject); - for (String propertyName : this.propertyNames()) { + for (String propertyName : this.getPropertyNames()) { subject.addPropertyChangeListener(propertyName, this.aspectChangeListener); } } } + /** + * Uninstalls any listeners from the subject in order to stop being notified + * for changes made outside of this panes. + * + * @category Populate + */ + protected void disengageListeners() { + + this.log(Tracing.UI_LAYOUT, " ->disengageListeners()"); + + this.disengageSubjectHolder(); + + this.disengageListeners(this.getSubject()); + + for (Pane<?> subPane : this.subPanes) { + subPane.disengageListeners(); + } + } + + /** + * Removes any property change listeners from the given subject. + * + * @param subject The old subject + * + * @category Populate + */ + protected void disengageListeners(T subject) { + if (subject != null) { +// this.log(" ->disengageListeners() from " + subject); + + for (String propertyName : this.getPropertyNames()) { + subject.removePropertyChangeListener(propertyName, this.aspectChangeListener); + } + } + } + private void engageSubjectHolder() { this.subjectHolder.addPropertyChangeListener( PropertyValueModel.VALUE, this.subjectChangeListener ); } + + private void disengageSubjectHolder() { + this.subjectHolder.removePropertyChangeListener( + PropertyValueModel.VALUE, + this.subjectChangeListener + ); + } /** * Returns the main <code>Control</code> of this pane. @@ -3962,7 +3385,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final int groupBoxMargin() { + protected final int getGroupBoxMargin() { Group group = this.widgetFactory.createGroup(SWTUtil.getShell(), ""); Rectangle clientArea = group.getClientArea(); group.dispose(); @@ -3976,118 +3399,10 @@ public abstract class AbstractPane<T extends Model> * * @category Helper */ - protected final IWorkbenchHelpSystem helpSystem() { + protected final IWorkbenchHelpSystem getHelpSystem() { return PlatformUI.getWorkbench().getHelpSystem(); } - /** - * Initializes this <code>AbstractSubjectPane</code>. - * - * @category Initialization - */ - protected void initialize() { - } - - /** - * Registers this pane with the parent pane. - * - * @param parentPane The parent pane - * @param automaticallyAlignWidgets <code>true</code> to make the widgets - * this pane aligned with the widgets of the given parent pane; - * <code>false</code> to not align them - * - * @category Initialization - */ - private void initialize(AbstractPane<?> parentPane, - boolean automaticallyAlignWidgets) { - - // Register this pane with the parent pane, it will call the methods - // automatically (engageListeners(), disengageListeners(), populate(), - // dispose(), etc) - parentPane.registerSubPane(this); - - // Align the left and right controls with the controls from the parent - // pane - if (automaticallyAlignWidgets) { - parentPane.leftControlAligner .add(this.leftControlAligner); - parentPane.rightControlAligner.add(this.rightControlAligner); - } - } - - /** - * Initializes this <code>AbstractSubjectPane</code>. - * - * @param subjectHolder The holder of this pane's subject - * @param widgetFactory The factory used to create various widgets - * - * @category Initialization - */ - @SuppressWarnings("unchecked") - private void initialize(PropertyValueModel<? extends T> subjectHolder, - WidgetFactory widgetFactory) - { - Assert.isNotNull(subjectHolder, "The subject holder cannot be null"); - - this.subjectHolder = (PropertyValueModel<T>) subjectHolder; - this.widgetFactory = widgetFactory; - this.subPanes = new ArrayList<AbstractPane<?>>(); - this.widgets = new ArrayList<Control>(); - this.leftControlAligner = new ControlAligner(); - this.rightControlAligner = new ControlAligner(); - this.subjectChangeListener = this.buildSubjectChangeListener(); - this.aspectChangeListener = this.buildAspectChangeListener(); - this.internalPanesForEnablementControl = new ArrayList<AbstractPane<?>>(); - - this.initialize(); - } - - /** - * Initializes the layout of this pane. - * - * @param container The parent container - * - * @category Layout - */ - protected abstract void initializeLayout(Composite container); - - /** - * Determines whether the enablement state is managed by this pane or is - * manually managed. - * - * @param control The <code>Control</code> to verify how its enablement state - * is managed - * @return <code>true</code> if the enablement state can be changed when - * {@link #enableWidgets(boolean)} is called; <code>false</code> if its - * enablement state is manually changed - */ - public final boolean isEnablementManaged(Control control) { - return control.getData("enablement") != Boolean.FALSE; - } - - /** - * Determines whether the given pane has its enablement state managed by this - * pane. - * - * @param subPane The sub-pane to verify how its enablement state is being - * managed - * @return <code>true</code> if the sub-pane's enablement state is managed by - * this state; <code>false</code> if it's manually managed - * - * @category Layout - */ - private boolean isPaneEnablementManaged(AbstractPane<?> subPane) { - - return // Test 1: This pane is being automatically managed and the - // sub-pane was registered has an internal pane, which means its - // enablement state is being managed automatically as well. A - // sub-pane is managed automatically only when PaneEnabler changes - // the enablement management checks - this.isEnablementManaged(container) && - this.internalPanesForEnablementControl.contains(subPane) || - - // Test 2: Check to see if the pane is automatically managed - this.isEnablementManaged(subPane.getControl()); - } /** * Determines whether @@ -4135,7 +3450,7 @@ public abstract class AbstractPane<T extends Model> doDispose(); // Ask the sub-panes to perform the dispose themselves - for (AbstractPane<?> subPane : this.subPanes) { + for (Pane<?> subPane : this.subPanes) { subPane.performDispose(); } } @@ -4172,26 +3487,13 @@ public abstract class AbstractPane<T extends Model> * * @category Populate */ - protected Collection<String> propertyNames() { + protected Collection<String> getPropertyNames() { ArrayList<String> propertyNames = new ArrayList<String>(); addPropertyNames(propertyNames); return propertyNames; } /** - * Registers another <code>AbstractSubjectPane</code> with this one so it can - * be automatically notified about certain events such as engaging or - * disengaging the listeners, etc. - * - * @param subPane The sub-pane to register - * - * @category Controller - */ - protected final void registerSubPane(AbstractPane<?> subPane) { - this.subPanes.add(subPane); - } - - /** * Removes the given pane's widgets (those that were registered with * its left <code>ControlAligner</code>) from this pane's left * <code>ControlAligner</code> so that their width will no longer be adjusted @@ -4201,7 +3503,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final void removeAlignLeft(AbstractPane<?> pane) { + protected final void removeAlignLeft(Pane<?> pane) { this.leftControlAligner.remove(pane.leftControlAligner); } @@ -4229,7 +3531,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final void removeAlignRight(AbstractPane<?> pane) { + protected final void removeAlignRight(Pane<?> pane) { this.rightControlAligner.remove(pane.rightControlAligner); } @@ -4248,30 +3550,6 @@ public abstract class AbstractPane<T extends Model> } /** - * Removes the given <code>AbstractPane</code>'s <code>Control</code> from - * having its enablement state managed by this pane. However, if this pane - * has its enablement state modified, the given pane will receive that - * notification. - * - * @param pane The pane to have its enablement state not managed by this pane - */ - public void removeFromEnablementControl(AbstractPane<?> pane) { - this.removeFromEnablementControl(pane.getControl()); - this.internalPanesForEnablementControl.add(pane); - } - - /** - * Removes the given <code>Control</code> from having its enablement state - * being managed by this pane. - * - * @param control The <code>Control</code> that has its enablement state - * manually controlled - */ - public void removeFromEnablementControl(Control control) { - control.setData("enablement", Boolean.FALSE); - } - - /** * Removes the given pane's controls (those that were registered for * alignment) from this pane. * @@ -4280,7 +3558,7 @@ public abstract class AbstractPane<T extends Model> * * @category Layout */ - protected final void removePaneForAlignment(AbstractPane<?> pane) { + protected final void removePaneForAlignment(Pane<?> pane) { removeAlignLeft(pane); removeAlignRight(pane); } @@ -4305,7 +3583,7 @@ public abstract class AbstractPane<T extends Model> } // Ask the sub-panes to repopulate themselves - for (AbstractPane<?> subPane : this.subPanes) { + for (Pane<?> subPane : this.subPanes) { subPane.repopulate(); } } @@ -4352,7 +3630,7 @@ public abstract class AbstractPane<T extends Model> * * @return The nearest window displaying this pane */ - protected final Shell shell() { + protected final Shell getShell() { return this.container.getShell(); } @@ -4364,7 +3642,7 @@ public abstract class AbstractPane<T extends Model> * * @category Populate */ - protected T subject() { + protected T getSubject() { return this.subjectHolder.getValue(); } @@ -4395,8 +3673,22 @@ public abstract class AbstractPane<T extends Model> } } + /** - * Unregisters the given <code>AbstractSubjectPane</code> from this one so it + * Registers another <code>Pane</code> with this one so it can + * be automatically notified about certain events such as engaging or + * disengaging the listeners, etc. + * + * @param subPane The sub-pane to register + * + * @category Controller + */ + protected final void registerSubPane(Pane<?> subPane) { + this.subPanes.add(subPane); + } + + /** + * Unregisters the given <code>Pane</code> from this one so it * can no longer be automatically notified about certain events such as * engaging or disengaging the listeners, etc. * @@ -4404,19 +3696,19 @@ public abstract class AbstractPane<T extends Model> * * @category Controller */ - protected final void unregisterSubPane(AbstractPane<?> subPane) { + protected final void unregisterSubPane(Pane<?> subPane) { this.subPanes.remove(subPane); } private void updatePane(String propertyName) { - if (!isPopulating() && !container.isDisposed()) { - populating = true; + if (!isPopulating() && !this.container.isDisposed()) { + this.populating = true; try { propertyChanged(propertyName); } finally { - populating = false; + this.populating = false; } } } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractValidatingDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ValidatingDialog.java index 4b70fcd78e..d7e6da104a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/AbstractValidatingDialog.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/widgets/ValidatingDialog.java @@ -18,7 +18,7 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Shell; /** - * This dialog is similar to it superclass, <code>AbstractDialog</code>, with + * This dialog is similar to it superclass, <code>Dialog</code>, with * the added value of an error message label below the main panel. A subclass * can set this error message as needed so that it can inform the user something * incorrect has been entered. @@ -30,24 +30,24 @@ import org.eclipse.swt.widgets.Shell; * @version 2.0 * @since 2.0 */ -public abstract class AbstractValidatingDialog<T extends Node> extends AbstractDialog<T> { +public abstract class ValidatingDialog<T extends Node> extends Dialog<T> { /** - * Creates a new <code>AbstractValidatingDialog</code>. + * Creates a new <code>ValidatingDialog</code>. * * @param parent The parent shell */ - public AbstractValidatingDialog(Shell parent) { + public ValidatingDialog(Shell parent) { super(parent); } /** - * Creates a new <code>AbstractValidatingDialog</code>. + * Creates a new <code>ValidatingDialog</code>. * * @param parent The parent shell * @param title The dialog's title */ - public AbstractValidatingDialog(Shell parent, String title) { + public ValidatingDialog(Shell parent, String title) { super(parent, title); } @@ -64,7 +64,7 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD } public void validate() { - AbstractValidatingDialog.this.validate(); + ValidatingDialog.this.validate(); } }; } @@ -81,7 +81,7 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD * * @return The description under the description's title */ - protected String description() { + protected String getDescription() { return null; } @@ -91,7 +91,7 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD * @return The image of the description pane or <code>null</code> if none is * required */ - protected Image descriptionImage() { + protected Image getDescriptionImage() { return null; } @@ -100,7 +100,7 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD * * @return The title shown in the description pane */ - protected String descriptionTitle() { + protected String getDescriptionTitle() { return null; } @@ -110,7 +110,7 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD @Override protected Point getInitialSize() { Point result = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); - Point paneSize = pane().getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT); + Point paneSize = getPane().getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT); int width = convertHorizontalDLUsToPixels(400); result.x = Math.max(width, paneSize.x); return result; @@ -133,21 +133,21 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD super.initializeUI(); // Update the description title - String descriptionTitle = descriptionTitle(); + String descriptionTitle = getDescriptionTitle(); if (descriptionTitle != null) { setTitle(descriptionTitle); } // Update the description title - String description = description(); + String description = getDescription(); if (description != null) { setMessage(description); } // Update the description image - Image image = descriptionImage(); + Image image = getDescriptionImage(); if (image != null) { setTitleImage(image); @@ -171,8 +171,8 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD * not be shown. */ private void updateErrorMessage() { - if (subject().hasBranchProblems()) { - Problem problem = subject().branchProblems().next(); + if (getSubject().hasBranchProblems()) { + Problem problem = getSubject().branchProblems().next(); setErrorMessage(problem.messageKey(), problem.messageArguments()); } // TODO: It would be nice to add warnings to the model @@ -191,8 +191,8 @@ public abstract class AbstractValidatingDialog<T extends Node> extends AbstractD * the OK button. */ private void validate() { - subject().validateBranch(); + getSubject().validateBranch(); updateErrorMessage(); - getButton(OK).setEnabled(!subject().hasBranchProblems()); + getButton(OK).setEnabled(!getSubject().hasBranchProblems()); } }
\ No newline at end of file diff --git a/jpa/tests/org.eclipse.jpt.ui.tests/META-INF/MANIFEST.MF b/jpa/tests/org.eclipse.jpt.ui.tests/META-INF/MANIFEST.MF index b6222d6a15..7fcf4eb3b3 100644 --- a/jpa/tests/org.eclipse.jpt.ui.tests/META-INF/MANIFEST.MF +++ b/jpa/tests/org.eclipse.jpt.ui.tests/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.jpt.ui.tests Bundle-Version: 1.0.0 -Require-Bundle: org.junit, +Require-Bundle: org.junit4;bundle-version="4.3.1", org.eclipse.core.resources, org.eclipse.core.runtime, diff --git a/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneEnablerTest.java b/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneEnablerTest.java index 53637277fe..65daed02c0 100644 --- a/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneEnablerTest.java +++ b/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneEnablerTest.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.tests.internal.util; import org.eclipse.jpt.ui.internal.util.PaneEnabler; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; import org.eclipse.jpt.utility.internal.node.Node; import org.eclipse.swt.SWT; @@ -46,7 +46,7 @@ public final class PaneEnablerTest { SimplePropertyValueModel<Boolean> booleanHolder = new SimplePropertyValueModel<Boolean>(true); - AbstractDialogPane<Node> pane = new AbstractDialogPane<Node>( + DialogPane<Node> pane = new DialogPane<Node>( new SimplePropertyValueModel<Node>(), parent) { diff --git a/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneVisibilityEnablerTest.java b/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneVisibilityEnablerTest.java index 2d88c9c114..d2e9a7b69f 100644 --- a/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneVisibilityEnablerTest.java +++ b/jpa/tests/org.eclipse.jpt.ui.tests/src/org/eclipse/jpt/ui/tests/internal/util/PaneVisibilityEnablerTest.java @@ -11,7 +11,7 @@ package org.eclipse.jpt.ui.tests.internal.util; import org.eclipse.jpt.ui.internal.util.PaneVisibilityEnabler; import org.eclipse.jpt.ui.internal.util.SWTUtil; -import org.eclipse.jpt.ui.internal.widgets.AbstractDialogPane; +import org.eclipse.jpt.ui.internal.widgets.DialogPane; import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel; import org.eclipse.jpt.utility.internal.node.Node; import org.eclipse.swt.SWT; @@ -46,7 +46,7 @@ public final class PaneVisibilityEnablerTest { SimplePropertyValueModel<Boolean> booleanHolder = new SimplePropertyValueModel<Boolean>(true); - AbstractDialogPane<Node> pane = new AbstractDialogPane<Node>( + DialogPane<Node> pane = new DialogPane<Node>( new SimplePropertyValueModel<Node>(), parent) { |