From db81fa173d5cc93f65b6b645239d2e2c4fdc755f Mon Sep 17 00:00:00 2001 From: metasim Date: Fri, 9 Feb 2001 12:39:58 +0000 Subject: [PATCH] Applied patch from Deryk Sinotte that fixes problem with discontiguous selections of multiple targets. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268615 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/gui/modules/TargetMonitor.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/antidote/org/apache/tools/ant/gui/modules/TargetMonitor.java b/src/antidote/org/apache/tools/ant/gui/modules/TargetMonitor.java index c2fa7544a..f3d582cc3 100644 --- a/src/antidote/org/apache/tools/ant/gui/modules/TargetMonitor.java +++ b/src/antidote/org/apache/tools/ant/gui/modules/TargetMonitor.java @@ -144,13 +144,17 @@ public class TargetMonitor extends AntModule { if(selected != null && selected.length > 0) { StringBuffer buf = new StringBuffer(); + String name = null; for(int i = 0; i < selected.length; i++) { if(selected[i] instanceof ACSTargetElement) { - if(buf.length() > 0) { - buf.append(", "); + name = ((ACSTargetElement)selected[i]).getName(); + if( buf.toString().indexOf( name ) < 0 ) { + if(buf.length() > 0) { + buf.append(", "); + } + buf.append( name ); } - buf.append(((ACSTargetElement)selected[i]).getName()); } }