Skip to content

Commit

Permalink
revert ends of long method markers
Browse files Browse the repository at this point in the history
  • Loading branch information
silverailscolo committed Jun 11, 2019
1 parent 57bf538 commit 9b3b95a
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 43 deletions.
2 changes: 1 addition & 1 deletion java/src/jmri/jmrit/display/layoutEditor/LayoutBlock.java
Expand Up @@ -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) {
Expand Down
13 changes: 7 additions & 6 deletions java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java
Expand Up @@ -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
Expand Down Expand Up @@ -1871,7 +1871,7 @@ public LayoutBlock getProtectedBlockByNamedBean(
return null;
}
return proBlocks.get(0);
}
} //getProtectedBlockByNamedBean

@CheckReturnValue
@Nonnull
Expand Down Expand Up @@ -2001,7 +2001,7 @@ private List<LayoutBlock> getProtectingBlocksByBeanByPanel(
return t.getProtectedBlocks(bean);
}
return protectingBlocks;
}
} //getProtectingBlocksByBean

@CheckReturnValue
@Nullable
Expand Down Expand Up @@ -2099,7 +2099,7 @@ public List<LayoutBlock> getProtectingBlocksBySensorOld(
return t.getProtectedBlocks(sensor);
}
return result;
}
} //getProtectingBlocksBySensorOld

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

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

boolean checking = false;
boolean stabilised = false;

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

private Thread thr = null;

Expand Down
17 changes: 8 additions & 9 deletions java/src/jmri/jmrit/display/layoutEditor/LayoutTrackEditors.java
Expand Up @@ -308,7 +308,7 @@ public void windowClosing(java.awt.event.WindowEvent e) {
editTrackSegmentOpen = true;

showSensorMessage();
}
} // editTrackSegment

@InvokeOnGuiThread
private void editTrackSegmentEditBlockPressed(ActionEvent a) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -916,7 +916,7 @@ private void editLayoutTurnoutDonePressed(ActionEvent a) {
layoutEditor.setDirty();
editLayoutTurnoutNeedRedraw = false;
}
}
} // editLayoutTurnoutDonePressed

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

showSensorMessage();
}
} // editLayoutSlip

private void drawSlipState(Graphics2D g2, int state) {
Point2D cenP = layoutSlip.getCoordsCenter();
Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -2047,7 +2046,7 @@ private void showTurnoutDetails() {
rayTurnoutStateComboBox.setVisible(vis);
rayTurnoutStateLabel.setVisible(vis);
}
}
} // class TurntableRayPanel

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

Expand Down
21 changes: 11 additions & 10 deletions java/src/jmri/jmrit/display/layoutEditor/LayoutTurnout.java
Expand Up @@ -2061,7 +2061,7 @@ protected int findHitPointType(Point2D hitPoint, boolean useRectangles, boolean
result = NONE;
}
return result;
}
} // findHitPointType

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

private JPopupMenu popup = null;

Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -3009,7 +3009,7 @@ public String[] getBlockBoundaries() {

}
return boundaryBetween;
}
} // getBlockBoundaries

public ArrayList<LayoutBlock> getProtectedBlocks(jmri.NamedBean bean) {
ArrayList<LayoutBlock> ret = new ArrayList<>(2);
Expand Down Expand Up @@ -3147,7 +3147,7 @@ public ArrayList<LayoutBlock> getProtectedBlocks(jmri.NamedBean bean) {
}
}
return ret;
}
} // getProtectedBlocks

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

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

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

return result;
}
} // getConnectivityStateForLayoutBlocks


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

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

/**
* {@inheritDoc}
Expand Down
10 changes: 5 additions & 5 deletions java/src/jmri/jmrit/display/layoutEditor/LayoutTurntable.java
Expand Up @@ -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.
Expand Down Expand Up @@ -882,7 +882,7 @@ public RayTrack(double angle, int index) {
private boolean disableWhenOccupied = false;

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

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

/**
* {@inheritDoc}
Expand Down
6 changes: 3 additions & 3 deletions java/src/jmri/jmrit/display/layoutEditor/LevelXing.java
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -1739,7 +1739,7 @@ public void checkForNonContiguousBlocks(
}
theConnect.collectContiguousTracksNamesInBlockNamed(theBlockName, TrackNameSet);
}
}
} // collectContiguousTracksNamesInBlockNamed

/**
* {@inheritDoc}
Expand Down
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

}
13 changes: 7 additions & 6 deletions java/src/jmri/jmrit/display/layoutEditor/TrackSegment.java
Expand Up @@ -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 {
Expand Down Expand Up @@ -2322,7 +2323,7 @@ protected void calculateTrackSegmentAngle() {
}
}
}
}
} // calculateTrackSegmentAngle

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

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

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

/**
* Set decorations.
Expand Down Expand Up @@ -4009,7 +4010,7 @@ protected List<LayoutConnectivity> getLayoutConnectivity() {
}
} // if (lb1 != null)
return results;
}
} // getLayoutConnectivity()

/**
* {@inheritDoc}
Expand Down

0 comments on commit 9b3b95a

Please sign in to comment.