当我在 Netbeans 中打开一个文件时,我Please wait...
在编辑器窗口的第一行看到了一个。
屏幕底部还出现一个异常图标,上面写着:
A org.netbeans.modules.parsing.spi.ParseException exception has occurred.
However, the system should continue working without further problems.
Click Show Details for the stack trace.
如果我点击“显示更多详细信息”,我会得到以下信息:
java.lang.IllegalStateException: Cannot find an HtmlParser implementation for HTML5
at org.netbeans.editor.ext.html.parser.api.SyntaxAnalyzerResult.findParser(Unknown Source)
at org.netbeans.editor.ext.html.parser.api.SyntaxAnalyzerResult.doParseHtml(Unknown Source)
at org.netbeans.editor.ext.html.parser.api.SyntaxAnalyzerResult.parseHtml(Unknown Source)
at org.netbeans.modules.html.editor.api.gsf.HtmlParserResult.root(HtmlParserResult.java:133)
at org.netbeans.modules.html.editor.api.gsf.HtmlParserResult.roots(HtmlParserResult.java:172)
at org.netbeans.modules.html.editor.gsf.HtmlStructureScanner.folds(HtmlStructureScanner.java:158)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.addTree(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.access$700(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask$3.run(Unknown Source)
at org.netbeans.editor.BaseDocument.render(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.scan(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.access$200(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask$1.run(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask$1.run(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(Unknown Source)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(Unknown Source)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(Unknown Source)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:168)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:356)
at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Unknown Source)
Caused: org.netbeans.modules.parsing.spi.ParseException
at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(Unknown Source)
[catch] at org.netbeans.modules.parsing.api.ParserManager.parse(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.gsfFoldScan(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.run(Unknown Source)
at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.run(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
我正在使用原装的 NetBeans IDE 7.0.1,它可以直接从 Ubuntu 12.04 存储库获取。
答案1
我的 php 应用程序也遇到了类似的问题;它显示“请等待...”在页面顶部,并且不允许我正确编辑文件。
我意识到 NetBeans 认为该项目是 HTML5 格式的,而 NetBeans 7.0.1 不支持这种格式,因此我单击了“请稍候...”并选择使用旧版本的 HTML 作为项目的默认设置。瞧,马上就成功了!
答案2
这是 Ubuntu 存储库(NetBeans 7.0.1)中 Netbeans 版本的一个错误。
直接从安装较新版本https://netbeans.org/downloads/并且它可以正常工作。