init WEB-7728 Built-in HTTP server should be more visible

Created JS Debug configuration MUST use remote url instead of local file
This commit is contained in:
Vladimir Krivosheev
2013-05-29 16:25:34 +02:00
parent 2a6c7d9290
commit 9fbda7b65c
2 changed files with 4 additions and 7 deletions
@@ -58,8 +58,7 @@ public class WebBrowserServiceImpl extends WebBrowserService {
WebBrowserUrlProvider provider = getProvider(psiElement);
if (provider != null) {
try {
// I (develar) don't want to change API right now, so, just wrap result
return Urls.newFromIdea(provider.getUrl(psiElement, psiFile, virtualFile));
return provider.getUrl(psiElement, psiFile, virtualFile);
}
catch (WebBrowserUrlProvider.BrowserException e) {
if (!HtmlUtil.isHtmlFile(psiFile)) {
@@ -71,12 +70,13 @@ public class WebBrowserServiceImpl extends WebBrowserService {
return Urls.newFromVirtualFile(virtualFile);
}
@Override
@Nullable
public Url getUrlToOpen(@NotNull PsiElement psiElement) {
try {
return getUrlToOpen(psiElement, false);
}
catch (WebBrowserUrlProvider.BrowserException e) {
catch (WebBrowserUrlProvider.BrowserException ignored) {
return null;
}
}
@@ -35,10 +35,7 @@ public abstract class WebBrowserUrlProvider {
}
@NotNull
/**
* URL must not be encoded (space as is)
*/
public abstract String getUrl(@NotNull PsiElement element, @NotNull PsiFile psiFile, @NotNull VirtualFile virtualFile) throws BrowserException;
public abstract Url getUrl(@NotNull PsiElement element, @NotNull PsiFile psiFile, @NotNull VirtualFile virtualFile) throws BrowserException;
/**
* Invariant: element has not null containing psi file with not null virtual file