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 253794 - Open properties files opens 2 copies if moved to new pacakge
Summary: Open properties files opens 2 copies if moved to new pacakge
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-26 02:08 UTC by MackSix
Modified: 2015-11-14 03:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Maven JSF Project (12.84 KB, application/x-zip-compressed)
2015-07-26 02:08 UTC, MackSix
Details
additional fix (1.34 KB, patch)
2015-09-17 13:46 UTC, Ondrej Vrabec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2015-07-26 02:08:23 UTC
Created attachment 154898 [details]
Maven JSF Project

1. Import attached Maven JSF project in NetBeans.
2. Under "Other Sources"->src/main/resources->newpackage, right click on ValidationMessages.properties and choose Open.
3. Notice a single editor window opens. Close the editor window. 
4. Move all the properties files to the other package in the same folder.
5. Right click on ValidatinoMessages.properties.

Result: Two editor windows open.

Expected: One editor window opens. 

Each time I move the files to a new package causes duplicate editor window to open.

Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Tomas Stupka 2015-07-27 14:54:10 UTC
was able to reproduce with a j2se project and a properties file being moved between packages. 

- create java app
- have two packages
- create a properties file in a package - ctx menu open - opens 1 editor tab
- move the file to another package - ctx menu open - opens 2 editor tabs
- and so on ...


reassigned for further evaluation
Comment 2 Ondrej Vrabec 2015-09-17 13:45:51 UTC
Pushing a partial fix, that does not fully fixes this but at least max. 2 tabs are opened...

Fix: http://hg.netbeans.org/core-main/rev/4c61f8796bfa
Comment 3 Ondrej Vrabec 2015-09-17 13:46:37 UTC
Created attachment 156250 [details]
additional fix
Comment 4 Ondrej Vrabec 2015-09-17 13:47:38 UTC
attaching an additional fix that seems to help, but it looks kind of scary, i do not want to push it now before release.
Comment 5 Quality Engineering 2015-09-20 01:32:46 UTC
Integrated into 'main-silver', will be available in build *201509200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4c61f8796bfa
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #253794 - Open properties files opens 2 copies if moved to new pacakge
Remove old open cookie from the cookie set.
Comment 6 Ondrej Vrabec 2015-11-11 19:29:42 UTC
applying the second patch, let me know if it fixes your issue or if it brings any regressions.

fix: http://hg.netbeans.org/core-main/rev/b2a2ca6d1b0d
Comment 7 Quality Engineering 2015-11-14 03:01:38 UTC
Integrated into 'main-silver', will be available in build *201511140002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b2a2ca6d1b0d
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #253794 - Open properties files opens 2 copies if moved to new pacakge