1 /***************************************************************************
2 * Copyright 2007 Dukju Ahn <dukjuahn@gmail.com> *
3 * Copyright 2008 Andreas Pakulat <apaku@gmx.de> *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 ***************************************************************************/
12 #ifndef KDEVSVNPLUGIN_H
13 #define KDEVSVNPLUGIN_H
15 #include <vcs/interfaces/icentralizedversioncontrol.h>
16 #include <vcs/vcsdiff.h>
17 #include <vcs/vcslocation.h>
18 #include <interfaces/iplugin.h>
23 class SvnStatusHolder
;
25 class SvnOutputDelegate
;
27 class SvnCommitDialog
;
31 class VcsCommitDialog
;
32 class ContextMenuExtension
;
35 class KDevSvnPlugin
: public KDevelop::IPlugin
, public KDevelop::ICentralizedVersionControl
38 Q_INTERFACES( KDevelop::IBasicVersionControl
KDevelop::ICentralizedVersionControl
)
40 KDevSvnPlugin( QObject
*parent
, const QVariantList
& = QVariantList() );
41 virtual ~KDevSvnPlugin();
43 virtual QString
name() const;
44 virtual KDevelop::VcsImportMetadataWidget
* createImportMetadataWidget( QWidget
* parent
);
46 // Begin: KDevelop::IBasicVersionControl
47 bool isVersionControlled( const KUrl
& localLocation
);
49 KDevelop::VcsJob
* repositoryLocation( const KUrl
& localLocation
);
51 KDevelop::VcsJob
* status( const KUrl::List
& localLocations
,
52 KDevelop::IBasicVersionControl::RecursionMode recursion
53 = KDevelop::IBasicVersionControl::Recursive
);
55 KDevelop::VcsJob
* add( const KUrl::List
& localLocations
,
56 KDevelop::IBasicVersionControl::RecursionMode recursion
57 = KDevelop::IBasicVersionControl::Recursive
);
59 KDevelop::VcsJob
* remove( const KUrl::List
& localLocations
);
61 KDevelop::VcsJob
* copy( const KUrl
& localLocationSrc
,
62 const KUrl
& localLocationDstn
);
64 KDevelop::VcsJob
* move( const KUrl
& localLocationSrc
,
65 const KUrl
& localLocationDst
);
67 KDevelop::VcsJob
* revert( const KUrl::List
& localLocations
,
68 KDevelop::IBasicVersionControl::RecursionMode recursion
69 = KDevelop::IBasicVersionControl::Recursive
);
71 KDevelop::VcsJob
* update( const KUrl::List
& localLocations
,
72 const KDevelop::VcsRevision
& rev
,
73 KDevelop::IBasicVersionControl::RecursionMode recursion
74 = KDevelop::IBasicVersionControl::Recursive
);
76 KDevelop::VcsJob
* commit( const QString
& message
,
77 const KUrl::List
& localLocations
,
78 KDevelop::IBasicVersionControl::RecursionMode recursion
79 = KDevelop::IBasicVersionControl::Recursive
);
81 KDevelop::VcsJob
* diff( const KDevelop::VcsLocation
& localOrRepoLocationSrc
,
82 const KDevelop::VcsLocation
& localOrRepoLocationDst
,
83 const KDevelop::VcsRevision
& srcRevision
,
84 const KDevelop::VcsRevision
& dstRevision
,
85 KDevelop::VcsDiff::Type
= KDevelop::VcsDiff::DiffDontCare
,
86 KDevelop::IBasicVersionControl::RecursionMode
= KDevelop::IBasicVersionControl::Recursive
);
88 KDevelop::VcsJob
* log( const KUrl
& localLocation
,
89 const KDevelop::VcsRevision
& rev
,
90 unsigned long limit
);
92 KDevelop::VcsJob
* log( const KUrl
& localLocation
,
93 const KDevelop::VcsRevision
& rev
,
94 const KDevelop::VcsRevision
& limit
);
96 KDevelop::VcsJob
* annotate( const KUrl
& localLocation
,
97 const KDevelop::VcsRevision
& rev
);
99 KDevelop::VcsJob
* merge( const KDevelop::VcsLocation
& localOrRepoLocationSrc
,
100 const KDevelop::VcsLocation
& localOrRepoLocationDst
,
101 const KDevelop::VcsRevision
& srcRevision
,
102 const KDevelop::VcsRevision
& dstRevision
,
103 const KUrl
& localLocation
);
105 KDevelop::VcsJob
* resolve( const KUrl::List
& localLocations
,
106 KDevelop::IBasicVersionControl::RecursionMode recursion
);
107 // End: KDevelop::IBasicVersionControl
109 // Begin: KDevelop::ICentralizedVersionControl
110 KDevelop::VcsJob
* import( const KDevelop::VcsMapping
& localLocation
, const QString
& commitMessage
);
112 KDevelop::VcsJob
* checkout( const KDevelop::VcsMapping
& mapping
);
114 KDevelop::VcsJob
* edit( const KUrl
& localLocation
);
116 KDevelop::VcsJob
* unedit( const KUrl
& localLocation
);
118 KDevelop::VcsJob
* localRevision( const KUrl
& localLocation
,
119 KDevelop::VcsRevision::RevisionType
);
120 // End: KDevelop::ICentralizedVersionControl
123 const KUrl
urlFocusedDocument( );
125 SvnOutputModel
* outputModel() const;
127 KDevelop::ContextMenuExtension
contextMenuExtension( KDevelop::Context
* );
131 // invoked by context-menu
150 void doCommit( KDevelop::VcsCommitDialog
* );
151 void cancelCommit( KDevelop::VcsCommitDialog
* );
153 SvnOutputModel
* m_outputmodel
;
154 SvnOutputDelegate
* m_outputdelegate
;
155 class KDevSvnViewFactory
*m_factory
;
156 KUrl::List m_ctxUrlList
;