For that add a procedure that allows to temporarily disable
moving the cursor in GPS.Editors, and use it by default when
applying TextEdits.
For eng/ide/ada_language_server#1159
Opening a buffer without a view leaves the responsibility to the
caller to close the buffer manually.
=> this is unsafe: either we are closing a buffer shared
somewhere else or forgetting to close it (= leaking it)
The solution is to always use Buffer_Holder.
The operation to find a file in the project from a base
name is very costly. Add a local cache in the Project_Registry
to alleviate the issue.
Make GPS.Kernel.Create take advantage of this cache in the
default lookup cases.
Use the call that leverage this cache when processing
the compiler output, and when applying codefix messages.
This reduces the import of 10000 messages on the same file
from 18s to 3s on my machine.
Add a test to check this scenario.
Each FileLocation was leaking a File: they were keeping a pointer
to File without using any proxy to release them.
Break the dependency and only create the File from the FileLocation
when needed.
Add a test.
Change-Id: I1df713a7c0e6cc54f7c4912b803247b3189dcd92
Add free for Callback_Data/Subprogram_Type/List_Instances
Fix ownership transfer issue for Monitored_Command.
Fix over-referenced on widget by python (Editor_Overlay)
Add a test.
Change-Id: I5f6447e37928535f2b7085bcd1b102ee28e31c33
- Create a group to "undo" at once a workspaceEdits on a file
- If the queue is not empty "undo" the last group which will
always conrespond to the workspaceEdits. If not then the buffer
is closed or has been closed and use the generated reverse
workspaceEdit.
Add a test.
Change-Id: Ifd001f50df7ed632b75741fef2d05293963f2fca
This is now properly checking if a view has been opened since and
thus is not closing it.
Add tests.
Change-Id: I8690abe76711e29f5641442556a88a6185af1791
- Show a task with the codeaction command name
- Add messages to track the modification in the Messages view
- Allow undo/redo of workspaceEdit by adding the concept of global
command in Commands.Controls
- Reuse an existing hidden (Pure) buffers when opening a file if
any.
- Fix invalid closing of buffer when the first reference was stored
inside a Buffer_Holder see below a bogus sequence:
* create a buffer_holder which opens the buffer without a view
* open a view via the Open File menu
* destroy the buffer_holder => it will close the view
Add tests
Change-Id: I215c6df2186c9c41c9e532c4b667bf95e37bf76d
This allows to control whether we always want to center the location
in the editor view, or just make sure it's visible.
Use this new parameter for SPARK counter examples.
(no-precommit-check)
Change-Id: I948dda4ab6a45985bb863059b653f331ba93d994
A new 'lock or unlock current editor' action has been added, allowing
users to lock a given editor at a gven position.
Locked editors are still navigatable manually but are insensitive to
all 'jump to code' events, such as clicks in the Locations view, navigation
actions (find all refs, goto declaration etc.), clicks on the Call Trees
view, in the Call Stack view etc.
Two tests that cover most use-cases have been added.
(no-precommit-check)
Change-Id: If083f013ff3c09a0ee01b39b1a66a23d641a159f
In these cases:
- in reaction to a graphical key press
- when deleting interactively
We're still missing scrolls in reaction to interactive Cut
and Paste; this will be done in a subsequent change.
To support this, add a new primitive "scroll_to_cursor_location"
to the EditorView class.
Change-Id: I169d0d49994b49a174515558cec6512fa743bad6