This seems like a timely email. I got frustrated (again) with my
ruby / rails / emacs set up. I had tried ecb and cedet before and
quit using it. But I'm going to spend most of today trying to set it
back up again. Part of this is the ruby-semantic code seems to have
moved along a bit (but I haven't tried it yet).
I need to educate myself on the boundaries between ecb and cedet. I
view them as "one". But, I think I might want cedet and not ecb. I
thijnk much of my frustration is just ignorance on the options and
their interaction. I never really spent any quality time with the
documentation.
Wish me luck :-)
pedz
On Jan 5, 2008, at 9:25 PM, Eric M. Ludlam wrote:
> Hi,
>
> Thanks for the long detailed error report.
>
> The first thing I noticed was that semanticdb-dump-all-table-summary
> wasn't very useful. As I had recently switched to saving all my cache
> files in a .semanticdb directory, I also saw this when I was working
> through your email. I updated semanticdb.el, and semanticdb-file.el
> to put the directory referenced in there, not the save directory. The
> old default, this was true by accident.
>
> A side effect of me checking in that change, is that semantic will
> now save in the ~/.semanticdb directory as the new default, instead of
> in the local directory. You will need to delete your cache files to
> get it updated.
>
> Then you asked:
>
>> From
>> my earlier attempts with semantic I recall that back then semantic
>> couldn't chase dependencies and required me to generate database
>> files for all source files in the project tree in advance. I even
>> wrote a function to do that, but since the documentation mentions
>> nothing about this, I suppose it shouldn't be necessary anymore?
>
> Sort-of Correct. The major change from this past summer/fall was that
> semantic is now better at tracking down all your header files as long
> as it has some clue where they are. One way would be the fcn you
> previously provided.
>
> The other is via ede-simple, or ede-cpp-root (more likely for this
> case.) Semantic has always used ede to find header files in c++, but
> most folks don't use it when existing build systems are in place. The
> simpler ede feature just lets you build an EDE project that will then
> automatically setup your project root, and project level include
> path. I think you also get project-local-variables and some other
> stuff too, but I hadn't played with that yet.
>
> I went with the ede project approach since I didn't want to build a
> second project manager that was all semantic just to do this job.
>
> Sadly, I haven't gotten this into the regular doc yet. See the
> commentary in ede-cpp-root for more. I haven't gotten any feedback on
> it yet, so it is likely a bit rough. I rigged up my work system to
> use it and it does a good job.
>
>
> Another recent change is that semanticdb used to not open files it
> hadn't opened before, even if you configured it to with the throttle.
> This was a bug I fixed, and I also changed the default to enable that
> by default. Therefore, semantic only needs to know a directory exists
> within a project to find a file.
>
>
> Next up you said:
>
>> It
>> seems that according to the documentation everything should be set
>> for completion, so I open a .cpp file, the corresponding .hpp file
>> and go to a constructor of a class in the .cpp file. I can't
>> complete anything with semantic-ia-complete-symbol; not local
>> variables, not member variables.
>
> About 3 days before this email, i had committed a patch someone had
> sent me a while back that changed how the text under the cursor was
> parsed. It had a bug if the cursor was at the end of a line. I fixed
> that and checked that change in tonight.
>
> Second, you tried completing on a constructor. I looked into that a
> bit, and discovered that if you have:
>
> myclass(a -!-
>
> it would think "myclass" was the type (class), not the constructor. I
> added some logic to find the constructor within the class, and now
> this gets the correct datatype for whatever "a" is about to complete
> to.
>
> At the very end you state:
>
>> It looks like things
>> haven't improved much in a year.
>
> In many ways, you are correct. I haven't been able to spend the time
> here that I'd like to. What did change was mostly in the completion
> area and trying to streamline some of the startup doc which you were
> referencing. One of the more important updates was handling c++
> namespaces more robustly. It actually works most of the time now,
> instead of sometimes when you are lucky.
>
> I also rebuilt most of the analyzer which was getting difficult to
> maintain, and there is now a scope manager. The scope manager didn't
> add explicit features, but it did add scope caching, which was needed
> did to speed things up. There are many more internal
> cross-referencing caches now which allows lookups to go much faster.
>
> There was also the ede-simple changes I mentioned above.
>
> These were the changes I needed to make smart completion work on my
> code-base at work, whose source code is measured in Gig. I'd actually
> never been able to do completion at work before.
>
> Hopefully the changes I checked into CVS will solve your initial
> problems, and also I hope the ede-cpp-root trick can solve your need
> to manage your databases explicitly. The code there is quite simple,
> so it should be straight forward to fix if it doesn't do what you
> need.
>
> Thanks
> Eric
>
>>>> Hannu Koivisto <azure@...> seems to think that:
>> Greetings,
>>
>> I decided to try intellisense with a C++ project again (cedet CVS
>> head as of this writing). I have managed to set it up before
>> (somehow) and even used it to the extent the C++ parser worked (not
>> much). As I am an experienced Emacs Lisp hacker, I suppose I could
>> get things set up by reading source etc. in the case documentation
>> fails but since I expect this should be usable for normal users, I
>> try to use this as they would.
>>
>> I've done installation/basic configuration as instructed in
>> cedet.info. I have additionally set
>> semanticdb-default-save-directory to (expand-file-name
>> "~/.semanticdb/"). cedet.el is loaded. What I wonder next, as I
>> stare at Code Completion section, is whether I have to call
>> semantic-load-enable-code-helpers function even though I have set
>> semantic-load-turn-everything-on to t before loading cedet.el as
>> suggested in the comments of cedet.el? Oh well, I'll call it just
>> in case.
>>
>> This should enable some level of completion but I want to "improve
>> the things Semantic can find, and complete with", as the
>> documentation says, immediately. So I go to Semanticdb Search
>> Configuration section. I don't care about about completing stuff
>> in system headers (compiler's headers, platform SDK etc) so I
>> presume I don't have to use semantic-add-system-include. I
>> momentarily wonder the "In C code, semantic tries to distinguish
>> between project and system headers based on `""' or `<>'
>> delimiters." statement, especially when nothing is mentioned about
>> configuring this behaviour. Oh well, doesn't matter for this
>> project as all project headers are included using "" delimiters.
>>
>> Onwards, then. I add my project's root directory to
>> semanticdb-project-roots (section 11.2.1). I don't add include
>> paths (11.2.2). Default search throttle looks ok (11.2.3). It
>> seems that according to the documentation everything should be set
>> for completion, so I open a .cpp file, the corresponding .hpp file
>> and go to a constructor of a class in the .cpp file. I can't
>> complete anything with semantic-ia-complete-symbol; not local
>> variables, not member variables.
>>
>> So I suppose I need to move on to debugging this, i.e. section
>> 11.2.4. I call semanticdb-dump-all-table-summary which gives me
>> this:
>>
>> *#<semanticdb-project-database-emacs-lisp Emacs>
>> *#<semanticdb-project-database-file .semanticdb/>
>> *#<semanticdb-project-database-file .semanticdb/>
>>
>> Hmm. I also call semanticdb-find-test-translate-path as the
>> documentation suggests and it gives me
>>
>> *#<semanticdb-table Secret.cpp>
>> *#<semanticdb-table Secret.hpp>
>>
>> This seems to be the point where the documentation gives up. From
>> my earlier attempts with semantic I recall that back then semantic
>> couldn't chase dependencies and required me to generate database
>> files for all source files in the project tree in advance. I even
>> wrote a function to do that, but since the documentation mentions
>> nothing about this, I suppose it shouldn't be necessary anymore?
>>
>> Now that I experiment more, it seems that after opening the .hpp
>> file the second time, I can complete member variables. I suppose
>> it is possible that I made a mistake the first time and it was
>> already open. I would expect semantic to handle that case too,
>> though. Completion of locals still does not work. Now the
>> semanticdb-dump-all-table-summary gives me two more .semanticdb/
>> paths. After every use of semantic-ia-complete-symbol I get "No
>> smart completions found. Trying senator-complete-symbol." Why?
>> What does this mean?
>>
>> I also note that the list produced by p<M-x
>> semantic-ia-complete-symbol-menu> includes both duplicates and
>> invalid completions. For example, one member function is in the
>> list twice. "public:" is in the list three times, "private:" two
>> times. I think they shouldn't appear at all. The list also
>> contains some _arguments_ of member functions of inner classes (!)
>> declared and defined in the .hpp file. It looks like things
>> haven't improved much in a year.
>>
>> I'll try to construct a test case but that'll take a few days.
>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Cedet-devel mailing list
> Cedet-devel@...
> https://lists.sourceforge.net/lists/listinfo/cedet-devel
>
|