Show file encoding and line ending for the active editor in the eclipse status bar. Encoding can be changed by right click. Line ending support showing CRLF, CR, LF and Mixed.
Environment: Pleiades All in One Java, Oxygen (Windows 64bit)
Steps:
Switch to JavaEE perspective
Make new JavaScript project
Open any item under "JavaScript resource" - "ECMAScript built-in library"
IllegalStateException thrown
java.lang.IllegalStateException: java.lang.NoSuchMethodException: org.eclipse.wst.jsdt.internal.core.LibraryFragmentRoot.getRawClasspathEntry()
at mergedoc.encoding.JarResource.setPackageFragmentRoot(JarResource.java:53)
at mergedoc.encoding.document.ClassFileJarDocument.updateStatus(ClassFileJarDocument.java:51)
at mergedoc.encoding.document.ActiveDocument.init(ActiveDocument.java:66)
at mergedoc.encoding.document.ClassFileJarDocument.init(ClassFileJarDocument.java:35)
at mergedoc.encoding.document.ActiveDocument.<init>(ActiveDocument.java:52)
at mergedoc.encoding.document.ClassFileJarDocument.<init>(ClassFileJarDocument.java:24)
at mergedoc.encoding.ActiveDocumentAgent.getDocument(ActiveDocumentAgent.java:128)
ActiveDocumentAgent.getDocument() seems confused with
org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput (Java editor)
and
org.eclipse.wst.jsdt.internal.ui.javaeditor.InternalClassFileEditorInput (JavaScript editor).
Possible fix (I've not tried):
at ActiveDocumentAgent.getDocument(), change
} else if (editorInput.getClass().getSimpleName().equals("InternalClassFileEditorInput")) {
to
} else if (editorInput.getClass().getName().equals("org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput")) {
Environment: Pleiades All in One Java, Oxygen (Windows 64bit)
Steps:
ActiveDocumentAgent.getDocument() seems confused with org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput (Java editor) and org.eclipse.wst.jsdt.internal.ui.javaeditor.InternalClassFileEditorInput (JavaScript editor).
Possible fix (I've not tried):
at ActiveDocumentAgent.getDocument(), change
} else if (editorInput.getClass().getSimpleName().equals("InternalClassFileEditorInput")) {
to} else if (editorInput.getClass().getName().equals("org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput")) {
event.txt