A plugin to add Silverstripe template support to PHPStorm and other JetBrains IDEs.

Overview

Idea Silverstripe Plugin

⚠️ Work in progress ⚠️

This plugin adds Silverstripe template support to PHPStorm and other JetBrains IDEs.

Platform requirements

This plugin requires PHPStorm (or other IDEA-base IDE) to be running version 2020.3 or greater.

Installation

Until the plugin is ready for a stable release and is available on the JetBrains plugin marketplace, it must be installed from disk:

  • Disable the existing Silverstripe plugin if you have it installed
  • Download the latest release from the releases page
  • Open the plugins menu in your IDE
  • Open the options menu ( in PHPStorm)
  • Choose “Install Plugin from Disk” and select the .jar file you downloaded

Features

  • Syntax highlighting for variables and block (if/else/loop/with) statements
  • Error highlighting for malformed/incorrect block statements
  • Auto-suggest/auto-completion of includes
  • Click-to-navigate to include files in <% include %> statements
  • Live templates for auto-completing blocks/tags and surrounding statements with if/else etc

Live templates

The keyboard shortcuts referenced below are for MacOS - to check for your operating system, review the live templates documentation.

* These templates include placeholders for variables - simply type a variable, then press the return key to continue.

Completion:

The following live templates are available for completion - simply type the abbreviation and hit the TAB key:

  • if*
  • elseif*
  • else
  • with*
  • loop*
  • cached*
  • inc* - auto-suggests template includes
  • reqcss* - a <% require themedCSS() %> tag
  • reqjs* - a <% require themedJavascript() %> tag
  • base - a <% base_tag %> tag
  • _t* - a translation tag

Surround:

The following live templates are available for surrounding existing code. Highlight a portion of your template, then press ⌥⌘J to bring up the templates menu and select from the following:

  • if* - surround with an if statement
  • with* - surround with a "with" statement
  • loop* - surround with a loop
  • cached* - surround with a partial caching block

Contributing

See CONTRIBUTING.md for tips on getting the plugin to build.

Credits

I must send a huge thank you to Marcus Dalgren for his work on the original Silverstripe plugin. It has served Silverstripe developers perfectly for a number of years before it finally succumbed to the effects of many platform updates. It served as the inspiration for almost all the features in this version, and offered an excellent starting point for the JFlex lexer.

I also have to thank JetBrains for their open-source IntelliJ plugins, which have been an invaluable source of information on how to implement certain features.

Comments
  • Internal Error

    Internal Error "java.lang.Throwable: Another not done marker added after this one. Must be done before this."

    I think the first error occured when I tried to watch a diff in a git commit.

    java.lang.Throwable: Another not done marker added after this one. Must be done before this.
    	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
    	at com.intellij.lang.impl.MarkerProduction.doHeavyChecksOnMarkerDone(MarkerProduction.java:179)
    	at com.intellij.lang.impl.PsiBuilderImpl.doValidityChecks(PsiBuilderImpl.java:873)
    	at com.intellij.lang.impl.PsiBuilderImpl.processDone(PsiBuilderImpl.java:845)
    	at com.intellij.lang.impl.PsiBuilderImpl.access$900(PsiBuilderImpl.java:50)
    	at com.intellij.lang.impl.PsiBuilderImpl$StartMarker.done(PsiBuilderImpl.java:356)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseStatements(SilverstripeParser.java:73)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseRoot(SilverstripeParser.java:46)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parse(SilverstripeParser.java:29)
    	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:81)
    	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192)
    	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242)
    	at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:126)
    	at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:33)
    	at com.intellij.psi.AbstractFileViewProvider.findElementAt(AbstractFileViewProvider.java:246)
    	at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.findElementAt(MultiplePsiFilesPerDocumentFileViewProvider.java:162)
    	at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.findElementAt(MultiplePsiFilesPerDocumentFileViewProvider.java:174)
    	at com.intellij.completion.ml.common.RecentPlacesFeatures$StoreRecentPlacesListener$recentPlaceAdded$1.run(RecentPlacesFeatures.kt:72)
    	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
    	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468)
    	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:79)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:119)
    	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:116)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:79)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    	at java.base/java.security.AccessController.doPrivileged(Native Method)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    	at java.base/java.lang.Thread.run(Thread.java:834)
    

    and

    java.lang.Throwable: Unbalanced tree. Most probably caused by unbalanced markers. Try calling setDebugMode(true) against PsiBuilder passed to identify exact location of the problem
    language: Language: Silverstripe, 
    context: '
    <div class="container container--flex-1-1">
        <div>
            <% include ElementTitle %>
    
            $Title
            <% if $HTML %>
                $HTML
            <% else %>
                $Agency.Content
            <% end_if %>
        </div>
    
        <div class="container--flex-1-1">
            <div>
                <h3>Facts</h3>
                <% with $Agency %>
                    <p>
                    $Title <br>
                    <% if $Country %>
                        Location: $Country <br>
                    <% end_if %>
                    <% if $Founded %>
                        Founded: $Founded<br>
                    <% end_if %>
    
                    </p>
                    <p>
                    <% if $HomePage %>
                        $HomePage<br>
                    <% end_if %>
                    <%'
    	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
    	at com.intellij.lang.impl.PsiBuilderImpl.reportUnbalancedMarkers(PsiBuilderImpl.java:1080)
    	at com.intellij.lang.impl.PsiBuilderImpl.assertMarkersBalanced(PsiBuilderImpl.java:1072)
    	at com.intellij.lang.impl.PsiBuilderImpl.balanceWhiteSpaces(PsiBuilderImpl.java:1094)
    	at com.intellij.lang.impl.PsiBuilderImpl.prepareLightTree(PsiBuilderImpl.java:1003)
    	at com.intellij.lang.impl.PsiBuilderImpl.buildTree(PsiBuilderImpl.java:897)
    	at com.intellij.lang.impl.PsiBuilderImpl.getTreeBuilt(PsiBuilderImpl.java:892)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parse(SilverstripeParser.java:42)
    	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:81)
    	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192)
    	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:42)
    	at com.intellij.psi.impl.source.tree.SharedImplUtil.getFirstChild(SharedImplUtil.java:37)
    	at com.intellij.psi.impl.source.PsiFileImpl.getFirstChild(PsiFileImpl.java:740)
    	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:123)
    	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:73)
    	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:77)
    	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
    	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
    	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
    	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366)
    	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
    
    help wanted 
    opened by wernerkrauss 14
  • Exception when opening a project in 2021.1

    Exception when opening a project in 2021.1

    Updated PHPStorm to 2021.1 this morning. Just opened up an older Silverstripe 3 project and got the following.
    A Silverstripe 4 project opens just fine, so presumably it's something to do with a specific syntax / layout / feature in the older code. It consistently errors when opening the project. (Was OK in PS 2020.x)

    PHPStorm: 2021.1 Plugin: 0.3.0 OS: Linux Mint 20.1


    java.lang.Throwable: Another not done marker added after this one. Must be done before this. at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161) at com.intellij.lang.impl.MarkerProduction.doHeavyChecksOnMarkerDone(MarkerProduction.java:179) at com.intellij.lang.impl.PsiBuilderImpl.doValidityChecks(PsiBuilderImpl.java:873) at com.intellij.lang.impl.PsiBuilderImpl.processDone(PsiBuilderImpl.java:845) at com.intellij.lang.impl.PsiBuilderImpl.access$900(PsiBuilderImpl.java:50) at com.intellij.lang.impl.PsiBuilderImpl$StartMarker.done(PsiBuilderImpl.java:356) at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseNestedStatements(SilverstripeParser.java:246) at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseStatementsMaybeNestedInClosedBlock(SilverstripeParser.java:294) at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseStatement(SilverstripeParser.java:106) at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseStatements(SilverstripeParser.java:64) at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseRoot(SilverstripeParser.java:47) at com.kinglozzer.silverstripe.parser.SilverstripeParser.parse(SilverstripeParser.java:30) at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:81) at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53) at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192) at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567) at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191) at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242) at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:42) at com.intellij.psi.impl.source.tree.SharedImplUtil.getFirstChild(SharedImplUtil.java:37) at com.intellij.psi.impl.source.PsiFileImpl.getFirstChild(PsiFileImpl.java:740) at com.kinglozzer.silverstripe.ide.folding.SilverstripeFoldingBuilder.appendDescriptors(SilverstripeFoldingBuilder.java:82) at com.kinglozzer.silverstripe.ide.folding.SilverstripeFoldingBuilder.buildFoldRegions(SilverstripeFoldingBuilder.java:29) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptorsNoPlaceholderCaching(LanguageFolding.java:99) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:75) at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:267) at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:233) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.buildInitialFoldings(CodeFoldingManagerImpl.java:135) at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:48) at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$0(AsyncEditorLoader.java:97) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808) at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$1(AsyncEditorLoader.java:95) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:79) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:119) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:116) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:79) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27) at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:834)

    bug 
    opened by DorsetDigital 3
  • Issues with $Variables not wrapped in braces { }

    Issues with $Variables not wrapped in braces { }

    Likely a regression from https://github.com/kinglozzer/idea-silverstripe-plugin/commit/deee7f3622c6c9b5f4652fad090bfe8e0c3950f9

    The following template parses $Me as a lookup, but the following < is parsed as SS_TEXT separately to the rest of the % end_loop %> statement

    <% if $ElementControllers %>
        <% loop $ElementControllers %>
    	   $Me
        <% end_loop %>
    <% end_if %>
    
    bug 
    opened by kinglozzer 3
  • LexerEditorHighlighter: Invalid State Exception

    LexerEditorHighlighter: Invalid State Exception

    Plugin version: 0.0.2 PhpStorm Version: 2020.3.2 Build #PS-203.7148.74

    Steps to reproduce

    • From within a non-empty Silverstripe template file
    • Highlight the entire contents of the file (e.g. Cmd + A)
    • Type a $

    Causes the editor to hang for a while, sometimes indefinitely, sometimes runs out of memory.

    Stacktrace 1 of 2

    com.intellij.openapi.editor.ex.util.LexerEditorHighlighter$InvalidStateException: com.kinglozzer.silverstripe.ide.highlighting.SilverstripeTemplateHighlighter(com.kinglozzer.silverstripe.parser.SilverstripeLexer): Error updating  after DocumentEventImpl[myOffset=0, myOldLength=0, myNewLength=1].
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.documentChanged(LexerEditorHighlighter.java:342)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter.documentChanged(LayeredLexerEditorHighlighter.java:173)
    	at com.intellij.openapi.editor.impl.DocumentImpl.changedUpdate(DocumentImpl.java:915)
    	at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:819)
    	at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:551)
    	at com.intellij.openapi.editor.EditorModificationUtil.insertStringAtCaretNoScrolling(EditorModificationUtil.java:104)
    	at com.intellij.openapi.editor.EditorModificationUtil.insertStringAtCaret(EditorModificationUtil.java:80)
    	at com.intellij.openapi.editor.EditorModificationUtil.insertStringAtCaret(EditorModificationUtil.java:72)
    	at com.intellij.codeInsight.editorActions.TypedHandler.type(TypedHandler.java:245)
    	at com.intellij.codeInsight.editorActions.TypedHandler.lambda$execute$4(TypedHandler.java:197)
    	at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:312)
    	at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:421)
    	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:321)
    	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:296)
    	at com.intellij.codeInsight.editorActions.TypedHandler.execute(TypedHandler.java:154)
    	at com.intellij.codeInsight.lookup.impl.LookupTypedHandler.execute(LookupTypedHandler.java:75)
    	at com.intellij.codeInsight.template.emmet.EmmetPreviewTypedHandler.execute(EmmetPreviewTypedHandler.java:39)
    	at com.intellij.openapi.editor.impl.DefaultRawTypedHandler$1.run(DefaultRawTypedHandler.java:55)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1000)
    	at com.intellij.openapi.editor.impl.DefaultRawTypedHandler.execute(DefaultRawTypedHandler.java:49)
    	at com.intellij.openapi.editor.impl.EditorFactoryImpl$MyRawTypedHandler.execute(EditorFactoryImpl.java:275)
    	at com.intellij.openapi.editor.actionSystem.TypedAction.lambda$actionPerformed$2(TypedAction.java:183)
    	at com.intellij.reporting.FreezeLoggerImpl.runUnderPerformanceMonitor(FreezeLoggerImpl.java:28)
    	at com.intellij.openapi.editor.actionSystem.TypedAction.actionPerformed(TypedAction.java:183)
    	at com.intellij.openapi.editor.impl.EditorImpl.processKeyTypedNormally(EditorImpl.java:1320)
    	at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:1302)
    	at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:3410)
    	at com.intellij.openapi.editor.impl.EditorImpl$8.keyTyped(EditorImpl.java:1143)
    	at java.desktop/java.awt.AWTEventMulticaster.keyTyped(AWTEventMulticaster.java:247)
    	at java.desktop/java.awt.Component.processKeyEvent(Component.java:6607)
    	at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2852)
    	at java.desktop/java.awt.Component.processEvent(Component.java:6429)
    	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1961)
    	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:878)
    	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1148)
    	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1017)
    	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:843)
    	at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.java:41)
    	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4908)
    	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    	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:751)
    	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    	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:748)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
    	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:896)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:837)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:507)
    	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)
    Caused by: com.intellij.diagnostic.PluginException: Lexer is not progressing after calling advance(): com.kinglozzer.silverstripe.parser.SilverstripeLexer [Plugin: com.kinglozzer.silverstripe]
    	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:337)
    	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
    	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:59)
    	at com.intellij.openapi.editor.ex.util.ValidatingLexerWrapper.throwException(ValidatingLexerWrapper.java:126)
    	at com.intellij.openapi.editor.ex.util.ValidatingLexerWrapper.advance(ValidatingLexerWrapper.java:97)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.doSetText(LexerEditorHighlighter.java:453)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.setText(LexerEditorHighlighter.java:420)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter.setText(LayeredLexerEditorHighlighter.java:124)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.incrementalUpdate(LexerEditorHighlighter.java:173)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.documentChanged(LexerEditorHighlighter.java:334)
    	... 70 more
    

    Stacktrace 2 of 2

    com.intellij.diagnostic.PluginException: Lexer is not progressing after calling advance(): com.kinglozzer.silverstripe.parser.SilverstripeLexer [Plugin: com.kinglozzer.silverstripe]
    	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:337)
    	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
    	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:59)
    	at com.intellij.openapi.editor.ex.util.ValidatingLexerWrapper.throwException(ValidatingLexerWrapper.java:126)
    	at com.intellij.openapi.editor.ex.util.ValidatingLexerWrapper.advance(ValidatingLexerWrapper.java:97)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.doSetText(LexerEditorHighlighter.java:453)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.createIterator(LexerEditorHighlighter.java:139)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter.createBaseIterator(LayeredLexerEditorHighlighter.java:189)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter$LayeredHighlighterIteratorImpl.<init>(LayeredLexerEditorHighlighter.java:555)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter.createIterator(LayeredLexerEditorHighlighter.java:183)
    	at com.intellij.openapi.editor.impl.view.IterationState.<init>(IterationState.java:131)
    	at com.intellij.openapi.editor.impl.view.EditorPainter$Session.paintLineFragments(EditorPainter.java:1423)
    	at com.intellij.openapi.editor.impl.view.EditorPainter$Session.paintBackground(EditorPainter.java:352)
    	at com.intellij.openapi.editor.impl.view.EditorPainter$Session.paint(EditorPainter.java:180)
    	at com.intellij.openapi.editor.impl.view.EditorPainter.paint(EditorPainter.java:69)
    	at com.intellij.openapi.editor.impl.view.EditorView.paint(EditorView.java:269)
    	at com.intellij.openapi.editor.impl.EditorImpl.paint(EditorImpl.java:1948)
    	at com.intellij.openapi.editor.impl.EditorComponentImpl.paintComponent(EditorComponentImpl.java:250)
    	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1077)
    	at com.intellij.openapi.editor.impl.EditorComponentImpl.paint(EditorComponentImpl.java:124)
    	at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5263)
    	at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
    	at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1333)
    	at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5211)
    	at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5021)
    	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:868)
    	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:851)
    	at java.base/java.security.AccessController.doPrivileged(Native Method)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:851)
    	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:826)
    	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:775)
    	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1901)
    	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    	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:746)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:497)
    	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)
    
    bug 
    opened by HJGreen 3
  • NullPointerException in SilverstripeParser.parseOpenBlockContinuationStatement

    NullPointerException in SilverstripeParser.parseOpenBlockContinuationStatement

    This happens very sporadically, and only ever happens during background indexing. Line referenced is:

    https://github.com/kinglozzer/idea-silverstripe-plugin/blob/e7147c16088ec87bb2524550a630eda71ef3f969/src/main/java/com/kinglozzer/silverstripe/parser/SilverstripeParser.java#L247

    bug 
    opened by kinglozzer 3
  • Translation tags

    Translation tags

    Eventhough it's not the recommended way of using the i18n like that; it works and it's way nicer than being creative with the names, I really would like to have this not throw an error. (or atleast have a way to ignore it)

    image

    Multiple dots are the problem; which makes the entire block failing.

    opened by mikaldl 2
  • Highlight closing tag

    Highlight closing tag

    Would it be possible to highlight the corresponding close tags, as it is already the case for normal html elements?

    I thought that this worked in the past.

    enhancement 
    opened by beerbohmdo 2
  • Intermittent exception when opening a project

    Intermittent exception when opening a project

    This always seems to stem from code folding, which probably indicates we’re doing something “non-dumb” despite implementing the DumbAware interface.

    Simplest fix might be to check if the IDE is currently in dumb mode with DumbService.isDumb() and just avoid attempting folding if it is, or just remove DumbAware entirely.

    Example stacktrace:

    java.util.NoSuchElementException
    	at java.base/java.util.ArrayDeque.removeFirst(ArrayDeque.java:363)
    	at java.base/java.util.ArrayDeque.pop(ArrayDeque.java:594)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseStatement(SilverstripeParser.java:156)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseStatements(SilverstripeParser.java:63)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parseRoot(SilverstripeParser.java:46)
    	at com.kinglozzer.silverstripe.parser.SilverstripeParser.parse(SilverstripeParser.java:29)
    	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:81)
    	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192)
    	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:42)
    	at com.intellij.psi.impl.source.tree.SharedImplUtil.getFirstChild(SharedImplUtil.java:37)
    	at com.intellij.psi.impl.source.PsiFileImpl.getFirstChild(PsiFileImpl.java:744)
    	at com.kinglozzer.silverstripe.ide.folding.SilverstripeFoldingBuilder.appendDescriptors(SilverstripeFoldingBuilder.java:82)
    	at com.kinglozzer.silverstripe.ide.folding.SilverstripeFoldingBuilder.buildFoldRegions(SilverstripeFoldingBuilder.java:29)
    	at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptorsNoPlaceholderCaching(LanguageFolding.java:99)
    	at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:75)
    	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:267)
    	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:233)
    	at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.buildInitialFoldings(CodeFoldingManagerImpl.java:134)
    	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:48)
    	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$0(AsyncEditorLoader.java:96)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$1(AsyncEditorLoader.java:94)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468)
    	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:152)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:113)
    	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:59)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:59)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:110)
    	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408)
    	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
    	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
    	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
    	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
    	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    	at java.base/java.security.AccessController.doPrivileged(Native Method)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    	at java.base/java.lang.Thread.run(Thread.java:834)
    
    bug 
    opened by kinglozzer 2
  • "Include template" highlighting

    Thanks so much for this plugin! It's great that the idea-plugin is getting an update!

    I have found some inconsistencies with the template include highlighting, that might need some attention. I think it's valid to have numbers as part of a template name, isn't it? The previous idea-plugin had issues with this naming as well. It shows the include as being erroneous. See:

    Also there are inconsistencies with the coloring when using namespaced template names and "regular" includes:

    Regular include:

    Namespaced:

    This is not a major issue, but it would be visually helpful that the namespaced template names don't look like comments :-D

    bug 
    opened by blueskies79 2
  • Implement live templates

    Implement live templates

    The live templates from the original plugin look like they should work: https://github.com/raket/idea-silverstripe/tree/master/resources/liveTemplates.

    In my initial testing they didn’t backtrack far enough during replacement:

    <!-- Selecting the completion after this -->
    <% if 
    
    <!-- Would result in something like this -->
    <%<% if
    

    It could be because the templates have to use HTML entities for < and % characters, and the IDE doesn’t take that into account - in which case it would be a platform bug. Needs more investigation anyway.

    enhancement 
    opened by kinglozzer 2
  • <% require %> syntax should be more permissive

    <% require %> syntax should be more permissive

    TIL it’s possible to call pretty much any Requirements method, not just css/javascript. E.g:

    <% require insertHeadTags('<link href="//i.vimeocdn.com" rel="dns-prefetch" />') %>
    
    enhancement 
    opened by kinglozzer 1
  • Exception being thrown

    Exception being thrown

    Not sure if this is something project-specific, but it's happened a couple of times:

    java.lang.ClassCastException: class com.intellij.psi.impl.source.PsiPlainTextFileImpl cannot be cast to class com.kinglozzer.silverstripe.psi.SilverstripePsiFile (com.intellij.psi.impl.source.PsiPlainTextFileImpl is in unnamed module of loader com.intellij.util.lang.PathClassLoader @769c9116; com.kinglozzer.silverstripe.psi.SilverstripePsiFile is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @5f4ab104) at com.kinglozzer.silverstripe.util.SilverstripeFileUtil.findValidTemplates(SilverstripeFileUtil.java:65) at com.kinglozzer.silverstripe.util.SilverstripeFileUtil.findIncludeTemplate(SilverstripeFileUtil.java:27) at com.kinglozzer.silverstripe.inspections.SilverstripeIncludeAnnotator.annotate(SilverstripeIncludeAnnotator.java:31) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:131) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:108) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:347) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$7(GeneralHighlightingPass.java:279) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:306) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:309) at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:606) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:309) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:309) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:309) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:276) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:221) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:215) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

    I'll see if I can identify any pattern, but I thought I should log the debug info whilst I have it!

    opened by TimBBP 0
  • java.lang.IndexOutOfBoundsException: Wrong offset: -1

    java.lang.IndexOutOfBoundsException: Wrong offset: -1

    Happened to stumble upon this stack trace when editing an *.ss template in PhpStorm 2021.3 (PS-213.5744.279). right now seems like a one-off but figured I'd submit in case you could find/narrow down or reproduce:

    java.lang.IndexOutOfBoundsException: Wrong offset: -1. Should be in range: [0, 604]
    	at com.intellij.openapi.editor.ex.util.SegmentArray.offsetOutOfRange(SegmentArray.java:89)
    	at com.intellij.openapi.editor.ex.util.SegmentArray.findSegmentIndex(SegmentArray.java:103)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter$HighlighterIteratorImpl.<init>(LexerEditorHighlighter.java:613)
    	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.createIterator(LexerEditorHighlighter.java:143)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter$Mapper.createIterator(LayeredLexerEditorHighlighter.java:427)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter$LayeredHighlighterIteratorImpl.initLayer(LayeredLexerEditorHighlighter.java:572)
    	at com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter$LayeredHighlighterIteratorImpl.retreat(LayeredLexerEditorHighlighter.java:648)
    	at com.kinglozzer.silverstripe.ide.braces.SilverstripeBraceMatcher.isLBraceToken(SilverstripeBraceMatcher.java:94)
    	at com.intellij.codeInsight.highlighting.BraceMatchingUtil.isLBraceToken(BraceMatchingUtil.java:308)
    	at com.intellij.codeInsight.highlighting.BraceMatchingUtil.computeHighlightingAndNavigationContext(BraceMatchingUtil.java:90)
    	at com.intellij.codeInsight.highlighting.BraceMatchingUtil.computeHighlightingAndNavigationContext(BraceMatchingUtil.java:61)
    	at com.intellij.codeInsight.highlighting.BraceHighlightingHandler.updateBraces(BraceHighlightingHandler.java:137)
    	at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$updateHighlighted$2(BackgroundHighlighter.java:155)
    	at com.intellij.codeInsight.highlighting.BackgroundHighlightingUtil.lambda$lookForInjectedFileInOtherThread$2(BackgroundHighlightingUtil.java:68)
    	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$6(NonBlockingReadActionImpl.java:577)
    	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
    	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
    	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
    	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
    	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
    	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
    	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
    	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
    	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    	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:746)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
    	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)
    
    opened by patricknelson 0
  • Inconsistent

    Inconsistent "Find in Files" results when this plugin is enabled

    Hi there,

    I noticed today that this plugin appears to be causing inconsistent results for "Find in Files"

    By inconsistent results I mean different numbers of results each time I rerun the search - I'd get 25 one time, then 30, then 47, then back to 25...

    I initially assumed this was a PhpStorm issue so did some searching around and saw a suggestion plugins could impact "Find in Files" results - so given this is the only non-bundled plugin I have installed in PhpStorm it was the first I tried and the problem went away

    I'm running PhpStorm 2021.2.2 (build 212.5284.49) on Ubuntu 20.04 and saw this issue with versions 1.0.2 and 1.0.3 of this plugin enabled.

    Let me know if I can provide any more info - I'm not too sure on how to debug idea plugins

    bug 
    opened by guttmann 6
  • Issues deleting whitespace with backspace when Vue plugin is enabled and active

    Issues deleting whitespace with backspace when Vue plugin is enabled and active

    This only seems to occur when the Vue plugin is enabled and the project in question has Vue components to “activate” the plugin (using PsiViewer, the file is parsed in both Silverstripe and Vue languages).

    This template appears to trigger it consistently:

    <div class="element">
        <div class="typography">
            <h2>Something</h2>
        </div>
    </div>
    

    Backspace won’t clear the whitespace before the opening <h2> tag, but the delete key will.

    Things to investigate:

    • Why Vue parses .ss files, but not .html files
    • Whether parsing whitespace as separate PsiWhiteSpace elements instead of one big SS_TEXT lump will solve this
    • Whether we can (or should) prevent Vue from parsing .ss files - this probably isn’t desirable
    • Whether we’d be better switching to something more “embedded” within HTML like Vue & Angular do. Would be a big job, no guarantee it’ll fix this...
    bug 
    opened by kinglozzer 0
  • Better highlighting of invalid block statements

    Better highlighting of invalid block statements

    When a block is unfinished, the next line is highlighted instead of the current one:

    Screenshot 2021-02-25 at 17 47 15 Screenshot 2021-02-25 at 17 47 45

    Low priority, but should be tidied up to make the highlighting more consistent/useful.

    enhancement 
    opened by kinglozzer 0
Releases(1.0.3)
Owner
Loz Calver
Loz Calver
Tiger language plugin for IntelliJ-based IDEs (including CLion)

Tiger IDEA Tiger language plugin for IntelliJ-based IDEs (including CLion). From the marketplace Search "Tiger" in the Preferences => Plugins section

Adrien Navratil 7 Dec 15, 2022
A library for IDEs and Code Editors to compile java projects faster dynamically

A library for IDEs and Code Editors to compile java projects faster dynamically

omega ui 2 Feb 22, 2022
TypeQL plugin for JetBrains

JetBrains-Graql-Plugin Basic support for the Graql language (http://grakn.ai) Features Syntax highlighting/validation Find usages support Basic code c

TypeDB OSI 9 Feb 13, 2022
An object mapping jetbrains plugin, it will automatically generate the get/set code between the two objects.

BeanMappingKey 简体中文 | English 一键生成两个实体类之间的字段映射代码,用于代替 BeanUtil 与 MapStruct 等工具。 使用指南 在 Java 开发的过程中,经常会使用众多包装型的对象如:BO、VO、DTO,它们之间往往只有两三个字段的差异, 而对它们进行相互

Rookie 60 Dec 14, 2022
JetBrains Meta programming System

JetBrains MPS Learn Meta Programming with Us Design your own Domain Specific Language with full development environment. Get code editor with completi

JetBrains 1.4k Jan 5, 2023
Markdown language support for IntelliJ IDEA (abandonned).

idea-markdown Markdown language support for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode and Android Studio. This plugin is no more m

null 602 Dec 30, 2022
IntelliJ Platform plugin that shows the file name of the currently open file in the status bar.

IntelliJ Platform plugin that shows the file name of the currently open file in the status bar. Clicking shows a list of recent files.

Christoffer Hammarström 4 May 9, 2022
MIPS Assembler and Runtime Simulator

MIPS Assembler and Runtime Simulator MARS fork (?) cleaned up and gradleized so that I can hopefully build an .exe and install it properly. Also added

null 2 Sep 29, 2021
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack

JetBrains 1k Dec 14, 2022
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack

JetBrains 858 Mar 12, 2021
Vim emulation plugin for IDEs based on the IntelliJ Platform

IdeaVim IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs. Contact maintainers: Bug tracker @IdeaVim on Twitter Chat on gitter Unoffi

JetBrains 7.1k Jan 5, 2023
Tiger language plugin for IntelliJ-based IDEs (including CLion)

Tiger IDEA Tiger language plugin for IntelliJ-based IDEs (including CLion). From the marketplace Search "Tiger" in the Preferences => Plugins section

Adrien Navratil 7 Dec 15, 2022
A library for IDEs and Code Editors to compile java projects faster dynamically

A library for IDEs and Code Editors to compile java projects faster dynamically

omega ui 2 Feb 22, 2022
This project uses the artificial potential field method to realize the path planning of the robot, and completes the trajectory optimization through other settings. It can also be combined with laser SLAM, target recognition and other technologies for path planning.

FRCAutoDriver 项目说明 Project Instruction 本项目利用人工势场法,实现机器人的路径规划,并通过其他设置完成轨迹优化,还可以结合激光SLAM、目标识别等技术进行路径规划 This project uses the artificial potential field

ZhangzrJerry 2 Sep 9, 2022
TypeQL plugin for JetBrains

JetBrains-Graql-Plugin Basic support for the Graql language (http://grakn.ai) Features Syntax highlighting/validation Find usages support Basic code c

TypeDB OSI 9 Feb 13, 2022
An object mapping jetbrains plugin, it will automatically generate the get/set code between the two objects.

BeanMappingKey 简体中文 | English 一键生成两个实体类之间的字段映射代码,用于代替 BeanUtil 与 MapStruct 等工具。 使用指南 在 Java 开发的过程中,经常会使用众多包装型的对象如:BO、VO、DTO,它们之间往往只有两三个字段的差异, 而对它们进行相互

Rookie 60 Dec 14, 2022
Lobby System Template for a multiplayer java game, with chat and other features, using JavaFX and socket TCP (will be extended to UDP).

JavaFX-MultiplayerLobbySystem JavaFX lobby system for multiplayer games with chat, ready toggle and kick buttons, using socket TCP by default. Demo Cr

Michele Righi 7 May 8, 2022
Patches for the old minecraft official launcher to add microsoft account support

MSA4Legacy Patches for the old minecraft official launcher to add microsoft account support My code here is quite atrocious in some parts (for example

Nep Nep 26 Nov 3, 2022
Experiments on how to add Loom support for Netty

Netty Loom Experiment This repository contains Project Loom and Netty related test code. Contents / Goals I created these examples since I was curious

Johannes Schüth 5 Oct 14, 2022