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 241617

Summary: C++ source/header focus in different tab group issue
Product: cnd Reporter: t.grinwis
Component: NavigationAssignee: issues@cnd <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description t.grinwis 2014-02-10 01:16:43 UTC
Netbeans 8.0beta is running on Ubuntu 13.10, jdk1.7.0_45
and use the jvi plugin.

I am working on several *.cpp *.h files in 2 different tab groups (left/right).
All *.cpp *.h files are opened in the left and right tabgroup.

The problem/annoyance I encounter is the following:

I am working on the *.cpp file in the right tab group, and want to inspect some code in *.cpp from the left tab group.

But in the left tabgroup the *.h is active, so I move to left tab group and change Header/Source (in my case button F4)

Now the big surprise is in which tab group the *.cpp file is becoming active.
Naturaly I expect in the SAME tabgroup where clicked F4 but this is NOT the 
case. 
The *cpp file is active now in the tabgroup where I was original editing a *.cpp file. Now I have to reorganize my right tab group (remember what file I was editing, etc, same for the left tabgroup, open file via dropdown etc. ) 

I would really appriciate that netbeans changes this behaviour same as in QtCreator and KDevelop. There stays the focus in the same tabgroup where one is switching Header/source.

To reproduce this.
Open a bunch of *cpp *h (e.g. 4) in left and right tabgroup.
select a *cpp or *h in a tab group and switch header/source and you will
see that the focus is not always staying in the same tab group.
Comment 1 Stanislav Aubrecht 2016-02-02 09:05:45 UTC
This is very likely the default NetBeans behavior - when activating a CPP editor/TopComponent the window system detects that the file is already opened and activates it in the other editor group.
Reassigning to CND team for evaluation.
Comment 2 t.grinwis 2016-02-02 20:09:43 UTC
(In reply to Stanislav Aubrecht from comment #1)
> This is very likely the default NetBeans behavior - when activating a CPP
> editor/TopComponent the window system detects that the file is already
> opened and activates it in the other editor group.
> Reassigning to CND team for evaluation.

Hello Stanislav, the 'default Netbeans behaviour' you describe is exactly what my problem is. I would like behaviour such that the SAME, current active editor group 
Stays active whit the desired cpp opened. Same behaviour as in qtcreator and kdevelop.
Kind regards,
Teun