How to put IntelliJ/Pycharm settings under version control? - intellij-idea

I'm a frequent user of PyCharm and a number of the other JetBrains IDEs. I try to keep my settings synchronized across the different IDEs, but I'm now considering moving to IntelliJ IDEA and am finding it extremely difficult to figure out what I've changed and what the differences are among my different settings files.
How can I put my PyCharm settings files under version control so that I can track my changes and also quickly revert back to old versions so I can try out new settings changes without fear?
(I don't mind exporting to a specific repo each time, but it seems that the settings always export as JAR files, which don't lend themselves to VCS.)

I am using the Settings Repository plugin to syncronize settings between PyCharm and PhpStorm and it is working very well. It is actually designed with version control and team sharing in mind, see project repo on github and have built in support for conflict resolution, merge and overwriting remote or local.
It does also support file system and, from what I can tell, what then is stored is the mirror version of the git repository.

PyCharm (at least the Linux 4.X and 5.0 Pro versions) places its config files in a .idea dir under the project dir:
$ find .idea/
.idea/
.idea/libraries
.idea/libraries/Google_App_Engine_SDK.xml
.idea/libraries/Generated_files.xml
.idea/apartsw.iml
.idea/misc.xml
.idea/modules.xml
.idea/runConfigurations
.idea/runConfigurations/apartsw.xml
.idea/encodings.xml
.idea/vcs.xml
.idea/inspectionProfiles
.idea/inspectionProfiles/MyProject.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/watcherTasks.xml
.idea/webResources.xml
.idea/workspace.xml
.idea/scopes
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/dictionaries/username.xml
I added the entire dir with the exception of .idea/workspace.xml into the project's git repo, following JetBrains' PyCharm-specific and/or generic .idea-based Tools recommendations.

Related

IDEA sharing settings

I want to share exported settings from webstorm to other IDEA-s for example pycharm etc... Is exported settings compatible with other IDEA-a, so that for example I import webstorm settings to pycharm and then modify some settings in pycharm and again import exported settings from pycharm to webstorm. Would this action be safe so nothing would be corrupted?
I do not think you would corrupt any settings. However, some settings may get dropped. For example, if there is a setting that is available in WebStorm, but not PyCharm, PyCharm may "drop" that setting. When you go to import back into WebStorm, that setting would be lost.
The reason I say that is that ultimately the settings export/import are copies of the XML configuration files in IDEA's config directory. (See Directories used by the IDE to store settings, caches, plugins and logs for information on its location. The path should be similar for WebStorm and PyCharm.) When PyCharm imports the settings, it is just replacing the various setting XML Files. But then when PyCharm runs, upon loading and re-saving the settings file, it may drop elements that are not applicable. (My suspicion, is that it would not, but you'd have to test to be sure.)
Another option from using the settings import/export would be to just do a diff between the two config directories using a good diff tool like Beyond Compare.
This is an unusual activity, so there's probably not many people that have actually done (or tried) this. As such, unless someone from the JetBrains development team comes on to definitively say one way or the other, I think your best bet is to just try and see. Of course, backup your settings before doing an import from the other tool :)

Facing problems in Clearcase 8 plugin for Eclipse Luna for config spec update

I have been using Eclipse Helios/Luna with plugin installation of clearcase plugin 8.0.1.x version and have imported the base code.
Recently, when trying to change the config-spec to update the build files, the process is running for hours continuously even without a single file.
Previously, we had Clearcase version as 7.0.x version and the corresponding plugin installed on Eclipse Helios without facing any issues.
But, have been facing issues during update of files after the upgrade of clearcase server to 8.0.x and with the corresponding client plugin in eclipse.
Also, tried manual update from repository for the whole folder. Still no luck.
But, if I know manually update the file one by one individually, it is going fine.
As the number of files in the project is more, it would not be efficient for us.
Can someone provide some alternatives to resolve this problem?
As a workaround, we have been creating new views everytime there is an update to the config-spec.
One workaround would be to switch to dynamic views, supported in the latest 8.x version of ClearTeam/ClearCase. No reload needed with those kind of views.
The other would be to test with a minimal config spec, and load rules making sure you are loading only as few files as possible (jsut to check that those files do update when you change the config spec).
It can also depends on the exact version of your ClearCase installation.
There are some patches for hanging issue (like "PM48668 Problem: The IBM Rational ClearTeam Explorer may hang intermittently when many views are started.")

automate setup of IBM RAD and Websphere

In a project we a forced to use IBM RAD and Webspher Application Server (6.1).
Setting up the development environment is currently described in about 10 pages of wiki documentation and takes about a day if you don't do any mistake. The main parts are:
Installing the IBM Installer;
Use it to install RAD
Install a patch to the Installer;
use it to install half a dozen patches to RAD
create a network drive pointing to ...
checkout project source to ...
install WAS
configure the a WAS instance with two jdbc drivers, 6 datasources, a queue ...
I think you get the idea
I'd like to automate that process (or at lest 95% of it) to something like.
start script x.
On prompt enter a directory with at least yGB of memory available.
Get yourself a cup of coffee
start working.
What are the proper tools to get this working? Should I use something like puppet and chef? Or is that overkill and I can just zip the installation directory and change 2 registry entries?
Has anybody experience with this? Any pointers to get started?
You can script the configuration of WAS using wsadmin:
http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Fwelc6topscripting.html
It is some effort to learn how to do so but in the end it saves a lot of time. You need to use Jython or Jacl to do so.
WAS profiles can be created headless with a response file. Use manageprofiles.bat in bin directory of WAS to do so.
Regarding RAD installation you can install the IBM Installation Manager version you need to install the patches right away and then install everything in one shot. Add the fixes you need as Repositiories right from the beginning. The fixes will be installed instead of the old versions in this case. You should have the base images and all fixes on the local disk to do so.
The installation of RAD itself can also run in headless mode but I don't have any experience in doing this.
The configuration of the RAD workspace is the next thing you want to automate. This is not so simple to do. The simplest thing you can do is to export the workspace preferences of a workspace that contains all settings to an eclipse preference file (.epf). File -> Export
This is not a complete solution but may help you a bit. Be sure to keep all settings in just one file and import that into a fresh workspace.
Use Notepad++ TextFX plugin to sort the settings in the epf file. You can then figure out which settings you need just by looking at them.
More control over the workspace settings and automated conifiguration requires accessing eclipse internal APIs and some coding.
Regarding the the project sources it depends on the SCM you are using.

Distributing Eclipse plugin with dependencies

I recently wrote an Eclipse plugin, and I'm trying to get some coworkers to install it for testing.
As far as I can tell, dropping the .jar into the dropins folder in Eclipse is supposed to install it, but it seems to not be working on any installation of Eclipse but the one I developed on. This seems to be a problem with the dependencies not being installed.
I thought that the dropins folder was supposed to automatically calculate and install dependencies, but perhaps I'm wrong. If so, how can I distribute it without having everybody install each dependency separately?
I'd recommend against using the dropins folder. It is unreliable as you have seen. Instead, I'd recommend that you export your plugin as an update site.
So:
Create a feature for your plugin. This is a lot simpler than it sounds. See Lars Vogel's tutorial: http://www.vogella.de/articles/EclipseFeatureProject/article.html
File -> Export... -> Deployable Features.
In the options, section, select "Package as individual jar files..." (see screenshot)
Tweak other things as required
Finish
Now, you have an update site that you can zip up, or put on a web server somewhere. Your colleagues can add that update site just like any other. To install, make sure that they also have all of the dependencies available from other update sites and that they have "Contact all update sites..." checked.
The nice thing about this is that if you place your plugins on a web server somewhere, and you replace it with a new versions, people will be able to update transparently.

How do you distribute the IDE and it's configuration within your Team?

I'm wondering how Software Development Team distribute their Standard IDE(s)?
E.g. developing with Eclipse, custom Code formatter, svn Resository, Copyright Header..
At the moment my Team has a standard zip File which is then distributed withhin the developers.
Problem:
If one file, a Plugin or the IDE itself changes, e.g. new Coding Guidlines, Upgrade Eclipse 3.5.1 the whole distribution has to be done again. Every developer needs to unzip the bundel again. Imagine your working with different Workspaces (Jetty, different Tomcamt Versions, WTP) due to Project History That doesn't scale
I know that there are some related Articels
A new version of Eclipse just came out. Is there anything I can do to avoid having to manually hunt down my plugins again?
Manage Your Eclipse Install With A Local Git Repository
And some comercial Programs.
Eclipse also has a new Update-Installer Approach
But I don't see the Killer App. How do your team solve this? Is there a best practice?
I guess best would be a Program letting you choose your current Project and then downloads the configured IDE from the Server and leting you know if Project Config Files are Updated
For eclipse look at Buckminster it targets exactly your target I suppose, didn't use it personally through.
At my previous company they wrote a custom update agent that pulled from a centrally configured server which was updated by the team leaders. It worked well, until people wanted to install their own plugins.
Basically, a developer wanted a plugin, fought in futility to get it included in the default (managed) repo, installed it himself, then updates broke on his machine when the team lead had a sudden stroke of common sense and included it.
They never did come up with a 'good' way to manage it. But, at least they didn't put us all on terminal servers with thin clients.