Community
Participate
Working Groups
Created attachment 229229 [details] Refactoring in Galileo vs. Juno Created attachment 229228 [details] Refactoring in Galileo vs. Juno When refactoring C++ code, if some of the imported projects are read-only (e.g. for indexing purposes), and cannot be made writable, the refactoring with result in the following message: A fatal error occurred while performing the refactoring - File '/path/file.cc' is read-only In Eclipse Galileo, there was a "Scope of refactoring" field - allowing you to choose which projects are refactored. This feature is no longer present in Eclipse Juno. Is there a workaround/fix/feature request for this issue? Attached are snapshots of the refactoring setting in both Juno & Galileo.
*** Bug 404708 has been marked as a duplicate of this bug. ***
(In reply to comment #0) The scope of refactoring was removed because it frequently caused errors when users would set it, forget about it, and it would bite them later. A better approach would be to have an option to issue a warning about the read-only files rather than to fail outright. I don't have time to work on it in the near future, but I would gladly review a quality patch.
Hi Sergey, Thank you for the quick reply. Due to our specific configuration, we can't make some of our project write-enabled (those which are used for indexing & searching). So we really could use a way to exclude some of the projects from the refactoring process (like the "scope of refactoring" feature did). A different solution can be to add an "Ignore" / "Skip" option to the prompt we get when refactoring encounters a read-only project. Meaning - the option in that case would be: 1. Make the project read-write 2. Ignore/Skip this project from refactoring 3. Cancel refactoring By this method - users won't have to remember which project they excluded *permanently* from the refactoring (eliminating the issue you mentioned). What do you think?
(In reply to comment #3) > 1. Make the project read-write I don't think refactoring should be messing up with changing file permissions since it's usually a domain of team providers. > 2. Ignore/Skip this project from refactoring Skipping should be available on per-file basis. A list of all non-editable files should be presented to the user and the user should be able to either cancel the refactoring or to allow it to proceed without the non-editable files.
What I meant was that right now, when refactoring encounters a read-only project, it gives you only 2 options: 1. Make it read-write. or 2. Cancel the entire refactoring. What I want to know is - can you please add a 3rd option allowing to *skip* the "problematic" project (leaving it read-only) ?
Created attachment 229408 [details] Refactoring Window Concept
To better explain what I meant, I've attached a mock-up snapshot of how we think the "Refactoring Window" should look upon encountering read-only files, in order to enable the mentioned "skip/ignore" option. As you can see - In concept, you will be able to check/uncheck the projects for refactoring, on both project & specific files levels. Do you think you can incorporate this kind of method in a fix / future release? It would we very much appreciated. Thank you.
(In reply to comment #7) I don't have time to work on it in the near future but will gladly review a patch if somebody contributes a solution.