KDevelop API Documentation

KDevLanguageSupport Class Reference

#include <kdevlanguagesupport.h>

Inheritance diagram for KDevLanguageSupport:

Inheritance graph
[legend]
Collaboration diagram for KDevLanguageSupport:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Features {
  Classes = 1, Structs = 2, Functions = 4, Variables = 8,
  Namespaces = 16, Signals = 32, Slots = 64, Declarations = 128,
  NewClass = 512, AddMethod = 1024, AddAttribute = 2048, Scripts = 4096,
  NewScript = 8192
}

Public Slots

void addFunction (DesignerType type, const QString &formName, Function function)
 Adds a function requested by a gui designer.
void removeFunction (DesignerType type, const QString &formName, Function function)
 Removes a function requested by a gui designer.
void editFunction (DesignerType type, const QString &formName, Function oldFunction, Function function)
 Edits a function requested by a gui designer.
void openFunction (DesignerType type, const QString &formName, const QString &functionName)

Signals

void updatedSourceInfo ()
 Emitted when the content of the classtore has been modified.
void aboutToRemoveSourceInfo (const QString &fileName)
 Emitted before remove the file from the classstore.
void removedSourceInfo (const QString &fileName)
 Emitted when a file has been removed from the classstore.
void addedSourceInfo (const QString &fileName)
 Emitted when a file has been added Emitted when a file has been removed from the classstorefrom the classstore.

Public Member Functions

 KDevLanguageSupport (const QString &pluginName, const QString &icon, QObject *parent, const char *name)
 ~KDevLanguageSupport ()
virtual 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 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 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 addClass ()
 Opens a "New class" dialog and adds the configured class to the sources.
virtual void addMethod (ClassDom klass)
 Opens an "Add method" dialog and adds the configured method to the sources.
virtual void implementVirtualMethods (ClassDom klass)
 Opens an "Implement Virtual Methods" dialog and adds the configured methods to the sources.
virtual void addAttribute (ClassDom klass)
 Opens an "Add attribute" dialog and adds the configured method to the sources.
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.
virtual KDevDesignerIntegrationdesigner (KInterfaceDesigner::DesignerType type)
 Returns a pointer to designer integration plugin of given type or 0.

Member Enumeration Documentation

enum KDevLanguageSupport::Features
 

Enumeration values:
Classes 
Structs 
Functions 
Variables 
Namespaces 
Signals 
Slots 
Declarations 
NewClass 
AddMethod 
AddAttribute 
Scripts 
NewScript 

Definition at line 50 of file kdevlanguagesupport.h.

Referenced by features(), SQLSupportPart::features(), RubySupportPart::features(), PythonSupportPart::features(), PHPSupportPart::features(), PerlSupportPart::features(), PascalSupportPart::features(), JavaSupportPart::features(), HaskellSupportPart::features(), FortranSupportPart::features(), CppSupportPart::features(), and BashSupportPart::features().


Constructor & Destructor Documentation

KDevLanguageSupport::KDevLanguageSupport const QString pluginName,
const QString icon,
QObject parent,
const char *  name
 

Definition at line 32 of file kdevlanguagesupport.cpp.

KDevLanguageSupport::~KDevLanguageSupport  ) 
 

Definition at line 37 of file kdevlanguagesupport.cpp.


Member Function Documentation

void KDevLanguageSupport::aboutToRemoveSourceInfo const QString fileName  )  [signal]
 

Emitted before remove the file from the classstore.

Referenced by RubySupportPart::maybeParse(), PythonSupportPart::maybeParse(), PHPSupportPart::maybeParse(), FortranSupportPart::maybeParse(), BashSupportPart::parse(), RubySupportPart::removedFilesFromProject(), PythonSupportPart::removedFilesFromProject(), PHPSupportPart::removedFilesFromProject(), PascalSupportPart::removedFilesFromProject(), FortranSupportPart::removedFilesFromProject(), BashSupportPart::removedFilesFromProject(), AdaSupportPart::removedFilesFromProject(), PerlSupportPart::removeWithReference(), JavaSupportPart::removeWithReferences(), CppSupportPart::removeWithReferences(), and PHPSupportPart::slotTextChanged().

void KDevLanguageSupport::addAttribute ClassDom  klass  )  [virtual]
 

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

Reimplemented in CppSupportPart, and JavaSupportPart.

Definition at line 78 of file kdevlanguagesupport.cpp.

References ClassDom.

Referenced by ClassViewWidget::slotAddAttribute(), and ClassTreeBase::slotAddAttribute().

void KDevLanguageSupport::addClass  )  [virtual]
 

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

Todo:
Use KDevNode stuff for this

Reimplemented in CppSupportPart, and JavaSupportPart.

Definition at line 66 of file kdevlanguagesupport.cpp.

Referenced by ClassViewWidget::slotNewClass().

void KDevLanguageSupport::addedSourceInfo const QString fileName  )  [signal]
 

Emitted when a file has been added Emitted when a file has been removed from the classstorefrom the classstore.

Referenced by RubySupportPart::addedFilesToProject(), PythonSupportPart::addedFilesToProject(), PHPSupportPart::addedFilesToProject(), PascalSupportPart::addedFilesToProject(), JavaSupportPart::addedFilesToProject(), FortranSupportPart::addedFilesToProject(), CppSupportPart::addedFilesToProject(), AdaSupportPart::addedFilesToProject(), JavaSupportPart::changedFilesInProject(), CppSupportPart::changedFilesInProject(), AdaSupportPart::changedFilesInProject(), JavaSupportPart::customEvent(), PerlSupportPart::maybeParse(), CppSupportPart::recomputeCodeModel(), RubySupportPart::savedFile(), PythonSupportPart::savedFile(), PHPSupportPart::savedFile(), JavaSupportPart::savedFile(), FortranSupportPart::savedFile(), CppSupportPart::savedFile(), BashSupportPart::savedFile(), and PHPSupportPart::slotTextChanged().

void KDevLanguageSupport::addFunction DesignerType  type,
const QString formName,
Function  function
[slot]
 

Adds a function requested by a gui designer.

Definition at line 97 of file kdevlanguagesupport.cpp.

References KDevDesignerIntegration::addFunction(), and designer().

void KDevLanguageSupport::addMethod ClassDom  klass  )  [virtual]
 

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

Reimplemented in CppSupportPart, and JavaSupportPart.

Definition at line 70 of file kdevlanguagesupport.cpp.

References ClassDom.

Referenced by ClassViewWidget::slotAddMethod(), and ClassTreeBase::slotAddMethod().

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

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

Reimplemented in CppSupportPart.

Definition at line 128 of file kdevlanguagesupport.cpp.

Referenced by addFunction(), editFunction(), openFunction(), and removeFunction().

void KDevLanguageSupport::editFunction DesignerType  type,
const QString formName,
Function  oldFunction,
Function  function
[slot]
 

Edits a function requested by a gui designer.

Definition at line 112 of file kdevlanguagesupport.cpp.

References designer(), and KDevDesignerIntegration::editFunction().

KDevLanguageSupport::Features KDevLanguageSupport::features  )  [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 in AdaSupportPart, BashSupportPart, CppSupportPart, FortranSupportPart, HaskellSupportPart, JavaSupportPart, PascalSupportPart, PerlSupportPart, PHPSupportPart, PythonSupportPart, RubySupportPart, and SQLSupportPart.

Definition at line 41 of file kdevlanguagesupport.cpp.

References Features.

Referenced by ClassTreeItem::createPopup(), ClassViewPart::langHasFeature(), ClassTreeScopeItem::setOpen(), ClassViewWidget::slotAddAttribute(), ClassViewWidget::slotAddMethod(), and ClassViewWidget::slotNewClass().

QString KDevLanguageSupport::formatClassName const QString name  )  [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 in CppSupportPart, and JavaSupportPart.

Definition at line 56 of file kdevlanguagesupport.cpp.

Referenced by Navigator::fullFunctionDeclarationName(), Navigator::fullFunctionDefinitionName(), HierarchyDialog::refresh(), and HierarchyDialog::slotClassComboChoice().

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

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

Reimplemented in CppSupportPart, JavaSupportPart, and PascalSupportPart.

Definition at line 92 of file kdevlanguagesupport.cpp.

References CodeModelItem::name().

Referenced by CppNewClassDialog::addToConstructorsList(), CppNewClassDialog::addToMethodsList(), CppNewClassDialog::addToUpgradeList(), PascalSupportPart::formatModelItem(), JavaSupportPart::formatModelItem(), CppSupportPart::formatModelItem(), Navigator::fullFunctionDeclarationName(), Navigator::fullFunctionDefinitionName(), QuickOpenFunctionDialog::gotoFile(), CppNewClassDialog::isConstructor(), CppNewClassDialog::isDestructor(), ViewCombosOp::refreshClasses(), ViewCombosOp::refreshFunctions(), ViewCombosOp::refreshNamespaces(), VariableDomBrowserItem::setup(), FunctionDomBrowserItem::setup(), TypeAliasDomBrowserItem::setup(), ClassDomBrowserItem::setup(), and NamespaceDomBrowserItem::setup().

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

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

Reimplemented in CppSupportPart, JavaSupportPart, and PascalSupportPart.

Definition at line 51 of file kdevlanguagesupport.cpp.

Referenced by ClassBrowserPart::refreshMethods().

void KDevLanguageSupport::implementVirtualMethods ClassDom  klass  )  [virtual]
 

Opens an "Implement Virtual Methods" dialog and adds the configured methods to the sources.

Definition at line 74 of file kdevlanguagesupport.cpp.

References ClassDom.

KMimeType::List KDevLanguageSupport::mimeTypes  )  [virtual]
 

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

Reimplemented in AdaSupportPart, BashSupportPart, CppSupportPart, HaskellSupportPart, JavaSupportPart, PascalSupportPart, PerlSupportPart, PHPSupportPart, PythonSupportPart, RubySupportPart, and SQLSupportPart.

Definition at line 46 of file kdevlanguagesupport.cpp.

References KMimeType::List.

Referenced by ScriptProjectPart::openProject(), PascalProjectPart::openProject(), AdaProjectPart::openProject(), and ScriptOptionsWidget::ScriptOptionsWidget().

void KDevLanguageSupport::openFunction DesignerType  type,
const QString formName,
const QString functionName
[slot]
 

Definition at line 133 of file kdevlanguagesupport.cpp.

References designer(), and KDevDesignerIntegration::openFunction().

void KDevLanguageSupport::removedSourceInfo const QString fileName  )  [signal]
 

Emitted when a file has been removed from the classstore.

void KDevLanguageSupport::removeFunction DesignerType  type,
const QString formName,
Function  function
[slot]
 

Removes a function requested by a gui designer.

Definition at line 120 of file kdevlanguagesupport.cpp.

References designer(), and KDevDesignerIntegration::removeFunction().

QStringList KDevLanguageSupport::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 in CppSupportPart, and JavaSupportPart.

Definition at line 82 of file kdevlanguagesupport.cpp.

Referenced by TrollProjectWidget::slotDetailsContextMenu(), and AutoDetailsView::slotDetailsContextMenu().

QString KDevLanguageSupport::unformatClassName const QString name  )  [virtual]
 

The opposite of formatClassName().

Reimplemented in CppSupportPart, and JavaSupportPart.

Definition at line 61 of file kdevlanguagesupport.cpp.

void KDevLanguageSupport::updatedSourceInfo  )  [signal]
 

Emitted when the content of the classtore has been modified.

Referenced by SQLSupportPart::addedFilesToProject(), BashSupportPart::addedFilesToProject(), RubySupportPart::initialParse(), PythonSupportPart::initialParse(), PHPSupportPart::initialParse(), PerlSupportPart::initialParse(), PascalSupportPart::initialParse(), JavaSupportPart::initialParse(), FortranSupportPart::initialParse(), AdaSupportPart::initialParse(), BashSupportPart::parse(), JavaSupportPart::parseProject(), SQLSupportPart::removedFilesFromProject(), PerlSupportPart::removedFilesFromProject(), PerlSupportPart::savedFile(), PascalSupportPart::savedFile(), AdaSupportPart::savedFile(), CppSupportPart::slotParseFiles(), and SQLSupportPart::updateCatalog().

QStringList KDevLanguageSupport::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 in CppSupportPart, and JavaSupportPart.

Definition at line 87 of file kdevlanguagesupport.cpp.

Referenced by TrollProjectWidget::slotDetailsContextMenu(), and AutoDetailsView::slotDetailsContextMenu().


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:40:17 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003