intellij-plugin

Text Field with Standard PsiElement Auto Completion in IntelliJ Plugin

风格不统一 提交于 2020-01-03 15:11:14
问题 I'm trying to create a simple text field with auto completion for my IntelliJ plugin. I think this should be pretty simple but so far I've run into dead ends... E.g. this should work as far as I understand: EditorTextField format = new TextFieldWithCompletion(currentEditor.getProject(), provider, "", true, true, true); The problem is the provider. I'd expect to see a provider that isn't a list provider. I just want to show the completion matching the current line in the editor cursor so I'd

IntelliJ Plugin - Run Console Command

主宰稳场 提交于 2020-01-02 11:05:12
问题 I am new to plugin development for IntelliJ and would like to know, how I can execute a command in the command line from within my plugin. I would like to call, for instance, the command "gulp" in the current projects root directory. I already tried using Runtime.getRuntime().exec(commands); with commands like "cd C:\Users\User\MyProject" and "gulp", but it does not seem to work that way and I wonder, if the plugin API provides an easier method. Thank you very much. :-) 回答1: I know its a bit

IntelliJ Plugin - Run Console Command

浪子不回头ぞ 提交于 2020-01-02 11:04:14
问题 I am new to plugin development for IntelliJ and would like to know, how I can execute a command in the command line from within my plugin. I would like to call, for instance, the command "gulp" in the current projects root directory. I already tried using Runtime.getRuntime().exec(commands); with commands like "cd C:\Users\User\MyProject" and "gulp", but it does not seem to work that way and I wonder, if the plugin API provides an easier method. Thank you very much. :-) 回答1: I know its a bit

Can't Install Plugins in Android Studio

六月ゝ 毕业季﹏ 提交于 2020-01-01 19:58:31
问题 I'm trying to get Flutter/Dart plugins set up in Android Studio but I'm having a ton of trouble. The Plugin Browser doesn't work at all. I tried with different internet connections and with my firewall totally off but still got nothing. Also tried reinstalling fully to no avail. I added a repository manually but it doesn't connect to it. I can go to that link in my web browser without any issue. I tried installing the Dart/Flutter plugins from the disk too and it throws a different error

IntelliJ: Launch Run-configuration from the embeded terminal

隐身守侯 提交于 2019-12-25 05:28:15
问题 Lets say I have run-config1 and run-config2 setup for my project in IntelliJ. I know there are ways of adding custom shell code to be perfomed before/after a build run, but that's not what I want to do. Is there a way of calling them from the embedded terminal? 回答1: As of IntelliJ IDEA 14 there is no such way. You can write a plugin for IntelliJ IDEA that will handle a command like "idea.sh run configuration-name" and start the run configuration in the existing instance, but this is fairly

Synchronize virtual file to the physical file in the Intellij IDEA plugin

前提是你 提交于 2019-12-23 09:46:58
问题 I'm implementing the plugin for Intellij IDEA that needs file to be saved before executing action. Action is shell command, it requires file name to be passed as the command-line parameter. AFAIK Idea saves (synchronizes) files on frame deactivation, so if I right-click on the file, and click on my action - old version of file will be used. If I go to other window, return to Idea and click my action - current version of the file will be used. I've read this doc about Virtual File System, and

Symbols resolution in standalone IntelliJ parser

此生再无相见时 提交于 2019-12-23 09:42:31
问题 I'm trying to use IntelliJ SDK as standalone java parser and it works fine in most cases, but failing to resolve return type of generic methods. When I debugging resolveMethod for verify(mock).simpleMethod() in next sample inside of IntelliJ: public class ResolutionTest { private interface IMethods { String simpleMethod(); } private IMethods mock; public static <T> T verify(T m) { return m; } public void test() { verify(mock).simpleMethod(); } } I see return type of verify(mock) as IMethods

Intellij Python does not import from .pydevproject

社会主义新天地 提交于 2019-12-23 06:45:10
问题 PyDev eclipse plugin creates two files a .project file and a .pydevproject file. The .pydevproject file contains all library references. Basically I list all my dependencies as .... <path>\\basedir\nose\1.1.2-py27\lib</path> <path>\\basedir\jenkinsapi\0.1.9\lib\jenkinsapi-0.1.9-py2.7.egg</path> .... Unfortunately Intellij won't import these libraries from .pydevproject. Question: How can I force this? I have the dependencies as based strings and I can hand type them for IntelliJ but which

Intellij Python does not import from .pydevproject

我只是一个虾纸丫 提交于 2019-12-23 06:45:09
问题 PyDev eclipse plugin creates two files a .project file and a .pydevproject file. The .pydevproject file contains all library references. Basically I list all my dependencies as .... <path>\\basedir\nose\1.1.2-py27\lib</path> <path>\\basedir\jenkinsapi\0.1.9\lib\jenkinsapi-0.1.9-py2.7.egg</path> .... Unfortunately Intellij won't import these libraries from .pydevproject. Question: How can I force this? I have the dependencies as based strings and I can hand type them for IntelliJ but which

Re-write Parsing Expression Grammar (PEG) without left recursion

≡放荡痞女 提交于 2019-12-22 09:33:30
问题 Using https://github.com/JetBrains/Grammar-Kit how to rewrite grammar without left recursion? grammar ::= exprs exprs::= (sum_expr (';')?)* private sum_expr::= sum_expr_infix | sum_expr_prefix sum_expr_infix ::= number sum_expr_prefix left sum_expr_prefix::= op_plus number private op_plus ::= '+' number ::= float | integer float ::= digit+ '.' digit* integer ::= digit+ private digit ::=('0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9') Sample input: 10+20+30.0; 10+20+30.0 Answer shall maintain parse