flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [46/50] [abbrv] git commit: [flex-falcon] [refs/heads/develop] - re-apply f6326471970d15b221d5d0d5b557db05d8ddbcde from Flex SDK
Date Tue, 02 Jun 2015 17:05:49 GMT
re-apply f6326471970d15b221d5d0d5b557db05d8ddbcde from Flex SDK


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/9d02c25b
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/9d02c25b
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/9d02c25b

Branch: refs/heads/develop
Commit: 9d02c25bae616e204ca21849ab64373f15764b87
Parents: 5a5e4c5
Author: Alex Harui <aharui@apache.org>
Authored: Mon Jun 1 23:21:45 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Jun 1 23:21:45 2015 -0700

----------------------------------------------------------------------
 .../src/flex/tools/debugger/cli/DebugCLI.java   | 14 ++++++-------
 .../flex/tools/debugger/cli/FileInfoCache.java  | 21 ++++++++++++++++----
 2 files changed, 24 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9d02c25b/debugger/src/flex/tools/debugger/cli/DebugCLI.java
----------------------------------------------------------------------
diff --git a/debugger/src/flex/tools/debugger/cli/DebugCLI.java b/debugger/src/flex/tools/debugger/cli/DebugCLI.java
index 46219f7..5fdb2f0 100644
--- a/debugger/src/flex/tools/debugger/cli/DebugCLI.java
+++ b/debugger/src/flex/tools/debugger/cli/DebugCLI.java
@@ -3585,8 +3585,8 @@ public class DebugCLI implements Runnable, SourceLocator
 	{
 		int status = b.getStatus();
 		boolean resolved = (status == BreakAction.RESOLVED);
-        if (status == BreakAction.UNRESOLVED || resolved) // we don't do anything for AMBIGUOUS
-		{
+        if (status == BreakAction.UNRESOLVED) // we don't do anything for AMBIGUOUS
+        {
 			/* wait a bit if we are not halted */
 			try
 			{
@@ -3594,7 +3594,7 @@ public class DebugCLI implements Runnable, SourceLocator
 
 		        int module = propertyGet(LIST_MODULE);
 				int line = propertyGet(LIST_LINE);
-				int isolateId = propertyGet(LIST_WORKER);
+				int isolateId;
 
 		        String arg = b.getBreakpointExpression();
 
@@ -3624,14 +3624,14 @@ public class DebugCLI implements Runnable, SourceLocator
 						Map<String, Object> args = new HashMap<String, Object>();
 						String formatString;
 						args.put("breakpointNumber", Integer.toString(b.getId())); //$NON-NLS-1$
-						String filename = file.getName();
+						String filename = file != null ? file.getName() : null;
 						if (b.isSingleSwf() && file != null)
 						{
 							filename = filename + "#" + file.getId(); //$NON-NLS-1$
 						}
 						args.put("file", filename); //$NON-NLS-1$
-						args.put("line", new Integer(l.getLine())); //$NON-NLS-1$
-	
+						args.put("line", l != null ? l.getLine() : 0); //$NON-NLS-1$
+						
 						if (funcName != null)
 						{
 							args.put("functionName", funcName); //$NON-NLS-1$
@@ -3646,7 +3646,7 @@ public class DebugCLI implements Runnable, SourceLocator
 						sb.append(m_newline);
 						sb.append(m_newline);
 		
-						resolved |= true;
+						resolved = true;
                     }
 		    	}
 			}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9d02c25b/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
----------------------------------------------------------------------
diff --git a/debugger/src/flex/tools/debugger/cli/FileInfoCache.java b/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
index 073e0ac..cff9dab 100644
--- a/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
+++ b/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
@@ -546,11 +546,11 @@ public class FileInfoCache implements Comparator<SourceFile>
 				exactHitAt = i;
 				break;
 			}
-            else if (doStartsWith && name.startsWith(match))
-                fileList.add(sourceFile);
-			else if (doEndsWith && name.endsWith(match))
+			else if (doStartsWith && name.startsWith(match) && !isDuplicated(fileList,
sourceFile))
+				fileList.add(sourceFile);
+			else if (doEndsWith && name.endsWith(match) && !isDuplicated(fileList,
sourceFile))
                 fileList.add(sourceFile);
-			else if (doIndexOf && name.indexOf(match) > -1)
+			else if (doIndexOf && name.contains(match) && !isDuplicated(fileList,
sourceFile))
 				fileList.add(sourceFile);
         }
 
@@ -565,4 +565,17 @@ public class FileInfoCache implements Comparator<SourceFile>
 		Arrays.sort(fileArray, this);
         return fileArray;
     }
+    
+
+    private boolean isDuplicated(ArrayList<SourceFile> fileList, SourceFile sourceFile)
{
+        boolean found = false;
+        for (SourceFile next : fileList) {
+            if (next.getFullPath().equals(sourceFile.getFullPath())) {
+                found = true;
+                break;
+            }
+        }
+        return found;
+    }
+
 }


Mime
View raw message