Using editor module separate from IntelliJ, building community edition

I have 2 questions.

First, I am interested in using the editor module(s) within my own application as a replacement for Swing's low-level document classes. I am currently using NetBeans code for this, but since I love IntelliJ and IntelliJ recently became open source, I am considering replacing our usage of NetBeans source code with IntelliJ. Has anyone done this? Is the source code intended for reuse in this way? If so, any documents explaining how the code is architected would be very useful.

Second, I was trying to build the IntelliJ community edition source code so that I could experiment with using the editor code. I have followed the directions on

http://www.jetbrains.org/pages/viewpage.action?pageId=983225

but I can't get the source code to build. These are the problems I am encountering:

1) Syntactically incorrect code in java-tests cause compilation errors. I removed that folder.
2) Removed plugins folder because of compilation errors.
3) Missing some libraries (like logger). I added all the libraries I could find to the project.
4) Out of memory errors. I increased heap size.
5) Circular dependencies. I can compile some individual modules, but not all of them. If I try to make the whole project, I get compilation errors related to the test framework classes.

Can anyone give me advice on how to get the source code to build? I was using an older (licensed) version of IntelliJ, but I tried downloading the Community Edition just in case that would help... it didn't.

What I'd really like is just the pre-compiled jars that I could put on my classpath while playing around with the the editor source code.

Thanks!

Christina Roberts

8 comments
Comment actions Permalink

I can't help about the embedded editor question, although it interests me, too.

As for the build problems, we'll need more details to be exactly helpful, but here are some general observations.

If you are seeing any syntatic problems, it's likely that you are using an incorrect JDK to build IdeaIC. As they state, Java6 is the way to go.

As for the rest of the items, might I suggest you try building using the build.xml and Ant 1.7.1. If you are able to build IdeaIC using ant and java6, then you can be confident that your Git clone is intact and proceed to diagnose your IDE woes from that point.

  HTH,
  -- /v\atthew

0
Comment actions Permalink

Hello Christina,

I have 2 questions.

First, I am interested in using the editor module(s) within my own
application as a replacement for Swing's low-level document classes. I
am currently using NetBeans code for this, but since I love IntelliJ
and IntelliJ recently became open source, I am considering replacing
our usage of NetBeans source code with IntelliJ. Has anyone done this?
Is the source code intended for reuse in this way? If so, any
documents explaining how the code is architected would be very useful.


The editor classes in IDEA are quite tightly coupled to other parts of the
system (action system, document framework, virtual file system) so you would
need to pull quite a large chunk of the code in order to use the editor component.

Second, I was trying to build the IntelliJ community edition source
code so that I could experiment with using the editor code. I have
followed the directions on

http://www.jetbrains.org/pages/viewpage.action?pageId=983225

but I can't get the source code to build. These are the problems I am
encountering:

1) Syntactically incorrect code in java-tests cause compilation
errors. I removed that folder.

2) Removed plugins folder because of compilation errors.

3) Missing some libraries (like logger). I added all the libraries I
could find to the project.

4) Out of memory errors. I increased heap size.

5) Circular dependencies. I can compile some individual modules, but
not all of them. If I try to make the whole project, I get compilation
errors related to the test framework classes.

Can anyone give me advice on how to get the source code to build? I
was using an older (licensed) version of IntelliJ, but I tried
downloading the Community Edition just in case that would help... it
didn't.


Did you actually open the provided project (.idea directory)? What kind of
JDK are you using it with? We're compiling it on our TeamCity server as part
of our continuous integration build, so we're pretty certain that it doesn't
contain any compilation errors.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks for the suggestions!

I was building using 1.6 update 12. I am not familiar with ant, so I was trying to build from within IntelliJ itself, by creating a project pointed at the top level of the download directory ("Open the directory with the source code as a directory-based project"). This does find all the individual modules, though I think that some of these modules (like java-tests) are not intended to be built.

I didn't see an IntelliJ project within the .idea directory, just xml files. Should I be able to find a .ipr file? There are .iml files within the various modules, but I couldn't find an IntelliJ project file.

I am checking out the source code again so I can start from scratch. Please advise as to where I can find the project file. Also, is there is a way to build using ant within IntelliJ itself? The directions about this state "execute build.xml Ant build script in the root directory of the source code".

Thanks!!

Christina

0
Comment actions Permalink

the directory you should "open as project" is the one that contains a ".idea" folder inside it

0
Comment actions Permalink

Ahhh, I think I'm getting closer. I made the mistake of creating a new project before and pointed it to the existing source code....

So now I did "Open Project" instead, selected JDK 1.6 update 12, and added lib\tools.jar to my JDK's classpath (note that I couldn't find a lib\tools.jar in the actual source that I downloaded, so instead I added C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 9.0 Beta\jre\lib\tools.jar).

Now when I do Make Project, I get a compilation error that ClassDescriptor cannot be found. The error is in idea\plugins\groovy\src\org\jetbrains\plugins\groovy\dsl\GroovyClassDescriptor.java. I tried excluding idea\plugins\groovy and idea\plugins\groovy\tests in hopes that this module is fairly isolated, but I keep finding more and more modules that require groovy.

Any ideas?

Thanks for the continued help!

-Christina

0
Comment actions Permalink

Hello Christina,

Please make sure that you have the Groovy plugin enabled in your IDEA installation.
Part of the plugin itself is written in Groovy, and it won't compile if you
don't have the plugin installed and enabled.

Ahhh, I think I'm getting closer. I made the mistake of creating a new
project before and pointed it to the existing source code....

So now I did "Open Project" instead, selected JDK 1.6 update 12, and
added lib\tools.jar to my JDK's classpath (note that I couldn't find a
lib\tools.jar in the actual source that I downloaded, so instead I
added C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 9.0
Beta\jre\lib\tools.jar).

Now when I do Make Project, I get a compilation error that
ClassDescriptor cannot be found. The error is in
idea\plugins\groovy\src\org\jetbrains\plugins\groovy\dsl\GroovyClassDe
scriptor.java. I tried excluding idea\plugins\groovy and
idea\plugins\groovy\tests in hopes that this module is fairly
isolated, but I keep finding more and more modules that require
groovy.

Any ideas?

Thanks for the continued help!

-Christina

---
Original message URL:
http://www.jetbrains.net/devnet/message/5251556#5251556

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

WooHoo! That did it!

I'd recommend that you ammend the directions for building IntelliJ to include the following:

1) Select "Open Project" and point to the directory which contains the .idea folder.
2) lib/tools.jar lives in the jre directory of the IntelliJ installation, not in the directories containing the source code.
3) Enable the groovy plug-in.

Thanks for all the help! Now I can start exploring the code.

-Christina

0
Comment actions Permalink

Hey Christina can you post a step by step starting with the assumption that the community source is downloaded on the would-be builder's machine? I have never suceeded in getting it to build from within the IDE. I laways have to do it from the command prompt.

0

Please sign in to leave a comment.