This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197605 - Cannot use HTML editor - throwing exceptions at most times.
Summary: Cannot use HTML editor - throwing exceptions at most times.
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 7.0.1
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords:
: 197602 199294 215038 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-11 08:23 UTC by Peter Nabbefeld
Modified: 2012-11-14 06:49 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nabbefeld 2011-04-11 08:23:50 UTC
1. Created HTML file.
2. Tried to comment out some text.

Adding '<!--' works. Adding a newline into commented text (where I wanted to add the closing tag) does not and results in an exception.

As exception reporting didn't work (reported on dev mailing list), here's the stack trace:


java.lang.NoSuchMethodError: org.netbeans.modules.css.formatting.api.embedding.JoinedTokenSequence.index()I
	at org.netbeans.modules.html.editor.indent.HtmlIndenter.getPreservedLineInitialIndentation(HtmlIndenter.java:207)
	at org.netbeans.modules.css.formatting.api.support.MarkupAbstractIndenter.getLineIndent(MarkupAbstractIndenter.java:485)
	at org.netbeans.modules.css.formatting.api.support.AbstractIndenter.processLanguage(AbstractIndenter.java:1155)
	at org.netbeans.modules.css.formatting.api.support.AbstractIndenter.calculateIndentation(AbstractIndenter.java:323)
	at org.netbeans.modules.css.formatting.api.support.AbstractIndenter.reindent(AbstractIndenter.java:202)
	at org.netbeans.modules.html.editor.indent.HtmlIndentTask.reindent(HtmlIndentTask.java:74)
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:546)
	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:316)
	at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:260)
	at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:171)
	at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:155)
	at org.netbeans.editor.BaseKit$InsertBreakAction.performLineBreakInsertion(BaseKit.java:1420)
	at org.netbeans.editor.BaseKit$InsertBreakAction.access$200(BaseKit.java:1290)
	at org.netbeans.editor.BaseKit$InsertBreakAction$1.run(BaseKit.java:1325)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:344)
	at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:1316)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2884)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)
	at java.awt.Component.processEvent(Component.java:5911)
	at java.awt.Container.processEvent(Container.java:2023)
	at java.awt.Component.dispatchEventImpl(Component.java:4501)
	at java.awt.Container.dispatchEventImpl(Container.java:2081)
	at java.awt.Component.dispatchEvent(Component.java:4331)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
	at java.awt.Component.dispatchEventImpl(Component.java:4373)
	at java.awt.Container.dispatchEventImpl(Container.java:2081)
	at java.awt.Window.dispatchEventImpl(Window.java:2458)
	at java.awt.Component.dispatchEvent(Component.java:4331)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 Peter Nabbefeld 2011-04-11 14:21:40 UTC
Inserting newlines at other positions results in same exception, trying to reformat causes the same problem. Note: Tested this in javascript code (between script-tags).
Comment 2 Marek Fukala 2011-04-11 15:00:49 UTC

*** This bug has been marked as a duplicate of bug 107605 ***
Comment 3 Marek Fukala 2011-04-11 15:04:54 UTC
Looks like caused by the issue 197323 fixes.
Comment 4 Peter Nabbefeld 2011-04-11 15:09:26 UTC
This bug is completely different to 107605:
- The stack trace is different.
- #107605 is about SVG, not HTML.
- #107605 is about DnD, not inserting some text manually.
Comment 5 David Konecny 2011-04-11 19:45:04 UTC
*** Bug 197602 has been marked as a duplicate of this bug. ***
Comment 6 David Konecny 2011-04-11 19:48:46 UTC
I'm going to look into this. I'm sorry about the problem - it is result of a missing dependency and AutoUpdate fetching only some updated modules but not all. It is result of fix of issue 197323. Short term workaround is to download newer full dev build.
Comment 7 David Konecny 2011-04-11 20:48:21 UTC
I see what the problem is. I had updated module dependencies correctly but I did not increase versions of dependent modules itself. And because issue 197323 introduced incompatible Friend-API change it is necessary to increases versions of all dependent modules in order for AutoUpdate to pick it up.

Fixed in web-main as 2ad9bdb31b6b and on contrib as 86dcce23d9f4

After those two changes get build and propagate to Dev Autoupdate Center what should happen is that a few new items should pop out in AutoUpdate window:
- HTML Editor
- JSP Editor
(- PHP Smarty (a PHP module from contrib))
Updating these two modules will resolve the problem.
Comment 8 Martin Fousek 2011-04-12 05:42:16 UTC
David, thanks for update in smarty.
Comment 9 Peter Nabbefeld 2011-04-12 06:22:22 UTC
Bug #197605 might be related.
Comment 10 Peter Nabbefeld 2011-04-12 06:23:26 UTC
(In reply to comment #9)
> Bug #197605 might be related.

Sorry, wrong id: Bug #197641 might be related
Comment 11 Quality Engineering 2011-04-12 08:40:55 UTC
Integrated into 'main-golden', will be available in build *201104120401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2ad9bdb31b6b
User: David Konecny <dkonecny@netbeans.org>
Log: #197605 - Cannot use HTML editor - throwing exceptions at most times.
Comment 12 David Konecny 2011-04-12 18:26:04 UTC
(In reply to comment #10)
> Bug #197641 might be related

That is different issue.

OK, whoever experienced this problem should be able to verify that it was resolved now: open IDE - Options - Plugins - Reload Catalog - and update "Java Web Application" (which results in internal updates of HTML Editor and JSP Editor). Thanks.
Comment 13 Vladimir Riha 2011-07-25 10:47:55 UTC
Unable to reproduce it the way described in first comment, therefore verified...

Product Version: NetBeans IDE 7.0.1 (Build 201107211357)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 14 Quality Engineering 2011-08-27 14:13:27 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/d588698f46c3
User: David Konecny <dkonecny@netbeans.org>
Log: #197605 - Cannot use HTML editor - throwing exceptions at most times.
Comment 15 Martin Fousek 2011-10-26 06:07:23 UTC
*** Bug 199294 has been marked as a duplicate of this bug. ***
Comment 16 Martin Fousek 2012-11-14 06:49:36 UTC
*** Bug 215038 has been marked as a duplicate of this bug. ***