What sort of magic incantations does the BibTex editor need to work? Can create an empty .bib file, but when trying to add this entry:
<pre>
@BOOK{schneier,
author = "Bruce Schneier",
title = "Applied Cryptography Second Edition : Protocols, Algorithms and Source Code in C",
publisher = "John Wiley \& Sons",
year = "1996",
}
</pre>
Attempting to save the file causes an error "Save Failed: Unresolved compilation problem: The method assert(boolean) is undefined for the type LookAheadReader" occurs.
Closing the editor tab and then re-opening the .bib file creates an empty tab view.
Suspect that the problem is that the editor is expecting some BibTex attributes that are not in the given entry, but which ones? (BibTex itself is quite happy with that entry).
In case it is relevant, an extract of the relevant section of the Eclipse .log file follows:
<pre>
!SESSION Dec 08, 2004 14:58:05.440 ---------------------------------------------
eclipse.buildId=M200409161125
java.version=1.4.2_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
!ENTRY org.eclipse.ui 4 4 Dec 08, 2004 14:58:05.440
!MESSAGE Save Failed
!ENTRY org.eclipse.ui 2 0 Dec 08, 2004 14:58:05.440
!MESSAGE Save Failed
!STACK 0
java.lang.Error: Unresolved compilation problem:
The method assert(boolean) is undefined for the type LookAheadReader
at ish.ecletex.editors.bibtex.parser.LookAheadReader.getCurrent(LookAheadReader.java:55)
at ish.ecletex.editors.bibtex.parser.PseudoLexer.skipWhitespace(PseudoLexer.java:277)
at ish.ecletex.editors.bibtex.parser.PseudoLexer.scanTopLevelCommentOrAtOrEOF(PseudoLexer.java:49)
at ish.ecletex.editors.bibtex.parser.BibtexParser.parse(BibtexParser.java:75)
at ish.ecletex.editors.bibtex.BibTeXEditor.createFormPage(BibTeXEditor.java:113)
at ish.ecletex.editors.bibtex.BibTeXEditor.updateFormPage(BibTeXEditor.java:91)
at ish.ecletex.editors.tex.TeXEditor.doSave(TeXEditor.java:262)
at ish.ecletex.editors.bibtex.BibTeXEditor.doSave(BibTeXEditor.java:165)
at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:88)
at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:109)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:303)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:253)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:588)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:585)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1653)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:115)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:93)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1093)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:2582)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:2594)
at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:69)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
at org.eclipse.jface.action.ActionContributionItem$8.handleEvent(ActionContributionItem.java:824)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)
</pre>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
java.lang.Error: Unresolved compilation problem:
The method assert(boolean) is undefined for the type LookAheadReader
... or lines. the assert command is part of java 1.4 and above, so if you arent using these versions, then it wont work... if you are using 1.4 or above, then i need to look into it further! Let me know.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i put everything i could to 1.4 compliance, but i still get this annoying message/error.
could you please put a compiled version without the assertions online?
i think there should be a javac flag for not including the assertions..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What sort of magic incantations does the BibTex editor need to work? Can create an empty .bib file, but when trying to add this entry:
<pre>
@BOOK{schneier,
author = "Bruce Schneier",
title = "Applied Cryptography Second Edition : Protocols, Algorithms and Source Code in C",
publisher = "John Wiley \& Sons",
year = "1996",
}
</pre>
Attempting to save the file causes an error "Save Failed: Unresolved compilation problem: The method assert(boolean) is undefined for the type LookAheadReader" occurs.
Closing the editor tab and then re-opening the .bib file creates an empty tab view.
Suspect that the problem is that the editor is expecting some BibTex attributes that are not in the given entry, but which ones? (BibTex itself is quite happy with that entry).
In case it is relevant, an extract of the relevant section of the Eclipse .log file follows:
<pre>
!SESSION Dec 08, 2004 14:58:05.440 ---------------------------------------------
eclipse.buildId=M200409161125
java.version=1.4.2_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
!ENTRY org.eclipse.ui 4 4 Dec 08, 2004 14:58:05.440
!MESSAGE Save Failed
!ENTRY org.eclipse.ui 2 0 Dec 08, 2004 14:58:05.440
!MESSAGE Save Failed
!STACK 0
java.lang.Error: Unresolved compilation problem:
The method assert(boolean) is undefined for the type LookAheadReader
at ish.ecletex.editors.bibtex.parser.LookAheadReader.getCurrent(LookAheadReader.java:55)
at ish.ecletex.editors.bibtex.parser.PseudoLexer.skipWhitespace(PseudoLexer.java:277)
at ish.ecletex.editors.bibtex.parser.PseudoLexer.scanTopLevelCommentOrAtOrEOF(PseudoLexer.java:49)
at ish.ecletex.editors.bibtex.parser.BibtexParser.parse(BibtexParser.java:75)
at ish.ecletex.editors.bibtex.BibTeXEditor.createFormPage(BibTeXEditor.java:113)
at ish.ecletex.editors.bibtex.BibTeXEditor.updateFormPage(BibTeXEditor.java:91)
at ish.ecletex.editors.tex.TeXEditor.doSave(TeXEditor.java:262)
at ish.ecletex.editors.bibtex.BibTeXEditor.doSave(BibTeXEditor.java:165)
at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:88)
at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:109)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:303)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:253)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:588)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:585)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1653)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:115)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:93)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1093)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:2582)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:2594)
at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:69)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
at org.eclipse.jface.action.ActionContributionItem$8.handleEvent(ActionContributionItem.java:824)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)
</pre>
The problems lies in this line
java.lang.Error: Unresolved compilation problem:
The method assert(boolean) is undefined for the type LookAheadReader
... or lines. the assert command is part of java 1.4 and above, so if you arent using these versions, then it wont work... if you are using 1.4 or above, then i need to look into it further! Let me know.
Then there may be a problem here:
J2RE SE 1.4.2_05
Is there anything else that we can do to help ID the problem?
I can confirm the problem with java 1.5.0-b64
For my personal use I just kicked out the assertion from the code. It seems to work fine (no real tests done).
Yeah ill probobably do that if i cant get any motivation to actually find, or solve the problem :)
i put everything i could to 1.4 compliance, but i still get this annoying message/error.
could you please put a compiled version without the assertions online?
i think there should be a javac flag for not including the assertions..
checking out of cvs and recompiling it locally fixed the problem
I have removed the assertion from the code... so hopefully that will solve the problem.. and not cause any more :)