KDevelop API Documentation

AntProjectPart Class Reference

ant build tool part. More...

#include <antprojectpart.h>

Inheritance diagram for AntProjectPart:

KDevProject KDevPlugin QObject KXMLGUIClient List of all members.

Public Member Functions

 AntProjectPart (QObject *parent, const char *name, const QStringList &args)
 ~AntProjectPart ()

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(), AntProjectPart(), contextMenu(), KDevPlugin::core(), m_antOptionsWidget, m_buildProjectAction, m_targetMenu, KActionMenu::popupMenu(), projectConfigWidget(), KAction::setToolTip(), KAction::setWhatsThis(), slotBuild(), and slotTargetMenuActivated().

Referenced by AntProjectPart().

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 addFile(), and addFiles().

Referenced by addFile().

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 addFiles(), endl(), kdDebug(), and m_sourceFiles.

Referenced by addFile(), addFiles(), 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.

Todo:
This is currently a bit broken because the autoproject part doesn't return header files here.

Implements KDevProject.

Definition at line 295 of file antprojectpart.cpp.

References m_sourceFiles.

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

Definition at line 430 of file antprojectpart.cpp.

References ant(), 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 ant(), 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.

References m_projectDirectory.

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 endl(), 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(), contextMenu(), FileContext::fileName(), Context::hasType(), FileContext::isDirectory(), length(), m_contextFileName, KDevPlugin::project(), projectDirectory(), slotAddToProject(), and slotRemoveFromProject().

Referenced by AntProjectPart(), and contextMenu().

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(), mainProgram(), and KDevPlugin::projectDom().

Referenced by mainProgram().

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, openProject(), parseBuildXML(), populateProject(), and KDevPlugin::projectDom().

Referenced by openProject().

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]
 

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 endl(), 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(), projectConfigWidget(), AntOptionsWidget::Properties, KComboBox::setCurrentItem(), KURLRequester::setURL(), and AntOptionsWidget::Verbosity.

Referenced by AntProjectPart(), and projectConfigWidget().

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

Returns the canonical toplevel directory of the project.

Implements KDevProject.

Definition at line 178 of file antprojectpart.cpp.

References m_projectDirectory.

Referenced by contextMenu().

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

Returns the name of the project.

Implements KDevProject.

Definition at line 189 of file antprojectpart.cpp.

References m_projectName.

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 removeFile(), and removeFiles().

Referenced by removeFile().

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 endl(), kdDebug(), m_sourceFiles, and removeFiles().

Referenced by removeFile(), removeFiles(), 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().

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(), and KDevPlugin::projectDom().

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, and KDevPlugin::projectDom().

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, AntOptions::m_targets, and slotTargetMenuActivated().

Referenced by AntProjectPart(), and slotTargetMenuActivated().


Member Data Documentation

AntOptions AntProjectPart::m_antOptions [private]
 

Definition at line 99 of file antprojectpart.h.

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

AntOptionsWidget* AntProjectPart::m_antOptionsWidget [private]
 

Definition at line 105 of file antprojectpart.h.

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

KAction* AntProjectPart::m_buildProjectAction [private]
 

Definition at line 101 of file antprojectpart.h.

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

QStringList AntProjectPart::m_classPath [private]
 

Definition at line 95 of file antprojectpart.h.

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

ClassPathWidget* AntProjectPart::m_classPathWidget [private]
 

Definition at line 106 of file antprojectpart.h.

Referenced by optionsAccepted(), and projectConfigWidget().

QString AntProjectPart::m_contextFileName [private]
 

Definition at line 108 of file antprojectpart.h.

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

QString AntProjectPart::m_projectDirectory [private]
 

Definition at line 94 of file antprojectpart.h.

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

QString AntProjectPart::m_projectName [private]
 

Definition at line 94 of file antprojectpart.h.

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

QStringList AntProjectPart::m_sourceFiles [private]
 

Definition at line 97 of file antprojectpart.h.

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

QPopupMenu* AntProjectPart::m_targetMenu [private]
 

Definition at line 103 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.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