| Padre-Plugin-HG documentation | view source | Contained in the Padre-Plugin-HG distribution. |
Padre::Plugin::HG::StatusTree Displays the status of the current hg project in a tree format
my $object = Padre::Plugin::HG::StatusTree->new($self,$project_root);
This module diplays a tree in the left panel of the ide that shows the mecurial status of each file. Right clicking on a file will give you options to perform actions. Right clicking the project root will give you project wide options.
Creates and displays the status tree $tree = Padre::Plugin::HG::StatusTree->new($self, $project_root);
Works out what to name the tab for the project.
Add the nodes to the tree.
getWxNode($treectrl,[name,parent,type],path);
=cut
sub getWxNode { my ($treectrl,$node,$path) = @_;
my $name = $node->[0];
my $parent = $node->[1];
my $type = $node->[2];
chomp $path;
chomp $name;
if (exists($WxTree{$path}))
{
return $WxTree{$path};
# $WxTree{$path} = $treectrl->AppendItem( $WxTree{$parent}, $name);
}else
{
$WxTree{$path} = $treectrl->AppendItem(
getWxNode($treectrl, $dirTree{$parent}, $parent),
$name,
$file_types->{$type},
-1,
Wx::TreeItemData->new(
{ name => $name,
path => $path,
type => $type,
}));
}
}
$self->parseHgstatus(@hgstatus); parses the output of HGstatus and calls create branch for each item.
$self->parseHgstatus(@hgstatus); parses the output of HGstatus and calls create branch for each item.
$self->drawTree($treectrl); creates the Tree from the output of the vcs status
Performs actions when the users double clicks on a tree node
at the moment opens a file when it is double clicked.
open_file($path)
opens the file in the editor.
$self->refresh();
refreshes the tree control by deleteing all items and
readding them.
| Padre-Plugin-HG documentation | view source | Contained in the Padre-Plugin-HG distribution. |