Eric M. Ludlam | 5 Jun 2008 01:37
Gravatar

Re: Completion within a . or -> expression

Hi,

  I finally had time to examine this.  I checked a fix into
semantic-ctxt.el  

Enjoy.
Eric

>>> Michael Reiher <redm <at> gmx.de> seems to think that:
>Hi
>
>There is a small issue, but which is bugging me pretty often. Say I have 
>something like "fooAAA->bar();" and I want to change it to "fooBBB->bar();". 
>Ususally I first remove the "AAA" leaving me with "foo->bar();" and the 
>cursor right after "foo". Then I press TAB which calls 
>senator-try-expand-semantic for me, in order to complete it to 
>"fooBBB->bar();". However this doen't work and semantic inserts some more or 
>less random tags ...e.g. ThisIsSomeTag giving me 
>"fooThisIsSomeTag->bar();" ... and if you happen to press TAB a few times 
>until you realize whats going on, you have 
>"fooThisIsSomeTagThisIsSomeTagThisIsSomeTag->bar();", and clean up the 
>mess ... :)
>
>Greets Michael

--

-- 
          Eric Ludlam:                       eric <at> siege-engine.com
   Siege: www.siege-engine.com          Emacs: http://cedet.sourceforge.net

-------------------------------------------------------------------------
(Continue reading)

Michael Reiher | 5 Jun 2008 23:12
Picon
Picon

Re: Completion within a . or -> expression

On Thursday 05 June 2008 01:37, Eric M. Ludlam wrote:
> Hi,
>
>   I finally had time to examine this.  I checked a fix into
> semantic-ctxt.el
>
Thanks a lot! Works great!

Greets Michael

> Enjoy.
> Eric
>
> >>> Michael Reiher <redm <at> gmx.de> seems to think that:
> >
> >Hi
> >
> >There is a small issue, but which is bugging me pretty often. Say I have
> >something like "fooAAA->bar();" and I want to change it to
> > "fooBBB->bar();". Ususally I first remove the "AAA" leaving me with
> > "foo->bar();" and the cursor right after "foo". Then I press TAB which
> > calls
> >senator-try-expand-semantic for me, in order to complete it to
> >"fooBBB->bar();". However this doen't work and semantic inserts some more
> > or less random tags ...e.g. ThisIsSomeTag giving me
> >"fooThisIsSomeTag->bar();" ... and if you happen to press TAB a few times
> >until you realize whats going on, you have
> >"fooThisIsSomeTagThisIsSomeTagThisIsSomeTag->bar();", and clean up the
> >mess ... :)
> >
(Continue reading)

Picon
Favicon

Basic semantic configuration

Hello!

I have a project with several subdirectories, with their own Makefile. I tried:

(setq semanticdb-project-roots

        (list "~/wmi"

                      ))

but it doesn't work for internal subdirectories. Emacs says there is no project for them.

What can I do?

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Michael Reiher | 8 Jun 2008 00:57
Picon
Picon

Re: Including files from subdirs

On Friday 23 May 2008 15:58, Eric M. Ludlam wrote:
>
>   The reason semanticdb doesn't do include searches generically from a
> single root is that 1) a project might be huge, and it would take a
> long time, or 2) ccc.h might show up multiple times in different
> modules under the same general project.
Hmm, fair enough.

>
>   I recommend the ede-cpp-root which you setup as a 2 line
> configuration.  If you project is particularly complex, you can write
> a function to provide the include path based on location in a project.
>
>   ede-cpp-root is described briefly in the common/cedet.info manual
> for c++ configurations and that should get you started.
Ok, so I played around with that a bit today. It works as fine so far. Even 
the macros stuff. Cool!

I have a few annotations though, if you don't mind :)

- It would be nice to be able to put the project spec into a separate file in 
the project root, to not clutter the .emacs file with all kinds of 
projects ... and maybe a command to create a skeleton for me, where I just 
fill in includes and macros (interactively?)
- sometimes I was curious which include directories are actually taken into 
account for a certain file or if a project was actually loaded. Getting some 
info about this would be nice. In case its intended therefor, I tried 
ede-adebug-project. However I just get:

Symbol's function definition is void: semantic-adebug-new-buffer
(Continue reading)

Eric M. Ludlam | 8 Jun 2008 01:55
Gravatar

Re: Basic semantic configuration

>>> =?KOI8-R?B?5MXOydMg/sXSxc3J08/X?= <denis-cheremisov <at> yandex.ru> seems to think that:
>Hello!
>
>I have a project with several subdirectories, with their own
>Makefile. I tried:
>
>(setq semanticdb-project-roots
>        (list "~/wmi"
>                      ))
>
>but it doesn't work for internal subdirectories. Emacs says there is
>no project for them.  What can I do?

Hi,

  That project root variable is used to find databases of pre-parsed
files under a given root.  If you have never visited those files, they
won't be searched.  Most major searches have since moved to an
include-path based search, and looks only within files that were
explicitly included.

  A simple way to handle the include path is to use the ede-cpp-root
project type, described briefly in the cedet manual.

  Also, get your CEDET from CVS to get the latest (long list of) bug
fixes.

Eric

--

-- 
(Continue reading)

Eric M. Ludlam | 8 Jun 2008 02:56
Gravatar

Re: Including files from subdirs

>>> Michael Reiher <redm <at> gmx.de> seems to think that:
>On Friday 23 May 2008 15:58, Eric M. Ludlam wrote:
  [ ... ]
>>   I recommend the ede-cpp-root which you setup as a 2 line
>> configuration.  If you project is particularly complex, you can write
>> a function to provide the include path based on location in a project.
>>
>>   ede-cpp-root is described briefly in the common/cedet.info manual
>> for c++ configurations and that should get you started.
>Ok, so I played around with that a bit today. It works as fine so far. Even 
>the macros stuff. Cool!
>
>I have a few annotations though, if you don't mind :)
>
>- It would be nice to be able to put the project spec into a separate file in 
>the project root, to not clutter the .emacs file with all kinds of 
>projects ... and maybe a command to create a skeleton for me, where I just 
>fill in includes and macros (interactively?)

The curious mix of features in EDE has made it difficult for me to
settle on a design to move too.  I get a lot of complaints about
leaving stuff lying about in project directories.

I had recently created an ede-simple project also which is pretty
generic.  If you create a simple project, it will save it in a ~/.ede
directory, but as the name suggests, that is a pretty simple project
with no features.  The idea was I was going to make subclasses of
ede-simple for particular projects, like porting ede-cpp-root to
ede-simple, but I just haven't gotten that far.

(Continue reading)

Michael Reiher | 10 Jun 2008 22:33
Picon
Picon

Re: Including files from subdirs

On Sunday 08 June 2008 02:56, Eric M. Ludlam wrote:
> >>> Michael Reiher <redm <at> gmx.de> seems to think that:
> >
> >On Friday 23 May 2008 15:58, Eric M. Ludlam wrote:
>
>   [ ... ]
>
> >>   I recommend the ede-cpp-root which you setup as a 2 line
> >> configuration.  If you project is particularly complex, you can write
> >> a function to provide the include path based on location in a project.
> >>
> >>   ede-cpp-root is described briefly in the common/cedet.info manual
> >> for c++ configurations and that should get you started.
> >
> >Ok, so I played around with that a bit today. It works as fine so far.
> > Even the macros stuff. Cool!
> >
> >I have a few annotations though, if you don't mind :)
> >
> >- It would be nice to be able to put the project spec into a separate file
> > in the project root, to not clutter the .emacs file with all kinds of
> > projects ... and maybe a command to create a skeleton for me, where I
> > just fill in includes and macros (interactively?)
>
> The curious mix of features in EDE has made it difficult for me to
> settle on a design to move too.  I get a lot of complaints about
> leaving stuff lying about in project directories.
That's right. The scattering of semantic.cache files everywhere was not so 
nice, now with ~/.semanticdb this is a lot better :) But the case of project 
files is IMHO a different one, as these are mostly created intentionally when 
(Continue reading)

Michael Reiher | 10 Jun 2008 22:46
Picon
Picon

Re: Completion of members for struct-pointers

On Monday 12 May 2008 16:44, Eric M. Ludlam wrote:
> >>> Michael Reiher <redm <at> gmx.de> seems to think that:
> >
> >On Monday 12 May 2008 12:15, Per Nordlöw wrote:
> >> How can I get the feature enabled by
> >>
> >> (define-key c-mode-map "." 'semantic-complete-self-insert)
> >>
> >> but for the case when standing with the cursor directly after a pointer
> >> to C/C++ structure plus "->".
> >>
> >> Example:
> >> struct *statp = &stat;
> >> statp->
> >
> >Maybe the same issue: I noticed that when you define a variable like:
> >
> >SomeType *a = new SomeType;
> >
> >then Semantic has no type information for a. If you do
> >
> >SomeType *a;
> >a = new SomeType;
>
> Thanks for pointing that out.  I fixed the expression parser in C/C++
> to handle that case, and checked it in.
>
I just found another similar case:

ClassA xyz = abc().def();
(Continue reading)

Eric M. Ludlam | 11 Jun 2008 03:58
Gravatar

Re: Including files from subdirs

>>> Michael Reiher <redm <at> gmx.de> seems to think that:
>On Sunday 08 June 2008 02:56, Eric M. Ludlam wrote:
>> >>> Michael Reiher <redm <at> gmx.de> seems to think that:
>> >
>> >On Friday 23 May 2008 15:58, Eric M. Ludlam wrote:
  [ ... ]
>> It sounds like the solution you are looking for is a subclass of
>> ede-simple tuned to your style of project for providing an include
>> path, like ede-cpp-root.
>That's correct. The feature scope of ede-cpp-root would be sufficent, i.e. 
>local includes, system includes and a couple of macros.

I'll put this on my next list of things to do.  It's been on my list
for a while.  There are a bunch of EDE features just waiting to be
made available in a way that doesn't include building Makefiles.

Then again, I'm due to make a new tar-ball too.. but coding is more
fun.

>> After semantic has parsed a file, you can right-click on any include,
>> and get a context menu which is good for debugging include paths.  If
>> not, you need to get semantic-decorate-include working.  (It should if
>> you enable decorations.)
>Hmm, it doesn't. Maybe this is some autoload problem? 
>
>semantic-decoration-styles is only:
>(("semantic-decoration-on-protected-members") 
>("semantic-decoration-on-private-members") ("semantic-tag-boundary" . t))
>
>Though it probably should contain semantic-decoration-on-includes as well, 
(Continue reading)

Damien Profeta | 17 Jun 2008 10:07
Picon

friend not parsed

Hi,

I start using semantic for a huge project and it works quite well. But
of course if I send a mail, it's because I see an error.
The error is with the keyword friend. That's quite strange because it
is define in the grammar as far a can see in c.by but it seems it
cannot be parsed. (I say that because it is underline in red)

I paste a small example.
It would be great if friend can be well parsed and event greater if
class B can access to all the members of A.

/////////////friend example
class A
{
public:
	int pubVar;
private:
	int privateVar;

	friend class B;

};

class B
{
  public:
	int test();

};
(Continue reading)


Gmane