Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 202727

Summary: [Import/Export] Import Java Projects with readonly files reports error but imports fine.
Product: [Eclipse Project] Platform Reporter: Sammpath <sammby>
Component: IDEAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: jamesblackburn+eclipse, mober.at+eclipse, sammby
Version: 3.3Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Sammpath CLA 2007-09-08 13:04:11 EDT
Build ID: I20070625-1500

Steps To Reproduce:
1.Have a set of Java projects in a directory and make the complete directory (recursively) read-only (or checked-in in Clearcase)
2.Select the directory in the wizard for import projects
3.Select all the projects displayed, click finish
4.Error will pop-up saying could not import as the file (.project). But import would have happened properly (may be a refresh will identify the java sources properly)
5. Simply click ok, back and forward this will remove the imported project in the wizard. Again click finish, the same error occurs.

More information:
I noticed this in projects with linked resources.
Comment 1 Boris Bokowski CLA 2007-09-11 17:12:13 EDT
Which import method did you use? Can you please give the exact names of the things you clicked on? Thanks.
Comment 2 Sammpath CLA 2007-09-12 01:34:59 EDT
(In reply to comment #1)
> Which import method did you use? Can you please give the exact names of the
> things you clicked on? Thanks.
> 
To import, I did the following (steps):
1.1. Create a empty workspace
1.2. Open Package Explorer
1.3. Right click on empty space and click Import...
Comment 3 Boris Bokowski CLA 2007-09-12 11:56:12 EDT
And then? Which Import source did you pick on the first wizard page?
Comment 4 Sammpath CLA 2007-09-13 02:41:01 EDT
(In reply to comment #3)
> And then? Which Import source did you pick on the first wizard page?
> 

1.4 Expand General Select: Existing Projects into Workspace
1.5 Click Next
1.6 Select Select Root Directory
1.7 Click Browse
1.8 Select the directory which has all the projects as subdirectory
    -- Directory2Select
          - Project1
              - .project
              - .classpath
          - Project2
              - .project
              - .classpath
1.9 The wizard will search for all projects which are 
     - not imported already and 
     - valid projects
1.91 Unselect Copy projects to workspace
1.92 Click Finish
1.93 After few seconds a error dialog pops-up with the message: "Error processing changed links in project description file" Details: File /Project1/.project file is read-only.

Thanks for looking into the problem. Please let me know if you need further info regarding the problem. I can explain in more detail the setup we have if required. May be I am not doing it in the best way possible. Please let me know about this.
---------------------------------------------------------------------------
The complete steps (for clarity):
---------------------------------
Steps To Reproduce:
1.Have a set of Java projects in a directory and make the complete directory
(recursively) read-only (or checked-in in Clearcase)
1.1. Create a empty workspace
1.2. Open Package Explorer
1.3. Right click on empty space and click Import...
1.4 Expand General Select: Existing Projects into Workspace
1.5 Click Next
1.6 Select Select Root Directory
1.7 Click Browse
1.8 Select the directory which has all the projects as subdirectory
    -- Directory2Select
          - Project1
              - .project
              - .classpath
          - Project2
              - .project
              - .classpath
1.9 The wizard will search for all projects which are 
     - not imported already and 
     - valid projects
1.91 Unselect Copy projects to workspace
1.92 Click Finish
1.93 After few seconds a error dialog pops-up with the message: "Error processing changed links in project description file" Details: File /Project1/.project file is read-only.
2.Select the directory in the wizard for import projects
3.Select all the projects displayed, click finish
4.Error will pop-up saying could not import as the file (.project). But import
would have happened properly (may be a refresh will identify the java sources
properly)
5. Simply click ok, back and forward this will remove the imported project in
the wizard. Again click finish, the same error occurs.

More information:
I noticed this in projects with linked resources.
Comment 5 Boris Bokowski CLA 2007-09-17 10:52:04 EDT
Thanks for the information.
Comment 6 James Blackburn CLA 2008-10-27 10:24:18 EDT
I'm seeing '.project' file is read-only errors when importing projects from a clearcase view as well.  ClearCase automatically makes all files read-only during view creation.  

Shouldn't core.resources, on attempting to persist to a read-only project, attempt to IWorkspace.validateEdit(...) ?

Comment 7 Martin Oberhuber CLA 2011-03-10 05:51:11 EST
This is probably a duplicate of bug 322821 which has attached a patch that we should finally commit.
Comment 8 Lars Vogel CLA 2019-11-08 04:39:28 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant please remove the stalebug whiteboard tag.