Michal Koscielny created NETBEANS-5359:
------------------------------------------
Summary: java.lang.AssertionError with script tag in tpl file
Key: NETBEANS-5359
URL: https://issues.apache.org/jira/browse/NETBEANS-5359
Project: NetBeans
Issue Type: Bug
Components: php - Smarty
Affects Versions: Next
Environment: Windows 10 64-bit
*Java:* 11.0.6; OpenJDK 64-Bit Server VM 11.0.6+10
Netbeans build #287 20210205
Reporter: Michal Koscielny
Attachments: netbeans-tpl-script.png, testproject.zip
In certain Smarty tpl files I cannot type any script tag because when I type
the closing bracket > a popup appears with the error. I attach a sample project
with a tpl file - to reproduce it place the cursor below the h1 tag and try to
type {{<script>}}.
!netbeans-tpl-script.png!
{{java.lang.AssertionError: should never have two equal TokenSequence
TokenSequence for text/x-tpl/text/html/text/javascript/text/html at
tokenIndex=0. TokenList contains 2 tokens:java.lang.AssertionError: should
never have two equal TokenSequence TokenSequence for
text/x-tpl/text/html/text/javascript/text/html at tokenIndex=0. TokenList
contains 2 tokens:*[0]: "'"" <213,215> VALUE_JAVASCRIPT[10] ParT[2/2],
st=HLS(hc=1791278950,s=9,tag=input), @6ee0f9d1 Embedding[0]:
"text/x-tpl/text/html/text/javascript/text/html/text/javascript", @7c245cc1
T[0]: "'" <213,214> STRING_END[11] DefT, st=LexerState\{canFollowLiteral=false,
canFollowKeyword=true, braceBalances=[], jsxBalances=[]}, @2de5fd81}}
{{T[1]: "/>" F(2) TAG_CLOSE_SYMBOL[19] FlyT, st=HLS(hc=72412707,s=0),
@66f0f4ae}}
{{ text/html, LH: org.netbeans.api.html.lexer.HTMLTokenId$1 at
org.netbeans.modules.web.indent.api.LexUtilities$1.compare(LexUtilities.java:258)
at
org.netbeans.modules.web.indent.api.LexUtilities$1.compare(LexUtilities.java:255)
at java.base/java.util.TimSort.binarySort(TimSort.java:296) at
java.base/java.util.TimSort.sort(TimSort.java:221) at
java.base/java.util.Arrays.sort(Arrays.java:1515) at
java.base/java.util.ArrayList.sort(ArrayList.java:1749) at
java.base/java.util.Collections.sort(Collections.java:179) at
org.netbeans.modules.web.indent.api.LexUtilities.getEmbeddedTokenSequences(LexUtilities.java:255)
at
org.netbeans.modules.web.indent.api.LexUtilities.createCodeBlocks(LexUtilities.java:305)
at
org.netbeans.modules.web.indent.api.support.AbstractIndenter.calculateIndentation(AbstractIndenter.java:283)
at
org.netbeans.modules.web.indent.api.support.AbstractIndenter.reindent(AbstractIndenter.java:210)
at
org.netbeans.modules.html.editor.indent.HtmlIndentTask.reindent(HtmlIndentTask.java:49)
at
org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:548)
at
org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:309)
at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:282)
at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:146) at
org.netbeans.modules.html.editor.typinghooks.HtmlTypedTextInterceptor$1$1.run(HtmlTypedTextInterceptor.java:168)
at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:296) at
org.netbeans.modules.html.editor.typinghooks.HtmlTypedTextInterceptor$1.run(HtmlTypedTextInterceptor.java:164)
at
org.netbeans.modules.html.editor.typinghooks.HtmlTypedTextInterceptor.indentLineAfterTagClosingSymbol(HtmlTypedTextInterceptor.java:180)
at
org.netbeans.modules.html.editor.typinghooks.HtmlTypedTextInterceptor.insert(HtmlTypedTextInterceptor.java:112)
at
org.netbeans.modules.editor.lib2.typinghooks.TypedTextInterceptorsManager$Transaction.textTyped(TypedTextInterceptorsManager.java:91)
at org.netbeans.editor.BaseKit$DefaultKeyTypedAction$3.run(BaseKit.java:1250)
at
org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:333)
at
org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1231)
at
org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1055)
at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:322) at
java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2900)
at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2948)
at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2862) at
java.desktop/java.awt.Component.processEvent(Component.java:6409) at
java.desktop/java.awt.Container.processEvent(Container.java:2263) at
java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008) at
java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at
java.desktop/java.awt.Component.dispatchEvent(Component.java:4840) at
java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
at
java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:870)
at
java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1139)
at
java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1009)
at
java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:835)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4889) at
java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at
java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772) at
java.desktop/java.awt.Component.dispatchEvent(Component.java:4840) at
java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at
java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at
java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at
java.base/java.security.AccessController.doPrivileged(Native Method) at
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at
java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at
java.base/java.security.AccessController.doPrivileged(Native Method) at
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)[catch]
at
java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at
java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at
java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists