lyt23 / filesync4eclipse

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

Changing project builder properties failed. #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Right click a project.
2. Click Properties
3. Click "File synchronization"
4. Click "Enable FileSync builder for project"

What is the expected output? What do you see instead?
I expect it to get checked and remain so after eclipse restart.  I expect not 
to have to do a full resync every time I restart eclipse.  Instead I get an 
error box popup: "Changing project builder properties failed."

I have full permissions to the file on the filesystem.  I know .project files 
are special in that you can't do normal file operations to them as they are not 
valid windows filenames.  For example, I cannot create a .project file in 
explorer.  Perhaps there is a special method for modifying the project 
properties in eclipse.  

What version of the product are you using? On what operating system?
Eclipse IDE for Java Developers

Version: Juno Service Release 1
Build id: 20120920-0800

eclipse.buildId=M20120914-1800
java.version=1.7.0_11
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product 
org.eclipse.epp.package.java.product

Windows 7, 32 bit.

Please provide any additional information below.
addBuilder(): failed to change .project file for project 'dev-local'

org.eclipse.core.runtime.CoreException: Could not write file: c:\web\.project.
    at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
    at org.eclipse.core.internal.filesystem.local.LocalFile.openOutputStream(LocalFile.java:391)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.write(FileSystemResourceManager.java:1101)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.internalWrite(FileSystemResourceManager.java:648)
    at org.eclipse.core.internal.resources.Project.writeDescription(Project.java:1465)
    at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1353)
    at de.loskutov.fs.properties.ProjectHelper.addBuilder(ProjectHelper.java:144)
    at de.loskutov.fs.properties.ProjectSyncPropertyPage.pathListDialogFieldChanged(ProjectSyncPropertyPage.java:758)
    at de.loskutov.fs.properties.ProjectSyncPropertyPage$PathContainerAdapter.dialogFieldChanged(ProjectSyncPropertyPage.java:1419)
    at de.loskutov.fs.dialogs.DialogField.dialogFieldChanged(DialogField.java:69)
    at de.loskutov.fs.dialogs.SelectionButtonDialogField.changeValue(SelectionButtonDialogField.java:142)
    at de.loskutov.fs.dialogs.SelectionButtonDialogField.doWidgetSelected(SelectionButtonDialogField.java:126)
    at de.loskutov.fs.dialogs.SelectionButtonDialogField$1.widgetSelected(SelectionButtonDialogField.java:117)
    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)
Caused by: java.io.FileNotFoundException: c:\web\.project (Access is denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at org.eclipse.core.internal.filesystem.local.LocalFile.openOutputStream(LocalFile.java:382)
    ... 48 more

Original issue reported on code.google.com by r...@ruslansivak.com on 30 Jan 2013 at 4:30

GoogleCodeExporter commented 8 years ago
Apparently the issue is caused by the hidden attribute set on the .project 
file.  Taking that attribute off makes the error go away.  

Original comment by r...@ruslansivak.com on 30 Jan 2013 at 4:46

GoogleCodeExporter commented 8 years ago
So the root cause is that the hidden attribute was set, which is *not default* 
in Eclipse before 4.2.1. 

Can you please confirm that after creating a new project on Win32 (without 
using FileSync at all for project) the .project file has "hidden" attribute?

If yes, please report a bug against Eclipse 4.2.1 (and please let me know the 
bug number).

FileSync uses standard Eclipse API without directly writing any .project file, 
so I would expect other tools would have same problems with hidden .project 
files.

Thanks,
Andrey

Original comment by iloveeclipse on 30 Jan 2013 at 5:53