简体   繁体   English

Android Studio代码复制粘贴题

[英]Android Studio code copy and paste question

I have a bunch of code with some lines commented out, and I'd like to copy all of the code including the comments that android studio automatically adds.我有一堆代码,其中一些行被注释掉了,我想复制所有代码,包括 android studio 自动添加的注释。

I've tried various combinations of ctrl+c with shift, alt etc, but when pasting into notepad (for example) only the code shows and not the automatic comments.我已经尝试过 ctrl+c 与 shift、alt 等的各种组合,但是当粘贴到记事本(例如)时,只显示代码而不显示自动注释。

For example after a closing bracket, AS often adds //Container to the lines automatically.例如,在右括号之后,AS 通常会自动将//Container添加到行中。 However, when if I add similar comments manually, those do get copied.但是,如果我手动添加类似的评论,这些评论会被复制。 Is there a way to copy the auto comments?有没有办法复制自动评论?

EDIT: I tried to give this question a better Title, but StackOverflow really didn't like any variation on "How do I copy and paste commented code in Android Studio?"编辑:我试图给这个问题一个更好的标题,但 StackOverflow 真的不喜欢“如何在 Android Studio 中复制和粘贴注释代码?”的任何变化。 Also edited as I didn't realise my own manually written comments were being copied when I asked this question.还进行了编辑,因为当我问这个问题时,我没有意识到我自己手动编写的评论被复制了。

Those are just hints added by the IDE (Intellij + dart plugin), not actual code (comments).这些只是 IDE(Intellij + dart 插件)添加的提示,而不是实际代码(注释)。 The dart plugin calls them closing labels. dart 插件称它们为关闭标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM