Is it possible for a plugin to change project settings programmatically?

I'm developing a plugin to extend the built-in support for ExtJS.  Is it possible for my plugin to automatically add ExtJS as a JavaScript library if the user has not already done so?  Where can I find documentation on how to access and modify settings programmatically?

Comment actions Permalink

Yes, it is possible. There is no documentation on "how to change settings" in general because each piece of settings is a completely independent API.

You can use JSLibraryManager.getInstance(project).createLibrary() to create a library and .associateWithProject() to associate it with a project. There is no documenation for this API but there is some code that you can use as an example of using this API at

Comment actions Permalink

Following up on a similar issue,  how can I change the default junit run config via any API? 

Especially I want to add this line: <option name="Make" enabled="false" /> within <method>


  <component name="RunManager">

    <configuration default="true" type="JUnit" factoryName="JUnit">

      <module name="" />

      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />

      <option name="ALTERNATIVE_JRE_PATH" />

      <option name="PACKAGE_NAME" />

      <option name="MAIN_CLASS_NAME" />

      <option name="METHOD_NAME" />

      <option name="TEST_OBJECT" value="class" />

      <option name="VM_PARAMETERS" value="-ea" />

      <option name="PARAMETERS" />

      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../../../../../../../../../.." />

      <option name="ENV_VARIABLES" />

      <option name="PASS_PARENT_ENVS" value="true" />

      <option name="TEST_SEARCH_SCOPE">

        <value defaultName="singleModule" />


      <envs />

      <patterns />

      <method />







Please sign in to leave a comment.