Ignore:
Timestamp:
2010-09-24T17:34:15+02:00 (14 years ago)
Author:
upliner
Message:

'remember buildings tags'

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/buildings_tools/.settings/org.eclipse.jdt.core.prefs

    r21801 r23330  
    1 #Sat Jun 19 21:24:56 MSD 2010
     1#Fri Sep 24 19:30:08 MSD 2010
    22eclipse.preferences.version=1
    33org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
    44org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
     5org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
    56org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
    67org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
     
    1314org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
    1415org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
     16org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
    1517org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
    1618org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
     
    5759org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
    5860org.eclipse.jdt.core.formatter.comment.line_length=80
     61org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
     62org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
    5963org.eclipse.jdt.core.formatter.compact_else_if=true
    6064org.eclipse.jdt.core.formatter.continuation_indentation=2
    6165org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
     66org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
     67org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
    6268org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
     69org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
    6370org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
    6471org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
     
    7582org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
    7683org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
     84org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
    7785org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
    7886org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
     
    255263org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
    256264org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
    257 org.eclipse.jdt.core.formatter.tabulation.char=tab
     265org.eclipse.jdt.core.formatter.tabulation.char=space
    258266org.eclipse.jdt.core.formatter.tabulation.size=4
     267org.eclipse.jdt.core.formatter.use_on_off_tags=false
    259268org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
    260269org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
     270org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
  • applications/editors/josm/plugins/buildings_tools/build.xml

    r23124 r23330  
    3131
    3232        <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="update to josm latest" />
     33        <property name="commit.message" value="remember buildings tags" />
    3434        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3535        <property name="plugin.main.version" value="3518" />
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/AdvancedSettingsDialog.java

    r23190 r23330  
    6060    public void saveSettings() {
    6161        tagsModel.applyToTags(ToolSettings.getTags());
     62        ToolSettings.saveTags();
    6263        ToolSettings.setBBMode(isBBMode());
    6364        ToolSettings.setSoftCursor(isSoftCursor());
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java

    r23190 r23330  
    11package buildings_tools;
    22
     3import java.util.ArrayList;
     4import java.util.Arrays;
     5import java.util.Collection;
    36import java.util.HashMap;
     7import java.util.Iterator;
    48import java.util.Map;
     9import java.util.Map.Entry;
     10import java.util.NoSuchElementException;
    511
    612import org.openstreetmap.josm.Main;
     
    1218    private static final Map<String, String> tags = new HashMap<String, String>();
    1319    private static boolean autoSelect;
    14 
    15     static {
    16         tags.put("building", "yes");
    17     }
    1820
    1921    public static void setAddrDialog(boolean _useAddr) {
     
    3941
    4042    public static Map<String, String> getTags() {
     43        loadTags();
    4144        return tags;
     45    }
     46
     47    public static void saveTags() {
     48        ArrayList<String> values = new ArrayList<String>(tags.size() * 2);
     49        for (Entry<String, String> entry : tags.entrySet()) {
     50            values.add(entry.getKey());
     51            values.add(entry.getValue());
     52        }
     53        Main.pref.putCollection("buildings_tools.tags", values);
     54    }
     55
     56    private static void loadTags() {
     57        tags.clear();
     58        Collection<String> values = Main.pref.getCollection("buildings_tools.tags",
     59                Arrays.asList(new String[] { "building", "yes" }));
     60        try {
     61            for (Iterator<String> iterator = values.iterator(); iterator.hasNext();) {
     62                tags.put(iterator.next(), iterator.next());
     63            }
     64        } catch (NoSuchElementException e) {
     65        }
     66
    4267    }
    4368
Note: See TracChangeset for help on using the changeset viewer.