Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
VersionControlUI::CDiff Class Reference
Inheritance diagram for VersionControlUI::CDiff:
Interaction::Command

Public Member Functions

 CDiff ()
 
virtual bool canInterpret (Visualization::Item *source, Visualization::Item *target, const QStringList &commandTokens, const std::unique_ptr< Visualization::Cursor > &cursor) override
 
virtual Interaction::CommandResultexecute (Visualization::Item *source, Visualization::Item *target, const QStringList &commandTokens, const std::unique_ptr< Visualization::Cursor > &cursor) override
 
virtual QList< Interaction::CommandSuggestion * > suggest (Visualization::Item *source, Visualization::Item *target, const QString &textSoFar, const std::unique_ptr< Visualization::Cursor > &cursor) override
 
- Public Member Functions inherited from Interaction::Command
 Command (QString name, bool appearsInMenus=false)
 
virtual ~Command ()
 
bool appearsInMenus () const
 
virtual bool canInterpret (Visualization::Item *source, Visualization::Item *target, const QStringList &commandTokens, const std::unique_ptr< Visualization::Cursor > &cursor)
 
virtual CommandResultexecute (Visualization::Item *source, Visualization::Item *target, const QStringList &commandTokens, const std::unique_ptr< Visualization::Cursor > &cursor)=0
 
const QString name () const
 
virtual QList< CommandSuggestion * > suggest (Visualization::Item *source, Visualization::Item *target, const QString &textSoFar, const std::unique_ptr< Visualization::Cursor > &cursor)
 

Static Public Member Functions

static QList< QPair< QString, QString > > commitsWithDescriptionsStartingWith (QString partialCommitId, QString managerName, QHash< QString, QString > &unambigousPrefixPerRevision)
 Returns the unambigous prefixes of commits and their description that start with partialCommitId. More...
 
static QStringList computeUnambiguousShortestPrefixesPerString (const QStringList &strings, const int minPrefixLength, QHash< QString, QString > &unambigousPrefixPerRevision)
 Returns for each entry in strings the corresponding unambigous prefix with minimum length minPrefixLength. More...
 
static QString descriptionForCommits (QString token, const QList< QPair< QString, QString >> &commits)
 
static QList< Interaction::CommandSuggestion * > parseVersions (QStringList tokens, QString commandName, QString managerName, QHash< QString, QString > &unambigousPrefixPerRevision)
 

Private Attributes

QHash< QString, QString > unambigousPrefixPerRevision_
 

Static Private Attributes

static const QString OVERVIEW_COMMAND = "overview"
 

Constructor & Destructor Documentation

◆ CDiff()

VersionControlUI::CDiff::CDiff ( )

Member Function Documentation

◆ canInterpret()

bool VersionControlUI::CDiff::canInterpret ( Visualization::Item source,
Visualization::Item target,
const QStringList &  commandTokens,
const std::unique_ptr< Visualization::Cursor > &  cursor 
)
overridevirtual

◆ commitsWithDescriptionsStartingWith()

QList< QPair< QString, QString > > VersionControlUI::CDiff::commitsWithDescriptionsStartingWith ( QString  partialCommitId,
QString  managerName,
QHash< QString, QString > &  unambigousPrefixPerRevision 
)
static

Returns the unambigous prefixes of commits and their description that start with partialCommitId.

◆ computeUnambiguousShortestPrefixesPerString()

QStringList VersionControlUI::CDiff::computeUnambiguousShortestPrefixesPerString ( const QStringList &  strings,
const int  minPrefixLength,
QHash< QString, QString > &  unambigousPrefixPerRevision 
)
static

Returns for each entry in strings the corresponding unambigous prefix with minimum length minPrefixLength.

Stores original revision string in unambigousPrefixPerRevision

◆ descriptionForCommits()

QString VersionControlUI::CDiff::descriptionForCommits ( QString  token,
const QList< QPair< QString, QString >> &  commits 
)
static

◆ execute()

Interaction::CommandResult * VersionControlUI::CDiff::execute ( Visualization::Item source,
Visualization::Item target,
const QStringList &  commandTokens,
const std::unique_ptr< Visualization::Cursor > &  cursor 
)
overridevirtual

◆ parseVersions()

QList< Interaction::CommandSuggestion * > VersionControlUI::CDiff::parseVersions ( QStringList  tokens,
QString  commandName,
QString  managerName,
QHash< QString, QString > &  unambigousPrefixPerRevision 
)
static

◆ suggest()

QList< Interaction::CommandSuggestion * > VersionControlUI::CDiff::suggest ( Visualization::Item source,
Visualization::Item target,
const QString &  textSoFar,
const std::unique_ptr< Visualization::Cursor > &  cursor 
)
overridevirtual

Member Data Documentation

◆ OVERVIEW_COMMAND

const QString VersionControlUI::CDiff::OVERVIEW_COMMAND = "overview"
staticprivate

◆ unambigousPrefixPerRevision_

QHash<QString, QString> VersionControlUI::CDiff::unambigousPrefixPerRevision_
private