Changeset 10748 in josm


Ignore:
Timestamp:
2016-08-06T19:21:33+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - squid:S00100 - Method names should comply with a naming convention

Location:
trunk/src/org/openstreetmap/josm
Files:
23 edited

Legend:

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

    r10467 r10748  
    500500     * @return correct angle
    501501     */
    502     private static double standard_angle_0_to_2PI(double a) {
     502    private static double standardAngle0to2PI(double a) {
    503503        while (a >= 2 * Math.PI) {
    504504            a -= 2 * Math.PI;
     
    515515     * @return correct angle
    516516     */
    517     private static double standard_angle_mPI_to_PI(double a) {
     517    private static double standardAngleMPItoPI(double a) {
    518518        while (a > Math.PI) {
    519519            a -= 2 * Math.PI;
     
    572572     */
    573573    private static int angleToDirectionChange(double a, double deltaMax) throws RejectedAngleException {
    574         a = standard_angle_mPI_to_PI(a);
     574        a = standardAngleMPItoPI(a);
    575575        double d0 = Math.abs(a);
    576576        double d90 = Math.abs(a - Math.PI / 2);
     
    584584            dirChange = -1;
    585585        } else {
    586             a = standard_angle_0_to_2PI(a);
     586            a = standardAngle0to2PI(a);
    587587            double d180 = Math.abs(a - Math.PI);
    588588            if (d180 < deltaMax) {
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r10716 r10748  
    712712        synchronized (selectionLock) {
    713713            for (PrimitiveId o : osm) {
    714                 changed = changed | this.__toggleSelected(o);
     714                changed = changed | this.dotoggleSelected(o);
    715715            }
    716716            if (changed) {
     
    731731    }
    732732
    733     private boolean __toggleSelected(PrimitiveId primitiveId) {
     733    private boolean dotoggleSelected(PrimitiveId primitiveId) {
    734734        OsmPrimitive primitive = getPrimitiveByIdChecked(primitiveId);
    735735        if (primitive == null)
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r10001 r10748  
    134134        }
    135135
    136         boolean remove_content(T o) {
     136        boolean removeContent(T o) {
    137137            // If two threads try to remove item at the same time from different buckets of this QBLevel,
    138138            // it might happen that one thread removes bucket but don't remove parent because it still sees
     
    147147            }
    148148            if (this.canRemove()) {
    149                 this.remove_from_parent();
     149                this.removeFromParent();
    150150            }
    151151            return ret;
     
    158158         * is a dead end.
    159159         */
    160         void __split() {
     160        void doSplit() {
    161161            List<T> tmpcontent = content;
    162162            content = null;
     
    165165                int idx = o.getBBox().getIndex(level);
    166166                if (idx == -1) {
    167                     __add_content(o);
     167                    doAddContent(o);
    168168                } else {
    169169                    getChild(idx).doAdd(o);
     
    173173        }
    174174
    175         boolean __add_content(T o) {
     175        boolean doAddContent(T o) {
    176176            // The split_lock will keep two concurrent calls from overwriting content
    177177            if (content == null) {
     
    190190        }
    191191
    192         private void search_contents(BBox searchBbox, List<T> result) {
     192        private void searchContents(BBox searchBbox, List<T> result) {
    193193            /*
    194194             * It is possible that this was created in a split
     
    219219        }
    220220
    221         QBLevel<T> next_sibling() {
     221        QBLevel<T> findNextSibling() {
    222222            return (parent == null) ? null : parent.firstSiblingOf(this);
    223223        }
     
    229229        QBLevel<T> nextSibling() {
    230230            QBLevel<T> next = this;
    231             QBLevel<T> sibling = next.next_sibling();
     231            QBLevel<T> sibling = next.findNextSibling();
    232232            // Walk back up the tree to find the next sibling node.
    233233            // It may be either a leaf or branch.
     
    237237                    break;
    238238                }
    239                 sibling = next.next_sibling();
     239                sibling = next.findNextSibling();
    240240            }
    241241            return sibling;
     
    289289                }
    290290            }
    291             __add_content(o);
     291            doAddContent(o);
    292292            if (isLeaf() && content.size() > MAX_OBJECTS_PER_LEVEL && level < QuadTiling.NR_LEVELS) {
    293                 __split();
     293                doSplit();
    294294            }
    295295        }
     
    307307
    308308            if (this.hasContent()) {
    309                 search_contents(searchBbox, result);
     309                searchContents(searchBbox, result);
    310310            }
    311311
     
    330330        }
    331331
    332         int index_of(QBLevel<T> findThis) {
     332        int indexOf(QBLevel<T> findThis) {
    333333            QBLevel<T>[] children = getChildren();
    334334            for (int i = 0; i < QuadTiling.TILES_PER_LEVEL; i++) {
     
    359359        }
    360360
    361         void remove_from_parent() {
     361        void removeFromParent() {
    362362            if (parent == null)
    363363                return;
     
    378378
    379379            if (parent.canRemove()) {
    380                 parent.remove_from_parent();
     380                parent.removeFromParent();
    381381            }
    382382        }
     
    461461        searchCache = null; // Search cache might point to one of removed buckets
    462462        QBLevel<T> bucket = root.findBucket(t.getBBox());
    463         if (bucket.remove_content(t)) {
     463        if (bucket.removeContent(t)) {
    464464            size--;
    465465            return true;
     
    564564            contentIndex--;
    565565            T object = peek();
    566             currentNode.remove_content(object);
     566            currentNode.removeContent(object);
    567567        }
    568568    }
     
    607607        // of the nodes which is a parent of the search cache
    608608        while (tmp != null) {
    609             tmp.search_contents(searchBbox, ret);
     609            tmp.searchContents(searchBbox, ret);
    610610            tmp = tmp.parent;
    611611        }
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r10469 r10748  
    416416            if (parameters.get(Param.es.key) != null) {
    417417                double es = parseDouble(parameters, Param.es.key);
    418                 return Ellipsoid.create_a_es(a, es);
     418                return Ellipsoid.createAes(a, es);
    419419            }
    420420            if (parameters.get(Param.rf.key) != null) {
    421421                double rf = parseDouble(parameters, Param.rf.key);
    422                 return Ellipsoid.create_a_rf(a, rf);
     422                return Ellipsoid.createArf(a, rf);
    423423            }
    424424            if (parameters.get(Param.f.key) != null) {
    425425                double f = parseDouble(parameters, Param.f.key);
    426                 return Ellipsoid.create_a_f(a, f);
     426                return Ellipsoid.createAf(a, f);
    427427            }
    428428            if (parameters.get(Param.b.key) != null) {
    429429                double b = parseDouble(parameters, Param.b.key);
    430                 return Ellipsoid.create_a_b(a, b);
     430                return Ellipsoid.createAb(a, b);
    431431            }
    432432        }
  • trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java

    r10680 r10748  
    1717     * Airy 1830
    1818     */
    19     public static final Ellipsoid Airy = Ellipsoid.create_a_b(6377563.396, 6356256.910);
     19    public static final Ellipsoid Airy = Ellipsoid.createAb(6377563.396, 6356256.910);
    2020
    2121    /**
    2222     * Modified Airy 1849
    2323     */
    24     public static final Ellipsoid AiryMod = Ellipsoid.create_a_b(6377340.189, 6356034.446);
     24    public static final Ellipsoid AiryMod = Ellipsoid.createAb(6377340.189, 6356034.446);
    2525
    2626    /**
     
    2828     * same as GRS67 Modified
    2929     */
    30     public static final Ellipsoid AustSA = Ellipsoid.create_a_rf(6378160.0, 298.25);
     30    public static final Ellipsoid AustSA = Ellipsoid.createArf(6378160.0, 298.25);
    3131
    3232    /**
    3333     * Bessel 1841 ellipsoid
    3434     */
    35     public static final Ellipsoid Bessel1841 = Ellipsoid.create_a_rf(6377397.155, 299.1528128);
     35    public static final Ellipsoid Bessel1841 = Ellipsoid.createArf(6377397.155, 299.1528128);
    3636
    3737    /**
    3838     * Bessel 1841 (Namibia)
    3939     */
    40     public static final Ellipsoid BesselNamibia = Ellipsoid.create_a_rf(6377483.865, 299.1528128);
     40    public static final Ellipsoid BesselNamibia = Ellipsoid.createArf(6377483.865, 299.1528128);
    4141
    4242    /**
    4343     * Clarke 1866 ellipsoid
    4444     */
    45     public static final Ellipsoid Clarke1866 = Ellipsoid.create_a_b(6378206.4, 6356583.8);
     45    public static final Ellipsoid Clarke1866 = Ellipsoid.createAb(6378206.4, 6356583.8);
    4646
    4747    /**
    4848     * Clarke 1880 (modified)
    4949     */
    50     public static final Ellipsoid Clarke1880 = Ellipsoid.create_a_rf(6378249.145, 293.4663);
     50    public static final Ellipsoid Clarke1880 = Ellipsoid.createArf(6378249.145, 293.4663);
    5151
    5252    /**
    5353     * Clarke 1880 IGN (French national geographic institute)
    5454     */
    55     public static final Ellipsoid ClarkeIGN = Ellipsoid.create_a_b(6378249.2, 6356515.0);
     55    public static final Ellipsoid ClarkeIGN = Ellipsoid.createAb(6378249.2, 6356515.0);
    5656
    5757    /**
    5858     * Everest (Sabah &amp; Sarawak)
    5959     */
    60     public static final Ellipsoid EverestSabahSarawak = Ellipsoid.create_a_rf(6377298.556, 300.8017);
     60    public static final Ellipsoid EverestSabahSarawak = Ellipsoid.createArf(6377298.556, 300.8017);
    6161
    6262    /**
    6363     * GRS67 ellipsoid
    6464     */
    65     public static final Ellipsoid GRS67 = Ellipsoid.create_a_rf(6378160.0, 298.247167427);
     65    public static final Ellipsoid GRS67 = Ellipsoid.createArf(6378160.0, 298.247167427);
    6666
    6767    /**
    6868     * GRS80 ellipsoid
    6969     */
    70     public static final Ellipsoid GRS80 = Ellipsoid.create_a_rf(6378137.0, 298.257222101);
     70    public static final Ellipsoid GRS80 = Ellipsoid.createArf(6378137.0, 298.257222101);
    7171
    7272    /**
     
    7575     * Proj.4 code: intl
    7676     */
    77     public static final Ellipsoid Hayford = Ellipsoid.create_a_rf(6378388.0, 297.0);
     77    public static final Ellipsoid Hayford = Ellipsoid.createArf(6378388.0, 297.0);
    7878
    7979    /**
    8080     * Helmert 1906
    8181     */
    82     public static final Ellipsoid Helmert = Ellipsoid.create_a_rf(6378200.0, 298.3);
     82    public static final Ellipsoid Helmert = Ellipsoid.createArf(6378200.0, 298.3);
    8383
    8484    /**
    8585     * Krassowsky 1940 ellipsoid
    8686     */
    87     public static final Ellipsoid Krassowsky = Ellipsoid.create_a_rf(6378245.0, 298.3);
     87    public static final Ellipsoid Krassowsky = Ellipsoid.createArf(6378245.0, 298.3);
    8888
    8989    /**
    9090     * WGS66 ellipsoid
    9191     */
    92     public static final Ellipsoid WGS66 = Ellipsoid.create_a_rf(6378145.0, 298.25);
     92    public static final Ellipsoid WGS66 = Ellipsoid.createArf(6378145.0, 298.25);
    9393
    9494    /**
    9595     * WGS72 ellipsoid
    9696     */
    97     public static final Ellipsoid WGS72 = Ellipsoid.create_a_rf(6378135.0, 298.26);
     97    public static final Ellipsoid WGS72 = Ellipsoid.createArf(6378135.0, 298.26);
    9898
    9999    /**
    100100     * WGS84 ellipsoid
    101101     */
    102     public static final Ellipsoid WGS84 = Ellipsoid.create_a_rf(6378137.0, 298.257223563);
     102    public static final Ellipsoid WGS84 = Ellipsoid.createArf(6378137.0, 298.257223563);
    103103
    104104    /**
     
    162162     * @return the new ellipsoid
    163163     */
    164     public static Ellipsoid create_a_b(double a, double b) {
     164    public static Ellipsoid createAb(double a, double b) {
    165165        double e2 = (a*a - b*b) / (a*a);
    166166        double e = Math.sqrt(e2);
     
    176176     * @return the new ellipsoid
    177177     */
    178     public static Ellipsoid create_a_es(double a, double es) {
     178    public static Ellipsoid createAes(double a, double es) {
    179179        double b = a * Math.sqrt(1.0 - es);
    180180        double e = Math.sqrt(es);
     
    190190     * @return the new ellipsoid
    191191     */
    192     public static Ellipsoid create_a_f(double a, double f) {
     192    public static Ellipsoid createAf(double a, double f) {
    193193        double b = a * (1.0 - f);
    194194        double e2 = f * (2 - f);
     
    205205     * @return the new ellipsoid
    206206     */
    207     public static Ellipsoid create_a_rf(double a, double rf) {
    208         return create_a_f(a, 1.0 / rf);
     207    public static Ellipsoid createArf(double a, double rf) {
     208        return createAf(a, 1.0 / rf);
    209209    }
    210210
  • trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java

    r10378 r10748  
    137137     * @throws RuntimeException if the itteration does not converge.
    138138     */
    139     protected final double inv_mlfn(double arg) {
     139    protected final double invMlfn(double arg) {
    140140        double s, t, phi, k = 1.0/(1.0 - e2);
    141141        int i;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/CassiniSoldner.java

    r9555 r10748  
    7979    @Override
    8080    public double[] invproject(double x, double y) {
    81         double ph1 = inv_mlfn(ml0 + y);
     81        double ph1 = invMlfn(ml0 + y);
    8282        double tn = Math.tan(ph1);
    8383        double t = tn * tn;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/Sinusoidal.java

    r9955 r10748  
    4343            return new double[]{north, east / cos(north)};
    4444        } else {
    45             final double phi = inv_mlfn(north);
     45            final double phi = invMlfn(north);
    4646            double s = abs(phi);
    4747            final double lambda;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java

    r10250 r10748  
    156156    @Override
    157157    public double[] invproject(double x, double y) {
    158         double phi = inv_mlfn(ml0 + y);
     158        double phi = invMlfn(ml0 + y);
    159159
    160160        if (Math.abs(phi) >= Math.PI/2) {
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r10638 r10748  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55import static org.openstreetmap.josm.tools.I18n.trc;
    6 import static org.openstreetmap.josm.tools.I18n.trc_lazy;
     6import static org.openstreetmap.josm.tools.I18n.trcLazy;
    77import static org.openstreetmap.josm.tools.I18n.trn;
    88
     
    436436            return null;
    437437        } else if (nameTag.startsWith("?")) {
    438             return trc_lazy(nameTag, I18n.escape(relation.get(nameTag.substring(1))));
    439         } else {
    440             return trc_lazy(nameTag, I18n.escape(relation.get(nameTag)));
     438            return trcLazy(nameTag, I18n.escape(relation.get(nameTag.substring(1))));
     439        } else {
     440            return trcLazy(nameTag, I18n.escape(relation.get(nameTag)));
    441441        }
    442442    }
  • trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java

    r10680 r10748  
    7373
    7474    private void diff() {
    75         Diff.Change script = new Diff(reference, current).diff_2(false);
     75        Diff.Change script = new Diff(reference, current).diff2(false);
    7676        // attempt diff with reference reversed and test whether less deletions+inserts are required
    7777        Object[] referenceReversed = Utils.copyArray(reference);
    7878        Collections.reverse(Arrays.asList(referenceReversed));
    79         Diff.Change scriptReversed = new Diff(referenceReversed, current).diff_2(false);
     79        Diff.Change scriptReversed = new Diff(referenceReversed, current).diff2(false);
    8080        if (scriptReversed == null /* reference and current are identical */
    8181                || (script != null && scriptReversed.getTotalNumberOfChanges() < script.getTotalNumberOfChanges())) {
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r10742 r10748  
    13351335         */
    13361336        private List<Tile> allExistingTiles() {
    1337             return this.__allTiles(false);
     1337            return this.findAllTiles(false);
    13381338        }
    13391339
    13401340        private List<Tile> allTilesCreate() {
    1341             return this.__allTiles(true);
    1342         }
    1343 
    1344         private List<Tile> __allTiles(boolean create) {
     1341            return this.findAllTiles(true);
     1342        }
     1343
     1344        private List<Tile> findAllTiles(boolean create) {
    13451345            // Tileset is either empty or too large
    13461346            if (zoom == 0 || this.insane())
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r10611 r10748  
    164164     *  can be null if the defaults are turned off by user
    165165     */
    166     public static ImageIcon getNoIcon_Icon(StyleSource source) {
     166    public static ImageIcon getNoIconIcon(StyleSource source) {
    167167        return new ImageProvider("presets/misc/no_icon")
    168168                .setDirs(getIconSourceDirs(source))
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r10715 r10748  
    327327         */
    328328        public static float red(Color c) { // NO_UCD (unused code)
    329             return Utils.color_int2float(c.getRed());
     329            return Utils.colorInt2float(c.getRed());
    330330        }
    331331
     
    337337         */
    338338        public static float green(Color c) { // NO_UCD (unused code)
    339             return Utils.color_int2float(c.getGreen());
     339            return Utils.colorInt2float(c.getGreen());
    340340        }
    341341
     
    347347         */
    348348        public static float blue(Color c) { // NO_UCD (unused code)
    349             return Utils.color_int2float(c.getBlue());
     349            return Utils.colorInt2float(c.getBlue());
    350350        }
    351351
     
    357357         */
    358358        public static float alpha(Color c) { // NO_UCD (unused code)
    359             return Utils.color_int2float(c.getAlpha());
     359            return Utils.colorInt2float(c.getAlpha());
    360360        }
    361361
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java

    r9371 r10748  
    5555
    5656            fillImage.alpha = Math.min(255, Math.max(0, Integer.valueOf(Main.pref.getInteger("mappaint.fill-image-alpha", 255))));
    57             Integer pAlpha = Utils.color_float2int(c.get(FILL_OPACITY, null, float.class));
     57            Integer pAlpha = Utils.colorFloat2int(c.get(FILL_OPACITY, null, float.class));
    5858            if (pAlpha != null) {
    5959                fillImage.alpha = pAlpha;
     
    7171                    alpha = Math.min(255, Math.max(0, Integer.valueOf(Main.pref.getInteger("mappaint.fillalpha", 50))));
    7272                }
    73                 Integer pAlpha = Utils.color_float2int(c.get(FILL_OPACITY, null, float.class));
     73                Integer pAlpha = Utils.colorFloat2int(c.get(FILL_OPACITY, null, float.class));
    7474                if (pAlpha != null) {
    7575                    alpha = pAlpha;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java

    r10378 r10748  
    256256        }
    257257
    258         Integer pAlpha = Utils.color_float2int(c.get(type.prefix + OPACITY, null, Float.class));
     258        Integer pAlpha = Utils.colorFloat2int(c.get(type.prefix + OPACITY, null, Float.class));
    259259        if (pAlpha != null) {
    260260            alpha = pAlpha;
     
    281281        Color dashesBackground = c.get(type.prefix + DASHES_BACKGROUND_COLOR, null, Color.class);
    282282        if (dashesBackground != null) {
    283             pAlpha = Utils.color_float2int(c.get(type.prefix + DASHES_BACKGROUND_OPACITY, null, Float.class));
     283            pAlpha = Utils.colorFloat2int(c.get(type.prefix + DASHES_BACKGROUND_OPACITY, null, Float.class));
    284284            if (pAlpha != null) {
    285285                alpha = pAlpha;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java

    r10714 r10748  
    102102                        if (result == null) {
    103103                            source.logWarning(tr("Failed to locate image ''{0}''", name));
    104                             ImageIcon noIcon = MapPaintStyles.getNoIcon_Icon(source);
     104                            ImageIcon noIcon = MapPaintStyles.getNoIconIcon(source);
    105105                            img = noIcon == null ? null : (BufferedImage) noIcon.getImage();
    106106                        } else {
     
    134134
    135135    public float getAlphaFloat() {
    136         return Utils.color_int2float(alpha);
     136        return Utils.colorInt2float(alpha);
    137137    }
    138138
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java

    r10721 r10748  
    185185
    186186        mapImage.alpha = Math.min(255, Math.max(0, Integer.valueOf(Main.pref.getInteger("mappaint.icon-image-alpha", 255))));
    187         Integer pAlpha = Utils.color_float2int(c.get(keys[ICON_OPACITY_IDX], null, float.class));
     187        Integer pAlpha = Utils.colorFloat2int(c.get(keys[ICON_OPACITY_IDX], null, float.class));
    188188        if (pAlpha != null) {
    189189            mapImage.alpha = pAlpha;
     
    247247        Stroke stroke = null;
    248248        if (strokeColor != null && strokeWidth != null) {
    249             Integer strokeAlpha = Utils.color_float2int(c.get("symbol-stroke-opacity", null, Float.class));
     249            Integer strokeAlpha = Utils.colorFloat2int(c.get("symbol-stroke-opacity", null, Float.class));
    250250            if (strokeAlpha != null) {
    251251                strokeColor = new Color(strokeColor.getRed(), strokeColor.getGreen(),
     
    261261
    262262        if (fillColor != null) {
    263             Integer fillAlpha = Utils.color_float2int(c.get("symbol-fill-opacity", null, Float.class));
     263            Integer fillAlpha = Utils.colorFloat2int(c.get("symbol-fill-opacity", null, Float.class));
    264264            if (fillAlpha != null) {
    265265                fillColor = new Color(fillColor.getRed(), fillColor.getGreen(),
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextLabel.java

    r9371 r10748  
    147147        float alpha = c.get(TEXT_OPACITY, 1f, Float.class);
    148148        color = new Color(color.getRed(), color.getGreen(),
    149                 color.getBlue(), Utils.color_float2int(alpha));
     149                color.getBlue(), Utils.colorFloat2int(alpha));
    150150
    151151        Float haloRadius = c.get(TEXT_HALO_RADIUS, null, Float.class);
     
    158158            float haloAlpha = c.get(TEXT_HALO_OPACITY, 1f, Float.class);
    159159            haloColor = new Color(haloColor.getRed(), haloColor.getGreen(),
    160                     haloColor.getBlue(), Utils.color_float2int(haloAlpha));
     160                    haloColor.getBlue(), Utils.colorFloat2int(haloAlpha));
    161161        }
    162162
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r10378 r10748  
    843843         *
    844844         * @return the value of the parent property.
    845          * @see #parent_set
    846          */
    847         public Split parent_get() {
     845         * @see #setParent
     846         */
     847        public Split getParent() {
    848848            return parent;
    849849        }
     
    857857         *
    858858         * @param parent a Split or null
    859          * @see #parent_get
    860          */
    861         public void parent_set(Split parent) {
     859         * @see #getParent
     860         */
     861        public void setParent(Split parent) {
    862862            this.parent = parent;
    863863        }
     
    920920
    921921        private Node siblingAtOffset(int offset) {
    922             Split parent = parent_get();
     922            Split parent = getParent();
    923923            if (parent == null)
    924924                return null;
     
    10171017                throw new IllegalArgumentException("children must be a non-null List");
    10181018            for (Node child : this.children) {
    1019                 child.parent_set(null);
     1019                child.setParent(null);
    10201020            }
    10211021            this.children = new ArrayList<>(children);
    10221022            for (Node child : this.children) {
    1023                 child.parent_set(this);
     1023                child.setParent(this);
    10241024            }
    10251025        }
     
    11261126         */
    11271127        public final boolean isVertical() {
    1128             Split parent = parent_get();
     1128            Split parent = getParent();
    11291129            return parent != null && parent.isRowLayout();
    11301130        }
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r10680 r10748  
    291291    /** Discard lines from one file that have no matches in the other file.
    292292     */
    293     private void discard_confusing_lines() {
    294         filevec[0].discard_confusing_lines(filevec[1]);
    295         filevec[1].discard_confusing_lines(filevec[0]);
     293    private void discardConfusingLines() {
     294        filevec[0].discardConfusingLines(filevec[1]);
     295        filevec[1].discardConfusingLines(filevec[0]);
    296296    }
    297297
     
    299299     * Adjust inserts/deletes of blank lines to join changes as much as possible.
    300300     */
    301     private void shift_boundaries() {
    302         filevec[0].shift_boundaries(filevec[1]);
    303         filevec[1].shift_boundaries(filevec[0]);
     301    private void shiftBoundaries() {
     302        filevec[0].shiftBoundaries(filevec[1]);
     303        filevec[1].shiftBoundaries(filevec[0]);
    304304    }
    305305
     
    403403     * @return the differences of two files
    404404     */
    405     public final Change diff_2(final boolean reverse) {
     405    public final Change diff2(final boolean reverse) {
    406406        return diff(reverse ? reverseScript : forwardScript);
    407407    }
     
    420420        // Some lines are obviously insertions or deletions because they don't match anything.
    421421        // Detect them now, and avoid even thinking about them in the main comparison algorithm.
    422         discard_confusing_lines();
     422        discardConfusingLines();
    423423
    424424        // Now do the main comparison algorithm, considering just the undiscarded lines.
     
    438438
    439439        // Modify the results slightly to make them prettier in cases where that can validly be done.
    440         shift_boundaries();
     440        shiftBoundaries();
    441441
    442442        // Get the results of comparison in the form of a chain of `struct change's -- an edit script.
     
    547547         * @param f the other file
    548548         */
    549         void discard_confusing_lines(FileData f) {
     549        void discardConfusingLines(FileData f) {
    550550            clear();
    551551            // Set up table of which lines are going to be discarded.
     
    749749        }
    750750
    751         /** Adjust inserts/deletes of blank lines to join changes
    752        as much as possible.
    753 
    754        We do something when a run of changed lines include a blank
    755        line at one end and have an excluded blank line at the other.
    756        We are free to choose which blank line is included.
    757        `compareseq' always chooses the one at the beginning,
    758        but usually it is cleaner to consider the following blank line
    759        to be the "change".  The only exception is if the preceding blank line
    760        would join this change to other changes.
    761       @param f the file being compared against
     751        /**
     752         * Adjust inserts/deletes of blank lines to join changes as much as possible.
     753         *
     754         * We do something when a run of changed lines include a blank line at one end and have an excluded blank line at the other.
     755         * We are free to choose which blank line is included.
     756         * `compareseq' always chooses the one at the beginning, but usually it is cleaner to consider the following blank line
     757         * to be the "change". The only exception is if the preceding blank line would join this change to other changes.
     758         * @param f the file being compared against
    762759         */
    763         void shift_boundaries(FileData f) {
     760        void shiftBoundaries(FileData f) {
    764761            final boolean[] changed = changedFlag;
    765762            final boolean[] otherChanged = f.changedFlag;
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r10647 r10748  
    232232    }
    233233
    234     public static String trc_lazy(String context, String text) {
     234    public static String trcLazy(String context, String text) {
    235235        if (context == null)
    236236            return tr(text);
    237237        if (text == null)
    238238            return null;
    239         return MessageFormat.format(gettext_lazy(text, context), (Object) null);
     239        return MessageFormat.format(gettextLazy(text, context), (Object) null);
    240240    }
    241241
     
    337337
    338338    /* try without context, when context try fails */
    339     private static String gettext_lazy(String text, String ctx) {
     339    private static String gettextLazy(String text, String ctx) {
    340340        return gettext(text, ctx, true);
    341341    }
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r10742 r10748  
    309309     *         range 0...1. If val is outside that range, return 255
    310310     */
    311     public static Integer color_float2int(Float val) {
     311    public static Integer colorFloat2int(Float val) {
    312312        if (val == null)
    313313            return null;
     
    323323     * @return corresponding float value in range 0 &lt;= x &lt;= 1
    324324     */
    325     public static Float color_int2float(Integer val) {
     325    public static Float colorInt2float(Integer val) {
    326326        if (val == null)
    327327            return null;
Note: See TracChangeset for help on using the changeset viewer.