Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Vex » Why is Editor Read-Only?
Why is Editor Read-Only? [message #1062608] Mon, 10 June 2013 00:12 Go to next message
Jon Forrest is currently offline Jon ForrestFriend
Messages: 2
Registered: June 2013
Junior Member
(This is with Indigo Service Release 2 and Vex 1.1.0.M1_201301292035 running on Windows 7)

I've volunteered to help edit a pre-existing open source eBook written in DocBook. I installed the latest Vex and I'm able to bring up a window with an xml file rendered correctly. However, when I try to change anything in the document, I get a message saying that the editor is read-only. I don't understand this. It isn't an OS file permission problem because I can edit the file and write it back using vim just fine. It's not a basic Eclipse problem because I can change other non-XML files in the same directory.

Any suggestions about what I'm doing wrong?

Thanks,
Jon Forrest
Re: Why is Editor Read-Only? [message #1063023 is a reply to message #1062608] Tue, 11 June 2013 20:05 Go to previous messageGo to next message
Florian Thienel is currently offline Florian ThienelFriend
Messages: 32
Registered: July 2009
Member
Is the file stored in your Eclipse workspace? Did you open it with "File > Open File..."?

Florian
Re: Why is Editor Read-Only? [message #1063026 is a reply to message #1062608] Tue, 11 June 2013 20:19 Go to previous messageGo to next message
Carsten Hiesserich is currently offline Carsten HiesserichFriend
Messages: 5
Registered: June 2013
Junior Member
Did you by chance opened your document using 'Open File...' from the menu?

In this case, the document is read only to eclipse. You have to create a new Eclipse project and drag your file to this project to be able to modify the document.

Regards,
Carsten
Re: Why is Editor Read-Only? [message #1063236 is a reply to message #1063026] Wed, 12 June 2013 18:53 Go to previous messageGo to next message
Jon Forrest is currently offline Jon ForrestFriend
Messages: 2
Registered: June 2013
Junior Member
Creating a new Eclipse project and then dragging my file into the project indeed solved the read-only problem. Doing this was trickier than it sounded, though, but
I got it to work. Thanks for the suggestion.

However, I discovered another much more serious problem. The XML file I'm editing came from a Git repo that I cloned. After doing some editing of the XML file, I compared the edited file with the original file in the Git repo. To my shock, Vex had completely reformatted the text in the file I had been editing. The text was still correct XML and rendered the same as the original file but running diff on it and the original file showed many differences that were caused by this reformatting, and not the editing I had been doing.

Is there any way to have Vex only change what I explicitly modify, and nothing
else?

Jon Forrest
Re: Why is Editor Read-Only? [message #1063241 is a reply to message #1063236] Wed, 12 June 2013 19:20 Go to previous message
Carsten Hiesserich is currently offline Carsten HiesserichFriend
Messages: 5
Registered: June 2013
Junior Member
Jon Forrest wrote on Wed, 12 June 2013 14:53

Is there any way to have Vex only change what I explicitly modify, and nothing
else?

No there is no way to do this, as VEX rewrites the document from an internal content model. You may try to change output formatting in 'Preferences -> VEX' to match the formatting of the source document.

Carsten
Previous Topic:Reopening a dialog with Vex
Next Topic:How to get attributes?
Goto Forum:
  


Current Time: Fri Nov 28 16:21:15 GMT 2014

Powered by FUDForum. Page generated in 0.02358 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software