Skip to content

Commit

Permalink
Merge pull request #3989 from cwisniew/feature-update-google-format
Browse files Browse the repository at this point in the history
  • Loading branch information
cwisniew committed Apr 23, 2023
2 parents f8c384d + 6e82813 commit d29ec89
Show file tree
Hide file tree
Showing 154 changed files with 1,415 additions and 478 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spotless {
toggleOffOn()

// Now using the Google Java style guide
googleJavaFormat("1.11.0")
googleJavaFormat("1.16.0")
}

format 'misc', {
Expand Down
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
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 @@ -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
20 changes: 15 additions & 5 deletions src/main/java/net/rptools/maptool/client/TransferableHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -679,30 +679,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

0 comments on commit d29ec89

Please sign in to comment.