[ 
https://issues.apache.org/jira/browse/NETBEANS-3032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929019#comment-16929019
 ] 

Czukowski edited comment on NETBEANS-3032 at 9/13/19 7:04 AM:
--------------------------------------------------------------

[~junichi11] thank you for your reply!

These are indeed great features that have their uses, however they involve 
invoking various kinds of dialogues that might be at times little bit 
distracting, and when working on already existing code, the generated code is 
likely to be placed at a different location than I would write it so it still 
requires a few tweaks afterwards. That's why I thought a feature like 
contextual copy & paste would be a good addition for some situations :) (of 
course, if at all possible or feasible to implement)


was (Author: czukowski):
[~junichi11] thank you for your reply!

These are indeed great features that have their uses, however they involve 
invoking various kinds of dialogues that might be at times little bit 
distracting, and when working on already existing code, the generated code is 
likely to be placed at a different location than I would write it so it 
requires a few tweaks afterwards. That's why I thought a feature like 
contextual copy & paste would be a good addition for some situations :) (of 
course, if at all possible or feasible to implement)

> Copy & paste improvement of variable names in PHP editor
> --------------------------------------------------------
>
>                 Key: NETBEANS-3032
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3032
>             Project: NetBeans
>          Issue Type: New Feature
>          Components: php - Editor
>    Affects Versions: 11.1
>            Reporter: Czukowski
>            Priority: Minor
>         Attachments: netbeans-3032.gif
>
>
> I would like to propose an improvement for PHP editor. When one needs to have 
> class method that set object properties, such as setter methods or 
> constructors for dependency injection, method parameter names are often same 
> as the object properties, so copy and pasting of the parameters names often 
> occurs. However the variable names are being selected including the dollar 
> sign prefix {{$}} and after pasting it needs to be removed. If there are many 
> parameters to set, this may become very routine work.
> The idea is that when the paste _containing a variable name_ occurs right 
> after {{$this->}} (or perhaps rather after object instance operator {{->}}), 
> then it will be pasted _without the {{$}} sign_. I believe this would greatly 
> improve the workflow.
> {code:php}
> function __construct($someProperty) {
>     $this->someProperty = $someProperty;
> }
> {code}
> So in order to achieve property assignment, one would need to type
> {{$this->}}, ctrl+v, {{=}}, ctrl+v
> instead of, for example:
> {{$this->}}, ctrl+v, ctrl+back-arrow (multiple times), backspace, end, {{=}}, 
> ctrl+v
> Of course, there could be variable variables, but I believe these haven't 
> been considered a good practice for a long time and in any case, are much 
> much more rare than the use case above.
> Do you see any possible drawbacks to this?
> There could also be a suggestion to generate the assignment for even less 
> keystrokes, but I figure it would be far more complex solution than this.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to