emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDE


From: Eric Ludlam
Subject: Re: IDE
Date: Tue, 13 Oct 2015 22:32:36 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/12/2015 07:05 AM, Oleh Krehel wrote:
What's missing, in my opinion, is only faster and more precise parser
(CEDET, GCC etc). For example, currently `semantic-fetch-tags' parses
public/private/protected labels as tags, instead of applying these
properties to actual tags. If that were so, it would be very easy to add
a public/private/protected icon to each tag, just like MS VS does it.

The parser saves the buffer as close as it can - that allows it to be regenerated later. If you use the 'semantic-format-*' functions, such as the uml version, it will identify the protection and use the right symbology. If you are writing the code that calls the formatter, you need to specify the parent tag.

Another example is the QT code: it's a popular LGPL C++ framework that's
currently hard to setup for CEDET.
For instance, `#include <QtGui/QPushButton>` is a plain file without an
extension with only this code inside:

     #include "qpushbutton.h"

Since the extension isn't recognized, it's not parsed by CEDET.  And I
have to write `#include "qpushbutton.h"` in my application instead of
the more preferred `#include <QtGui/QPushButton>`, because that way I
get tag completion.

You can solve this by adding the qt include directory to auto-mode-alist. There is a workaround posted in emacswiki roughly like this:

(setq qt4-base-dir "/usr/include/qt4")
(setq qt4-gui-dir (concat qt4-base-dir "/QtGui"))
(semantic-add-system-include qt4-base-dir 'c++-mode)
(semantic-add-system-include qt4-gui-dir 'c++-mode)
(add-to-list 'auto-mode-alist (cons qt4-base-dir 'c++-mode))

There are a few extra steps for Qt preprocessor symbols and more, but the above lets you avoid the no extension problem.

Could someone explain to me if making GCC the dependency of Emacs would
be a good idea, from technical and freedom point of view?  Personally, I
wouldn't care if Emacs executable would get inflated a bit more, if that
meant access to true IDE features, which are only possible with a
precise and fast parser.

There are folks using CEDET without gcc on their system, or at least, they've needed configuration help with alternate compilers.

Eric



reply via email to

[Prev in Thread] Current Thread [Next in Thread]