WEB-11678 JavaScript debug: step into and step over do not change the line

This commit is contained in:
Vladimir Krivosheev
2014-06-06 19:13:17 +02:00
parent ec43ad003a
commit 1591844811
2 changed files with 8 additions and 2 deletions
@@ -42,10 +42,16 @@ public class SourceMap {
return sourceResolver.canonicalizedSources;
}
@NotNull
public MappingList getMappings() {
return mappings;
}
public int getSourceLineByRawLocation(int rawLine, int rawColumn) {
MappingEntry entry = getMappings().get(rawLine, rawColumn);
return entry == null ? -1: entry.getSourceLine();
}
public boolean processMappingsInLine(@NotNull List<Url> sourceUrls,
int sourceLine,
@NotNull Processor<MappingEntry> mappingProcessor,
@@ -123,11 +123,11 @@ public class SourceResolver {
}
public interface Resolver {
int resolve(@NotNull VirtualFile sourceFile, @NotNull ObjectIntHashMap<Url> map);
int resolve(@Nullable VirtualFile sourceFile, @NotNull ObjectIntHashMap<Url> map);
}
@Nullable
public MappingList findMappings(@NotNull VirtualFile sourceFile, @NotNull SourceMap sourceMap, @NotNull Resolver resolver) {
public MappingList findMappings(@Nullable VirtualFile sourceFile, @NotNull SourceMap sourceMap, @NotNull Resolver resolver) {
int index = resolver.resolve(sourceFile, canonicalizedSourcesMap);
return index < 0 ? null : sourceMap.sourceIndexToMappings[index];
}