Coder Social home page Coder Social logo

cmdsupport's People

Contributors

t3hnar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmdsupport's Issues

make "control+/" do block comments like in python #48

implement this. its so useful . dont know why it doesnt work when editing bat files .
this apply here to .
its the only 2 plugins for bat in jetbrains ides (or is there any other ?) so one that include it will be good.

Reports variable name as error after IF DEFINED

Given the following batch code.

IF "%~1"=="--create" SET CREATE=1;
IF "%~1"=="-c" SET CREATE=1;
IF DEFINED CREATE (
    GOTO :EOF
)

PhpStorm shows all text after IF DEFINED with a red underline (including the open bracket). The word DEFINED is colored as a keyword but it looks like the plugin doesn't recognize the IF DEFINED statement.

ERB bat/cmd files fail to open in editor with plugin enabled (in rubymine)

Steps:

  1. Open a puppet module, make sure cmd support is enabled
  2. Create the file install_puppet.bat.erb
  3. Mark it as RHTML if not done automatically
  4. Open the new file in editor -> does not open
  5. Disable the plugin
  6. The file opens now

System:

  • CmdSupport 1.0.5
  • RubyMine 2017.1.2
  • Build #RM-171.4249.48, built on April 27, 2017
  • JRE: 1.8.0_112-release-736-b21 amd64
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • Linux 4.11.6-201.fc25.x86_64

[Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;

Hi, I Keep getting the following exception:

update failed for AnAction with ID=Cmd.RunCmdScript: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;
at ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction.compatibleFiles(RunCmdScriptAction.scala:32)
at ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction.update(RunCmdScriptAction.scala:27)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:113)
at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:187)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:138)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:163)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:163)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:85)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:279)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:96)
at com.intellij.ide.ui.customization.CustomizationUtil$3.invokePopup(CustomizationUtil.java:284)
at com.intellij.ui.PopupHandler.mouseReleased(PopupHandler.java:55)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:418)
at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:52)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Any ideas?

Version: IntelliJ 13.1.6

A warning from IDEA about duplicated display names

WARN - Types.impl.FileTypeManagerImpl -
ua.t3hnar.plugins.cmdsupport.BatFileType$@1a2ec436 from 'PluginDescriptor(name=CMD Support, id=CMD Support, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\cmdsupport, version=1.0.5, package=null)' (class ua.t3hnar.plugins.cmdsupport.BatFileType$) and
ua.t3hnar.plugins.cmdsupport.CmdFileType$@464461e5 from 'PluginDescriptor(name=CMD Support, id=CMD Support, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\cmdsupport, version=1.0.5, package=null)' (class ua.t3hnar.plugins.cmdsupport.CmdFileType$)
 both have the same .getDisplayName(): 'Cmd'. Please override either one's getDisplayName() to something unique.

update failed for AnAction with ID=Cmd.RunCmdScript: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;

update failed for AnAction with ID=Cmd.RunCmdScript: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;
at ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction.compatibleFiles(RunCmdScriptAction.scala:32)
at ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction.update(RunCmdScriptAction.scala:27)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:113)
at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:188)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:139)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:164)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:164)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:86)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:280)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:96)
at com.intellij.ide.ui.customization.CustomizationUtil$3.invokePopup(CustomizationUtil.java:291)
at com.intellij.ui.PopupHandler.mouseReleased(PopupHandler.java:55)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:421)
at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:53)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:573)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Cannot run java from a batch file.

When using your plugin on my Win7 Pro 64-bit system in IDFEA 13.0.2, I cannot run a batch script starting another Java program:

'java' is not recognized as an internal or external command,
operable program or batch file.

The same is true from an interactive shell started by the plug-in. Yes, JAVA_HOME is set (to a 64-bit JDK 1.7.0_51) and it works if I run cmd.exe from outside IDEA or just double-click my batch file in Explorer.

It might be some problem related to IDEA being 32-bit and Java 64-bit, but I am just guessing.

Select executable

I'd like to use powershell instead of cmd.exe. Can you make settings for which file to run or use project settings (Tools -> Trminal -> Shell path)?

Читать по-английски могу довольно легко, а вот выражаться - не очень >.<
Есть возможность запилить настройку выбора исполняемого файла, чтобы использовать нужную консоль (например, powershell вместо cmd)?

update failed for AnAction with ID=Cmd.RunCmdScript: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;

IDE: IU-139.463.4

update failed for AnAction with ID=Cmd.RunCmdScript: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.vfs.VirtualFile;
at ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction.compatibleFiles(RunCmdScriptAction.scala:32)
at ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction.update(RunCmdScriptAction.scala:27)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:113)
at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:188)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:139)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:164)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:164)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:86)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:280)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:96)
at com.intellij.ide.ui.customization.CustomizationUtil$3.invokePopup(CustomizationUtil.java:291)
at com.intellij.ui.PopupHandler.mouseReleased(PopupHandler.java:55)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:421)
at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:53)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:573)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

"ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input"

Hi Yaroslav,

I'm experiencing a recurring error with CMDSupport in IntelliJ IDEA 14.0.3.

"ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input"

I can't tell you what triggers the error. I've just noticed it on the status bar on a seemingly regular basis now.

Thanks for your assistance.

Details of last error:

ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input
java.lang.Error: ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input
at ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer.zzScanError(JCmdLexer.java:557)
at ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer.advance(JCmdLexer.java:998)
at com.intellij.lexer.FlexAdapter.locateToken(FlexAdapter.java:95)
at com.intellij.lexer.FlexAdapter.getTokenType(FlexAdapter.java:58)
at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.documentChanged(LexerEditorHighlighter.java:215)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:781)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:721)
at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:498)
at com.intellij.openapi.editor.EditorModificationUtil.insertStringAtCaretNoScrolling(EditorModificationUtil.java:151)
at com.intellij.openapi.editor.EditorModificationUtil.insertStringAtCaret(EditorModificationUtil.java:116)
at com.intellij.openapi.editor.EditorModificationUtil.insertStringAtCaret(EditorModificationUtil.java:108)
at com.intellij.openapi.editor.EditorModificationUtil.typeInStringAtCaretHonorBlockSelection(EditorModificationUtil.java:403)
at com.intellij.codeInsight.editorActions.TypedHandler.a(TypedHandler.java:247)
at com.intellij.codeInsight.editorActions.TypedHandler.access$100(TypedHandler.java:66)
at com.intellij.codeInsight.editorActions.TypedHandler$1.perform(TypedHandler.java:211)
at com.intellij.openapi.editor.impl.CaretModelImpl$3.run(CaretModelImpl.java:355)
at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:435)
at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:346)
at com.intellij.codeInsight.editorActions.TypedHandler.execute(TypedHandler.java:153)
at com.intellij.codeInsight.lookup.impl.LookupTypedHandler.execute(LookupTypedHandler.java:91)
at com.intellij.execution.impl.ConsoleViewImpl$MyTypedHandler.execute(ConsoleViewImpl.java:1249)
at com.intellij.openapi.editor.actionSystem.TypedAction$TypingCommand$1.run(TypedAction.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:977)
at com.intellij.openapi.editor.actionSystem.TypedAction$TypingCommand.run(TypedAction.java:127)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124)
at com.intellij.openapi.editor.actionSystem.TypedAction.actionPerformed(TypedAction.java:107)
at com.intellij.openapi.editor.impl.EditorImpl.a(EditorImpl.java:1037)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:5135)
at com.intellij.openapi.editor.impl.EditorImpl$11.keyTyped(EditorImpl.java:880)
at java.awt.Component.processKeyEvent(Component.java:6471)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2828)
at java.awt.Component.processEvent(Component.java:6293)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1887)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
at java.awt.Component.dispatchEventImpl(Component.java:4742)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:547)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

IntelliJ IDEA Event Log:

5:21:08 PM Error: ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input
6:34:47 PM All files are up-to-date
10:41:51 PM All files are up-to-date
10:42:43 PM All files are up-to-date
10:43:34 PM All files are up-to-date
11:02:02 PM All files are up-to-date
11:03:11 PM All files are up-to-date
11:19:44 PM All files are up-to-date
11:22:53 PM All files are up-to-date
11:27:02 PM All files are up-to-date
11:34:25 PM Error: ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input
11:36:07 PM All files are up-to-date
11:36:46 PM All files are up-to-date
11:40:26 PM All files are up-to-date
11:48:08 PM All files are up-to-date
11:50:31 PM All files are up-to-date
11:58:20 PM All files are up-to-date
12:03:25 AM All files are up-to-date
12:10:05 AM All files are up-to-date
12:13:08 AM All files are up-to-date
12:14:46 AM All files are up-to-date
11:09:57 AM Error: ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input

Add Batch/CMD to Run/Debug configurations

It'd be useful to have a new run/debug configuration type for Windows batch scripts. The "Tools/ External tools" section already supports .bat files but they are global (not bound to a project).

The BashSupport plug-in already provides something similar for bash.

Doesn't support inbuilt themes

When using this with the Darcula theme, the colors get very weird and hard to read. It should change the colors accordingly.

Exception

View provider com.intellij.psi.SingleRootFileViewProvider@7c572b refused to parse text with Language: TEXT; base: Language: Cmd; copy: Language: Cmd; fileType: ua.t3hnar.plugins.cmdsupport.file.CmdFileType$@1bd8c1b
Last action: Maven.Reimport

java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:48)
at com.intellij.psi.impl.source.text.BlockSupportImpl.a(BlockSupportImpl.java:175)
at com.intellij.psi.impl.source.text.BlockSupportImpl.a(BlockSupportImpl.java:157)
at com.intellij.psi.impl.source.text.BlockSupportImpl.access$000(BlockSupportImpl.java:53)
at com.intellij.psi.impl.source.text.BlockSupportImpl$2.run(BlockSupportImpl.java:81)
at com.intellij.psi.impl.PsiManagerImpl$3.compute(PsiManagerImpl.java:211)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:114)
at com.intellij.psi.impl.PsiManagerImpl.performActionWithFormatterDisabled(PsiManagerImpl.java:209)
at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRange(BlockSupportImpl.java:79)
at com.intellij.psi.impl.PsiDocumentManagerImpl.commit(PsiDocumentManagerImpl.java:480)
at com.intellij.psi.impl.PsiDocumentManagerImpl$1.run(PsiDocumentManagerImpl.java:254)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:844)
at com.intellij.psi.impl.PsiDocumentManagerImpl.a(PsiDocumentManagerImpl.java:241)
at com.intellij.psi.impl.PsiDocumentManagerImpl.commitDocument(PsiDocumentManagerImpl.java:235)
at com.intellij.psi.impl.PsiDocumentManagerImpl.commitAllDocuments(PsiDocumentManagerImpl.java:204)
at com.intellij.codeInsight.editorActions.EnterHandler.a(EnterHandler.java:151)
at com.intellij.codeInsight.editorActions.EnterHandler.access$000(EnterHandler.java:54)
at com.intellij.codeInsight.editorActions.EnterHandler$1.run(EnterHandler.java:72)
at com.intellij.psi.impl.source.PostprocessReformattingAspect$2.compute(PostprocessReformattingAspect.java:105)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:114)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:103)
at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:70)
at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:52)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:844)
at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(EditorWriteActionHandler.java:36)
at com.intellij.codeInsight.template.impl.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:51)
at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:52)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:844)
at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(EditorWriteActionHandler.java:36)
at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:77)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:115)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:88)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:63)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:524)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:564)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:444)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:197)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:491)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:404)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
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)

JCmdLexer: Error: could not match input

What i did:

  1. Create new file as Cmd script (from context menu)
  2. Typed in "call mvn --batch-mode release:prepare"
  3. Switched to Firefox to google how to do comments :)
  4. Alt+Tabbed back, entered "::"
  5. Switched to Firefox again
  6. Switched back to Idea and exception occured

Unfortunately I can not simulate the problem again :(

Stacktrace:
ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input: ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input
java.lang.Error: ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer: Error: could not match input
at ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer.zzScanError(JCmdLexer.java:557)
at ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer.advance(JCmdLexer.java:998)
at com.intellij.lexer.FlexAdapter.locateToken(FlexAdapter.java:95)
at com.intellij.lexer.FlexAdapter.getTokenType(FlexAdapter.java:58)
at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.documentChanged(LexerEditorHighlighter.java:213)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:773)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:716)
at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:494)
at com.intellij.openapi.editor.EditorModificationUtil.insertStringAtCaretNoScrolling(EditorModificationUtil.java:149)
at com.intellij.openapi.editor.EditorModificationUtil.access$100(EditorModificationUtil.java:38)
at com.intellij.openapi.editor.EditorModificationUtil$3.perform(EditorModificationUtil.java:467)
at com.intellij.openapi.editor.impl.CaretModelImpl$3.run(CaretModelImpl.java:355)
at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:426)
at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:349)
at com.intellij.openapi.editor.EditorModificationUtil.typeInStringAtCaretHonorMultipleCarets(EditorModificationUtil.java:464)
at com.intellij.openapi.editor.EditorModificationUtil.typeInStringAtCaretHonorMultipleCarets(EditorModificationUtil.java:427)
at com.intellij.openapi.editor.actionSystem.TypedAction$Handler.execute(TypedAction.java:67)
at com.intellij.codeInsight.editorActions.TypedHandler.execute(TypedHandler.java:207)
at com.intellij.codeInsight.template.impl.editorActions.SpaceHandler.execute(SpaceHandler.java:48)
at com.intellij.execution.impl.ConsoleViewImpl$MyTypedHandler.execute(ConsoleViewImpl.java:1229)
at com.intellij.openapi.editor.actionSystem.TypedAction$TypingCommand$1.run(TypedAction.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.editor.actionSystem.TypedAction$TypingCommand.run(TypedAction.java:127)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
at com.intellij.openapi.editor.actionSystem.TypedAction.actionPerformed(TypedAction.java:107)
at com.intellij.openapi.editor.impl.EditorImpl.a(EditorImpl.java:1026)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:5189)
at com.intellij.openapi.editor.impl.EditorImpl$11.keyTyped(EditorImpl.java:871)
at java.awt.Component.processKeyEvent(Component.java:6471)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2828)
at java.awt.Component.processEvent(Component.java:6293)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
at java.awt.Component.dispatchEventImpl(Component.java:4742)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:494)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Assertion failed: Too many element types registered. Out of (short) range.

No idea what the issue was, had some simple batch files open when I restarted PHPStorm. Only unique thing was that I had 4 projects open in the same window which is new for 2016.3

Assertion failed: Too many element types registered. Out of (short) range. java.lang.Throwable at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:168) at com.intellij.psi.tree.IElementType.<init>(IElementType.java:113) at com.intellij.psi.tree.IElementType.<init>(IElementType.java:91) at ua.t3hnar.plugins.cmdsupport.lang.parser.CmdElementType.<init>(CmdElementType.scala:7) at ua.t3hnar.plugins.cmdsupport.lang.lexer.CmdTokenType.<clinit>(CmdTokenType.java:32) at ua.t3hnar.plugins.cmdsupport.lang.lexer.JCmdLexer.advance(JCmdLexer.java:742) at com.intellij.lexer.FlexAdapter.locateToken(FlexAdapter.java:110) at com.intellij.lexer.FlexAdapter.getTokenType(FlexAdapter.java:69) at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.a(LexerEditorHighlighter.java:340) at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.setText(LexerEditorHighlighter.java:317) at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.loadEditorInBackground(TextEditorImpl.java:68) at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:50) at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader$1.a(AsyncEditorLoader.java:83) at com.intellij.psi.impl.PsiDocumentManagerBase$6.run(PsiDocumentManagerBase.java:477) at com.intellij.psi.impl.PsiDocumentManagerBase$7.compute(PsiDocumentManagerBase.java:506) at com.intellij.psi.impl.PsiDocumentManagerBase$7.compute(PsiDocumentManagerBase.java:502) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:899) at com.intellij.psi.impl.PsiDocumentManagerBase.commitAndRunReadAction(PsiDocumentManagerBase.java:502) at com.intellij.psi.impl.PsiDocumentManagerBase.commitAndRunReadAction(PsiDocumentManagerBase.java:474) at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader$1.runBackgroundProcess(AsyncEditorLoader.java:77) at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:135) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.a(ProgressIndicatorUtils.java:135) at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:133) at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:135) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:210) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

New File Type Icon

The file type icon doesn't follow the icon "guide lines".
Maybe like this:
image

Except for the label which should be "CMD" or "BAT"

Change directory is not supported.

Try to change directory (now it will be impossible):

echo %cd%
C:\work\dealer
Process finished with exit code 0 at 20:22:06.
Execution time: 110 ms.

cd modules
Process finished with exit code 0 at 20:22:13.
Execution time: 125 ms.

echo %cd%
C:\work\dealer
Process finished with exit code 0 at 20:22:22.
Execution time: 109 ms.

commenting lines via a keybinding is not supported

When editing code in most languages IntelliJ supports (un)commenting currently selected lines using a menu item (Code - Comment with Line Comment) or a keybinding (Ctrl+/ by default). This puts # in python, // in js, etc.
One would expect it to use rem for cmd and bat files, but unfortunately it does not. This looks like a very obvious feature for a cmdsupport plugin.

formatting

Hi,

Just wanted to let you know I've been using this one: https://plugins.jetbrains.com/plugin/265-batch-scripts-support

But something weird happened today and now every time I try to input a bash comment with "::" the plugin goes crazy and stops me from typing. I tried a lot of different things (post: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004274179-IntelliJ-Stopped-Editor-Working)

Long story short I switch to this CMD Support instead and the problem is fixed... however the format highlighting was much much better in the old version; I just wanted to let you guys know, maybe you can implement some of that old functionality.

Repetitive messages about file patterns

Why do I get these messages every time I start PyCharm? Do I have to uninstall the CMD Support plugin to make them stop? The messages offer me the ability to edit certain things but don't say what the edits should be.

6/28/2021
8:54 AM File pattern '.bat' (from 'Batch Scripts Support' plugin) was reassigned to file type 'Bat' by 'CMD Support' plugin
You can confirm or revert reassigning pattern '
.bat'

Confirm reassign this pattern to file type 'Bat' from plugin 'CMD Support'
Revert this pattern to file type 'Batch' from plugin 'Batch Scripts Support'
Edit file type 'Batch'
Edit file type 'Bat'

8:54 AM File pattern '.cmd' (from 'Batch Scripts Support' plugin) was reassigned to file type 'Cmd' by 'CMD Support' plugin
You can confirm or revert reassigning pattern '
.cmd'

Confirm reassign this pattern to file type 'Cmd' from plugin 'CMD Support'
Revert this pattern to file type 'Batch' from plugin 'Batch Scripts Support'
Edit file type 'Batch'
Edit file type 'Cmd'

Add support for "echo." command.

Please add support for "echo." (there is a dot at the end) which is a valid command, and means echo new line.

Keep up the good work!

Error: could not match input

When pressing the colon before the cursor

image

I get the error shown in the eventlog (could not match input). I've pasted the entire file at the bottom.

I found this error when trying to add a TODO list item (they don't show up in the TODO tab)..

I'm using PyCharm 4.0 EAP:

image

file run.bat

@echo off
rem run django dev server for a site..


if not defined SRV (
    call ..\gosrv
)

if "%1" == "" (
    echo "Usage run ls | sitename"
    goto:eof
)


if not defined VIRTUAL_ENV (
    echo "You must activate a virtualenv first (e.g. workon dev)"
    goto :eof
)

if "%1" == "ls" (
    rem dir /A=D %SRV%\www
    pushd %SRV%\www
    find . -maxdepth 1 -type d | tr "./" "  " | grep -v default
    popd
    goto :eof
)


set DK_ACTIVE_SITE=%1
set DJANGO_SETTINGS_MODULE=%DK_ACTIVE_SITE%.settings

cd /d %SRV%\www\%DK_ACTIVE_SITE%

set LOGIDR=%SRV%\www\%DK_ACTIVE_SITE% \logs
set PYTHONPATH=%SRV%\www
set DKROOT=%SRV%\src\datakortet

set "comment=TODO: add sitename.local to hosts?"
set "comment=TODO: add site to apache/wsgi-express?"

rem TODO: something
:
python manage.py runserver

kafka-topics.bat is not recognize as an internal or external command

I am trying to use cmd support login to run some kafka scripts. The issue is that the scripts work well on command prompt but not with cmd support login for Intellij Idea. For example, when I run the script in Intellij

kafka-topics.bat --describe --zookeeper localhost:2181 --topic invoice

I get the following error

'kafka-topics.bat' is not recognized as an internal or external command, operable program or batch file.

Any hint about how to solve this issue will be welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.