Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 25311)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 25312)
@@ -39,4 +39,7 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
+import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
+import org.openstreetmap.josm.gui.JosmUserIdentityManager;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.MapView;
@@ -68,33 +71,40 @@
  */
 public class MapdustPlugin extends Plugin implements LayerChangeListener,
-        ZoomChangeListener, MouseListener, MapdustRefreshObserver,
-        MapdustBugObserver, MapdustInitialUpdateObserver {
-
+        ZoomChangeListener, PreferenceChangedListener, MouseListener,
+        MapdustRefreshObserver, MapdustBugObserver,
+        MapdustInitialUpdateObserver {
+    
     /** The graphical user interface of the plug-in */
     private MapdustGUI mapdustGUI;
-
+    
     /** The layer of the MapDust plug-in */
     private MapdustLayer mapdustLayer;
-
+    
     /** The list of <code>MapdustBug</code> objects */
     private List<MapdustBug> mapdustBugList;
-
+    
     /** The <code>CreateIssueDialog</code> object */
     private CreateIssueDialog dialog;
-
+    
     /** Specifies if there was or not an error downloading the data */
     private boolean wasError = false;
-
+    
+    /** The JOSM user identity manager, it is used for obtaining the username */
+    private final JosmUserIdentityManager userIdentityManager;
+    
     /**
      * Builds a new <code>MapDustPlugin</code> object based on the given
      * arguments.
-     *
+     * 
      * @param info The <code>MapDustPlugin</code> object
      */
     public MapdustPlugin(PluginInformation info) {
         super(info);
+        /* create instance for JOSM user identity manager */
+        userIdentityManager = JosmUserIdentityManager.getInstance();
+        /* initialize the plugin */
         initializePlugin();
     }
-
+    
     /**
      * Initialize the <code>MapdustPlugin</code> object. Creates the
@@ -105,7 +115,7 @@
     private void initializePlugin() {
         /* create MapDust GUI */
-        Shortcut shortcut = Shortcut.registerShortcut("mapdust",
-                tr("Toggle: {0}", tr("Open MapDust")), KeyEvent.VK_0,
-                Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT);
+        Shortcut shortcut = Shortcut.registerShortcut("mapdust", tr("Toggle: {0}", 
+                tr("Open MapDust")), KeyEvent.VK_0, Shortcut.GROUP_MENU, 
+                Shortcut.SHIFT_DEFAULT);
         String name = "MapDust bug reports";
         String tooltip = "Activates the MapDust bug reporter plugin";
@@ -113,14 +123,18 @@
                 shortcut, 150, this);
         /* add default values for static variables */
-        Main.pref.put("mapdust.pluginState", MapdustPluginState.ONLINE.getValue());
-        Main.pref.put("mapdust.nickname", null);
+        Main.pref.put("mapdust.pluginState",
+                MapdustPluginState.ONLINE.getValue());
+        Main.pref.put("mapdust.nickname", "");
         Main.pref.put("mapdust.showError", true);
-    }
-
+        Main.pref.put("mapdust.version", getPluginInformation().version);
+        Main.pref.put("mapdust.localVersion",
+                getPluginInformation().localversion);
+    }
+    
     /**
      * Initializes the new <code>MapFrame</code>. Adds the
      * <code>MapdustGUI</code> to the new <code>MapFrame</code> and sets the
      * observers/listeners.
-     *
+     * 
      * @param oldMapFrame The old <code>MapFrame</code> object
      * @param newMapFrame The new <code>MapFrame</code> object
@@ -147,8 +161,12 @@
                 /* add MouseListener */
                 Main.map.mapView.addMouseListener(this);
-            }
-        }
-    }
-
+                Main.pref.addPreferenceChangeListener(this);
+                /* put username to preferences */
+                Main.pref.put("mapdust.josmUserName", 
+                        userIdentityManager.getUserName());
+            }
+        }
+    }
+    
     /**
      * Refreshes the MapDust data. Downloads the data from the given area and
@@ -162,5 +180,5 @@
         }
     }
-
+    
     /**
      * Downloads the MapDust bugs from the current map view, and updates the
@@ -174,9 +192,9 @@
         }
     }
-
+    
     /**
      * Updates the given <code>MapdustBug</code> object from the map and from
      * the MapDust bugs list.
-     *
+     * 
      * @param mapdustBug The <code>MapdustBug</code> object
      */
@@ -207,5 +225,5 @@
         }
     }
-
+    
     /**
      * If the zoom was changed, download the bugs from the current map view.
@@ -218,5 +236,5 @@
         }
     }
-
+    
     /**
      * No need to implement this.
@@ -224,5 +242,5 @@
     @Override
     public void activeLayerChange(Layer arg0, Layer arg1) {}
-
+    
     /**
      * Adds the <code>MapdustLayer</code> to the JOSM editor. If the list of
@@ -242,5 +260,5 @@
         }
     }
-
+    
     /**
      * Removes the <code>MapdustLayer</code> from the JOSM editor. Also closes
@@ -265,5 +283,5 @@
         }
     }
-
+    
     /**
      * No need to implement this.
@@ -271,5 +289,5 @@
     @Override
     public void mouseEntered(MouseEvent event) {}
-
+    
     /**
      * No need to implement this.
@@ -277,5 +295,5 @@
     @Override
     public void mouseExited(MouseEvent arg0) {}
-
+    
     /**
      * No need to implement this.
@@ -283,5 +301,5 @@
     @Override
     public void mousePressed(MouseEvent event) {}
-
+    
     /**
      * No need to implement this.
@@ -289,5 +307,5 @@
     @Override
     public void mouseReleased(MouseEvent arg0) {}
-
+    
     /**
      * At mouse click the following two actions can be done: adding a new bug,
@@ -336,6 +354,41 @@
         }
     }
-
-
+    
+    /**
+     * Listens for the events of type <code>PreferenceChangeEvent</code> . If
+     * the event key is 'osm-server.username' then if the username was changed
+     * in Preferences and it was used as 'nickname'( the user did not changed
+     * this completed nickname to someting else ) for submitting changes to
+     * MapDust , re-set the 'mapdust.josmUserName' and 'mapdust.nickname'
+     * properties.
+     * 
+     * @param event The <code>PreferenceChangeEvent</code> obejct
+     */
+    @Override
+    public void preferenceChanged(PreferenceChangeEvent event) {
+        if (this.mapdustGUI.isShowing() && !wasError && mapdustLayer != null
+                && mapdustLayer.isVisible()) {
+            if (event.getKey().equals("osm-server.username")) {
+                String newUserName = userIdentityManager.getUserName();
+                String oldUserName = Main.pref.get("mapdust.josmUserName");
+                String nickname = Main.pref.get("mapdust.nickname");
+                if (nickname.isEmpty()) {
+                    /* nickname was not completed */
+                    Main.pref.put("mapdust.josmUserName", newUserName);
+                    Main.pref.put("mapdust.nickname", newUserName);
+                } else {
+                    if (nickname.equals(oldUserName)) {
+                        /* username was used for nickname, and was not changed */
+                        Main.pref.put("mapdust.josmUserName", newUserName);
+                        Main.pref.put("mapdust.nickname", newUserName);
+                    } else {
+                        /* username was used for nickname, and was changed */
+                        Main.pref.put("mapdust.josmUserName", newUserName);
+                    }
+                }
+            }
+        }
+    }
+    
     /**
      * Updates the <code>MapdustPlugin</code> data. Downloads the
@@ -351,17 +404,17 @@
         });
     }
-
+    
     /**
      * Returns the bounds of the current <code>MapView</code>.
-     *
+     * 
      * @return bounds
      */
     private Bounds getBounds() {
         MapView mapView = Main.map.mapView;
-        Bounds bounds = new Bounds(mapView.getLatLon(0, mapView.getHeight()), 
+        Bounds bounds = new Bounds(mapView.getLatLon(0, mapView.getHeight()),
                 mapView.getLatLon(mapView.getWidth(), 0));
         return bounds;
     }
-
+    
     /**
      * Updates the MapDust plugin data. Downloads the list of
@@ -375,6 +428,6 @@
                 Bounds bounds = getBounds();
                 MapdustServiceHandler handler = new MapdustServiceHandler();
-                mapdustBugList = handler.getBugs(bounds.getMin().lon(),
-                        bounds.getMin().lat(), bounds.getMax().lon(),
+                mapdustBugList = handler.getBugs(bounds.getMin().lon(), 
+                        bounds.getMin().lat(), bounds.getMax().lon(), 
                         bounds.getMax().lat());
                 wasError = false;
@@ -391,5 +444,5 @@
         }
     }
-
+    
     /**
      * Updates the current view ( map and MapDust bug list), with the given list
@@ -421,9 +474,9 @@
         Main.map.repaint();
     }
-
+    
     /**
      * Updates the MapDust bugs list with the given <code>MapdustBug</code>
      * object.
-     *
+     * 
      * @param mapdustBug The <code>MapdustBug</code> object
      */
@@ -444,9 +497,9 @@
         }
     }
-
+    
     /**
      * Returns the nearest <code>MapdustBug</code> object to the given point on
      * the map.
-     *
+     * 
      * @param p A <code>Point</code> object
      * @return A <code>MapdustBug</code> object
@@ -468,9 +521,9 @@
         return nearestBug;
     }
-
+    
     /**
      * Verifies if the <code>OsmDataLayer</code> layer has been added to the
      * list of layers.
-     *
+     * 
      * @return true if the <code>OsmDataLayer</code> layer has been added false
      * otherwise
@@ -486,8 +539,8 @@
         return contains;
     }
-
+    
     /**
      * Handles the <code>MapdustServiceHandlerException</code> error.
-     *
+     * 
      */
     private void handleError() {
@@ -502,8 +555,8 @@
         }
     }
-
+    
     /**
      * Returns the <code>MapdustGUI</code> object
-     *
+     * 
      * @return the mapdustGUI
      */
@@ -511,8 +564,8 @@
         return mapdustGUI;
     }
-
+    
     /**
      * Sets the <code>MapdustGUI</code> object.
-     *
+     * 
      * @param mapdustGUI the mapdustGUI to set
      */
@@ -520,8 +573,8 @@
         this.mapdustGUI = mapdustGUI;
     }
-
+    
     /**
      * Returns the <code>MapdustLayer</code> object.
-     *
+     * 
      * @return the mapdustLayer
      */
@@ -529,8 +582,8 @@
         return mapdustLayer;
     }
-
+    
     /**
      * Sets the <code>MapdustLayer</code> object.
-     *
+     * 
      * @param mapdustLayer the mapdustLayer to set
      */
@@ -538,8 +591,8 @@
         this.mapdustLayer = mapdustLayer;
     }
-
+    
     /**
      * Returns the list of <code>MapdustBug</code> objects
-     *
+     * 
      * @return the mapdustBugList
      */
@@ -547,8 +600,8 @@
         return mapdustBugList;
     }
-
+    
     /**
      * Sets the list of <code>MapdustBug</code> objects
-     *
+     * 
      * @param mapdustBugList the mapdustBugList to set
      */
@@ -556,4 +609,4 @@
         this.mapdustBugList = mapdustBugList;
     }
-
+    
 }
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeIssueStatusDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeIssueStatusDialog.java	(revision 25311)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeIssueStatusDialog.java	(revision 25312)
@@ -58,46 +58,46 @@
  * related actions: close bug report, invalidate bug report and re-open bug
  * report.
- *
+ * 
  * @author Bea
  */
 public class ChangeIssueStatusDialog extends AbstractDialog {
-
+    
     /** The serial version UID */
     private static final long serialVersionUID = 1L;
-
+    
     /** The message test */
     private final String messageText;
-
+    
     /** Custom text */
     private JScrollPane cmpMessage;
-
+    
     /** Nickname label */
     private JLabel lblNickname;
-
+    
     /** Nickname text field */
     private JTextField txtNickname;
-
+    
     /** Comment label */
     private JLabel lblComment;
-
+    
     /** Description text area */
     private JScrollPane cmpDescription;
-
+    
     /** The description text */
     private JTextArea txtDescription;
-
+    
     /** Cancel button */
     private JButton btnCancel;
-
+    
     /** OK button */
     private JButton btnOk;
-
+    
     /** The type */
     private final String type;
-
+    
     /**
      * Builds a new <code>ChangeStatusDialog</code> object with the given
      * parameters.
-     *
+     * 
      * @param title The title of the dialog
      * @param iconName The name of the icon
@@ -129,8 +129,8 @@
         addWindowListener(new WindowClose(this, btnPanel, getFiredButton()));
     }
-
+    
     /**
      * Adds the components to the panel.
-     *
+     * 
      * @param mapdustPlugin The <code>MapdustPlugin</code> object
      */
@@ -142,5 +142,5 @@
         /* create the message cmp */
         if (cmpMessage == null) {
-            JTextPane txtPane = ComponentUtil.createJTextPane(messageText,
+            JTextPane txtPane = ComponentUtil.createJTextPane(messageText, 
                     backgroundColor);
             Rectangle bounds = new Rectangle(10, 10, 330, 50);
@@ -153,8 +153,13 @@
             lblNickname = ComponentUtil.createJLabel("Nickname", font, bounds);
         }
-        String nickname = Main.pref.get("mapdust.nickname");
         if (txtNickname == null) {
             Rectangle bounds = new Rectangle(100, 70, 230, 25);
             txtNickname = ComponentUtil.createJTextField(bounds);
+            /* get the nickname */
+            String nickname = Main.pref.get("mapdust.nickname");
+            if (nickname.isEmpty()) {
+                /* if nickname is empty, then get JOSM username */
+                nickname = Main.pref.get("mapdust.josmUserName");
+            }
             if (nickname != null && !nickname.isEmpty()) {
                 txtNickname.setText(nickname);
@@ -171,9 +176,10 @@
             txtDescription.setLineWrap(true);
             txtDescription.setFont(new Font("Times New Roman", Font.PLAIN, 12));
-            cmpDescription = ComponentUtil.createJScrollPane(txtDescription,
+            cmpDescription = ComponentUtil.createJScrollPane(txtDescription, 
                     bounds, backgroundColor, false, true);
         }
         /* creates the cancel action */
-        ExecuteCancel cancelAction = new ExecuteCancel(this, mapdustPlugin.getMapdustGUI());
+        ExecuteCancel cancelAction = new ExecuteCancel(this, 
+                mapdustPlugin.getMapdustGUI());
         AbstractAction okAction;
         if (type.equals("close")) {
@@ -181,6 +187,5 @@
             okAction = new ExecuteCloseBug(this, mapdustPlugin.getMapdustGUI());
             ((ExecuteCloseBug) okAction).addObserver(mapdustPlugin);
-            ((ExecuteCloseBug) okAction).addObserver(mapdustPlugin
-                    .getMapdustGUI());
+            ((ExecuteCloseBug) okAction).addObserver(mapdustPlugin.getMapdustGUI());
         } else {
             if (type.equals("invalidate")) {
@@ -194,6 +199,5 @@
                 okAction = new ExecuteReOpenBug(this, mapdustPlugin.getMapdustGUI());
                 ((ExecuteReOpenBug) okAction).addObserver(mapdustPlugin);
-                ((ExecuteReOpenBug) okAction).addObserver(mapdustPlugin
-                        .getMapdustGUI());
+                ((ExecuteReOpenBug) okAction).addObserver(mapdustPlugin.getMapdustGUI());
             }
         }
@@ -218,8 +222,8 @@
         setSize(340, 210);
     }
-
+    
     /**
      * Returns the <code>JScrollPane</code> of the info message.
-     *
+     * 
      * @return the cmpMessage
      */
@@ -227,8 +231,8 @@
         return this.cmpMessage;
     }
-
+    
     /**
      * Returns the <code>JLabel</code> of the nickname
-     *
+     * 
      * @return the lblNickname
      */
@@ -236,8 +240,8 @@
         return this.lblNickname;
     }
-
+    
     /**
      * Returns the <code>JTextField</code> of the nickname
-     *
+     * 
      * @return the txtNickname
      */
@@ -245,8 +249,8 @@
         return this.txtNickname;
     }
-
+    
     /**
      * Returns the <code>JLabel</code> of the comment
-     *
+     * 
      * @return the lblComment
      */
@@ -254,8 +258,8 @@
         return this.lblComment;
     }
-
+    
     /**
      * Returns the <code>JScrollPane</code> of the description
-     *
+     * 
      * @return the cmpDescription
      */
@@ -263,8 +267,8 @@
         return this.cmpDescription;
     }
-
+    
     /**
      * Returns the <code>JTextArea</code> of the description
-     *
+     * 
      * @return the txtDescription
      */
@@ -272,8 +276,8 @@
         return this.txtDescription;
     }
-
+    
     /**
      * Returns the cancel button
-     *
+     * 
      * @return the btnCancel
      */
@@ -281,8 +285,8 @@
         return this.btnCancel;
     }
-
+    
     /**
      * Returns the ok buttons
-     *
+     * 
      * @return the btnOk
      */
@@ -290,8 +294,8 @@
         return this.btnOk;
     }
-
+    
     /**
      * Retruns the message text
-     *
+     * 
      * @return the messageText
      */
@@ -299,8 +303,8 @@
         return this.messageText;
     }
-
+    
     /**
      * Returns the type
-     *
+     * 
      * @return the type
      */
@@ -308,4 +312,4 @@
         return this.type;
     }
-
+    
 }
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CommentIssueDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CommentIssueDialog.java	(revision 25311)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CommentIssueDialog.java	(revision 25312)
@@ -143,8 +143,13 @@
             lblNickname = ComponentUtil.createJLabel("Nickname", font, bounds);
         }
-        String nickname = Main.pref.get("mapdust.nickname");
         if (txtNickname == null) {
             Rectangle bounds = new Rectangle(100, 70, 230, 25);
             txtNickname = ComponentUtil.createJTextField(bounds);
+            /* get the nickname */
+            String nickname = Main.pref.get("mapdust.nickname");
+            if (nickname.isEmpty()) {
+                /* if nickname is empty, get JOSM username */
+                nickname = Main.pref.get("mapdust.josmUserName");
+            }
             if (nickname != null && !nickname.isEmpty()) {
                 txtNickname.setText(nickname);
@@ -169,12 +174,11 @@
             ExecuteCancel cancelAction = new ExecuteCancel(this,
                     mapdustPlugin.getMapdustGUI());
-            btnCancel = ComponentUtil.createJButton("Cancel", bounds,
-                    cancelAction);
+            btnCancel = ComponentUtil.createJButton("Cancel", bounds, cancelAction);
         }
         /* creates the ok button */
         if (btnOk == null) {
             Rectangle bounds = new Rectangle(170, 170, 60, 25);
-            ExecuteCommentBug okAction =
-                    new ExecuteCommentBug(this, mapdustPlugin.getMapdustGUI());
+            ExecuteCommentBug okAction = new ExecuteCommentBug(this,
+                    mapdustPlugin.getMapdustGUI());
             okAction.addObserver(mapdustPlugin);
             okAction.addObserver(mapdustPlugin.getMapdustGUI());
@@ -272,4 +276,4 @@
         return messageText;
     }
-    
+
 }
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CreateIssueDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CreateIssueDialog.java	(revision 25311)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CreateIssueDialog.java	(revision 25312)
@@ -112,7 +112,7 @@
      */
     public CreateIssueDialog(Point point, MapdustPlugin mapdustPlugin) {
-        this.createIssueText= "In order to create a new bug report you";
+        this.createIssueText = "In order to create a new bug report you";
         this.createIssueText += " need to provide your nickname and a brief";
-        this.createIssueText+= " description for the bug.";
+        this.createIssueText += " description for the bug.";
         this.point = point;
         /* set JDialog settings */
@@ -121,5 +121,6 @@
         addComponents(mapdustPlugin);
         /* add window listenet */
-        MapdustButtonPanel btnPanel = mapdustPlugin.getMapdustGUI().getPanel().getBtnPanel();
+        MapdustButtonPanel btnPanel =
+                mapdustPlugin.getMapdustGUI().getPanel().getBtnPanel();
         addWindowListener(new WindowClose(this, btnPanel, null));
     }
@@ -128,5 +129,5 @@
      * Initializes the dialog default fields.
      */
-    private void initializeDialog(){
+    private void initializeDialog() {
         /* set JDialog settings */
         setTitle("Create bug report");
@@ -145,9 +146,9 @@
      * Displays the dialog.
      */
-    public void showDialog(){
-       setLocationRelativeTo(null);
-       getContentPane().setPreferredSize(getSize());
-       pack();
-       setVisible(true);
+    public void showDialog() {
+        setLocationRelativeTo(null);
+        getContentPane().setPreferredSize(getSize());
+        pack();
+        setVisible(true);
     }
 
@@ -161,5 +162,5 @@
                     backgroundColor);
             cmpMessage = ComponentUtil.createJScrollPane(txtPane,
-                    new Rectangle(10, 10, 330, 50), backgroundColor, true, true);
+                    new Rectangle(10,10, 330, 50), backgroundColor, true, true);
         }
         /* the type label and combo box */
@@ -170,6 +171,6 @@
         if (cbbType == null) {
             ComboBoxRenderer renderer = new ComboBoxRenderer();
-            cbbType = ComponentUtil.createJComboBox(new Rectangle(110, 70, 230, 25),
-                    renderer, backgroundColor);
+            cbbType = ComponentUtil.createJComboBox(new Rectangle(110, 70, 230,
+                    25), renderer, backgroundColor);
         }
         /* create the nickname label and text field */
@@ -179,7 +180,12 @@
         }
         if (txtNickname == null) {
-            txtNickname = ComponentUtil.createJTextField(new Rectangle(110, 110, 230, 25));
-            /* nickname was set before */
+            txtNickname = ComponentUtil.createJTextField(new Rectangle(110, 110,
+                    230,25));
+            /* get the nickname */
             String nickname = Main.pref.get("mapdust.nickname");
+            if (nickname.isEmpty()) {
+                /* if nickname is empty, get the JOSM username */
+                nickname = Main.pref.get("mapdust.josmUserName");
+            }
             if (nickname != null && !nickname.isEmpty()) {
                 txtNickname.setText(nickname);
@@ -196,5 +202,6 @@
             txtDescription.setLineWrap(true);
             cmpDescription = ComponentUtil.createJScrollPane(txtDescription,
-                    new Rectangle(110, 150, 230, 50), backgroundColor, false, true);
+                    new Rectangle(110, 150, 230, 50), backgroundColor, false,
+                    true);
         }
         /* creates the cancel button */
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java	(revision 25311)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java	(revision 25312)
@@ -43,18 +43,18 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.util.Configuration;
 import org.openstreetmap.josm.tools.OpenBrowser;
-import org.openstreetmap.josm.plugins.mapdust.util.Configuration;
 
 
 /**
  * Defines the JPanel which displays the Help.
- * 
+ *
  * @author Bea
  */
 public class MapdustHelpPanel extends JPanel implements HyperlinkListener {
-    
+
     /** The serial version UID */
     private static final long serialVersionUID = 1L;
-    
+
     /**
      * Builds a <code>MapdustDescriptionPanel</code> object
@@ -64,10 +64,5 @@
         String name = "Help";
         setName(name);
-        String txt = "<html>";
-        txt += "<font style='font-size:10px' face='Times New Roman'>";
-        txt += "<b>To add bugs on the map you need to activate ";
-        txt += "the MapDust layer in the Layer List Dialog. ";
-        txt += "Click <a href='' target='_blank'>here</a> for more help.";
-        txt += "</b></font></html>";
+        String txt = buildText();
         JEditorPane txtHelp = new JEditorPane("text/html", "");
         txtHelp.setEditorKit(new HTMLEditorKit());
@@ -75,11 +70,10 @@
         txtHelp.setText(txt);
         txtHelp.addHyperlinkListener(this);
-        JScrollPane cmpDescription =
-                ComponentUtil.createJScrollPane(txtHelp, null, Color.white,
-                        true, true);
+        JScrollPane cmpDescription = ComponentUtil.createJScrollPane(txtHelp,
+                null, Color.white, true, true);
         cmpDescription.setPreferredSize(new Dimension(100, 100));
         add(cmpDescription, BorderLayout.CENTER);
     }
-    
+
     @Override
     public void hyperlinkUpdate(HyperlinkEvent event) {
@@ -95,4 +89,32 @@
         }
     }
-    
+
+    /**
+     * Builds the text of the Help panel. This text contains general information
+     * related to the MapDust plugin.
+     *
+     * @return
+     */
+    private String buildText() {
+        String version = Main.pref.get("mapdust.version");
+        String localVersion = Main.pref.get("mapdust.localVersion");
+        String txt = "<html>";
+        txt += "<font style='font-size:10px' face='Times New Roman'>";
+        txt += "<b>You are using MapDust version ";
+        txt += "<i style='color:red;font-size:10px'>";
+        if (version.equals(localVersion)) {
+            txt += version + "</i>.</b><br>";
+        } else {
+            txt += localVersion + "</i>. There is an update available. ";
+            txt += "Please update to version ";
+            txt += "<i style='color:red;font-size:10px'>" + version;
+            txt += "</i> to benefit from the latest improvements.</b><br>";
+        }
+        txt += "<b>To add bugs on the map you need to activate ";
+        txt += "the MapDust layer in the Layer List Dialog.";
+        txt += "Click <a href='' target='_blank'>here</a> for more help.";
+        txt += "</b></font></html>";
+        return txt;
+    }
+
 }
