KDevelop API Documentation

CvsServicePart Class Reference

This plugin integrates Cervisia (version >= 2.1) cvsservice DCOP service into kdevelop (read FAQ at the bottom of this document): so, this part _does_ require cvsservice installed on your system: the configure script in the main source directory should automagically detect the presence of Cervisia and build this plugin. More...

#include <cvspart.h>

Inheritance diagram for CvsServicePart:

Inheritance graph
[legend]
Collaboration diagram for CvsServicePart:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CvsServicePart (QObject *parent, const char *name, const QStringList &)
 Standard constructor.
virtual ~CvsServicePart ()
 Destructor.
virtual QWidgetnewProjectWidget (QWidget *parent)
 Returns the configuration widget (for properly configuring the project to use CVS), child of parent.
virtual void createNewProject (const QString &dir)
 Setup a directory tree for use with CVS.
virtual bool fetchFromRepository ()
 Fetch a module from remote repository, so it can be used for importing.
virtual KDevVCSFileInfoProviderfileInfoProvider () const
virtual bool isValidDirectory (const QString &dirPath) const

Private Slots

void contextMenu (QPopupMenu *popup, const Context *context)
 Add menu items binded to cvs operations' slots to popup, using data in context.
void slotActionLogin ()
void slotActionLogout ()
void slotActionCommit ()
void slotActionUpdate ()
void slotActionAdd ()
void slotActionAddBinary ()
void slotActionRemove ()
void slotActionRemoveSticky ()
void slotActionLog ()
void slotActionDiff ()
void slotActionTag ()
void slotActionUnTag ()
void slotActionAddToIgnoreList ()
void slotActionRemoveFromIgnoreList ()
void slotCommit ()
void slotUpdate ()
void slotAdd ()
void slotAddBinary ()
void slotRemove ()
void slotRemoveSticky ()
void slotLog ()
void slotDiff ()
void slotTag ()
void slotUnTag ()
void slotAddToIgnoreList ()
void slotRemoveFromIgnoreList ()
void slotProjectOpened ()
void slotProjectClosed ()
void slotAddFilesToProject (const QStringList &)
void slotRemovedFilesFromProject (const QStringList &)
void projectConfigWidget (KDialogBase *dlg)
 Adds a configuration widget (for properly configuring CVS command-line options) and adds it to dlg.
void slotStopButtonClicked (KDevPlugin *)
 Called when the user wishes to stop an operation.

Private Member Functions

void init ()
void setupActions ()
bool urlFocusedDocument (KURL &url)
 Returns the KURL for the currently focused document, if there is any.

Private Attributes

KURL::List m_urls
 A list of KURLs of the files to be "operated" on (to be committed, added, removed, ...).
QGuardedPtr< CvsFormm_cvsConfigurationForm
 This is a pointer to the d->form used for collecting data about CVS project creation (used by the ApplicationWizard in example).
KActionactionCommit
KActionactionDiff
KActionactionLog
KActionactionAdd
KActionactionAddBinary
KActionactionRemove
KActionactionUpdate
KActionactionRemoveSticky
KActionactionAddToIgnoreList
KActionactionRemoveFromIgnoreList
KActionactionTag
KActionactionUnTag
KActionactionLogin
KActionactionLogout
CvsServicePartImplm_impl

Friends

class CvsServicePartImpl

Detailed Description

This plugin integrates Cervisia (version >= 2.1) cvsservice DCOP service into kdevelop (read FAQ at the bottom of this document): so, this part _does_ require cvsservice installed on your system: the configure script in the main source directory should automagically detect the presence of Cervisia and build this plugin.

If Cervisia wasn't installed in $KDEDIR than you need to specify paths for lib and include files, for example: --with-extra-libs=$HOME/kde/lib --with-extra-includes=$HOME/kde/include (where $HOME/kde is where I install my own kde stuff so I don't mess with working kde installation)

WARNING: So, if you have already compiled kdevelop *without* cvsservice and have now installed cervisia to try this nice piece of software, you need to re-run configure so it can detect cervisia installation and enable compilation for vcs/cvsservice.

WARNING: This plugin will quite surely change when the upcoming modifications in Cervisia's own architecture (separation of core and front-ends and user applications' library) are done (probably starting from kde >= 3.3). If you want to partecipate please join discussions on the cervisia@kde.org mailing list. Contributions are always welcome :-)

WARNING2: If it doesn't compile try to update your cervisia installation.

Implementation of this component is done by:

Todo:
  • Fix the "cvs update" function which behave strangely for sub-directories of the main project dir.
  • (> 3.0) Replace the menu entries text with shorter ones
  • Fix bugs on bugs.kde.org ;-)

Test with SSH repositories!

Share a common outputview between VCS: CvsProcessWidget should be reworked :-/

Additional slots for more complex stuff as status, revert, patch creation, ...

Author(s):
Mario Scalas

Maintainer(s):
Mario Scalas

Feature(s):
All that provided by parts/cvs

it is possible to 'add as binary' files to repository

checkout from remote repository ability added to the appwizard/importdlg

should handle :ext: repositories thanks to cvsservice

can tag / un-tag files

can revert and diff between specific releases

can do multiple diff from a common cvs log output text

Bug:
bugs in cvs part component at Bugzilla database

Requirement(s):
CVS >= 1.10.6

Cervisia >= 2.1 (from kdesdk package included in KDE >= 3.2)

F.A.Q.:
Does cvsservicepart support login with :pserver: or :ext: ? Well, I dunno ;-) I have no ssh repositories to test so feel free to provide feedback on the subject :-) Update: Ok, it seems at least one user has tried :ext: reporting it to work (with ssh-agent avoiding some typing headache ;-))

Definition at line 38 of file cvspart.h.


Constructor & Destructor Documentation

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

Standard constructor.

CvsServicePart::~CvsServicePart  )  [virtual]
 

Destructor.

Definition at line 103 of file cvspart.cpp.


Member Function Documentation

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

Add menu items binded to cvs operations' slots to popup, using data in context.

Not that context _must_ be FileContext-type, otherwise will do nothing.

Definition at line 272 of file cvspart.cpp.

References actionAdd, actionAddBinary, actionAddToIgnoreList, actionCommit, actionDiff, actionLog, actionRemove, actionRemoveFromIgnoreList, actionRemoveSticky, actionTag, actionUnTag, actionUpdate, URLUtil::dump(), Context::hasType(), isValidDirectory(), kdDebug(), m_urls, KDevPlugin::project(), slotAdd(), slotAddBinary(), slotAddToIgnoreList(), slotCommit(), slotDiff(), slotLog(), slotRemove(), slotRemoveFromIgnoreList(), slotRemoveSticky(), slotTag(), slotUnTag(), slotUpdate(), KAction::text, EditorContext::url(), and FileContext::urls().

Referenced by init().

void CvsServicePart::createNewProject const QString dirName  )  [virtual]
 

Setup a directory tree for use with CVS.

Fixme:
actually there is no way to inform that a _new_ ("just created")

Reimplemented from KDevVersionControl.

Definition at line 231 of file cvspart.cpp.

References CvsServicePartImpl::createNewProject(), g_projectWasJustCreated, kdDebug(), m_cvsConfigurationForm, and m_impl.

bool CvsServicePart::fetchFromRepository  )  [virtual]
 

Fetch a module from remote repository, so it can be used for importing.

Reimplemented from KDevVersionControl.

Definition at line 217 of file cvspart.cpp.

References CvsServicePartImpl::checkout(), and m_impl.

KDevVCSFileInfoProvider * CvsServicePart::fileInfoProvider  )  const [virtual]
 

Returns:
the info provider for VCS sandboxes

Reimplemented from KDevVersionControl.

Definition at line 224 of file cvspart.cpp.

References CvsServicePartImpl::fileInfoProvider(), and m_impl.

void CvsServicePart::init  )  [private]
 

Definition at line 111 of file cvspart.cpp.

References contextMenu(), KDevPlugin::core(), CvsServicePartImpl, KDevMainWindow::embedOutputView(), KDevVersionControl::finishedFetching(), m_impl, CvsServicePartImpl::m_widget, KDevPlugin::mainWindow(), CvsServicePartImpl::processWidget(), projectConfigWidget(), setupActions(), slotProjectClosed(), slotProjectOpened(), and slotStopButtonClicked().

bool CvsServicePart::isValidDirectory const QString dirPath  )  const [virtual]
 

Parameters:
dirPath absolute path of the directory
Returns:
true if the the directory is a valid CVS sandbox

Reimplemented from KDevVersionControl.

Definition at line 367 of file cvspart.cpp.

References CvsServicePartImpl::isValidDirectory(), and m_impl.

Referenced by contextMenu(), slotProjectClosed(), and slotProjectOpened().

QWidget * CvsServicePart::newProjectWidget QWidget parent  )  [virtual]
 

Returns the configuration widget (for properly configuring the project to use CVS), child of parent.

Reimplemented from KDevVersionControl.

Definition at line 264 of file cvspart.cpp.

References m_cvsConfigurationForm.

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

Adds a configuration widget (for properly configuring CVS command-line options) and adds it to dlg.

Definition at line 255 of file cvspart.cpp.

References KDialogBase::addVBoxPage(), and KDevPlugin::icon().

Referenced by init().

void CvsServicePart::setupActions  )  [private]
 

Definition at line 139 of file cvspart.cpp.

References actionAdd, actionAddBinary, actionAddToIgnoreList, KXMLGUIClient::actionCollection(), actionCommit, actionDiff, actionLog, actionLogin, actionLogout, actionRemove, actionRemoveFromIgnoreList, actionRemoveSticky, actionTag, actionUnTag, actionUpdate, KAction::setToolTip(), KAction::setWhatsThis(), slotActionAdd(), slotActionAddBinary(), slotActionAddToIgnoreList(), slotActionCommit(), slotActionDiff(), slotActionLog(), slotActionLogin(), slotActionLogout(), slotActionRemove(), slotActionRemoveFromIgnoreList(), slotActionRemoveSticky(), slotActionTag(), slotActionUnTag(), and slotActionUpdate().

Referenced by init().

void CvsServicePart::slotActionAdd  )  [private, slot]
 

Definition at line 410 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionAddBinary  )  [private, slot]
 

Definition at line 421 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionAddToIgnoreList  )  [private, slot]
 

Definition at line 498 of file cvspart.cpp.

References CvsServicePartImpl::addToIgnoreList(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionCommit  )  [private, slot]
 

Definition at line 388 of file cvspart.cpp.

References CvsServicePartImpl::commit(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionDiff  )  [private, slot]
 

Definition at line 465 of file cvspart.cpp.

References CvsServicePartImpl::diff(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionLog  )  [private, slot]
 

Definition at line 454 of file cvspart.cpp.

References CvsServicePartImpl::log(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionLogin  )  [private, slot]
 

Definition at line 374 of file cvspart.cpp.

References CvsServicePartImpl::login(), and m_impl.

Referenced by setupActions().

void CvsServicePart::slotActionLogout  )  [private, slot]
 

Definition at line 381 of file cvspart.cpp.

References CvsServicePartImpl::logout(), and m_impl.

Referenced by setupActions().

void CvsServicePart::slotActionRemove  )  [private, slot]
 

Definition at line 432 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::remove(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionRemoveFromIgnoreList  )  [private, slot]
 

Definition at line 509 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::removeFromIgnoreList(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionRemoveSticky  )  [private, slot]
 

Definition at line 443 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::removeStickyFlag(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionTag  )  [private, slot]
 

Definition at line 476 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::tag(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionUnTag  )  [private, slot]
 

Definition at line 487 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::unTag(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionUpdate  )  [private, slot]
 

Definition at line 399 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::update(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotAdd  )  [private, slot]
 

Definition at line 534 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotAddBinary  )  [private, slot]
 

Definition at line 541 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotAddFilesToProject const QStringList  )  [private, slot]
 

Definition at line 614 of file cvspart.cpp.

References CvsServicePartImpl::addFilesToProject(), and m_impl.

Referenced by slotProjectClosed(), and slotProjectOpened().

void CvsServicePart::slotAddToIgnoreList  )  [private, slot]
 

Definition at line 590 of file cvspart.cpp.

References CvsServicePartImpl::addToIgnoreList(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotCommit  )  [private, slot]
 

Definition at line 520 of file cvspart.cpp.

References CvsServicePartImpl::commit(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotDiff  )  [private, slot]
 

Definition at line 569 of file cvspart.cpp.

References CvsServicePartImpl::diff(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotLog  )  [private, slot]
 

Definition at line 562 of file cvspart.cpp.

References CvsServicePartImpl::log(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotProjectClosed  )  [private, slot]
 

Definition at line 656 of file cvspart.cpp.

References CvsOptions::instance(), isValidDirectory(), kdDebug(), KDevPlugin::project(), CvsOptions::save(), slotAddFilesToProject(), and slotRemovedFilesFromProject().

Referenced by init().

void CvsServicePart::slotProjectOpened  )  [private, slot]
 

Definition at line 628 of file cvspart.cpp.

References g_projectWasJustCreated, CvsOptions::instance(), isValidDirectory(), kdDebug(), CvsOptions::load(), KDevPlugin::project(), CvsOptions::save(), slotAddFilesToProject(), and slotRemovedFilesFromProject().

Referenced by init().

void CvsServicePart::slotRemove  )  [private, slot]
 

Definition at line 548 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::remove().

Referenced by contextMenu().

void CvsServicePart::slotRemovedFilesFromProject const QStringList  )  [private, slot]
 

Definition at line 621 of file cvspart.cpp.

References m_impl, and CvsServicePartImpl::removedFilesFromProject().

Referenced by slotProjectClosed(), and slotProjectOpened().

void CvsServicePart::slotRemoveFromIgnoreList  )  [private, slot]
 

Definition at line 597 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::removeFromIgnoreList().

Referenced by contextMenu().

void CvsServicePart::slotRemoveSticky  )  [private, slot]
 

Definition at line 555 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::removeStickyFlag().

Referenced by contextMenu().

void CvsServicePart::slotStopButtonClicked KDevPlugin  )  [private, slot]
 

Called when the user wishes to stop an operation.

Definition at line 604 of file cvspart.cpp.

References CvsServicePartImpl::flushJobs(), and m_impl.

Referenced by init().

void CvsServicePart::slotTag  )  [private, slot]
 

Definition at line 576 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::tag().

Referenced by contextMenu().

void CvsServicePart::slotUnTag  )  [private, slot]
 

Definition at line 583 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::unTag().

Referenced by contextMenu().

void CvsServicePart::slotUpdate  )  [private, slot]
 

Definition at line 527 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::update().

Referenced by contextMenu().

bool CvsServicePart::urlFocusedDocument KURL url  )  [private]
 

Returns the KURL for the currently focused document, if there is any.

Definition at line 346 of file cvspart.cpp.

References KParts::PartManager::activePart(), KURL::isLocalFile(), kdDebug(), KDevPlugin::partController(), and KParts::ReadOnlyPart::url().

Referenced by slotActionAdd(), slotActionAddBinary(), slotActionAddToIgnoreList(), slotActionCommit(), slotActionDiff(), slotActionLog(), slotActionRemove(), slotActionRemoveFromIgnoreList(), slotActionRemoveSticky(), slotActionTag(), slotActionUnTag(), and slotActionUpdate().


Friends And Related Function Documentation

friend class CvsServicePartImpl [friend]
 

Definition at line 42 of file cvspart.h.

Referenced by init().


Member Data Documentation

KAction * CvsServicePart::actionAdd [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionAddBinary [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionAddToIgnoreList [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction* CvsServicePart::actionCommit [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionDiff [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionLog [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionLogin [private]
 

Definition at line 141 of file cvspart.h.

Referenced by setupActions().

KAction * CvsServicePart::actionLogout [private]
 

Definition at line 141 of file cvspart.h.

Referenced by setupActions().

KAction * CvsServicePart::actionRemove [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionRemoveFromIgnoreList [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionRemoveSticky [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionTag [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionUnTag [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionUpdate [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

QGuardedPtr<CvsForm> CvsServicePart::m_cvsConfigurationForm [private]
 

This is a pointer to the d->form used for collecting data about CVS project creation (used by the ApplicationWizard in example).

Definition at line 138 of file cvspart.h.

Referenced by createNewProject(), and newProjectWidget().

CvsServicePartImpl* CvsServicePart::m_impl [private]
 

Definition at line 156 of file cvspart.h.

Referenced by createNewProject(), fetchFromRepository(), fileInfoProvider(), init(), isValidDirectory(), slotActionAdd(), slotActionAddBinary(), slotActionAddToIgnoreList(), slotActionCommit(), slotActionDiff(), slotActionLog(), slotActionLogin(), slotActionLogout(), slotActionRemove(), slotActionRemoveFromIgnoreList(), slotActionRemoveSticky(), slotActionTag(), slotActionUnTag(), slotActionUpdate(), slotAdd(), slotAddBinary(), slotAddFilesToProject(), slotAddToIgnoreList(), slotCommit(), slotDiff(), slotLog(), slotRemove(), slotRemovedFilesFromProject(), slotRemoveFromIgnoreList(), slotRemoveSticky(), slotStopButtonClicked(), slotTag(), slotUnTag(), and slotUpdate().

KURL::List CvsServicePart::m_urls [private]
 

A list of KURLs of the files to be "operated" on (to be committed, added, removed, ...).

Definition at line 133 of file cvspart.h.

Referenced by contextMenu(), slotAdd(), slotAddBinary(), slotAddToIgnoreList(), slotCommit(), slotDiff(), slotLog(), slotRemove(), slotRemoveFromIgnoreList(), slotRemoveSticky(), slotTag(), slotUnTag(), and slotUpdate().


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 Wed Mar 23 00:21:57 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003