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 254065 - Cannot delete duplicated 'Fonts & Colors' profile
Summary: Cannot delete duplicated 'Fonts & Colors' profile
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 245174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-02 07:03 UTC by stwr
Modified: 2015-08-30 07:51 UTC (History)
2 users (show)

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 stwr 2015-08-02 07:03:46 UTC
Product Version: NetBeans IDE 8.1 Beta (Build 201507302201)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\8.1beta

Test Case --> http://services.netbeans.org/synergy/client/app/#/case/2168/suite/1787/v/1

Actually there is no way to remove duplicated profile. Once the 'Apply' button is hit the duplicated profile is back in the list of profiles.
Moreover there is no runtime exception emitted.
Comment 1 manikantannaren 2015-08-03 03:23:44 UTC
Delete button restores to default, but the duplicate profile still available.
Comment 2 Milutin Kristofic 2015-08-04 14:42:48 UTC
It works for me.

1, I duplicate profile Netbeans and named it Netbeans 2
2, I delete Netbeans 2
3, Netbeans 2 is not anymore in combo box.

Can you describe your steps and what happens to you?
Comment 3 stwr 2015-08-04 15:51:58 UTC
Sure. I executed following, a bit extended, scenario. Each step is followed by its results represented individually by single '>'.

--Use Case--

1. Open Options, Fonts & Colors
> My current profile is 'Netbeans'

2. Hit 'Duplicate...', name it 'Netbeans 2', confirm by 'OK'
> The profile 'Netbeans 2' is created
> The profile 'Netbeans 2' is selected
> The 'Apply' button is active

3. Hit 'Apply'
> The profile 'Netbeans 2' remains selected
> The 'Apply' button is not active

4. Hit 'Delete'
> The profile 'Netbeans 2' is not contained in the list of profiles
> The profile 'Netbeans 5.5' is selected now
> The 'Apply' button is active

5. Hit 'Apply'
> The profile 'Netbeans 2' is back in the list of profiles and has the last index
> The 'Apply' button is not active

6. Select 'Netbeans 2' from the list of profiles

7. Hit 'Delete'
> The profile 'Netbeans 2' is not contained in the list of profiles
> The 'Apply' button is not active

8. Close Options

9. Open Options, Fonts & Colors
> The profile 'Netbeans 2' is back in the list of profiles and has the last index
Comment 4 Milutin Kristofic 2015-08-05 11:36:10 UTC
Cool, thank you very much for detailed steps, I can reproduce it now, I will try to fix it.
Comment 5 Milutin Kristofic 2015-08-05 15:31:49 UTC
I fixed an issue with Annotations that prevented duplicated profile to be deleted. http://hg.netbeans.org/jet-main/rev/eed26a5bbaf7

However, there is still bug with synchronization. Since pressing apply (or ok button) is deleting profile, loading all profiles into combobox is sometimes faster than deleting profile. It's now always deleted, but user needs press OK, or apply twice. 

I will look at the solution. I am CCing Fanis, since he rewrite a code around isChanged and applyChanges in FontsAndColors panels, I made some changes, but it is not enough. 


At least now you can delete profile with OK button.
Comment 6 Quality Engineering 2015-08-06 01:24:35 UTC
Integrated into 'main-silver', will be available in build *201508060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/eed26a5bbaf7
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #254065 - Cannot delete duplicated 'Fonts & Colors' profile
Comment 7 Milutin Kristofic 2015-08-12 11:11:53 UTC
*** Bug 245174 has been marked as a duplicate of this bug. ***
Comment 8 stwr 2015-08-30 07:51:13 UTC
Product Version: NetBeans IDE Dev (Build 201508290002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\dev

I can confirm that:
- there are 50% of chances (it will be removed or not :)) that the duplicated profile will be removed from the list once it is deleted and OD are confirmed by Apply
- the duplicated profile does not exist in the list of profiles once it was deleted and entire OD has been reopened