Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2005

Tip: Looking for answers? Try searching our database.

Hiding a file from Eclipse

Thread view: 
Roedy Green - 06 Jul 2005 07:23 GMT
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.

Signature

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

Roedy Green - 06 Jul 2005 07:36 GMT
>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.

Signature

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

Tim Tyler - 09 Jul 2005 14:35 GMT
Roedy Green <look-on@mindprod.com.invalid> wrote or quoted:

> >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.

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

__________
|im |yler  http://timtyler.org/  tim@tt1lock.org  Remove lock to reply.

Dale King - 16 Jul 2005 01:16 GMT
> Roedy Green <look-on@mindprod.com.invalid> wrote or quoted:
>
[quoted text clipped - 5 lines]
>
> 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.

Signature

 Dale King

Tim Tyler - 16 Jul 2005 07:51 GMT
Dale King <DaleWKing@insightbb.nospam.com> wrote or quoted:

> 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.
Signature

__________
|im |yler  http://timtyler.org/  tim@tt1lock.org  Remove lock to reply.

Dale King - 16 Jul 2005 19:40 GMT
> Dale King <DaleWKing@insightbb.nospam.com> wrote or quoted:
>
[quoted text clipped - 7 lines]
>
> 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.

Signature

 Dale King



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.