Some projects were hidden because they exist in the workspacedirectory

Discussion in 'Java' started by timjowers, Sep 22, 2009.

  1. timjowers

    timjowers Guest

    I figured this might help some other java programmer. Eclipse likes to
    give this error when working with multiple projects and you try to
    import another existing project: "Some projects were hidden because
    they exist in the workspace directory"

    The fix is to edit the .project file in the projects directory. Change
    the name:
    <name>FlexWebApp</name> in the project description.

    This occurs when you have default names given in Flex Builder or
    others and you do not change these.
     
    timjowers, Sep 22, 2009
    #1
    1. Advertisements

  2. timjowers

    johnj

    Joined:
    May 4, 2011
    Messages:
    1
    Likes Received:
    0
    additional info

    To follow up on Tim's helpful posting, I thought I would add a few things I discovered today.

    If you use a code archive like SVN, CVS, Perforce, etc, you may be in the practice of checking out repository code into one hard-drive location and then using a separate hard-drive location for your Eclipse workspace. Then, you open Eclipse and choose Import Project rather than New Project. Typically, navigating to the repository "drop zone" should show all the projects you want to check out in the Import window of Eclipse.

    Occasionally you might want to check out a project and you get the dreaded message instead: "Some projects were hidden because they exist in the workspace directory". This might be a very simple problem.

    Try navigating to the repository drop zone, clicking on a project you ARE able to import, and examine the .project file. This is the file that Eclipse uses to keep one "type" of project separate from another type. See another helpful posting, How to Convert to a Dynamic Web project... in Eclipse , at http://www.scottmurphy.info/java-convert-to-a-dynamic-web-project-eclipse-3.3-europa-3.4-ganymede. You should see various "natures" in this file, indicating what the nature of this project is: i.e., what type of project is it. This is the basic .project file created in Eclipse when you do File...New...Java Project:

    <?xml version="1.0" encoding="UTF-8"?>
    <projectDescription>
    <name>Java Project</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    <buildCommand>
    <name>org.eclipse.jdt.core.javabuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    </buildSpec>
    <natures>
    <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
    </projectDescription>

    Other projects in your repository drop zone most likely will have more complicated .project files than this.

    So, back to your problem. If your project in the drop zone, for whatever reason, has no .project file at all, this should explain why Eclipse shows the message "Some projects were hidden because they exist in the workspace directory". This is Eclipse's way of saying, "I don't understand what type of project this is, therefore if I import it, I cannot give you the correct list of project properties when you right-click on the imported project and go to Properties". If your project DOES have a .project file, then examine it carefully: along with other .project files in other nearby projects: and see if you can recognize the corruption that is leaving Eclipse with no way to import your project properly.

    Our team has the practice of starting a new project by saving an empty folder (with the correct project name) right in the hard-drive repository drop zone, checking this into the code archive, then opening Eclipse and choosing the Import option to get a project going in the Eclipse workspace. You can see the remote repository connection information for this project in Eclipse, and you are free to decide which type of project you want to create (and then check in afterwards - with a project nature all figured out). Works well. However, I discovered that when someone else checks in this "placeholder" folder, I am unable to import it into my workspace unless there is a .project file in the empty folder. I haven't researched why this is; I'm just saying I experienced it. Putting a .project file into a project already checked into the repository, but missing the .project file, got rid of the "Some projects were hidden" message and I was able to import it successfully.

    Hopefully these tips will help you to solve your own problem with this message...
     
    johnj, May 4, 2011
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.