Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 493136 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.gef4.dot.tests/src/org/eclipse/gef4/dot/tests/DotAttributesTests.java (-4 / +62 lines)
Lines 263-271 Link Here
263
			fail("Expecting IllegalArgumentException.");
263
			fail("Expecting IllegalArgumentException.");
264
		} catch (IllegalArgumentException e) {
264
		} catch (IllegalArgumentException e) {
265
			assertEquals(
265
			assertEquals(
266
					// TODO: remove unnecessary period at the end of the error
266
					"Cannot set edge attribute 'dir' to 'foo'. The value 'foo' is not a syntactically correct dirType: Value has to be one of 'forward', 'back', 'both', 'none'.",
267
					// message
268
					"Cannot set edge attribute 'dir' to 'foo'. The value 'foo' is not a syntactically correct dirType: Value has to be one of 'forward', 'back', 'both', 'none'..",
269
					e.getMessage());
267
					e.getMessage());
270
		}
268
		}
271
	}
269
	}
Lines 645-651 Link Here
645
		assertEquals(validGraphForceLabelsParsed,
643
		assertEquals(validGraphForceLabelsParsed,
646
				DotAttributes.getForceLabelsParsed(g));
644
				DotAttributes.getForceLabelsParsed(g));
647
645
648
		// TODO: add test cases for setting invalid graph forcelabels
646
		// set invalid string values
647
		try {
648
			DotAttributes.setForceLabels(g, "foo");
649
			fail("Expecting IllegalArgumentException.");
650
		} catch (IllegalArgumentException e) {
651
			assertEquals(
652
					"Cannot set graph attribute 'forcelabels' to 'foo'. The value 'foo' is not a syntactically correct bool: The given value 'foo' does not (case-insensitively) equal 'true', 'yes', 'false', or 'no' and is also not parsable as an integer value.",
653
					e.getMessage());
654
		}
649
	}
655
	}
650
656
651
	@Test
657
	@Test
Lines 909-914 Link Here
909
	}
915
	}
910
916
911
	@Test
917
	@Test
918
	public void node_distortion() {
919
		Node n = new Node.Builder().buildNode();
920
921
		// set valid string values
922
		String validNodeDistortion = "5";
923
		DotAttributes.setDistortion(n, validNodeDistortion);
924
		assertEquals(validNodeDistortion, DotAttributes.getDistortion(n));
925
		assertEquals(5.0, DotAttributes.getDistortionParsed(n).doubleValue(),
926
				0.0);
927
928
		// set the minimum valid value
929
		validNodeDistortion = "-100.0";
930
		DotAttributes.setDistortion(n, validNodeDistortion);
931
		assertEquals(validNodeDistortion, DotAttributes.getDistortion(n));
932
		assertEquals(-100.0, DotAttributes.getDistortionParsed(n).doubleValue(),
933
				0.0);
934
935
		// set valid parsed values
936
		Double validNodeDistortionParsed = 10.0;
937
		DotAttributes.setDistortionParsed(n, validNodeDistortionParsed);
938
		assertEquals("10.0", DotAttributes.getDistortion(n));
939
		assertEquals(validNodeDistortionParsed,
940
				DotAttributes.getDistortionParsed(n));
941
942
		validNodeDistortionParsed = 9.9;
943
		DotAttributes.setDistortionParsed(n, validNodeDistortionParsed);
944
		assertEquals("9.9", DotAttributes.getDistortion(n));
945
		assertEquals(validNodeDistortionParsed,
946
				DotAttributes.getDistortionParsed(n));
947
948
		// set syntactically invalid values
949
		try {
950
			DotAttributes.setDistortion(n, "42x");
951
			fail("Expecting IllegalArgumentException.");
952
		} catch (IllegalArgumentException e) {
953
			assertEquals(
954
					"Cannot set node attribute 'distortion' to '42x'. The value '42x' is not a syntactically correct double: For input string: \"42x\".",
955
					e.getMessage());
956
		}
957
958
		// set syntactically correct, but semantically invalid values
959
		try {
960
			DotAttributes.setDistortion(n, "-100.01");
961
			fail("Expecting IllegalArgumentException.");
962
		} catch (IllegalArgumentException e) {
963
			assertEquals(
964
					"Cannot set node attribute 'distortion' to '-100.01'. The double value '-100.01' is not semantically correct: Value may not be smaller than -100.0.",
965
					e.getMessage());
966
		}
967
	}
968
969
	@Test
912
	public void graph_type() {
970
	public void graph_type() {
913
		Graph g = new Graph.Builder().build();
971
		Graph g = new Graph.Builder().build();
914
972
(-)a/org.eclipse.gef4.dot/src/org/eclipse/gef4/dot/internal/DotAttributes.java (-8 / +65 lines)
Lines 504-510 Link Here
504
	 *         {@link Node}.
504
	 *         {@link Node}.
505
	 */
505
	 */
506
	public static String getFixedSize(Node node) {
506
	public static String getFixedSize(Node node) {
507
		return (String) node.getAttributes().get(FIXEDSIZE__N);
507
		return (String) node.attributesProperty().get(FIXEDSIZE__N);
508
	}
508
	}
509
509
510
	/**
510
	/**
Lines 533-539 Link Here
533
	 *         {@link Graph}.
533
	 *         {@link Graph}.
534
	 */
534
	 */
535
	public static String getForceLabels(Graph graph) {
535
	public static String getForceLabels(Graph graph) {
536
		return (String) graph.getAttributes().get(FORCELABELS__G);
536
		return (String) graph.attributesProperty().get(FORCELABELS__G);
537
	}
537
	}
538
538
539
	/**
539
	/**
Lines 1215-1220 Link Here
1215
	 *            {@link #ARROWHEAD__E} property.
1215
	 *            {@link #ARROWHEAD__E} property.
1216
	 * @param arrowHead
1216
	 * @param arrowHead
1217
	 *            The new value for the {@link #ARROWHEAD__E} property.
1217
	 *            The new value for the {@link #ARROWHEAD__E} property.
1218
	 * @throws IllegalArgumentException
1219
	 *             when the given <i>arrowHead</i> value is not supported.
1218
	 */
1220
	 */
1219
	public static void setArrowHead(Edge edge, String arrowHead) {
1221
	public static void setArrowHead(Edge edge, String arrowHead) {
1220
		validate(AttributeContext.EDGE, ARROWHEAD__E, arrowHead);
1222
		validate(AttributeContext.EDGE, ARROWHEAD__E, arrowHead);
Lines 1230-1235 Link Here
1230
	 *            {@link #ARROWHEAD__E} property.
1232
	 *            {@link #ARROWHEAD__E} property.
1231
	 * @param arrowHeadParsed
1233
	 * @param arrowHeadParsed
1232
	 *            The new value for the {@link #ARROWHEAD__E} property.
1234
	 *            The new value for the {@link #ARROWHEAD__E} property.
1235
	 * @throws IllegalArgumentException
1236
	 *             when the given <i>arrowHeadParsed</i> value is not supported.
1233
	 */
1237
	 */
1234
	public static void setArrowHeadParsed(Edge edge,
1238
	public static void setArrowHeadParsed(Edge edge,
1235
			ArrowType arrowHeadParsed) {
1239
			ArrowType arrowHeadParsed) {
Lines 1314-1319 Link Here
1314
	 *            {@link #DIR__E} property.
1318
	 *            {@link #DIR__E} property.
1315
	 * @param dir
1319
	 * @param dir
1316
	 *            The new value for the {@link #DIR__E} property.
1320
	 *            The new value for the {@link #DIR__E} property.
1321
	 * @throws IllegalArgumentException
1322
	 *             when the given <i>dir</i> value is not supported.
1317
	 */
1323
	 */
1318
	public static void setDir(Edge edge, String dir) {
1324
	public static void setDir(Edge edge, String dir) {
1319
		validate(AttributeContext.EDGE, DIR__E, dir);
1325
		validate(AttributeContext.EDGE, DIR__E, dir);
Lines 1329-1334 Link Here
1329
	 *            {@link #DIR__E} property.
1335
	 *            {@link #DIR__E} property.
1330
	 * @param dirParsed
1336
	 * @param dirParsed
1331
	 *            The new value for the {@link #DIR__E} property.
1337
	 *            The new value for the {@link #DIR__E} property.
1338
	 * @throws IllegalArgumentException
1339
	 *             when the given <i>dirParsed</i> value is not supported.
1332
	 */
1340
	 */
1333
	public static void setDirParsed(Edge edge, DirType dirParsed) {
1341
	public static void setDirParsed(Edge edge, DirType dirParsed) {
1334
		setDir(edge, dirParsed.toString());
1342
		setDir(edge, dirParsed.toString());
Lines 1343-1348 Link Here
1343
	 *            {@link #DISTORTION__N} property.
1351
	 *            {@link #DISTORTION__N} property.
1344
	 * @param distortion
1352
	 * @param distortion
1345
	 *            The new value for the {@link #DISTORTION__N} property.
1353
	 *            The new value for the {@link #DISTORTION__N} property.
1354
	 * @throws IllegalArgumentException
1355
	 *             when the given <i>distortion</i> value is not supported.
1346
	 */
1356
	 */
1347
	public static void setDistortion(Node node, String distortion) {
1357
	public static void setDistortion(Node node, String distortion) {
1348
		validate(AttributeContext.NODE, DISTORTION__N, distortion);
1358
		validate(AttributeContext.NODE, DISTORTION__N, distortion);
Lines 1358-1363 Link Here
1358
	 *            {@link #DISTORTION__N} property.
1368
	 *            {@link #DISTORTION__N} property.
1359
	 * @param distortionParsed
1369
	 * @param distortionParsed
1360
	 *            The new value for the {@link #DISTORTION__N} property.
1370
	 *            The new value for the {@link #DISTORTION__N} property.
1371
	 * @throws IllegalArgumentException
1372
	 *             when the given <i>distortionParsed</i> value is not
1373
	 *             supported.
1361
	 */
1374
	 */
1362
	public static void setDistortionParsed(Node node, Double distortionParsed) {
1375
	public static void setDistortionParsed(Node node, Double distortionParsed) {
1363
		setDistortion(node, distortionParsed.toString());
1376
		setDistortion(node, distortionParsed.toString());
Lines 1374-1380 Link Here
1374
	 *            The new value for the {@link #FIXEDSIZE__N} property.
1387
	 *            The new value for the {@link #FIXEDSIZE__N} property.
1375
	 */
1388
	 */
1376
	public static void setFixedSize(Node node, String fixedSize) {
1389
	public static void setFixedSize(Node node, String fixedSize) {
1377
		node.getAttributes().put(FIXEDSIZE__N, fixedSize);
1390
		node.attributesProperty().put(FIXEDSIZE__N, fixedSize);
1378
	}
1391
	}
1379
1392
1380
	/**
1393
	/**
Lines 1400-1408 Link Here
1400
	 *            {@link #FORCELABELS__G} property.
1413
	 *            {@link #FORCELABELS__G} property.
1401
	 * @param forceLabels
1414
	 * @param forceLabels
1402
	 *            The new value for the {@link #FORCELABELS__G} property.
1415
	 *            The new value for the {@link #FORCELABELS__G} property.
1416
	 * @throws IllegalArgumentException
1417
	 *             when the given <i>forceLabels</i> value is not supported.
1403
	 */
1418
	 */
1404
	public static void setForceLabels(Graph graph, String forceLabels) {
1419
	public static void setForceLabels(Graph graph, String forceLabels) {
1405
		graph.getAttributes().put(FORCELABELS__G, forceLabels);
1420
		validate(AttributeContext.GRAPH, FORCELABELS__G, forceLabels);
1421
		graph.attributesProperty().put(FORCELABELS__G, forceLabels);
1406
	}
1422
	}
1407
1423
1408
	/**
1424
	/**
Lines 1414-1419 Link Here
1414
	 *            {@link #FORCELABELS__G} property.
1430
	 *            {@link #FORCELABELS__G} property.
1415
	 * @param forceLabelsParsed
1431
	 * @param forceLabelsParsed
1416
	 *            The new value for the {@link #FORCELABELS__G} property.
1432
	 *            The new value for the {@link #FORCELABELS__G} property.
1433
	 * @throws IllegalArgumentException
1434
	 *             when the given <i>forceLabelsParsed</i> value is not
1435
	 *             supported.
1417
	 */
1436
	 */
1418
	public static void setForceLabelsParsed(Graph graph,
1437
	public static void setForceLabelsParsed(Graph graph,
1419
			Boolean forceLabelsParsed) {
1438
			Boolean forceLabelsParsed) {
Lines 1472-1481 Link Here
1472
	 *            {@link #HEIGHT__N} property.
1491
	 *            {@link #HEIGHT__N} property.
1473
	 * @param height
1492
	 * @param height
1474
	 *            The new value for the {@link #HEIGHT__N} property.
1493
	 *            The new value for the {@link #HEIGHT__N} property.
1494
	 * @throws IllegalArgumentException
1495
	 *             when the given <i>height</i> value is not supported.
1475
	 */
1496
	 */
1476
	public static void setHeight(Node node, String height) {
1497
	public static void setHeight(Node node, String height) {
1477
		validate(AttributeContext.NODE, HEIGHT__N, height);
1498
		validate(AttributeContext.NODE, HEIGHT__N, height);
1478
		node.getAttributes().put(HEIGHT__N, height);
1499
		node.attributesProperty().put(HEIGHT__N, height);
1479
	}
1500
	}
1480
1501
1481
	/**
1502
	/**
Lines 1487-1492 Link Here
1487
	 *            {@link #HEIGHT__N} property.
1508
	 *            {@link #HEIGHT__N} property.
1488
	 * @param heightParsed
1509
	 * @param heightParsed
1489
	 *            The new value for the {@link #HEIGHT__N} property.
1510
	 *            The new value for the {@link #HEIGHT__N} property.
1511
	 * @throws IllegalArgumentException
1512
	 *             when the given <i>heightParsed</i> value is not supported.
1490
	 */
1513
	 */
1491
	public static void setHeightParsed(Node node, Double heightParsed) {
1514
	public static void setHeightParsed(Node node, Double heightParsed) {
1492
		setHeight(node, heightParsed.toString());
1515
		setHeight(node, heightParsed.toString());
Lines 1603-1608 Link Here
1603
	 *            {@link #LAYOUT__G} property.
1626
	 *            {@link #LAYOUT__G} property.
1604
	 * @param layoutParsed
1627
	 * @param layoutParsed
1605
	 *            The new value for the {@link #LAYOUT__G} property.
1628
	 *            The new value for the {@link #LAYOUT__G} property.
1629
	 * @throws IllegalArgumentException
1630
	 *             when the given <i>layoutParsed</i> value is not supported.
1606
	 */
1631
	 */
1607
	public static void setLayoutParsed(Graph graph, Layout layoutParsed) {
1632
	public static void setLayoutParsed(Graph graph, Layout layoutParsed) {
1608
		setLayout(graph, layoutParsed.toString());
1633
		setLayout(graph, layoutParsed.toString());
Lines 1645-1654 Link Here
1645
	 *            {@link #POS__NE} property.
1670
	 *            {@link #POS__NE} property.
1646
	 * @param pos
1671
	 * @param pos
1647
	 *            The new value for the {@link #POS__NE} property.
1672
	 *            The new value for the {@link #POS__NE} property.
1673
	 * @throws IllegalArgumentException
1674
	 *             when the given <i>pos</i> value is not supported.
1648
	 */
1675
	 */
1649
	public static void setPos(Edge edge, String pos) {
1676
	public static void setPos(Edge edge, String pos) {
1650
		validate(AttributeContext.EDGE, POS__NE, pos);
1677
		validate(AttributeContext.EDGE, POS__NE, pos);
1651
		edge.getAttributes().put(POS__NE, pos);
1678
		edge.attributesProperty().put(POS__NE, pos);
1652
	}
1679
	}
1653
1680
1654
	/**
1681
	/**
Lines 1660-1669 Link Here
1660
	 *            {@link #POS__NE} property.
1687
	 *            {@link #POS__NE} property.
1661
	 * @param pos
1688
	 * @param pos
1662
	 *            The new value for the {@link #POS__NE} property.
1689
	 *            The new value for the {@link #POS__NE} property.
1690
	 * @throws IllegalArgumentException
1691
	 *             when the given <i>pos</i> value is not supported.
1663
	 */
1692
	 */
1664
	public static void setPos(Node node, String pos) {
1693
	public static void setPos(Node node, String pos) {
1665
		validate(AttributeContext.NODE, POS__NE, pos);
1694
		validate(AttributeContext.NODE, POS__NE, pos);
1666
		node.getAttributes().put(POS__NE, pos);
1695
		node.attributesProperty().put(POS__NE, pos);
1667
	}
1696
	}
1668
1697
1669
	/**
1698
	/**
Lines 1675-1680 Link Here
1675
	 *            {@link #POS__NE} property.
1704
	 *            {@link #POS__NE} property.
1676
	 * @param posParsed
1705
	 * @param posParsed
1677
	 *            The new value for the {@link #POS__NE} property.
1706
	 *            The new value for the {@link #POS__NE} property.
1707
	 * @throws IllegalArgumentException
1708
	 *             when the given <i>posParsed</i> value is not supported.
1678
	 */
1709
	 */
1679
	public static void setPosParsed(Edge edge, SplineType posParsed) {
1710
	public static void setPosParsed(Edge edge, SplineType posParsed) {
1680
		setPos(edge,
1711
		setPos(edge,
Lines 1690-1695 Link Here
1690
	 *            {@link #POS__NE} property.
1721
	 *            {@link #POS__NE} property.
1691
	 * @param posParsed
1722
	 * @param posParsed
1692
	 *            The new value for the {@link #POS__NE} property.
1723
	 *            The new value for the {@link #POS__NE} property.
1724
	 * @throws IllegalArgumentException
1725
	 *             when the given <i>posParsed</i> value is not supported.
1693
	 */
1726
	 */
1694
	public static void setPosParsed(Node node, Point posParsed) {
1727
	public static void setPosParsed(Node node, Point posParsed) {
1695
		setPos(node, serialize(DotLanguageSupport.POINT_SERIALIZER, posParsed));
1728
		setPos(node, serialize(DotLanguageSupport.POINT_SERIALIZER, posParsed));
Lines 1704-1709 Link Here
1704
	 *            {@link #RANKDIR__G} property.
1737
	 *            {@link #RANKDIR__G} property.
1705
	 * @param rankdir
1738
	 * @param rankdir
1706
	 *            The new value for the {@link #RANKDIR__G} property.
1739
	 *            The new value for the {@link #RANKDIR__G} property.
1740
	 * @throws IllegalArgumentException
1741
	 *             when the given <i>rankdir</i> value is not supported.
1707
	 */
1742
	 */
1708
	public static void setRankdir(Graph graph, String rankdir) {
1743
	public static void setRankdir(Graph graph, String rankdir) {
1709
		validate(AttributeContext.GRAPH, RANKDIR__G, rankdir);
1744
		validate(AttributeContext.GRAPH, RANKDIR__G, rankdir);
Lines 1719-1724 Link Here
1719
	 *            {@link #RANKDIR__G} property.
1754
	 *            {@link #RANKDIR__G} property.
1720
	 * @param rankdirParsed
1755
	 * @param rankdirParsed
1721
	 *            The new value for the {@link #RANKDIR__G} property.
1756
	 *            The new value for the {@link #RANKDIR__G} property.
1757
	 * @throws IllegalArgumentException
1758
	 *             when the given <i>rankdirParsed</i> value is not supported.
1722
	 */
1759
	 */
1723
	public static void setRankdirParsed(Graph graph, Rankdir rankdirParsed) {
1760
	public static void setRankdirParsed(Graph graph, Rankdir rankdirParsed) {
1724
		setRankdir(graph, rankdirParsed.toString());
1761
		setRankdir(graph, rankdirParsed.toString());
Lines 1733-1738 Link Here
1733
	 *            {@link #SHAPE__N} property.
1770
	 *            {@link #SHAPE__N} property.
1734
	 * @param shape
1771
	 * @param shape
1735
	 *            The new value for the {@link #SHAPE__N} property.
1772
	 *            The new value for the {@link #SHAPE__N} property.
1773
	 * @throws IllegalArgumentException
1774
	 *             when the given <i>shape</i> value is not supported.
1736
	 */
1775
	 */
1737
	public static void setShape(Node node, String shape) {
1776
	public static void setShape(Node node, String shape) {
1738
		validate(AttributeContext.NODE, SHAPE__N, shape);
1777
		validate(AttributeContext.NODE, SHAPE__N, shape);
Lines 1748-1753 Link Here
1748
	 *            {@link #SHAPE__N} property.
1787
	 *            {@link #SHAPE__N} property.
1749
	 * @param shapeParsed
1788
	 * @param shapeParsed
1750
	 *            The new value for the {@link #SHAPE__N} property.
1789
	 *            The new value for the {@link #SHAPE__N} property.
1790
	 * @throws IllegalArgumentException
1791
	 *             when the given <i>shapeParsed</i> value is not supported.
1751
	 */
1792
	 */
1752
	public static void setShapeParsed(Node node, Shape shapeParsed) {
1793
	public static void setShapeParsed(Node node, Shape shapeParsed) {
1753
		setShape(node,
1794
		setShape(node,
Lines 1763-1768 Link Here
1763
	 *            {@link #SIDES__N} property.
1804
	 *            {@link #SIDES__N} property.
1764
	 * @param sides
1805
	 * @param sides
1765
	 *            The new value for the {@link #SIDES__N} property.
1806
	 *            The new value for the {@link #SIDES__N} property.
1807
	 * @throws IllegalArgumentException
1808
	 *             when the given <i>sides</i> value is not supported.
1766
	 */
1809
	 */
1767
	public static void setSides(Node node, String sides) {
1810
	public static void setSides(Node node, String sides) {
1768
		validate(AttributeContext.NODE, SIDES__N, sides);
1811
		validate(AttributeContext.NODE, SIDES__N, sides);
Lines 1778-1783 Link Here
1778
	 *            {@link #SIDES__N} property.
1821
	 *            {@link #SIDES__N} property.
1779
	 * @param sidesParsed
1822
	 * @param sidesParsed
1780
	 *            The new value for the {@link #SIDES__N} property.
1823
	 *            The new value for the {@link #SIDES__N} property.
1824
	 * @throws IllegalArgumentException
1825
	 *             when the given <i>sidesParsed</i> value is not supported.
1781
	 */
1826
	 */
1782
	public static void setSidesParsed(Node node, Integer sidesParsed) {
1827
	public static void setSidesParsed(Node node, Integer sidesParsed) {
1783
		setSides(node, sidesParsed.toString());
1828
		setSides(node, sidesParsed.toString());
Lines 1792-1797 Link Here
1792
	 *            {@link #SKEW__N} property.
1837
	 *            {@link #SKEW__N} property.
1793
	 * @param skew
1838
	 * @param skew
1794
	 *            The new value for the {@link #SKEW__N} property.
1839
	 *            The new value for the {@link #SKEW__N} property.
1840
	 * @throws IllegalArgumentException
1841
	 *             when the given <i>skew</i> value is not supported.
1795
	 */
1842
	 */
1796
	public static void setSkew(Node node, String skew) {
1843
	public static void setSkew(Node node, String skew) {
1797
		validate(AttributeContext.NODE, SKEW__N, skew);
1844
		validate(AttributeContext.NODE, SKEW__N, skew);
Lines 1807-1812 Link Here
1807
	 *            {@link #SKEW__N} property.
1854
	 *            {@link #SKEW__N} property.
1808
	 * @param skewParsed
1855
	 * @param skewParsed
1809
	 *            The new value for the {@link #SKEW__N} property.
1856
	 *            The new value for the {@link #SKEW__N} property.
1857
	 * @throws IllegalArgumentException
1858
	 *             when the given <i>skewParsed</i> value is not supported.
1810
	 */
1859
	 */
1811
	public static void setSkewParsed(Node node, Double skewParsed) {
1860
	public static void setSkewParsed(Node node, Double skewParsed) {
1812
		setSkew(node, skewParsed.toString());
1861
		setSkew(node, skewParsed.toString());
Lines 1838-1843 Link Here
1838
	 *            {@link #SPLINES__G} property.
1887
	 *            {@link #SPLINES__G} property.
1839
	 * @param splinesParsed
1888
	 * @param splinesParsed
1840
	 *            The new value for the {@link #SPLINES__G} property.
1889
	 *            The new value for the {@link #SPLINES__G} property.
1890
	 * @throws IllegalArgumentException
1891
	 *             when the given <i>splinesParsed</i> value is not supported.
1841
	 */
1892
	 */
1842
	public static void setSplinesParsed(Graph graph, Splines splinesParsed) {
1893
	public static void setSplinesParsed(Graph graph, Splines splinesParsed) {
1843
		setSplines(graph, splinesParsed.toString());
1894
		setSplines(graph, splinesParsed.toString());
Lines 1886-1891 Link Here
1886
	 *            {@link #STYLE__E} property.
1937
	 *            {@link #STYLE__E} property.
1887
	 * @param styleParsed
1938
	 * @param styleParsed
1888
	 *            The new value for the {@link #STYLE__E} property.
1939
	 *            The new value for the {@link #STYLE__E} property.
1940
	 * @throws IllegalArgumentException
1941
	 *             when the given <i>styleParsed</i> value is not supported.
1889
	 */
1942
	 */
1890
	public static void setStyleParsed(Edge edge, Style styleParsed) {
1943
	public static void setStyleParsed(Edge edge, Style styleParsed) {
1891
		setStyle(edge,
1944
		setStyle(edge,
Lines 1961-1970 Link Here
1961
	 *            {@link #WIDTH__N} property.
2014
	 *            {@link #WIDTH__N} property.
1962
	 * @param width
2015
	 * @param width
1963
	 *            The new value for the {@link #WIDTH__N} property.
2016
	 *            The new value for the {@link #WIDTH__N} property.
2017
	 * @throws IllegalArgumentException
2018
	 *             when the given <i>width</i> value is not supported.
1964
	 */
2019
	 */
1965
	public static void setWidth(Node node, String width) {
2020
	public static void setWidth(Node node, String width) {
1966
		validate(AttributeContext.NODE, WIDTH__N, width);
2021
		validate(AttributeContext.NODE, WIDTH__N, width);
1967
		node.getAttributes().put(WIDTH__N, width);
2022
		node.attributesProperty().put(WIDTH__N, width);
1968
	}
2023
	}
1969
2024
1970
	/**
2025
	/**
Lines 1976-1981 Link Here
1976
	 *            {@link #WIDTH__N} property.
2031
	 *            {@link #WIDTH__N} property.
1977
	 * @param widthParsed
2032
	 * @param widthParsed
1978
	 *            The new value for the {@link #WIDTH__N} property.
2033
	 *            The new value for the {@link #WIDTH__N} property.
2034
	 * @throws IllegalArgumentException
2035
	 *             when the given <i>widthParsed</i> value is not supported.
1979
	 */
2036
	 */
1980
	public static void setWidthParsed(Node node, Double widthParsed) {
2037
	public static void setWidthParsed(Node node, Double widthParsed) {
1981
		setWidth(node, widthParsed.toString());
2038
		setWidth(node, widthParsed.toString());
(-)a/org.eclipse.gef4.dot/src/org/eclipse/gef4/dot/internal/DotLanguageSupport.java (-2 / +1 lines)
Lines 160-167 Link Here
160
					Collections.<Diagnostic> singletonList(new BasicDiagnostic(
160
					Collections.<Diagnostic> singletonList(new BasicDiagnostic(
161
							Diagnostic.ERROR, rawValue, -1,
161
							Diagnostic.ERROR, rawValue, -1,
162
							"Value has to be one of "
162
							"Value has to be one of "
163
									+ getFormattedValues(DirType.values())
163
									+ getFormattedValues(DirType.values()),
164
									+ ".",
165
							new Object[] {})));
164
							new Object[] {})));
166
		}
165
		}
167
	};
166
	};

Return to bug 493136