diff options
author | Chad Elliott <elliottc@objectcomputing.com> | 2019-06-17 09:19:03 -0500 |
---|---|---|
committer | Chad Elliott <elliottc@objectcomputing.com> | 2019-06-17 09:19:03 -0500 |
commit | 3a06d5612ae4f5c9f579acd7c85f460aed8c6c96 (patch) | |
tree | 425cec7eb462520a38ae3ee43142a7b1c819a505 /modules | |
parent | 9ec8b97e130e4fbba8731a8d15493b4e28aa3d73 (diff) | |
download | MPC-3a06d5612ae4f5c9f579acd7c85f460aed8c6c96.tar.gz |
Mon Jun 17 14:17:49 UTC 2019 Chad Elliott <elliottc@objectcomputing.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/CommandHelper.pm | 5 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/modules/CommandHelper.pm b/modules/CommandHelper.pm index 190318fe..2437edfc 100644 --- a/modules/CommandHelper.pm +++ b/modules/CommandHelper.pm @@ -97,4 +97,9 @@ sub get_tied { return [], undef; } +sub set_creator { + my($self, $creator) = @_; + $self->{'creator'} = $creator; +} + 1; diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 9bf06973..256740e8 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -2492,6 +2492,11 @@ sub add_explicit_output { sub generated_filenames { my($self, $part, $type, $tag, $file, $noext, $arrs) = @_; + ## $part - The full path of the input file minus the extension + ## $type - The input file type (e.g., 'java_files') + ## $file - The full path of the input file + ## $noext - bool indicating an inverse need for an extension + ## $arrs - bool indicating that the return array should be made of arrays ## A custom type is not allowed to generate it's own input files return () if ($type eq $tag); @@ -5713,7 +5718,12 @@ sub find_command_helper { ## See if we have a command helper for this tag my $ch = CommandHelper::get($tag); - return $ch if (defined $ch); + if (defined $ch) { + ## Give the command helper a reference to the creator. The helper + ## can benefit from many of the infrastructure functions available. + $ch->set_creator($self); + return $ch; + } ## None for the base define custom, try again with the parent return $self->find_command_helper($self->{'define_custom_parent'}->{$tag}); |