Skip to content

Commit

Permalink
Bring formatting up-to-date with google-java-format expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvanderlinde committed Feb 27, 2023
1 parent 86269e8 commit 67c43ff
Show file tree
Hide file tree
Showing 190 changed files with 22,344 additions and 6,498 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
*/
package net.rptools.clientserver.simple;

/** @author trevor */
/**
* @author trevor
*/
public interface DisconnectHandler {

public void handleDisconnect(AbstractConnection conn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/** @author drice */
/**
* @author drice
*/
public class SocketServerConnection extends AbstractServerConnection {

private static final Logger log = LogManager.getLogger(SocketServerConnection.class);
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/rptools/lib/image/ImageUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/** @author trevor */
/**
* @author trevor
*/
public class ImageUtil {
private static final Logger log = LogManager.getLogger();

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/rptools/lib/io/PackedFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ public Set<String> getPaths() throws IOException {
return paths;
}

/** @return Getter for file */
/**
* @return Getter for file
*/
public File getPackedFile() {
return file;
}
Expand Down
48 changes: 36 additions & 12 deletions src/main/java/net/rptools/lib/transferable/TokenTransferData.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,62 +129,86 @@ public class TokenTransferData extends HashMap<String, Object> implements Serial
* Instance Methods
*-------------------------------------------------------------------------------------------*/

/** @return Getter for isVisible */
/**
* @return Getter for isVisible
*/
public boolean isVisible() {
return isVisible;
}

/** @param aIsVisible Setter for isVisible */
/**
* @param aIsVisible Setter for isVisible
*/
public void setVisible(boolean aIsVisible) {
isVisible = aIsVisible;
}

/** @return Getter for name */
/**
* @return Getter for name
*/
public String getName() {
return name;
}

/** @param aName Setter for name */
/**
* @param aName Setter for name
*/
public void setName(String aName) {
name = aName;
}

/** @return Getter for players */
/**
* @return Getter for players
*/
public Set<String> getPlayers() {
return players;
}

/** @param aPlayers Setter for players */
/**
* @param aPlayers Setter for players
*/
public void setPlayers(Set<String> aPlayers) {
players = aPlayers;
}

/** @return Getter for token */
/**
* @return Getter for token
*/
public ImageIcon getToken() {
return token;
}

/** @param aToken Setter for token */
/**
* @param aToken Setter for token
*/
public void setToken(ImageIcon aToken) {
token = aToken;
}

/** @return Getter for facing */
/**
* @return Getter for facing
*/
public Integer getFacing() {
return facing;
}

/** @param aFacing Setter for facing */
/**
* @param aFacing Setter for facing
*/
public void setFacing(Integer aFacing) {
facing = aFacing;
}

/** @return Getter for location */
/**
* @return Getter for location
*/
public Point getLocation() {
return location;
}

/** @param aLocation Setter for location */
/**
* @param aLocation Setter for location
*/
public void setLocation(Point aLocation) {
location = aLocation;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/rptools/maptool/client/AppActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -3038,7 +3038,8 @@ protected void done() {
&& !map.zone.getExposedAreaMetaData().isEmpty())) {
boolean ok =
MapTool.confirm(
"<html>Map contains exposed areas of fog.<br>Do you want to reset all of the fog?");
"<html>Map contains exposed areas of fog.<br>Do you want to reset all of the"
+ " fog?");
if (ok) {
// This fires a ModelChangeEvent, but that shouldn't matter
map.zone.clearExposedArea(false);
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/rptools/maptool/client/AppStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
import net.rptools.maptool.client.ui.theme.Borders;
import net.rptools.maptool.client.ui.theme.RessourceManager;

/** @author trevor */
/**
* @author trevor
*/
public class AppStyle {

public static ImageBorder border = RessourceManager.getBorder(Borders.GRAY2);
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/rptools/maptool/client/ChatAutoSave.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/** @author frank */
/**
* @author frank
*/
public class ChatAutoSave {
private static Logger log = LogManager.getLogger(ChatAutoSave.class);
private static final ChatAutoSave self = new ChatAutoSave();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@

public class LaunchInstructions {
private static final String USAGE =
"<html><body width=\"400\">You are running MapTool with insufficient memory allocated (%dMB).<br><br>"
+ "You may experience odd behavior, especially when connecting to or hosting a server.<br><br> "
+ "MapTool will launch anyway, but it is recommended that you increase the maximum memory allocated or don't set a limit.</body></html>";
"<html><body width=\"400\">You are running MapTool with insufficient memory allocated"
+ " (%dMB).<br><br>You may experience odd behavior, especially when connecting to or"
+ " hosting a server.<br><br> MapTool will launch anyway, but it is recommended that you"
+ " increase the maximum memory allocated or don't set a limit.</body></html>";

static {
// This will inject additional data tags in log4j2 which will be picked up by Sentry.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import javax.swing.JMenu;
import javax.swing.JMenuItem;

/** @author tylere */
/**
* @author tylere
*/
public class MRUCampaignManager {
// To increase max mru's need to update mnemonics code
private static final int DEFAULT_MAX_MRU = 9;
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/net/rptools/maptool/client/MapTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,9 @@ public static ServerCommand serverCommand() {
return serverCommand;
}

/** @return the server, or null if player is a client. */
/**
* @return the server, or null if player is a client.
*/
public static MapToolServer getServer() {
return server;
}
Expand Down Expand Up @@ -1155,7 +1157,10 @@ public static LocalPlayer getPlayer() {
}

public static void startPersonalServer(Campaign campaign)
throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, ExecutionException,
throws IOException,
NoSuchAlgorithmException,
InvalidKeySpecException,
ExecutionException,
InterruptedException {
ServerConfig config = ServerConfig.createPersonalServerConfig();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/** @author trevor */
/**
* @author trevor
*/
public class MapToolConnection {

/** Instance used for log messages. */
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/rptools/maptool/client/ScreenPoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ public String toString() {
return "ScreenPoint" + super.toString();
}

/** @see java.lang.Object#equals(java.lang.Object) */
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object pt) {
if (!(pt instanceof ScreenPoint)) return false;
Expand Down
23 changes: 17 additions & 6 deletions src/main/java/net/rptools/maptool/client/TransferableHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ private static Asset handleImage(URL url, String type, Transferable transferable
if (log.isDebugEnabled())
log.debug(
type
+ " didn't work; trying ImageTransferableHandler().getTransferObject()"); // $NON-NLS-1$
+ " didn't work; trying"
+ " ImageTransferableHandler().getTransferObject()"); // $NON-NLS-1$
image = (BufferedImage) new ImageTransferableHandler().getTransferObject(transferable);
}
if (image != null) {
Expand Down Expand Up @@ -679,30 +680,40 @@ public boolean importData(JComponent comp, Transferable t) {
return tokens != null;
}

/** @see javax.swing.TransferHandler#getSourceActions(javax.swing.JComponent) */
/**
* @see javax.swing.TransferHandler#getSourceActions(javax.swing.JComponent)
*/
@Override
public int getSourceActions(JComponent c) {
return NONE;
}

/** @return Getter for tokens */
/**
* @return Getter for tokens
*/
public List<Token> getTokens() {
return tokens;
}

/** @param tokens Setter for tokens */
/**
* @param tokens Setter for tokens
*/
public void setTokens(List<Token> tokens) {
// This doesn't appear to be called from anywhere; this class simply makes assignments
// to the instance member variable. Remove this method?
this.tokens = tokens;
}

/** @return Getter for configureTokens */
/**
* @return Getter for configureTokens
*/
public List<Boolean> getConfigureTokens() {
return configureTokens;
}

/** @param configureTokens Setter for configureTokens */
/**
* @param configureTokens Setter for configureTokens
*/
public void setConfigureTokens(List<Boolean> configureTokens) {
this.configureTokens = configureTokens;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ private AddAllToInitiativeFunction() {
/** singleton instance of this function */
private static final AddAllToInitiativeFunction instance = new AddAllToInitiativeFunction();

/** @return singleton instance */
/**
* @return singleton instance
*/
public static AddAllToInitiativeFunction getInstance() {
return instance;
}

/** @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List) */
/**
* @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List)
*/
@Override
public Object childEvaluate(
Parser parser, VariableResolver resolver, String functionName, List<Object> args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ private CurrentInitiativeFunction() {
/** singleton instance of this function */
private static final CurrentInitiativeFunction instance = new CurrentInitiativeFunction();

/** @return singleton instance */
/**
* @return singleton instance
*/
public static CurrentInitiativeFunction getInstance() {
return instance;
}

/** @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List) */
/**
* @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List)
*/
@Override
public Object childEvaluate(
Parser parser, VariableResolver resolver, String functionName, List<Object> args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ private FindTokenFunctions() {
"getVisibleTokenNames");
}

/** @return the instance. */
/**
* @return the instance.
*/
public static FindTokenFunctions getInstance() {
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ private InitiativeRoundFunction() {
/** singleton instance of this function */
private static final InitiativeRoundFunction instance = new InitiativeRoundFunction();

/** @return singleton instance */
/**
* @return singleton instance
*/
public static InitiativeRoundFunction getInstance() {
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ private MiscInitiativeFunction() {
/** singleton instance of this function */
private static final MiscInitiativeFunction instance = new MiscInitiativeFunction();

/** @return singleton instance */
/**
* @return singleton instance
*/
public static MiscInitiativeFunction getInstance() {
return instance;
}

/** @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List) */
/**
* @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List)
*/
@Override
public Object childEvaluate(
Parser parser, VariableResolver resolver, String functionName, List<Object> args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ private RemoveAllFromInitiativeFunction() {
private static final RemoveAllFromInitiativeFunction instance =
new RemoveAllFromInitiativeFunction();

/** @return singleton instance */
/**
* @return singleton instance
*/
public static RemoveAllFromInitiativeFunction getInstance() {
return instance;
}

/** @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List) */
/**
* @see AbstractFunction#childEvaluate(Parser, VariableResolver, String, List)
*/
@Override
public Object childEvaluate(
Parser parser, VariableResolver resolver, String functionName, List<Object> args)
Expand Down
Loading

0 comments on commit 67c43ff

Please sign in to comment.