Bug 23243 - Conditional Compilation
Summary: Conditional Compilation
Status: RESOLVED DUPLICATE of bug 6664
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-05 17:35 EDT by Daniel S.V. MacDonald CLA
Modified: 2003-03-23 12:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel S.V. MacDonald CLA 2002-09-05 17:35:04 EDT
I would like to request that Eclipse add the ability to conditionally compile 
the src folder(s).  Currently, building a project compiles all java files in a 
src folder(s).  I'd like to add the ability to build a project using only a 
selected set java files under the src folder (w/o the error icon showing up).  
It could be implemented by using working sets and the descrictor of what to 
compile.

What do you think?
Comment 1 Kent Johnson CLA 2002-09-12 14:22:37 EDT
Can you explain when you would like to do this vs. dividing the classes between 
separate projects and compiling them independently?
Comment 2 Daniel S.V. MacDonald CLA 2002-09-12 15:11:30 EDT
My reasoning for this request stems from trying to use Eclipse and Together 
Control Center together.  As a consequence for using Together, I have a src 
folder with the following structure:

src/
   bfd
   model_design
   model_requirements
   model_user_interface
   model_test

The "bfd" folder is the only folder that contains implementation files.  All 
other folders contain design related files, some of which are java files.  In 
Eclipse, using a "Working Set" I can hide the "model_*" folders from view, but 
I cannot hide them from the compiler.  I request that a feature be added to the 
Eclipse compiler that recognizes "Working Sets".  This way, under Eclipse I can 
build the entire project without any compiler errors.

Although I am specifically experiencing this problem in using Eclipse and TCC 
together, I believe it may affect using Eclipse with other tools.
Comment 3 Kent Johnson CLA 2002-09-12 16:53:07 EDT
You're other option is to define 'bfd' as the only source folder and add all 
the other folders as 'ordinary' folders... not java source folders.

Not every folder containing java files has to be a source folder on the 
classpath.
Comment 4 Daniel S.V. MacDonald CLA 2002-09-12 18:05:54 EDT
I tried setting may src folder to "src/bfd", but then I get the following error 
hundreds of times: 

"The declared package does not match the expected package game."

If I have a java file "bfd/Foo.java", then by setting the source folder 
to "src/bfd" causes the compiler to think there is no package for "Foo.java" 
instead of "bfd".
 
Comment 5 Kent Johnson CLA 2002-09-13 10:23:34 EDT
Is the folder layout fixed? Or can you change it slightly?

Can you move the package bfd inside another subfolder of src, so you could set 
it as the only source folder?

Or can you move it outside of src to another toplevel folder, which would then 
become the only source folder?
Comment 6 Daniel S.V. MacDonald CLA 2002-09-13 10:25:29 EDT
Yes, the folder layout is fixed.  I can't move it.
Comment 7 Kent Johnson CLA 2002-09-13 13:22:14 EDT
Daniel: There is already work going on at the platform core level which 
should 'solve' your problem.

Adding this PR as a duplicate of the platform/core PR.

*** This bug has been marked as a duplicate of 6664 ***