Forum Discussion

Philip_Baird's avatar
Philip_Baird
Community Expert
12 years ago

Locking Code Editor as read-only


Hi, I have written some common Framework code that is used in other Projects and Project Suites.


 


This code is used by simply linking back to the Framework Project Script Units by using "Add | Existing Item..."


 


I have a question, when a Script Unit is open in the Code Editor that is a linked to existing item in another Project, is it possible to automatically lock the Code Editor as read-only so that the code cannot be changed (accidently or otherwise). I REALLY don't want people changing our Framework code other than in the Framework project itself under our proper change process.


 


Regards,


Phil Baird

2 Replies

  • Philip_Baird's avatar
    Philip_Baird
    Community Expert

    Hi Tanya, yes you are correct, we are using Source Control for maintaining our code base.


     


    My main concern is really around when tests are being debugged, the Test Complete IDE can open up referenced Script Units in a code editor which could result in someone inadvertantly changing Framework code which could result in:


     


    1. Unintended commits to the Framework which could break tests in other projects


    2. Commits to test code that rely on the altered Framework code, which is not subsequently committed, resulting in execution failure when next checked out


     


    Being able to lock the code editor as read only for referenced Script Units would eliminate these risks


     


    Phil