Redefined classes

redef class ToolContext

nitc :: nitsmell_toolcontext $ ToolContext

Global context for tools

All class definitions

redef class ToolContext

nitc :: nitsmell_toolcontext $ ToolContext

Global context for tools
package_diagram nitc::nitsmell_toolcontext nitsmell_toolcontext nitc::modelbuilder modelbuilder nitc::nitsmell_toolcontext->nitc::modelbuilder csv csv nitc::nitsmell_toolcontext->csv counter counter nitc::nitsmell_toolcontext->counter nitc::loader loader nitc::modelbuilder->nitc::loader nitc::phase phase nitc::modelbuilder->nitc::phase core core csv->core poset poset counter->poset ...nitc::loader ... ...nitc::loader->nitc::loader ...nitc::phase ... ...nitc::phase->nitc::phase ...core ... ...core->core ...poset ... ...poset->poset nitc::method_analyze_metrics method_analyze_metrics nitc::method_analyze_metrics->nitc::nitsmell_toolcontext nitc::codesmells_metrics codesmells_metrics nitc::codesmells_metrics->nitc::method_analyze_metrics nitc::codesmells_metrics... ... nitc::codesmells_metrics...->nitc::codesmells_metrics

Ancestors

module abstract_collection

core :: abstract_collection

Abstract collection classes and services.
module abstract_text

core :: abstract_text

Abstract class for manipulation of sequences of characters
module array

core :: array

This module introduces the standard array structure.
module bitset

core :: bitset

Services to handle BitSet
module bytes

core :: bytes

Services for byte streams and arrays
module caching

serialization :: caching

Services for caching serialization engines
module circular_array

core :: circular_array

Efficient data structure to access both end of the sequence.
module codec_base

core :: codec_base

Base for codecs to use with streams
module codecs

core :: codecs

Group module for all codec-related manipulations
module collection

core :: collection

This module define several collection classes.
module console

console :: console

Defines some ANSI Terminal Control Escape Sequences.
module core

core :: core

Standard classes and methods used by default by Nit programs and libraries.
module digraph

graph :: digraph

Implementation of directed graphs, also called digraphs.
module engine_tools

serialization :: engine_tools

Advanced services for serialization engines
module environ

core :: environ

Access to the environment variables of the process
module error

core :: error

Standard error-management infrastructure.
module exec

core :: exec

Invocation and management of operating system sub-processes.
module file

core :: file

File manipulations (create, read, write, etc.)
module fixed_ints

core :: fixed_ints

Basic integers of fixed-precision
module fixed_ints_text

core :: fixed_ints_text

Text services to complement fixed_ints
module flat

core :: flat

All the array-based text representations
module gc

core :: gc

Access to the Nit internal garbage collection mechanism
module hash_collection

core :: hash_collection

Introduce HashMap and HashSet.
module ini

ini :: ini

Read and write INI configuration files
module inspect

serialization :: inspect

Refine Serializable::inspect to show more useful information
module iso8859_1

core :: iso8859_1

Codec for ISO8859-1 I/O
module kernel

core :: kernel

Most basic classes and methods.
module lexer

nitc :: lexer

Lexer and its tokens.
module lexer_work

nitc :: lexer_work

Internal algorithm and data structures for the Nit lexer
module list

core :: list

This module handle double linked lists
module loader

nitc :: loader

Loading of Nit source files
module location

nitc :: location

Nit source-file and locations in source-file
module math

core :: math

Mathematical operations
module mdoc

nitc :: mdoc

Documentation of model entities
module meta

meta :: meta

Simple user-defined meta-level to manipulate types of instances as object.
module mmodule

nitc :: mmodule

modules and module hierarchies in the metamodel
module model

nitc :: model

Classes, types and properties
module model_base

nitc :: model_base

The abstract concept of model and related common things
module modelbuilder_base

nitc :: modelbuilder_base

Load nit source files and build the associated model
module more_collections

more_collections :: more_collections

Highly specific, but useful, collections-related classes.
module mpackage

nitc :: mpackage

Modelisation of a Nit package
module native

core :: native

Native structures for text and bytes
module nitpm_shared

nitc :: nitpm_shared

Services related to the Nit package manager
module numeric

core :: numeric

Advanced services for Numeric types
module opts

opts :: opts

Management of options on the command line
module ordered_tree

ordered_tree :: ordered_tree

Manipulation and presentation of ordered trees.
module parser

nitc :: parser

Parser.
module parser_nodes

nitc :: parser_nodes

AST nodes of the Nit language
module parser_prod

nitc :: parser_prod

Production AST nodes full definition.
module parser_work

nitc :: parser_work

Internal algorithm and data structures for the Nit parser
module phase

nitc :: phase

Phases of the processing of nit programs
module poset

poset :: poset

Pre order sets and partial order set (ie hierarchies)
module protocol

core :: protocol

module queue

core :: queue

Queuing data structures and wrappers
module range

core :: range

Module for range of discrete objects.
module re

core :: re

Regular expression support for all services based on Pattern
module ropes

core :: ropes

Tree-based representation of a String.
module serialization

serialization :: serialization

General serialization services
module serialization_core

serialization :: serialization_core

Abstract services to serialize Nit objects to different formats
module sorter

core :: sorter

This module contains classes used to compare things and sorts arrays.
module stream

core :: stream

Input and output streams of characters
module tables

nitc :: tables

Module that interfaces the parsing tables.
module template

template :: template

Basic template system
module text

core :: text

All the classes and methods related to the manipulation of text entities
module time

core :: time

Management of time and dates
module toolcontext

nitc :: toolcontext

Common command-line tool infrastructure than handle options and error messages
module union_find

core :: union_find

union–find algorithm using an efficient disjoint-set data structure
module utf8

core :: utf8

Codec for UTF-8 I/O
module version

nitc :: version

This file was generated by git-gen-version.sh

Parents

module counter

counter :: counter

Simple numerical statistical analysis and presentation
module csv

csv :: csv

CSV document handling.

Children

Descendants

module nitsmell_toolcontext

import modelbuilder
import csv
import counter
import console

redef class ToolContext

	# --all
	var opt_all = new OptionBool("Print all code smells for top 10 class", "--all")
	# --get-all
	var opt_get_all = new OptionBool("Print all code smells for all class", "--get-all")
	# --feature-envy
	var opt_feature_envy = new OptionBool("Print feature envy", "--feature-envy")
	# --large-class
	var opt_large_class = new OptionBool("Print large class", "--large-class")
	# --long-methods
	var opt_long_method = new OptionBool("Print long method", "--long-methods")
	# --no-abstract-implementation
	var opt_no_abstract_implementation = new OptionBool("Print the no implemented abstract method", "--no-abstract-implementation")
	# --long-params
	var opt_long_params = new OptionBool("Print long parameters", "--long-params")
	# --move-generics
	var opt_move_generics = new OptionBool("Print the move proposition for generic class", "--move-generics")
	# --move-generics
	var opt_long_method_threshold = new OptionInt("Select long method threshold", 0 ,"--long-method-threshold")
	# --long-method-threshold
	var opt_long_params_threshold = new OptionInt("Select long method parameters threshold", 0 ,"--long-params-threshold")
	# --long-params-threshold
	var opt_nocolors = new OptionBool("Disable colors in console outputs", "--no-colors")

	redef init
	do
		super
		self.option_context.add_option(opt_all)
		self.option_context.add_option(opt_large_class)
		self.option_context.add_option(opt_get_all)
		self.option_context.add_option(opt_feature_envy)
		self.option_context.add_option(opt_long_method)
		self.option_context.add_option(opt_no_abstract_implementation)
		self.option_context.add_option(opt_long_params)
		self.option_context.add_option(opt_long_method_threshold)
		self.option_context.add_option(opt_long_params_threshold)
		self.option_context.add_option(opt_move_generics)
		self.option_context.add_option(opt_nocolors)
	end

	# Format and colorize a string heading of level 1 for console output.
	#
	# Default style is yellow and bold.
	fun format_h1(str: String): String do
		if opt_nocolors.value then return str
		return str.yellow.bold
	end

	# Format and colorize a string heading of level 2 for console output.
	#
	# Default style is white and bold.
	fun format_h2(str: String): String do
		if opt_nocolors.value then return str
		return str.bold
	end

	# Format and colorize a string heading of level 3 for console output.
	#
	# Default style is white and nobold.
	fun format_h3(str: String): String do
		if opt_nocolors.value then return str
		return str
	end

	# Format and colorize a string heading of level 4 for console output.
	#
	# Default style is green.
	fun format_h4(str: String): String do
		if opt_nocolors.value then return str
		return str.green
	end

	# Format and colorize a string heading of level 5 for console output.
	#
	# Default style is light gray.
	fun format_p(str: String): String do
		if opt_nocolors.value then return str
		return str.light_gray
	end
end
src/metrics/nitsmell_toolcontext.nit:16,1--103,3