Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorkmoore2010-04-28 16:25:30 +0000
committerkmoore2010-04-28 16:25:30 +0000
commit1c5333b8044f9b7ae81d4cd51819c5df89425982 (patch)
tree8bac30c9497631a1a529673610d53e0c18c1d04f /jpa
parent2fa190e48fd6d465060e33e8f9b29a2b3f3f3d83 (diff)
downloadwebtools.dali-1c5333b8044f9b7ae81d4cd51819c5df89425982.tar.gz
webtools.dali-1c5333b8044f9b7ae81d4cd51819c5df89425982.tar.xz
webtools.dali-1c5333b8044f9b7ae81d4cd51819c5df89425982.zip
minor layout change to not display the Defaults group on eclipselink 2.0 Cache persistence.xml tab
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java35
2 files changed, 27 insertions, 13 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java
index 54c8115c59..07681dad8a 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/CacheDefaults2_0Composite.java
@@ -35,9 +35,8 @@ public class CacheDefaults2_0Composite extends CacheDefaultsComposite<Caching>
@Override
protected void initializeLayout(Composite parent) {
- super.initializeLayout(parent);
-
- this.installPaneEnabler();
+ this.initializeCacheDefaultsComposites(parent);
+ this.installPaneEnabler();
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java
index bb8e05226a..48dc5bd89f 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/v2_0/persistence/caching/EclipseLinkCaching2_0Composite.java
@@ -17,7 +17,12 @@ import org.eclipse.jpt.ui.internal.jpa2.persistence.options.SharedCacheModeCompo
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.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
/**
* EclipseLinkCaching2_0Composite
@@ -32,19 +37,21 @@ public class EclipseLinkCaching2_0Composite extends EclipseLinkCachingComposite<
@Override
protected void initializeLayout(Composite parent) {
-
- Composite container = this.addSection(
- parent,
- EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionTitle,
- EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionDescription
- );
+ Section section = getWidgetFactory().createSection(parent, SWT.FLAT | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION);
+ section.setText(EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionTitle);
+ section.setDescription(EclipseLinkUiMessages.PersistenceXmlCachingTab_sectionDescription);
+ Composite composite = getWidgetFactory().createComposite(section);
+ composite.setLayout(new GridLayout(1, false));
+ section.setClient(composite);
+ this.updateGridData(composite);
+ this.updateGridData(composite.getParent());
// SharedCacheMode
- new SharedCacheModeComposite(this, this.buildPersistenceUnit2_0Holder(), container);
+ new SharedCacheModeComposite(this, this.buildPersistenceUnit2_0Holder(), composite);
// Defaults
- new CacheDefaults2_0Composite(this, container);
+ new CacheDefaults2_0Composite(this, composite);
// Flush Clear Cache
- new FlushClearCache2_0Composite(this, container);
+ new FlushClearCache2_0Composite(this, composite);
}
private PropertyValueModel<PersistenceUnit2_0> buildPersistenceUnit2_0Holder() {
@@ -55,5 +62,13 @@ public class EclipseLinkCaching2_0Composite extends EclipseLinkCachingComposite<
}
};
}
-
+
+ private void updateGridData(Composite container) {
+ GridData gridData = new GridData();
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.grabExcessVerticalSpace = true;
+ gridData.horizontalAlignment = SWT.FILL;
+ gridData.verticalAlignment = SWT.FILL;
+ container.setLayoutData(gridData);
+ }
} \ No newline at end of file

Back to the top