Index: src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- src/org/openstreetmap/josm/gui/MapStatus.java	(revision 17456)
+++ src/org/openstreetmap/josm/gui/MapStatus.java	(working copy)
@@ -89,6 +89,7 @@
 import org.openstreetmap.josm.data.preferences.BooleanProperty;
 import org.openstreetmap.josm.data.preferences.DoubleProperty;
 import org.openstreetmap.josm.data.preferences.NamedColorProperty;
+import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.gui.NavigatableComponent.ZoomChangeListener;
 import org.openstreetmap.josm.gui.help.Helpful;
 import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
@@ -104,6 +105,7 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.MultiMap;
 import org.openstreetmap.josm.tools.SubclassFilteredCollection;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -119,6 +121,10 @@
  * nothing instead of whining and complaining.
  *
  * @author imi
+ *
+ * Change log:
+ *      12-11-2019 @author Milla Zagorski: added validation results information to popup.
+ *
  */
 public final class MapStatus extends JPanel implements
     Helpful, Destroyable, PreferenceChangedListener, SoMChangeListener, DataSelectionListener, DataSetListener, ZoomChangeListener {
@@ -355,6 +361,22 @@
                     if (middleMouseDown || isAtOldPosition) {
                         Collection<OsmPrimitive> osms = mv.getAllNearest(ms.mousePos, OsmPrimitive::isSelectable);
 
+                        // Create validation info multimap
+                        Collection<TestError> errors = MainApplication.getMap().validatorDialog.tree.getErrors();
+                        MultiMap<Long, String> valInfoMultiMap = new MultiMap<>();
+                        if (!errors.isEmpty()) {
+                            for (TestError error : errors) {
+                                for (OsmPrimitive prim : error.getPrimitives()) {
+                                    String valInfo = error.getSeverity() + ": (#" + error.getCode() + ") "
+                                            + error.getMessage();
+                                    if (error.getDescription() != null) {
+                                        valInfo += " | " + error.getDescription();
+                                    }
+                                    valInfoMultiMap.put(prim.getUniqueId(), valInfo);
+                                }
+                            }
+                        }
+
                         final JPanel c = new JPanel(new GridBagLayout());
                         final JLabel lbl = new JLabel(
                                 "<html>"+tr("Middle click again to cycle through.<br>"+
@@ -376,9 +398,67 @@
                         // These labels may need to be updated from the outside so collect them
                         List<JLabel> lbls = new ArrayList<>(osms.size());
                         for (final OsmPrimitive osm : osms) {
+
+                            // Collect validation information
+                            Collection<String> valInfoCollection = null;
+                            if (!valInfoMultiMap.isEmpty()) {
+                                for (Long key : valInfoMultiMap.keySet()) {
+                                    if (key.equals(osm.getUniqueId())) {
+                                        valInfoCollection = valInfoMultiMap.getValues(key);
+                                    }
+                                }
+                            }
+                            List<String> valInfoList = new ArrayList<>();
+                            if (valInfoCollection != null) {
+                                List<String> valErrors = new ArrayList<>();
+                                List<String> valWarnings = new ArrayList<>();
+                                List<String> valOther = new ArrayList<>();
+                                for (String valInfo : valInfoCollection) {
+                                    if (valInfo.startsWith("Errors")) {
+                                        valInfo = valInfo.replaceFirst("Errors", "Error");
+                                        valErrors.add(valInfo);
+                                    }
+                                    if (valInfo.startsWith("Warnings")) {
+                                        valInfo = valInfo.replaceFirst("Warnings", "Warning");
+                                        valWarnings.add(valInfo);
+                                    }
+                                    if (valInfo.startsWith("Other")) {
+                                        valOther.add(valInfo);
+                                    }
+                                }
+                                if (!valErrors.isEmpty()) {
+                                    List<String> valErrorsSorted = valErrors.stream()
+                                            .sorted(Comparator.comparing((String e) -> e.split(" ",0)[2].toUpperCase()))
+                                            .collect(Collectors.toCollection(ArrayList::new));
+                                    valInfoList.addAll(valErrorsSorted);
+                                }
+
+                                if (!valWarnings.isEmpty()) {
+                                    List<String> valWarningsSorted = valWarnings.stream()
+                                            .sorted(Comparator.comparing((String e) -> e.split(" ",0)[2].toUpperCase()))
+                                            .collect(Collectors.toCollection(ArrayList::new));
+                                    valInfoList.addAll(valWarningsSorted);
+                                }
+
+                                if (!valOther.isEmpty()) {
+                                    List<String> valOtherSorted = valOther.stream()
+                                            .sorted(Comparator.comparing((String e) -> e.split(" ",0)[2].toUpperCase()))
+                                            .collect(Collectors.toCollection(ArrayList::new));
+                                    valInfoList.addAll(valOtherSorted);
+                                }
+                            }
+
                             JLabel l = popupBuildPrimitiveLabels(osm);
                             lbls.add(l);
                             c.add(l, GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 2));
+
+                            if (!valInfoList.isEmpty()) {
+                                JLabel k = popupBuildValidationLabels(osm, valInfoList);
+                                if (k != null) {
+                                    lbls.add(k);
+                                    c.add(k, GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 2));
+                                }
+                            }
                         }
 
                         popupShowPopup(popupCreatePopup(c, ms), lbls);
@@ -637,6 +717,11 @@
                 text.append(" [id=").append(osm.getId()).append(']');
             }
 
+            if (osm.isNew() && !idShown) {
+                text.append("<br>").append("This new feature has not been uploaded").append("<br>");
+                text.append(" [temporary id=").append(osm.getUniqueId()).append(']');
+            }
+
             if (osm.getUser() != null) {
                 text.append(" [").append(tr("User:")).append(' ')
                     .append(Utils.escapeReservedCharactersHTML(osm.getUser().getName())).append(']');
@@ -700,9 +785,41 @@
                  }
             });
             return l;
+
         }
 
         /**
+         * Builds labels with all necessary listeners for the info popup for the
+         * given OsmPrimitive and corresponding validation information.
+         * @author Milla Zagorski
+         * @param osm  The primitive to create the label for
+         * @param valInfoList  The list of validation results information
+         * @return labels for validation info popup
+         */
+        private JLabel popupBuildValidationLabels(OsmPrimitive osm, List<String> valInfoList) {
+            final StringBuilder valText = new StringBuilder(32);
+
+            if (valInfoList != null) {
+                valText.append("Validation information:");
+                for (String info : valInfoList) {
+                    valText.append("<br>&nbsp;&nbsp;&nbsp;&nbsp;").append(info);
+                }
+
+                JLabel l = new JLabel("<html>" + valText.toString() + "</html>",
+                        ImageProvider.get("layer", "validator_small"), JLabel.HORIZONTAL);
+                l.setOpaque(true);
+                popupSetLabelColors(l, osm);
+                l.setFont(l.getFont().deriveFont(Font.PLAIN));
+                l.setVerticalTextPosition(JLabel.TOP);
+                l.setHorizontalAlignment(JLabel.LEFT);
+                l.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+                return l;
+            } else {
+                return null;
+            }
+        }
+
+        /**
          * Called whenever the mouse position or modifiers changed.
          * @param mousePos The new mouse position. <code>null</code> if it did not change.
          * @param modifiers The new modifiers.
