KDevelop API Documentation

CppSupportPart Class Reference

Provides C/C++ language support for KDevelop. More...

#include <cppsupportpart.h>

Inheritance diagram for CppSupportPart:

Inheritance graph
[legend]
Collaboration diagram for CppSupportPart:

Collaboration graph
[legend]
List of all members.

Signals

void fileParsed (const QString &fileName)

Public Member Functions

 CppSupportPart (QObject *parent, const char *name, const QStringList &args)
virtual ~CppSupportPart ()
bool isValid () const
QString specialHeaderName (bool local=false) const
void updateParserConfiguration ()
ProblemReporterproblemReporter ()
BackgroundParserbackgroundParser ()
CppCodeCompletioncodeCompletion ()
CppCodeCompletionConfigcodeCompletionConfig ()
const QPtrList< Catalog > & catalogList ()
void addCatalog (Catalog *catalog)
void removeCatalog (const QString &dbName)
bool isValidSource (const QString &fileName) const
virtual void customEvent (QCustomEvent *ev)
virtual QStringList subclassWidget (const QString &formName)
 Opens an "Subclass Widget" dialog for given Qt .ui file (formName) and propmts to implement it's slots.
virtual QStringList updateWidget (const QString &formName, const QString &fileName)
 Opens and "Update Widget" dialog for given Qt .ui file (formName) and prompts to add missing slot implementations in the subclass located in fileName.
FunctionDefinitionDom currentFunctionDefinition ()
FunctionDefinitionDom functionDefinitionAt (int line, int column)
FunctionDefinitionDom functionDefinitionAt (NamespaceDom ns, int line, int column)
FunctionDefinitionDom functionDefinitionAt (ClassDom klass, int line, int column)
FunctionDefinitionDom functionDefinitionAt (FunctionDefinitionDom fun, int line, int column)
KTextEditor::DocumentfindDocument (const KURL &url)
virtual QString formatTag (const Tag &tag)
 Formats a Tag as used by the class store to the human-readable convention.
virtual QString formatModelItem (const CodeModelItem *item, bool shortDescription=false)
 Formats a CodeModelItem as used by the CodeModel to the human-readable convention.
virtual void addClass ()
 Opens a "New class" dialog and adds the configured class to the sources.
QString extractInterface (const ClassDom &klass)
bool isHeader (const QString &fileName) const
bool isSource (const QString &fileName) const
virtual KDevDesignerIntegrationdesigner (KInterfaceDesigner::DesignerType type)
 Returns a pointer to designer integration plugin of given type or 0.

Static Public Member Functions

KConfigconfig ()

Protected Member Functions

virtual KDevLanguageSupport::Features features ()
 Returns the feature set of the language.
virtual KMimeType::List mimeTypes ()
 Returns a typical mimetype list for the support language should be configurable in the languagesupport dialog.
virtual QString formatClassName (const QString &name)
 Formats a canonicalized class path as used by the class store to the human-readable convention.
virtual QString unformatClassName (const QString &name)
 The opposite of formatClassName().
virtual void addMethod (ClassDom klass)
 Opens an "Add method" dialog and adds the configured method to the sources.
virtual void addAttribute (ClassDom klass)
 Opens an "Add attribute" dialog and adds the configured method to the sources.

Private Slots

void activePartChanged (KParts::Part *part)
void partRemoved (KParts::Part *part)
void projectOpened ()
void projectClosed ()
void savedFile (const KURL &fileName)
void configWidget (KDialogBase *dlg)
void projectConfigWidget (KDialogBase *dlg)
void contextMenu (QPopupMenu *popup, const Context *context)
void addedFilesToProject (const QStringList &fileList)
void removedFilesFromProject (const QStringList &fileList)
void changedFilesInProject (const QStringList &fileList)
void slotProjectCompiled ()
void setupCatalog ()
void codeCompletionConfigStored ()
void recomputeCodeModel (const QString &fileName)
void slotNewClass ()
void slotSwitchHeader ()
void slotGotoIncludeFile ()
void slotCompleteText ()
void slotMakeMember ()
void slotExtractInterface ()
void slotCursorPositionChanged ()
void slotFunctionHint ()
void gotoLine (int line)
void gotoDeclarationLine (int line)
void emitFileParsed ()
void slotParseFiles ()
void slotCreateSubclass ()
void slotNeedTextHint (int, int, QString &)
void initialParse ()
 loads, parses and creates both classstores needed
bool parseProject (bool force=false)
 only parses the current project

Private Member Functions

void maybeParse (const QString &fileName)
 checks if a file has to be parsed
void removeWithReferences (const QString &fileName)
void createIgnorePCSFile ()
void MakeMemberHelper (QString &text, int &atline, int &atcol)
QString sourceOrHeaderCandidate ()
QStringList modifiedFileList ()
QString findSourceFile ()
int pcsVersion ()
void setPcsVersion (int version)
void saveProjectSourceInfo ()

Static Private Member Functions

QStringList reorder (const QStringList &list)
QString findHeader (const QStringList &list, const QString &header)

Private Attributes

CppCodeCompletionm_pCompletion
CppCodeCompletionConfigm_pCompletionConfig
bool withcpp
QString m_contextFileName
QGuardedPtr< ProblemReporterm_problemReporter
BackgroundParserm_backgroundParser
KTextEditor::Documentm_activeDocument
KTextEditor::Viewm_activeView
KTextEditor::SelectionInterfacem_activeSelection
KTextEditor::EditInterfacem_activeEditor
KTextEditor::ViewCursorInterfacem_activeViewCursor
QString m_activeFileName
QMap< KInterfaceDesigner::DesignerType,
KDevDesignerIntegration * > 
m_designers
QWaitCondition m_eventConsumed
bool m_projectClosed
QMap< QString, QDateTimem_timestamp
bool m_valid
QPtrList< Catalogm_catalogList
Driverm_driver
QString m_projectDirectory
QStringList m_projectFileList
ClassDom m_activeClass
FunctionDom m_activeFunction
VariableDom m_activeVariable
QTimerm_functionHintTimer
JobData_jd

Static Private Attributes

QStringList m_sourceMimeTypes = QStringList() << "text/x-csrc" << "text/x-c++src"
QStringList m_headerMimeTypes = QStringList() << "text/x-chdr" << "text/x-c++hdr"
QStringList m_sourceExtensions = QStringList::split( ",", "c,C,cc,cpp,c++,cxx,m,mm,M" )
QStringList m_headerExtensions = QStringList::split( ",", "h,H,hh,hxx,hpp,inl,tlh,diff,ui.h" )

Friends

class KDevCppSupportIface
class CppDriver

Detailed Description

Provides C/C++ language support for KDevelop.

Well the first thing you should read is lib/catalog it contains the source of the persistant class store after that languages/cpp/tag_creator.* it is the component that stores the informations collected by the c++ parser into the PCS then you can play with KDevPCSImporter the code of the dialog is in languages/cpp/createpcsdialog* and languages/cpp/pcsimporter/* and of course lib/interfaces/kdevpcsimporter.* and if you want play with the c++ parser go to lib/cppparser/, the best is to start to read driver.*

Author(s):
Roberto Raggi

Maintainer(s):
Roberto Raggi

Feature(s):
supports C/C++ language

can do code completion

has presistent class store

code highlight

Consult Programming Languages Support Status for a up to date features/status of this programming language support part.

Bug:
bugs in cppsupport component at Bugzilla database

F.A.Q.:
How can I have documentation on functions when using codecompletion ?
  1. Create the xml-output with Doxygen of the files you want to add to the classstore
  2. Create the new PCS-database with r++. Now you have to use the -d command line switch of r++ to have it include the documentation. It is used like -d/path/of/doxygen/xml/output (notice that there is _no_ whitespace between -d and the path!). You can use it multiple times to have r++ search for the informations in different directories. r++ -d has to be used (like every other commandline switch) before you write the directories you want r++ to create the PCSdatabase from.
  3. Activate your newly created Database in the Project->Project Options...->C++ Specific->Code Completion... .

How does this work ? I have no clue. Ask roberto! :)

How does r++ work ? I have no clue. Ask roberto! :)

Definition at line 56 of file cppsupportpart.h.


Constructor & Destructor Documentation

CppSupportPart::CppSupportPart QObject parent,
const char *  name,
const QStringList args
 

Definition at line 150 of file cppsupportpart.cpp.

References KXMLGUIClient::actionCollection(), activePartChanged(), codeCompletionConfigStored(), configWidget(), contextMenu(), KDevPlugin::core(), CppDriver, KDevCppSupportIface, m_catalogList, m_driver, m_functionHintTimer, m_pCompletion, m_pCompletionConfig, m_problemReporter, KDevPlugin::partController(), partRemoved(), projectClosed(), projectConfigWidget(), KDevPlugin::projectDom(), projectOpened(), savedFile(), KXMLGUIClient::setInstance(), KXMLGUIClient::setXMLFile(), slotCompleteText(), slotMakeMember(), slotNewClass(), slotSwitchHeader(), and withcpp.

CppSupportPart::~CppSupportPart  )  [virtual]
 

Definition at line 236 of file cppsupportpart.cpp.

References _jd, BackgroundParser::close(), KDevPlugin::codeRepository(), k_funcinfo, kdDebug(), m_backgroundParser, m_catalogList, m_driver, m_pCompletion, m_problemReporter, KDevPlugin::mainWindow(), projectClosed(), KDevMainWindow::removeView(), KDevCodeRepository::setMainCatalog(), and KDevCodeRepository::unregisterCatalog().


Member Function Documentation

void CppSupportPart::activePartChanged KParts::Part part  )  [private, slot]
 

Definition at line 320 of file cppsupportpart.cpp.

References KActionCollection::action(), KXMLGUIClient::actionCollection(), URLUtil::canonicalPath(), KTextEditor::TextHintInterface::enableTextHints(), isHeader(), isSource(), kdDebug(), m_activeDocument, m_activeEditor, m_activeFileName, m_activeSelection, m_activeView, m_activeViewCursor, m_functionHintTimer, KURL::path(), KAction::setEnabled(), slotCursorPositionChanged(), slotNeedTextHint(), KParts::ReadOnlyPart::url(), and KParts::Part::widget().

Referenced by CppSupportPart().

void CppSupportPart::addAttribute ClassDom  klass  )  [protected, virtual]
 

Opens an "Add attribute" dialog and adds the configured method to the sources.

Reimplemented from KDevLanguageSupport.

Definition at line 887 of file cppsupportpart.cpp.

References ClassDom, KMessageBox::error(), main(), and KDevPlugin::mainWindow().

void CppSupportPart::addCatalog Catalog catalog  ) 
 

Definition at line 1714 of file cppsupportpart.cpp.

References KDevPlugin::codeRepository(), m_catalogList, and KDevCodeRepository::registerCatalog().

Referenced by CreatePCSDialog::slotSelected().

void CppSupportPart::addClass  )  [virtual]
 

Opens a "New class" dialog and adds the configured class to the sources.

Todo:
Use KDevNode stuff for this

Reimplemented from KDevLanguageSupport.

Definition at line 1488 of file cppsupportpart.cpp.

References slotNewClass().

void CppSupportPart::addedFilesToProject const QStringList fileList  )  [private, slot]
 

Definition at line 709 of file cppsupportpart.cpp.

References KDevLanguageSupport::addedSourceInfo(), KDevProject::allFiles(), URLUtil::canonicalPath(), m_projectDirectory, m_projectFileList, maybeParse(), KDevPlugin::project(), and reorder().

Referenced by projectOpened().

void CppSupportPart::addMethod ClassDom  klass  )  [protected, virtual]
 

Opens an "Add method" dialog and adds the configured method to the sources.

Reimplemented from KDevLanguageSupport.

Definition at line 876 of file cppsupportpart.cpp.

References ClassDom, KMessageBox::error(), main(), and KDevPlugin::mainWindow().

BackgroundParser* CppSupportPart::backgroundParser  )  [inline]
 

Definition at line 74 of file cppsupportpart.h.

Referenced by AddMethodDialog::accept(), AddAttributeDialog::accept(), QtDesignerIntegration::addFunctionToClass(), and ProblemReporter::closedFile().

const QPtrList<Catalog>& CppSupportPart::catalogList  )  [inline]
 

Definition at line 78 of file cppsupportpart.h.

void CppSupportPart::changedFilesInProject const QStringList fileList  )  [private, slot]
 

Definition at line 736 of file cppsupportpart.cpp.

References KDevLanguageSupport::addedSourceInfo(), URLUtil::canonicalPath(), m_projectDirectory, maybeParse(), and reorder().

Referenced by projectOpened().

CppCodeCompletion* CppSupportPart::codeCompletion  )  [inline]
 

Definition at line 75 of file cppsupportpart.h.

CppCodeCompletionConfig* CppSupportPart::codeCompletionConfig  )  [inline]
 

Definition at line 76 of file cppsupportpart.h.

Referenced by CCConfigWidget::initCodeCompletionTab(), and CCConfigWidget::saveCodeCompletionTab().

void CppSupportPart::codeCompletionConfigStored  )  [private, slot]
 

Definition at line 1418 of file cppsupportpart.cpp.

References KDevPlugin::partController(), and KParts::PartManager::setActivePart().

Referenced by CppSupportPart().

KConfig* CppSupportPart::config  )  [static]
 

Referenced by pcsVersion(), and setPcsVersion().

void CppSupportPart::configWidget KDialogBase dlg  )  [private, slot]
 

Definition at line 313 of file cppsupportpart.cpp.

References KDialogBase::addVBoxPage(), and KDevPlugin::icon().

Referenced by CppSupportPart(), and projectOpened().

void CppSupportPart::contextMenu QPopupMenu popup,
const Context context
[private, slot]
 

Definition at line 473 of file cppsupportpart.cpp.

References CodeModelUtils::allFunctionDefinitionsDetailed(), CodeModelUtils::allFunctions(), KDevPlugin::codeModel(), CodeModelUtils::compareDeclarationToDefinition(), EditorContext::currentLine(), KTextEditor::ViewCursorInterface::cursorPosition(), file, CodeModel::fileByName(), FileDom, FileContext::fileName(), findHeader(), formatModelItem(), FunctionDefinitionDom, FunctionDefinitionList, FunctionDom, FunctionList, gotoDeclarationLine(), gotoLine(), CodeModel::hasFile(), Context::hasType(), CodeModelItem::isClass(), CodeModelItem::isFunction(), isHeader(), isSource(), CodeModelItemContext::item(), kdDebug(), m_activeClass, m_activeFileName, m_activeFunction, m_activeVariable, m_activeViewCursor, m_contextFileName, m_projectFileList, MakeMemberHelper(), slotCreateSubclass(), slotExtractInterface(), slotGotoIncludeFile(), slotMakeMember(), slotSwitchHeader(), sourceOrHeaderCandidate(), and text().

Referenced by CppSupportPart().

void CppSupportPart::createIgnorePCSFile  )  [private]
 

Definition at line 1826 of file cppsupportpart.cpp.

References KDevPlugin::project(), KDevProject::projectDirectory(), and KDevProject::projectName().

Referenced by parseProject(), and saveProjectSourceInfo().

FunctionDefinitionDom CppSupportPart::currentFunctionDefinition  ) 
 

Definition at line 1729 of file cppsupportpart.cpp.

References KTextEditor::ViewCursorInterface::cursorPositionReal(), functionDefinitionAt(), FunctionDefinitionDom, and m_activeViewCursor.

Referenced by slotFunctionHint().

void CppSupportPart::customEvent QCustomEvent ev  )  [virtual]
 

Definition at line 273 of file cppsupportpart.cpp.

References Event_FileParsed, FileParsedEvent::fileName(), fileParsed(), kdDebug(), Problem::level(), m_problemReporter, FileParsedEvent::problems(), and recomputeCodeModel().

KDevDesignerIntegration * CppSupportPart::designer KInterfaceDesigner::DesignerType  type  )  [virtual]
 

Returns a pointer to designer integration plugin of given type or 0.

Reimplemented from KDevLanguageSupport.

Definition at line 1859 of file cppsupportpart.cpp.

References kdDebug(), KDevDesignerIntegration::loadSettings(), m_designers, KDevPlugin::project(), and KDevPlugin::projectDom().

Referenced by slotCreateSubclass().

void CppSupportPart::emitFileParsed  )  [private, slot]
 

Definition at line 1646 of file cppsupportpart.cpp.

References fileParsed(), and m_activeFileName.

QString CppSupportPart::extractInterface const ClassDom klass  ) 
 

Definition at line 1541 of file cppsupportpart.cpp.

References ClassDom, formatModelItem(), FunctionDom, and FunctionList.

Referenced by slotExtractInterface().

KDevLanguageSupport::Features CppSupportPart::features  )  [protected, virtual]
 

Returns the feature set of the language.

This is e.g. used by the class view to decide which organizer items to display and which not.

Reimplemented from KDevLanguageSupport.

Definition at line 849 of file cppsupportpart.cpp.

References KDevLanguageSupport::Features.

void CppSupportPart::fileParsed const QString fileName  )  [signal]
 

Referenced by customEvent(), and emitFileParsed().

KTextEditor::Document * CppSupportPart::findDocument const KURL url  ) 
 

Definition at line 1287 of file cppsupportpart.cpp.

References KDevPlugin::partController(), KParts::PartManager::parts(), and KParts::ReadOnlyPart::url().

QString CppSupportPart::findHeader const QStringList list,
const QString header
[static, private]
 

Definition at line 457 of file cppsupportpart.cpp.

Referenced by contextMenu().

QString CppSupportPart::findSourceFile  )  [private]
 

Definition at line 763 of file cppsupportpart.cpp.

References kdDebug(), and m_activeFileName.

Referenced by MakeMemberHelper(), and slotMakeMember().

QString CppSupportPart::formatClassName const QString name  )  [protected, virtual]
 

Formats a canonicalized class path as used by the class store to the human-readable convention.

For example, the C++ support part formats the string "KParts.Part" into "KParts::Part".

Reimplemented from KDevLanguageSupport.

Definition at line 858 of file cppsupportpart.cpp.

QString CppSupportPart::formatModelItem const CodeModelItem item,
bool  shortDescription = false
[virtual]
 

Formats a CodeModelItem as used by the CodeModel to the human-readable convention.

Reimplemented from KDevLanguageSupport.

Definition at line 1445 of file cppsupportpart.cpp.

References FunctionModel::argumentList(), ArgumentList, ArgumentModel::defaultValue(), KDevLanguageSupport::formatModelItem(), FunctionModel::isAbstract(), CodeModelItem::isArgument(), FunctionModel::isConstant(), CodeModelItem::isFunction(), CodeModelItem::isFunctionDefinition(), CodeModelItem::isVariable(), FunctionModel::isVirtual(), CodeModelItem::name(), FunctionModel::resultType(), ArgumentModel::type(), and VariableModel::type().

Referenced by contextMenu(), extractInterface(), and slotFunctionHint().

QString CppSupportPart::formatTag const Tag &  tag  )  [virtual]
 

Formats a Tag as used by the class store to the human-readable convention.

Reimplemented from KDevLanguageSupport.

Definition at line 1387 of file cppsupportpart.cpp.

References CppFunction< Tag >::arguments(), CppVariable< Tag >::name(), CppFunction< Tag >::name(), CppVariable< Tag >::type(), and CppFunction< Tag >::type().

FunctionDefinitionDom CppSupportPart::functionDefinitionAt FunctionDefinitionDom  fun,
int  line,
int  column
 

Definition at line 1784 of file cppsupportpart.cpp.

References FunctionDefinitionDom.

FunctionDefinitionDom CppSupportPart::functionDefinitionAt ClassDom  klass,
int  line,
int  column
 

Definition at line 1765 of file cppsupportpart.cpp.

References ClassDom, ClassList, functionDefinitionAt(), FunctionDefinitionDom, and FunctionDefinitionList.

FunctionDefinitionDom CppSupportPart::functionDefinitionAt NamespaceDom  ns,
int  line,
int  column
 

Definition at line 1739 of file cppsupportpart.cpp.

References ClassList, functionDefinitionAt(), FunctionDefinitionDom, FunctionDefinitionList, NamespaceDom, and NamespaceList.

FunctionDefinitionDom CppSupportPart::functionDefinitionAt int  line,
int  column
 

Definition at line 1720 of file cppsupportpart.cpp.

References KDevPlugin::codeModel(), file, CodeModel::fileByName(), FileDom, FunctionDefinitionDom, CodeModel::hasFile(), and m_activeFileName.

Referenced by currentFunctionDefinition(), and functionDefinitionAt().

void CppSupportPart::gotoDeclarationLine int  line  )  [private, slot]
 

Definition at line 1669 of file cppsupportpart.cpp.

References KDevPartController::editDocument(), isHeader(), m_activeFileName, m_activeViewCursor, KDevPlugin::partController(), KTextEditor::ViewCursorInterface::setCursorPositionReal(), KURL::setPath(), and sourceOrHeaderCandidate().

Referenced by contextMenu().

void CppSupportPart::gotoLine int  line  )  [private, slot]
 

Definition at line 1614 of file cppsupportpart.cpp.

References KDevPartController::editDocument(), isHeader(), m_activeFileName, m_activeViewCursor, KDevPlugin::partController(), KTextEditor::ViewCursorInterface::setCursorPositionReal(), KURL::setPath(), and sourceOrHeaderCandidate().

Referenced by contextMenu().

void CppSupportPart::initialParse  )  [private, slot]
 

loads, parses and creates both classstores needed

Definition at line 908 of file cppsupportpart.cpp.

References kdDebug(), m_valid, parseProject(), and KDevPlugin::project().

Referenced by projectOpened().

bool CppSupportPart::isHeader const QString fileName  )  const
 

Definition at line 1651 of file cppsupportpart.cpp.

References KMimeType::findByPath(), m_headerExtensions, m_headerMimeTypes, and KMimeType::Ptr.

Referenced by activePartChanged(), contextMenu(), gotoDeclarationLine(), gotoLine(), isValidSource(), and modifiedFileList().

bool CppSupportPart::isSource const QString fileName  )  const
 

Definition at line 1660 of file cppsupportpart.cpp.

References KMimeType::findByPath(), m_sourceExtensions, m_sourceMimeTypes, and KMimeType::Ptr.

Referenced by activePartChanged(), contextMenu(), isValidSource(), and modifiedFileList().

bool CppSupportPart::isValid  )  const [inline]
 

Definition at line 64 of file cppsupportpart.h.

Referenced by problemReporter().

bool CppSupportPart::isValidSource const QString fileName  )  const
 

Definition at line 1435 of file cppsupportpart.cpp.

References URLUtil::canonicalPath(), isHeader(), KDevProject::isProjectFile(), isSource(), and KDevPlugin::project().

Referenced by maybeParse(), partRemoved(), and slotParseFiles().

void CppSupportPart::MakeMemberHelper QString text,
int &  atline,
int &  atcol
[private]
 

Definition at line 1115 of file cppsupportpart.cpp.

References KTextEditor::ViewCursorInterface::cursorPositionReal(), InitDeclaratorAST::declarator(), declaratorToString(), DeclaratorAST::exceptionSpecification(), findNodeAt(), findSourceFile(), AST::getEndPosition(), InitDeclaratorListAST::initDeclaratorList(), SimpleDeclarationAST::initDeclaratorList(), kdDebug(), BackgroundParser::lock(), m_activeFileName, m_activeViewCursor, m_backgroundParser, GroupAST::nodeList(), AST::nodeType(), DeclaratorAST::parameterDeclarationClause(), AST::parent(), scopeOfNode(), text(), BackgroundParser::translationUnit(), SimpleDeclarationAST::typeSpec(), typeSpecToString(), and BackgroundParser::unlock().

Referenced by contextMenu(), and slotMakeMember().

void CppSupportPart::maybeParse const QString fileName  )  [private]
 

checks if a file has to be parsed

Definition at line 1064 of file cppsupportpart.cpp.

References URLUtil::canonicalPath(), isValidSource(), m_driver, m_timestamp, Driver::parseFile(), and removeWithReferences().

Referenced by addedFilesToProject(), changedFilesInProject(), and savedFile().

KMimeType::List CppSupportPart::mimeTypes  )  [protected, virtual]
 

Returns a typical mimetype list for the support language should be configurable in the languagesupport dialog.

Reimplemented from KDevLanguageSupport.

Definition at line 1356 of file cppsupportpart.cpp.

References KMimeType::List, KMimeType::mimeType(), and KMimeType::Ptr.

QStringList CppSupportPart::modifiedFileList  )  [private]
 

Definition at line 1259 of file cppsupportpart.cpp.

References URLUtil::canonicalPath(), isHeader(), isSource(), m_projectDirectory, and m_timestamp.

Referenced by parseProject().

bool CppSupportPart::parseProject bool  force = false  )  [private, slot]
 

only parses the current project

Definition at line 942 of file cppsupportpart.cpp.

References _jd, createIgnorePCSFile(), CppSupportPart::JobData::dir, CppSupportPart::JobData::file, CppSupportPart::JobData::files, CppSupportPart::JobData::it, kdDebug(), m_projectDirectory, KDevPlugin::mainWindow(), modifiedFileList(), CppSupportPart::JobData::pcs, CppSupportPart::JobData::progressBar, KDevPlugin::project(), KDevProject::projectDirectory(), KDevProject::projectName(), reorder(), slotParseFiles(), KDevMainWindow::statusBar(), and CppSupportPart::JobData::stream.

Referenced by initialParse(), slotProjectCompiled(), and updateParserConfiguration().

void CppSupportPart::partRemoved KParts::Part part  )  [private, slot]
 

Definition at line 1237 of file cppsupportpart.cpp.

References BackgroundParser::addFile(), URLUtil::canonicalPath(), isValidSource(), kdDebug(), m_backgroundParser, KURL::path(), BackgroundParser::removeFile(), and KParts::ReadOnlyPart::url().

Referenced by CppSupportPart().

int CppSupportPart::pcsVersion  )  [private]
 

Definition at line 1372 of file cppsupportpart.cpp.

References config(), and KConfigBase::readNumEntry().

Referenced by setupCatalog().

ProblemReporter* CppSupportPart::problemReporter  )  [inline]
 

Definition at line 72 of file cppsupportpart.h.

References isValid().

Referenced by CppDriver::fileParsed().

void CppSupportPart::projectClosed  )  [private, slot]
 

Definition at line 423 of file cppsupportpart.cpp.

References _jd, KDevPlugin::codeRepository(), GCatalog< Tp >::dbName(), GCatalog< Tp >::enabled(), kdDebug(), m_designers, m_pCompletion, m_pCompletionConfig, m_projectClosed, KDevPlugin::project(), KDevPlugin::projectDom(), KDevCodeRepository::registeredCatalogs(), saveProjectSourceInfo(), CppCodeCompletionConfig::store(), and DomUtil::writeListEntry().

Referenced by CppSupportPart(), and ~CppSupportPart().

void CppSupportPart::projectConfigWidget KDialogBase dlg  )  [private, slot]
 

Definition at line 304 of file cppsupportpart.cpp.

References KDialogBase::addVBoxPage(), and KDevPlugin::icon().

Referenced by CppSupportPart().

void CppSupportPart::projectOpened  )  [private, slot]
 

Definition at line 378 of file cppsupportpart.cpp.

References addedFilesToProject(), KDevProject::allFiles(), URLUtil::canonicalPath(), changedFilesInProject(), configWidget(), KDevPlugin::core(), KDevMainWindow::embedOutputView(), initialParse(), kdDebug(), m_backgroundParser, m_driver, m_eventConsumed, m_pCompletion, m_problemReporter, m_projectClosed, m_projectDirectory, m_projectFileList, m_timestamp, KDevPlugin::mainWindow(), Driver::parseFile(), KDevPlugin::project(), removedFilesFromProject(), setupCatalog(), slotProjectCompiled(), and specialHeaderName().

Referenced by CppSupportPart().

void CppSupportPart::recomputeCodeModel const QString fileName  )  [private, slot]
 

hasErrors

Definition at line 1626 of file cppsupportpart.cpp.

References KDevLanguageSupport::addedSourceInfo(), CodeModel::addFile(), KDevPlugin::codeModel(), StoreWalker::file(), file, CodeModel::fileByName(), FileDom, CodeModel::hasFile(), BackgroundParser::lock(), m_backgroundParser, StoreWalker::parseTranslationUnit(), removeWithReferences(), BackgroundParser::translationUnit(), and BackgroundParser::unlock().

Referenced by customEvent().

void CppSupportPart::removeCatalog const QString dbName  ) 
 

Definition at line 1681 of file cppsupportpart.cpp.

References KDevPlugin::codeRepository(), kdDebug(), m_catalogList, KDevCodeRepository::registeredCatalogs(), and KDevCodeRepository::unregisterCatalog().

Referenced by CreatePCSDialog::slotSelected().

void CppSupportPart::removedFilesFromProject const QStringList fileList  )  [private, slot]
 

Definition at line 723 of file cppsupportpart.cpp.

References KDevProject::allFiles(), URLUtil::canonicalPath(), kdDebug(), m_backgroundParser, m_projectDirectory, m_projectFileList, KDevPlugin::project(), BackgroundParser::removeFile(), and removeWithReferences().

Referenced by projectOpened().

void CppSupportPart::removeWithReferences const QString fileName  )  [private]
 

Definition at line 1423 of file cppsupportpart.cpp.

References KDevLanguageSupport::aboutToRemoveSourceInfo(), KDevPlugin::codeModel(), CodeModel::hasFile(), kdDebug(), m_timestamp, and CodeModel::removeFile().

Referenced by CppDriver::fileParsed(), maybeParse(), recomputeCodeModel(), and removedFilesFromProject().

QStringList CppSupportPart::reorder const QStringList list  )  [static, private]
 

Definition at line 691 of file cppsupportpart.cpp.

Referenced by addedFilesToProject(), changedFilesInProject(), and parseProject().

void CppSupportPart::savedFile const KURL fileName  )  [private, slot]
 

Definition at line 749 of file cppsupportpart.cpp.

References KDevLanguageSupport::addedSourceInfo(), kdDebug(), m_projectDirectory, m_projectFileList, maybeParse(), and KURL::path().

Referenced by CppSupportPart().

void CppSupportPart::saveProjectSourceInfo  )  [private]
 

Definition at line 1493 of file cppsupportpart.cpp.

References KDevPlugin::codeModel(), createIgnorePCSFile(), FileDom, CodeModel::fileList(), FileList, m_timestamp, KDevPlugin::project(), KDevProject::projectDirectory(), KDevProject::projectName(), and toTime_t().

Referenced by projectClosed().

void CppSupportPart::setPcsVersion int  version  )  [private]
 

Definition at line 1379 of file cppsupportpart.cpp.

References config(), KConfigBase::sync(), and KConfigBase::writeEntry().

Referenced by setupCatalog().

void CppSupportPart::setupCatalog  )  [private, slot]
 

Definition at line 1304 of file cppsupportpart.cpp.

References GCatalog< Tp >::addIndex(), KDevPlugin::codeRepository(), DomUtil::elementByPath(), KStandardDirs::findAllResources(), kdDebug(), KDEV_DB_VERSION, m_catalogList, GCatalog< Tp >::open(), pcsVersion(), KDevPlugin::project(), KDevPlugin::projectDom(), KMessageBox::questionYesNoList(), DomUtil::readListEntry(), KDevCodeRepository::registerCatalog(), GCatalog< Tp >::setEnabled(), and setPcsVersion().

Referenced by projectOpened().

void CppSupportPart::slotCompleteText  )  [private, slot]
 

Definition at line 898 of file cppsupportpart.cpp.

References CppCodeCompletion::completeText(), and m_pCompletion.

Referenced by CppSupportPart().

void CppSupportPart::slotCreateSubclass  )  [private, slot]
 

Definition at line 1880 of file cppsupportpart.cpp.

References designer(), m_contextFileName, and QtDesignerIntegration::selectImplementation().

Referenced by contextMenu().

void CppSupportPart::slotCursorPositionChanged  )  [private, slot]
 

Definition at line 1804 of file cppsupportpart.cpp.

Referenced by activePartChanged().

void CppSupportPart::slotExtractInterface  )  [private, slot]
 

Definition at line 1582 of file cppsupportpart.cpp.

References KDevProject::addFile(), KMessageBox::error(), extractInterface(), m_activeClass, main(), KDevPlugin::mainWindow(), KDevPlugin::project(), and text().

Referenced by contextMenu().

void CppSupportPart::slotFunctionHint  )  [private, slot]
 

Definition at line 1809 of file cppsupportpart.cpp.

References currentFunctionDefinition(), formatModelItem(), FunctionDefinitionDom, kdDebug(), m_functionHintTimer, KDevPlugin::mainWindow(), and KDevMainWindow::statusBar().

void CppSupportPart::slotGotoIncludeFile  )  [private, slot]
 

Definition at line 842 of file cppsupportpart.cpp.

References KDevPartController::editDocument(), m_contextFileName, and KDevPlugin::partController().

Referenced by contextMenu().

void CppSupportPart::slotMakeMember  )  [private, slot]
 

Definition at line 1191 of file cppsupportpart.cpp.

References KDevPartController::editDocument(), findSourceFile(), KTextEditor::EditInterface::insertText(), kdDebug(), BackgroundParser::lock(), m_activeEditor, m_activeViewCursor, m_backgroundParser, MakeMemberHelper(), KTextEditor::EditInterface::numLines(), KDevPlugin::partController(), KTextEditor::ViewCursorInterface::setCursorPositionReal(), text(), and BackgroundParser::unlock().

Referenced by contextMenu(), and CppSupportPart().

void CppSupportPart::slotNeedTextHint int  ,
int  ,
QString
[private, slot]
 

Definition at line 1087 of file cppsupportpart.cpp.

References findNodeAt(), AST::getEndPosition(), AST::getStartPosition(), BackgroundParser::lock(), m_activeEditor, m_activeFileName, m_backgroundParser, AST::parent(), KTextEditor::EditInterface::textLine(), BackgroundParser::translationUnit(), and BackgroundParser::unlock().

Referenced by activePartChanged().

void CppSupportPart::slotNewClass  )  [private, slot]
 

Definition at line 870 of file cppsupportpart.cpp.

Referenced by addClass(), and CppSupportPart().

void CppSupportPart::slotParseFiles  )  [private, slot]
 

Definition at line 1000 of file cppsupportpart.cpp.

References _jd, CodeModel::addFile(), URLUtil::canonicalPath(), KDevPlugin::codeModel(), CodeModel::create(), CppSupportPart::JobData::dir, file, FileDom, CppSupportPart::JobData::files, isValidSource(), CppSupportPart::JobData::it, kdDebug(), m_driver, m_projectClosed, m_timestamp, KDevPlugin::mainWindow(), Driver::parseFile(), CppSupportPart::JobData::pcs, CppSupportPart::JobData::progressBar, KDevPlugin::project(), KDevMainWindow::statusBar(), CppSupportPart::JobData::stream, and KDevLanguageSupport::updatedSourceInfo().

Referenced by parseProject().

void CppSupportPart::slotProjectCompiled  )  [private, slot]
 

Definition at line 1253 of file cppsupportpart.cpp.

References kdDebug(), and parseProject().

Referenced by projectOpened().

void CppSupportPart::slotSwitchHeader  )  [private, slot]
 

Definition at line 837 of file cppsupportpart.cpp.

References KDevPartController::editDocument(), KDevPlugin::partController(), and sourceOrHeaderCandidate().

Referenced by contextMenu(), and CppSupportPart().

QString CppSupportPart::sourceOrHeaderCandidate  )  [private]
 

Definition at line 795 of file cppsupportpart.cpp.

References KParts::PartManager::activePart(), kdDebug(), KDevPlugin::partController(), KURL::path(), and KParts::ReadOnlyPart::url().

Referenced by contextMenu(), gotoDeclarationLine(), gotoLine(), and slotSwitchHeader().

QString CppSupportPart::specialHeaderName bool  local = false  )  const
 

Definition at line 1839 of file cppsupportpart.cpp.

References locate(), and locateLocal().

Referenced by projectOpened(), updateParserConfiguration(), and BackgroundParser::updateParserConfiguration().

QStringList CppSupportPart::subclassWidget const QString formName  )  [virtual]
 

Opens an "Subclass Widget" dialog for given Qt .ui file (formName) and propmts to implement it's slots.

Returns a list of newly created files.

Reimplemented from KDevLanguageSupport.

Definition at line 1221 of file cppsupportpart.cpp.

QString CppSupportPart::unformatClassName const QString name  )  [protected, virtual]
 

The opposite of formatClassName().

Reimplemented from KDevLanguageSupport.

Definition at line 864 of file cppsupportpart.cpp.

void CppSupportPart::updateParserConfiguration  ) 
 

Definition at line 1847 of file cppsupportpart.cpp.

References m_backgroundParser, m_driver, Driver::parseFile(), parseProject(), Driver::removeAllMacrosInFile(), specialHeaderName(), and BackgroundParser::updateParserConfiguration().

QStringList CppSupportPart::updateWidget const QString formName,
const QString fileName
[virtual]
 

Opens and "Update Widget" dialog for given Qt .ui file (formName) and prompts to add missing slot implementations in the subclass located in fileName.

Returns a list of newly created files.

Reimplemented from KDevLanguageSupport.

Definition at line 1229 of file cppsupportpart.cpp.


Friends And Related Function Documentation

friend class CppDriver [friend]
 

Definition at line 227 of file cppsupportpart.h.

Referenced by CppSupportPart().

friend class KDevCppSupportIface [friend]
 

Definition at line 226 of file cppsupportpart.h.

Referenced by CppSupportPart().


Member Data Documentation

JobData* CppSupportPart::_jd [private]
 

Definition at line 245 of file cppsupportpart.h.

Referenced by parseProject(), projectClosed(), slotParseFiles(), and ~CppSupportPart().

ClassDom CppSupportPart::m_activeClass [private]
 

Definition at line 214 of file cppsupportpart.h.

Referenced by contextMenu(), and slotExtractInterface().

KTextEditor::Document* CppSupportPart::m_activeDocument [private]
 

Definition at line 194 of file cppsupportpart.h.

Referenced by activePartChanged().

KTextEditor::EditInterface* CppSupportPart::m_activeEditor [private]
 

Definition at line 197 of file cppsupportpart.h.

Referenced by activePartChanged(), slotMakeMember(), and slotNeedTextHint().

QString CppSupportPart::m_activeFileName [private]
 

Definition at line 199 of file cppsupportpart.h.

Referenced by activePartChanged(), contextMenu(), emitFileParsed(), findSourceFile(), functionDefinitionAt(), gotoDeclarationLine(), gotoLine(), MakeMemberHelper(), and slotNeedTextHint().

FunctionDom CppSupportPart::m_activeFunction [private]
 

Definition at line 215 of file cppsupportpart.h.

Referenced by contextMenu().

KTextEditor::SelectionInterface* CppSupportPart::m_activeSelection [private]
 

Definition at line 196 of file cppsupportpart.h.

Referenced by activePartChanged().

VariableDom CppSupportPart::m_activeVariable [private]
 

Definition at line 216 of file cppsupportpart.h.

Referenced by contextMenu().

KTextEditor::View* CppSupportPart::m_activeView [private]
 

Definition at line 195 of file cppsupportpart.h.

Referenced by activePartChanged().

KTextEditor::ViewCursorInterface* CppSupportPart::m_activeViewCursor [private]
 

Definition at line 198 of file cppsupportpart.h.

Referenced by activePartChanged(), contextMenu(), currentFunctionDefinition(), gotoDeclarationLine(), gotoLine(), MakeMemberHelper(), and slotMakeMember().

BackgroundParser* CppSupportPart::m_backgroundParser [private]
 

Definition at line 192 of file cppsupportpart.h.

Referenced by MakeMemberHelper(), partRemoved(), projectOpened(), recomputeCodeModel(), removedFilesFromProject(), slotMakeMember(), slotNeedTextHint(), updateParserConfiguration(), and ~CppSupportPart().

QPtrList<Catalog> CppSupportPart::m_catalogList [private]
 

Definition at line 209 of file cppsupportpart.h.

Referenced by addCatalog(), CppSupportPart(), removeCatalog(), setupCatalog(), and ~CppSupportPart().

QString CppSupportPart::m_contextFileName [private]
 

Definition at line 189 of file cppsupportpart.h.

Referenced by contextMenu(), slotCreateSubclass(), and slotGotoIncludeFile().

QMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*> CppSupportPart::m_designers [private]
 

Definition at line 201 of file cppsupportpart.h.

Referenced by designer(), and projectClosed().

Driver* CppSupportPart::m_driver [private]
 

Definition at line 210 of file cppsupportpart.h.

Referenced by CppSupportPart(), maybeParse(), projectOpened(), slotParseFiles(), updateParserConfiguration(), and ~CppSupportPart().

QWaitCondition CppSupportPart::m_eventConsumed [private]
 

Definition at line 203 of file cppsupportpart.h.

Referenced by projectOpened().

QTimer* CppSupportPart::m_functionHintTimer [private]
 

Definition at line 218 of file cppsupportpart.h.

Referenced by activePartChanged(), CppSupportPart(), and slotFunctionHint().

QStringList CppSupportPart::m_headerExtensions = QStringList::split( ",", "h,H,hh,hxx,hpp,inl,tlh,diff,ui.h" ) [static, private]
 

Definition at line 111 of file cppsupportpart.cpp.

Referenced by isHeader().

QStringList CppSupportPart::m_headerMimeTypes = QStringList() << "text/x-chdr" << "text/x-c++hdr" [static, private]
 

Definition at line 108 of file cppsupportpart.cpp.

Referenced by isHeader().

CppCodeCompletion* CppSupportPart::m_pCompletion [private]
 

Definition at line 185 of file cppsupportpart.h.

Referenced by CppSupportPart(), projectClosed(), projectOpened(), slotCompleteText(), and ~CppSupportPart().

CppCodeCompletionConfig* CppSupportPart::m_pCompletionConfig [private]
 

Definition at line 186 of file cppsupportpart.h.

Referenced by CppSupportPart(), and projectClosed().

QGuardedPtr< ProblemReporter > CppSupportPart::m_problemReporter [private]
 

Definition at line 191 of file cppsupportpart.h.

Referenced by CppSupportPart(), customEvent(), projectOpened(), and ~CppSupportPart().

bool CppSupportPart::m_projectClosed [private]
 

Definition at line 204 of file cppsupportpart.h.

Referenced by projectClosed(), projectOpened(), and slotParseFiles().

QString CppSupportPart::m_projectDirectory [private]
 

Definition at line 211 of file cppsupportpart.h.

Referenced by addedFilesToProject(), changedFilesInProject(), modifiedFileList(), parseProject(), projectOpened(), removedFilesFromProject(), and savedFile().

QStringList CppSupportPart::m_projectFileList [private]
 

Definition at line 212 of file cppsupportpart.h.

Referenced by addedFilesToProject(), contextMenu(), projectOpened(), removedFilesFromProject(), and savedFile().

QStringList CppSupportPart::m_sourceExtensions = QStringList::split( ",", "c,C,cc,cpp,c++,cxx,m,mm,M" ) [static, private]
 

Definition at line 110 of file cppsupportpart.cpp.

Referenced by isSource().

QStringList CppSupportPart::m_sourceMimeTypes = QStringList() << "text/x-csrc" << "text/x-c++src" [static, private]
 

Definition at line 107 of file cppsupportpart.cpp.

Referenced by isSource().

QMap<QString, QDateTime> CppSupportPart::m_timestamp [private]
 

Definition at line 206 of file cppsupportpart.h.

Referenced by maybeParse(), modifiedFileList(), projectOpened(), removeWithReferences(), saveProjectSourceInfo(), and slotParseFiles().

bool CppSupportPart::m_valid [private]
 

Definition at line 207 of file cppsupportpart.h.

Referenced by initialParse().

bool CppSupportPart::withcpp [private]
 

Definition at line 188 of file cppsupportpart.h.

Referenced by CppSupportPart().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:39:03 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003