Ulrich Becker | 1 Mar 17:16 2006
Picon

jumping to external tag problem and questions

Hello,

First, here are some questions I failed to find answers to in the manuals:

1. Is it possible to jump from a method declaration in a C++ header file to its
    definition in the corresponding C++ file?  If so, how?

2. Is there a chance to add load paths to jump to included headers that
    are not in the current directory, but somewhere else in the project tree ?

    E.g.:

    #include "foo.h"

    will be found, if it is in the same directory, but

    #include <foo/bar/bar.h>

    will be listed correctly under the Includes in the methods buffer, but
    I cannot jump there with a primary click.

Here is the problem I encounter.  The ecb manual says about
"Using semanticdb to jump to type-tags defined in other files"
that it should be possible to jump from a method in a C++ file
to the class definition in the corresponding header file.  At
least that is what I understood.  A primary click on the class
type in the methods buffer should do this.  Well, I don't get it to work.

Using the example classes in the ecb info/manual, I can jump from the
header file ClassWithExternals.h to ParentClass.h for the parent class
(Continue reading)

Eric M. Ludlam | 2 Mar 02:03 2006

Re: jumping to external tag problem and questions

Hi,

  You have a mix of questions.  First, if you set
`semanticdb-project-roots' to the start of your project directory,
then semantic can find tags between directories.  You would then need
to visit the files where your tags reside at least once.  After that,
the databases become persistent.

  Next, for your tag-jumping needs, if you use
`semantic-complete-jump' (Bound in senator to "C-c . J", it will
interactively let you pick which definition of several w/ the same
name you would jump to by pressing TAB.

  Other aspects of the below are "possible", but not all paths have
made easy to do.

Good Luck
Eric

>>> ecb-list-request <at> lists.sourceforge.net seems to think that:
>From: Ulrich Becker <uhb <at> fluent.de>
>
>This is a multi-part message in MIME format.
>--------------050908070103010305070407
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>Content-Transfer-Encoding: 7bit
>
>Hello,
>
>First, here are some questions I failed to find answers to in the manuals:
(Continue reading)

Ulrich Becker | 3 Mar 14:39 2006
Picon

Re: Re: jumping to external tag problem and questions

Hi Eric,

thanks for the quick reply.

Eric M. Ludlam wrote:
> Hi,
> 
>   You have a mix of questions.  First, if you set
> `semanticdb-project-roots' to the start of your project directory,
> then semantic can find tags between directories.  You would then need
> to visit the files where your tags reside at least once.  After that,
> the databases become persistent.

I made my directory a semanticdb-project-roots directory and also entered
it into the ecb-source-path.  I manually visited all involved files in the
actual emacs session, but still trying to jump to an include file not in
the working directory fails.  Likewise, I tried visiting all files by
semanticdb.sh.  That did not help either.

> 
>   Next, for your tag-jumping needs, if you use
> `semantic-complete-jump' (Bound in senator to "C-c . J", it will
> interactively let you pick which definition of several w/ the same
> name you would jump to by pressing TAB.
> 

This works fine indeed.  Thanks for pointing this out.

>   Other aspects of the below are "possible", but not all paths have
> made easy to do.
(Continue reading)

Ravi Kondamuru | 3 Mar 22:34 2006
Picon

ecb-download-ecb problem

I am trying to update the ecb version to the latest. The URL it is trying to retrieve seems to be invalid. Any one seen this issue?
thanks,
- Ravi.

Checking available versions for ecb has failed cause of the following
wget-failure:
______________________________________________________________________________

--13:31:57--  http://ftp1.sourceforge.net/ecb/
           => `/cygdrive/c/WINDOWS/TEMP/package- index.html'
Resolving ftp1.sourceforge.net... 66.35.250.221
Connecting to ftp1.sourceforge.net|66.35.250.221|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://prdownloads.sourceforge.net/ecb/index-sf.html?download&failedmirror=ftp1.sourceforge.net [following]
--13:31:57--  http://prdownloads.sourceforge.net/ecb/index-sf.html?download&failedmirror=ftp1.sourceforge.net
           => `/cygdrive/c/WINDOWS/TEMP/package-index.html'
Resolving prdownloads.sourceforge.net... 66.35.250.217
Connecting to prdownloads.sourceforge.net|66.35.250.217|:80.. . connected.
HTTP request sent, awaiting response... 404 Not Found
13:31:57 ERROR 404: Not Found.


______________________________________________________________________________

Please check the wget configuration in "~/.wgetrc" and also the value
of the option `ecb-download-url'. ECB has tried to get informations from
the following URL:

   http://ftp1.sourceforge.net/ecb/

Maybe this URL does not exist...please check this!

klaus.berndl | 4 Mar 15:19 2006
Picon

RE: ecb-download-ecb problem

yes, i think i have this already repaired - i will upload a patch...
 
But you can always download the latest ECB-version "by Hand" with your browser...
 
Klaus

From: ecb-list-admin <at> lists.sourceforge.net [mailto:ecb-list-admin <at> lists.sourceforge.net] On Behalf Of Ravi Kondamuru
Sent: Friday, March 03, 2006 10:34 PM
To: ecb-list <at> lists.sourceforge.net
Subject: [ECB-list] ecb-download-ecb problem

I am trying to update the ecb version to the latest. The URL it is trying to retrieve seems to be invalid. Any one seen this issue?
thanks,
- Ravi.

Checking available versions for ecb has failed cause of the following
wget-failure:
______________________________________________________________________________

--13:31:57--  http://ftp1.sourceforge.net/ecb/
           => `/cygdrive/c/WINDOWS/TEMP/package- index.html'
Resolving ftp1.sourceforge.net... 66.35.250.221
Connecting to ftp1.sourceforge.net|66.35.250.221|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://prdownloads.sourceforge.net/ecb/index-sf.html?download&failedmirror=ftp1.sourceforge.net [following]
--13:31:57--  http://prdownloads.sourceforge.net/ecb/index-sf.html?download&failedmirror=ftp1.sourceforge.net
           => `/cygdrive/c/WINDOWS/TEMP/package-index.html'
Resolving prdownloads.sourceforge.net... 66.35.250.217
Connecting to prdownloads.sourceforge.net|66.35.250.217|:80.. . connected.
HTTP request sent, awaiting response... 404 Not Found
13:31:57 ERROR 404: Not Found.


______________________________________________________________________________

Please check the wget configuration in "~/.wgetrc" and also the value
of the option `ecb-download-url'. ECB has tried to get informations from
the following URL:

   http://ftp1.sourceforge.net/ecb/

Maybe this URL does not exist...please check this!

Berthold Höllmann | 6 Mar 10:20 2006

Disabling LALR parsing / semantic via buffer local variable

I have a quite large source file, where LALR parsing takes minutes. To
be able to work on this file I would like to disable semanitic for
this files. Is there a way to accomplish this?

Kind regards

Berthold Höllmann
-- 
Germanischer Lloyd AG
CAE Development
Vorsetzen 35
20459 Hamburg
Phone: +49(0)40 36149-7374
Fax: +49(0)40 36149-7320
e-mail: berthold.hoellmann <at> gl-group.com
Internet: http://www.gl-group.com

This e-mail and any attachment thereto may contain confidential information and/or information
protected by intellectual property rights for the exclusive attention of the intended addressees named
above. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended
recipients such as total or partial copying, distribution, disclosure etc. is prohibited and may be
unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and
Conditions of GL's Group of Companies applicable at the date of this e-mail. 

If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and
delete the material from any computer.

GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is
authentic, correct and its communication free of errors, interruption etc.

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
klaus.berndl | 6 Mar 15:26 2006
Picon

RE: Disabling LALR parsing / semantic via buffer local variable

Hmm, sounds like a senseful feature...

But currently it is not really easy to switch off semantic-parsing for
files for which a parser exists... At least not in such a simple way
as with buffer-local-variables...

But i have build in a new feature in ECB which does this für you.

I have uploaded a new stable CVS-snapshot to the ECB-website. 

Here is the NEWS-entry:

* Changes for ECB version 2.33beta1

** Now possible to prevent buffers from being parsed if exceeding a certain size

   See the new option `ecb-disable-semantic-threshold-alist'.

** Fixed Bugs

*** Fixed problems with the internal download of newer ECB-versions
    Seems that two different URLs are needed:
    - "ftp://ftp1.sourceforge.net/pub/sourceforge/e/ec/ecb/" (see variable
      `ecb-packagelist-ecb-url') for getting a list of all available
      package-versions
    - "http://ftp1.sourceforge.net/ecb/" (see option `ecb-download-ecb-url')
      for the real download of a certain version of the package (e.g.
      ecb-2.32.tar.gz)
    Downloading does not work with the former one and getting a packagelist is
    not possible with the latter one. Therefore ECB now uses both URLs.

Go to the Download-section of http://ecb.sourceforge.net/....

Tell me if this is what you have asked for!

One small drawback exists: Currently buffers can be prevented from being parsed,
but opening such a not parsed buffer does not clear out the ECB-methods-buffer,
ie. You open a new large source-buffer, it will not being parsed but and then
the ECB-methods-buffer still contains the contents of the recently used buffer.
I will fix this as next...

You must also delete the semanticdb-filecache (if you use semanticdb) on disk
for these large files otherwise you would always get the stored parsing-results
even if the file is much newer...

Hope this helps,
Klaus

Berthold Höllmann wrote:
> I have a quite large source file, where LALR parsing takes minutes.
> To be able to work on this file I would like to disable semanitic for
> this files. Is there a way to accomplish this?  
> 
> Kind regards
> 
> Berthold Höllmann

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
Amit Lath | 6 Mar 20:41 2006
Picon

c# #region and #endregion

Hi,
 
i am using the latest ecb release with emacs 21.3.1 for programming in C#.
 
my problem is, when i have methods inside the c# #region and #endregion directives, the methods buffer doesnt see them.  as soon as i delete the above directives the methods buffer populates with the methods correctly.
 
is this behavior expected.  what can i do to support the #region and #endregion directives?
 
thanks
Amit Lath
 
 

Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
Eric M. Ludlam | 7 Mar 05:27 2006

Re[1]: Disabling LALR parsing / semantic via buffer local variable

>>> ecb-list-request <at> lists.sourceforge.net seems to think that:
  [ ... ]
>Message: 1
>To: <ecb-list <at> lists.sourceforge.net>
>From: =?iso-8859-15?Q?_Berthold_H=F6llmann?= <berthold.hoellmann <at> gl-group.com>
>Organization: Germanischer Lloyd AG <http://www.gl-group.com>
>Date: Mon, 06 Mar 2006 10:20:43 +0100
>Subject: [ECB-list] Disabling LALR parsing / semantic via buffer local variable
>
>I have a quite large source file, where LALR parsing takes minutes. To
>be able to work on this file I would like to disable semanitic for
>this files. Is there a way to accomplish this?
>
  [ ... ]

Hi,

  There is a variable `semantic-idle-scheduler-max-buffer-size' which
disables idle parsing for buffers of a particular size in characters.

  Since semantic does not parse a file unless asked, the idle
schedules is the only part of semantic that will cause a buffer to be
parsed unsolicited.  Thus, this variable can prevent unintended
parsing of large files.

  There are many other modes (such as ECB) which will ask for tag
lists.  Perhaps the above variable should be moved to a different more
generic name so different tools can use it to make their own
determination as to the importance of parsing some buffer.

  There may be some semantic tools that force the buffer to be parsed
before the idle timer.  We had done work to prevent this, but they can
sneak back in.

Eric

--

-- 
          Eric Ludlam:                 zappo <at> gnu.org, eric <at> siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
klaus.berndl | 7 Mar 10:31 2006
Picon

RE: Re[1]: Disabling LALR parsing / semantic via buffer local variable

Hi Eric,

Yes, i see. But some aspects more:

1.

IMHO it would be very helpful to have a way to restirct only the size of buffers
of certain modes - e.g. parsing elisp-buffers will always be fast regardless of their
size - the OP mentioned the LALR-parser...

But maybe this could also being solved via buffer-local (mode-local?)
versions of `semantic-idle-scheduler-max-buffer-size'?

Therefore i have added the following code to ECB:

(defcustom ecb-disable-semantic-threshold-alist nil
  "*Threshold for disabling semantic-parsing
Define a threshold fpr buffer-size. Exceeding this threshold disables parsing
current buffer by semantic.

This functionality is set on a major-mode base, i.e. for every major-mode a
different setting can be used. The value of this option is a list of
cons-cells:
- The car is either a major-mode symbol or the special symbol 'default which
  means if no setting for a certain major-mode is defined then the cdr of
  the 'default cons-cell is used.
- The cdr is an integer which defines the threshold for the buffer-size for
  this major-mode.

Example:

  \(\(default . 1000000)
    \(c-mode . 200000))

This example whould not parse c-mode buffers exceeding a buffer-size of
200000. And buffers of all other modes would be only parsed if smaller than
1000000.

A setting of \(\(c-mode . 200000)) would only restrict c-mode buffers to a
size of 200000 but would parse all other buffer regardless their size."
  :group 'ecb-methods
  :type '(repeat (cons (symbol :tag "Major-Mode")
                       (integer :tag "Buffer-size"))))

(defun ecb-get-max-buffer-size-for-parsing ()
  "Threshold set in `ecb-disable-semantic-threshold-alist' for
current major-mode"
  (let ((mode-threshold (cdr (assoc major-mode ecb-disable-semantic-threshold-alist)))
        (default-threshold (cdr (assoc 'default ecb-disable-semantic-threshold-alist))))
    (or mode-threshold default-threshold)))

(defun ecb-prevent-from-parsing-if-exceeding-threshold ()
  "Prevents from parsing current buffer if exceeding the threshold
defined in `ecb-disable-semantic-threshold-alist'."
  (if (and (boundp 'ecb-minor-mode)
           ecb-minor-mode
           (ecb--semantic-active-p))
      (let ((threshold (ecb-get-max-buffer-size-for-parsing)))
        (not (and threshold (> (buffer-size) threshold))))
    t))

`ecb-prevent-from-parsing-if-exceeding-threshold' is added to
`semantic--before-fetch-tags-hook' when ECB is active.

2. 

You are right - your mentioned idle-option reflects only the idle-
part of parsing a buffer - there are also situations like
opening a new file, switching buffers etc.. Where tools like ECB
must manually call semantic-fetch-tags (which then mostly just
returns the cache - at least when only switching buffers).
Nevertheless in these situations your idle-solutions does not
work.... Therefore also the added code of ECB...

But at all i have the feeling that my ECB-solution is somehow suboptimal

What do you suggest?

Ciao,
klaus

Eric M. Ludlam wrote:
>>>> ecb-list-request <at> lists.sourceforge.net seems to think that:
>   [ ... ]
>> Message: 1
>> To: <ecb-list <at> lists.sourceforge.net>
>> From: =?iso-8859-15?Q?_Berthold_H=F6llmann?=
>> <berthold.hoellmann <at> gl-group.com>
>> Organization: Germanischer Lloyd AG <http://www.gl-group.com>
>> Date: Mon, 06 Mar 2006 10:20:43 +0100
>> Subject: [ECB-list] Disabling LALR parsing / semantic via buffer
>> local variable 
>> 
>> I have a quite large source file, where LALR parsing takes minutes.
>> To be able to work on this file I would like to disable semanitic
>> for this files. Is there a way to accomplish this?
>> 
>   [ ... ]
> 
> Hi,
> 
>   There is a variable `semantic-idle-scheduler-max-buffer-size' which
> disables idle parsing for buffers of a particular size in characters. 
> 
>   Since semantic does not parse a file unless asked, the idle
> schedules is the only part of semantic that will cause a buffer to be
> parsed unsolicited.  Thus, this variable can prevent unintended
> parsing of large files.   
> 
>   There are many other modes (such as ECB) which will ask for tag
> lists.  Perhaps the above variable should be moved to a different
> more generic name so different tools can use it to make their own
> determination as to the importance of parsing some buffer.   
> 
>   There may be some semantic tools that force the buffer to be parsed
> before the idle timer.  We had done work to prevent this, but they
> can sneak back in.  
> 
> Eric

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642

Gmane