Giter Site home page Giter Site logo

turbanoff / runconfigurationasaction Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 3.0 34 KB

Provides a way to use IntelliJ run configurations as buttons

Java 100.00%
intellij plugin intellij-plugin intellijidea intellij-platform executor phpstorm rider pycharm webstorm

runconfigurationasaction's Introduction

Run Configuration as Action plugin

Plugins for Jetbrains IDEs. It's provides a way to use run configurations as buttons on toolbar. Or assign shortcuts to execute specific run configuration.

Plugin is compatible with all major IDEs based on IntelliJ Platform starting from version 2021.1:

  • IntelliJ IDEA
  • Android Studio
  • PhpStorm
  • PyCharm
  • RubyMine
  • CLion
  • WebStorm
  • AppCode
  • Rider
  • GoLand

Repository link

https://plugins.jetbrains.com/idea/plugin/9448-run-configuration-as-action

Configuration

To use plugin after installation you should tweak IDE settings.

To add an icon too toolbar go to:
  1. File > Settings > Appearance & Behavior > Menus and Toolbars
  2. Choose a toolbar to add a button: Main Toolbar or Navigation Bar Toolbar
  3. Click 'Add after' button and choose action in the tree: All actions > Plug-ins > Run Configurations as Action

plugin_actions_in_customize_toolbars

To assign shortcut go to:

File > Settings > Keymap > Plug-ins > Run Configuration As Action plugin_actions_in_keymap

Generate custom icons

By default, the plugin uses not user-friendly icons. Of course, you can always create an icon by yourself. But developers are lazy (I know). Plugin can help with generating custom icons.

Tools > Create Icon with text

create_custom_icon_with_text

runconfigurationasaction's People

Contributors

turbanoff 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

Watchers

 avatar  avatar

Forkers

jimkohl hnjm jglanz

runconfigurationasaction's Issues

The configuration is not triggered by shortcut if it is already assigned to another action

Hello.
Is it possible to improve the functionality?
I need to run the custom configuration when the debug is enabled by Alt+D.
In this case, the shortcut is assigned to the default action to Start Listening for PHP Xdebug Configuration + a custom configuration, but the custom configuration is not triggered (ignored).

PhpStorm 2023.2.1
Build #PS-232.9559.64, built on August 25, 2023
Runtime version: 17.0.8+7-b1000.8 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.2.0-26-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 5120M
Cores: 12
Registry:
    editor.focus.mode.color.light=5b595c
    ide.editor.tab.selection.animation=true
    ide.main.menu.expand.horizontal=false
    run.processes.with.pty=TRUE
    ide.new.editor.tabs.vertical.borders=true
    ide.experimental.ui=true
    ide.balloon.shadow.size=0
    editor.focus.mode.color.dark=5b595c

Non-Bundled Plugins:
    net.sjrx.intellij.plugins.systemdunitfiles (223.230322.126)
    de.femtopedia.diffplugin (2.1.11)
    intellij-awk (0.4.1)
    com.nasller.CodeGlancePro (1.7.4)
    org.toml.lang (232.8660.88)
    com.ultrahob.zerolength.plugin (0.95)
    org.elasticsearch4idea (2023.2.7-232)
    org.turbanov.run.configuration.as.action (1.5.1)
    com.intellij.properties (232.8660.88)
    String Manipulation (9.11.3)
    ir.msdehghan.plugins.ansible (0.92)
    de.achimonline.ansible_lint (1.5.4)
    indent-rainbow.indent-rainbow (2.2.0)
    com.intellij.grazie.pro (0.3.244)
    ru.adelf.idea.dotenv (2023.2)
    de.espend.idea.php.annotation (9.4.0)
    com.kalessil.phpStorm.phpInspectionsUltimate-mp (2023.1)
    com.intellij.ml.llm (232.9613)
    com.virtuslab.git-machete (4.0.3)
    izhangzhihao.rainbow.brackets (2023.3.4)
    pro.bashsupport (3.3.0.232)
    lv.midiana.misc.phpstorm-plugins.deep-keys (2022.08.03.001)
    fr.adrienbrault.idea.symfony2plugin (2022.1.255)
    com.chrisrm.idea.MaterialThemeUI (8.11.0)
    com.intellij.lang.jsgraphql (4.0.2)
    com.magento.idea.magento2plugin (5.1.1)
    org.sonarlint.idea (8.5.1.75093)
    com.mallowigi (93.0.1)
    zielu.gittoolbox (500.0.15+222)
    mobi.hsz.idea.gitignore (4.5.1)
    com.github.blarc.gitlab-template-lint-plugin (1.13.2)

Current Desktop: ubuntu:GNOME

Run Configuration - Macro Variable not working

Hey,

really nice plugin!

But one litte thing. I've created a run configration with the following argument:
--standard=PSR12 $FilePathRelativeToProjectRoot$

The keyboard shortcut works but then the macro/variable has always the value from the last run triggered outside your plugin.

Would be nice if you can fix this.

Regards
Marcus

Configurations cannot be run in CLion

In the CLion along with the current "Run Configuration" there is also some kind of state called CMake context (Debug, Release, etc.) Users select it as checkbox in the "Run Configurations" popup. This checkbox is visible when current run configuration is of type C/C++ application and is invisible if any other configuration is selected.

The issue is that if the current configuration is of type CMake and (so CMake context is chosen) - it is impossible to run a regular (non-CMake) configuration as action of this plugin. IDE logs an error Cannot run 'CONF_NAME' on 'Debug'. 'Debug' is a name of chosen CMake context.

And vice versa: if a regular (non-CMake) configuration is selected (so CMake context is reset and hidden), it is only possible to run any regular configurations, but not CMake one. Error in this case is Cannot run 'CONF_NAME on '<default>'

So to make this cool and helpful plugin to work properly on CLion, it have somehow RESET CMake context before run any regular configuration and SET CMake context (to previously selected or first) when user wants to run CMake configuration.

Action disappears from menu

I see that this issue tracker is not used very often since this is first post here but let this be the first issue then.

AND I do understand that this issue is probably something that can not be fixed in the plugin side but if someone has general other solution that would be fine as well!

I run several "configurations" and have assigned shortcut key to one of them with this plugin. When I run other configurations (like run Junit tests from several file) IntelliJ Idea keeps adding those to the top of the list and removes the "old" ones. And by old I mean stuff that I use daily. And for some reason IntelliJ Idea keeps adding some other unnecessary things to the list that I have never even called (like "Cover xxxxxx" or "Profile xxxxxx" or "Debug xxxxxx"). And finally the configuration that I have added the shortcut key for disappears from the list and the shortcut stops working. BUT if I run that same configuration manually then the Configuration AND the shortcut for it appears again to the list and I can use it again!

Very annoying and, as I said, this may be IntelliJ Idea specific but maybe there is an answer here?

Custom order

Would it be possible to implement custom order of actions?
image

Such option would make this plugin super cool.

Support Compound configuration

Very nice plugin!

In IntelliJ IDEA 2023.1.1 I tried to use a Compound configuration. I have many run configuration in one project, and by having e.g. Action1 as an alias to the run configuration I am working with would be nice. Is it possible to implement?

image

image

AlreadyDisposedException on project close

com.intellij.serviceContainer.AlreadyDisposedException: Cannot create com.intellij.execution.ExecutionTargetManager because container is already disposed: Project(name=intellij-community, containerState=DISPOSE_COMPLETED, componentStore=F:\Projects\intellij-community) (disposed)
	at com.intellij.serviceContainer.ComponentManagerImpl.throwContainerIsAlreadyDisposed(ComponentManagerImpl.kt:522)
	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:498)
	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
	at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:26)
	at com.intellij.execution.ExecutionTargetManager.getInstance(ExecutionTargetManager.java:22)
	at org.turbanov.actions.Bootstrap.getTargets(Bootstrap.java:164)
	at org.turbanov.actions.Bootstrap.removeForAllExecutorsImpl(Bootstrap.java:129)
	at org.turbanov.actions.Bootstrap.lambda$removeForAllExecutors$0(Bootstrap.java:123)
	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)

Looks like we should just remember all generated actions for each project.

Exception in plugin on every project load in CLion

Whenever I open a project in CLion, I get an "Exception in plugin Run Configuration as Action (1.4.3) with the following stacktrace.

com.intellij.serviceContainer.AlreadyDisposedException: Cannot create com.jetbrains.cidr.cpp.cmake.workspace.CMakeWorkspace because container is already disposed: Project(name=readeasyi, containerState=DISPOSE_COMPLETED, componentStore=/home/sed/Development/readeasyi) (disposed)
	at com.intellij.serviceContainer.ComponentManagerImpl.throwContainerIsAlreadyDisposed(ComponentManagerImpl.kt:522)
	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:498)
	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
	at com.jetbrains.cidr.cpp.cmake.workspace.CMakeWorkspace.getInstance(CMakeWorkspace.java:211)
	at com.jetbrains.cidr.cpp.execution.CMakeBuildConfigurationHelper.getTargets(CMakeBuildConfigurationHelper.java:99)
	at com.jetbrains.cidr.execution.CidrBuildConfigurationHelper.findTarget(CidrBuildConfigurationHelper.java:64)
	at com.jetbrains.cidr.cpp.execution.CMakeAppRunConfiguration.getCMakeTarget(CMakeAppRunConfiguration.java:98)
	at com.jetbrains.cidr.cpp.execution.CMakeAppRunConfiguration.getBuildProfiles(CMakeAppRunConfiguration.java:103)
	at com.jetbrains.cidr.cpp.execution.CMakeExecutionTargetProvider$getTargets$$inlined$runReadAction$1.compute(actions.kt:61)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:834)
	at com.jetbrains.cidr.cpp.execution.CMakeExecutionTargetProvider.getTargets(CMakeExecutionTargetProvider.kt:42)
	at com.intellij.execution.ExecutionTargetManagerImpl.lambda$getTargetsFor$1(ExecutionTargetManagerImpl.java:238)
	at com.intellij.execution.ExecutionTargetManagerImpl.doWithEachNonCompoundWithSpecifiedTarget(ExecutionTargetManagerImpl.java:278)
	at com.intellij.execution.ExecutionTargetManagerImpl.getTargetsFor(ExecutionTargetManagerImpl.java:236)
	at org.turbanov.actions.Bootstrap.getTargets(Bootstrap.java:164)
	at org.turbanov.actions.Bootstrap.removeForAllExecutorsImpl(Bootstrap.java:129)
	at org.turbanov.actions.Bootstrap.lambda$removeForAllExecutors$0(Bootstrap.java:123)
	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)

The Reporting window says I shall report this to you, so here I am.

Error when trying to configure Angular project in IntelliJ 2021.1 RC

I've downloaded the project from this URL:

https://github.com/Baeldung/spring-security-oauth

When I started the IDE it found that it has angular and offered to configure the project. Then I got this error.

com.intellij.diagnostic.PluginException: ID "RunConfigurationAsAction_Run_Angular Application (resources)_default_target" is already taken by action "Run 'Angular Application (resources)' (null)" (Plugin: Run Configuration as Action). Action "Run 'Angular Application (resources)' (null)" (Plugin: Run Configuration as Action) cannot use the same ID [Plugin: org.turbanov.run.configuration.as.action]
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionError(ActionManagerImpl.java:389)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionError(ActionManagerImpl.java:384)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerChameleon(ActionManagerImpl.java:1308)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.addToMap(ActionManagerImpl.java:1278)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerAction(ActionManagerImpl.java:1247)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerAction(ActionManagerImpl.java:1239)
at org.turbanov.actions.Bootstrap.registerAction(Bootstrap.java:63)
at org.turbanov.actions.Bootstrap.registerForAllExecutors(Bootstrap.java:146)
at org.turbanov.actions.Bootstrap.access$000(Bootstrap.java:38)
at org.turbanov.actions.Bootstrap$1.runConfigurationAdded(Bootstrap.java:173)
at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:674)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:649)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:422)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:397)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:379)
at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:33)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:185)
at com.sun.proxy.$Proxy73.runConfigurationAdded(Unknown Source)
at com.intellij.execution.impl.RunManagerImpl.doAddConfiguration(RunManagerImpl.kt:445)
at com.intellij.execution.impl.RunManagerImpl.addConfiguration(RunManagerImpl.kt:405)
at com.intellij.javascript.JSRunConfigurationBuilderBase.createRunConfiguration(JSRunConfigurationBuilderBase.java:68)
at org.angular2.cli.AngularCliUtil.lambda$createIfNoSimilar$6(AngularCliUtil.java:171)
at com.intellij.util.ObjectUtils.notNull(ObjectUtils.java:136)
at org.angular2.cli.AngularCliUtil.lambda$createIfNoSimilar$7(AngularCliUtil.java:169)
at com.intellij.util.ObjectUtils.doIfNotNull(ObjectUtils.java:151)
at org.angular2.cli.AngularCliUtil.createIfNoSimilar(AngularCliUtil.java:167)
at org.angular2.cli.AngularCliUtil.createJSDebugConfiguration(AngularCliUtil.java:127)
at org.angular2.cli.AngularCliUtil.lambda$createRunConfigurations$0(AngularCliUtil.java:112)
at com.intellij.openapi.project.DumbService.lambda$runReadActionInSmartMode$1(DumbService.java:149)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:848)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:142)
at org.angular2.cli.AngularCliUtil.lambda$createRunConfigurations$1(AngularCliUtil.java:94)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:265)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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)

Action that builds a specific configuration

Hello! I installed this plugin and I now have new actions to Run, Debug, or Profile each of my configurations. However, there is no action to Build a configuration. Can we include a Build action please?

Custom toolbar action needs 'Edit icon' again and again to display it's icon properly

I use a plugin: Run configuration as Action
I created a custom action wich is displayed on the main toolbar after the folder 'Toolbar run action'.
The custom action's goal to run one of my project gradle task. When I added the action I selected an icon file.
After the creation Idea displays the icon correctly but when I restart it it does not displays the given icon but some kind of placeholder. My attachment shows this case.
If I refresh the icon by using 'Customize Menus and Toolbars...' and 'Edit icon' Idea displays the toolbar action correctly again until the next restart.

There has been such Idea version where restart did not imply the need for the procedure written above. Unfortunately I did not remember which was it.

I reported this issue to JetBrains. They think that the problem is with the plugin.

IU-193.6494.35, JRE 11.0.5+10-b520.38x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1080

Thank you in advance,
Gábor Tóth

cannot find runner

Hey there, plugin not working for me with webstorm and npm run commands
thanks!

grafik

grafik
grafik
grafik
grafik

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.