Skip to content

Commit

Permalink
the function of open in browser support zhtml file type.
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Oct 13, 2015
1 parent 138c616 commit c8cfe95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/org/zkoss/zkidea/dom/ZulDomUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static boolean isZKFile(PsiFile file) {
}

public static boolean isZKFile(String ext) {
return ZulFileType.EXTENSION.equalsIgnoreCase(ext);
return ZulFileType.EXTENSION.equalsIgnoreCase(ext) || "zhtml".equalsIgnoreCase(ext);
}
public static boolean hasViewModel(PsiElement element) {
do {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.intellij.execution.ExecutionManager;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.ide.browsers.OpenInBrowserRequest;
import com.intellij.ide.highlighter.XmlFileType;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
Expand Down Expand Up @@ -45,7 +44,7 @@ protected Url getUrl(@NotNull OpenInBrowserRequest request, @NotNull VirtualFile
String port = "8080";

FileType fileType = file.getFileType();
if (file.getFileType() instanceof XmlFileType && ZulDomUtil.isZKFile(file.getExtension())) {
if (ZulDomUtil.isZKFile(file.getExtension())) {
ProcessHandler[] runningProcesses = ExecutionManager
.getInstance(request.getProject())
.getRunningProcesses();
Expand Down

0 comments on commit c8cfe95

Please sign in to comment.