KDevelop API Documentation

AdaProjectPart Class Reference

Ada Project: the common project part for all available ada compilers (currently only gnat). More...

#include <adaproject_part.h>

Inheritance diagram for AdaProjectPart:

KDevProject KDevPlugin QObject KXMLGUIClient List of all members.

Public Slots

void loadProjectConfig ()
 loads config from project file


Public Member Functions

 AdaProjectPart (QObject *parent, const char *name, const QStringList &)
 ~AdaProjectPart ()
virtual void openProject (const QString &dirName, const QString &projectName)
 This method is invoked when the project is opened (i.e.

virtual void closeProject ()
 This method is invoked when the project is about to be closed.

virtual QString mainProgram (bool relative=false) const
 Returns the name of the main source file without extension.

virtual QString mainSource () const
 Main source file (like src/main.adb).

virtual void setMainSource (QString fullPath)
virtual QString projectDirectory () const
 Returns the canonical toplevel directory of the project.

virtual QString projectName () const
 Returns the name of the project.

virtual QString activeDirectory () const
 Returns the path (relative to the project directory) of the active directory.

virtual QString buildDirectory () const
 The location of the main source file.

virtual QString runDirectory () const
 Retuns the currently selected run directory The returned string can be: if run/directoryradio == executable The directory where the executable is if run/directoryradio == build The directory where the executable is relative to build directory if run/directoryradio == custom The custom directory absolute path.

virtual QString runArguments () const
 Retuns a QString with the run command line arguments.

virtual DomUtil::PairList runEnvironmentVars () const
 Retuns a PairList with the run environment variables.

virtual QStringList allFiles () const
 Returns everything in the project directory.

virtual void addFile (const QString &fileName)
 This does absolutelly nothing.

virtual void addFiles (const QStringList &fileList)
 This does absolutelly nothing.

virtual void removeFile (const QString &fileName)
 This does absolutelly nothing.

virtual void removeFiles (const QStringList &fileList)
 This does absolutelly nothing.

virtual void changedFiles (const QStringList &fileList)
 Notifies the project of changes to the files.

virtual void changedFile (const QString &fileName)
 Notifies the project of a change to one of the files.

KDevCompilerOptionscreateCompilerOptions (const QString &name)
virtual QString defaultOptions (const QString compiler)

Private Slots

void slotBuild ()
void slotExecute ()
void projectConfigWidget (KDialogBase *dlg)
void configWidget (KDialogBase *dlg)

Private Member Functions

void listOfFiles (QStringList &result, QString path) const

Private Attributes

QGuardedPtr< AdaProjectWidgetm_widget
QString m_buildDir
QString m_projectDir
QString m_projectName
QString m_mainProg
QString m_mainSource
QString m_compilerExec
QString m_compilerOpts
QStringList m_sourceFiles

Detailed Description

Ada Project: the common project part for all available ada compilers (currently only gnat).

It holds the project file list and tries to abstract from their specifics.

Author(s):
Oliver Kellogg

Unmaintained:
This part is currently un-maintained

Deprecated:
This class is deprecated, use GenericProjectPart (buildtools/generic) instead.

Feature(s):
supports gnat compiler

Holds the project file list and tries to abstract from their specifics

Requirement(s):
Ada gnat compiler

Definition at line 21 of file adaproject_part.h.


Constructor & Destructor Documentation

AdaProjectPart::AdaProjectPart QObject parent,
const char *  name,
const QStringList
 

AdaProjectPart::~AdaProjectPart  ) 
 

Definition at line 81 of file adaproject_part.cpp.


Member Function Documentation

QString AdaProjectPart::activeDirectory  )  const [virtual]
 

Returns the path (relative to the project directory) of the active directory.

All newly generated classes are added here.

Implements KDevProject.

Definition at line 274 of file adaproject_part.cpp.

References mainSource(), and projectDirectory().

void AdaProjectPart::addFile const QString fileName  )  [virtual]
 

This does absolutelly nothing.

Implements KDevProject.

Definition at line 324 of file adaproject_part.cpp.

References addFile().

Referenced by addFile().

void AdaProjectPart::addFiles const QStringList fileList  )  [virtual]
 

This does absolutelly nothing.

Implements KDevProject.

Definition at line 328 of file adaproject_part.cpp.

References addFiles().

Referenced by addFiles().

QStringList AdaProjectPart::allFiles  )  const [virtual]
 

Returns everything in the project directory.

Implements KDevProject.

Definition at line 314 of file adaproject_part.cpp.

References m_sourceFiles.

QString AdaProjectPart::buildDirectory  )  const [virtual]
 

The location of the main source file.

Implements KDevProject.

Definition at line 280 of file adaproject_part.cpp.

References mainSource().

Referenced by mainProgram(), runDirectory(), slotBuild(), and slotExecute().

void AdaProjectPart::changedFile const QString fileName  )  [virtual]
 

Notifies the project of a change to one of the files.

The given file name must be relative to the project directory.

Reimplemented from KDevProject.

Definition at line 374 of file adaproject_part.cpp.

References changedFile().

Referenced by changedFile().

void AdaProjectPart::changedFiles const QStringList fileList  )  [virtual]
 

Notifies the project of changes to the files.

Provided for convenience when changing many files. The given file names must be relative to the project directory.

Reimplemented from KDevProject.

Definition at line 369 of file adaproject_part.cpp.

References changedFiles().

Referenced by changedFiles().

void AdaProjectPart::closeProject  )  [virtual]
 

This method is invoked when the project is about to be closed.

Implements KDevProject.

Definition at line 169 of file adaproject_part.cpp.

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

Definition at line 410 of file adaproject_part.cpp.

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

Referenced by configWidget().

KDevCompilerOptions * AdaProjectPart::createCompilerOptions const QString name  ) 
 

Definition at line 418 of file adaproject_part.cpp.

References KLibFactory::create(), endl(), KLibLoader::factory(), kdDebug(), KLibLoader::lastErrorMessage(), KService::Ptr, and KLibLoader::self().

Referenced by AdaProjectOptionsDlg::optionsButtonClicked(), and AdaGlobalOptionsDlg::optionsButtonClicked().

QString AdaProjectPart::defaultOptions const QString  compiler  )  [virtual]
 

Definition at line 451 of file adaproject_part.cpp.

References KGlobal::config(), defaultOptions(), KConfigBase::readPathEntry(), and KConfigBase::setGroup().

Referenced by defaultOptions(), and AdaProjectOptionsDlg::setDefaultOptions().

void AdaProjectPart::listOfFiles QStringList result,
QString  path
const [private]
 

Definition at line 286 of file adaproject_part.cpp.

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

Referenced by listOfFiles().

void AdaProjectPart::loadProjectConfig  )  [slot]
 

loads config from project file

Definition at line 388 of file adaproject_part.cpp.

References m_compilerExec, m_compilerOpts, m_mainSource, and KDevPlugin::projectDom().

Referenced by openProject(), and projectConfigWidget().

QString AdaProjectPart::mainProgram bool  relative = false  )  const [virtual]
 

Returns the name of the main source file without extension.

We assume that all Ada compilers call the binary that way.

Fixme:
put the code below into use!

Implements KDevProject.

Definition at line 220 of file adaproject_part.cpp.

References buildDirectory(), mainProgram(), mainSource(), and KDevPlugin::projectDom().

Referenced by mainProgram(), and slotExecute().

QString AdaProjectPart::mainSource  )  const [virtual]
 

Main source file (like src/main.adb).

Definition at line 254 of file adaproject_part.cpp.

References m_mainSource, and projectDirectory().

Referenced by activeDirectory(), buildDirectory(), mainProgram(), and slotBuild().

void AdaProjectPart::openProject const QString dirName,
const QString projectName
[virtual]
 

This method is invoked when the project is opened (i.e.

actually just after this class has been instantiated). The first parameter is the project directory, which should afterwards be returned by the projectDirectory() method. The second parameter is the project name, which is equivalent with the project file name without the .kdevelop suffix.

Reimplemented from KDevProject.

Definition at line 102 of file adaproject_part.cpp.

References endl(), kdDebug(), KDevPlugin::languageSupport(), KMimeType::List, loadProjectConfig(), m_buildDir, m_projectDir, m_projectName, m_sourceFiles, matchesPattern(), KDevLanguageSupport::mimeTypes(), openProject(), and KDevPlugin::projectDom().

Referenced by openProject().

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

Definition at line 379 of file adaproject_part.cpp.

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

Referenced by projectConfigWidget().

QString AdaProjectPart::projectDirectory  )  const [virtual]
 

Returns the canonical toplevel directory of the project.

Implements KDevProject.

Definition at line 264 of file adaproject_part.cpp.

References m_projectDir.

Referenced by activeDirectory(), mainSource(), AdaProjectOptionsDlg::readConfig(), AdaProjectOptionsDlg::saveConfig(), and setMainSource().

QString AdaProjectPart::projectName  )  const [virtual]
 

Returns the name of the project.

Implements KDevProject.

Definition at line 269 of file adaproject_part.cpp.

References m_projectName.

void AdaProjectPart::removeFile const QString fileName  )  [virtual]
 

This does absolutelly nothing.

Implements KDevProject.

Definition at line 332 of file adaproject_part.cpp.

References removeFile().

Referenced by removeFile().

void AdaProjectPart::removeFiles const QStringList fileList  )  [virtual]
 

This does absolutelly nothing.

Implements KDevProject.

Definition at line 336 of file adaproject_part.cpp.

References removeFiles().

Referenced by removeFiles().

QString AdaProjectPart::runArguments  )  const [virtual]
 

Retuns a QString with the run command line arguments.

Implements KDevProject.

Definition at line 249 of file adaproject_part.cpp.

References KDevPlugin::projectDom().

QString AdaProjectPart::runDirectory  )  const [virtual]
 

Retuns the currently selected run directory The returned string can be: if run/directoryradio == executable The directory where the executable is if run/directoryradio == build The directory where the executable is relative to build directory if run/directoryradio == custom The custom directory absolute path.

Implements KDevProject.

Definition at line 189 of file adaproject_part.cpp.

References buildDirectory(), and KDevPlugin::projectDom().

DomUtil::PairList AdaProjectPart::runEnvironmentVars  )  const [virtual]
 

Retuns a PairList with the run environment variables.

Implements KDevProject.

Definition at line 174 of file adaproject_part.cpp.

References DomUtil::PairList, and KDevPlugin::projectDom().

void AdaProjectPart::setMainSource QString  fullPath  )  [virtual]
 

Definition at line 259 of file adaproject_part.cpp.

References m_mainSource, projectDirectory(), and setMainSource().

Referenced by setMainSource().

void AdaProjectPart::slotBuild  )  [private, slot]
 

Definition at line 340 of file adaproject_part.cpp.

References buildDirectory(), m_compilerExec, m_compilerOpts, mainSource(), KDevPlugin::makeFrontend(), KDevPlugin::partController(), KDevMakeFrontend::queueCommand(), and KDevPartController::saveAllFiles().

void AdaProjectPart::slotExecute  )  [private, slot]
 

Definition at line 362 of file adaproject_part.cpp.

References KDevPlugin::appFrontend(), buildDirectory(), mainProgram(), KDevPlugin::partController(), KDevPartController::saveAllFiles(), and KDevAppFrontend::startAppCommand().


Member Data Documentation

QString AdaProjectPart::m_buildDir [private]
 

Definition at line 80 of file adaproject_part.h.

Referenced by openProject().

QString AdaProjectPart::m_compilerExec [private]
 

Definition at line 86 of file adaproject_part.h.

Referenced by loadProjectConfig(), and slotBuild().

QString AdaProjectPart::m_compilerOpts [private]
 

Definition at line 87 of file adaproject_part.h.

Referenced by loadProjectConfig(), and slotBuild().

QString AdaProjectPart::m_mainProg [private]
 

Definition at line 84 of file adaproject_part.h.

QString AdaProjectPart::m_mainSource [private]
 

Definition at line 85 of file adaproject_part.h.

Referenced by loadProjectConfig(), mainSource(), and setMainSource().

QString AdaProjectPart::m_projectDir [private]
 

Definition at line 81 of file adaproject_part.h.

Referenced by openProject(), and projectDirectory().

QString AdaProjectPart::m_projectName [private]
 

Definition at line 82 of file adaproject_part.h.

Referenced by openProject(), and projectName().

QStringList AdaProjectPart::m_sourceFiles [private]
 

Definition at line 89 of file adaproject_part.h.

Referenced by allFiles(), and openProject().

QGuardedPtr<AdaProjectWidget> AdaProjectPart::m_widget [private]
 

Definition at line 76 of file adaproject_part.h.


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:01:58 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003