lyt23 / filesync4eclipse

Automatically exported from code.google.com/p/filesync4eclipse
1 stars 0 forks source link

Preferences not read after restart and sometimes not written #37

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Win7, Eclipse Juno
2. Enable FileSync, setup mappings
3. Restart eclipse.
4. FileSync still enabled but mappings lost
5. Preference file shows the configuration made

What is the expected output? What do you see instead?

1. FileSync shows and executes mappings according to the prefs file.

What version of the product are you using? On what operating system?

Win 7, Sources on a local partition (E:/), destination via samba in a Umbuntu 
VM (Z:/)

Please provide any additional information below.

Error log:

Error
Wed Mar 13 09:03:19 CET 2013
Exception occurred while saving project preferences: 
/.../.settings/de.loskutov.FileSync.prefs.

org.eclipse.core.internal.resources.ResourceException: A resource already 
exists on disk 'E:\...\.settings\de.loskutov.FileSync.prefs'.
    at org.eclipse.core.internal.resources.File.create(File.java:145)
    at org.eclipse.core.internal.resources.ProjectPreferences$1.run(ProjectPreferences.java:570)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.core.internal.resources.ProjectPreferences.save(ProjectPreferences.java:590)
    at org.eclipse.core.internal.preferences.EclipsePreferences.internalFlush(EclipsePreferences.java:465)
    at org.eclipse.core.internal.resources.ProjectPreferences.flush(ProjectPreferences.java:350)
    at de.loskutov.fs.properties.ProjectSyncPropertyPage.performOk(ProjectSyncPropertyPage.java:1145)
    at org.eclipse.jface.preference.PreferenceDialog$13.run(PreferenceDialog.java:965)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:945)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDialog.java:448)
    at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:233)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:158)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Original issue reported on code.google.com by j...@spreadshirt.net on 13 Mar 2013 at 8:13

GoogleCodeExporter commented 8 years ago
There were no code changes in the area of preferences since long time, and I 
also haven't any related bug reports. The stack trace shows that Eclipse is 
"surprised" to see preferences during save - may be because your project was 
modified *externally* (like svn update etc) before you've started to change 
settings, and so Eclipse denied to create the file second time?

Please check if you can reproduce this, I guess it is most likely an user error 
(wrong file permissions/paths etc). 

A small reproducible test case would be great of course.
Please try to start from scratch and watch if the error log contain any 
additional errors.

Regards,
Andrey

Original comment by iloveeclipse on 13 Mar 2013 at 7:05

GoogleCodeExporter commented 8 years ago
Hi,

Same thing here with
* Windows 7
* Luna Service Release 2 (4.4.2)
* FileSync 1.3.9.201406241900
If I uninstall/install FileSync the de.loskutov.FileSync.prefs is created but 
never read on start and never modified afterward even if Eclipse is ran as 
administrator.

Regards,
  Adrien

Original comment by adrien.d...@gmail.com on 13 Mar 2015 at 6:12

GoogleCodeExporter commented 8 years ago
Errors occurred during the build.
Errors running builder 'FileSync Builder' on project 'XYZ'.
Preference node "de.loskutov.FileSync" has been removed.

The file is here, readable and writable...

This could be a reason, it seems repeatable:
* On the project, edit properties, go to Resource / Resources Filter, Add...
* Check Exclude all
* Check Applies to Folders
 Check All children (recursive)
* [Name] [matches] .settings
FileSync won't be able to load or store its .prefs
Remove the exclusion and FileSync is back to normal.

As you can see, in Eclipse you can't hide Eclipse settings...

Original comment by adrien.d...@gmail.com on 13 Mar 2015 at 7:34