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 (-5 / +63 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
Lines 927-933 Link Here
927
			fail("Expecting IllegalArgumentException.");
985
			fail("Expecting IllegalArgumentException.");
928
		} catch (IllegalArgumentException e) {
986
		} catch (IllegalArgumentException e) {
929
			assertEquals(
987
			assertEquals(
930
					"Cannot set graph attribute \"type\" to \"foo\"; supported values: graph, digraph",
988
					"Cannot set graph attribute 'type' to 'foo'. The type value 'foo' is not semantically correct: Value should be one of 'graph', 'digraph'.",
931
					e.getMessage());
989
					e.getMessage());
932
		}
990
		}
933
	}
991
	}
(-)a/org.eclipse.gef4.dot/src/org/eclipse/gef4/dot/internal/DotAttributes.java (-11 / +69 lines)
Lines 328-336 Link Here
328
	public static void _setType(Graph graph, String type) {
328
	public static void _setType(Graph graph, String type) {
329
		if (!_TYPE__G__GRAPH.equals(type) && !_TYPE__G__DIGRAPH.equals(type)) {
329
		if (!_TYPE__G__GRAPH.equals(type) && !_TYPE__G__DIGRAPH.equals(type)) {
330
			throw new IllegalArgumentException(
330
			throw new IllegalArgumentException(
331
					"Cannot set graph attribute \"type\" to \"" + type
331
					"Cannot set graph attribute 'type' to '" + type
332
							+ "\"; supported values: " + _TYPE__G__GRAPH + ", "
332
							+ "'. The type value 'foo' is not semantically correct: Value should be one of '"
333
							+ _TYPE__G__DIGRAPH);
333
							+ _TYPE__G__GRAPH + "', '" + _TYPE__G__DIGRAPH
334
							+ "'.");
334
		}
335
		}
335
		graph.attributesProperty().put(_TYPE__G, type);
336
		graph.attributesProperty().put(_TYPE__G, type);
336
	}
337
	}
Lines 504-510 Link Here
504
	 *         {@link Node}.
505
	 *         {@link Node}.
505
	 */
506
	 */
506
	public static String getFixedSize(Node node) {
507
	public static String getFixedSize(Node node) {
507
		return (String) node.getAttributes().get(FIXEDSIZE__N);
508
		return (String) node.attributesProperty().get(FIXEDSIZE__N);
508
	}
509
	}
509
510
510
	/**
511
	/**
Lines 533-539 Link Here
533
	 *         {@link Graph}.
534
	 *         {@link Graph}.
534
	 */
535
	 */
535
	public static String getForceLabels(Graph graph) {
536
	public static String getForceLabels(Graph graph) {
536
		return (String) graph.getAttributes().get(FORCELABELS__G);
537
		return (String) graph.attributesProperty().get(FORCELABELS__G);
537
	}
538
	}
538
539
539
	/**
540
	/**
Lines 1215-1220 Link Here
1215
	 *            {@link #ARROWHEAD__E} property.
1216
	 *            {@link #ARROWHEAD__E} property.
1216
	 * @param arrowHead
1217
	 * @param arrowHead
1217
	 *            The new value for the {@link #ARROWHEAD__E} property.
1218
	 *            The new value for the {@link #ARROWHEAD__E} property.
1219
	 * @throws IllegalArgumentException
1220
	 *             when the given <i>arrowHead</i> value is not supported.
1218
	 */
1221
	 */
1219
	public static void setArrowHead(Edge edge, String arrowHead) {
1222
	public static void setArrowHead(Edge edge, String arrowHead) {
1220
		validate(AttributeContext.EDGE, ARROWHEAD__E, arrowHead);
1223
		validate(AttributeContext.EDGE, ARROWHEAD__E, arrowHead);
Lines 1230-1235 Link Here
1230
	 *            {@link #ARROWHEAD__E} property.
1233
	 *            {@link #ARROWHEAD__E} property.
1231
	 * @param arrowHeadParsed
1234
	 * @param arrowHeadParsed
1232
	 *            The new value for the {@link #ARROWHEAD__E} property.
1235
	 *            The new value for the {@link #ARROWHEAD__E} property.
1236
	 * @throws IllegalArgumentException
1237
	 *             when the given <i>arrowHeadParsed</i> value is not supported.
1233
	 */
1238
	 */
1234
	public static void setArrowHeadParsed(Edge edge,
1239
	public static void setArrowHeadParsed(Edge edge,
1235
			ArrowType arrowHeadParsed) {
1240
			ArrowType arrowHeadParsed) {
Lines 1314-1319 Link Here
1314
	 *            {@link #DIR__E} property.
1319
	 *            {@link #DIR__E} property.
1315
	 * @param dir
1320
	 * @param dir
1316
	 *            The new value for the {@link #DIR__E} property.
1321
	 *            The new value for the {@link #DIR__E} property.
1322
	 * @throws IllegalArgumentException
1323
	 *             when the given <i>dir</i> value is not supported.
1317
	 */
1324
	 */
1318
	public static void setDir(Edge edge, String dir) {
1325
	public static void setDir(Edge edge, String dir) {
1319
		validate(AttributeContext.EDGE, DIR__E, dir);
1326
		validate(AttributeContext.EDGE, DIR__E, dir);
Lines 1329-1334 Link Here
1329
	 *            {@link #DIR__E} property.
1336
	 *            {@link #DIR__E} property.
1330
	 * @param dirParsed
1337
	 * @param dirParsed
1331
	 *            The new value for the {@link #DIR__E} property.
1338
	 *            The new value for the {@link #DIR__E} property.
1339
	 * @throws IllegalArgumentException
1340
	 *             when the given <i>dirParsed</i> value is not supported.
1332
	 */
1341
	 */
1333
	public static void setDirParsed(Edge edge, DirType dirParsed) {
1342
	public static void setDirParsed(Edge edge, DirType dirParsed) {
1334
		setDir(edge, dirParsed.toString());
1343
		setDir(edge, dirParsed.toString());
Lines 1343-1348 Link Here
1343
	 *            {@link #DISTORTION__N} property.
1352
	 *            {@link #DISTORTION__N} property.
1344
	 * @param distortion
1353
	 * @param distortion
1345
	 *            The new value for the {@link #DISTORTION__N} property.
1354
	 *            The new value for the {@link #DISTORTION__N} property.
1355
	 * @throws IllegalArgumentException
1356
	 *             when the given <i>distortion</i> value is not supported.
1346
	 */
1357
	 */
1347
	public static void setDistortion(Node node, String distortion) {
1358
	public static void setDistortion(Node node, String distortion) {
1348
		validate(AttributeContext.NODE, DISTORTION__N, distortion);
1359
		validate(AttributeContext.NODE, DISTORTION__N, distortion);
Lines 1358-1363 Link Here
1358
	 *            {@link #DISTORTION__N} property.
1369
	 *            {@link #DISTORTION__N} property.
1359
	 * @param distortionParsed
1370
	 * @param distortionParsed
1360
	 *            The new value for the {@link #DISTORTION__N} property.
1371
	 *            The new value for the {@link #DISTORTION__N} property.
1372
	 * @throws IllegalArgumentException
1373
	 *             when the given <i>distortionParsed</i> value is not
1374
	 *             supported.
1361
	 */
1375
	 */
1362
	public static void setDistortionParsed(Node node, Double distortionParsed) {
1376
	public static void setDistortionParsed(Node node, Double distortionParsed) {
1363
		setDistortion(node, distortionParsed.toString());
1377
		setDistortion(node, distortionParsed.toString());
Lines 1374-1380 Link Here
1374
	 *            The new value for the {@link #FIXEDSIZE__N} property.
1388
	 *            The new value for the {@link #FIXEDSIZE__N} property.
1375
	 */
1389
	 */
1376
	public static void setFixedSize(Node node, String fixedSize) {
1390
	public static void setFixedSize(Node node, String fixedSize) {
1377
		node.getAttributes().put(FIXEDSIZE__N, fixedSize);
1391
		node.attributesProperty().put(FIXEDSIZE__N, fixedSize);
1378
	}
1392
	}
1379
1393
1380
	/**
1394
	/**
Lines 1400-1408 Link Here
1400
	 *            {@link #FORCELABELS__G} property.
1414
	 *            {@link #FORCELABELS__G} property.
1401
	 * @param forceLabels
1415
	 * @param forceLabels
1402
	 *            The new value for the {@link #FORCELABELS__G} property.
1416
	 *            The new value for the {@link #FORCELABELS__G} property.
1417
	 * @throws IllegalArgumentException
1418
	 *             when the given <i>forceLabels</i> value is not supported.
1403
	 */
1419
	 */
1404
	public static void setForceLabels(Graph graph, String forceLabels) {
1420
	public static void setForceLabels(Graph graph, String forceLabels) {
1405
		graph.getAttributes().put(FORCELABELS__G, forceLabels);
1421
		validate(AttributeContext.GRAPH, FORCELABELS__G, forceLabels);
1422
		graph.attributesProperty().put(FORCELABELS__G, forceLabels);
1406
	}
1423
	}
1407
1424
1408
	/**
1425
	/**
Lines 1414-1419 Link Here
1414
	 *            {@link #FORCELABELS__G} property.
1431
	 *            {@link #FORCELABELS__G} property.
1415
	 * @param forceLabelsParsed
1432
	 * @param forceLabelsParsed
1416
	 *            The new value for the {@link #FORCELABELS__G} property.
1433
	 *            The new value for the {@link #FORCELABELS__G} property.
1434
	 * @throws IllegalArgumentException
1435
	 *             when the given <i>forceLabelsParsed</i> value is not
1436
	 *             supported.
1417
	 */
1437
	 */
1418
	public static void setForceLabelsParsed(Graph graph,
1438
	public static void setForceLabelsParsed(Graph graph,
1419
			Boolean forceLabelsParsed) {
1439
			Boolean forceLabelsParsed) {
Lines 1472-1481 Link Here
1472
	 *            {@link #HEIGHT__N} property.
1492
	 *            {@link #HEIGHT__N} property.
1473
	 * @param height
1493
	 * @param height
1474
	 *            The new value for the {@link #HEIGHT__N} property.
1494
	 *            The new value for the {@link #HEIGHT__N} property.
1495
	 * @throws IllegalArgumentException
1496
	 *             when the given <i>height</i> value is not supported.
1475
	 */
1497
	 */
1476
	public static void setHeight(Node node, String height) {
1498
	public static void setHeight(Node node, String height) {
1477
		validate(AttributeContext.NODE, HEIGHT__N, height);
1499
		validate(AttributeContext.NODE, HEIGHT__N, height);
1478
		node.getAttributes().put(HEIGHT__N, height);
1500
		node.attributesProperty().put(HEIGHT__N, height);
1479
	}
1501
	}
1480
1502
1481
	/**
1503
	/**
Lines 1487-1492 Link Here
1487
	 *            {@link #HEIGHT__N} property.
1509
	 *            {@link #HEIGHT__N} property.
1488
	 * @param heightParsed
1510
	 * @param heightParsed
1489
	 *            The new value for the {@link #HEIGHT__N} property.
1511
	 *            The new value for the {@link #HEIGHT__N} property.
1512
	 * @throws IllegalArgumentException
1513
	 *             when the given <i>heightParsed</i> value is not supported.
1490
	 */
1514
	 */
1491
	public static void setHeightParsed(Node node, Double heightParsed) {
1515
	public static void setHeightParsed(Node node, Double heightParsed) {
1492
		setHeight(node, heightParsed.toString());
1516
		setHeight(node, heightParsed.toString());
Lines 1603-1608 Link Here
1603
	 *            {@link #LAYOUT__G} property.
1627
	 *            {@link #LAYOUT__G} property.
1604
	 * @param layoutParsed
1628
	 * @param layoutParsed
1605
	 *            The new value for the {@link #LAYOUT__G} property.
1629
	 *            The new value for the {@link #LAYOUT__G} property.
1630
	 * @throws IllegalArgumentException
1631
	 *             when the given <i>layoutParsed</i> value is not supported.
1606
	 */
1632
	 */
1607
	public static void setLayoutParsed(Graph graph, Layout layoutParsed) {
1633
	public static void setLayoutParsed(Graph graph, Layout layoutParsed) {
1608
		setLayout(graph, layoutParsed.toString());
1634
		setLayout(graph, layoutParsed.toString());
Lines 1645-1654 Link Here
1645
	 *            {@link #POS__NE} property.
1671
	 *            {@link #POS__NE} property.
1646
	 * @param pos
1672
	 * @param pos
1647
	 *            The new value for the {@link #POS__NE} property.
1673
	 *            The new value for the {@link #POS__NE} property.
1674
	 * @throws IllegalArgumentException
1675
	 *             when the given <i>pos</i> value is not supported.
1648
	 */
1676
	 */
1649
	public static void setPos(Edge edge, String pos) {
1677
	public static void setPos(Edge edge, String pos) {
1650
		validate(AttributeContext.EDGE, POS__NE, pos);
1678
		validate(AttributeContext.EDGE, POS__NE, pos);
1651
		edge.getAttributes().put(POS__NE, pos);
1679
		edge.attributesProperty().put(POS__NE, pos);
1652
	}
1680
	}
1653
1681
1654
	/**
1682
	/**
Lines 1660-1669 Link Here
1660
	 *            {@link #POS__NE} property.
1688
	 *            {@link #POS__NE} property.
1661
	 * @param pos
1689
	 * @param pos
1662
	 *            The new value for the {@link #POS__NE} property.
1690
	 *            The new value for the {@link #POS__NE} property.
1691
	 * @throws IllegalArgumentException
1692
	 *             when the given <i>pos</i> value is not supported.
1663
	 */
1693
	 */
1664
	public static void setPos(Node node, String pos) {
1694
	public static void setPos(Node node, String pos) {
1665
		validate(AttributeContext.NODE, POS__NE, pos);
1695
		validate(AttributeContext.NODE, POS__NE, pos);
1666
		node.getAttributes().put(POS__NE, pos);
1696
		node.attributesProperty().put(POS__NE, pos);
1667
	}
1697
	}
1668
1698
1669
	/**
1699
	/**
Lines 1675-1680 Link Here
1675
	 *            {@link #POS__NE} property.
1705
	 *            {@link #POS__NE} property.
1676
	 * @param posParsed
1706
	 * @param posParsed
1677
	 *            The new value for the {@link #POS__NE} property.
1707
	 *            The new value for the {@link #POS__NE} property.
1708
	 * @throws IllegalArgumentException
1709
	 *             when the given <i>posParsed</i> value is not supported.
1678
	 */
1710
	 */
1679
	public static void setPosParsed(Edge edge, SplineType posParsed) {
1711
	public static void setPosParsed(Edge edge, SplineType posParsed) {
1680
		setPos(edge,
1712
		setPos(edge,
Lines 1690-1695 Link Here
1690
	 *            {@link #POS__NE} property.
1722
	 *            {@link #POS__NE} property.
1691
	 * @param posParsed
1723
	 * @param posParsed
1692
	 *            The new value for the {@link #POS__NE} property.
1724
	 *            The new value for the {@link #POS__NE} property.
1725
	 * @throws IllegalArgumentException
1726
	 *             when the given <i>posParsed</i> value is not supported.
1693
	 */
1727
	 */
1694
	public static void setPosParsed(Node node, Point posParsed) {
1728
	public static void setPosParsed(Node node, Point posParsed) {
1695
		setPos(node, serialize(DotLanguageSupport.POINT_SERIALIZER, posParsed));
1729
		setPos(node, serialize(DotLanguageSupport.POINT_SERIALIZER, posParsed));
Lines 1704-1709 Link Here
1704
	 *            {@link #RANKDIR__G} property.
1738
	 *            {@link #RANKDIR__G} property.
1705
	 * @param rankdir
1739
	 * @param rankdir
1706
	 *            The new value for the {@link #RANKDIR__G} property.
1740
	 *            The new value for the {@link #RANKDIR__G} property.
1741
	 * @throws IllegalArgumentException
1742
	 *             when the given <i>rankdir</i> value is not supported.
1707
	 */
1743
	 */
1708
	public static void setRankdir(Graph graph, String rankdir) {
1744
	public static void setRankdir(Graph graph, String rankdir) {
1709
		validate(AttributeContext.GRAPH, RANKDIR__G, rankdir);
1745
		validate(AttributeContext.GRAPH, RANKDIR__G, rankdir);
Lines 1719-1724 Link Here
1719
	 *            {@link #RANKDIR__G} property.
1755
	 *            {@link #RANKDIR__G} property.
1720
	 * @param rankdirParsed
1756
	 * @param rankdirParsed
1721
	 *            The new value for the {@link #RANKDIR__G} property.
1757
	 *            The new value for the {@link #RANKDIR__G} property.
1758
	 * @throws IllegalArgumentException
1759
	 *             when the given <i>rankdirParsed</i> value is not supported.
1722
	 */
1760
	 */
1723
	public static void setRankdirParsed(Graph graph, Rankdir rankdirParsed) {
1761
	public static void setRankdirParsed(Graph graph, Rankdir rankdirParsed) {
1724
		setRankdir(graph, rankdirParsed.toString());
1762
		setRankdir(graph, rankdirParsed.toString());
Lines 1733-1738 Link Here
1733
	 *            {@link #SHAPE__N} property.
1771
	 *            {@link #SHAPE__N} property.
1734
	 * @param shape
1772
	 * @param shape
1735
	 *            The new value for the {@link #SHAPE__N} property.
1773
	 *            The new value for the {@link #SHAPE__N} property.
1774
	 * @throws IllegalArgumentException
1775
	 *             when the given <i>shape</i> value is not supported.
1736
	 */
1776
	 */
1737
	public static void setShape(Node node, String shape) {
1777
	public static void setShape(Node node, String shape) {
1738
		validate(AttributeContext.NODE, SHAPE__N, shape);
1778
		validate(AttributeContext.NODE, SHAPE__N, shape);
Lines 1748-1753 Link Here
1748
	 *            {@link #SHAPE__N} property.
1788
	 *            {@link #SHAPE__N} property.
1749
	 * @param shapeParsed
1789
	 * @param shapeParsed
1750
	 *            The new value for the {@link #SHAPE__N} property.
1790
	 *            The new value for the {@link #SHAPE__N} property.
1791
	 * @throws IllegalArgumentException
1792
	 *             when the given <i>shapeParsed</i> value is not supported.
1751
	 */
1793
	 */
1752
	public static void setShapeParsed(Node node, Shape shapeParsed) {
1794
	public static void setShapeParsed(Node node, Shape shapeParsed) {
1753
		setShape(node,
1795
		setShape(node,
Lines 1763-1768 Link Here
1763
	 *            {@link #SIDES__N} property.
1805
	 *            {@link #SIDES__N} property.
1764
	 * @param sides
1806
	 * @param sides
1765
	 *            The new value for the {@link #SIDES__N} property.
1807
	 *            The new value for the {@link #SIDES__N} property.
1808
	 * @throws IllegalArgumentException
1809
	 *             when the given <i>sides</i> value is not supported.
1766
	 */
1810
	 */
1767
	public static void setSides(Node node, String sides) {
1811
	public static void setSides(Node node, String sides) {
1768
		validate(AttributeContext.NODE, SIDES__N, sides);
1812
		validate(AttributeContext.NODE, SIDES__N, sides);
Lines 1778-1783 Link Here
1778
	 *            {@link #SIDES__N} property.
1822
	 *            {@link #SIDES__N} property.
1779
	 * @param sidesParsed
1823
	 * @param sidesParsed
1780
	 *            The new value for the {@link #SIDES__N} property.
1824
	 *            The new value for the {@link #SIDES__N} property.
1825
	 * @throws IllegalArgumentException
1826
	 *             when the given <i>sidesParsed</i> value is not supported.
1781
	 */
1827
	 */
1782
	public static void setSidesParsed(Node node, Integer sidesParsed) {
1828
	public static void setSidesParsed(Node node, Integer sidesParsed) {
1783
		setSides(node, sidesParsed.toString());
1829
		setSides(node, sidesParsed.toString());
Lines 1792-1797 Link Here
1792
	 *            {@link #SKEW__N} property.
1838
	 *            {@link #SKEW__N} property.
1793
	 * @param skew
1839
	 * @param skew
1794
	 *            The new value for the {@link #SKEW__N} property.
1840
	 *            The new value for the {@link #SKEW__N} property.
1841
	 * @throws IllegalArgumentException
1842
	 *             when the given <i>skew</i> value is not supported.
1795
	 */
1843
	 */
1796
	public static void setSkew(Node node, String skew) {
1844
	public static void setSkew(Node node, String skew) {
1797
		validate(AttributeContext.NODE, SKEW__N, skew);
1845
		validate(AttributeContext.NODE, SKEW__N, skew);
Lines 1807-1812 Link Here
1807
	 *            {@link #SKEW__N} property.
1855
	 *            {@link #SKEW__N} property.
1808
	 * @param skewParsed
1856
	 * @param skewParsed
1809
	 *            The new value for the {@link #SKEW__N} property.
1857
	 *            The new value for the {@link #SKEW__N} property.
1858
	 * @throws IllegalArgumentException
1859
	 *             when the given <i>skewParsed</i> value is not supported.
1810
	 */
1860
	 */
1811
	public static void setSkewParsed(Node node, Double skewParsed) {
1861
	public static void setSkewParsed(Node node, Double skewParsed) {
1812
		setSkew(node, skewParsed.toString());
1862
		setSkew(node, skewParsed.toString());
Lines 1838-1843 Link Here
1838
	 *            {@link #SPLINES__G} property.
1888
	 *            {@link #SPLINES__G} property.
1839
	 * @param splinesParsed
1889
	 * @param splinesParsed
1840
	 *            The new value for the {@link #SPLINES__G} property.
1890
	 *            The new value for the {@link #SPLINES__G} property.
1891
	 * @throws IllegalArgumentException
1892
	 *             when the given <i>splinesParsed</i> value is not supported.
1841
	 */
1893
	 */
1842
	public static void setSplinesParsed(Graph graph, Splines splinesParsed) {
1894
	public static void setSplinesParsed(Graph graph, Splines splinesParsed) {
1843
		setSplines(graph, splinesParsed.toString());
1895
		setSplines(graph, splinesParsed.toString());
Lines 1886-1891 Link Here
1886
	 *            {@link #STYLE__E} property.
1938
	 *            {@link #STYLE__E} property.
1887
	 * @param styleParsed
1939
	 * @param styleParsed
1888
	 *            The new value for the {@link #STYLE__E} property.
1940
	 *            The new value for the {@link #STYLE__E} property.
1941
	 * @throws IllegalArgumentException
1942
	 *             when the given <i>styleParsed</i> value is not supported.
1889
	 */
1943
	 */
1890
	public static void setStyleParsed(Edge edge, Style styleParsed) {
1944
	public static void setStyleParsed(Edge edge, Style styleParsed) {
1891
		setStyle(edge,
1945
		setStyle(edge,
Lines 1961-1970 Link Here
1961
	 *            {@link #WIDTH__N} property.
2015
	 *            {@link #WIDTH__N} property.
1962
	 * @param width
2016
	 * @param width
1963
	 *            The new value for the {@link #WIDTH__N} property.
2017
	 *            The new value for the {@link #WIDTH__N} property.
2018
	 * @throws IllegalArgumentException
2019
	 *             when the given <i>width</i> value is not supported.
1964
	 */
2020
	 */
1965
	public static void setWidth(Node node, String width) {
2021
	public static void setWidth(Node node, String width) {
1966
		validate(AttributeContext.NODE, WIDTH__N, width);
2022
		validate(AttributeContext.NODE, WIDTH__N, width);
1967
		node.getAttributes().put(WIDTH__N, width);
2023
		node.attributesProperty().put(WIDTH__N, width);
1968
	}
2024
	}
1969
2025
1970
	/**
2026
	/**
Lines 1976-1981 Link Here
1976
	 *            {@link #WIDTH__N} property.
2032
	 *            {@link #WIDTH__N} property.
1977
	 * @param widthParsed
2033
	 * @param widthParsed
1978
	 *            The new value for the {@link #WIDTH__N} property.
2034
	 *            The new value for the {@link #WIDTH__N} property.
2035
	 * @throws IllegalArgumentException
2036
	 *             when the given <i>widthParsed</i> value is not supported.
1979
	 */
2037
	 */
1980
	public static void setWidthParsed(Node node, Double widthParsed) {
2038
	public static void setWidthParsed(Node node, Double widthParsed) {
1981
		setWidth(node, widthParsed.toString());
2039
		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