Replies: 3 comments 4 replies
-
Hey, I am rishabh. I talked to you about this issue earlier. so I have been browsing your codebase and researching this issue since Friday. can you guide me on how to proceed further and what can of example are you expecting before the proposal. Morever, there are 28 modules in the project. I have read the contributing guide but i am finding the code a bit overwhelming so can you guide me a bit from where to start? |
Beta Was this translation helpful? Give feedback.
-
@erha19 okay no problem |
Beta Was this translation helpful? Give feedback.
-
Will be close by #1594. |
Beta Was this translation helpful? Give feedback.
-
The meaning of this topic can be simply understood as "How to implement cross-window file operations through OpenSumi".
On the OpenSumi, now we can use
Cmd+C / Cmd+V
or drag some files from one position to the others on the same IDE window, but we can't use this function while copy or drag some files from one window to the other window.You can see the dragging logic here: file-tree-dnd.service.ts#L68, it will bind into all TreeNodes on the fileTree view, and use the mv API defined in the FileService to move the files, see file-tree-api.service.ts#L166, you can also see the similar codes in the case of Copy-Paste.
There are some ideas:
On the VS Code, it use an
clipboardService
to save the resources list, and implement difference service with the Web and Electorn, you can see some code here:On the Web, it can just copy-paste files on the same window,
This is good enough, but it can be done better, e.g. you can also use some shared storage on the web to handle this, such as localstorage.
On the Electron, it use
this.nativeHostService.writeClipboardBuffer
function to share and update the copy resources list , so you can copy-paste files cross-window.Also, our FileService is not running very well, there will be some redundant or wrong events, we also hope to consider and deal with these problems together.
Beta Was this translation helpful? Give feedback.
All reactions