Skip to content

[OneExplorer] Support cfg refactoring #768

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

Open
Tracked by #695
dayo09 opened this issue Jun 9, 2022 · 4 comments
Open
Tracked by #695

[OneExplorer] Support cfg refactoring #768

dayo09 opened this issue Jun 9, 2022 · 4 comments
Labels

Comments

@dayo09
Copy link
Contributor

dayo09 commented Jun 9, 2022

What?

When a filename changes, change the line of corresponding filename in cfg.
(NOT When a filename line in cfg changes, change the actual filename.)

From https://github.sec.samsung.net/RS7-RuntimeNTools/secret/issues/187#issuecomment-1522094

GIF 를 보고 번뜩 떠오른 생각 입니다. *.tflite 파일에 대해 rename 기능과 별개로 refactoring 기능이 있으면 좋겠네요. refactoring시에는 *.tflite 파일 이름만 변경하는것이 아니라, 해당 파일이 참조된 *.cfg 파일 내부의 *.tflite 이름까지도 자동으로 함께 변경해주는....


Point

  1. File(abs path) to URI mapping relation
  • A single derived model file can be mapped to multiple tree item URIs or none. (1-> 0|1|Many)
  • A single base model file can be mapped to a unique tree item URI (1 -> 1)
  • A single cfg file can be mapped to a unique URI or none (1 -> 0|1)
@dayo09 dayo09 changed the title Edit cfg automatically when the related model file name is changed in the filesystem [OneExplorer] Sync changes on cfg and related files Jun 9, 2022
@dayo09 dayo09 changed the title [OneExplorer] Sync changes on cfg and related files [OneExplorer] Support cfg refactoring Jun 9, 2022
@dayo09 dayo09 added this to the Sprint (Jun 6 to Jun 17) milestone Jun 9, 2022
@dayo09 dayo09 added the Future label Jul 18, 2022
@dayo09
Copy link
Contributor Author

dayo09 commented Jul 18, 2022

As this job is considered to be lowered priority, I remove this job from the milestone.

@dayo09
Copy link
Contributor Author

dayo09 commented Oct 17, 2022

@lemmaa I made this 'refactoring cfg' feature out as can be seen in GIF, I wonder if you have any better idea about the UI :-D

This commit enables refactoring by renaming, so that the model file renaming can be automatically applied to related config files. It renames all the changed model file names in children config files.

ONE-vscode-DCO-1.0-Signed-off-by: Dayoung Lee [email protected]

For #768

GIF

1017-refactor

@dayo09
Copy link
Contributor Author

dayo09 commented Oct 19, 2022

How vscode support 'Refactor' of symbols

1019-refactor-vscode

  • Command name: 'Rename Symbol'
  • Options:Enter to 'Rename' & Shift+Enter to 'Preview'
  • 'Preview' shows Renaming Candidates
  • It edits the document, not saving it.

@dayo09
Copy link
Contributor Author

dayo09 commented Oct 19, 2022

TODOs

  • Introduce the simple refactoring command which we have discussed so far. It will ask user if he/she will do 'Refactor', and if user answers 'yes', it will alter all the related configs and save. Command name can be 'Rename Base Model' [OneExplorer] Support refactoring by renaming #1361

    • Keep the node's collapsing status
  • Make it not to save but to only edit using CfgEditor.

  • Consider if I can show the 'panel'(as you can see in above gif, vscode shows the list of lines to be changed) to let user select which config file to be changed.

  • Reference : vscode panel https://code.visualstudio.com/api/ux-guidelines/panel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant