Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I would like to start working on my own custom IDE. The biggest reason I want to work on the IDE is to help me gain an even greater, more intimate understanding of java (and other languages I add into it.)

I don't want to do anything super fancy or revolutionary, I'd be happy if I could create something as compact as the BlueJ IDE I used in high school and be content.

I have a few question on the specifics of the task that I hope I can get cleared up before I start investing time in this:

  • Is there anything I should be aware of when writing the parser?
  • Does anyone have any pointers that I should be aware of; pitfalls, brick walls or other constraints?
share|improve this question

migrated from stackoverflow.com Jun 29 '11 at 0:14

3 Answers

up vote 6 down vote accepted

First of all, I have not written an IDE, because I have found that Eclipse and IntelliJ IDEA serve my needs for the Java projects I have worked on thusfar.

Instead of creating a new IDE from scratch, why not contribute to an existing open-source IDE project, such as Eclipse or BlueJ? Writing your own IDE may give you experience writing Java, but will more than likely just give you experience writing an IDE. Your time could be better spent improving upon an existing IDE and building on the experience of others.

Check out the BlueJ bug database and see what you think. http://bugs.bluej.org/trac/bluej/

I hope that helps, best of luck!

share|improve this answer
1  
Please don't add signatures to your posts. See the faq for more information. Thanks! :) – Anna Lear Jun 29 '11 at 3:59
@Anna Thanks for pointing that out, my apologies. I'm new here! – Robert Dyson Jun 29 '11 at 4:06
Your absolutely right, I really should help some open source projects. The only reason I haven't tried to do so is my severe lack of a) organization and b) lack of group and mainstream production expirience. I fear I would be more of a hinderance to others than a benefit; that being to sole reason I wanted to work on my own project. That way I would know whats going on and maybe get my self to the level that I would be useful to others. – AedonEtLIRA Jun 29 '11 at 14:55
Find a well-organized open source project and jump in. Look through their bug/feature/wish list and see if there is something small you can do. Even something like fixing typos in documentation will help you get used to downloading the source, making changes, testing them, and submitting your work to the VCS. – Barry Brown Jun 29 '11 at 19:27
Thanks for you advice. That sounds like a good idea. I will have to see what I can do then. – AedonEtLIRA Jun 29 '11 at 22:59

There are tons of great editors out there, complete with parsers, code completion, and syntax coloring. Although the editor is the "face" of the IDE, it's not where the action is. The real strength of any IDE is not what you see; it's what it hides from you. I would not start your project by writing the editor.

Instead, focus on the build system. That is, what happens between the time you press the "run" button and when your Java app starts? Roughly, your IDE needs to do the following:

  1. Set the CLASSPATH variable so JAR files can be located.
  2. Compile all .java files in the project.
  3. Locate the file with the main() method. If there's more than one, query the user. Or something else?
  4. Launch the .class file that contains main(), providing a console for textual I/O.

Since this is a Java IDE, you will have to make a critical decision up front:

Will you compile the source files by calling javac on the command line and launch the app by calling java?

-or-

Will you compile the source files by invoking javax.tools.JavaCompiler.CompilationTask on each file and then spawning a new Thread to run the .class file that contains main()?

One of these approaches will get you up and running quickly and has the advantage of allowing your IDE to work with other languages as well. The other will get you very intimate with Java internals, but will tie your IDE to the Java ecosystem.

share|improve this answer
I see thank you for your critical insight. I didn't even think about those two desicions – AedonEtLIRA Jun 29 '11 at 14:51

There are so many good IDEs are available, Still if you want to write your own IDE, you can use EMF, Eclipse framework to write own IDE.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.