Hiding a file from Eclipse

R

Roedy Green

It is possible to tell Eclipse that I want to examine or edit a piece
of non-working Java code without it trying to compile it?

Or do I need an auxiliary editor to do that I cut and paste from?

I might later change my mind at turn it back on, but for now I don't
want to deal with errors in that code.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
R

Roedy Green

It is possible to tell Eclipse that I want to examine or edit a piece
of non-working Java code without it trying to compile it?

I told the build to ignore it, but the incremental compile is still on
my case about it.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
T

Tim Tyler

Roedy Green said:
I told the build to ignore it, but the incremental compile is still on
my case about it.

Use a "source" directory - and stick it *outside* that directory.
 
D

Dale King

Tim said:
Use a "source" directory - and stick it *outside* that directory.

Or keep it in the source directory and set an exclusion filter to
exclude it.

I have a slight variation on that problem that I don't know how to
solve. I have some source files that are used in unit testing that I
don't want compiled, but I do want the actual source file to be
considered a "resource" so that source file gets put in the output
folder and in a jar.
 
T

Tim Tyler

Dale King said:
I have a slight variation on that problem that I don't know how to
solve. I have some source files that are used in unit testing that I
don't want compiled, but I do want the actual source file to be
considered a "resource" so that source file gets put in the output
folder and in a jar.

Maybe you can get away with using a different extension for them.

That's about all I can think of trying.
 
D

Dale King

Tim said:
Maybe you can get away with using a different extension for them.

That's about all I can think of trying.

In this case I am not in control of the source. The project was
Checkstyle and I wanted to write some patches for new features and
fixing some bugs and run the unit tests in Eclipse (without resorting to
Ant). The unit tests have source files for running the unit tests of the
checks on. We don't want those source files compiled but they need to be
available to the unit tests.

Actually researching it a bit for this response, I see that the unit
tests actually don't rely on the test inputs being in the classpath and
accessing them using getResource. They actually have to be in the file
system and you set a system property with the path.

So I guess in this case I don't need it, but the general problem
remains. Consider if I wanted to do something like the SwingSet app does
where the application can display source code. You would like that
source code to be in the jar.

If you are control of the source giving it a different extension would e
the easiest way to go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top