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 218466

Summary: Paste not refreshed according to context
Product: platform Reporter: Jiri Skrivanek <jskrivanek>
Component: ExplorerAssignee: Jaroslav Tulach <jtulach>
Status: VERIFIED FIXED    
Severity: normal CC: anebuzelsky, mmirilovic, pjiricka
Priority: P1 Keywords: REGRESSION
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 88161    
Bug Blocks:    

Description Jiri Skrivanek 2012-09-17 11:38:29 UTC
Bug 203826 is here again. It has the same symptoms. Moreover it is visible that status of actions (enabled/disabled) is changed after while when popup menu is shown. It is really slow. Does it some relation to broken clipboard?

-- steps from bug 203826 ---
Paste refactoring menu is not properly refreshed for the first time but only when context menu is called second time on the node of same type. It is high priority because it blocks commit validation tests and it is a regression. To reproduce:

- create java project
- create a new package
- right-click JavaApplication1.java node and choose Copy
- right-click newpackage. There is "Paste" instead of "Paste|Refactor Copy..., Copy"
- right-click newpackage again. It is OK now.
- right-click JavaApplication1.java node. There is "Paste|Refactor Copy..., Copy" item enabled but it should not be.
- right-click JavaApplication1.java node again. It is OK - Paste is disabled. 

Product Version         = NetBeans IDE Dev (Build 201209170001) (#1d9cebae5bf2)
  Operating System        = Windows 7 version 6.1 running on amd64
  Java; VM; Vendor        = 1.7.0_07; Java HotSpot(TM) 64-Bit Server VM 23.3-b01; Oracle Corporation
Comment 1 Jaroslav Tulach 2012-09-18 07:43:41 UTC
Caused by me messing with bug 88161.
Comment 2 Jaroslav Tulach 2012-09-18 07:45:43 UTC
Marking as duplicate. My fix created for bug 218447 seems to fix the "Paste|Refactory Copy.., Copy".

*** This bug has been marked as a duplicate of bug 218447 ***
Comment 3 Jiri Skrivanek 2012-09-19 07:02:48 UTC
Bug 218447 seems to be fixed but this one is still reproducible.
Comment 4 Jaroslav Tulach 2012-09-19 14:47:30 UTC
In such case, I can't reproduce the problem with 1d21e3acbfb1 

when I 'right-click newpackage. There is "Paste" instead of "Paste|Refactor Copy..., Copy"', I see "Paste|Refactor Copy..., Copy"
Comment 5 Jiri Skrivanek 2012-09-21 06:37:30 UTC
Still reproducible in dev build 201209210001. Steps:

- download from http://bits.netbeans.org/download/trunk/nightly/2012-09-21_00-01-28/zip/netbeans-trunk-nightly-201209210001.zip
- start IDE
- create java project (java feature enabled)
- right-click javaapplication1 package and choose "New|Java Package"
- click Finish to create package
- right-click JavaApplication1.java node and choose Copy
- right-click newpackage. There is "Paste" instead of "Paste|Refactor Copy...,
Copy"
- right-click newpackage again. It is OK now.
- right-click JavaApplication1.java node. There is "Paste|Refactor Copy...,
Copy" item enabled but it should not be.
- right-click JavaApplication1.java node again. It is OK - Paste is disabled.

Product Version: NetBeans IDE Dev (Build 201209210001)
Java: 1.7.0_07; Java HotSpot(TM) 64-Bit Server VM 23.3-b01
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 6 Jaroslav Tulach 2012-09-26 09:09:49 UTC
I've just tried it on my Linux with KDE4 and Metal L&F:

(In reply to comment #5)
> Still reproducible in dev build 201209210001. Steps:
> 
> - download from
> http://bits.netbeans.org/download/trunk/nightly/2012-09-21_00-01-28/zip/netbeans-trunk-nightly-201209210001.zip
> - start IDE
> - create java project (java feature enabled)
> - right-click javaapplication1 package and choose "New|Java Package"
> - click Finish to create package
> - right-click JavaApplication1.java node and choose Copy
> - right-click newpackage. 

There is "Paste|Refactor Copy...,  Copy"
Comment 7 Jiri Skrivanek 2012-09-26 09:12:17 UTC
Maybe platform or JDK specific.
Comment 8 Jaroslav Tulach 2012-09-26 09:30:57 UTC
OK, on Windows XP the behavior is broken.
Comment 9 Jaroslav Tulach 2012-09-27 11:02:41 UTC
Changeset: c5430e234bdf
Author:    Jaroslav Tulach <jtulach@netbeans.org>
Date:      2012-09-27 12:59
Message:   #218466: Wait for background refresh of paste action delegates before returning them when requested.
Comment 10 Marian Mirilovic 2012-09-27 13:43:34 UTC
Would be nice to have this in Beta, so we will get an earlier feedback from end users.
Comment 11 Jiri Skrivanek 2012-09-27 14:03:30 UTC
I don't have a build to verify it in. It is P1 because it is a regression and it blocks tests. Otherwise it is not so critical because it works on second attempt.
Comment 12 Antonin Nebuzelsky 2012-09-29 09:26:04 UTC
(In reply to comment #11)
> I don't have a build to verify it in. It is P1 because it is a regression and
> it blocks tests. Otherwise it is not so critical because it works on second
> attempt.

I am removing 73beta-stopper tag. Too risky for Beta now, and not a P1 from user's point of view.

Jirko, please verify the fix in trunk soon anyway.
Comment 13 Quality Engineering 2012-10-01 12:02:36 UTC
Integrated into 'main-golden', will be available in build *201210010929* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c5430e234bdf
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #218466: Wait for background refresh of paste action delegates before returning them when requested.
Issue #218466 - Paste not refreshed according to context
Comment 14 Jiri Skrivanek 2012-10-01 14:01:49 UTC
Verified in NetBeans IDE Dev (Build 201210010929).