flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [01/50] git commit: [flex-sdk] [refs/heads/master] - FLEX-34346: BP in mxml inline item renderer shouldn't be consider as Ambiguous
Date Fri, 18 Jul 2014 06:04:22 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/master 7a8c39791 -> 9a09835a5


FLEX-34346: BP in mxml inline item renderer shouldn't be consider as Ambiguous


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

Branch: refs/heads/master
Commit: f6326471970d15b221d5d0d5b557db05d8ddbcde
Parents: efca6dc
Author: Fr�d�ric THMOAS <fthomas@apache.org>
Authored: Fri May 30 11:56:21 2014 +0100
Committer: Fr�d�ric THMOAS <fthomas@apache.org>
Committed: Fri May 30 11:56:21 2014 +0100

----------------------------------------------------------------------
 .../src/java/flex/tools/debugger/cli/DebugCLI.java | 12 ++++++------
 .../flex/tools/debugger/cli/FileInfoCache.java     | 17 ++++++++++++++---
 2 files changed, 20 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f6326471/modules/debugger/src/java/flex/tools/debugger/cli/DebugCLI.java
----------------------------------------------------------------------
diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/DebugCLI.java b/modules/debugger/src/java/flex/tools/debugger/cli/DebugCLI.java
index 9eb7f5e..a84e87a 100644
--- a/modules/debugger/src/java/flex/tools/debugger/cli/DebugCLI.java
+++ b/modules/debugger/src/java/flex/tools/debugger/cli/DebugCLI.java
@@ -3237,14 +3237,14 @@ public class DebugCLI implements Runnable, SourceLocator {
     private boolean tryResolveBreakpoint(BreakAction b, StringBuilder sb) throws AmbiguousException
{
         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 {
                 waitTilHalted(m_activeIsolate);
                 int module = propertyGet(LIST_MODULE);
                 int line = propertyGet(LIST_LINE);
-                int isolateId = propertyGet(LIST_WORKER);
+                int isolateId;
 
                 String arg = b.getBreakpointExpression();
 
@@ -3272,12 +3272,12 @@ 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$
@@ -3290,7 +3290,7 @@ public class DebugCLI implements Runnable, SourceLocator {
                         sb.append(m_newline);
                         sb.append(m_newline);
 
-                        resolved |= true;
+                        resolved = true;
                     }
                 }
             } catch (NotConnectedException e) {
@@ -3365,7 +3365,7 @@ public class DebugCLI implements Runnable, SourceLocator {
      */
     Location findAndEnableBreak(final SwfInfo swf, final SourceFile file, final int line)
throws NotConnectedException, InProgressException {
         if (swf == null) {
-            return breakEnableRequest(file.getId(), line, swf.getIsolateId());
+            return breakEnableRequest(file.getId(), line, m_activeIsolate);
         }
 
         for (final SourceFile similarFile : getSimilarSourceFilesInSwf(swf, file)) {

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f6326471/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java
----------------------------------------------------------------------
diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java b/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java
index b122e7c..33fc68a 100644
--- a/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java
+++ b/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java
@@ -549,11 +549,11 @@ public class FileInfoCache implements Comparator<SourceFile>
 				exactHitAt = i;
 				break;
 			}
-            else if (doStartsWith && name.startsWith(match))
+            else if (doStartsWith && name.startsWith(match) && !isDuplicated(fileList,
sourceFile))
                 fileList.add(sourceFile);
-			else if (doEndsWith && name.endsWith(match))
+			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);
         }
 
@@ -568,4 +568,15 @@ 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