Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Encoding save .settings folder already exists #939

Closed
akberc opened this issue Apr 23, 2014 · 2 comments
Closed

Encoding save .settings folder already exists #939

akberc opened this issue Apr 23, 2014 · 2 comments

Comments

@akberc
Copy link
Contributor

akberc commented Apr 23, 2014

I couldn't find an existing issue.

Workspace froze hard (setting up typechecker at 70% - which may be another issue) and I killed Eclipse and wiped out workspace metadata as Eclipse would not re-start.

On re-importing projects, a bunch of encoding prompts pop up (just an annoyance) and then three Ceylon projects could not save the encoding to Eclipse properties as the 'settings' folder already exists.

Maybe a co-incidence: These three were projects that were open prior to the crash. The rest of the Ceylon projects were closed.

Could not save encoding settings.
Exception occurred while saving project preferences: /xxxxx/.settings/org.eclipse.core.resources.prefs.

...

!MESSAGE Exception occurred while saving project preferences: /xxxxx/.settings/org.eclipse.core.resources.prefs.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: A resource already exists on disk 'C:\work\projects\xxxxx\.settings'.
    at org.eclipse.core.internal.resources.Folder.assertCreateRequirements(Folder.java:47)
    at org.eclipse.core.internal.resources.Folder.create(Folder.java:95)
    at org.eclipse.core.internal.resources.ProjectPreferences$1.run(ProjectPreferences.java:622)
    at org.eclipse.core.internal.resources.ProjectPreferences.save(ProjectPreferences.java:643)
    at org.eclipse.core.internal.preferences.EclipsePreferences.internalFlush(EclipsePreferences.java:471)
    at org.eclipse.core.internal.resources.ProjectPreferences.flush(ProjectPreferences.java:363)
    at org.eclipse.core.internal.resources.ProjectPreferences.flush(ProjectPreferences.java:366)
    at org.eclipse.core.internal.resources.CharsetManager.flushPreferences(CharsetManager.java:259)
    at org.eclipse.core.internal.resources.CharsetManager.setCharsetFor(CharsetManager.java:443)
    at org.eclipse.core.internal.resources.Container.setDefaultCharset(Container.java:376)
    at com.redhat.ceylon.eclipse.ui.CeylonEncodingSynchronizer$InternalSynchronizeJob.runInWorkspace(CeylonEncodingSynchronizer.java:201)
@gavinking gavinking added the bug label May 8, 2014
@gavinking gavinking added this to the Ceylon 1.1 milestone May 8, 2014
@gavinking
Copy link
Contributor

What I imagine happens here is that the workspace is out of sync with the file system. So Eclipse thinks the .settings folder is nonexisting when actually it exists. So refreshing everything from the InternalSynchronizeJob should solve the problem.

@gavinking gavinking assigned gavinking and unassigned davidfestal Aug 1, 2014
@gavinking
Copy link
Contributor

@akberc I have added some calls to refresh() that should fix the bug. However, I have not tried to actually reproduce the problem from your description. Can you check that it's really fixed? Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants