Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 64018 Details for
Bug 133279
GridLayout generated code points to unavailable package.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
With 71684 fixed, it is possible to add tests for GL in GMF
gmf-133279.patch.txt (text/plain), 9.10 KB, created by
Michael Golubev
on 2007-04-17 06:38:25 EDT
(
hide
)
Description:
With 71684 fixed, it is possible to add tests for GL in GMF
Filename:
MIME Type:
Creator:
Michael Golubev
Created:
2007-04-17 06:38:25 EDT
Size:
9.10 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.graphdef >Index: src/org/eclipse/gmf/gmfgraph/util/PureGEFFigureQualifiedNameSwitch.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/PureGEFFigureQualifiedNameSwitch.java,v >retrieving revision 1.3 >diff -u -r1.3 PureGEFFigureQualifiedNameSwitch.java >--- src/org/eclipse/gmf/gmfgraph/util/PureGEFFigureQualifiedNameSwitch.java 14 Mar 2007 12:59:18 -0000 1.3 >+++ src/org/eclipse/gmf/gmfgraph/util/PureGEFFigureQualifiedNameSwitch.java 17 Apr 2007 10:37:57 -0000 >@@ -19,6 +19,8 @@ > import org.eclipse.gmf.gmfgraph.Ellipse; > import org.eclipse.gmf.gmfgraph.FigureGallery; > import org.eclipse.gmf.gmfgraph.FlowLayout; >+import org.eclipse.gmf.gmfgraph.GridLayout; >+import org.eclipse.gmf.gmfgraph.GridLayoutData; > import org.eclipse.gmf.gmfgraph.Label; > import org.eclipse.gmf.gmfgraph.LabeledContainer; > import org.eclipse.gmf.gmfgraph.Polygon; >@@ -137,4 +139,13 @@ > public String casePolylineConnection(PolylineConnection object) { > return "org.eclipse.draw2d.PolylineConnection"; //$NON-NLS-1$ > } >+ >+ public String caseGridLayout(GridLayout object) { >+ return "org.eclipse.draw2d.GridLayout"; >+ } >+ >+ public String caseGridLayoutData(GridLayoutData object) { >+ return "org.eclipse.draw2d.GridData"; >+ } >+ > } >Index: src/org/eclipse/gmf/gmfgraph/util/RuntimeFQNSwitch.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/RuntimeFQNSwitch.java,v >retrieving revision 1.5 >diff -u -r1.5 RuntimeFQNSwitch.java >--- src/org/eclipse/gmf/gmfgraph/util/RuntimeFQNSwitch.java 14 Mar 2007 12:59:18 -0000 1.5 >+++ src/org/eclipse/gmf/gmfgraph/util/RuntimeFQNSwitch.java 17 Apr 2007 10:37:57 -0000 >@@ -50,14 +50,6 @@ > return false; > } > >- public String caseGridLayout(GridLayout object) { >- return "org.eclipse.gmf.internal.codegen.draw2d.GridLayout"; >- } >- >- public String caseGridLayoutData(GridLayoutData object) { >- return "org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData"; >- } >- > public String casePolylineConnection(PolylineConnection object) { > return "org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx"; //$NON-NLS-1$ > } >#P org.eclipse.gmf.tests >Index: src/org/eclipse/gmf/tests/gen/LayoutAwareCheck.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.gmf/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/LayoutAwareCheck.java,v >retrieving revision 1.3 >diff -u -r1.3 LayoutAwareCheck.java >--- src/org/eclipse/gmf/tests/gen/LayoutAwareCheck.java 31 Oct 2006 19:27:28 -0000 1.3 >+++ src/org/eclipse/gmf/tests/gen/LayoutAwareCheck.java 17 Apr 2007 10:37:58 -0000 >@@ -12,6 +12,7 @@ > > package org.eclipse.gmf.tests.gen; > >+import org.eclipse.draw2d.GridData; > import org.eclipse.draw2d.IFigure; > import org.eclipse.draw2d.LayoutManager; > import org.eclipse.draw2d.ToolbarLayout; >@@ -23,6 +24,8 @@ > import org.eclipse.gmf.gmfgraph.Figure; > import org.eclipse.gmf.gmfgraph.FlowLayout; > import org.eclipse.gmf.gmfgraph.GMFGraphPackage; >+import org.eclipse.gmf.gmfgraph.GridLayout; >+import org.eclipse.gmf.gmfgraph.GridLayoutData; > import org.eclipse.gmf.gmfgraph.Layout; > import org.eclipse.gmf.gmfgraph.LayoutData; > import org.eclipse.gmf.gmfgraph.StackLayout; >@@ -96,6 +99,23 @@ > XYLayoutData gmfData = (XYLayoutData)gmf; > checkDimension(gmfData.getSize(), d2dBounds.getSize()); > checkPoint(gmfData.getTopLeft(), d2dBounds.getTopLeft()); >+ } else if (gmf instanceof GridLayoutData){ >+ assertTrue(constraint instanceof GridData); >+ GridLayoutData gmfData = (GridLayoutData)gmf; >+ GridData d2dData = (GridData)constraint; >+ >+ assertEquals(gmfData.isGrabExcessHorizontalSpace(), d2dData.grabExcessHorizontalSpace); >+ assertEquals(gmfData.isGrabExcessVerticalSpace(), d2dData.grabExcessVerticalSpace); >+ >+ assertEquals(gmfData.getHorizontalSpan(), d2dData.horizontalSpan); >+ assertEquals(gmfData.getVerticalSpan(), d2dData.verticalSpan); >+ assertEquals(gmfData.getHorizontalIndent(), d2dData.horizontalIndent); >+ >+ checkDimension(gmfData.getSizeHint(), new Dimension(d2dData.widthHint, d2dData.heightHint)); >+ >+ AlignmentCheck alignmentChecker = new AlignmentCheck(GridData.BEGINNING, GridData.CENTER, GridData.END, GridData.FILL); >+ alignmentChecker.checkAlignment(gmfData.getHorizontalAlignment(), d2dData.horizontalAlignment); >+ alignmentChecker.checkAlignment(gmfData.getVerticalAlignment(), d2dData.verticalAlignment); > } > } > >@@ -121,9 +141,19 @@ > assertTrue(d2dLayout instanceof org.eclipse.draw2d.FlowLayout); > checkFlowLayout(gmfFlow, (org.eclipse.draw2d.FlowLayout)d2dLayout); > } >+ } else if (gmfLayout instanceof GridLayout){ >+ assertTrue(d2dLayout instanceof org.eclipse.draw2d.GridLayout); >+ checkGridLayout((GridLayout)gmfLayout, (org.eclipse.draw2d.GridLayout)d2dLayout); > } > } > >+ protected void checkGridLayout(GridLayout gmfLayout, org.eclipse.draw2d.GridLayout d2dLayout) { >+ assertEquals(gmfLayout.isEqualWidth(), d2dLayout.makeColumnsEqualWidth); >+ assertEquals(gmfLayout.getNumColumns(), d2dLayout.numColumns); >+ checkDimension(gmfLayout.getMargins(), new Dimension(d2dLayout.marginWidth, d2dLayout.marginHeight)); >+ checkDimension(gmfLayout.getSpacing(), new Dimension(d2dLayout.horizontalSpacing, d2dLayout.verticalSpacing)); >+ } >+ > protected void checkToolbarLayout(FlowLayout gmfFlow, ToolbarLayout layout) { > if (gmfFlow.eIsSet(GMFGraphPackage.eINSTANCE.getFlowLayout_MajorSpacing())){ > assertEquals(gmfFlow.getMajorSpacing(), layout.getSpacing()); >Index: src/org/eclipse/gmf/tests/gen/FigureLayoutTest.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.gmf/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/FigureLayoutTest.java,v >retrieving revision 1.11 >diff -u -r1.11 FigureLayoutTest.java >--- src/org/eclipse/gmf/tests/gen/FigureLayoutTest.java 22 Jan 2007 18:40:23 -0000 1.11 >+++ src/org/eclipse/gmf/tests/gen/FigureLayoutTest.java 17 Apr 2007 10:37:58 -0000 >@@ -27,19 +27,16 @@ > return (FigureLayoutSetup) mySessionSetup; > } > >- public void disabled_XXX_testGridLayout(){ >- //XXX: This test now fails due to absence of the GridLayout. >- //However, some less restictive checks done for grid layout in the performGridLayputTests() method >- //If this test passes, it is safe to replace performGridLayputTests() with perfromTests() in the whole class. >+ public void testGridLayout(){ > doPerformTests(getSessionSetup().getParent4()); > } > > public void testConcreteShapeLayoutAllProperties(){ >- performGridLayoutTests(getSessionSetup().getParent5()); >+ doPerformTests(getSessionSetup().getParent5()); > } > > public void testCustomFigureLayoutAllProperties(){ >- performGridLayoutTests(getSessionSetup().getParent6()); >+ doPerformTests(getSessionSetup().getParent6()); > } > > public void testDeepChildrenLayout(){ >@@ -47,11 +44,11 @@ > } > > public void testLayoutDefaults(){ >- performGridLayoutTests(getSessionSetup().getParent7()); >+ doPerformTests(getSessionSetup().getParent7()); > } > > public void off_UnlessSupportFigureRef_testLayoutForReferencedChild(){ >- performGridLayoutTests(getSessionSetup().getParent8()); >+ doPerformTests(getSessionSetup().getParent8()); > } > > public void testMissedLayoutPresentLayoutData(){ >@@ -99,10 +96,6 @@ > doPerformTests(getSessionSetup().getGroup5()); > } > >- private void performGridLayoutTests(Figure figure){ >- FigureGeneratorUtil.generateAndParse(figure); >- } >- > protected void doPerformTests(Figure f) { > super.performTests(f, new LayoutAwareCheck(f)); > } >Index: src/org/eclipse/gmf/tests/setup/figures/FigureLayoutSetup.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.gmf/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/setup/figures/FigureLayoutSetup.java,v >retrieving revision 1.4 >diff -u -r1.4 FigureLayoutSetup.java >--- src/org/eclipse/gmf/tests/setup/figures/FigureLayoutSetup.java 19 Mar 2007 16:49:14 -0000 1.4 >+++ src/org/eclipse/gmf/tests/setup/figures/FigureLayoutSetup.java 17 Apr 2007 10:37:58 -0000 >@@ -62,12 +62,11 @@ > gallery.getFigures().add(getParent1()); > gallery.getFigures().add(getParent2()); > gallery.getFigures().add(getParent3()); >-// Uncomment then layout code will be generatable. >-// gallery.getFigures().add(getParent4()); >-// gallery.getFigures().add(getParent5()); >-// gallery.getFigures().add(getParent6()); >-// gallery.getFigures().add(getParent7()); >-// gallery.getFigures().add(getParent8()); >+ gallery.getFigures().add(getParent4()); >+ gallery.getFigures().add(getParent5()); >+ gallery.getFigures().add(getParent6()); >+ gallery.getFigures().add(getParent7()); >+ gallery.getFigures().add(getParent8()); > // gallery.getFigures().add(getParent9()); > gallery.getFigures().add(getGroup()); > gallery.getFigures().add(getGroup1());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
tikhomirov.artem
:
review+
Actions:
View
|
Diff
Attachments on
bug 133279
:
38601
|
45523
|
45524
| 64018