Changeset 20426 in osm


Ignore:
Timestamp:
2010-03-11T21:21:49+01:00 (15 years ago)
Author:
jttt
Message:

Implement Layer.isChanged()

Location:
applications/editors/josm/plugins/validator
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/.settings/org.eclipse.jdt.ui.prefs

    r19335 r20426  
    1 #Fri Jan 08 08:06:27 CET 2010
     1#Thu Mar 11 21:11:01 CET 2010
    22eclipse.preferences.version=1
    33editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
     
    1010sp_cleanup.add_missing_methods=false
    1111sp_cleanup.add_missing_nls_tags=false
    12 sp_cleanup.add_missing_override_annotations=false
     12sp_cleanup.add_missing_override_annotations=true
    1313sp_cleanup.add_serial_version_id=false
    1414sp_cleanup.always_use_blocks=true
     
    1717sp_cleanup.always_use_this_for_non_static_method_access=false
    1818sp_cleanup.convert_to_enhanced_for_loop=false
    19 sp_cleanup.correct_indentation=false
     19sp_cleanup.correct_indentation=true
    2020sp_cleanup.format_source_code=false
    2121sp_cleanup.format_source_code_changes_only=false
  • applications/editors/josm/plugins/validator/build.xml

    r20366 r20426  
    2727        -->
    2828        <property name="commit.message" value="validator: fixed josm bug 4594" />
    29         <property name="plugin.main.version" value="3095" />
     29        <property name="plugin.main.version" value="3118" />
    3030
    3131
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java

    r19072 r20426  
    3232 */
    3333public class ErrorLayer extends Layer implements LayerChangeListener {
     34
    3435    private OSMValidatorPlugin plugin;
     36
     37    private int updateCount = -1;
     38
    3539
    3640    public ErrorLayer(OSMValidatorPlugin plugin) {
     
    5660    @Override
    5761    public void paint(final Graphics2D g, final MapView mv, Bounds bounds) {
     62        updateCount = plugin.validationDialog.tree.getUpdateCount();
    5863        DefaultMutableTreeNode root = plugin.validationDialog.tree.getRoot();
    5964        if (root == null || root.getChildCount() == 0)
     
    104109
    105110    @Override
     111    public boolean isChanged() {
     112        return updateCount != plugin.validationDialog.tree.getUpdateCount();
     113    }
     114
     115    @Override
    106116    public void visitBoundingBox(BoundingXYVisitor v) {
    107117    }
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorTreePanel.java

    r13497 r20426  
    4444
    4545    /**
    46      * If {@link #filter} is not <code>null</code> only errors are displayed 
    47      * that refer to one of the primitives in the filter. 
     46     * If {@link #filter} is not <code>null</code> only errors are displayed
     47     * that refer to one of the primitives in the filter.
    4848     */
    4949    private Set<OsmPrimitive> filter = null;
     50
     51    private int updateCount;
    5052
    5153    /**
     
    6567    }
    6668
     69    @Override
    6770    public String getToolTipText(MouseEvent e) {
    6871        String res = null;
     
    105108     */
    106109    public void buildTree() {
     110        updateCount++;
    107111        DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode();
    108112
     
    325329        return (DefaultMutableTreeNode) treeModel.getRoot();
    326330    }
     331
     332    public int getUpdateCount() {
     333        return updateCount;
     334    }
    327335}
Note: See TracChangeset for help on using the changeset viewer.