Hi,
i have tested the cpp-File you attached in your posting.
This is the result of the ECB-methods-buffer for this
file - fully expanded:
[+] [Includes]
[-] ico:namespace
`- [-] doc:namespace
| [-] [Attributes]
| `- DocumentFactory::m_documentFactoryList:class std::list
`- [-] [Methods]
| createFromBuffer (+buffer:class boost::shared_array, +size:unsigned int):class boost::shared_ptr
| createFromFile (+filename:char*):class boost::shared_ptr
| initFactories ():void
`- isSupported (+p_buffer:class boost::shared_array, +p_size:unsigned int):class bool
There is nothing red-underlined - means there is no invalid syntax
in this file.
Here is the code again which i have tried:
#include <boost/smart_ptr.hpp>
namespace ico {
namespace doc {
std::list<boost::shared_ptr<Document> > DocumentFactory::m_documentFactoryList;
void DocumentFactory::initFactories()
{
// body
}
boost::shared_ptr<Document> DocumentFactory::createFromFile(const char * filename)
throw (CouldNotOpenFileException, IllegalFormatException)
{
// body
}
bool DocumentFactory::isSupported(boost::shared_array<unsigned char> p_buffer, unsigned int p_size)
{
// body
}
boost::shared_ptr<Document> DocumentFactory::createFromBuffer(boost::shared_array<unsigned char> buffer, unsigned int size)
throw (IllegalFormatException)
{
// body
}
}
}
I'm running
Emacs : GNU Emacs 21.3.1 (i386-msvc-nt5.1.2600)
of 2003-03-28 on buffy
Package: ECB: 2.23, semantic: 2.0beta1, eieio: 0.18beta1,
speedbar: 0.15beta1, JDEE: No JDEE
(ECB 2.23 ist the current CVS-ECB)
So far to the semantic-related parts of your posting, for the ECB-bug
see below...
Markus Gritsch wrote:
> Hi!
>
> I think there is a bug in sematic when used together with templates.
> The simplified attached .cpp file contains some methods with template
> return values. These methods are not correctly recognized by semantic
> and are red underlined. This is not such a big problem, but when used
> together with ECB it is a bit annoying because when power-clicking at
> such a method in the ECB method window, point jumps to that function,
> but because it is not recognized as a valid method semantic and thus
> ECB thing point is outside of a method and jumps to the surrounding
> namespace node in the method window. When having lots of methods this
> is disturbing because then the method window scrolls to some
> unexpected region.
Yes, though your file does not demonstrate invalid template-syntax
i could check this with own c++-code where indead the return-type
is a reference to a template-type which can not be parsed currently...
With such a situation ECB indead shows this annoying behavior you
reported... i have fixed this now so with nex ECB you can jump to
methods even when the return-type is not being parsed.
Thanks for reporting this.
Klaus
|