fix "open actual script source" action for local file (if source specified as absolute file path)

This commit is contained in:
Vladimir Krivosheev
2015-06-09 14:05:53 +02:00
parent 8c289efab9
commit 7ffd7072d8
2 changed files with 32 additions and 1 deletions
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.debugger.sourcemap;
import com.intellij.openapi.util.SystemInfo;
@@ -93,6 +108,7 @@ public class SourceResolver {
if (canonicalPath != null && !canonicalPath.equals(path)) {
absoluteLocalPathToSourceIndex.put(canonicalPath, sourceIndex);
}
return Urls.newLocalFileUrl(path);
}
}
return new UrlImpl(baseUrl.getScheme(), baseUrl.getAuthority(), path, null);
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jetbrains.javascript.debugger;
import com.google.common.base.CharMatcher;
@@ -82,7 +97,7 @@ public class NameMapper {
public static void warnSeveralMapping(@NotNull PsiElement element) {
// see https://dl.dropboxusercontent.com/u/43511007/s/Screen%20Shot%202015-01-21%20at%2020.33.44.png
// var1 mapped to the whole "var c, notes, templates, ..." expression text + unrelated text " ;"
LOG.warn("incorrect sourcemap, several mappings for named element " + element);
LOG.warn("incorrect sourcemap, several mappings for named element " + element.getText());
}
@NotNull