怎么用eclipse编辑smarty的tpl文件
程序员文章站
2022-04-23 21:36:51
...
如何用eclipse编辑smarty的tpl文件?
用的是eclipse3.4,文件关联和类型什么的都设置了,但是为什么总是打不开.tpl文件呢?
总是提示
Could not open the editor: Editor could not be initialized.
java.lang.NoSuchMethodError: org.eclipse.php.internal.core.documentModel.parser.PhpLexer.getYy_buffer()[C
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartyTokenizer.doScanEndPhp(SmartyTokenizer.java:845)
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartyTokenizer.primGetNextToken(SmartyTokenizer.java:2372)
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartyTokenizer.getNextToken(SmartyTokenizer.java:1144)
at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.getNextRegion(XMLSourceParser.java:180)
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartySourceParser.parseNodes(SmartySourceParser.java:84)
at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.getDocumentRegions(XMLSourceParser.java:164)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser._core_reparse_text(StructuredDocumentReParser.java:309)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.core_reparse(StructuredDocumentReParser.java:708)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.reparse(StructuredDocumentReParser.java:1352)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.reparse(StructuredDocumentReParser.java:1284)
at org.eclipse.php.internal.core.documentModel.parser.PhpStructuredDocumentReParser.reparse(PhpStructuredDocumentReParser.java:81)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.updateModel(BasicStructuredDocument.java:2708)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1925)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2414)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.set(BasicStructuredDocument.java:2930)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.setDocumentContent(ResourceTextFileBuffer.java:580)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.initializeFileBufferContent(ResourceTextFileBuffer.java:290)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.create(ResourceFileBuffer.java:241)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:112)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:557)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:476)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:3991)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:190)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1325)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:165)
at org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(StructuredTextEditor.java:1954)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3026)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:458)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:366)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2487)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3044)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3071)
------解决方案--------------------
用的是eclipse3.4,文件关联和类型什么的都设置了,但是为什么总是打不开.tpl文件呢?
总是提示
Could not open the editor: Editor could not be initialized.
java.lang.NoSuchMethodError: org.eclipse.php.internal.core.documentModel.parser.PhpLexer.getYy_buffer()[C
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartyTokenizer.doScanEndPhp(SmartyTokenizer.java:845)
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartyTokenizer.primGetNextToken(SmartyTokenizer.java:2372)
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartyTokenizer.getNextToken(SmartyTokenizer.java:1144)
at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.getNextRegion(XMLSourceParser.java:180)
at org.eclipse.php.smarty.internal.core.documentModel.parser.SmartySourceParser.parseNodes(SmartySourceParser.java:84)
at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.getDocumentRegions(XMLSourceParser.java:164)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser._core_reparse_text(StructuredDocumentReParser.java:309)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.core_reparse(StructuredDocumentReParser.java:708)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.reparse(StructuredDocumentReParser.java:1352)
at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.reparse(StructuredDocumentReParser.java:1284)
at org.eclipse.php.internal.core.documentModel.parser.PhpStructuredDocumentReParser.reparse(PhpStructuredDocumentReParser.java:81)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.updateModel(BasicStructuredDocument.java:2708)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1925)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2414)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.set(BasicStructuredDocument.java:2930)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.setDocumentContent(ResourceTextFileBuffer.java:580)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.initializeFileBufferContent(ResourceTextFileBuffer.java:290)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.create(ResourceFileBuffer.java:241)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:112)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:557)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:476)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:3991)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:190)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1325)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:165)
at org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(StructuredTextEditor.java:1954)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3026)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:458)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:366)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2487)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3044)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3071)
------解决方案--------------------
相关文章
相关视频
上一篇: php图片等比例缩放函数