You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
When calling ProjectManager.createNewItem() with skipRename set to false in an extension and running it on the Linux version of Brackets (sprint 40), the renaming is skipped anyway.. The item just gets created as if skipRename was set to true..
I can use ProjectManager.renameItemInline() in the promise of createNewItem(), but since renameItemInline() doesn't return a promise, I can't chain any action to it for when the user is done renaming..
Also renameItemInline() doesn't seem to work either when used alone.. It only works together with createNewItem()..
I've created a small test extension to demonstrate the issue..
The text was updated successfully, but these errors were encountered:
@bodhiBit If you right-click in the project tree and choose New File, does the inline naming/renaming UI work properly in that case? If so, it might be helpful to compare your extension's code to the way in which DocumentCommandHandlers._handleNewItemInProject() invokes ProjectManager.createNewItem()...
Similarly for ProjectManager.renameItemInline(), you can see an example of it being used alone in DocumentCommandHandlers.handleFileRename(). Does this differ from the way you're invoking it?
The built-in "New File" and "Rename" works fine.. I suspect it has something to do with the fact that I'm invoking the commands from the menu, which is implemented differently in Linux..
I've added delayed versions (wrapped in setTimeout) of the commands in my test extension.. The delayed commands works perfectly (except for the delay of course)..
Perhaps the menu somehow cancels the renaming when it's closing after a command has been selected..?
@bodhiBit I believe this is fixed in the ProjectManager branch (pull request #9015) and will be fixed when #8788 is complete. If it's not, it's a bug that should be easy to correct but I'm pretty sure that the new implementation of createNewItem is properly handling skipRename flag. (renameItemInline also returns a promise now).
When calling
ProjectManager.createNewItem()
withskipRename
set tofalse
in an extension and running it on the Linux version of Brackets (sprint 40), the renaming is skipped anyway.. The item just gets created as ifskipRename
was set totrue
..I can use
ProjectManager.renameItemInline()
in the promise ofcreateNewItem()
, but sincerenameItemInline()
doesn't return a promise, I can't chain any action to it for when the user is done renaming..Also
renameItemInline()
doesn't seem to work either when used alone.. It only works together withcreateNewItem()
..I've created a small test extension to demonstrate the issue..
The text was updated successfully, but these errors were encountered: