Theia: Copy pasting a file in the same directory

Created on 2 Apr 2019  路  8Comments  路  Source: eclipse-theia/theia

Description

Copy pasting a file in the same directory should either rename it (.1, .2) or ask for a new name before adding it. In the browser I get either "Please use the browser's paste command or shortcut." or nothing.

Reproduction Steps

Copy paste

OS and Theia version:
Ubuntu v0.5.0

uux

Most helpful comment

It would be nice if we could align this, if you duplicate it multiple times it adds _2 anyways.
I could take a look at this on sunday. But need to familiarize myself with the core first.

Sure, I can help you out if you ever have any questions

All 8 comments

I know the duplicate option exists, maybe it could be possible to trigger this action in this particular case?

Yes, I just verified and calling the duplicate might be the way to go, it'll handle creating a unique URI (example: a.py to a_copy.py). That seems to align with how VSCode treats the copy pasting in the same directory.

@toonvd also, do you think the behavior of duplicate should be modified?

  1. a.py to a.1.py (VSCode way)
  2. a.py to a_copy.py (Theia way)

It would be nice if we could align this, if you duplicate it multiple times it adds _2 anyways.
I could take a look at this on sunday. But need to familiarize myself with the core first.

It would be nice if we could align this, if you duplicate it multiple times it adds _2 anyways.
I could take a look at this on sunday. But need to familiarize myself with the core first.

Sure, I can help you out if you ever have any questions

In the browser I get either "Please use the browser's paste command or shortcut." or nothing.

@toonvd Is it confusing somehow? The issue is that your browser does not support programmatic paster, so we cannot trigger it from the code. Only you can do it via browser menu -> paste.

Hi @akosyakov

The problem was I tested it via browser menu -> paste and it still did not have the desired effect. EG, copy paste of a file in the same folder should result in a duplicate like in VSCode. The "Please use the browser's paste command or shortcut." warning itself was clear enough for me.

P.s. mentioned Vince by accident :3

ok, if you align it with VS Code it would be great

Was this page helpful?
0 / 5 - 0 ratings