This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258112 - Code Completion comes up after copy/paste value for example
Summary: Code Completion comes up after copy/paste value for example
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Other
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-23 12:40 UTC by ChrisLE
Modified: 2016-09-05 09:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ChrisLE 2016-02-23 12:40:20 UTC
In Javascript and I think in Java and PHP so I think in all native languages which are included in netbeans, there is a pain in the ass bug when I have this code:

testCode.test().then(function(foo) {
   console.log();
});

when I copy and paste the foo argument to the log method, the code completion comes up, what it shouldn't. This is a JS example, but the same happens for java too. The same happens when I change "test" to 'test' with selecting the word and hit ', after this the code completion comes up, which is weird.

This happens, when I enable the option inside Code Completion:
Enable Auto Popup Completion Window for:

All possible Situations.


When I disable this option, everything is fine, but this is not an option. Of course, I want it in ALL possible situations, because I don't want to hit ctrl + space or a dot. So for me this seems a bug inside the code completion functionality.
It doesn't make sense to me, that the code completion comes up, after changing " to ' or to copy/paste stuff, because after this, I want to navigate with the arrow keys to go to the next line and this is not possible, because I navigate inside the code completion window. I have to hit "esc" to cancel this. And this is a pain in the ass.

WebStorm or Idea does it the right way, no code completion on copy/paste but on typing values. I don't have to hit ctrl + space or smth like that.


Regards

Chris
Comment 1 Dusan Balek 2016-08-30 09:47:26 UTC
Cannot reproduce in Java source. Reassigning to Javascript for evaluation.
Comment 2 ChrisLE 2016-09-05 09:10:51 UTC
I only can reproduce it in JS, I will have a look at PHP and Java again.

It happens, as I said when I paste a value to console.log(foo); than the code completion comes up and shows foo. This is not happening in Java for System.err.println, for example. And the other thing with the " and ' still brings the code completion. It doesn't matter whether I add ' or " to a foo for example or change from " to ' and vice versa.

Those behaviours only happens with the code completion option: "All possible Situations". But I need this option enabled, because when I type "a" the code completion should comes up, I don't want to hit ctrl + space.