vaulttec / veloedit

Eclipse editor for the Velocity Template Language (VTL)
Eclipse Public License 1.0
41 stars 4 forks source link

ClassCastException while opening Velocity file outside of Eclipse workspace #12

Closed tjuerge closed 7 years ago

tjuerge commented 7 years ago

After opening a Velocity file which is not part of the Eclipse workspace then the following exception is thrown:

java.lang.ClassCastException: org.eclipse.ui.ide.FileStoreEditorInput cannot be cast to org.eclipse.ui.IFileEditorInput
    at org.vaulttec.velocity.ui.editor.VelocityReconcilingStrategy.parse(VelocityReconcilingStrategy.java:67)
    at org.vaulttec.velocity.ui.editor.VelocityReconcilingStrategy.setDocument(VelocityReconcilingStrategy.java:55)
    at org.eclipse.jface.text.reconciler.MonoReconciler.reconcilerDocumentChanged(MonoReconciler.java:79)
    at org.eclipse.jface.text.reconciler.AbstractReconciler$Listener.inputDocumentChanged(AbstractReconciler.java:287)
    at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2759)
    at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2800)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:634)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:584)
    at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3995)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3465)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:55)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:445)