Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DefaultContextSelectorToolbarContribution.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DefaultContextSelectorToolbarContribution.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DefaultContextSelectorToolbarContribution.java
index 0fe762e3e..48834bfbd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DefaultContextSelectorToolbarContribution.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DefaultContextSelectorToolbarContribution.java
@@ -741,8 +741,20 @@ implements IWorkbenchContribution, IEventListener, IPeerModelListener, IProperty
Map<String,String> warningsMap = CommonUtils.getPeerWarnings(pNode);
if (warningsMap != null) {
Iterator<Entry<String, String>> warningsMapIterator = warningsMap.entrySet().iterator();
+ List<String> currentModulesDisplayed = new ArrayList<String>(); // To avoid duplicated warnings
while (warningsMapIterator.hasNext()) {
- String warningStr = warningsMapIterator.next().getValue();
+ Entry<String, String> warningsMapEntry = warningsMapIterator.next();
+
+ // Check duplicated warnings
+ String warningOrigin = CommonUtils.getPeerWarningOrigin(pNode, warningsMapEntry.getKey());
+ if (warningOrigin != null) {
+ if (currentModulesDisplayed.contains(warningOrigin)) {
+ continue;
+ }
+ currentModulesDisplayed.add(warningOrigin);
+ }
+
+ String warningStr = warningsMapEntry.getValue();
tooltipStringBuilder.append("<p>"); //$NON-NLS-1$
tooltipStringBuilder.append(warningStr);
tooltipStringBuilder.append("</p>"); //$NON-NLS-1$

Back to the top