Differences between revisions 1 and 2
Revision 1 as of 2013-09-12 07:10:22
Size: 1662
Editor: SvenDehmlow
Comment: init
Revision 2 as of 2013-09-12 07:44:41
Size: 2724
Editor: SvenDehmlow
Comment:
Deletions are marked like this. Additions are marked like this.
Line 60: Line 60:
Choose:
 1. Import Project
 1. Import project from external model --> Eclipse
Choose ''Import Project'':

{{attachment:WelcomeToIntellijIdea.png||align="top"}}

Select jython source directory:

{{attachment:SelectFileOrDirectoryToImport.png||align="top"}}

''Import project from external model'' --> ''Eclipse'':

{{attachment:ImportProject.png || align="top" }}

Check ''Link created Intellij IDEA modules to Eclipse project files''. For other fields the defaults should be sufficient.

{{attachment:ImportProject2.png || align="top"}}

''Finish'':

{{attachment:ImportProject3.png || align="top"}}

Drag and drop the ant build.xml from the project window to the ant window. This will make Intellij aware of the ant project.

{{attachment:DragAndDropAnt.png || align="top" }}

== What did we? ==

Speaking in Intellij jargon, we adopted the whole ''Project Structure'' (classpath, source and test directories, libaries) from the Eclipse project files. We could have done this manually, but this way was much easier and less error-prone.

It's a good idea to take a look at the ''Project Structure'' (Shortcut: Strg + Alt + Shift + s) as e.g. the classpath might change with the next update.

Intellij project creation notes

Jython is an ant project. This makes it a bit difficult to import into Intellij IDEA.

Prequisites

Software packages (outside Intellij)

There is a free "Community Edition" of Intellij that might work (I'm only unsure about the Python integration). However as I (sven) use the Ultimate Edition, this tutorial is tested with this edition.

Intellij offers free IDEA licenses for Open Source projects. Perhaps it might be a good idea to apply for them.

Intellij Plugins

  • Ant Support (Bundled)
  • Eclipse Integration (Bundled)
  • hg4idea (Bundled)
  • Python (Custom, i.e. must be installed from Intellij plugin repository)

Of course there are many other useful plugins, but these four are essential for importing Jython into Intellij IDEA.

Steps

Make a clean checkout

   1 hg clone http://bitbucket.org/jython/jython jython

Remove Intellij files from jython

Change into the jython directory:

   1 cd jython

Remove files:

   1 rm -rf .idea/
   2 rm Jython27.iml

Run ant

Run this in the jython source directory (if you made the previous step, you're already there):

   1 ant

Import jython as Eclipse-Project in Intellij IDEA

Start Intellij IDEA. Close the last open project (if there's any), to get to the start screen.

Choose Import Project:

WelcomeToIntellijIdea.png

Select jython source directory:

SelectFileOrDirectoryToImport.png

Import project from external model --> Eclipse:

ImportProject.png

Check Link created Intellij IDEA modules to Eclipse project files. For other fields the defaults should be sufficient.

ImportProject2.png

Finish:

ImportProject3.png

Drag and drop the ant build.xml from the project window to the ant window. This will make Intellij aware of the ant project.

DragAndDropAnt.png

What did we?

Speaking in Intellij jargon, we adopted the whole Project Structure (classpath, source and test directories, libaries) from the Eclipse project files. We could have done this manually, but this way was much easier and less error-prone.

It's a good idea to take a look at the Project Structure (Shortcut: Strg + Alt + Shift + s) as e.g. the classpath might change with the next update.

JythonDeveloperGuide/IntellijNotes (last edited 2013-09-12 08:39:12 by SvenDehmlow)