Re: Organizing java files with WOLips / Eclipse

From: Harald Niesche (haral..heco.de)
Date: Tue Nov 25 2003 - 09:29:45 EST

  • Next message: Harald Niesche: "Re: ResourceManager-woes (and a feature request)"

    RIAHI Farshad wrote:

    > All our Java files begin wih "package com.myCompany.MyFramework;"
    >
    > If we roganize all files of the same package in the FileSystem tree :
    > MyFrameworkProject\com\MyCompany\MyFramework
    > every thing is OK.
    > But we want to reorganize files in some other subdirectories :
    > MyFrameworkProject\Classes ; MyFrameworkProject\Components ;
    > MyFrameworkProject\Objects ; etc....
    >
    > Then, when compiling, there is an error in each file : "declared package
    > doesnt match with package definition" and Eclipse proposes the solution :
    > "Move file.java to com.MyCompany.MyFramework" ....
    > Selecting this solution removes the error but moves the java file in the
    > MyFrameworkProject\com\MyCompany\MyFramework file tree. :-(
    >
    >
    > Is there a solution to organize files as the way we want ? How can we
    tell
    > Eclipse / Wolips not to remove files ? Is this a Eclipse issue or a
    WOLips
    > limitation ?

    Java Compilers usually require .java files to be in folders consistent
    with their package declarations.

    ProjectBuilder works around this limitation by copying .java files into
    the required structure before compiling them.

    Eclipse does not support the structure you propose, unless you change
    the package declarations.

    You could try to work around this by also using Ant to compile the
    classes, but then you would lose large parts of Eclipse functionality.
    (One thing about Eclipse that really makes it worthwhile is the fact
    that everything that is saved is also compiled, this yould probably be
    impossible to maintain. Also you would probably not have the automation
    features that make writing code in Eclipse easier.)

    Harald



    This archive was generated by hypermail 2.0.0 : Tue Nov 25 2003 - 09:29:22 EST