Changeset 24125 in osm


Ignore:
Timestamp:
2010-11-07T18:57:46+01:00 (14 years ago)
Author:
guggis
Message:

'Fixing #5614 - JOSM Plugin turn Restrictions'

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/build.xml

    r23571 r24125  
    3131
    3232        <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Migration to Java6 -  making use of JTable::setFillsViewportHeight()" />
     33        <property name="commit.message" value="Fixing #5614 - JOSM Plugin turn Restrictions" />
    3434        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3535        <property name="plugin.main.version" value="3518" />
     
    267267                <pathelement location="${eclipse.plugin.dir}/org.junit_4.8.1.v4_8_1_v20100427-1100\junit.jar" />
    268268        </path>
     269       
     270        <path id="fest.library.path">
     271                <fileset dir="test/lib">
     272                        <include name="fest-*.jar" />
     273                        <include name="jcp-*.jar" />
     274                </fileset>
     275    </path>
    269276
    270277        <path id="test.class.path">
     
    273280                <path refid="groovy.path" />
    274281                <path refid="junit.path" />
     282                <path refid="fest.library.path" />
    275283        </path>
    276284
     
    278286                <path refid="junit.path" />
    279287                <path refid="groovy.path" />
     288                <path refid="fest.library.path" />
    280289                <pathelement location="${josm}" />
    281290                <pathelement location="${test.build.dir}" />
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java

    r23593 r24125  
    11package org.openstreetmap.josm.plugins.turnrestrictions;
    2 
    3 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.determineWayJoinOrientation;
    4 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.isEndNode;
    5 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.isStartNode;
    62
    73import java.util.ArrayList;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java

    r23571 r24125  
    8787    private JosmSelectionPanel pnlJosmSelection;
    8888    private BasicEditorPanel pnlBasicEditor;
    89     private AdvancedEditorPanel pnlAdvancedEditor;
    90     private IssuesView pnlIssuesView;
    9189    private TurnRestrictionEditorModel editorModel;
    9290    private JTabbedPane tpEditors;
     
    102100        pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
    103101
    104         pnl.add(new SideButton(new OKAction()));
    105         pnl.add(new SideButton(new CancelAction()));
    106        
    107         pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Plugins/turnrestrictions#TurnRestrictionEditor"))));
     102        SideButton b;
     103        pnl.add(b = new SideButton(new OKAction()));
     104        b.setName("btnOK");
     105        pnl.add(b = new SideButton(new CancelAction()));
     106        b.setName("btnCancel");
     107        pnl.add(b = new SideButton(new ContextSensitiveHelpAction(ht("/Plugins/turnrestrictions#TurnRestrictionEditor"))));
     108        b.setName("btnHelp");
    108109        return pnl;
    109110    }
     
    134135        tpEditors.setToolTipTextAt(0, tr("Edit basic attributes of a turn restriction"));
    135136       
    136         tpEditors.add(pnlAdvancedEditor = new AdvancedEditorPanel(editorModel));
     137        tpEditors.add(new AdvancedEditorPanel(editorModel));
    137138        tpEditors.setTitleAt(1, tr("Advanced"));
    138139        tpEditors.setToolTipTextAt(1, tr("Edit the raw tags and members of this turn restriction"));
    139140       
    140         tpEditors.add(pnlIssuesView = new IssuesView(editorModel.getIssuesModel()));
     141        tpEditors.add(new IssuesView(editorModel.getIssuesModel()));
    141142        tpEditors.setTitleAt(2, tr("Errors/Warnings"));
    142143        tpEditors.setToolTipTextAt(2, tr("Show errors and warnings related to this turn restriction"));
     
    650651                return;
    651652            }
    652             if (getTurnRestriction() == null) {
     653            if (getTurnRestriction() == null || getTurnRestriction().getDataSet() == null) {
    653654                applyNewTurnRestriction();
    654655                return;
     
    693694                return;
    694695            }
    695             if (getTurnRestriction() == null) {
     696            if (getTurnRestriction() == null || getTurnRestriction().getDataSet() == null) {
    696697                // it's a new turn restriction. Try to save it and close the dialog
    697698                if (applyNewTurnRestriction()) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModel.java

    r23571 r24125  
    220220        CheckParameterUtil.ensureParameterNotNull(turnRestriction, "turnRestriction");     
    221221        TagCollection tags = tagEditorModel.getTagCollection();
    222         logger.info(tags.toString());
    223222        turnRestriction.removeAll();
    224223        tags.applyTo(turnRestriction);
Note: See TracChangeset for help on using the changeset viewer.