• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Eclipse as a Java editor

 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I want to use Eclipse as a Java editor only.

I use Ant for my builds and have my own directory structure. Something like this:
\src\com\mycompany\server\myappNo45

I have atleast fifty applications right now. I have to maintain them and create new ones as well.

When I open up files in eclipse (using version 2.1), it creates its own files in my source code directories. Apart from this it also creates class files in the same directory, if not specified elsewhere.

I just want to use it as a java editor without all these files (class files, project files etc) being created.

Danish
[ September 16, 2005: Message edited by: Danish Shaukat ]
 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, in order to get the features like telling you have compile problems cos you're using the wrong method in your utility class xyz you will have to allow eclipse to compile java classes. If you just wanted a syntax highlighter, then just a text editor like vim/textpad/ultraedit.

I'm in much the same position, what I do, is set the default output dir for a given project to be .eclipse, then all the class files etc etc go into the .eclipse folder, and don't annoy me when I run ant build, or leave class files lying around the source tree.
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lewin Chan:
Well, in order to get the features like telling you have compile problems cos you're using the wrong method in your utility class xyz you will have to allow eclipse to compile java classes. If you just wanted a syntax highlighter, then just a text editor like vim/textpad/ultraedit.



Since I use Ant, so I get compiler errors on the console.

I just wanted to use Eclipse for coding purposes. Apart from this once I start coding in Eclipse, who knows I might start exploring other featues... And there is no harm in learning an IDE, even though I use Ant. Coding in Eclipse seems to be the first step.

I think code quality will certainly improve if I use Eclipse instead of Textpad.

Danish
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to have Eclipse you're going to have a .project file. If it's a Java project you'll have a .classpath file. This is the minimum. If you turn off automatic compiling, it won't create the class files and you can still use the Eclipse syntax-highlighting and pre-compiler, although I'm not sure how useful it will be if you never let it compile the source.

I recommend separating the source and build directories and letting Eclipse do it's thing. You can always get ANT to compile to a different location and then ANT and Eclipse won't step on each other's toes.

Failing that I agree with the previous post: look at a text editor with syntax highlighting and not a full-blown IDE like Eclipse. I like TextPad.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Danish Shaukat:

Since I use Ant, so I get compiler errors on the console.



Well, yes - but using the eclipse compiler will get you much faster feedback.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ant and Eclipse are hardly mutually exclusive. Many of my projects can't be fully built (at least without more effort than I want to invest) just by Eclipse itself.

Apparently, your complaint is that you don't want Eclipse building classes inside the source code directory structure.

Eclipse prefers to keep its projects self-contained. Aside from its own internal convenience, it also makes life easier when working with tools such as CVS and the import/export tools (I often take work home in a ZIP file).

Eclipse needs those compiled class files in order to provide the intelligence of the IDE - it's using them as a repository of information about your project, not just as the output of the project. This is different from IntelliJ, which keeps the compiled class info in memory. I'd recommend switching to IntelliJ, if you really can't abide those classfiles.

In Eclipse, you can dispense with the classfiles only by making the project be a non-Java project and thus disabling the Java builder.

Personally, I can't see the benefit in creating the interim classes somewhere else. I only go outside the project when deploying the packaged results. But aside from the extra disk space used and occasional annyoances from having your out-of-line classes be behind the edited copies, where's the harm? If you want to keep the temportay classes out of CVS, just add the project's class output directory to .cvsignore. I do that anyway, since I don't care to waste respository space with multiple generations of files that can be automatically reconstructed anyway.
reply
    Bookmark Topic Watch Topic
  • New Topic