Ignore:
Timestamp:
2014-10-12T12:37:13+02:00 (10 years ago)
Author:
donvip
Message:

[josm_merge_overlap] fix #josm10626 - fix ClassCastException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/merge-overlap/src/mergeoverlap/hack/MyCombinePrimitiveResolverDialog.java

    r30712 r30714  
    4343import org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictDecision;
    4444import org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictDecisionType;
     45import org.openstreetmap.josm.gui.conflict.tags.TagConflictResolver;
     46import org.openstreetmap.josm.gui.conflict.tags.TagConflictResolverModel;
    4547import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
    4648import org.openstreetmap.josm.gui.help.HelpUtil;
     
    9597
    9698    private AutoAdjustingSplitPane spTagConflictTypes;
    97     private MyTagConflictResolver pnlTagConflictResolver;
     99    private TagConflictResolver pnlTagConflictResolver;
    98100    private MyRelationMemberConflictResolver pnlRelationMemberConflictResolver;
    99101    private boolean cancelled;
     
    162164
    163165    protected JPanel buildTagConflictResolverPanel() {
    164         pnlTagConflictResolver = new MyTagConflictResolver();
     166        pnlTagConflictResolver = new TagConflictResolver();
    165167        return pnlTagConflictResolver;
    166168    }
     
    199201    }
    200202
    201     public MyTagConflictResolverModel getTagConflictResolverModel() {
     203    public TagConflictResolverModel getTagConflictResolverModel() {
    202204        return pnlTagConflictResolver.getModel();
    203205    }
     
    208210
    209211    protected List<Command> buildTagChangeCommand(OsmPrimitive primitive, TagCollection tc) {
    210         LinkedList<Command> cmds = new LinkedList<Command>();
     212        LinkedList<Command> cmds = new LinkedList<>();
    211213        for (String key : tc.getKeys()) {
    212214            if (tc.hasUniqueEmptyValue(key)) {
     
    225227
    226228    public List<Command> buildWayResolutionCommands() {
    227         List<Command> cmds = new LinkedList<Command>();
     229        List<Command> cmds = new LinkedList<>();
    228230
    229231        TagCollection allResolutions = getTagConflictResolverModel().getAllResolutions();
     
    248250   
    249251    protected void prepareDefaultTagDecisions() {
    250         MyTagConflictResolverModel model = getTagConflictResolverModel();
     252        TagConflictResolverModel model = getTagConflictResolverModel();
    251253        for (int i = 0; i < model.getRowCount(); i++) {
    252254            MultiValueResolutionDecision decision = model.getDecision(i);
     
    264266    protected void prepareDefaultRelationDecisions() {
    265267        MyRelationMemberConflictResolverModel model = getRelationMemberConflictResolverModel();
    266         Set<Relation> relations = new HashSet<Relation>();
     268        Set<Relation> relations = new HashSet<>();
    267269        for (int i = 0; i < model.getNumDecisions(); i++) {
    268270            RelationMemberConflictDecision decision = model.getDecision(i);
     
    291293    protected void prepareGUIBeforeConflictResolutionStarts() {
    292294        MyRelationMemberConflictResolverModel relModel = getRelationMemberConflictResolverModel();
    293         MyTagConflictResolverModel tagModel = getTagConflictResolverModel();
     295        TagConflictResolverModel tagModel = getTagConflictResolverModel();
    294296        getContentPane().removeAll();
    295297
     
    382384        @Override
    383385        public void propertyChange(PropertyChangeEvent evt) {
    384             if (evt.getPropertyName().equals(MyTagConflictResolverModel.NUM_CONFLICTS_PROP)) {
     386            if (evt.getPropertyName().equals(TagConflictResolverModel.NUM_CONFLICTS_PROP)) {
    385387                updateEnabledState();
    386388            }
Note: See TracChangeset for help on using the changeset viewer.