nitc :: ProjTree :: _opt_paths
nitc :: ProjTree :: defaultinit
nitc :: ProjTree :: opt_paths=
core :: Collection :: CONCURRENT
Type of the concurrent variant of this collectionnitc :: ProjTree :: _opt_paths
ordered_tree :: OrderedTree :: _parents
The parent of each element.ordered_tree :: OrderedTree :: _roots
The roots of the tree (in sequence)ordered_tree :: OrderedTree :: _sub
The branches of the trees.ordered_tree :: OrderedTree :: add_all
Append all nodeses
as children of p
.
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Collection :: combinations
Allr
-length combinations on self (in same order) without repeated elements.
core :: Collection :: combinations_with_replacement
Allr
-length combination on self (in same order) with repeated elements.
nitc :: ProjTree :: defaultinit
core :: Cloneable :: defaultinit
core :: Writable :: defaultinit
core :: Object :: defaultinit
core :: Collection :: defaultinit
ordered_tree :: OrderedTree :: display
How to display a specific element of the treecore :: Collection :: has_all
Does the collection contain at least each element ofother
?
core :: Collection :: has_any
Does the collection contain at least one element ofother
?
core :: Collection :: has_exactly
Does the collection contain exactly all the elements ofother
?
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.nitc :: ProjTree :: opt_paths=
core :: Object :: output_class_name
Display class name on stdout (debug only).ordered_tree :: OrderedTree :: parents
The parent of each element.ordered_tree :: OrderedTree :: parents=
The parent of each element.core :: Collection :: permutations
Allr
-length permutations on self (all possible ordering) without repeated elements.
core :: Collection :: product
Cartesian product, overr
times self
.
ordered_tree :: OrderedTree :: roots=
The roots of the tree (in sequence)core :: Collection :: serialize_to_pure_json
Utility to serialize a normal Json arrayordered_tree :: OrderedTree :: sort_with
Sort roots and other elements using a comparator methodordered_tree :: OrderedTree :: sub=
The branches of the trees.ordered_tree :: OrderedTree :: sub_to_a
core :: Collection :: to_concurrent
Wrapsself
in a thread-safe collection
core :: Collection :: to_counter
Create and fill up a counter with the elements of `self.core :: Collection :: to_curlslist
Convert Collection[String] to CURLSListcore :: Collection :: to_shuffle
Return a new array made of elements in a random order.ordered_tree :: OrderedTree :: write_line
Write the full line for the elemente
in o
.
core :: Writable :: write_to_bytes
Likewrite_to
but return a new Bytes (may be quite large)
core :: Writable :: write_to_file
Likewrite_to
but take care of creating the file
core :: Writable :: write_to_string
Likewrite_to
but return a new String (may be quite large).
class ProjTree
super OrderedTree[MConcern]
var opt_paths = false
var tc: ToolContext
redef fun display(o)
do
if o isa MGroup then
if opt_paths then
return o.filepath.as(not null)
else
var d = ""
if o.mdoc != null then
if tc.opt_no_color.value then
d = ": {o.mdoc.content.first}"
else
d = ": {o.mdoc.content.first.green}"
end
end
if tc.opt_no_color.value then
return "{o.name}{d} ({o.filepath.to_s})"
else
return "{o.name}{d} ({o.filepath.yellow})"
end
end
else if o isa MModule then
if opt_paths then
return o.filepath.as(not null)
else
var d = ""
var dd = ""
if o.mdoc != null then
if tc.opt_no_color.value then
d = ": {o.mdoc.content.first}"
else
d = ": {o.mdoc.content.first.green}"
end
end
if not o.in_importation.direct_greaters.is_empty then
var ms = new Array[String]
for m in o.in_importation.direct_greaters do
if m.mgroup.mpackage == o.mgroup.mpackage then
ms.add m.name
else
ms.add m.full_name
end
end
if tc.opt_no_color.value then
dd = " ({ms.join(" ")})"
else
dd = " ({ms.join(" ")})".light_gray
end
end
if tc.opt_no_color.value then
return "{o.name.bold}{d} ({o.filepath.to_s}){dd}"
else
return "{o.name.bold}{d} ({o.filepath.yellow}){dd}"
end
end
else
abort
end
end
end
src/nitls.nit:24,1--88,3