Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Filtering Outline View
Filtering Outline View [message #217671] Mon, 23 June 2008 11:59 Go to next message
Eclipse UserFriend
Is there a way to filter the Outline view so only the functions appear? I
would prefer to not see the #defines, typedefs, globals or function
declarations. Or is there a different view I should be opening?

Thanks
Re: Filtering Outline View [message #217694 is a reply to message #217671] Mon, 23 June 2008 15:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jason,

There is an option to hide macro directives. You can access this by
using the menu (the down arrow icon) on the outline view, and then
selecting the Filters... menu item. It provides additional filtering
options (name filter patterns, exclude macro directives, and exclude
using directives). This can provide a partial solution to your
filtering needs.

Alternatively, if you have some time, you could write a custom filter.
For an example of a custom filter, you can take a look at the plugin.xml
in the org.eclipse.cdt.ui plug-in and search for the macro filter.

Cheers,
Jonathan

jason wrote:
> Is there a way to filter the Outline view so only the functions appear?
> I would prefer to not see the #defines, typedefs, globals or function
> declarations. Or is there a different view I should be opening?
>
> Thanks
>
Re: Filtering Outline View [message #217784 is a reply to message #217694] Tue, 24 June 2008 17:36 Go to previous message
Eclipse UserFriend
Hi,

This is the first time I've sent to the cddt newsgroup, so if I've
missed some critical info, be kind ;-)

I'm using Eclipse 3.3.2 with CDT 4.0.x (4.0.3 core) in winxp, configured
to use the cygwin gcc toolchain

I'm having trouble with the outline view. When the following code exists
in a file:

#if defined(_WIN32)
typedef unsigned long sometype;
#endif
THREAD_RET sconnThreadMain(void *arg);

Outlining stops and never displays sconnThreadMain or anything that follows.

However using ifdef instead of if defined works:

#ifdef _WIN32
typedef unsigned long sometype;
#endif
THREAD_RET sconnThreadMain(void *arg);

Is this a known behaviour?
Is "#if defined(...)" supposed to be supported? It seems odd that it
completely stops the outlining process.

I have converted my simple cases to use #ifdef but other more
complicated uses with compound conditions etc are more troublesome. I'd
appreciate hearing if there are other solutions to this problem.

Cheers
Dave
Previous Topic:how to get the *.o files to a separate folder?
Next Topic:includes hosed
Goto Forum:
  


Current Time: Fri Jun 06 11:30:03 EDT 2025

Powered by FUDForum. Page generated in 0.03883 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top