Skip to content
Permalink
Browse files

revert ends of long method markers

  • Loading branch information...
silverailscolo committed Jun 11, 2019
1 parent 57bf538 commit 9b3b95aa576582c3cb24ce2379b1af9f5a2555f2
@@ -2660,7 +2660,7 @@ private void addThroughPath(Block srcBlock, Block dstBlock, LayoutEditor panel)
}
}
}
}
} // addThroughPath

private void addThroughPathPostChecks(Block srcBlock,
Block dstBlock, List<LayoutTrackExpectedState<LayoutTurnout>> stod) {
@@ -1825,7 +1825,7 @@ public NamedBean getFacingBean(@Nullable Block facingBlock,
}
}
return null;
}
} //getFacingBean

/**
* In the first instance get a Signal Mast or if none exists a Signal
@@ -1871,7 +1871,7 @@ public LayoutBlock getProtectedBlockByNamedBean(
return null;
}
return proBlocks.get(0);
}
} //getProtectedBlockByNamedBean

@CheckReturnValue
@Nonnull
@@ -2001,7 +2001,7 @@ public LayoutBlock getProtectedBlockByNamedBean(
return t.getProtectedBlocks(bean);
}
return protectingBlocks;
}
} //getProtectingBlocksByBean

@CheckReturnValue
@Nullable
@@ -2099,7 +2099,7 @@ public LayoutBlock getProtectedBlockBySensor(
return t.getProtectedBlocks(sensor);
}
return result;
}
} //getProtectingBlocksBySensorOld

/**
* Get the LayoutBlock that a given sensor is protecting.
@@ -2328,7 +2328,7 @@ private LayoutBlock getFacingBlockByBeanByPanel(
}
}
return null;
}
} //getFacingBlockByBean

/**
* Get the LayoutBlock that a given sensor is facing.
@@ -2501,6 +2501,7 @@ void setLastRoutingChange() {
stabilised = false;
setRoutingStabilised();
}

boolean checking = false;
boolean stabilised = false;

@@ -2565,7 +2566,7 @@ private void setRoutingStabilised() {
};
thr = new Thread(r, "Routing stabilising timer");
thr.start();
}
} //setRoutingStabilised

private Thread thr = null;

@@ -308,7 +308,7 @@ public void windowClosing(java.awt.event.WindowEvent e) {
editTrackSegmentOpen = true;

showSensorMessage();
}
} // editTrackSegment

@InvokeOnGuiThread
private void editTrackSegmentEditBlockPressed(ActionEvent a) {
@@ -694,7 +694,7 @@ public void windowClosing(java.awt.event.WindowEvent e) {
editLayoutTurnoutNeedsBlockUpdate = false;

showSensorMessage();
}
} // editLayoutTurnout

private void editLayoutTurnoutEditBlockPressed(ActionEvent a) {
// check if a block name has been entered
@@ -916,7 +916,7 @@ private void editLayoutTurnoutDonePressed(ActionEvent a) {
layoutEditor.setDirty();
editLayoutTurnoutNeedRedraw = false;
}
}
} // editLayoutTurnoutDonePressed

private void editLayoutTurnoutCancelPressed(ActionEvent a) {
editLayoutTurnoutOpen = false;
@@ -1142,7 +1142,7 @@ public void windowClosing(WindowEvent e) {
editLayoutSlipNeedsBlockUpdate = false;

showSensorMessage();
}
} // editLayoutSlip

private void drawSlipState(Graphics2D g2, int state) {
Point2D cenP = layoutSlip.getCoordsCenter();
@@ -1224,7 +1224,7 @@ private void drawSlipState(Graphics2D g2, int state) {
g2.draw(new Line2D.Double(D, MathUtil.oneThirdPoint(D, B)));
}
}
}
} // drawSlipState

class SampleStates extends JPanel {

@@ -1532,8 +1532,7 @@ public void windowClosing(java.awt.event.WindowEvent e) {
editLevelXingNeedsBlockUpdate = false;

showSensorMessage();

}
} // editLevelXing

private void editLevelXingBlockACPressed(ActionEvent a) {
// check if a block name has been entered
@@ -1805,7 +1804,7 @@ public void windowClosing(java.awt.event.WindowEvent e) {
editLayoutTurntableFrame.pack();
editLayoutTurntableFrame.setVisible(true);
editLayoutTurntableOpen = true;
}
} // editLayoutTurntable

//Remove old rays and add them back in
private void updateRayPanel() {
@@ -2047,7 +2046,7 @@ private void showTurnoutDetails() {
rayTurnoutStateComboBox.setVisible(vis);
rayTurnoutStateLabel.setVisible(vis);
}
}
} // class TurntableRayPanel

private final static Logger log = LoggerFactory.getLogger(LayoutTrackEditors.class);

@@ -2061,7 +2061,7 @@ protected int findHitPointType(Point2D hitPoint, boolean useRectangles, boolean
result = NONE;
}
return result;
}
} // findHitPointType

/*
* Modify coordinates methods
@@ -2522,7 +2522,7 @@ public void setObjects(LayoutEditor p) {
tBlockDName = null; //release this memory
}
activateTurnout();
}
} // setObjects

private JPopupMenu popup = null;

@@ -2871,7 +2871,7 @@ public void actionPerformed(ActionEvent e) {
popup.show(mouseEvent.getComponent(), mouseEvent.getX(), mouseEvent.getY());
}
return popup;
}
} // showPopup

public String[] getBlockBoundaries() {
final String[] boundaryBetween = new String[4];
@@ -3009,7 +3009,7 @@ public void actionPerformed(ActionEvent e) {

}
return boundaryBetween;
}
} // getBlockBoundaries

public ArrayList<LayoutBlock> getProtectedBlocks(jmri.NamedBean bean) {
ArrayList<LayoutBlock> ret = new ArrayList<>(2);
@@ -3147,7 +3147,7 @@ public void actionPerformed(ActionEvent e) {
}
}
return ret;
}
} // getProtectedBlocks

protected void removeSML(SignalMast signalMast) {
if (signalMast == null) {
@@ -3563,7 +3563,7 @@ protected void draw1(Graphics2D g2, boolean isMain, boolean isBlock) {
}
}
}
}
} // draw1

/**
* {@inheritDoc}
@@ -4241,7 +4241,7 @@ protected void draw2(Graphics2D g2, boolean isMain, float railDisplacement) {
break;
}
}
}
} // draw2

/**
* {@inheritDoc}
@@ -4466,7 +4466,8 @@ protected int getConnectivityStateForLayoutBlocks(
} // switch (tTyp)

return result;
}
} // getConnectivityStateForLayoutBlocks


/*
* {@inheritDoc}
@@ -4586,7 +4587,7 @@ public void reCheckBlockBoundary() {
sensorDNamed = null;
}
}
}
} // reCheckBlockBoundary

/*
* {@inheritDoc}
@@ -4751,7 +4752,7 @@ public void checkForNonContiguousBlocks(
}
theConnect.collectContiguousTracksNamesInBlockNamed(theBlockName, TrackNameSet);
}
}
} // collectContiguousTracksNamesInBlockNamed

/**
* {@inheritDoc}
@@ -562,9 +562,9 @@ public boolean isMainline() {
return false;
}

/**
* Modify coordinates methods
*/
//
// Modify coordinates methods
//

/**
* Scale this LayoutTrack's coordinates by the x and y factors.
@@ -882,7 +882,7 @@ public RayTrack(double angle, int index) {
private boolean disableWhenOccupied = false;

//
// accessor routines
// Accessor routines
//

/**
@@ -1095,7 +1095,7 @@ void dispose() {
lastKnownIndex = -1;
}
}
}
} // class RayTrack

/**
* {@inheritDoc}
@@ -989,7 +989,7 @@ protected int findHitPointType(Point2D hitPoint, boolean useRectangles, boolean
result = NONE;
}
return result;
}
} // findHitPointType

// initialization instance variables (used when loading a LayoutEditor)
public String connectAName = "";
@@ -1302,7 +1302,7 @@ public void actionPerformed(ActionEvent e) {
popup.show(mouseEvent.getComponent(), mouseEvent.getX(), mouseEvent.getY());
}
return popup;
}
} // showPopup

public String[] getBlockBoundaries() {
final String[] boundaryBetween = new String[4];
@@ -1739,7 +1739,7 @@ public void checkForNonContiguousBlocks(
}
theConnect.collectContiguousTracksNamesInBlockNamed(theBlockName, TrackNameSet);
}
}
} // collectContiguousTracksNamesInBlockNamed

/**
* {@inheritDoc}
@@ -222,7 +222,7 @@ public void setLinkedPoint(PositionablePoint p) {
if (p == linkedPoint) {
return;
}
if (linkedPoint != null && linkedPoint != p) {
if (linkedPoint != null) {
PositionablePoint oldLinkedPoint = linkedPoint;
linkedPoint = null;
if (oldLinkedPoint.getLinkedPoint() != null) {
@@ -2139,6 +2139,6 @@ public void setAllLayoutBlocks(LayoutBlock layoutBlock) {
// nothing to see here, move along...
}

private final static Logger log
= LoggerFactory.getLogger(PositionablePoint.class);
private final static Logger log = LoggerFactory.getLogger(PositionablePoint.class);

}
@@ -628,12 +628,13 @@ public void setCoordsCenter(@Nonnull Point2D newCenterPoint) {
//NOTE: findObjectByTypeAndName is @Deprecated;
// we're using it here for backwards compatibility until it can be removed
@Override
@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "Null check performed before using return value")
public void setObjects(LayoutEditor p) {

LayoutBlock lb;
if (!tLayoutBlockName.isEmpty()) {
lb = p.provideLayoutBlock(tLayoutBlockName);
if ((lb != null) && (InstanceManager.getDefault(jmri.NamedBeanHandleManager.class).getNamedBeanHandle(lb.getUserName(), lb) != null)) {
if (lb != null) {
namedLayoutBlock = InstanceManager.getDefault(jmri.NamedBeanHandleManager.class).getNamedBeanHandle(lb.getUserName(), lb);
lb.incrementUse();
} else {
@@ -2322,7 +2323,7 @@ protected void calculateTrackSegmentAngle() {
}
}
}
}
} // calculateTrackSegmentAngle

/**
* {@inheritDoc}
@@ -2871,7 +2872,7 @@ protected void drawDecorations(Graphics2D g2) {
}
}
} // if (tunnelValue != null)
}
} // drawDecorations

private int drawArrow(
Graphics2D g2,
@@ -3021,7 +3022,7 @@ private int drawArrow(
}
}
return offset;
}
} // drawArrow

/*======================*\
|* decoration accessors *|
@@ -3156,7 +3157,7 @@ public boolean hasDecorations() {
decorations.put("tunnel", String.join(";", tunnelValues));
} // if (tunnelSideLeft || tunnelSideRight)
return decorations;
}
} // getDecorations

/**
* Set decorations.
@@ -4009,7 +4010,7 @@ public void setTunnelEntranceWidth(int newVal) {
}
} // if (lb1 != null)
return results;
}
} // getLayoutConnectivity()

/**
* {@inheritDoc}

0 comments on commit 9b3b95a

Please sign in to comment.
You can’t perform that action at this time.