Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319933 - Ctrl+Click on a link (source code navigation) is sometimes ignored
Summary: Ctrl+Click on a link (source code navigation) is sometimes ignored
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 6.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 19:50 EDT by Ricardo Jasinski CLA
Modified: 2017-07-27 20:26 EDT (History)
3 users (show)

See Also:


Attachments
Sample project/workspace (C++) to reproduce bug#319933 (850.27 KB, application/x-gzip)
2010-07-14 19:53 EDT, Ricardo Jasinski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Jasinski CLA 2010-07-14 19:50:43 EDT
Build Identifier: 20100617-1415

This bug exists and it is real. It has been around since Galileo and has been confirmed on several machines in our office. We have always used the packages labeled 'Eclipse IDE for C/C++ Developers'. From what we were able to identify, it occurs in Linux systems with Gnome 2.30.0, but not on Gnome 2.22.3.

Short description of the problem: when Ctrl+Click is used to navigate on the source code (i.e., click on a method, attribute, global variable, etc.), the editor almost never opens the declaration in the first try. Sometimes you have to double click while holding ctrl to be taken to the definition. But, most of the times, you have to click wildly, a lot of times and very fast, in order to make the navigation work.

Other relevant information:
  - if you simply click the target (without holding ctrl), and next hit F3, the navigation ALWAYS works immediately;
  - if you have, say, 2 functions in your source code, it is possible that navigations works ok for one of them, and is buggy for the other;
  - visible feedback indicates that, even though navigation does not work, the click is perceived by the UI, since the cursor changes from the usual hand (link select) to the text select caret, and the underlining disappears while you hold the mouse button.

On the last 3 years, we have use Ubuntu versions 8.xx, 9.xx and 10.04. This bug was never seen on Ubuntu 8.xx, which uses Gnome 2.22.3; by then, we used Europa and Galileo. The first occurrences started with Ubuntu 9.04, which I don't have at hand right now. 

Reproducible: Always

Steps to Reproduce:
1. open the IDE in a recent Linux/Gnome system (say, Ubuntu 10.04)
2. open your favorite C++ project, or use the one I'll attach to this bug report
3. go to a header file (.h), hold the CTRL key and click on a function declaration with the left mouse button
4. if you are lucky, navigation will work; however, in the supplied sample project, you almost always need to Ctrl+Click from 2 to 5 times, before you are taken to the corresponding declaration.
Comment 1 Ricardo Jasinski CLA 2010-07-14 19:53:06 EDT
Created attachment 174363 [details]
Sample project/workspace (C++) to reproduce bug#319933
Comment 2 Remy Suen CLA 2010-07-14 19:56:11 EDT
Could be a generic C/C++ editor problem or something in the Text framework or SWT. There is also bug 319834 opened about Java editors though that doesn't really have a lot of information or context.
Comment 3 Nathan Ridge CLA 2017-01-05 02:14:44 EST
Ricardo, are you still experiencing this problem?
Comment 4 w x CLA 2017-07-05 23:21:05 EDT
how to reproduce this bug in Oxygen:
Step 1: new c hello world project ,main source code is like :
#include <stdio.h>
#include <stdlib.h>

int main(void) {
	puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
	return EXIT_SUCCESS;
}

//END FILE

ctrl + click willl work on include ,and puts

Step 2: add some comment like // * a, ctrl + click stop work.

#include <stdio.h>
#include <stdlib.h>
// * a,
int main(void) {
	puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
	return EXIT_SUCCESS;
}

//END FILE

Notice: any comment pattern like "* word," will stop ctrl+click . 
pattern is: <one star char><one blank char><at least one alpha char><one comma char>
my environment: Oxygen x32 x64 both have same problem, BUT neon is OK
Comment 5 Nathan Ridge CLA 2017-07-06 00:16:08 EDT
(In reply to w x from comment #4)
> Notice: any comment pattern like "* word," will stop ctrl+click . 

It sounds like you're running into bug 517610. Please try the workaround described in that bug.
Comment 6 Nathan Ridge CLA 2017-07-27 20:26:28 EDT
Closing as there hasn't been a response to comment 3.