products forums blog support careers about
  History | Log In     View a printable version of the current page.  
PRO USERS, to ensure 'PRIORITY SUPPORT' make sure that your ASAP account is "tagged" when you file the request. Click here for instructions on how to tag your account.
Issue Details (XML | Word | Printable)

Key: STU-1104
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Unprioritized Unprioritized
Assignee: Kevin Sawicki
Reporter: Roberto Gorjão
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Aptana Studio

New "HTML source file" content type conflicting with previous HTML content type

Created: 30/Jan/08 06:47 AM   Updated: 11/Feb/08 01:54 PM
Component/s: Editor: HTML
Affects Version/s: Aptana Studio 1.1
Fix Version/s: Aptana Studio 1.1.1

Importance: Critical
Studio Install Type: Eclipse Plugin
Operating System: Windows XP
Last Known Good Version: 1.0.2.004323_p1
Participants: Dima Geller, Kevin Sawicki and Roberto Gorjão


 Description  « Hide
Web page editor, from WTP2, stopped working after Aptana update to 1.1. This seems to be related to the new content type added by Aptana: HTML source file.

The error message is: "Error opening the editor. Reason: java.lang.NullPointerException"

This problem was previously reported in the PHP area, here (http://support.aptana.com/asap/browse/PHP-43) and was considered fixed, but it isn't. I've tried the solution suggested by Kevin Sawicki – "setting our [Aptana's] content type priority to low" – but it didn't work.

I edited the plugin.xml file in com.aptana.ide.editor.html_1.1.0.007007.jar and changed the priority to low. When I try to open a .html or .htm page Eclipse now reports the following error:

"Error opening the editor. Reason: null charset name"



 All   Comments   Change History      Sort Order:
Kevin Sawicki - 30/Jan/08 11:52 AM
Hi,

If you right click on the .html or .htm file and open with an explicit editor, which editors are failing?

Also, what specific version of wtp are you on? I'm testing with 2.0.0v200706041905 here.


Roberto Gorjão - 30/Jan/08 02:51 PM
Hi,

"Web Page Editor" is the editor that is failing.

I've always found difficult to determine the version of wtp I'm on... at least after it being installed: it doesn't appear identified as wtp anywhere. Anyway, the WST (web standard tools) subproject runtime plugin, to which I believe that the Web Page Editor belongs, is identified with the version number 2.0.1v200709110510-7C-778k0JW0v93WFKIoe7HjINXk6

Just to be sure, I've also installed, in another computer and another Eclipse, the latest WTP recommended to Europa, version wtp-wst-M-2.0.2-20080117053217, and the results were the same. WST version remained the same and so did the errors.

Thanks!


Kevin Sawicki - 30/Jan/08 03:20 PM
If you completely remove the content type from that plugin.xml you previously edited does it fix this issue?

Roberto Gorjão - 31/Jan/08 04:39 AM
No, Kevin, unfortunately it doesn't. The error remains the same: "Error opening the editor. Reason: null charset name".

Kevin Sawicki - 31/Jan/08 11:41 AM
So if you go to Window->Preferences->General->Content Types you still see HTML Source File with the Aptana Editor even though you removed it from the plugin.xml?

Roberto Gorjão - 31/Jan/08 05:25 PM
No, Kevin, it's true that I do not see it anymore.

Roberto Gorjão - 01/Feb/08 12:11 PM
Hi again,

I have to admit that Web Page Editor was already too sensible and that this last error ("null charset name") already used to appear if the page had code errors or was too complex. Nevertheless, what bothers me is that I used to be able to open and edit my pages when they were still in plain x/html, what was very helpful because I could edit its contents visually and then get to styles and behaviours, and now, even those pages, no matter how simple they are, are just impossible to open. Sincerely, in my own Eclipse install, I reverted to Aptana previous version (1.0.2.004323_p1) because of this, but, of course, I would prefer to update it if I could not have to choose between the two editors... Do you have more ideas about what may be causing these errors?

The following are the full details provided by Eclipse when trying to open any page with Web Page Editor, after the content type removal from the plugin.xml (if you want or think that may be helpful, I can provide also the error details before that removal).

java.lang.IllegalArgumentException: Null charset name
at java.nio.charset.Charset.lookup(Unknown Source)
at java.nio.charset.Charset.isSupported(Unknown Source)
at org.eclipse.wst.sse.core.internal.encoding.CodedIO.createEncodingMemento(CodedIO.java:108)
at org.eclipse.wst.sse.core.internal.encoding.CodedIO.createMemento(CodedIO.java:246)
at org.eclipse.wst.sse.core.internal.encoding.CodedReaderCreator.checkForEncodingInContents(CodedReaderCreator.java:116)
at org.eclipse.wst.sse.core.internal.encoding.CodedReaderCreator.findMementoFromStreamCase(CodedReaderCreator.java:229)
at org.eclipse.wst.sse.core.internal.encoding.CodedReaderCreator.getEncodingMemento(CodedReaderCreator.java:317)
at org.eclipse.wst.sse.core.internal.document.AbstractDocumentLoader.createNewStructuredDocument(AbstractDocumentLoader.java:165)
at org.eclipse.wst.sse.core.internal.document.AbstractDocumentLoader.createNewStructuredDocument(AbstractDocumentLoader.java:153)
at org.eclipse.wst.sse.core.internal.model.AbstractModelLoader.load(AbstractModelLoader.java:291)
at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._commonCreateModel(ModelManagerImpl.java:237)
at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getModelForEdit(ModelManagerImpl.java:1083)
at org.eclipse.jst.pagedesigner.css2.CSSUtil.getUserAgentDefaultStyleSheet(CSSUtil.java:231)
at org.eclipse.jst.pagedesigner.css2.CSSUtil.getDefaultCSSDeclaration(CSSUtil.java:195)
at org.eclipse.jst.pagedesigner.css2.style.AbstractStyle.calculateDefaultDeclaration(AbstractStyle.java:137)
at org.eclipse.jst.pagedesigner.css2.style.AbstractStyle.getDefaultDeclaration(AbstractStyle.java:152)
at org.eclipse.jst.pagedesigner.css2.style.AbstractStyle.calculateProperty(AbstractStyle.java:186)
at org.eclipse.jst.pagedesigner.css2.style.AbstractStyle.getStyleProperty(AbstractStyle.java:114)
at org.eclipse.jst.pagedesigner.css2.style.AbstractStyle.getDisplay(AbstractStyle.java:493)
at org.eclipse.jst.pagedesigner.css2.layout.CSSFigure.regetLayout(CSSFigure.java:136)
at org.eclipse.jst.pagedesigner.css2.layout.CSSFigure.invalidateCSS(CSSFigure.java:90)
at org.eclipse.jst.pagedesigner.css2.layout.CSSFigure.setCSSStyle(CSSFigure.java:74)
at org.eclipse.jst.pagedesigner.figurehandler.DefaultFigureHandler.updateFigure(DefaultFigureHandler.java:32)
at org.eclipse.jst.pagedesigner.figurehandler.FigureFactory.updateDeepFigure(FigureFactory.java:132)
at org.eclipse.jst.pagedesigner.parts.ElementEditPart.refresh(ElementEditPart.java:309)
at org.eclipse.jst.pagedesigner.parts.ElementEditPart.refresh(ElementEditPart.java:261)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:212)
at org.eclipse.jst.pagedesigner.parts.NodeEditPart.addNotify(NodeEditPart.java:101)
at org.eclipse.jst.pagedesigner.parts.ElementEditPart.addNotify(ElementEditPart.java:156)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727)
at org.eclipse.jst.pagedesigner.parts.DocumentEditPart.refreshChildren(DocumentEditPart.java:107)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:564)
at org.eclipse.jst.pagedesigner.parts.DocumentEditPart.refresh(DocumentEditPart.java:95)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:212)
at org.eclipse.jst.pagedesigner.parts.NodeEditPart.addNotify(NodeEditPart.java:101)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.SimpleRootEditPart.setContents(SimpleRootEditPart.java:101)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:601)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:610)
at org.eclipse.jst.pagedesigner.editors.SimpleGraphicalEditor.setModel(SimpleGraphicalEditor.java:400)
at org.eclipse.jst.pagedesigner.editors.HTMLEditor.connectDesignPage(HTMLEditor.java:294)
at org.eclipse.jst.pagedesigner.editors.HTMLEditor.createPages(HTMLEditor.java:374)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:283)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:426)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:263)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2739)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2651)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2590)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2574)
at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:340)
at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.java:328)
at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:190)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)


Kevin Sawicki - 01/Feb/08 12:18 PM
So when you reverted your Aptana plugin you no longer got errors from the Web Page editor?

Roberto Gorjão - 01/Feb/08 12:56 PM
Pages opened as they did before (errors occur only when the code itself has errors or styles and behaviours too complex are already applied).

Kevin Sawicki - 06/Feb/08 11:23 AM
Hi,

Can you try updating to studio 1.1.1 and see if it fixes this issue?


Roberto Gorjão - 07/Feb/08 02:42 PM
Yes! It's working! Muito obrigado (thank you very much)!

Kevin Sawicki - 07/Feb/08 04:10 PM
Marking as fixed against 1.1.1

Dima Geller - 08/Feb/08 07:38 PM - edited
Hi,

We just released Aptana Studio 1.1.1, which should contain a fix for your issue. Please update your current version to 1.1.1 and let us know if the problem is solved or not.

Thank you,
Dima


Roberto Gorjão - 11/Feb/08 06:20 AM
Hi, Dima,

I had already answered that before and yes, the issue is fixed. I'm grateful to your team and hope that you keep up the good work, as I sincerely believe that Eclipse and Aptana are already playing and will surely continue to play an increasingly important role in the web design's history.

Thank you,

Roberto