-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Indexable ByteValue Indications #883
Conversation
5c609fa
to
686c745
Compare
|
2fba695
to
08439de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
I've come across a bug in the I'm currently working on a fix for this. |
I hope to get to this review tomorrow. |
08439de
to
367275a
Compare
The issue I ran into was due to the fact that I moved the listener events for the highlight selection. Previously, there were listeners for each There are two separate |
The issue with the undo / redo seems to be within the fact that there's no longer a history of changes being kept with messages between the extension, server, and UI. I believe this was changed with the search & replace got restructured to be incremental search & replace. Those messages being sent don't contain any data. I think ideally, when redo/undo changes are made, there should be some data in the server-extension-UI pipeline to have the UI accurately display the viewport. Similar to how the That being said, something should be done to rectify this highlighting issue but will have to be in sync with what changes are going to be made to search / replace in the future. |
@stricklandrbls, that's right. If a 1M file of 'a's gets changed to 'xX' that's a lot to keep track of and will not scale well. I'd recommend doing the same here. Just highlight the last replacement and the current search. There will be no highlighting for replace all or replace rest since that's all done on the server side and is opaque on the client side. If I insert or delete bytes the highlights float on top and do not float with the content. If I delete or insert bytes in the middle of a selection, it doesn't shrink or grow. If I revert all changes, the highlights remain. Maybe the "fix" is to clear the selections when any edit is made or any change is undone/redone. I think it's still possible to show the last replacement and the current search, but any other change to the content clears the selections. |
367275a
to
d9cd8a8
Compare
@stricklandrbls, I was deleting and inserting into the highlights from a search and replace. The selection you're showing is concerning unless "overwrite only" is the selected editing mode. It just grows the length of the replacement string. If I'm not in "overwrite only" mode and I select 3 bytes and I replace that with 10 bytes, I need those 3 bytes replaced with the new bytes (growing the file by 7 bytes), not just overwrite 10 bytes with 10 new bytes. |
@stricklandrbls, these selections should not grow unless we're doing overwrite only. If we are doing overwrite only, I like the second GIF that shows what additional bytes will be overwritten if the changes are applied.
You could use Ωedit™ viewports to power the selections and keep them updated when changes are made. They are designed to track changes in data segments from a content perspective (use Here is an example in a TypeScript test of using a viewport to track some content in a session. It doesn't include what happens to the 'LABEL' if the label itself gets changed, but we can make it behave any way we want by subscribing to its viewport events. |
d9cd8a8
to
c6eebf3
Compare
c6eebf3
to
ae84965
Compare
4f5eee8
to
58efdc7
Compare
9b5ddec
to
bd61f39
Compare
The different highlighting for extending / shortening the byte selection via the editor panel, has been removed. Now, once a multiple byte selection has been made, only those bytes will be highlighted in the viewports. This is regardless of the size of the edited data segment. |
bfb0ddb
to
9fce048
Compare
9fce048
to
4aab54a
Compare
Rebased on the most recent main. |
43f91c6
to
571eedc
Compare
8e3f11b
to
9d899c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -459,11 +459,17 @@ export class DataEditorClient implements vscode.Disposable { | |||
case MessageCommand.undoChange: | |||
await undo(this.omegaSessionId) | |||
await this.sendChangesInfo() | |||
this.panel.webview.postMessage({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: I don't quite know enough to understand these additions, and to a newbie it seems like one is clearing changes right after the changes are sent, which is slightly confusing. Can you tell me more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on github mobile and have to poke around to see what this is referencing. I'll get back to you soon.
This is because the clear changes command will clear the changes that were made in the data editor and in turn clear the data stores that the byte highlighting is derived from.
The naming convention does seem a bit confusing but the this.sendChangesInfo()
is sending "changes" in regards to the difference in changes made from Data Editor viewport edits and the associated file on this. Whereas, the webview message clearChanges
clears uncommitted changes / edit from a user's selection from within the data editor.
I think they could both use a bit more expressive names: sendUpdatedFileInfo
and clearUnsavedActivity
perhaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
although i have a quick question posted
f063e9b
to
11c6dc8
Compare
- Added indexable indication array for ByteValues within the viewport displays. - Created categorical byte indiciations values & CSS selectors. Closes apache#784
11c6dc8
to
06c06ae
Compare
ByteValue
s within the viewport displays.Screenshot:
ByteValue
Search Result IndicationScreenshot:
ByteValue
Replace Result IndicationReplacing
0x 00 00 00
->0x FF 01 FF