KDevelop API Documentation

AntProjectPart Class Reference

ant build tool part. More...

#include <antprojectpart.h>

Inheritance diagram for AntProjectPart:

Inheritance graph
[legend]
Collaboration diagram for AntProjectPart:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AntProjectPart (QObject *parent, const char *name, const QStringList &args)
 ~AntProjectPart ()
QStringList distFiles () const
 Returns a list of files that are part of the distribution but not under project control.

Protected Member Functions

virtual void openProject (const QString &dirName, const QString &projectName)
virtual void closeProject ()
 This method is invoked when the project is about to be closed.
virtual QString projectDirectory () const
 Returns the canonical toplevel directory of the project.
virtual QString projectName () const
 Returns the name of the project.
virtual QString mainProgram (bool relative=false) const
 Retuns the currently selected main program The returned string can be: if run/directoryradio == executable The executable name if run/directoryradio == build The path to executable relative to build directory if run/directoryradio == custom or relative == false The absolute path to executable.
virtual QString activeDirectory () const
 Returns the path (relative to the project directory) of the active directory.
virtual QStringList allFiles () const
 Returns a list of all files in the project.
virtual QString buildDirectory () const
 Returns the canonical build directory of the project.
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 void addFile (const QString &fileName)
 Adds a file to the project.
virtual void addFiles (const QStringList &fileList)
 Adds a list of files to the project.
virtual void removeFile (const QString &fileName)
 Removes a file from the project.
virtual void removeFiles (const QStringList &fileList)
 Removes a list of files from the project.

Private Slots

void slotBuild ()
void slotTargetMenuActivated (int id)
void projectConfigWidget (KDialogBase *dlg)
void contextMenu (QPopupMenu *popup, const Context *context)
void optionsAccepted ()
void slotAddToProject ()
void slotRemoveFromProject ()

Private Member Functions

void parseBuildXML ()
void fillMenu ()
void populateProject ()
void ant (const QString &target)

Private Attributes

QString m_projectDirectory
QString m_projectName
QStringList m_classPath
QStringList m_sourceFiles
AntOptions m_antOptions
KActionm_buildProjectAction
QPopupMenum_targetMenu
AntOptionsWidgetm_antOptionsWidget
ClassPathWidgetm_classPathWidget
QString m_contextFileName

Detailed Description

ant build tool part.

Author(s):
Matthias Hoelzer-Kluepfel

Unmaintained:
This part is currently un-maintained

Definition at line 41 of file antprojectpart.h.


Constructor & Destructor Documentation

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

Definition at line 45 of file antprojectpart.cpp.

References KXMLGUIClient::actionCollection(), contextMenu(), KDevPlugin::core(), m_antOptionsWidget, m_buildProjectAction, m_targetMenu, KActionMenu::popupMenu(), projectConfigWidget(), KXMLGUIClient::setInstance(), KAction::setToolTip(), KAction::setWhatsThis(), KXMLGUIClient::setXMLFile(), slotBuild(), and slotTargetMenuActivated().

AntProjectPart::~AntProjectPart  ) 
 

Definition at line 73 of file antprojectpart.cpp.


Member Function Documentation

QString AntProjectPart::activeDirectory  )  const [protected, 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 283 of file antprojectpart.cpp.

void AntProjectPart::addFile const QString fileName  )  [protected, virtual]
 

Adds a file to the project.

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

Implements KDevProject.

Definition at line 318 of file antprojectpart.cpp.

References addFiles().

void AntProjectPart::addFiles const QStringList fileList  )  [protected, virtual]
 

Adds a list of files to the project.

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

Implements KDevProject.

Definition at line 326 of file antprojectpart.cpp.

References KDevProject::addedFilesToProject(), kdDebug(), and m_sourceFiles.

Referenced by addFile(), and slotAddToProject().

QStringList AntProjectPart::allFiles  )  const [protected, virtual]
 

Returns a list of all files in the project.

The files are relative to the project directory.

Implements KDevProject.

Definition at line 295 of file antprojectpart.cpp.

Referenced by distFiles().

void AntProjectPart::ant const QString target  )  [private]
 

Definition at line 430 of file antprojectpart.cpp.

References m_antOptions, AntOptions::m_buildXML, m_classPath, AntOptions::m_defineProperties, m_projectDirectory, AntOptions::m_properties, AntOptions::m_verbosity, KDevPlugin::makeFrontend(), and KDevMakeFrontend::queueCommand().

Referenced by slotBuild(), and slotTargetMenuActivated().

QString AntProjectPart::buildDirectory  )  const [protected, virtual]
 

Returns the canonical build directory of the project.

If the separate build directory is not supported, this should return the same as projectDiretory().

Implements KDevProject.

Definition at line 184 of file antprojectpart.cpp.

Referenced by mainProgram(), and runDirectory().

void AntProjectPart::closeProject  )  [protected, virtual]
 

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

Implements KDevProject.

Definition at line 154 of file antprojectpart.cpp.

References m_antOptions, m_buildProjectAction, m_projectDirectory, m_projectName, m_sourceFiles, m_targetMenu, and KAction::setEnabled().

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

Definition at line 543 of file antprojectpart.cpp.

References KDevProject::allFiles(), FileContext::fileName(), Context::hasType(), FileContext::isDirectory(), Structure::length(), m_contextFileName, KDevPlugin::project(), projectDirectory(), slotAddToProject(), and slotRemoveFromProject().

Referenced by AntProjectPart().

QStringList AntProjectPart::distFiles  )  const [virtual]
 

Returns a list of files that are part of the distribution but not under project control.

Implements KDevProject.

Definition at line 596 of file antprojectpart.cpp.

References allFiles(), and projectDirectory().

void AntProjectPart::fillMenu  )  [private]
 

Definition at line 406 of file antprojectpart.cpp.

References m_antOptions, m_buildProjectAction, AntOptions::m_defaultTarget, m_targetMenu, AntOptions::m_targets, and KAction::setEnabled().

Referenced by openProject().

QString AntProjectPart::mainProgram bool  relative = false  )  const [protected, virtual]
 

Retuns the currently selected main program The returned string can be: if run/directoryradio == executable The executable name if run/directoryradio == build The path to executable relative to build directory if run/directoryradio == custom or relative == false The absolute path to executable.

Fixme:
put the code below into use!

there is no kdevantproject so this will not work !

Implements KDevProject.

Definition at line 247 of file antprojectpart.cpp.

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

void AntProjectPart::openProject const QString dirName,
const QString projectName
[protected, virtual]
 

Fixme:
there is no kdevantproject so this will not work !
Todo:
read alternative build file from properties

Reimplemented from KDevProject.

Definition at line 78 of file antprojectpart.cpp.

References fillMenu(), m_antOptions, AntOptions::m_buildXML, m_projectDirectory, m_projectName, m_sourceFiles, KDevProject::openProject(), parseBuildXML(), populateProject(), KDevPlugin::projectDom(), DomUtil::readEntry(), and DomUtil::writeEntry().

void AntProjectPart::optionsAccepted  )  [private, slot]
 

Definition at line 506 of file antprojectpart.cpp.

References AntOptionsWidget::BuildXML, ClassPathWidget::ClassPath, KEditListBox::items, kdDebug(), m_antOptions, m_antOptionsWidget, AntOptions::m_buildXML, m_classPath, m_classPathWidget, AntOptions::m_defineProperties, AntOptions::m_properties, AntOptions::m_verbosity, AntOptionsWidget::Properties, KURLRequester::url, and AntOptionsWidget::Verbosity.

Referenced by projectConfigWidget().

void AntProjectPart::parseBuildXML  )  [private]
 

Todo:
Handle property files

evaluate properties' values

Definition at line 360 of file antprojectpart.cpp.

References m_antOptions, AntOptions::m_buildXML, AntOptions::m_defaultTarget, AntOptions::m_defineProperties, m_projectDirectory, m_projectName, AntOptions::m_properties, and AntOptions::m_targets.

Referenced by openProject().

void AntProjectPart::populateProject  )  [private]
 

Definition at line 115 of file antprojectpart.cpp.

References kdDebug(), m_projectDirectory, and m_sourceFiles.

Referenced by openProject().

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

Definition at line 462 of file antprojectpart.cpp.

References KDialogBase::addVBoxPage(), AntOptionsWidget::BuildXML, ClassPathWidget::ClassPath, KEditListBox::insertStringList(), m_antOptions, m_antOptionsWidget, AntOptions::m_buildXML, m_classPath, m_classPathWidget, AntOptions::m_defineProperties, AntOptions::m_properties, AntOptions::m_verbosity, optionsAccepted(), AntOptionsWidget::Properties, KComboBox::setCurrentItem(), KURLRequester::setURL(), and AntOptionsWidget::Verbosity.

Referenced by AntProjectPart().

QString AntProjectPart::projectDirectory  )  const [protected, virtual]
 

Returns the canonical toplevel directory of the project.

Implements KDevProject.

Definition at line 178 of file antprojectpart.cpp.

Referenced by contextMenu(), and distFiles().

QString AntProjectPart::projectName  )  const [protected, virtual]
 

Returns the name of the project.

Implements KDevProject.

Definition at line 189 of file antprojectpart.cpp.

void AntProjectPart::removeFile const QString fileName  )  [protected, virtual]
 

Removes a file from the project.

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

Implements KDevProject.

Definition at line 339 of file antprojectpart.cpp.

References removeFiles().

void AntProjectPart::removeFiles const QStringList fileList  )  [protected, virtual]
 

Removes a list of files from the project.

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

Implements KDevProject.

Definition at line 347 of file antprojectpart.cpp.

References kdDebug(), m_sourceFiles, and KDevProject::removedFilesFromProject().

Referenced by removeFile(), and slotRemoveFromProject().

QString AntProjectPart::runArguments  )  const [protected, virtual]
 

Retuns a QString with the run command line arguments.

Fixme:
there is no kdevantproject so this will not work !

Implements KDevProject.

Definition at line 276 of file antprojectpart.cpp.

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

QString AntProjectPart::runDirectory  )  const [protected, 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.

Fixme:
put the code below into use!

there is no kdevantproject so this will not work !

Implements KDevProject.

Definition at line 212 of file antprojectpart.cpp.

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

DomUtil::PairList AntProjectPart::runEnvironmentVars  )  const [protected, virtual]
 

Retuns a PairList with the run environment variables.

Fixme:
there is no kdevantproject so this will not work !

Implements KDevProject.

Definition at line 196 of file antprojectpart.cpp.

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

void AntProjectPart::slotAddToProject  )  [private, slot]
 

Definition at line 574 of file antprojectpart.cpp.

References addFiles(), and m_contextFileName.

Referenced by contextMenu().

void AntProjectPart::slotBuild  )  [private, slot]
 

Definition at line 418 of file antprojectpart.cpp.

References ant(), m_antOptions, and AntOptions::m_defaultTarget.

Referenced by AntProjectPart().

void AntProjectPart::slotRemoveFromProject  )  [private, slot]
 

Definition at line 582 of file antprojectpart.cpp.

References m_contextFileName, and removeFiles().

Referenced by contextMenu().

void AntProjectPart::slotTargetMenuActivated int  id  )  [private, slot]
 

Definition at line 424 of file antprojectpart.cpp.

References ant(), m_antOptions, and AntOptions::m_targets.

Referenced by AntProjectPart().


Member Data Documentation

AntOptions AntProjectPart::m_antOptions [private]
 

Definition at line 100 of file antprojectpart.h.

Referenced by ant(), closeProject(), fillMenu(), openProject(), optionsAccepted(), parseBuildXML(), projectConfigWidget(), slotBuild(), and slotTargetMenuActivated().

AntOptionsWidget* AntProjectPart::m_antOptionsWidget [private]
 

Definition at line 106 of file antprojectpart.h.

Referenced by AntProjectPart(), optionsAccepted(), and projectConfigWidget().

KAction* AntProjectPart::m_buildProjectAction [private]
 

Definition at line 102 of file antprojectpart.h.

Referenced by AntProjectPart(), closeProject(), and fillMenu().

QStringList AntProjectPart::m_classPath [private]
 

Definition at line 96 of file antprojectpart.h.

Referenced by ant(), optionsAccepted(), and projectConfigWidget().

ClassPathWidget* AntProjectPart::m_classPathWidget [private]
 

Definition at line 107 of file antprojectpart.h.

Referenced by optionsAccepted(), and projectConfigWidget().

QString AntProjectPart::m_contextFileName [private]
 

Definition at line 109 of file antprojectpart.h.

Referenced by contextMenu(), slotAddToProject(), and slotRemoveFromProject().

QString AntProjectPart::m_projectDirectory [private]
 

Definition at line 95 of file antprojectpart.h.

Referenced by ant(), closeProject(), openProject(), parseBuildXML(), and populateProject().

QString AntProjectPart::m_projectName [private]
 

Definition at line 95 of file antprojectpart.h.

Referenced by closeProject(), openProject(), and parseBuildXML().

QStringList AntProjectPart::m_sourceFiles [private]
 

Definition at line 98 of file antprojectpart.h.

Referenced by addFiles(), closeProject(), openProject(), populateProject(), and removeFiles().

QPopupMenu* AntProjectPart::m_targetMenu [private]
 

Definition at line 104 of file antprojectpart.h.

Referenced by AntProjectPart(), closeProject(), and fillMenu().


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