New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launching IntelliJ to use plugin from the command line #58

ericzundel opened this Issue Oct 9, 2015 · 2 comments


None yet
2 participants
Copy link

ericzundel commented Oct 9, 2015

It would be easy for users if there was a shortcut to get their project(s) configured in the plugin. I'm thinking of an interface where users could easily create a project from the command line.

./pants idea-plugin foo:: bar:: baz::

This is the way 'idea' works today, but we want the features of the plugin. Maybe the idea-plugin task could write out some kind of config to a file somewhere that the plugin could detect when IntelliJ is launched?


This comment has been minimized.

Copy link

wisechengyi commented Apr 11, 2016

What would be a good goal name for this? plugin, idea-plugin, init-idea-plugin? Open to options of better names.

cc @stuhood @peiyuwang @baroquebobcat @ericzundel @benjyw @patricklaw

wisechengyi added a commit to pantsbuild/pants that referenced this issue May 9, 2016

Introduce `idea-plugin` goal to invoke intellij pants plugin via CLI
This change enables calling intellij pants plugin from cli to import the targets/directories specified. pantsbuild/intellij-pants-plugin#58

Similar to `idea` goal, `idea-plugin` goal makes a skeleton `ipr` project file, and in addition fill in the workspace `iws` file with target specs and project path, so the plugin will know how to continue to import the project as if the user is doing so.

Only dep is bootstrap.
[tw-mbp-yic pants (from_cli)]$ ./pants --explain idea-plugin
Goal Execution Order:

bootstrap -> idea-plugin

Goal [TaskRegistrar->Task] Order:

bootstrap [jar-dependency-management->JarDependencyManagementSetup_bootstrap_jar_dependency_management, bootstrap-jvm-tools->BootstrapJvmTools_bootstrap_bootstrap_jvm_tools]
idea-plugin [idea-plugin->PluginGen_idea_plugin]

`./pants idea-plugin --no-open examples/src/python/example/hello/main/ examples/tests/java/org/pantsbuild/example/hello/greet/` will generate a `iws` file containing targets and project path. (only one project path because that's the directory intellij is going to zoom into):
<?xml version="1.0"?>
<project version="4">
  <component name="PropertiesComponent">
    <property name="targets" value="['/Users/yic/workspace/pants/examples/src/python/example/hello/main/', '/Users/yic/workspace/pants/examples/tests/java/org/pantsbuild/example/hello/greet/']" />
    <property name="project_path" value="/Users/yic/workspace/pants/examples/src/python/example/hello/main/" />

Other change:
set default java language level to 8 for IdeGen

Testing Done:

Bugs closed: 3187

Reviewed at

This comment has been minimized.

Copy link

wisechengyi commented Aug 17, 2016

idea-plugin has been live since 1.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment