Eclipse will look like this: "Unable to determine URI for [project-name] / [file-path] / [file-name]"

Main problem:

I encountered the following error in Eclipse Luna:

You come to work one day and try to get eclipse up and running and be productive, but as soon as your desktop opens you will see that all your file tabs are wrong:

Unable to determine URI for 'my-project / path / to / file / filename.extension'

And if I check my views in nav / explorer, I can't see any of my projects.

The first couple of times I did this to recommend to other people facing the same problem:

I have recreated my projects in eclipse.


But:

  • the project got bigger (more and more subprojects are recreated each time)
  • this problem is growing more and more often.
  • I get tired of the manual work it requires.

So I am not satisfied with the solution at hand .

So I'm looking for a way to fix this problem automatically (with a script or a set of commands), or at least prevent it somehow.


My progress so far:

I went to workspace folder:

workspace
└── .metadata
    └── .plugins
        └── org.eclipse.core.resources
            └── .projects
                β”œβ”€β”€ project1-newName
                β”œβ”€β”€ project1-oldName
                β”œβ”€β”€ project2-newName
                └── project2-oldName

      

So my project metadata is still there !?

If I dig a little further I can see that each folder is organized like this

.
β”œβ”€β”€ .indexes
β”‚   └── [...]
β”œβ”€β”€ .location
β”œβ”€β”€ .markers
β”œβ”€β”€ org.eclipse.jdt.apt.core
└── org.eclipse.jdt.core
    └── state.dat

      

Where

  • .indexes

    contains fat-mambo-jambo-of-split-index-tree-organization containing a history.index

    on each output
    • (not like my problem)
  • .markers

    empty
  • state.dat

    empty
  • .location

    contains a string URI//file:/home/myname/projects/my/project/source/folder

    among some scrambling characters such as@ #% 磓

I'm pretty sure the solution is inside this file .location

.


Output:

Does anyone know why eclipse can't suddenly read its own files and how to get it to see and recognize again?

+3


source to share


2 answers


You can fix the problem by trying this:

  • Right click on Package Explorer
  • Select Import
  • General > Existing Projects in Workspace > Go to Project
    (select root)
    > select a project.
  • Done. This will definitely solve your problem.


If that doesn't work, go to File System (General> FileSystem) and select the project files.

The first method is pretty simple and works great in most cases.

0


source


I faced the same problem. The above suggested method does not work in my case as the Package Explorer -> export option remains disabled, so I decided to create another workspace in Eclipse and followed the steps Import-> General -> Existing Projects into the workspace. It worked fine after finishing the Workspace build.



0


source







All Articles