manitoulin wrote on Mon Apr 2 17:40:02 MEST 2007:
I am trying to open files with .html extenstions. The files have a combination of perl, html and mason. I have done this previously with EPIC 0.3.0 and Eclipse 3.0.2 with0out any problems. However, I have upgraded to WDSC version 7.0 with Eclipse 3.2 and EPIC 0.4.28, and now I am getting the following error: Unable to create this part due to an internal error. Reason for the failure: An unexpected exception was thrown. with details of: java.lang.NullPointerException at org.epic.perleditor.editors.PerlPresentationReconciler$ColoringScanner.attr(Unknown Source) at org.epic.perleditor.editors.PerlPresentationReconciler$ColoringScanner.setRange(Unknown Source) at org.eclipse.jface.text.rules.DefaultDamagerRepairer.createPresentation(Unknown Source) at org.eclipse.jface.text.presentation.PresentationReconciler.createPresentation(Unknown Source) at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(Unknown Source) at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(Unknown Source) at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inputDocumentChanged(Unknown Source) at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(Unknown Source) at org.eclipse.jface.text.TextViewer.setDocument(Unknown Source) at org.eclipse.jface.text.source.SourceViewer.setDocument(Unknown Source) at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(Unknown Source) at org.eclipse.jface.text.source.SourceViewer.setDocument(Unknown Source) at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(Unknown Source) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(Unknown Source) at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(Unknown Source) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(Unknown Source) at org.epic.perleditor.editors.PerlEditor.createPartControl(Unknown Source) at org.eclipse.ui.internal.EditorReference.createPartHelper(Unknown Source) at org.eclipse.ui.internal.EditorReference.createPart(Unknown Source) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(Unknown Source) at org.eclipse.ui.internal.PartPane.setVisible(Unknown Source) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(Unknown Source) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(Unknown Source) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(Unknown Source) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(Unknown Source) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(Unknown Source) at org.eclipse.ui.internal.PartStack.setSelection(Unknown Source) at org.eclipse.ui.internal.PartStack.showPart(Unknown Source) at org.eclipse.ui.internal.PartStack.add(Unknown Source) at org.eclipse.ui.internal.EditorStack.add(Unknown Source) at org.eclipse.ui.internal.PartStack.add(Unknown Source) at org.eclipse.ui.internal.EditorStack.add(Unknown Source) at org.eclipse.ui.internal.EditorSashContainer.addEditor(Unknown Source) at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(Unknown Source) at org.eclipse.ui.internal.EditorAreaHelper.addEditor(Unknown Source) at org.eclipse.ui.internal.EditorManager.createEditorTab(Unknown Source) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(Unknown Source) at org.eclipse.ui.internal.EditorManager.openEditor(Unknown Source) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(Unknown Source) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Unknown Source) at org.eclipse.ui.internal.WorkbenchPage.access$10(Unknown Source) at org.eclipse.ui.internal.WorkbenchPage$9.run(Unknown Source) at org.eclipse.swt.custom.BusyIndicator.showWhile(Unknown Source) at org.eclipse.ui.internal.WorkbenchPage.openEditor(Unknown Source) at org.eclipse.ui.internal.WorkbenchPage.openEditor(Unknown Source) at com.ibm.etools.systems.core.resources.SystemEditableRemoteFile.openEditor(Unknown Source) at com.ibm.etools.systems.core.resources.SystemEditableRemoteFile.open(Unknown Source) at com.ibm.etools.systems.core.resources.SystemEditableRemoteFile.open(Unknown Source) at com.ibm.etools.systems.files.ui.actions.SystemRemoteFileOpenWithMenu.openEditor(Unknown Source) at com.ibm.etools.systems.files.ui.actions.SystemRemoteFileOpenWithMenu$2.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source) at org.eclipse.ui.internal.Workbench.runUI(Unknown Source) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source) at org.eclipse.ui.internal.ide.IDEApplication.run(Unknown Source) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) 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.invokeFramework(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Unknown Source) at org.eclipse.core.launcher.Main.run(Unknown Source) at org.eclipse.core.launcher.Main.main(Unknown Source) If anyone can help. Please let me know.
jploski wrote on Mon Apr 2 19:14:49 MEST 2007:
I am surprised that you are attempting to edit HTML with EPIC - there must be better tools for that? Anyway, maybe I can reproduce the problem if you send me a sample file which causes the exception to occur.
manitoulin wrote on Mon Apr 2 20:18:30 MEST 2007:
The file has HTML in it, but is mostly perl. I use the EPIC editor because it works well with perl, and handles the html okay. There is usually limited html in the files. I can certainly send you a file, where do I send this to?
jploski wrote on Mon Apr 2 20:29:16 MEST 2007:
jploski at users.sourceforge.net
jploski wrote on Mon Apr 2 21:17:19 MEST 2007:
I tried the file you just sent in Eclipse 3.2 / 0.4.28 (I don't have access to WDSC). It does not look very pretty, but it does not cause any NullPointerException either, so I cannot reproduce your problem. If you can debug EPIC yourself (as described at http://e-p-i-c.sf.net/devguide/devguide.html), it would be helpful to know what is passed as argument "type" to PerlPresentationReconciler.attr before the NullPointerException occurs (I suspect that the line with int index = ((Integer) textAttributes.get(type)).intValue(); is where the NPE occurs).
manitoulin wrote on Tue Apr 3 15:41:08 MEST 2007:
I have tried to follow the steps to debug, but I am unsure if I did it correctly. However, the property Type indicates that the value File. What really seems strange here is if I take the exact same file I sent to you and change the file extension to anything other than .html or .htm (I tried .mas) then the file opens perfectly fine.
jploski wrote on Tue Apr 3 15:50:04 MEST 2007:
You mean it opens fine with the EPIC editor after changing extension? If you want *.html or *.htm to open the same way as *.mas, that should not be a problem. All you have to do is edit "File Associations" in Preferences and set up *.htm(l) to be associated with the same editors as "*.mas" there.
manitoulin wrote on Tue Apr 3 15:54:35 MEST 2007:
I have already set file associations. *.htm, *.html, *.htm(l), and *.mas are all set to use Epic by default. I did this before even trying to open any files.
jploski wrote on Tue Apr 3 17:22:47 MEST 2007:
Try 0.4.29. It likely won't fix the bug (well, it works around the NPE), but it should provide more information in the Error Log which you can post here.
manitoulin wrote on Wed Apr 4 15:22:16 MEST 2007:
Well EPIC 0.4.29 now allows me to open the file without the java error. However, the colors that define areas do not appear. It looks like the code was opened with NotePad. If I change the extension of the file to .mas, or .xyz (I can change to almost anything), the file opens fine, no errors, and the colors are visible. I also get the following error in the error log almost every 3 seconds, when opening the file with .html extension. eclipse.buildId=unknown java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20061001 (JIT enabled) J9VM - 20060915_08260_lHdSMR JIT - 20060908_1811_r8 GC - 20060906_AA BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_TT Framework arguments: -product com.ibm.etools.iseries.wdsc.welcome.ide Command-line arguments: -os win32 -ws win32 -arch x86 -product com.ibm.etools.iseries.wdsc.welcome.ide Warning Wed Apr 04 09:15:01 EDT 2007 Unrecognized partition type {org.eclipse.wst.html.HTML_DEFAULT} in document with partitionings {__dftl_partitioning,org.eclipse.wst.sse.core.default_structured_text_partitioning}
jploski wrote on Wed Apr 4 19:18:19 MEST 2007:
Thanks, that info is what I wanted to see. Now upgrade to 0.4.30 to see if it is fixed there.
manitoulin wrote on Wed Apr 4 20:23:31 MEST 2007:
That fixed my issue. Thank you so much for your assistance.
Note: The above is an archived snapshot of a forum thread. Use the original thread at sf.net to post comments.