Changeset 18972 in josm for trunk


Ignore:
Timestamp:
2024-02-09T15:26:06+01:00 (10 months ago)
Author:
taylor.smock
Message:

See #23465: Add additional javadoc comments

This also fixes some sonarlint issues

Location:
trunk
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r18871 r18972  
    103103    }
    104104
     105    /**
     106     * A record class to store how a multipolygon is constructed
     107     */
    105108    public static class Multipolygon {
    106109        private final Way outerWay;
     
    161164    /**
    162165     * HelperClass - saves a way and the "inside" side.
    163      *
     166     * <p>
    164167     * insideToTheLeft: if true left side is "in", false -right side is "in".
    165168     * Left and right are determined along the orientation of way.
     
    235238    }
    236239
     240    /**
     241     * A multipolygon with a list of inner ways and an assembled polygon for the outer way
     242     */
    237243    public static class AssembledMultipolygon {
     244        /** The outer way of the multipolygon */
    238245        public AssembledPolygon outerWay;
     246        /** The inner polygons of the multipolygon */
    239247        public List<AssembledPolygon> innerWays;
    240248
     249        /**
     250         * Create a new {@link AssembledMultipolygon}
     251         * @param way The outer way
     252         */
    241253        public AssembledMultipolygon(AssembledPolygon way) {
    242254            outerWay = way;
     
    402414
    403415        /**
    404          * Search for an other way coming to the same head node at left side from last way. #9951
     416         * Search for another way coming to the same head node at left side from last way. #9951
    405417         * @return left way or null if none found
    406418         */
     
    652664
    653665        //first remove nodes in the same coordinate
    654         boolean removedDuplicates = false;
    655         removedDuplicates |= removeDuplicateNodes(allStartingWays);
     666        boolean removedDuplicates = removeDuplicateNodes(allStartingWays);
    656667
    657668        if (removedDuplicates) {
     
    11351146        if (chunks.size() > 1) {
    11361147            SplitWayCommand split = SplitWayCommand.splitWay(way, chunks,
    1137                     Collections.<OsmPrimitive>emptyList(), SplitWayCommand.Strategy.keepFirstChunk());
     1148                    Collections.emptyList(), SplitWayCommand.Strategy.keepFirstChunk());
    11381149
    11391150            if (split != null) {
  • trunk/src/org/openstreetmap/josm/data/osm/Filter.java

    r15477 r18972  
    9393    }
    9494
     95    /**
     96     * The class for storing and retrieving a filter from a preference entry
     97     */
    9598    public static class FilterPreferenceEntry {
     99        /** See {@link Filter#version} */
    96100        @WriteExplicitly
    97101        @StructEntry public String version = "1";
    98102
     103        /** See {@link Filter#text} */
    99104        @StructEntry public String text;
    100105
     
    111116        @StructEntry public String mode = "add";
    112117
     118        /** See {@link Filter#caseSensitive} */
    113119        @StructEntry public boolean case_sensitive;
    114120
     121        /** See {@link Filter#regexSearch} */
    115122        @StructEntry public boolean regex_search;
    116123
     124        /** See {@link Filter#mapCSSSearch} */
    117125        @StructEntry public boolean mapCSS_search;
    118126
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMergeModel.java

    r18801 r18972  
    356356    }
    357357
     358    /**
     359     * Clear the merged list.
     360     */
    358361    public void clearMerged() {
    359362        getMergedEntries().clear();
     
    582585     * This an adapter between a {@link JTable} and one of the three entry lists
    583586     * in the role {@link ListRole} managed by the {@link AbstractListMergeModel}.
    584      *
     587     * <p>
    585588     * From the point of view of the {@link JTable} it is a {@link TableModel}.
    586589     *
     
    593596
    594597        /**
    595          *
     598         * Create a new {@link EntriesTableModel}
    596599         * @param role the role
    597600         */
     
    731734     * This is the selection model to be used in a {@link JTable} which displays
    732735     * an entry list managed by {@link AbstractListMergeModel}.
    733      *
     736     * <p>
    734737     * The model ensures that only rows displaying an entry in the entry list
    735738     * can be selected. "Empty" rows can't be selected.
     
    832835    }
    833836
     837    /**
     838     * A model for {@link ComparePairType} with the enums added as options.
     839     */
    834840    public class ComparePairListModel extends JosmComboBoxModel<ComparePairType> {
    835841
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java

    r15732 r18972  
    3333    public Direction direction;
    3434
     35    /**
     36     * The direction of the way connection
     37     */
    3538    public enum Direction {
    3639        FORWARD, BACKWARD, ROUNDABOUT_LEFT, ROUNDABOUT_RIGHT, NONE;
  • trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java

    r18801 r18972  
    5959import org.xml.sax.SAXException;
    6060
     61import jakarta.annotation.Nullable;
     62
    6163/**
    6264 * Class to process configuration changes stored in XML
     
    176178    }
    177179
     180    /**
     181     * Ask the user for text
     182     * @param text The message for the user
     183     * @return The text the user entered
     184     */
     185    @Nullable
    178186    public static String askForText(String text) {
    179187        String s = JOptionPane.showInputDialog(MainApplication.getMainFrame(), text, tr("Enter text"), JOptionPane.QUESTION_MESSAGE);
     
    261269    }
    262270
     271    /**
     272     * Delete a file
     273     * @param path The path to delete inside the base directory
     274     * @param base The base directory for the path
     275     */
    263276    public static void deleteFile(String path, String base) {
    264277        String dir = getDirectoryByAbbr(base);
     
    277290    }
    278291
     292    /**
     293     * Delete a file or a directory
     294     * @param f The file or directory to delete
     295     */
    279296    public static void deleteFileOrDirectory(File f) {
    280297        if (f.isDirectory()) {
     
    293310    private static boolean busy;
    294311
     312    /**
     313     * Perform install, uninstall, and deletion operations on plugins
     314     * @param install The {@code ;} delimited list of plugins to install
     315     * @param uninstall The {@code ;} delimited list of plugins to uninstall
     316     * @param delete The {@code ;} delimited list of plugins to delete
     317     */
    295318    public static void pluginOperation(String install, String uninstall, String delete) {
    296319        final List<String> installList = new ArrayList<>();
     
    376399    }
    377400
     401    /**
     402     * Read preferences from xml files
     403     */
    378404    public static class XMLCommandProcessor {
    379405
     
    384410        private boolean lastV; // last If condition result
    385411
     412        /**
     413         * Read preferences from an XML file
     414         * @param file The file to read custom preferences from
     415         */
    386416        public void openAndReadXML(File file) {
    387417            PreferencesUtils.log("-- Reading custom preferences from " + file.getAbsolutePath() + " --");
     
    397427        }
    398428
     429        /**
     430         * Read custom preferences from an XML {@link InputStream}
     431         * @param is The {@link InputStream} to read from
     432         */
    399433        public void openAndReadXML(InputStream is) {
    400434            try {
     
    409443        }
    410444
     445        /**
     446         * Create a new {@link XMLCommandProcessor}
     447         * @param mainPrefs The preferences to modify with custom preferences
     448         */
    411449        public XMLCommandProcessor(Preferences mainPrefs) {
    412450            this.mainPrefs = mainPrefs;
     
    548586            String locText = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".text"));
    549587            if (!locText.isEmpty()) text = locText;
    550             String var = elem.getAttribute("var");
    551             if (var.isEmpty()) var = "result";
     588            String varAttribute = elem.getAttribute("var");
     589            if (varAttribute.isEmpty()) varAttribute = "result";
    552590
    553591            String input = evalVars(elem.getAttribute("input"));
    554592            if ("true".equals(input)) {
    555                 setVar(var, askForText(text));
     593                setVar(varAttribute, askForText(text));
    556594            } else {
    557595                String opts = evalVars(elem.getAttribute("options"));
    558596                String locOpts = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".options"));
    559597                if (!locOpts.isEmpty()) opts = locOpts;
    560                 setVar(var, String.valueOf(askForOption(text, opts)));
    561             }
    562         }
    563 
     598                setVar(varAttribute, String.valueOf(askForOption(text, opts)));
     599            }
     600        }
     601
     602        /**
     603         * Set a variable in the environment
     604         * @param name The name of the environment variable
     605         * @param value The value for the environment variable
     606         */
    564607        public void setVar(String name, String value) {
    565608            environment.put(name, value);
     
    604647         */
    605648        private String evalVars(String s) {
    606             Matcher mr = Pattern.compile("\\$\\{(?<identifier>[^\\}]*)\\}").matcher(s);
     649            Matcher mr = Pattern.compile("\\$\\{(?<identifier>[^}]*)}").matcher(s);
    607650            StringBuffer sb = new StringBuffer();
    608651            while (mr.find()) {
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java

    r16438 r18972  
    2222    public static final String MODE_PROP = SaveLayerInfo.class.getName() + ".mode";
    2323
     24    /**
     25     * The status of the editor
     26     */
    2427    public enum Mode {
    2528        EDITING_DATA,
  • trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java

    r17862 r18972  
    66
    77import java.awt.Component;
     8import java.awt.GridBagConstraints;
    89import java.awt.GridBagLayout;
    910import java.awt.event.ActionEvent;
     
    4849/**
    4950 * Abstract base class for background imagery layers ({@link WMSLayer}, {@link TMSLayer}, {@link WMTSLayer}).
    50  *
     51 * <p>
    5152 * Handles some common tasks, like image filters, image processors, etc.
    5253 */
     
    138139                panel.add(new JLabel(entry.get(0) + ':'), GBC.std());
    139140                panel.add(GBC.glue(5, 0), GBC.std());
    140                 panel.add(createTextField(entry.get(1)), GBC.eol().fill(GBC.HORIZONTAL));
     141                panel.add(createTextField(entry.get(1)), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
    141142            }
    142143        }
     
    193194    }
    194195
     196    /**
     197     * Create an offset for an imagery layer
     198     */
    195199    public class OffsetAction extends AbstractAction implements LayerAction {
    196200        @Override
     
    223227    /**
    224228     * Create the submenu or the menu item to set the offset of the layer.
    225      *
     229     * <p>
    226230     * If only one menu item for this layer exists, it is returned by this method.
    227      *
     231     * <p>
    228232     * If there are multiple, this method appends them to the subMenu and then returns the reference to the subMenu.
    229233     * @param subMenu The subMenu to use
  • trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java

    r12799 r18972  
    124124    }
    125125
     126    /**
     127     * Go to the next marker in a layer
     128     */
    126129    public static final class JumpToNextMarker extends JumpToMarker {
    127130
     131        /**
     132         * Create a new {@link JumpToNextMarker} action
     133         * @param layer The layer to use when jumping to the next marker
     134         */
    128135        public JumpToNextMarker(JumpToMarkerLayer layer) {
    129136            super(layer, Shortcut.registerShortcut("core_multikey:nextMarker", tr("Multikey: {0}", tr("Next marker")),
     
    140147    }
    141148
     149    /**
     150     * Go to the previous marker in a layer
     151     */
    142152    public static final class JumpToPreviousMarker extends JumpToMarker {
    143153
     154        /**
     155         * Create a new {@link JumpToPreviousMarker} action
     156         * @param layer The layer to use when jumping to the previous marker
     157         */
    144158        public JumpToPreviousMarker(JumpToMarkerLayer layer) {
    145159            super(layer, Shortcut.registerShortcut("core_multikey:previousMarker", tr("Multikey: {0}", tr("Previous marker")),
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r18948 r18972  
    620620    }
    621621
     622    /**
     623     * Toggle visibility of the marker text and icons
     624     */
    622625    public static final class ShowHideMarkerText extends AbstractAction implements LayerAction {
    623626        private final transient MarkerLayer layer;
    624627
     628        /**
     629         * Create a new {@link ShowHideMarkerText} action
     630         * @param layer The layer to toggle the visible state of the marker text and icons
     631         */
    625632        public ShowHideMarkerText(MarkerLayer layer) {
    626633            super(tr("Show Text/Icons"));
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java

    r16843 r18972  
    1515/**
    1616 * Setting to customize a MapPaint style.
    17  *
     17 * <p>
    1818 * Can be changed by the user in the right click menu of the mappaint style
    1919 * dialog.
    20  *
     20 * <p>
    2121 * Defined in the MapCSS style, e.g.
    2222 * <pre>
     
    119119    }
    120120
     121    /**
     122     * A setting for a style
     123     * @param <T> The property type
     124     */
    121125    class PropertyStyleSetting<T> extends LabeledStyleSetting implements StyleSetting {
    122126        private final Class<T> type;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r18829 r18972  
    4040    @interface NullableArguments {}
    4141
     42    /**
     43     * Represents a function that accepts three arguments and produces a result. This is a specialization of {@link Function}.
     44     * This is a functional interface whose functional method is {@link #apply(Object, Object, Object)}.
     45     * @param <T> The type of the first argument
     46     * @param <U> The type of the second argument
     47     * @param <V> The type of the third argument
     48     * @param <R> The type of the result of the function
     49     * @see Function
     50     * @see BiFunction
     51     */
    4252    @FunctionalInterface
    4353    public interface TriFunction<T, U, V, R> {
     54        /**
     55         * Call the function
     56         * @param t The first argument
     57         * @param u The second argument
     58         * @param v The third argument
     59         * @return The result of the function call
     60         */
    4461        R apply(T t, U u, V v);
    4562    }
    4663
     64    /**
     65     * Represents a function that accepts four arguments and produces a result. This is a specialization of {@link Function}.
     66     * This is a functional interface whose functional method is {@link #apply(Object, Object, Object, Object)}.
     67     * @param <T> The type of the first argument
     68     * @param <U> The type of the second argument
     69     * @param <V> The type of the third argument
     70     * @param <W> The type of the fourth argument
     71     * @param <R> The type of the result of the function
     72     * @see Function
     73     * @see BiFunction
     74     */
    4775    @FunctionalInterface
    4876    public interface QuadFunction<T, U, V, W, R> {
     77        /**
     78         * Call the function
     79         * @param t The first argument
     80         * @param u The second argument
     81         * @param v The third argument
     82         * @param w The fourth argument
     83         * @return The result of the function call
     84         */
    4985        R apply(T t, U u, V v, W w);
    5086    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r18871 r18972  
    88import java.awt.Dimension;
    99import java.awt.GraphicsEnvironment;
     10import java.awt.GridBagConstraints;
    1011import java.awt.GridBagLayout;
    1112import java.awt.GridLayout;
     
    240241    }
    241242
     243    /**
     244     * Parse actions from a name
     245     */
    242246    public static class ActionParser {
    243247        private final Map<String, Action> actions;
     
    920924            final JPanel left = new JPanel(new GridBagLayout());
    921925            left.add(new JLabel(tr("Toolbar")), GBC.eol());
    922             left.add(new JScrollPane(selectedList), GBC.std().fill(GBC.BOTH));
     926            left.add(new JScrollPane(selectedList), GBC.std().fill(GridBagConstraints.BOTH));
    923927
    924928            final JPanel right = new JPanel(new GridBagLayout());
    925929            right.add(new JLabel(tr("Available")), GBC.eol());
    926             right.add(new JScrollPane(actionsTree), GBC.eol().fill(GBC.BOTH));
     930            right.add(new JScrollPane(actionsTree), GBC.eol().fill(GridBagConstraints.BOTH));
    927931
    928932            final JPanel buttons = new JPanel(new GridLayout(6, 1));
     
    978982            actionParametersTable.getColumnModel().getColumn(0).setHeaderValue(tr("Parameter name"));
    979983            actionParametersTable.getColumnModel().getColumn(1).setHeaderValue(tr("Parameter value"));
    980             actionParametersPanel.add(actionParametersTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL));
    981             actionParametersPanel.add(actionParametersTable, GBC.eol().fill(GBC.BOTH).insets(0, 0, 0, 10));
     984            actionParametersPanel.add(actionParametersTable.getTableHeader(), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
     985            actionParametersPanel.add(actionParametersTable, GBC.eol().fill(GridBagConstraints.BOTH).insets(0, 0, 0, 10));
    982986            actionParametersPanel.setVisible(false);
    983987
    984988            JPanel panel = gui.createPreferenceTab(this);
    985             panel.add(p, GBC.eol().fill(GBC.BOTH));
    986             panel.add(actionParametersPanel, GBC.eol().fill(GBC.HORIZONTAL));
     989            panel.add(p, GBC.eol().fill(GridBagConstraints.BOTH));
     990            panel.add(actionParametersPanel, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
    987991            selected.removeAllElements();
    988992            for (ActionDefinition actionDefinition: getDefinedActions()) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r18342 r18972  
    55import static org.openstreetmap.josm.tools.I18n.tr;
    66
     7import java.awt.GridBagConstraints;
    78import java.awt.GridBagLayout;
    89import java.io.IOException;
     
    182183
    183184        sources = new TaggingPresetSourceEditor();
    184         panel.add(sources, GBC.eol().fill(GBC.BOTH));
     185        panel.add(sources, GBC.eol().fill(GridBagConstraints.BOTH));
    185186        PreferencePanel preferencePanel = gui.createPreferenceTab(this);
    186         preferencePanel.add(panel, GBC.eol().fill(GBC.BOTH));
     187        preferencePanel.add(panel, GBC.eol().fill(GridBagConstraints.BOTH));
    187188        sources.deferLoading(gui, preferencePanel);
    188189        gui.addValidationListener(validationListener);
    189190    }
    190191
     192    /**
     193     * An editor for what preset source locations are used
     194     */
    191195    public static class TaggingPresetSourceEditor extends SourceEditor {
    192196
     197        /**
     198         * Create a new {@link TaggingPresetSourceEditor} with the default providers
     199         */
    193200        public TaggingPresetSourceEditor() {
    194201            super(SourceType.TAGGING_PRESET, Config.getUrls().getJOSMWebsite()+"/presets", presetSourceProviders, true);
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java

    r18438 r18972  
    55
    66import java.awt.BorderLayout;
     7import java.awt.GridBagConstraints;
    78import java.awt.GridBagLayout;
    89import java.awt.Insets;
     
    120121            this.setLayout(new GridBagLayout());
    121122            JPanel p2 = new JPanel(new GridBagLayout());
    122             p2.add(cbInput, GBC.std().fill(GBC.HORIZONTAL).insets(0, 20, 5, 5));
     123            p2.add(cbInput, GBC.std().fill(GridBagConstraints.HORIZONTAL).insets(0, 20, 5, 5));
    123124            p2.add(btnCheck, GBC.eol().insets(0, 20, 0, 5));
    124             this.add(p2, GBC.eol().fill(GBC.HORIZONTAL));
     125            this.add(p2, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
    125126            p2 = new JPanel(new GridBagLayout());
    126             p2.add(valStatus, GBC.std().anchor(GBC.WEST).weight(0.0001, 0));
    127             p2.add(errorsPanel, GBC.eol().fill(GBC.HORIZONTAL));
    128             this.add(p2, GBC.eol().fill(GBC.HORIZONTAL));
     127            p2.add(valStatus, GBC.std().anchor(GridBagConstraints.WEST).weight(0.0001, 0));
     128            p2.add(errorsPanel, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
     129            this.add(p2, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
    129130            p2 = new JPanel(new GridBagLayout());
    130131            p2.add(btnInfo, GBC.std().insets(0, 20, 0, 0));
    131             p2.add(GBC.glue(1, 0), GBC.eol().fill(GBC.HORIZONTAL));
    132             this.add(p2, GBC.eol().fill(GBC.HORIZONTAL));
    133         }
    134 
     132            p2.add(GBC.glue(1, 0), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
     133            this.add(p2, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
     134        }
     135
     136        /**
     137         * Remember the current input
     138         */
    135139        public void rememberHistory() {
    136140            cbInput.addCurrentItemToHistory();
     
    139143    }
    140144
     145    /**
     146     * A dialog for the available parameters of the custom projection
     147     */
    141148    public static class ParameterInfoDialog extends ExtendedDialog {
    142149
     
    212219        }
    213220        PreferencePanel prefPanel = (PreferencePanel) panel;
    214         String pref = prefPanel.cbInput.getEditorComponent().getText();
     221        String savePreferences = prefPanel.cbInput.getEditorComponent().getText();
    215222        prefPanel.rememberHistory();
    216         return Collections.singleton(pref);
     223        return Collections.singleton(savePreferences);
    217224    }
    218225
  • trunk/src/org/openstreetmap/josm/gui/util/MultikeyShortcutAction.java

    r17333 r18972  
    1414public interface MultikeyShortcutAction extends Action {
    1515
     16    /**
     17     * Information for a Multikey action
     18     */
    1619    class MultikeyInfo {
    1720        private final int index;
     
    4346    Shortcut getMultikeyShortcut();
    4447
     48    /**
     49     * Execute a multi key action
     50     * @param index The index to execute
     51     * @param repeatLastAction {@code true} if the last action should be executed if no action is found for the given index.
     52     */
    4553    void executeMultikeyAction(int index, boolean repeatLastAction);
    4654
  • trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java

    r17333 r18972  
    88/**
    99 * This class converts a template string (stream of characters) into a stream of tokens.
    10  *
     10 * <p>
    1111 * The result of the tokenization (also called lexical analysis) serves as input for the
    1212 * parser {@link TemplateParser}.
     
    1414public class Tokenizer {
    1515
     16    /**
     17     * A token for the parser
     18     */
    1619    public static class Token {
    1720        private final TokenType type;
     
    1922        private final String text;
    2023
     24        /**
     25         * A token
     26         * @param type The token type
     27         * @param position The position of the token
     28         */
    2129        public Token(TokenType type, int position) {
    2230            this(type, position, null);
    2331        }
    2432
     33        /**
     34         * A token
     35         * @param type The token type
     36         * @param position The position of the token
     37         * @param text The text for the token
     38         */
    2539        public Token(TokenType type, int position, String text) {
    2640            this.type = type;
     
    4761    }
    4862
     63    /**
     64     * The token type
     65     */
    4966    public enum TokenType { CONDITION_START, VARIABLE_START, CONTEXT_SWITCH_START, END, PIPE, APOSTROPHE, TEXT, EOF }
    5067
     
    7592    }
    7693
     94    /**
     95     * Get the next token
     96     * @return The next token
     97     * @throws ParseError if there is an error getting the next token
     98     */
    7799    public Token nextToken() throws ParseError {
    78100        if (currentToken != null) {
     
    128150    }
    129151
     152    /**
     153     * Look at the next token
     154     * @return The next token
     155     * @throws ParseError if there is an error getting the next token
     156     */
    130157    public Token lookAhead() throws ParseError {
    131158        if (currentToken == null) {
     
    135162    }
    136163
     164    /**
     165     * Skip until we hit a character
     166     * @param lastChar The last character to skip
     167     * @return A token with the skipped characters
     168     */
    137169    public Token skip(char lastChar) {
    138170        currentToken = null;
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/AssertionsInEDT.java

    r18694 r18972  
    2222@ExtendWith(AssertionsInEDT.AssertionsExtension.class)
    2323public @interface AssertionsInEDT {
     24    /**
     25     * Check for assertions in the EDT
     26     */
    2427    class AssertionsExtension implements BeforeEachCallback {
    2528        private Runnable edtAssertionMockingRunnable = EDTAssertionMocker::new;
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/FakeImagery.java

    r18893 r18972  
    114114    }
    115115
     116    /**
     117     * A wiremock extension for fake imagery
     118     */
    116119    class FakeImageryWireMockExtension extends WireMockExtension {
    117120
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/HTTPS.java

    r18893 r18972  
    3131@ExtendWith(HTTPS.HTTPSExtension.class)
    3232public @interface HTTPS {
     33    /**
     34     * Initialize HTTPS support
     35     */
    3336    class HTTPSExtension implements BeforeEachCallback {
    3437        private static boolean initialized;
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/LayerManager.java

    r18649 r18972  
    2525@ExtendWith(LayerManager.LayerManagerExtension.class)
    2626public @interface LayerManager {
     27    /**
     28     * Clean the layer environment
     29     */
    2730    class LayerManagerExtension implements BeforeEachCallback, AfterEachCallback {
    2831        @Override
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/Logging.java

    r18694 r18972  
    1414@Target({ElementType.TYPE, ElementType.METHOD})
    1515public @interface Logging {
     16    /**
     17     * Set up loggers for testing
     18     */
    1619    class LoggingExtension implements BeforeEachCallback {
    1720
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/MapPaintStyles.java

    r18870 r18972  
    2626@ExtendWith(MapPaintStyles.MapPaintStylesExtension.class)
    2727public @interface MapPaintStyles {
     28    /**
     29     * Set up the default paintstyles
     30     */
    2831    class MapPaintStylesExtension implements BeforeEachCallback {
    2932        private static int lastHashcode;
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/MeasurementSystem.java

    r18893 r18972  
    4242    String value() default "Metric";
    4343
     44    /**
     45     * Set up the system of measurement
     46     */
    4447    class SystemOfMeasurementExtension implements BeforeEachCallback {
    4548        @Override
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/OsmApi.java

    r18821 r18972  
    3131public @interface OsmApi {
    3232    APIType value() default APIType.NONE;
     33
     34    /**
     35     * The API type to set up
     36     */
    3337    enum APIType {
    3438        /** Don't use any API */
     
    4044    }
    4145
     46    /**
     47     * Set up {@link org.openstreetmap.josm.io.OsmApi} for testing
     48     */
    4249    class OsmApiExtension implements BeforeAllCallback, BeforeEachCallback, AfterEachCallback {
    4350        @Override
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/ProjectionNadGrids.java

    r18870 r18972  
    2828@ExtendWith(ProjectionNadGrids.NadGridsExtension.class)
    2929public @interface ProjectionNadGrids {
     30    /**
     31     * Set up the NAD grids for testing
     32     */
    3033    class NadGridsExtension implements BeforeEachCallback {
    3134        @Override
Note: See TracChangeset for help on using the changeset viewer.