Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (9 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r8509 r8510  
    114114
    115115    public String getLocaleName() {
    116         if(locale_name == null) {
    117             if(name_context != null) {
     116        if (locale_name == null) {
     117            if (name_context != null) {
    118118                locale_name = trc(name_context, TaggingPresetItems.fixPresetString(name));
    119119            } else {
     
    208208    private static class PresetPanel extends JPanel {
    209209        private boolean hasElements = false;
     210
    210211        PresetPanel() {
    211212            super(new GridBagLayout());
     
    219220        List<Link> l = new LinkedList<>();
    220221        List<PresetLink> presetLink = new LinkedList<>();
    221         if (types != null){
     222        if (types != null) {
    222223            JPanel pp = new JPanel();
    223224            for (TaggingPresetType t : types) {
     
    267268        JToggleButton tb = new JToggleButton(new ToolbarButtonAction());
    268269        tb.setFocusable(false);
    269         p.add(tb, GBC.std(0,0).anchor(GBC.LINE_END));
     270        p.add(tb, GBC.std(0, 0).anchor(GBC.LINE_END));
    270271        return p;
    271272    }
     
    318319            final Relation r = new Relation();
    319320            final Collection<RelationMember> members = new HashSet<>();
    320             for(Tag t : getChangedTags()) {
     321            for (Tag t : getChangedTags()) {
    321322                r.put(t.getKey(), t.getValue());
    322323            }
     
    340341        public PresetDialog(Component content, String title, ImageIcon icon, boolean disableApply, boolean showNewRelation) {
    341342            super(Main.parent, title,
    342                     showNewRelation?
     343                    showNewRelation ?
    343344                            new String[] {tr("Apply Preset"), tr("New relation"), tr("Cancel")} :
    344345                                new String[] {tr("Apply Preset"), tr("Cancel")},
     
    346347            if (icon != null)
    347348                setIconImage(icon.getImage());
    348             contentInsets = new Insets(10,5,0,5);
     349            contentInsets = new Insets(10, 5, 0, 5);
    349350            if (showNewRelation) {
    350351                setButtonIcons(new String[] {"ok", "dialogs/addrelation", "cancel" });
     
    375376        if (p.getComponentCount() != 0 && (sel.isEmpty() || p.hasElements)) {
    376377            String title = trn("Change {0} object", "Change {0} objects", sel.size(), sel.size());
    377             if(sel.isEmpty()) {
    378                 if(originalSelectionEmpty) {
     378            if (sel.isEmpty()) {
     379                if (originalSelectionEmpty) {
    379380                    title = tr("Nothing selected!");
    380381                } else {
     
    460461    @Override
    461462    public String toString() {
    462         return (types == null?"":types) + " " + name;
     463        return (types == null ? "" : types) + " " + name;
    463464    }
    464465
Note: See TracChangeset for help on using the changeset viewer.