Changeset 13652 in josm


Ignore:
Timestamp:
2018-04-21T01:50:32+02:00 (12 months ago)
Author:
Don-vip
Message:

see #15744 - add/rework traces

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

Legend:

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

    r13434 r13652  
    165165        protected synchronized void traceRandomRepaint() {
    166166            if (!ignoreRepaint) {
    167                 System.err.println("Repaint:");
    168                 Thread.dumpStack();
     167                Logging.trace("Repaint: {0} from {1}", Thread.currentThread().getStackTrace()[3], Thread.currentThread());
    169168            }
    170169            ignoreRepaint = false;
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r13648 r13652  
    665665        if (ir == null) {
    666666            return null;
     667        } else if (Logging.isTraceEnabled()) {
     668            Logging.trace("get {0} from {1}", this, Thread.currentThread());
    667669        }
    668670        if (virtualMaxWidth != -1 || virtualMaxHeight != -1)
     
    20282030        }
    20292031    }
     2032
     2033    @Override
     2034    public String toString() {
     2035        return ("ImageProvider ["
     2036                + (dirs != null && !dirs.isEmpty() ? "dirs=" + dirs + ", " : "") + (id != null ? "id=" + id + ", " : "")
     2037                + (subdir != null && !subdir.isEmpty() ? "subdir=" + subdir + ", " : "") + (name != null ? "name=" + name + ", " : "")
     2038                + (archive != null ? "archive=" + archive + ", " : "")
     2039                + (inArchiveDir != null && !inArchiveDir.isEmpty() ? "inArchiveDir=" + inArchiveDir : "") + ']').replaceAll(", \\]", "]");
     2040    }
    20302041}
  • trunk/src/org/openstreetmap/josm/tools/ImageResource.java

    r12868 r13652  
    275275        else
    276276            return getImageIcon(new Dimension(-1, maxHeight), multiResolution);
    277    }
     277    }
     278
     279    @Override
     280    public String toString() {
     281        return "ImageResource ["
     282                + (svg != null ? "svg=" + svg : "")
     283                + (baseImage != null ? "baseImage=" + baseImage : "") + ']';
     284    }
    278285}
Note: See TracChangeset for help on using the changeset viewer.