Bug 5508 - JDT cannot support periods in the folders above the package name
Summary: JDT cannot support periods in the folders above the package name
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P2 critical (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-02 16:21 EST by Paula Cox (WSAD) CLA
Modified: 2002-01-11 09:13 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 Paula Cox (WSAD) CLA 2001-11-02 16:21:54 EST
Compilation problem with JDT when the source code folder contains an 
extension other than null, .jar or .zip

In fact, the org.eclipse.jdt.internal.core.builder.impl.IncrementalImageBuilder 
class
contained in the jar package WSAD\plugins\org.eclipse.jdt.core\jdtcore.jar is 
faulty.

The implementation of the method:

protected void computeAllPackages(IResourceDelta delta, IPackageFragmentRoot[] 
oldRoots, IPackageFragmentRoot[] newRoots) 
makes an exclusive filter on path extensions (null,  .jar or .zip).

This  is  a  too  restrictive  filter  since  customer's source code tree is 
divided  in  
Framework.extension1/Module.extension2/src and .extension1 can be  null,  "tst", 
 "edu"  etc... 
and extension2 can be  "mj", "mjext", "m", "mext" etc...

The JDT implementation needs to be more flexible.



Steps to see the problem: 
0) Make sure the workbench preference for "Perform Resource 
build on modification."
2) Create a WebSphere Application Developer Web Project  
(cannot reproduce this with a Java project
since we get an error "Testing.edu is nested in the output folder path"
I'm not real sure what this error message means).
   a) Enter Name, 
   b) press next, then next
   c) In the source tab, select and remove
      the existing source folder
   d) Create a new folder that has an extension
      (e.g.   Testing.edu )
   e) Press Finish
3) In the  Testing.edu subdirectory, create 2 new 
java class files  Test1.java and Test2.java
4) In Test1.java  type is garbage in the file  "adsfadsf" and save the file
RESULT:  There are no errors found
EXPECTED RESULT: Errors in the task view should be shown. 

5)Remove the garbage from 4 to try something closer to what the customer saw.
6) In Test1.java add the following code: 

    public void foo()
     {
      Test2 temp = new Test2();
      temp.bar();
     }
and save.  Expect to see an error in the tasklist since the method bar doesn't 
exist yet in Test2. 
7) Try to correct the error by adding the following code to the Test2.java

    public void bar()
     { }
save the file. 
RESULT:  Error in Test1 is not removed from the task list
EXPECTED RESULT: The error in Test1 is removed from the task list


We understand that the user cannot have periods in the folder names
that are used in the package name, but in this case the customer needs
to have the periods in the directory structure that is ABOVE where
the package name gets involved.
Comment 1 Philipe Mulet CLA 2001-11-05 13:05:00 EST
Bug reproduced, it occurs only in the incremental build mode.
Investigating a fix.
Comment 2 Philipe Mulet CLA 2001-11-05 13:20:55 EST
Recursive descent inside children of deltas should occur as soon as the children 
is a folder or a resource which extension is JAR/ZIP.

Fixed in 2.0 stream.

Comment 3 Philipe Mulet CLA 2001-11-05 13:40:18 EST
Fixed
Comment 4 Jerome Lanneluc CLA 2001-12-05 06:31:36 EST
Fixed in 1.0 Rollup 139