Skip to content

Commit 58ce626

Browse files
ptzieglerazoitl
authored andcommitted
Mark "ranks" field in DirectedGraph as "forRemoval"
This field has been marked as deprecated since forever and is only referenced within the same package and can therefore be made package-private in a future release. The "removal" warning needs to be suppressed, wherever this field is referenced.
1 parent a4535b2 commit 58ce626

14 files changed

+36
-15
lines changed

org.eclipse.draw2d.tests/src/org/eclipse/draw2d/test/LocalOptimizerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -202,6 +202,7 @@ private static void rankNodes(Node[] nodes, int rank) {
202202
private void checkResults(Node[][] nodes) {
203203
for (int r = 0; r < nodes.length; r++) {
204204
Node[] row = nodes[r];
205+
@SuppressWarnings("removal")
205206
Rank rank = graph.ranks.getRank(r);
206207
assertEquals(rank.size(), row.length);
207208
for (int n = 0; n < row.length; n++) {

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/CompoundHorizontalPlacement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -46,6 +46,7 @@ void applyGPrime() {
4646
* @see HorizontalPlacement#buildRankSeparators(RankList)
4747
*/
4848
@Override
49+
@SuppressWarnings("removal")
4950
void buildRankSeparators(RankList ranks) {
5051
CompoundDirectedGraph g = (CompoundDirectedGraph) graph;
5152

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/CompoundPopulateRanks.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -51,6 +51,7 @@ public void visit(DirectedGraph g) {
5151
/**
5252
* @param subgraph
5353
*/
54+
@SuppressWarnings("removal")
5455
private static void bridgeSubgraph(Subgraph subgraph, CompoundDirectedGraph g) {
5556
int offset = subgraph.head.rank;
5657
boolean[] occupied = new boolean[subgraph.tail.rank - subgraph.head.rank + 1];

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/CompoundRankSorter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -116,6 +116,7 @@ void copyConstraints(NestingTree tree) {
116116
}
117117

118118
@Override
119+
@SuppressWarnings("removal")
119120
public void init(DirectedGraph g) {
120121
super.init(g);
121122
init = true;

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/DirectedGraph.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -49,9 +49,10 @@ public class DirectedGraph {
4949
/**
5050
* For internal use only. The list of rows which makeup the final graph layout.
5151
*
52-
* @deprecated
52+
* @deprecated This field will be made package-private after the 2027-12
53+
* release.
5354
*/
54-
@Deprecated
55+
@Deprecated(forRemoval = true, since = "2025-12")
5556
public RankList ranks = new RankList();
5657

5758
Node forestRoot;

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/GraphUtilities.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -83,6 +83,7 @@ public static boolean isCyclic(NodeList nodes) {
8383
* @param graph the graph whose crossed edges are counted
8484
* @return the number of edge crossings in the graph
8585
*/
86+
@SuppressWarnings("removal")
8687
public static int numberOfCrossingsInGraph(DirectedGraph graph) {
8788
int crossings = 0;
8889
for (Rank rank : graph.ranks) {

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/HorizontalPlacement.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -254,6 +254,7 @@ private void balanceClusters() {
254254
// return false;
255255
// }
256256

257+
@SuppressWarnings("removal")
257258
void buildGPrime() {
258259
RankList ranks = graph.ranks;
259260
buildRankSeparators(ranks);
@@ -293,6 +294,7 @@ void buildRankSeparators(RankList ranks) {
293294
}
294295
}
295296

297+
@SuppressWarnings("removal")
296298
private void calculateCellLocations() {
297299
graph.cellLocations = new int[graph.ranks.size() + 1][];
298300
for (int row = 0; row < graph.ranks.size(); row++) {

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/LocalOptimizer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -89,6 +89,7 @@ private static void swapNodes(Node current, Node next, Rank rank) {
8989
* @see GraphVisitor#visit(org.eclipse.draw2d.graph.DirectedGraph)
9090
*/
9191
@Override
92+
@SuppressWarnings("removal")
9293
public void visit(DirectedGraph g) {
9394
boolean flag;
9495
do {

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/MinCross.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2010 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -39,6 +39,7 @@ public void setRankSorter(RankSorter sorter) {
3939
this.sorter = sorter;
4040
}
4141

42+
@SuppressWarnings("removal")
4243
void solve() {
4344
Rank rank;
4445
for (int loop = 0; loop < MAX; loop++) {

org.eclipse.draw2d/src/org/eclipse/draw2d/graph/PopulateRanks.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2023 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -36,6 +36,7 @@ class PopulateRanks extends GraphVisitor {
3636
* @see GraphVisitor#visit(DirectedGraph)
3737
*/
3838
@Override
39+
@SuppressWarnings("removal")
3940
public void visit(DirectedGraph g) {
4041
if (g.forestRoot != null) {
4142
for (int i = g.forestRoot.outgoing.size() - 1; i >= 0; i--) {
@@ -67,6 +68,7 @@ public void visit(DirectedGraph g) {
6768
* @see GraphVisitor#revisit(DirectedGraph)
6869
*/
6970
@Override
71+
@SuppressWarnings("removal")
7072
public void revisit(DirectedGraph g) {
7173
for (Rank rank : g.ranks) {
7274
Node prev = null;

0 commit comments

Comments
 (0)