KDevelop API Documentation

CppSupportPart Class Reference

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

#include <cppsupportpart.h>

Inheritance diagram for CppSupportPart:

KDevLanguageSupport KDevPlugin QObject KXMLGUIClient 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

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 QString &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 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 ()
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
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

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" )

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 52 of file cppsupportpart.h.


Constructor & Destructor Documentation

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

Definition at line 145 of file cppsupportpart.cpp.

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

Referenced by CppSupportPart().

CppSupportPart::~CppSupportPart  )  [virtual]
 

Definition at line 231 of file cppsupportpart.cpp.

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


Member Function Documentation

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

Definition at line 310 of file cppsupportpart.cpp.

References KActionCollection::action(), KXMLGUIClient::actionCollection(), activePartChanged(), URLUtil::canonicalPath(), KTextEditor::TextHintInterface::enableTextHints(), endl(), 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 activePartChanged(), and 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 769 of file cppsupportpart.cpp.

References addAttribute(), main(), and KDevPlugin::mainWindow().

Referenced by addAttribute().

void CppSupportPart::addCatalog Catalog catalog  ) 
 

Definition at line 1572 of file cppsupportpart.cpp.

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

Referenced by addCatalog(), and 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 1346 of file cppsupportpart.cpp.

References slotNewClass().

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

Definition at line 593 of file cppsupportpart.cpp.

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

Referenced by addedFilesToProject(), and 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 758 of file cppsupportpart.cpp.

References addMethod(), main(), and KDevPlugin::mainWindow().

Referenced by addMethod().

BackgroundParser* CppSupportPart::backgroundParser  )  [inline]
 

Definition at line 66 of file cppsupportpart.h.

References m_backgroundParser.

Referenced by AddMethodDialog::accept(), and AddAttributeDialog::accept().

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

Definition at line 70 of file cppsupportpart.h.

References m_catalogList.

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

Definition at line 620 of file cppsupportpart.cpp.

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

Referenced by changedFilesInProject(), and projectOpened().

CppCodeCompletion* CppSupportPart::codeCompletion  )  [inline]
 

Definition at line 67 of file cppsupportpart.h.

References m_pCompletion.

CppCodeCompletionConfig* CppSupportPart::codeCompletionConfig  )  [inline]
 

Definition at line 68 of file cppsupportpart.h.

References m_pCompletionConfig.

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

void CppSupportPart::codeCompletionConfigStored  )  [private, slot]
 

Definition at line 1276 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 303 of file cppsupportpart.cpp.

References KDialogBase::addVBoxPage(), and configWidget().

Referenced by configWidget(), CppSupportPart(), and projectOpened().

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

Definition at line 452 of file cppsupportpart.cpp.

References CodeModelUtils::allFunctionDefinitionsDetailed(), CodeModelUtils::allFunctions(), KDevPlugin::codeModel(), contextMenu(), EditorContext::currentLine(), endl(), file, CodeModel::fileByName(), FileDom, findHeader(), formatModelItem(), FunctionDefinitionList, 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_contextFileName, m_projectFileList, slotExtractInterface(), slotGotoIncludeFile(), slotSwitchHeader(), sourceOrHeaderCandidate(), and text().

Referenced by contextMenu(), and CppSupportPart().

void CppSupportPart::createIgnorePCSFile  )  [private]
 

Definition at line 1684 of file cppsupportpart.cpp.

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

Referenced by parseProject(), and saveProjectSourceInfo().

FunctionDefinitionDom CppSupportPart::currentFunctionDefinition  ) 
 

Definition at line 1587 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 263 of file cppsupportpart.cpp.

References customEvent(), endl(), Event_FileParsed, fileParsed(), kdDebug(), Problem::level(), m_problemReporter, and recomputeCodeModel().

Referenced by customEvent().

void CppSupportPart::emitFileParsed  )  [private, slot]
 

Definition at line 1504 of file cppsupportpart.cpp.

References fileParsed(), and m_activeFileName.

QString CppSupportPart::extractInterface const ClassDom klass  ) 
 

Definition at line 1399 of file cppsupportpart.cpp.

References extractInterface(), and formatModelItem().

Referenced by extractInterface(), and 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 733 of file cppsupportpart.cpp.

References withcpp.

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

Referenced by customEvent(), and emitFileParsed().

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

Definition at line 1145 of file cppsupportpart.cpp.

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

Referenced by findDocument().

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

Definition at line 436 of file cppsupportpart.cpp.

References findHeader().

Referenced by contextMenu(), and findHeader().

QString CppSupportPart::findSourceFile  )  [private]
 

Definition at line 647 of file cppsupportpart.cpp.

References endl(), kdDebug(), and m_activeFileName.

Referenced by 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 742 of file cppsupportpart.cpp.

References formatClassName().

Referenced by formatClassName().

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 1303 of file cppsupportpart.cpp.

References FunctionModel::argumentList(), ArgumentList, ArgumentModel::defaultValue(), 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(), formatModelItem(), 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 1245 of file cppsupportpart.cpp.

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

Referenced by formatTag().

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

Definition at line 1642 of file cppsupportpart.cpp.

References functionDefinitionAt(), and FunctionDefinitionDom.

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

Definition at line 1623 of file cppsupportpart.cpp.

References functionDefinitionAt(), and FunctionDefinitionDom.

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

Definition at line 1597 of file cppsupportpart.cpp.

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

FunctionDefinitionDom CppSupportPart::functionDefinitionAt int  line,
int  column
 

Definition at line 1578 of file cppsupportpart.cpp.

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

Referenced by currentFunctionDefinition(), and functionDefinitionAt().

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

Definition at line 1527 of file cppsupportpart.cpp.

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

Referenced by contextMenu(), and gotoDeclarationLine().

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

Definition at line 1472 of file cppsupportpart.cpp.

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

Referenced by contextMenu(), and gotoLine().

void CppSupportPart::initialParse  )  [private, slot]
 

loads, parses and creates both classstores needed

Definition at line 790 of file cppsupportpart.cpp.

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

Referenced by projectOpened().

bool CppSupportPart::isHeader const QString fileName  )  const
 

Definition at line 1509 of file cppsupportpart.cpp.

References isHeader(), m_headerExtensions, and m_headerMimeTypes.

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

bool CppSupportPart::isSource const QString fileName  )  const
 

Definition at line 1518 of file cppsupportpart.cpp.

References isSource(), m_sourceExtensions, and m_sourceMimeTypes.

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

bool CppSupportPart::isValid  )  const [inline]
 

Definition at line 60 of file cppsupportpart.h.

References m_valid.

Referenced by problemReporter().

bool CppSupportPart::isValidSource const QString fileName  )  const
 

Definition at line 1293 of file cppsupportpart.cpp.

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

Referenced by isValidSource(), maybeParse(), parseProject(), and partRemoved().

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

checks if a file has to be parsed

Definition at line 940 of file cppsupportpart.cpp.

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

Referenced by addedFilesToProject(), changedFilesInProject(), maybeParse(), 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 1214 of file cppsupportpart.cpp.

References KMimeType::List, m_headerMimeTypes, m_sourceMimeTypes, and KMimeType::Ptr.

QStringList CppSupportPart::modifiedFileList  )  [private]
 

Definition at line 1117 of file cppsupportpart.cpp.

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

Referenced by parseProject().

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

only parses the current project

Definition at line 825 of file cppsupportpart.cpp.

References CodeModel::addFile(), URLUtil::canonicalPath(), KDevPlugin::codeModel(), CodeModel::create(), createIgnorePCSFile(), endl(), file, isValidSource(), kdDebug(), KDEV_PCS_VERSION, m_driver, m_projectClosed, m_projectDirectory, m_timestamp, KDevPlugin::mainWindow(), modifiedFileList(), Driver::parseFile(), parseProject(), KDevPlugin::project(), KDevProject::projectDirectory(), KDevProject::projectName(), reorder(), KDevMainWindow::statusBar(), toTime_t(), and KDevLanguageSupport::updatedSourceInfo().

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

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

Definition at line 1095 of file cppsupportpart.cpp.

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

Referenced by CppSupportPart(), and partRemoved().

int CppSupportPart::pcsVersion  )  [private]
 

Definition at line 1230 of file cppsupportpart.cpp.

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

Referenced by setupCatalog().

ProblemReporter* CppSupportPart::problemReporter  )  [inline]
 

Definition at line 65 of file cppsupportpart.h.

References isValid(), and m_problemReporter.

Referenced by CppDriver::fileParsed().

void CppSupportPart::projectClosed  )  [private, slot]
 

Definition at line 412 of file cppsupportpart.cpp.

References KDevPlugin::codeRepository(), GCatalog< Tag >::dbName(), GCatalog< Tag >::enabled(), endl(), kdDebug(), m_pCompletion, m_pCompletionConfig, m_projectClosed, KDevPlugin::project(), KDevPlugin::projectDom(), KDevCodeRepository::registeredCatalogs(), saveProjectSourceInfo(), and CppCodeCompletionConfig::store().

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

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

Definition at line 294 of file cppsupportpart.cpp.

References KDialogBase::addVBoxPage(), and projectConfigWidget().

Referenced by CppSupportPart(), and projectConfigWidget().

void CppSupportPart::projectOpened  )  [private, slot]
 

Definition at line 368 of file cppsupportpart.cpp.

References addedFilesToProject(), KDevProject::allFiles(), URLUtil::canonicalPath(), changedFilesInProject(), configWidget(), KDevPlugin::core(), KDevMainWindow::embedOutputView(), endl(), 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]
 

Definition at line 1484 of file cppsupportpart.cpp.

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

Referenced by customEvent(), and recomputeCodeModel().

void CppSupportPart::removeCatalog const QString dbName  ) 
 

Definition at line 1539 of file cppsupportpart.cpp.

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

Referenced by removeCatalog(), and CreatePCSDialog::slotSelected().

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

Definition at line 607 of file cppsupportpart.cpp.

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

Referenced by projectOpened(), and removedFilesFromProject().

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

Definition at line 1281 of file cppsupportpart.cpp.

References KDevPlugin::codeModel(), endl(), CodeModel::hasFile(), kdDebug(), m_timestamp, CodeModel::removeFile(), and removeWithReferences().

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

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

Definition at line 575 of file cppsupportpart.cpp.

References reorder().

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

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

Definition at line 633 of file cppsupportpart.cpp.

References endl(), kdDebug(), m_projectDirectory, m_projectFileList, maybeParse(), and savedFile().

Referenced by CppSupportPart(), and savedFile().

void CppSupportPart::saveProjectSourceInfo  )  [private]
 

Definition at line 1351 of file cppsupportpart.cpp.

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

Referenced by projectClosed().

void CppSupportPart::setPcsVersion int  version  )  [private]
 

Definition at line 1237 of file cppsupportpart.cpp.

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

Referenced by setPcsVersion(), and setupCatalog().

void CppSupportPart::setupCatalog  )  [private, slot]
 

Definition at line 1162 of file cppsupportpart.cpp.

References GCatalog< Tag >::addIndex(), KDevPlugin::codeRepository(), endl(), KStandardDirs::findAllResources(), kdDebug(), KDEV_DB_VERSION, m_catalogList, GCatalog< Tag >::open(), pcsVersion(), KDevPlugin::project(), KDevPlugin::projectDom(), KDevCodeRepository::registerCatalog(), GCatalog< Tag >::setEnabled(), and setPcsVersion().

Referenced by projectOpened().

void CppSupportPart::slotCompleteText  )  [private, slot]
 

Definition at line 780 of file cppsupportpart.cpp.

References CppCodeCompletion::completeText(), and m_pCompletion.

Referenced by CppSupportPart().

void CppSupportPart::slotCursorPositionChanged  )  [private, slot]
 

Definition at line 1662 of file cppsupportpart.cpp.

References m_functionHintTimer.

Referenced by activePartChanged().

void CppSupportPart::slotExtractInterface  )  [private, slot]
 

Definition at line 1440 of file cppsupportpart.cpp.

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

Referenced by contextMenu().

void CppSupportPart::slotFunctionHint  )  [private, slot]
 

Definition at line 1667 of file cppsupportpart.cpp.

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

Referenced by CppSupportPart().

void CppSupportPart::slotGotoIncludeFile  )  [private, slot]
 

Definition at line 726 of file cppsupportpart.cpp.

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

Referenced by contextMenu().

void CppSupportPart::slotMakeMember  )  [private, slot]
 

Definition at line 991 of file cppsupportpart.cpp.

References KTextEditor::ViewCursorInterface::cursorPositionReal(), InitDeclaratorAST::declarator(), declaratorToString(), KDevPartController::editDocument(), DeclaratorAST::exceptionSpecification(), findNodeAt(), findSourceFile(), AST::getEndPosition(), InitDeclaratorListAST::initDeclaratorList(), SimpleDeclarationAST::initDeclaratorList(), KTextEditor::EditInterface::insertText(), BackgroundParser::lock(), m_activeEditor, m_activeFileName, m_activeViewCursor, m_backgroundParser, m_valid, GroupAST::nodeList(), AST::nodeType(), NodeType_Declarator, NodeType_SimpleDeclaration, KTextEditor::EditInterface::numLines(), DeclaratorAST::parameterDeclarationClause(), AST::parent(), KDevPlugin::partController(), scopeOfNode(), KTextEditor::ViewCursorInterface::setCursorPositionReal(), text(), BackgroundParser::translationUnit(), SimpleDeclarationAST::typeSpec(), typeSpecToString(), and BackgroundParser::unlock().

Referenced by CppSupportPart().

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

Definition at line 963 of file cppsupportpart.cpp.

References findNodeAt(), BackgroundParser::lock(), m_activeEditor, m_activeFileName, m_backgroundParser, NodeType_FunctionDefinition, slotNeedTextHint(), KTextEditor::EditInterface::textLine(), BackgroundParser::translationUnit(), and BackgroundParser::unlock().

Referenced by activePartChanged(), and slotNeedTextHint().

void CppSupportPart::slotNewClass  )  [private, slot]
 

Definition at line 752 of file cppsupportpart.cpp.

Referenced by addClass(), and CppSupportPart().

void CppSupportPart::slotProjectCompiled  )  [private, slot]
 

Definition at line 1111 of file cppsupportpart.cpp.

References endl(), kdDebug(), and parseProject().

Referenced by projectOpened().

void CppSupportPart::slotSwitchHeader  )  [private, slot]
 

Definition at line 721 of file cppsupportpart.cpp.

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

Referenced by contextMenu(), and CppSupportPart().

QString CppSupportPart::sourceOrHeaderCandidate  )  [private]
 

Definition at line 679 of file cppsupportpart.cpp.

References KParts::PartManager::activePart(), endl(), 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 1697 of file cppsupportpart.cpp.

References locate(), locateLocal(), and specialHeaderName().

Referenced by projectOpened(), specialHeaderName(), 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 1079 of file cppsupportpart.cpp.

References subclassWidget().

Referenced by subclassWidget().

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

The opposite of formatClassName().

Reimplemented from KDevLanguageSupport.

Definition at line 747 of file cppsupportpart.cpp.

References unformatClassName().

Referenced by unformatClassName().

void CppSupportPart::updateParserConfiguration  ) 
 

Definition at line 1705 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 1087 of file cppsupportpart.cpp.

References updateWidget().

Referenced by updateWidget().


Member Data Documentation

ClassDom CppSupportPart::m_activeClass [private]
 

Definition at line 198 of file cppsupportpart.h.

Referenced by contextMenu(), and slotExtractInterface().

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

Definition at line 180 of file cppsupportpart.h.

Referenced by activePartChanged().

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

Definition at line 183 of file cppsupportpart.h.

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

QString CppSupportPart::m_activeFileName [private]
 

Definition at line 185 of file cppsupportpart.h.

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

FunctionDom CppSupportPart::m_activeFunction [private]
 

Definition at line 199 of file cppsupportpart.h.

Referenced by contextMenu().

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

Definition at line 182 of file cppsupportpart.h.

Referenced by activePartChanged().

VariableDom CppSupportPart::m_activeVariable [private]
 

Definition at line 200 of file cppsupportpart.h.

Referenced by contextMenu().

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

Definition at line 181 of file cppsupportpart.h.

Referenced by activePartChanged().

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

Definition at line 184 of file cppsupportpart.h.

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

BackgroundParser* CppSupportPart::m_backgroundParser [private]
 

Definition at line 178 of file cppsupportpart.h.

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

QPtrList<Catalog> CppSupportPart::m_catalogList [private]
 

Definition at line 193 of file cppsupportpart.h.

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

QString CppSupportPart::m_contextFileName [private]
 

Definition at line 175 of file cppsupportpart.h.

Referenced by contextMenu(), and slotGotoIncludeFile().

Driver* CppSupportPart::m_driver [private]
 

Definition at line 194 of file cppsupportpart.h.

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

QWaitCondition CppSupportPart::m_eventConsumed [private]
 

Definition at line 187 of file cppsupportpart.h.

Referenced by projectOpened().

QTimer* CppSupportPart::m_functionHintTimer [private]
 

Definition at line 202 of file cppsupportpart.h.

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

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

Definition at line 106 of file cppsupportpart.cpp.

Referenced by isHeader().

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

Definition at line 103 of file cppsupportpart.cpp.

Referenced by isHeader(), and mimeTypes().

CppCodeCompletion* CppSupportPart::m_pCompletion [private]
 

Definition at line 171 of file cppsupportpart.h.

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

CppCodeCompletionConfig* CppSupportPart::m_pCompletionConfig [private]
 

Definition at line 172 of file cppsupportpart.h.

Referenced by codeCompletionConfig(), CppSupportPart(), and projectClosed().

QGuardedPtr< ProblemReporter > CppSupportPart::m_problemReporter [private]
 

Definition at line 177 of file cppsupportpart.h.

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

bool CppSupportPart::m_projectClosed [private]
 

Definition at line 188 of file cppsupportpart.h.

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

QString CppSupportPart::m_projectDirectory [private]
 

Definition at line 195 of file cppsupportpart.h.

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

QStringList CppSupportPart::m_projectFileList [private]
 

Definition at line 196 of file cppsupportpart.h.

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

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

Definition at line 105 of file cppsupportpart.cpp.

Referenced by isSource().

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

Definition at line 102 of file cppsupportpart.cpp.

Referenced by isSource(), and mimeTypes().

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

Definition at line 190 of file cppsupportpart.h.

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

bool CppSupportPart::m_valid [private]
 

Definition at line 191 of file cppsupportpart.h.

Referenced by initialParse(), isValid(), and slotMakeMember().

bool CppSupportPart::withcpp [private]
 

Definition at line 174 of file cppsupportpart.h.

Referenced by CppSupportPart(), and features().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:02:00 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003