Ignore:
Timestamp:
2009-01-01T18:28:53+01:00 (16 years ago)
Author:
stoecker
Message:

removed tab stop usage

Location:
applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/InstallPanel.java

    r3335 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    3030    /**
    3131     * @param pluginUpdateFrame
    32      * @param descriptions 
     32     * @param descriptions
    3333     */
    3434    public InstallPanel(PluginUpdateFrame pluginUpdateFrame, List<SiteDescription> descriptions) {
     
    3636        setBorder(new javax.swing.border.EmptyBorder(12,12,12,12));
    3737        final JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);
    38        
     38
    3939        /* Setup the table */
    4040        table = new JTable(pluginModel = new PluginTableModel(descriptions));
     
    4444        table.setPreferredScrollableViewportSize(new Dimension(500,200));
    4545        table.getSelectionModel().addListSelectionListener(this);
    46        
     46
    4747        TableColumn col1 = table.getColumnModel().getColumn(0);
    4848        TableColumn col2 = table.getColumnModel().getColumn(1);
     
    8282
    8383    /**
    84      * 
     84     *
    8585     */
    8686    public void install() {
     
    101101        infoBox.setText(text);
    102102        infoBox.setCaretPosition(0);
    103        
     103
    104104    }
    105105
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginDescription.java

    r3412 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    2323    private String description;
    2424    private List<PluginResource> resources = new ArrayList<PluginResource>();
    25    
     25
    2626    /**
    2727     * Add a resource to the plugin description.
     
    3131        resources.add(resource);
    3232    }
    33    
     33
    3434    /**
    3535     * @return the id
     
    8787        return this.resources;
    8888    }
    89    
     89
    9090    /**
    9191     * @return the installedVersion
     
    136136        }
    137137        if(errorReported) {
    138             JOptionPane.showMessageDialog(Main.parent, "One or more installs had an error: " + errorMessages.toString());           
     138            JOptionPane.showMessageDialog(Main.parent, "One or more installs had an error: " + errorMessages.toString());
    139139        }
    140140    }
    141    
     141
    142142    /* (non-Javadoc)
    143143     * @see java.lang.Object#toString()
    144144     */
    145145    public String toString() {
    146         return getClass().getSimpleName() + "[id=" + id 
    147                                           + ", name=" + name 
    148                                           + ", version=" + version 
    149                                           + ", desc=" + description 
    150                                           + ", resources=" + resources 
     146        return getClass().getSimpleName() + "[id=" + id
     147                                          + ", name=" + name
     148                                          + ", version=" + version
     149                                          + ", desc=" + description
     150                                          + ", resources=" + resources
    151151                                          + "]";
    152152    }
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginHelper.java

    r9948 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    1818 */
    1919public class PluginHelper {
    20    
     20
    2121    private static PluginHelper INSTANCE = new PluginHelper();
    2222    private Map<String, JMenu>menus;
    2323    private VariableHelper variableHelper;
    24    
     24
    2525    /**
    2626     * Private constructor
     
    3535//        registerMenu("layer", Main.main.menu.layerMenu);
    3636        registerMenu("help", Main.main.menu.helpMenu);
    37        
     37
    3838        variableHelper = new VariableHelper();
    3939        variableHelper.addAll(Main.pref.getAllPrefix(""));
    4040        variableHelper.add("josm.user.dir", Main.pref.getPreferencesDir());
    4141    }
    42    
     42
    4343    /**
    4444     * Returns the singleton instance of this helper.
     
    4848        return INSTANCE;
    4949    }
    50    
     50
    5151    /**
    5252     * Adds a menu to the main menu of JOSM and registers it under the given id.
     
    5959        registerMenu(menuId, menu);
    6060    }
    61    
     61
    6262    /**
    6363     * Register the menu under the given id so other plugins can retrieve
    64      * the menu with {@link #getMenu(String)}. 
     64     * the menu with {@link #getMenu(String)}.
    6565     * @param menuId
    6666     * @param menu
     
    6969        menus.put(menuId, menu);
    7070    }
    71    
     71
    7272    /**
    73      * Returns the main menu that was registered with the given id or <code>null</code> 
     73     * Returns the main menu that was registered with the given id or <code>null</code>
    7474     * if no menu was registered with that id. The default menus have the ids:
    7575     * <code>file</code>, <code>view</code>, <code>edit</code>, <code>tools</code>,
     
    8787        return this.variableHelper;
    8888    }
    89    
     89
    9090    /**
    9191     * Returns the plugin with the given id or <code>null</code>
     
    104104        return null;
    105105    }
    106    
    107106
    108    
     107
     108
    109109
    110110}
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginManagerAction.java

    r3335 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    1616 */
    1717public class PluginManagerAction extends AbstractAction {
    18    
     18
    1919    /**
    2020     * Constructor
     
    3636        // left a list of sites, right buttons "add remote site"
    3737        // list has checkboxes
    38         // adding: name and url where site.xml can be found. 
     38        // adding: name and url where site.xml can be found.
    3939        // site.xml containing a list of plugin.xml files
    4040        // plugin info holds name, version and dependencies (including versions)
     
    4343        // page to download, page to install, page to enable new plugins
    4444        // finish
    45        
     45
    4646        // plugin.xml holds info
    47         // name, version, dependencies, installpath, 
    48        
     47        // name, version, dependencies, installpath,
     48
    4949        // info about other resources: images, log4j.jar, ....
    5050        // need source url and target dir (relative to .josm? or main app dir (for josm update))
    5151        // need restart of josm afterwards
    52        
     52
    5353        // pluginmanager could also load the plugins itself, so dependencies could be respected
    5454    }
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginManagerPlugin.java

    r3335 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    1414 */
    1515public class PluginManagerPlugin extends Plugin {
    16    
     16
    1717    public PluginManagerPlugin() {
    1818//        JMenu menu = PluginHelper.getInstance().getMenu("tools");
     
    2020//        menu.add(new PluginManagerAction());
    2121    }
    22    
     22
    2323    @Override
    2424    public PreferenceSetting getPreferenceSetting() {
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginManagerPreference.java

    r12707 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    5656        if(sites.keySet().size() == 0) {
    5757            // add default entry (for demonstration purpose)
    58             sites.put(PREF_KEY_REMOTE_SITE_PREFIX + "0"+PREF_KEY_SITE_URL_SUFFIX, 
     58            sites.put(PREF_KEY_REMOTE_SITE_PREFIX + "0"+PREF_KEY_SITE_URL_SUFFIX,
    5959                "http://www.tegmento.org/~cdaller/josm/");
    6060        }
     
    7373            }
    7474            ++siteCount;
    75         }       
     75        }
    7676        return listModel;
    7777    }
     
    8282    // only in 1.6 allowed @Override
    8383    public void addGui(final PreferenceDialog gui) {
    84        
     84
    8585        siteListModel = createListModel();
    8686        siteList = new JList(siteListModel);
     
    114114                else {
    115115                    int[] selected = siteList.getSelectedIndices();
    116                     for (int i = selected.length - 1; i >=0; --i) {                       
     116                    for (int i = selected.length - 1; i >=0; --i) {
    117117                        siteListModel.removeElementAt(selected[i]);
    118118                    }
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginResource.java

    r3415 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    2222    private String errorMessage;
    2323    private Exception errorException;
    24    
     24
    2525    /**
    2626     * @return the resourceUrl
     
    4747        this.target = target;
    4848    }
    49    
     49
    5050    /**
    5151     * @return the errorMessage
     
    7373    }
    7474    /**
    75      * Installs the resource into to the target location. 
    76      * @throws IOException if the resource could not be read or written. 
     75     * Installs the resource into to the target location.
     76     * @throws IOException if the resource could not be read or written.
    7777     */
    7878    public void install() {
    7979       File targetFile = new File(target);
    80        if(targetFile.isDirectory() 
    81           || targetFile.getAbsolutePath().endsWith("/") 
     80       if(targetFile.isDirectory()
     81          || targetFile.getAbsolutePath().endsWith("/")
    8282          || targetFile.getAbsolutePath().endsWith("\\")) {
    8383           targetFile = new File(targetFile, resourceUrl.getFile());
     
    8888           return;
    8989       }
    90        
     90
    9191       // copy resource to local filesystem:
    9292       System.out.println("Install " + resourceUrl + " to " + targetFile);
     
    112112             } catch(IOException ignore) {}
    113113       }
    114        
     114
    115115    }
    116116    /* (non-Javadoc)
     
    120120        return getClass().getSimpleName() + "[url=" + resourceUrl + ", target=" + target + "]";
    121121    }
    122  
     122
    123123}
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginTableModel.java

    r3335 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    1717    private List<SiteDescription> sites;
    1818    private List<PluginDescription> plugins;
    19    
     19
    2020    public PluginTableModel(List<SiteDescription> descriptions) {
    2121        this.sites = descriptions;
    2222        update();
    2323    }
    24    
     24
    2525    private void update() {
    2626        plugins = new ArrayList<PluginDescription>();
     
    2929        }
    3030    }
    31    
    32    
     31
     32
    3333
    3434    /* (non-Javadoc)
     
    6565            return plugin.getInstalledVersion() + " -> " + plugin.getVersion();
    6666        } else {
    67             return plugin.getVersion();           
     67            return plugin.getVersion();
    6868        }
    6969        default: throw new IllegalArgumentException("Illegal Column Index " + columnIndex);
    7070        }
    7171    }
    72    
    73    
     72
     73
    7474
    7575    /* (non-Javadoc)
     
    121121            }
    122122        }
    123        
     123
    124124    }
    125125
     
    151151        this.plugins = plugins;
    152152    }
    153    
    154    
    155    
    156    
     153
     154
     155
     156
    157157
    158158}
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/PluginUpdateFrame.java

    r3335 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    3232    /**
    3333     * @param title
    34      * @param descriptions 
     34     * @param descriptions
    3535     * @throws HeadlessException
    3636     */
     
    3939        init(descriptions);
    4040    }
    41    
     41
    4242    public void init(List<SiteDescription> descriptions) {
    43        
     43
    4444        /* Setup panes */
    4545        JPanel content = new JPanel(new BorderLayout(12,12));
     
    5353
    5454        content.add(BorderLayout.CENTER,tabPane);
    55        
     55
    5656        JPanel buttonPannel = new JPanel();
    5757        // <FIXXME date="23.06.2007" author="cdaller">
     
    5959        JButton okButton = new JButton(tr("Install"));
    6060        JButton cancelButton = new JButton(tr("Cancel"));
    61         // </FIXXME> 
     61        // </FIXXME>
    6262        buttonPannel.add(okButton);
    6363        buttonPannel.add(cancelButton);
     
    6868                setVisible(false);
    6969                dispose();
    70             }   
     70            }
    7171        });
    72        
     72
    7373        cancelButton.addActionListener(new ActionListener() {
    7474            public void actionPerformed(ActionEvent e) {
    7575                setVisible(false);
    7676                dispose();
    77             }   
     77            }
    7878        });
    7979        content.add(BorderLayout.SOUTH,buttonPannel);
    80        
     80
    8181        pack();
    8282    }
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/SiteDescription.java

    r9948 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    3030    private URL url;
    3131    List<PluginDescription>plugins = new ArrayList<PluginDescription>();
    32    
     32
    3333    /**
    3434     * Default Constructor
     
    4747        this.url = new URL(url);
    4848    }
    49    
     49
    5050    /**
    5151     * @param name
     
    5656        this.name = name;
    5757    }
    58    
     58
    5959
    6060    /**
     
    7171    }
    7272
    73    
     73
    7474    /**
    7575     * Load the site description from the url.
    76      * @throws IOException 
     76     * @throws IOException
    7777     */
    7878    public void loadFromUrl() throws IOException {
     
    8484        // TODO check and remember modified since date to compare and not load sites that did not change
    8585        // connection.getIfModifiedSince()
    86         // </FIXXME> 
    87        
     86        // </FIXXME>
     87
    8888        Reader in = new InputStreamReader(connection.getInputStream());
    8989        SiteDescriptionParser parser = new SiteDescriptionParser(this);
     
    111111            if(info != null) {
    112112                if(info.version == null) {
    113                     plugin.setInstalledVersion("?");                   
     113                    plugin.setInstalledVersion("?");
    114114                } else {
    115115                    plugin.setInstalledVersion(info.version);
     
    118118        }
    119119    }
    120    
     120
    121121    /**
    122122     * @return the plugins
     
    133133    }
    134134
    135    
     135
    136136    /**
    137137     * @return the url
     
    158158            return name;
    159159        }
    160        
     160
    161161    }
    162    
     162
    163163    /**
    164164     * Used by ListCellRenderer, so not only a debug method!
     
    168168        return getLabelName();
    169169    }
    170    
     170
    171171    public static void main(String[] args) {
    172172        try {
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/SiteDescriptionParser.java

    r9948 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    2323    private StringBuilder characters;
    2424    private VariableHelper variableHelper;
    25    
     25
    2626    /**
    2727     * Constructor using a new SiteDescription object.
     
    3333     * Constructor using a description object to fill.
    3434     * @param siteDescription the object to fill.
    35      * @param in the reader to fill the description with. 
     35     * @param in the reader to fill the description with.
    3636     */
    3737    public SiteDescriptionParser(SiteDescription siteDescription) {
    3838        this.siteDescription = siteDescription;
    3939    }
    40    
     40
    4141    /**
    4242     * Returns the site description object.
     
    117117        }
    118118    }
    119    
    120     /** 
     119
     120    /**
    121121     * Read characters for description.
    122122     */
     
    127127        characters.append(data, start, length);
    128128    }
    129    
     129
    130130    /* (non-Javadoc)
    131131     * @see uk.co.wilson.xml.MinML2#endElement(java.lang.String, java.lang.String, java.lang.String)
     
    158158       }
    159159    }
    160    
     160
    161161    /**
    162162     * Clears the characters and returns the its previous content.
     
    168168        return chars;
    169169    }
    170    
    171    
     170
     171
    172172
    173173}
  • applications/editors/josm/plugins/pluginmanager/src/at/dallermassl/josm/plugin/pluginmanager/VariableHelper.java

    r3335 r12778  
    11/**
    2  * 
     2 *
    33 */
    44package at.dallermassl.josm.plugin.pluginmanager;
     
    1010
    1111/**
    12  * Helper class that replaces variables in strings with its values. The variables are in the 
     12 * Helper class that replaces variables in strings with its values. The variables are in the
    1313 * form ${name}. Replacement values may be set. As a fallback (if the variable is not found)
    1414 * the system properties are used. If neither is found, the variable is not replaced.
    15  * 
     15 *
    1616 * @author cdaller
    1717 *
     
    2020    private Pattern varPattern = Pattern.compile("\\$\\{(.+?)\\}");
    2121    private Map<String, String> variables;
    22    
     22
    2323    public VariableHelper() {
    2424        variables = new HashMap<String, String>();
    2525    }
    26    
     26
    2727    /**
    2828     * Adds all key/values as variables.
     
    3232        variables.putAll(values);
    3333    }
    34    
     34
    3535    /**
    3636     * Adds a single key/value pair.
     
    4141        variables.put(key, value);
    4242    }
    43    
     43
    4444    /**
    4545     * Replaces all variable placeholder in the given string with the replacement.
     
    7171        return source.toString();
    7272    }
    73    
     73
    7474    public static void main(String[] args) {
    7575        VariableHelper helper = new VariableHelper();
Note: See TracChangeset for help on using the changeset viewer.