Oxygen 10.2: Changes for 'Support for read-only files'

Having trouble installing Oxygen? Got a bug to report? Post it all here.
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

Oxygen 10.2: Changes for 'Support for read-only files'

Post by csalsa »

Hi

I like the new features of Oxygen 10.2 but for the new feature 'Support for read-only files'. I see in this release another feature that I asked for (XML elements shown as in grey in the 'Elements perspective' that were defined in a XML Schema complex type but not valid at the insertion point in the XML sample). Thanks

My feedback is that I feel this feature is not fully implemented. My platform is MS-Windows.
10.2 New Features web page wrote:Support for read-only files
A lock decoration appears in the editor tab for read-only files and the content cannot be changed. The read-only status appears also in the Properties view.
Problem
I have not found a means to override the 'read-only' lock from within Oxygen.

All our XML files and Schemas are kept in MS-Visual SourceSafe where all files retrieved from SourceSafe are marked read-only if it is not checked out. Once the file is writable, it is not automatically updated when a user does a 'get', or refresh, from SourceSafe.

I am sure that this problem will occur with other code repository tools.

To make changes to a file, I now need to open either Windows Explorer and clear the 'read-only' attribute or go to SourceSafe and checkout the file. Often my intent is to make session-only, that is temporary changes, but not change the underlying file. This happens during experimenting with a change or when someone gets the XML namespace wrong and the XML schema does not load. Sometimes the file needs to be re-formatted to make it more readable.

Options
I would like to be considered:
1. Introduce a new state for temporary/session-only changes, say called 'unlocked' to the existing states of 'locked' and 'writable'. The icon would show a 'locked' padlock, an 'unlocked' padlock and no padlock for these states.

2. 'Unlocked' files can be 'save as' to a new file but cannot overwrite the current file.

3. On exit, the user is prompted to discard changes, 'save as' to new files or cancel (giving the user the option to checkout the file from SourceSafe.

4. A context menu option to 'unlock' individual files. The context option should be on right-clicking the 'filename' and on the 'project' or 'project folder'. And of course in the appropriate menus and toolbars.

5. An editor preference to set the default to load read-only files as 'locked' or 'unlocked'.

6. I do not know if changes to 'unlocked' files should be automatically saved (similar to writable files) but the behavior should be same as 'new' files that have not been previously saved.


PS My use of the term 'locked' and 'unlocked' is not to be confused with the locking/unlocking of XML tags on forms.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by Radu »

Thank you for the feedback.
We are considering making the following changes:
1. Add an option (to the preferences): "Can edit Read only files", default on "true".
2. The "Save" action will execute in fact a "Save as" for modified read-only files.

I hope this will solve the problem.
Many regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by csalsa »

Hi Radu

This change would be sufficient for my team. Obviously, we will use the default and set 'Can edit read-only files' to 'true'. Will there be a visual indication, say using the padlock, to distinguish between those files that are writable and those that are read-only?

Will this change be a patch on Oxygen 10.2?


For other users who may choose to set the default to 'false'.
Are you going to have a means to permit session editing, say on a file-by-file basis, without having to use an external tool to clear the file read-only attribute? This is the current behavior of Oxygen 10.2.

I have have faced this whilst using text editors and read-only files and it interrupts your work to have to use external tools to clear the read-only file attribute. It is most annoying. Sometimes I wanted to temporarily reformat the file to make it more readable but do not want to make a permanent file change. Then you must remember to manually set again the read-only flag after you are finished.

If you could, give Oxygen the ability change the file read-only flag.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by Radu »

Hi,

The visual indicator will remain on the tab regardless on what the user checks for "Can edit Read only files".

We'll consider adding an action (possibly when right clicking the file in the Project view) to modify the file's flags.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by csalsa »

Thanks Radu for your reply.

When is it likely that you will implement the option (to the preferences): "Can edit Read only files", default on "true" that you discussed your earlier post.

Will this change be a patch on Oxygen 10.2? Or will it be in Oxygen 10.3?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by Radu »

Hi,

This option will not be added as a patch but will probably get implemented in Oxygen 10.3 (couple of months).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mlcook
Posts: 67
Joined: Thu Jan 24, 2008 4:52 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by mlcook »

I would urge re-examination of the default for the suggested "Can edit Read-only files".

I would think that "false" should be the default. There is some reason (configuration management tool, etc.) for why the file is read-only.

The user should be required to think a moment about whether this is the right thing to do.

Having "Save" act as "Save as..." is good, though, and may suggest to the user that something out of the ordinary is going on.

But, please consider avoiding "true" as the default.

-- Mike
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by george »

Hi Mike,

The possible "Can edit Read-only files" that Radu mentions is not to overwrite the current file but to allow its content to change in the editor - right now all changes in the editor are disabled on read only files.

If a file is read only no application can overwrite it unless it clears the read only flag. So, when that option should be enabled the file content can be changed and on Save the Save As will be triggered. When the option will be disabled the file content cannot be changed and the Save action is disabled.

Do you still see a problem?

Best Regards,
George
George Cristian Bina
mlcook
Posts: 67
Joined: Thu Jan 24, 2008 4:52 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by mlcook »

I'm using Oxygen 10.2 and must be overlooking the read-only decoration.

I opened a read-only file and was able to edit (using Oxygen editor, not Author). I could not save the file, but could make changes in the editing window.

Anyway, George, I understand better the proposal and don't see any problems.

-- Mike
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by csalsa »

Hi mlcook

You may find the value for the default is less of an issue for you if you make use of the 'import global options'.
mlcook wrote:I would urge re-examination of the default for the suggested "Can edit Read-only files".
I provide support for a large team of mostly business oriented users over two sites connected by VPN. I have the users import 'global settings' (under the 'Options' menu) as the final installation step. This is a neat feature of Oxygen XML and has our team use the tool with a consistent configuration. I have also changed the default layout with the 'Outline' view full length along the LHS and the 'Project' view in the bottom RHS.

Whatever the default, you can manage it for a team importing global settings. I wish more tools had this feature.

As for myself, I am more interested in the functionality. Settings, and defaults, I can manage.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by Radu »

Hi Mike,
mlcook wrote:I'm using Oxygen 10.2 and must be overlooking the read-only decoration.

I opened a read-only file and was able to edit (using Oxygen editor, not Author). I could not save the file, but could make changes in the editing window.
-- Mike
This is a strange one.
Is the file marked as read-only before opening it in Oxygen?
Can you give us more details about what operating system you are using and if you use the standalone or the Eclipse plugin Oxygen?
If you are using Linux/Mac OSX can you tell us the exact permissions set for the file?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mlcook
Posts: 67
Joined: Thu Jan 24, 2008 4:52 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by mlcook »

It may be that I don't know where to look or what to look for. Where is the read-only decoration and what does it look like?

I'm using Windows XP, SP 2. I have Oxygen 10.1, stand-alone version.

Using Windows Explorer, I set the "Read-only" attribute on a file after right-clicking the file name and selecting the Properties pop-up menu item. The read-only attribute box is checked. I then open with Oxygen. The tab for the file has a red dot, then the file name.

I can make whatever edits I want, then when I try to save I get a message indicating the file is read-only.

I'm editing in "Text" mode. Does that make a difference?

-- Mike
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by Radu »

Hi Mike,

This is a new feature in Oxygen 10.2. :)

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mlcook
Posts: 67
Joined: Thu Jan 24, 2008 4:52 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by mlcook »

Ooops! Nevermind! :D

I've downloaded, but not installed, 10.2. I'll give it a try.

-- Mike
dbezborodov
Posts: 2
Joined: Tue Jun 16, 2009 4:22 am

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by dbezborodov »

I doubt that this feature was well thought out.

We often open files from our web application with Firefox using the Open rather than Save option. This will open the file in read only mode.

I should be able to do what ever I wish with the file in memory. When I go to save the file is when I should be nagged.

I have never come across a similar feature in another program. Hence, this feature does not follow the Principle of Least Surprise.



Furthermore, I have found a bug.

Steps to reproduce:
  • Open a file in read-only mode.
  • Click the "Format and Indent" tool
Expect:
  • Strangely, the document cannot be altered.
  • A UI message "you cannot edit this document" appears.
Actual:
  • Strangely, the document cannot be altered.
  • A UI message "Format and Indent successful" appears, even though it had no effect.
<oXygen/> XML Editor 10.2, build 2009041713
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by sorin_ristache »

Hello,
dbezborodov wrote:I should be able to do what ever I wish with the file in memory. When I go to save the file is when I should be nagged.
This is what the option Can edit read only files does when it is enabled. It allows you to edit the content in the editor window and on Save it calls in fact the Save As action. This option will appear in version 10.3. We can make available a pre-release version for you and send you a download URL if you want to test it.
dbezborodov wrote:
  • Open a file in read-only mode.
  • Click the "Format and Indent" tool
Expect:
  • Strangely, the document cannot be altered.
  • A UI message "you cannot edit this document" appears.
When the option Can edit read only files is enabled the content of a read only file is formatted in the editor window (starting with version 10.3) but cannot be saved on disk (the Save action is in fact the Save As action in this case). We will have to issue a message "you cannot edit this document" when the option is disabled.


Regards,
Sorin
dbezborodov
Posts: 2
Joined: Tue Jun 16, 2009 4:22 am

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by dbezborodov »

Thank you for your prompt response.
sorin wrote: This is what the option Can edit read only files does when it is enabled.
I personally think that should be the default behavior, but I'm just a single user who doesn't know what other people want. As long as the option is there, I am happy.
sorin wrote: We can make available a pre-release version for you and send you a download URL if you want to test it.
I can wait. But if you want me to test, I can test.
sorin wrote: We will have to issue a message "you cannot edit this document" when the option is disabled.
Sounds good to me.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by sorin_ristache »

dbezborodov wrote:
sorin wrote: This is what the option Can edit read only files does when it is enabled.
I personally think that should be the default behavior, but I'm just a single user who doesn't know what other people want. As long as the option is there, I am happy.
This will be the default behavior for read only files in version 10.3 because the option Can edit read only files will be enabled by default.


Regards,
Sorin
c094728
Posts: 2
Joined: Wed Sep 12, 2018 1:25 am

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by c094728 »

On XML Author 17.1, build 2016032212
I cannot edit read only document even though the option "Can edit read-only files" is checked.
it just displays popup "Cannot edit inside of read-only content"
File is checked out from or SDL source control system. I also tried making the files on disk not read only but still can't edit it unless I check it out from source control.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen 10.2: Changes for 'Support for read-only files'

Post by Radu »

Hi,

SDL has a plugin for Oxygen and that plugin can forcefully impose to Oxygen to not allow editing that content, even if that checkbox is unchecked.
So you would need to talk to them to provide maybe a setting for this in their plugin. Or you can probably use the "File->Save As" menu action to save the file some place else and edit it from there.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply