[DEV] basic code
This commit is contained in:
parent
fe2524fa54
commit
0b060e4b19
7
.checkstyle
Normal file
7
.checkstyle
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
|
||||||
|
<fileset name="all" enabled="true" check-config-name="Ewol" local="false">
|
||||||
|
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||||
|
</fileset>
|
||||||
|
</fileset-config>
|
22
.classpath
Normal file
22
.classpath
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry including="**/*.java" kind="src" output="out/eclipse/classes-test" path="test/src">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="module" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="out/eclipse/classes"/>
|
||||||
|
</classpath>
|
6
.gitattributes
vendored
Normal file
6
.gitattributes
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#
|
||||||
|
# https://help.github.com/articles/dealing-with-line-endings/
|
||||||
|
#
|
||||||
|
# These are explicitly windows files and should use crlf
|
||||||
|
*.bat text eol=crlf
|
||||||
|
|
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/bin/
|
||||||
|
/Operator/
|
||||||
|
/DrawerProperties/
|
||||||
|
*.pdfd
|
||||||
|
*.dbc
|
||||||
|
SchedulerConfig.txt
|
||||||
|
scenicView.properties
|
||||||
|
ScenariumConfig.txt
|
||||||
|
*.class
|
||||||
|
*~
|
||||||
|
*.bck
|
||||||
|
build.number
|
||||||
|
/extern/
|
||||||
|
/out/
|
||||||
|
/.settings/
|
||||||
|
/junit/
|
||||||
|
/target/
|
||||||
|
|
||||||
|
# Ignore Gradle project-specific cache directory
|
||||||
|
.gradle
|
||||||
|
|
||||||
|
# Ignore Gradle build output directory
|
||||||
|
build
|
||||||
|
|
||||||
|
/__pycache__/
|
28
.gitlab-ci.yml
Normal file
28
.gitlab-ci.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
image: heeroyui/scenarium-gitlabci:latest
|
||||||
|
|
||||||
|
variables:
|
||||||
|
JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF8"
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- which javac
|
||||||
|
- javac --version
|
||||||
|
- mvn --version
|
||||||
|
- ant -version
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- all
|
||||||
|
|
||||||
|
ant_job:
|
||||||
|
stage: all
|
||||||
|
script:
|
||||||
|
- ant all
|
||||||
|
#- awk -F, '{ instructions += $4 + $5; covered += $5 } END { print "===============================================\nCoverage Results:\n\n", covered, " / ", instructions, " instructions covered"; print "Total", 100*covered/instructions, "% covered\n==\n===============================================" }' out/coverage/site/jacoco.csv
|
||||||
|
artifacts:
|
||||||
|
when: on_success
|
||||||
|
expire_in: 3 day
|
||||||
|
paths:
|
||||||
|
- out/ant/coverage/site
|
||||||
|
- out/ant/package
|
||||||
|
reports:
|
||||||
|
junit: out/ant/junit/TEST-*.xml
|
||||||
|
|
35
.project
Normal file
35
.project
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>atriasoft-reggol</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
<project>atriasoft-reggol</project>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
|
||||||
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1664629886087</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>1.0-name-matches-false-true-node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
</projectDescription>
|
66
CheckStyle.xml
Executable file
66
CheckStyle.xml
Executable file
@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Check Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This configuration file was written by the eclipse-cs plugin configuration editor
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
Checkstyle-Configuration: Marc Checks
|
||||||
|
Description:
|
||||||
|
Checkstyle configuration that checks the sun coding conventions.
|
||||||
|
-->
|
||||||
|
<module name="Checker">
|
||||||
|
<property name="severity" value="error"/>
|
||||||
|
<property name="fileExtensions" value="java, properties, xml"/>
|
||||||
|
<module name="TreeWalker">
|
||||||
|
<module name="ConstantName"/>
|
||||||
|
<module name="LocalFinalVariableName"/>
|
||||||
|
<module name="LocalVariableName"/>
|
||||||
|
<module name="MemberName"/>
|
||||||
|
<module name="MethodName"/>
|
||||||
|
<module name="PackageName"/>
|
||||||
|
<module name="ParameterName"/>
|
||||||
|
<module name="StaticVariableName"/>
|
||||||
|
<module name="TypeName"/>
|
||||||
|
<module name="AvoidStarImport"/>
|
||||||
|
<module name="IllegalImport"/>
|
||||||
|
<module name="RedundantImport"/>
|
||||||
|
<module name="UnusedImports">
|
||||||
|
<property name="processJavadoc" value="false"/>
|
||||||
|
</module>
|
||||||
|
<module name="ModifierOrder"/>
|
||||||
|
<module name="EmptyStatement"/>
|
||||||
|
<module name="EqualsHashCode"/>
|
||||||
|
<module name="IllegalInstantiation"/>
|
||||||
|
<module name="MissingSwitchDefault"/>
|
||||||
|
<module name="SimplifyBooleanExpression"/>
|
||||||
|
<module name="SimplifyBooleanReturn"/>
|
||||||
|
<module name="HideUtilityClassConstructor"/>
|
||||||
|
<module name="InterfaceIsType"/>
|
||||||
|
<module name="ArrayTypeStyle"/>
|
||||||
|
<module name="TodoComment"/>
|
||||||
|
<module name="UpperEll"/>
|
||||||
|
<module name="AnnotationUseStyle"/>
|
||||||
|
<module name="MissingDeprecated"/>
|
||||||
|
<module name="MissingOverride"/>
|
||||||
|
<module name="PackageAnnotation"/>
|
||||||
|
<module name="SuppressWarnings"/>
|
||||||
|
<module name="AnnotationLocation"/>
|
||||||
|
<module name="ClassTypeParameterName"/>
|
||||||
|
<module name="MethodTypeParameterName"/>
|
||||||
|
<module name="InterfaceTypeParameterName"/>
|
||||||
|
<module name="CatchParameterName"/>
|
||||||
|
<module name="LambdaParameterName"/>
|
||||||
|
<module name="Regexp"/>
|
||||||
|
<module name="RegexpSinglelineJava"/>
|
||||||
|
</module>
|
||||||
|
<module name="BeforeExecutionExclusionFileFilter">
|
||||||
|
<property name="fileNamePattern" value="module\-info\.java$"/>
|
||||||
|
</module>
|
||||||
|
<module name="Translation"/>
|
||||||
|
<module name="Header"/>
|
||||||
|
<module name="RegexpHeader"/>
|
||||||
|
<module name="RegexpMultiline"/>
|
||||||
|
<module name="RegexpOnFilename"/>
|
||||||
|
<module name="RegexpSingleline"/>
|
||||||
|
</module>
|
366
Formatter.xml
Normal file
366
Formatter.xml
Normal file
@ -0,0 +1,366 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE xml>
|
||||||
|
<profiles version="18">
|
||||||
|
<profile kind="CodeFormatterProfile" name="Scenarium" version="18">
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.insertNew_line_for_parameter" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_package" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.insertNew_line_before_root_tags" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_parameter" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_field" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_method" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_enum_constant" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="200"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_local_variable" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_onNew_line" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_catch_in_try_statement" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_type" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.insertNew_line_between_different_tags" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_type_annotation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_else_in_if_statement" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_beforeNew_chunk" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_label" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_while_in_do_statement" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_if_empty"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_finally_in_try_statement" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="200"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||||
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
27
GLD_reggol-test.json
Normal file
27
GLD_reggol-test.json
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"type":"BINARY",
|
||||||
|
"sub-type":"TEST",
|
||||||
|
"group-id":"org.atriasoft",
|
||||||
|
"description":"Simple java reggol test ",
|
||||||
|
"license":"MPL-2",
|
||||||
|
"license-file":"file://LICENSE",
|
||||||
|
"maintainer":"file://authors.txt",
|
||||||
|
"author":"file://authors.txt",
|
||||||
|
"version":"file://version.txt",
|
||||||
|
|
||||||
|
"source": [
|
||||||
|
"test/src/test/atriasoft/reggol/Log2.java",
|
||||||
|
"test/src/test/atriasoft/reggol/TestBasicLog.java",
|
||||||
|
"test/src/test/atriasoft/reggol/Log.java"
|
||||||
|
],
|
||||||
|
"path":[
|
||||||
|
"test/src/"
|
||||||
|
],
|
||||||
|
"compilation-version": {
|
||||||
|
"java": 18
|
||||||
|
},
|
||||||
|
"dependency": [
|
||||||
|
"reggol",
|
||||||
|
"junit-jupiter-api"
|
||||||
|
]
|
||||||
|
}
|
24
GLD_reggol.json
Normal file
24
GLD_reggol.json
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"type":"LIBRARY",
|
||||||
|
"group-id":"org.atriasoft",
|
||||||
|
"description":"Simple java logger",
|
||||||
|
"license":"MPL-2",
|
||||||
|
"license-file":"file://LICENSE",
|
||||||
|
"maintainer":"file://authors.txt",
|
||||||
|
"author":"file://authors.txt",
|
||||||
|
"version":"file://version.txt",
|
||||||
|
|
||||||
|
"source": [
|
||||||
|
"src/module-info.java",
|
||||||
|
"src/io/atriasoft/reggol/LoggerLocal.java",
|
||||||
|
"src/io/atriasoft/reggol/internal/Log.java",
|
||||||
|
"src/io/atriasoft/reggol/Logger.java",
|
||||||
|
"src/io/atriasoft/reggol/LogLevel.java"
|
||||||
|
],
|
||||||
|
"path":[
|
||||||
|
"src/"
|
||||||
|
],
|
||||||
|
"compilation-version": {
|
||||||
|
"java": 18
|
||||||
|
}
|
||||||
|
}
|
373
LICENSE
Normal file
373
LICENSE
Normal file
@ -0,0 +1,373 @@
|
|||||||
|
Mozilla Public License Version 2.0
|
||||||
|
==================================
|
||||||
|
|
||||||
|
1. Definitions
|
||||||
|
--------------
|
||||||
|
|
||||||
|
1.1. "Contributor"
|
||||||
|
means each individual or legal entity that creates, contributes to
|
||||||
|
the creation of, or owns Covered Software.
|
||||||
|
|
||||||
|
1.2. "Contributor Version"
|
||||||
|
means the combination of the Contributions of others (if any) used
|
||||||
|
by a Contributor and that particular Contributor's Contribution.
|
||||||
|
|
||||||
|
1.3. "Contribution"
|
||||||
|
means Covered Software of a particular Contributor.
|
||||||
|
|
||||||
|
1.4. "Covered Software"
|
||||||
|
means Source Code Form to which the initial Contributor has attached
|
||||||
|
the notice in Exhibit A, the Executable Form of such Source Code
|
||||||
|
Form, and Modifications of such Source Code Form, in each case
|
||||||
|
including portions thereof.
|
||||||
|
|
||||||
|
1.5. "Incompatible With Secondary Licenses"
|
||||||
|
means
|
||||||
|
|
||||||
|
(a) that the initial Contributor has attached the notice described
|
||||||
|
in Exhibit B to the Covered Software; or
|
||||||
|
|
||||||
|
(b) that the Covered Software was made available under the terms of
|
||||||
|
version 1.1 or earlier of the License, but not also under the
|
||||||
|
terms of a Secondary License.
|
||||||
|
|
||||||
|
1.6. "Executable Form"
|
||||||
|
means any form of the work other than Source Code Form.
|
||||||
|
|
||||||
|
1.7. "Larger Work"
|
||||||
|
means a work that combines Covered Software with other material, in
|
||||||
|
a separate file or files, that is not Covered Software.
|
||||||
|
|
||||||
|
1.8. "License"
|
||||||
|
means this document.
|
||||||
|
|
||||||
|
1.9. "Licensable"
|
||||||
|
means having the right to grant, to the maximum extent possible,
|
||||||
|
whether at the time of the initial grant or subsequently, any and
|
||||||
|
all of the rights conveyed by this License.
|
||||||
|
|
||||||
|
1.10. "Modifications"
|
||||||
|
means any of the following:
|
||||||
|
|
||||||
|
(a) any file in Source Code Form that results from an addition to,
|
||||||
|
deletion from, or modification of the contents of Covered
|
||||||
|
Software; or
|
||||||
|
|
||||||
|
(b) any new file in Source Code Form that contains any Covered
|
||||||
|
Software.
|
||||||
|
|
||||||
|
1.11. "Patent Claims" of a Contributor
|
||||||
|
means any patent claim(s), including without limitation, method,
|
||||||
|
process, and apparatus claims, in any patent Licensable by such
|
||||||
|
Contributor that would be infringed, but for the grant of the
|
||||||
|
License, by the making, using, selling, offering for sale, having
|
||||||
|
made, import, or transfer of either its Contributions or its
|
||||||
|
Contributor Version.
|
||||||
|
|
||||||
|
1.12. "Secondary License"
|
||||||
|
means either the GNU General Public License, Version 2.0, the GNU
|
||||||
|
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||||
|
Public License, Version 3.0, or any later versions of those
|
||||||
|
licenses.
|
||||||
|
|
||||||
|
1.13. "Source Code Form"
|
||||||
|
means the form of the work preferred for making modifications.
|
||||||
|
|
||||||
|
1.14. "You" (or "Your")
|
||||||
|
means an individual or a legal entity exercising rights under this
|
||||||
|
License. For legal entities, "You" includes any entity that
|
||||||
|
controls, is controlled by, or is under common control with You. For
|
||||||
|
purposes of this definition, "control" means (a) the power, direct
|
||||||
|
or indirect, to cause the direction or management of such entity,
|
||||||
|
whether by contract or otherwise, or (b) ownership of more than
|
||||||
|
fifty percent (50%) of the outstanding shares or beneficial
|
||||||
|
ownership of such entity.
|
||||||
|
|
||||||
|
2. License Grants and Conditions
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
2.1. Grants
|
||||||
|
|
||||||
|
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||||
|
non-exclusive license:
|
||||||
|
|
||||||
|
(a) under intellectual property rights (other than patent or trademark)
|
||||||
|
Licensable by such Contributor to use, reproduce, make available,
|
||||||
|
modify, display, perform, distribute, and otherwise exploit its
|
||||||
|
Contributions, either on an unmodified basis, with Modifications, or
|
||||||
|
as part of a Larger Work; and
|
||||||
|
|
||||||
|
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||||
|
for sale, have made, import, and otherwise transfer either its
|
||||||
|
Contributions or its Contributor Version.
|
||||||
|
|
||||||
|
2.2. Effective Date
|
||||||
|
|
||||||
|
The licenses granted in Section 2.1 with respect to any Contribution
|
||||||
|
become effective for each Contribution on the date the Contributor first
|
||||||
|
distributes such Contribution.
|
||||||
|
|
||||||
|
2.3. Limitations on Grant Scope
|
||||||
|
|
||||||
|
The licenses granted in this Section 2 are the only rights granted under
|
||||||
|
this License. No additional rights or licenses will be implied from the
|
||||||
|
distribution or licensing of Covered Software under this License.
|
||||||
|
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||||
|
Contributor:
|
||||||
|
|
||||||
|
(a) for any code that a Contributor has removed from Covered Software;
|
||||||
|
or
|
||||||
|
|
||||||
|
(b) for infringements caused by: (i) Your and any other third party's
|
||||||
|
modifications of Covered Software, or (ii) the combination of its
|
||||||
|
Contributions with other software (except as part of its Contributor
|
||||||
|
Version); or
|
||||||
|
|
||||||
|
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||||
|
its Contributions.
|
||||||
|
|
||||||
|
This License does not grant any rights in the trademarks, service marks,
|
||||||
|
or logos of any Contributor (except as may be necessary to comply with
|
||||||
|
the notice requirements in Section 3.4).
|
||||||
|
|
||||||
|
2.4. Subsequent Licenses
|
||||||
|
|
||||||
|
No Contributor makes additional grants as a result of Your choice to
|
||||||
|
distribute the Covered Software under a subsequent version of this
|
||||||
|
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||||
|
permitted under the terms of Section 3.3).
|
||||||
|
|
||||||
|
2.5. Representation
|
||||||
|
|
||||||
|
Each Contributor represents that the Contributor believes its
|
||||||
|
Contributions are its original creation(s) or it has sufficient rights
|
||||||
|
to grant the rights to its Contributions conveyed by this License.
|
||||||
|
|
||||||
|
2.6. Fair Use
|
||||||
|
|
||||||
|
This License is not intended to limit any rights You have under
|
||||||
|
applicable copyright doctrines of fair use, fair dealing, or other
|
||||||
|
equivalents.
|
||||||
|
|
||||||
|
2.7. Conditions
|
||||||
|
|
||||||
|
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||||
|
in Section 2.1.
|
||||||
|
|
||||||
|
3. Responsibilities
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
3.1. Distribution of Source Form
|
||||||
|
|
||||||
|
All distribution of Covered Software in Source Code Form, including any
|
||||||
|
Modifications that You create or to which You contribute, must be under
|
||||||
|
the terms of this License. You must inform recipients that the Source
|
||||||
|
Code Form of the Covered Software is governed by the terms of this
|
||||||
|
License, and how they can obtain a copy of this License. You may not
|
||||||
|
attempt to alter or restrict the recipients' rights in the Source Code
|
||||||
|
Form.
|
||||||
|
|
||||||
|
3.2. Distribution of Executable Form
|
||||||
|
|
||||||
|
If You distribute Covered Software in Executable Form then:
|
||||||
|
|
||||||
|
(a) such Covered Software must also be made available in Source Code
|
||||||
|
Form, as described in Section 3.1, and You must inform recipients of
|
||||||
|
the Executable Form how they can obtain a copy of such Source Code
|
||||||
|
Form by reasonable means in a timely manner, at a charge no more
|
||||||
|
than the cost of distribution to the recipient; and
|
||||||
|
|
||||||
|
(b) You may distribute such Executable Form under the terms of this
|
||||||
|
License, or sublicense it under different terms, provided that the
|
||||||
|
license for the Executable Form does not attempt to limit or alter
|
||||||
|
the recipients' rights in the Source Code Form under this License.
|
||||||
|
|
||||||
|
3.3. Distribution of a Larger Work
|
||||||
|
|
||||||
|
You may create and distribute a Larger Work under terms of Your choice,
|
||||||
|
provided that You also comply with the requirements of this License for
|
||||||
|
the Covered Software. If the Larger Work is a combination of Covered
|
||||||
|
Software with a work governed by one or more Secondary Licenses, and the
|
||||||
|
Covered Software is not Incompatible With Secondary Licenses, this
|
||||||
|
License permits You to additionally distribute such Covered Software
|
||||||
|
under the terms of such Secondary License(s), so that the recipient of
|
||||||
|
the Larger Work may, at their option, further distribute the Covered
|
||||||
|
Software under the terms of either this License or such Secondary
|
||||||
|
License(s).
|
||||||
|
|
||||||
|
3.4. Notices
|
||||||
|
|
||||||
|
You may not remove or alter the substance of any license notices
|
||||||
|
(including copyright notices, patent notices, disclaimers of warranty,
|
||||||
|
or limitations of liability) contained within the Source Code Form of
|
||||||
|
the Covered Software, except that You may alter any license notices to
|
||||||
|
the extent required to remedy known factual inaccuracies.
|
||||||
|
|
||||||
|
3.5. Application of Additional Terms
|
||||||
|
|
||||||
|
You may choose to offer, and to charge a fee for, warranty, support,
|
||||||
|
indemnity or liability obligations to one or more recipients of Covered
|
||||||
|
Software. However, You may do so only on Your own behalf, and not on
|
||||||
|
behalf of any Contributor. You must make it absolutely clear that any
|
||||||
|
such warranty, support, indemnity, or liability obligation is offered by
|
||||||
|
You alone, and You hereby agree to indemnify every Contributor for any
|
||||||
|
liability incurred by such Contributor as a result of warranty, support,
|
||||||
|
indemnity or liability terms You offer. You may include additional
|
||||||
|
disclaimers of warranty and limitations of liability specific to any
|
||||||
|
jurisdiction.
|
||||||
|
|
||||||
|
4. Inability to Comply Due to Statute or Regulation
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
If it is impossible for You to comply with any of the terms of this
|
||||||
|
License with respect to some or all of the Covered Software due to
|
||||||
|
statute, judicial order, or regulation then You must: (a) comply with
|
||||||
|
the terms of this License to the maximum extent possible; and (b)
|
||||||
|
describe the limitations and the code they affect. Such description must
|
||||||
|
be placed in a text file included with all distributions of the Covered
|
||||||
|
Software under this License. Except to the extent prohibited by statute
|
||||||
|
or regulation, such description must be sufficiently detailed for a
|
||||||
|
recipient of ordinary skill to be able to understand it.
|
||||||
|
|
||||||
|
5. Termination
|
||||||
|
--------------
|
||||||
|
|
||||||
|
5.1. The rights granted under this License will terminate automatically
|
||||||
|
if You fail to comply with any of its terms. However, if You become
|
||||||
|
compliant, then the rights granted under this License from a particular
|
||||||
|
Contributor are reinstated (a) provisionally, unless and until such
|
||||||
|
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||||
|
ongoing basis, if such Contributor fails to notify You of the
|
||||||
|
non-compliance by some reasonable means prior to 60 days after You have
|
||||||
|
come back into compliance. Moreover, Your grants from a particular
|
||||||
|
Contributor are reinstated on an ongoing basis if such Contributor
|
||||||
|
notifies You of the non-compliance by some reasonable means, this is the
|
||||||
|
first time You have received notice of non-compliance with this License
|
||||||
|
from such Contributor, and You become compliant prior to 30 days after
|
||||||
|
Your receipt of the notice.
|
||||||
|
|
||||||
|
5.2. If You initiate litigation against any entity by asserting a patent
|
||||||
|
infringement claim (excluding declaratory judgment actions,
|
||||||
|
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||||
|
directly or indirectly infringes any patent, then the rights granted to
|
||||||
|
You by any and all Contributors for the Covered Software under Section
|
||||||
|
2.1 of this License shall terminate.
|
||||||
|
|
||||||
|
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||||
|
end user license agreements (excluding distributors and resellers) which
|
||||||
|
have been validly granted by You or Your distributors under this License
|
||||||
|
prior to termination shall survive termination.
|
||||||
|
|
||||||
|
************************************************************************
|
||||||
|
* *
|
||||||
|
* 6. Disclaimer of Warranty *
|
||||||
|
* ------------------------- *
|
||||||
|
* *
|
||||||
|
* Covered Software is provided under this License on an "as is" *
|
||||||
|
* basis, without warranty of any kind, either expressed, implied, or *
|
||||||
|
* statutory, including, without limitation, warranties that the *
|
||||||
|
* Covered Software is free of defects, merchantable, fit for a *
|
||||||
|
* particular purpose or non-infringing. The entire risk as to the *
|
||||||
|
* quality and performance of the Covered Software is with You. *
|
||||||
|
* Should any Covered Software prove defective in any respect, You *
|
||||||
|
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||||
|
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||||
|
* essential part of this License. No use of any Covered Software is *
|
||||||
|
* authorized under this License except under this disclaimer. *
|
||||||
|
* *
|
||||||
|
************************************************************************
|
||||||
|
|
||||||
|
************************************************************************
|
||||||
|
* *
|
||||||
|
* 7. Limitation of Liability *
|
||||||
|
* -------------------------- *
|
||||||
|
* *
|
||||||
|
* Under no circumstances and under no legal theory, whether tort *
|
||||||
|
* (including negligence), contract, or otherwise, shall any *
|
||||||
|
* Contributor, or anyone who distributes Covered Software as *
|
||||||
|
* permitted above, be liable to You for any direct, indirect, *
|
||||||
|
* special, incidental, or consequential damages of any character *
|
||||||
|
* including, without limitation, damages for lost profits, loss of *
|
||||||
|
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||||
|
* and all other commercial damages or losses, even if such party *
|
||||||
|
* shall have been informed of the possibility of such damages. This *
|
||||||
|
* limitation of liability shall not apply to liability for death or *
|
||||||
|
* personal injury resulting from such party's negligence to the *
|
||||||
|
* extent applicable law prohibits such limitation. Some *
|
||||||
|
* jurisdictions do not allow the exclusion or limitation of *
|
||||||
|
* incidental or consequential damages, so this exclusion and *
|
||||||
|
* limitation may not apply to You. *
|
||||||
|
* *
|
||||||
|
************************************************************************
|
||||||
|
|
||||||
|
8. Litigation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Any litigation relating to this License may be brought only in the
|
||||||
|
courts of a jurisdiction where the defendant maintains its principal
|
||||||
|
place of business and such litigation shall be governed by laws of that
|
||||||
|
jurisdiction, without reference to its conflict-of-law provisions.
|
||||||
|
Nothing in this Section shall prevent a party's ability to bring
|
||||||
|
cross-claims or counter-claims.
|
||||||
|
|
||||||
|
9. Miscellaneous
|
||||||
|
----------------
|
||||||
|
|
||||||
|
This License represents the complete agreement concerning the subject
|
||||||
|
matter hereof. If any provision of this License is held to be
|
||||||
|
unenforceable, such provision shall be reformed only to the extent
|
||||||
|
necessary to make it enforceable. Any law or regulation which provides
|
||||||
|
that the language of a contract shall be construed against the drafter
|
||||||
|
shall not be used to construe this License against a Contributor.
|
||||||
|
|
||||||
|
10. Versions of the License
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
10.1. New Versions
|
||||||
|
|
||||||
|
Mozilla Foundation is the license steward. Except as provided in Section
|
||||||
|
10.3, no one other than the license steward has the right to modify or
|
||||||
|
publish new versions of this License. Each version will be given a
|
||||||
|
distinguishing version number.
|
||||||
|
|
||||||
|
10.2. Effect of New Versions
|
||||||
|
|
||||||
|
You may distribute the Covered Software under the terms of the version
|
||||||
|
of the License under which You originally received the Covered Software,
|
||||||
|
or under the terms of any subsequent version published by the license
|
||||||
|
steward.
|
||||||
|
|
||||||
|
10.3. Modified Versions
|
||||||
|
|
||||||
|
If you create software not governed by this License, and you want to
|
||||||
|
create a new license for such software, you may create and use a
|
||||||
|
modified version of this License if you rename the license and remove
|
||||||
|
any references to the name of the license steward (except to note that
|
||||||
|
such modified license differs from this License).
|
||||||
|
|
||||||
|
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||||
|
Licenses
|
||||||
|
|
||||||
|
If You choose to distribute Source Code Form that is Incompatible With
|
||||||
|
Secondary Licenses under the terms of this version of the License, the
|
||||||
|
notice described in Exhibit B of this License must be attached.
|
||||||
|
|
||||||
|
Exhibit A - Source Code Form License Notice
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
If it is not possible or desirable to put the notice in a particular
|
||||||
|
file, then You may include the notice in a location (such as a LICENSE
|
||||||
|
file in a relevant directory) where a recipient would be likely to look
|
||||||
|
for such a notice.
|
||||||
|
|
||||||
|
You may add additional accurate notices of copyright ownership.
|
||||||
|
|
||||||
|
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||||
|
defined by the Mozilla Public License, v. 2.0.
|
1
author.txt
Normal file
1
author.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Edouard DUPIN<yui.heero@gmail.com>
|
6
doc/doc_01_overview.md
Normal file
6
doc/doc_01_overview.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
atriasoft-reggol Overview
|
||||||
|
=========================
|
||||||
|
|
||||||
|
|
||||||
|
TBD
|
||||||
|
|
97
doc/tutorial_01_create_library_logger.md
Normal file
97
doc/tutorial_01_create_library_logger.md
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
Create your own Logger
|
||||||
|
======================
|
||||||
|
|
||||||
|
Import the Module
|
||||||
|
=================
|
||||||
|
|
||||||
|
in the file ```module-info.java``` add the require of the module
|
||||||
|
|
||||||
|
|
||||||
|
```{.java}
|
||||||
|
requires transitive org.atriasoft.reggol;
|
||||||
|
```
|
||||||
|
|
||||||
|
Create your local interface
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Create a package (that must not be exported): ```src/xxx/yyy/internal/```
|
||||||
|
|
||||||
|
Add a Class: ```Log.java```
|
||||||
|
|
||||||
|
with:
|
||||||
|
|
||||||
|
```java
|
||||||
|
package xxx.yyy.internal;
|
||||||
|
|
||||||
|
import org.atriasoft.reggol.LogLevel;
|
||||||
|
import org.atriasoft.reggol.Logger;
|
||||||
|
|
||||||
|
public class Log {
|
||||||
|
private static final String LIB_NAME = "xxx.yyy";
|
||||||
|
private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME);
|
||||||
|
private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(LIB_NAME, LogLevel.CRITICAL);
|
||||||
|
private static final boolean PRINT_ERROR = Logger.getNeedPrint(LIB_NAME, LogLevel.ERROR);
|
||||||
|
private static final boolean PRINT_WARNING = Logger.getNeedPrint(LIB_NAME, LogLevel.WARNING);
|
||||||
|
private static final boolean PRINT_INFO = Logger.getNeedPrint(LIB_NAME, LogLevel.INFO);
|
||||||
|
private static final boolean PRINT_DEBUG = Logger.getNeedPrint(LIB_NAME, LogLevel.DEBUG);
|
||||||
|
private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(LIB_NAME, LogLevel.VERBOSE);
|
||||||
|
private static final boolean PRINT_TODO = Logger.getNeedPrint(LIB_NAME, LogLevel.TODO);
|
||||||
|
private static final boolean PRINT_PRINT = Logger.getNeedPrint(LIB_NAME, LogLevel.PRINT);
|
||||||
|
|
||||||
|
private Log() {}
|
||||||
|
|
||||||
|
public static void print(String data) {
|
||||||
|
if (PRINT_PRINT)
|
||||||
|
Logger.print(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void critical(String data) {
|
||||||
|
if (PRINT_CRITICAL)
|
||||||
|
Logger.critical(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void error(String data) {
|
||||||
|
if (PRINT_ERROR)
|
||||||
|
Logger.error(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void warning(String data) {
|
||||||
|
if (PRINT_WARNING)
|
||||||
|
Logger.warning(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void info(String data) {
|
||||||
|
if (PRINT_INFO)
|
||||||
|
Logger.info(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void debug(String data) {
|
||||||
|
if (PRINT_DEBUG)
|
||||||
|
Logger.debug(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void verbose(String data) {
|
||||||
|
if (PRINT_VERBOSE)
|
||||||
|
Logger.verbose(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void todo(String data) {
|
||||||
|
if (PRINT_TODO)
|
||||||
|
Logger.todo(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Generate some Logs:
|
||||||
|
===================
|
||||||
|
|
||||||
|
|
||||||
|
```{.java}
|
||||||
|
final int plop = 51615;
|
||||||
|
Log.info("ma super ligne de Log " + plop);
|
||||||
|
Log.error("a beautifull error);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
28
doc/tutorial_02_control_logger.md
Normal file
28
doc/tutorial_02_control_logger.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Control the log level
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Change the Level of the Log:
|
||||||
|
============================
|
||||||
|
|
||||||
|
With the system property:
|
||||||
|
|
||||||
|
- ```reggol.level```: Change the level of the log display:
|
||||||
|
- critical
|
||||||
|
- error
|
||||||
|
- warning
|
||||||
|
- info
|
||||||
|
- debug
|
||||||
|
- verbose;
|
||||||
|
- ```reggol.color```: Change the color of the log (true/false)
|
||||||
|
|
||||||
|
|
||||||
|
The second solution depend of the application capability (check --help)
|
||||||
|
|
||||||
|
|
||||||
|
Log in color information
|
||||||
|
========================
|
||||||
|
|
||||||
|
If the color is enable thing to change the default console of eclipse, to support the ascii color code.
|
||||||
|
|
||||||
|
|
||||||
|
|
44
lutin_org-atriasoft-reggol.py
Normal file
44
lutin_org-atriasoft-reggol.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
import realog.debug as debug
|
||||||
|
import lutin.tools as tools
|
||||||
|
import realog.debug as debug
|
||||||
|
import lutin.image as image
|
||||||
|
import os
|
||||||
|
import lutin.multiprocess as lutinMultiprocess
|
||||||
|
|
||||||
|
|
||||||
|
def get_type():
|
||||||
|
return "LIBRARY_DYNAMIC"
|
||||||
|
|
||||||
|
def get_desc():
|
||||||
|
return "Scenarium reggol"
|
||||||
|
|
||||||
|
def get_licence():
|
||||||
|
return "MPL-2"
|
||||||
|
|
||||||
|
def get_compagny_type():
|
||||||
|
return "com"
|
||||||
|
|
||||||
|
def get_compagny_name():
|
||||||
|
return "atriasoft"
|
||||||
|
|
||||||
|
#def get_maintainer():
|
||||||
|
# return "authors.txt"
|
||||||
|
|
||||||
|
#def get_version():
|
||||||
|
# return "version.txt"
|
||||||
|
|
||||||
|
def configure(target, my_module):
|
||||||
|
|
||||||
|
my_module.add_src_file([
|
||||||
|
'src/module-info.java',
|
||||||
|
'src/io/atriasoft/reggol/LogLevel.java',
|
||||||
|
'src/io/atriasoft/reggol/Logger.java',
|
||||||
|
'src/io/atriasoft/reggol/internal/Log.java',
|
||||||
|
])
|
||||||
|
my_module.add_path('src/', type='java')
|
||||||
|
|
||||||
|
my_module.add_flag('java', "RELEASE_15_PREVIEW");
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
17
menu.json
Normal file
17
menu.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"documentation": [
|
||||||
|
{
|
||||||
|
"title": "global overview",
|
||||||
|
"page": "doc/doc_01_overview.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tutorial": [
|
||||||
|
{
|
||||||
|
"title": "Create your own logger",
|
||||||
|
"page": "doc/tutorial_01_create_library_logger.md"
|
||||||
|
},{
|
||||||
|
"title": "Control the logger",
|
||||||
|
"page": "doc/tutorial_02_control_logger.md"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
7
src/module-info.java
Normal file
7
src/module-info.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/** Basic module interface.
|
||||||
|
*
|
||||||
|
* @author Edouard DUPIN */
|
||||||
|
|
||||||
|
open module org.atriasoft.reggol {
|
||||||
|
exports org.atriasoft.reggol;
|
||||||
|
}
|
25
src/org/atriasoft/reggol/LogLevel.java
Normal file
25
src/org/atriasoft/reggol/LogLevel.java
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package org.atriasoft.reggol;
|
||||||
|
|
||||||
|
public enum LogLevel {
|
||||||
|
NONE(-3), PRINT(-2), TODO(-1), CRITICAL(0), ERROR(1), WARNING(2), INFO(3), DEBUG(4), VERBOSE(5);
|
||||||
|
|
||||||
|
public final int value;
|
||||||
|
|
||||||
|
LogLevel(int value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LogLevel fromString(String logLevel) {
|
||||||
|
String value = logLevel.toUpperCase();
|
||||||
|
LogLevel[] values = LogLevel.values();
|
||||||
|
for (LogLevel elem : values)
|
||||||
|
if (value.contentEquals(elem.name()) || value.contentEquals(String.valueOf(elem.value)))
|
||||||
|
return elem;
|
||||||
|
return ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLessEqual(LogLevel other) {
|
||||||
|
return this.value <= other.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
488
src/org/atriasoft/reggol/Logger.java
Normal file
488
src/org/atriasoft/reggol/Logger.java
Normal file
@ -0,0 +1,488 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Revilloud Marc - initial API and implementation
|
||||||
|
******************************************************************************/
|
||||||
|
package org.atriasoft.reggol;
|
||||||
|
|
||||||
|
import java.nio.CharBuffer;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.atriasoft.reggol.internal.Log;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class Logger {
|
||||||
|
static class WrapInt {
|
||||||
|
public int value;
|
||||||
|
|
||||||
|
public WrapInt(final int val) {
|
||||||
|
this.value = val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// background colors
|
||||||
|
private static final String BASH_COLOR_BG_BLACK = "\033[40m";
|
||||||
|
|
||||||
|
private static final String BASH_COLOR_BG_BLUE = "\033[44m";
|
||||||
|
|
||||||
|
private static final String BASH_COLOR_BG_CYAN = "\033[46m";
|
||||||
|
private static final String BASH_COLOR_BG_GREEN = "\033[42m";
|
||||||
|
private static final String BASH_COLOR_BG_MAGENTA = "\033[45m";
|
||||||
|
private static final String BASH_COLOR_BG_RED = "\033[41m";
|
||||||
|
private static final String BASH_COLOR_BG_WHITE = "\033[47m";
|
||||||
|
private static final String BASH_COLOR_BG_YELLOW = "\033[43m";
|
||||||
|
// regular colors
|
||||||
|
private static final String BASH_COLOR_BLACK = "\033[0;30m";
|
||||||
|
private static final String BASH_COLOR_BLUE = "\033[0;34m";
|
||||||
|
// emphasized (bolded) colors
|
||||||
|
private static final String BASH_COLOR_BOLD_BLACK = "\033[1;30m";
|
||||||
|
private static final String BASH_COLOR_BOLD_BLUE = "\033[1;34m";
|
||||||
|
private static final String BASH_COLOR_BOLD_CYAN = "\033[1;36m";
|
||||||
|
private static final String BASH_COLOR_BOLD_GREEN = "\033[1;32m";
|
||||||
|
private static final String BASH_COLOR_BOLD_MAGENTA = "\033[1;35m";
|
||||||
|
private static final String BASH_COLOR_BOLD_RED = "\033[1;31m";
|
||||||
|
private static final String BASH_COLOR_BOLD_WHITE = "\033[1;37m";
|
||||||
|
private static final String BASH_COLOR_BOLD_YELLOW = "\033[1;33m";
|
||||||
|
private static final String BASH_COLOR_CYAN = "\033[0;36m";
|
||||||
|
private static final String BASH_COLOR_GREEN = "\033[0;32m";
|
||||||
|
private static final String BASH_COLOR_MAGENTA = "\033[0;35m";
|
||||||
|
// Return to the normal color settings
|
||||||
|
private static final String BASH_COLOR_NORMAL = "\033[0m";
|
||||||
|
private static final String BASH_COLOR_RED = "\033[0;31m";
|
||||||
|
private static final String BASH_COLOR_WHITE = "\033[0;37m";
|
||||||
|
private static final String BASH_COLOR_YELLOW = "\033[0;33m";
|
||||||
|
// go to the Top of bash
|
||||||
|
private static final String BASH_GO_TOP = "\033[0;0f";
|
||||||
|
static boolean criticalOccured = false;
|
||||||
|
|
||||||
|
private static LogLevel defaultLevel = LogLevel.INFO;
|
||||||
|
private static boolean haveClassName = false;
|
||||||
|
// to enable color, you need to install in eclipse the plug-in "ANSI escape in console"
|
||||||
|
private static boolean haveColor = true;
|
||||||
|
private static boolean haveFileName = true;
|
||||||
|
private static boolean haveLibName = true;
|
||||||
|
private static boolean haveLineNumber = true;
|
||||||
|
private static boolean haveThreadId = true;
|
||||||
|
private static boolean haveThreadName = false;
|
||||||
|
private static boolean isInit = false;
|
||||||
|
private static HashMap<String, LogLevel> logLevels = new HashMap<>();
|
||||||
|
private static WrapInt sizeClassName = new WrapInt(25);
|
||||||
|
private static WrapInt sizeFileName = new WrapInt(15);
|
||||||
|
private static WrapInt sizeLibName = new WrapInt(0);
|
||||||
|
private static WrapInt sizeLineNumber = new WrapInt(3);
|
||||||
|
private static WrapInt sizeThreadId = new WrapInt(2);
|
||||||
|
private static WrapInt sizeThreadName = new WrapInt(10);
|
||||||
|
static {
|
||||||
|
// Load system color state
|
||||||
|
String value = System.getProperty("reggol.color");
|
||||||
|
if (value != null) {
|
||||||
|
if (value.contentEquals("true") || value.contentEquals("1")) {
|
||||||
|
Logger.haveColor = true;
|
||||||
|
} else if (value.contentEquals("false") || value.contentEquals("0")) {
|
||||||
|
Logger.haveColor = false;
|
||||||
|
} else {
|
||||||
|
System.out.println("error in color state '" + value + "' ==> not in range [true, false, 0, 1]");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load system debug level
|
||||||
|
value = System.getProperty("reggol.level");
|
||||||
|
if (value != null) {
|
||||||
|
final LogLevel level = LogLevel.fromString(value);
|
||||||
|
System.out.println("Change global level at " + value + " ==> " + level);
|
||||||
|
Logger.defaultLevel = level;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String addGeneric(final String level, final String libName) {
|
||||||
|
final StringBuilder out = new StringBuilder().append(level);
|
||||||
|
out.append(Logger.printElement("", "", Logger.haveLibName, libName, Logger.sizeLibName));
|
||||||
|
out.append(Logger.printElement(" | ", "", Logger.haveThreadId, Long.toString(Thread.currentThread().getId()), Logger.sizeThreadId));
|
||||||
|
out.append(Logger.printElement(" | ", "", Logger.haveThreadName, Thread.currentThread().getName(), Logger.sizeThreadName));
|
||||||
|
if (Logger.haveClassName || Logger.haveFileName || Logger.haveLineNumber) {
|
||||||
|
final StackTraceElement callElem = Logger.getCallerElement();
|
||||||
|
out.append(Logger.printElementLeft(" | l=", "", Logger.haveLineNumber, Long.toString(callElem.getLineNumber()), Logger.sizeLineNumber));
|
||||||
|
out.append(Logger.printElement(" | ", "", Logger.haveClassName, callElem.getClassName(), Logger.sizeClassName));
|
||||||
|
out.append(Logger.printElement(" | ", "", Logger.haveFileName, callElem.getFileName(), Logger.sizeFileName));
|
||||||
|
}
|
||||||
|
return out.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace all the values {} with the associated value in the parameters
|
||||||
|
* @param data A generic string composed with "{}" element that will be replace.
|
||||||
|
* @param values List of all element to add in the string.
|
||||||
|
* @return a string with all the transformed data.
|
||||||
|
*/
|
||||||
|
public static String concatenate(final String data, final Object... values) {
|
||||||
|
final String[] cliped = data.split("\\{\\}");
|
||||||
|
final StringBuilder out = new StringBuilder();
|
||||||
|
final int nbElement = Math.max(values.length, cliped.length);
|
||||||
|
for (int iii = 0; iii < nbElement; iii++) {
|
||||||
|
if (iii < cliped.length) {
|
||||||
|
out.append(cliped[iii]);
|
||||||
|
} else {
|
||||||
|
out.append(" ?? ");
|
||||||
|
}
|
||||||
|
if (iii < values.length) {
|
||||||
|
if (values[iii] == null) {
|
||||||
|
out.append("null");
|
||||||
|
} else {
|
||||||
|
out.append(values[iii].toString());
|
||||||
|
}
|
||||||
|
} else if (cliped.length - 1 != values.length) {
|
||||||
|
out.append("{}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void critical(final String libName, final String data) {
|
||||||
|
criticalInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void critical(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
criticalInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
critical(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void criticalInternal(final String libName, final String data) {
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_BOLD_RED);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[C] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
System.out.flush();
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_YELLOW);
|
||||||
|
}
|
||||||
|
for (final StackTraceElement ste : Thread.currentThread().getStackTrace()) {
|
||||||
|
System.out.println(ste);
|
||||||
|
}
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
System.out.flush();
|
||||||
|
Logger.criticalOccured = true;
|
||||||
|
System.exit(-50);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void debug(final String libName, final String data) {
|
||||||
|
debugInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void debug(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
debugInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
debugInternal(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void debugInternal(final String libName, final String data) {
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_YELLOW);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[D] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void displayBackTrace(final String libNameDraw) {
|
||||||
|
final StackTraceElement[] list = Thread.currentThread().getStackTrace();
|
||||||
|
Logger.error(libNameDraw, "Display Stacktrace :");
|
||||||
|
for (int iii = 0; iii < list.length; iii++) {
|
||||||
|
Logger.error(libNameDraw, " - " + list[iii]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void error(final String libName, final String data) {
|
||||||
|
errorInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void error(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
errorInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
errorInternal(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void errorInternal(final String libName, final String data) {
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_RED);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[E] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static StackTraceElement getCallerElement() {
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 6) {
|
||||||
|
return Thread.currentThread().getStackTrace()[6];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 5) {
|
||||||
|
return Thread.currentThread().getStackTrace()[5];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 4) {
|
||||||
|
return Thread.currentThread().getStackTrace()[4];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 3) {
|
||||||
|
return Thread.currentThread().getStackTrace()[3];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 2) {
|
||||||
|
return Thread.currentThread().getStackTrace()[2];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 1) {
|
||||||
|
return Thread.currentThread().getStackTrace()[1];
|
||||||
|
}
|
||||||
|
return Thread.currentThread().getStackTrace()[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** This function permit to get the printable string to print in the log element (select here the number of char to print)
|
||||||
|
* @param libName Name of the library
|
||||||
|
* @return string to set in the reggol information */
|
||||||
|
public static String getDrawableName(final String libName) {
|
||||||
|
return libName; // String.format("%1$" + 15 + "s", libName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean getNeedPrint(final String libName, final LogLevel level) {
|
||||||
|
final LogLevel reference = Logger.logLevels.get(libName);
|
||||||
|
if (reference == null) {
|
||||||
|
return level.isLessEqual(Logger.defaultLevel);
|
||||||
|
}
|
||||||
|
return level.isLessEqual(reference);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void info(final String libName, final String data) {
|
||||||
|
infoInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void info(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
infoInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
infoInternal(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void infoInternal(final String libName, final String data) {
|
||||||
|
final StackTraceElement callElem = Logger.getCallerElement();
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_CYAN);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[I] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Initialize the library with generic argument in command line
|
||||||
|
* @param args list of argument that are filtered after */
|
||||||
|
public static void init(final List<String> args) {
|
||||||
|
if (Logger.isInit) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Logger.isInit = true;
|
||||||
|
for (int iii = 0; iii < args.size(); ++iii) {
|
||||||
|
final String data = args.get(iii);
|
||||||
|
if (data.startsWith("--log-level=")) {
|
||||||
|
final String value = data.substring(12);
|
||||||
|
final LogLevel level = LogLevel.fromString(value);
|
||||||
|
System.out.println("Change global level at " + value + " ==> " + level);
|
||||||
|
Logger.defaultLevel = level;
|
||||||
|
} else if (data.contentEquals("--log-color")) {
|
||||||
|
Logger.haveColor = true;
|
||||||
|
} else if (data.contentEquals("--log-no-color")) {
|
||||||
|
Logger.haveColor = false;
|
||||||
|
} else if (data.startsWith("--log-lib=")) {
|
||||||
|
final String value = data.substring(10);
|
||||||
|
String[] values = value.split("/");
|
||||||
|
if (values.length != 2) {
|
||||||
|
values = value.split(":");
|
||||||
|
if (values.length != 2) {
|
||||||
|
values = value.split("\\+");
|
||||||
|
if (values.length != 2) {
|
||||||
|
System.err.println("Can not set the --reggol-lib= with value='" + value + "' not formated name:X or name/X or name+X");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("Change level of '" + values[0] + "' at " + LogLevel.fromString(values[1]));
|
||||||
|
Logger.logLevels.put(values[0], LogLevel.fromString(values[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Clear all reggol elements.
|
||||||
|
int iii = 0;
|
||||||
|
while (iii < args.size()) {
|
||||||
|
final String data = args.get(iii);
|
||||||
|
if (data.startsWith("--log")) {
|
||||||
|
args.remove(iii);
|
||||||
|
} else {
|
||||||
|
iii++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isCriticalOccured() {
|
||||||
|
return Logger.criticalOccured;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void print(final String libName, final String data) {
|
||||||
|
System.out.println(data);
|
||||||
|
//printInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void print(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
System.out.println(data);
|
||||||
|
//printInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
System.out.println(concatenate(data, values));
|
||||||
|
//printInternal(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String printElement(final String separator, final String separatorEnd, final boolean isActive, String data, final WrapInt size) {
|
||||||
|
if (!isActive) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (data == null) {
|
||||||
|
data = "???";
|
||||||
|
}
|
||||||
|
final int stringSize = data.length();
|
||||||
|
if (size.value < stringSize) {
|
||||||
|
size.value = stringSize;
|
||||||
|
}
|
||||||
|
final int rest = size.value - stringSize;
|
||||||
|
return separator + data + Logger.spaces(rest) + separatorEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String printElementLeft(final String separator, final String separatorEnd, final boolean isActive, String data, final WrapInt size) {
|
||||||
|
if (!isActive) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (data == null) {
|
||||||
|
data = "???";
|
||||||
|
}
|
||||||
|
final int stringSize = data.length();
|
||||||
|
if (size.value < stringSize) {
|
||||||
|
size.value = stringSize;
|
||||||
|
}
|
||||||
|
final int rest = size.value - stringSize;
|
||||||
|
return separator + Logger.spaces(rest) + data + separatorEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void printInternal(final String libName, final String data) {
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_WHITE);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[P] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
System.out.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String spaces(final int spaces) {
|
||||||
|
return CharBuffer.allocate(spaces).toString().replace('\0', ' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void todo(final String libName, final String data) {
|
||||||
|
todoInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void todo(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
todoInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
todoInternal(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void todoInternal(final String libName, final String data) {
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_WHITE);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[TODO] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void usage() {
|
||||||
|
Log.print(" [log]: Log session interface");
|
||||||
|
Log.print(" --log-level= Change the default log level (set all Log level):");
|
||||||
|
Log.print(" -3/none: debug None");
|
||||||
|
Log.print(" -2/print: debug Print");
|
||||||
|
Log.print(" -1/todo: debug Todo");
|
||||||
|
Log.print(" 0/critical: debug Critical (default)");
|
||||||
|
Log.print(" 1/error: debug Error");
|
||||||
|
Log.print(" 2/warning: debug Warning");
|
||||||
|
Log.print(" 3/info: debug Info");
|
||||||
|
Log.print(" 4/debug: debug Debug");
|
||||||
|
Log.print(" 5/verbose: debug Verbose");
|
||||||
|
Log.print(" --log-lib=name:X Set a library specific level:");
|
||||||
|
Log.print(" name Name of the library");
|
||||||
|
Log.print(" X Log level to set [0..6]");
|
||||||
|
Log.print(" !note!: ':' can be replace with '/' or '+'");
|
||||||
|
Log.print(" --log-color Enable color in log");
|
||||||
|
Log.print(" --log-no-color Disable color in log (default)");
|
||||||
|
Log.print("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void verbose(final String libName, final String data) {
|
||||||
|
verboseInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void verbose(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
verboseInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
verboseInternal(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void verboseInternal(final String libName, final String data) {
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_WHITE);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[V] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void warning(final String libName, final String data) {
|
||||||
|
warningInternal(libName, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void warning(final String libName, final String data, final Object... values) {
|
||||||
|
if (values.length == 0) {
|
||||||
|
warningInternal(libName, data);
|
||||||
|
} else {
|
||||||
|
warningInternal(libName, concatenate(data, values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void warningInternal(final String libName, final String data) {
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_MAGENTA);
|
||||||
|
}
|
||||||
|
System.out.println(Logger.addGeneric("[W] ", libName) + " | " + data);
|
||||||
|
if (Logger.haveColor) {
|
||||||
|
System.out.print(Logger.BASH_COLOR_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Logger() {}
|
||||||
|
}
|
130
src/org/atriasoft/reggol/LoggerLocal.java
Normal file
130
src/org/atriasoft/reggol/LoggerLocal.java
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
package org.atriasoft.reggol;
|
||||||
|
|
||||||
|
public class LoggerLocal {
|
||||||
|
private final String className;
|
||||||
|
private final String libraryName;
|
||||||
|
private final String libraryNameDraw;
|
||||||
|
private final boolean force;
|
||||||
|
private final boolean printCritical;
|
||||||
|
private final boolean printDebug;
|
||||||
|
private final boolean printError;
|
||||||
|
private final boolean printInfo;
|
||||||
|
private final boolean printPrint;
|
||||||
|
private final boolean printTodo;
|
||||||
|
private final boolean printVerbose;
|
||||||
|
private final boolean printWarning;
|
||||||
|
|
||||||
|
public LoggerLocal(String libraryName, final Class<?> clazz) {
|
||||||
|
this(libraryName, clazz, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LoggerLocal(String libraryName, final Class<?> clazz, boolean force) {
|
||||||
|
this.force = force;
|
||||||
|
this.libraryName = libraryName;
|
||||||
|
this.className = clazz.getCanonicalName();
|
||||||
|
this.libraryNameDraw = Logger.getDrawableName(this.libraryName);
|
||||||
|
this.printCritical = Logger.getNeedPrint(this.libraryName, LogLevel.CRITICAL);
|
||||||
|
this.printDebug = Logger.getNeedPrint(this.libraryName, LogLevel.DEBUG);
|
||||||
|
this.printError = Logger.getNeedPrint(this.libraryName, LogLevel.ERROR);
|
||||||
|
this.printInfo = Logger.getNeedPrint(this.libraryName, LogLevel.INFO);
|
||||||
|
this.printPrint = Logger.getNeedPrint(this.libraryName, LogLevel.PRINT);
|
||||||
|
this.printTodo = Logger.getNeedPrint(this.libraryName, LogLevel.TODO);
|
||||||
|
this.printVerbose = Logger.getNeedPrint(this.libraryName, LogLevel.VERBOSE);
|
||||||
|
this.printWarning = Logger.getNeedPrint(this.libraryName, LogLevel.WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void critical(final String data) {
|
||||||
|
if (this.printCritical || this.force) {
|
||||||
|
Logger.critical(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void critical(final String data, Object... values) {
|
||||||
|
if (this.printCritical || this.force) {
|
||||||
|
Logger.critical(this.libraryNameDraw, data, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void debug(final String data) {
|
||||||
|
if (this.printDebug || this.force) {
|
||||||
|
Logger.debug(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void debug(final String data, Object... values) {
|
||||||
|
if (this.printDebug || this.force) {
|
||||||
|
Logger.debug(this.libraryNameDraw, data, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void displayBackTrace() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public void error(final String data) {
|
||||||
|
if (this.printError || this.force) {
|
||||||
|
Logger.error(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void error(final String data, Object... values) {
|
||||||
|
if (this.printError || this.force) {
|
||||||
|
Logger.error(this.libraryNameDraw, data, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void info(final String data) {
|
||||||
|
if (this.printInfo || this.force) {
|
||||||
|
Logger.info(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void info(final String data, Object... values) {
|
||||||
|
if (this.printInfo || this.force) {
|
||||||
|
Logger.info(this.libraryNameDraw, data, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void print(final String data) {
|
||||||
|
if (this.printPrint || this.force) {
|
||||||
|
Logger.print(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void print(final String data, Object... values) {
|
||||||
|
if (this.printPrint || this.force) {
|
||||||
|
Logger.print(this.libraryNameDraw, data, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void todo(final String data) {
|
||||||
|
if (this.printTodo || this.force) {
|
||||||
|
Logger.todo(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void todo(final String data, Object... values) {
|
||||||
|
if (this.printTodo || this.force) {
|
||||||
|
Logger.todo(this.libraryNameDraw, data, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void verbose(final String data) {
|
||||||
|
if (this.printVerbose || this.force) {
|
||||||
|
Logger.verbose(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void warning(final String data) {
|
||||||
|
if (this.printWarning || this.force) {
|
||||||
|
Logger.warning(this.libraryNameDraw, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void warning(final String data, Object... values) {
|
||||||
|
if (this.printWarning || this.force) {
|
||||||
|
Logger.warning(this.libraryNameDraw, data, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
60
src/org/atriasoft/reggol/internal/Log.java
Normal file
60
src/org/atriasoft/reggol/internal/Log.java
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
package org.atriasoft.reggol.internal;
|
||||||
|
|
||||||
|
import org.atriasoft.reggol.LogLevel;
|
||||||
|
import org.atriasoft.reggol.Logger;
|
||||||
|
|
||||||
|
public class Log {
|
||||||
|
private static final String LIB_NAME = "reggol";
|
||||||
|
private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME);
|
||||||
|
private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(LIB_NAME, LogLevel.CRITICAL);
|
||||||
|
private static final boolean PRINT_ERROR = Logger.getNeedPrint(LIB_NAME, LogLevel.ERROR);
|
||||||
|
private static final boolean PRINT_WARNING = Logger.getNeedPrint(LIB_NAME, LogLevel.WARNING);
|
||||||
|
private static final boolean PRINT_INFO = Logger.getNeedPrint(LIB_NAME, LogLevel.INFO);
|
||||||
|
private static final boolean PRINT_DEBUG = Logger.getNeedPrint(LIB_NAME, LogLevel.DEBUG);
|
||||||
|
private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(LIB_NAME, LogLevel.VERBOSE);
|
||||||
|
private static final boolean PRINT_TODO = Logger.getNeedPrint(LIB_NAME, LogLevel.TODO);
|
||||||
|
private static final boolean PRINT_PRINT = Logger.getNeedPrint(LIB_NAME, LogLevel.PRINT);
|
||||||
|
|
||||||
|
private Log() {}
|
||||||
|
|
||||||
|
public static void print(String data) {
|
||||||
|
if (PRINT_PRINT)
|
||||||
|
Logger.print(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void todo(String data) {
|
||||||
|
if (PRINT_TODO)
|
||||||
|
Logger.todo(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void critical(String data) {
|
||||||
|
if (PRINT_CRITICAL)
|
||||||
|
Logger.critical(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void error(String data) {
|
||||||
|
if (PRINT_ERROR)
|
||||||
|
Logger.error(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void warning(String data) {
|
||||||
|
if (PRINT_WARNING)
|
||||||
|
Logger.warning(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void info(String data) {
|
||||||
|
if (PRINT_INFO)
|
||||||
|
Logger.info(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void debug(String data) {
|
||||||
|
if (PRINT_DEBUG)
|
||||||
|
Logger.debug(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void verbose(String data) {
|
||||||
|
if (PRINT_VERBOSE)
|
||||||
|
Logger.verbose(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1
test/.gitignore
vendored
Normal file
1
test/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/bin/
|
0
test/src/test/atriasoft/reggol/.keep
Normal file
0
test/src/test/atriasoft/reggol/.keep
Normal file
59
test/src/test/atriasoft/reggol/Log.java
Normal file
59
test/src/test/atriasoft/reggol/Log.java
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
package test.atriasoft.reggol;
|
||||||
|
|
||||||
|
import org.atriasoft.reggol.LogLevel;
|
||||||
|
import org.atriasoft.reggol.Logger;
|
||||||
|
|
||||||
|
public class Log {
|
||||||
|
private static final String LIB_NAME = "sc-log-test";
|
||||||
|
private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME);
|
||||||
|
private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(LIB_NAME, LogLevel.CRITICAL);
|
||||||
|
private static final boolean PRINT_ERROR = Logger.getNeedPrint(LIB_NAME, LogLevel.ERROR);
|
||||||
|
private static final boolean PRINT_WARNING = Logger.getNeedPrint(LIB_NAME, LogLevel.WARNING);
|
||||||
|
private static final boolean PRINT_INFO = Logger.getNeedPrint(LIB_NAME, LogLevel.INFO);
|
||||||
|
private static final boolean PRINT_DEBUG = Logger.getNeedPrint(LIB_NAME, LogLevel.DEBUG);
|
||||||
|
private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(LIB_NAME, LogLevel.VERBOSE);
|
||||||
|
private static final boolean PRINT_TODO = Logger.getNeedPrint(LIB_NAME, LogLevel.TODO);
|
||||||
|
private static final boolean PRINT_PRINT = Logger.getNeedPrint(LIB_NAME, LogLevel.PRINT);
|
||||||
|
|
||||||
|
private Log() {}
|
||||||
|
|
||||||
|
public static void print(String data) {
|
||||||
|
if (PRINT_PRINT)
|
||||||
|
Logger.print(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void critical(String data) {
|
||||||
|
if (PRINT_CRITICAL)
|
||||||
|
Logger.critical(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void error(String data) {
|
||||||
|
if (PRINT_ERROR)
|
||||||
|
Logger.error(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void warning(String data) {
|
||||||
|
if (PRINT_WARNING)
|
||||||
|
Logger.warning(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void info(String data) {
|
||||||
|
if (PRINT_INFO)
|
||||||
|
Logger.info(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void debug(String data) {
|
||||||
|
if (PRINT_DEBUG)
|
||||||
|
Logger.debug(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void verbose(String data) {
|
||||||
|
if (PRINT_VERBOSE)
|
||||||
|
Logger.verbose(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void todo(String data) {
|
||||||
|
if (PRINT_TODO)
|
||||||
|
Logger.todo(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
}
|
18
test/src/test/atriasoft/reggol/Log2.java
Normal file
18
test/src/test/atriasoft/reggol/Log2.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package test.atriasoft.reggol;
|
||||||
|
|
||||||
|
import org.atriasoft.reggol.LogLevel;
|
||||||
|
import org.atriasoft.reggol.Logger;
|
||||||
|
|
||||||
|
public class Log2 {
|
||||||
|
private static final String LIB_NAME = "sc-log-test-2";
|
||||||
|
private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME);
|
||||||
|
private static final boolean PRINT_DEBUG = Logger.getNeedPrint(LIB_NAME, LogLevel.DEBUG);
|
||||||
|
|
||||||
|
private Log2() {}
|
||||||
|
|
||||||
|
public static void debug(String data) {
|
||||||
|
if (PRINT_DEBUG)
|
||||||
|
Logger.debug(LIB_NAME_DRAW, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
102
test/src/test/atriasoft/reggol/TestBasicLog.java
Normal file
102
test/src/test/atriasoft/reggol/TestBasicLog.java
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Revilloud Marc - initial API and implementation
|
||||||
|
******************************************************************************/
|
||||||
|
package test.atriasoft.reggol;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.atriasoft.reggol.Logger;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||||
|
import org.junit.jupiter.api.Order;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.TestMethodOrder;
|
||||||
|
|
||||||
|
@TestMethodOrder(OrderAnnotation.class)
|
||||||
|
public class TestBasicLog {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(1)
|
||||||
|
public void aaFirstInitialisation() {
|
||||||
|
List<String> args = new ArrayList<>();
|
||||||
|
args.add("--log-level=999");
|
||||||
|
args.add("--log-level=1");
|
||||||
|
args.add("--log-no-color");
|
||||||
|
args.add("--log-color");
|
||||||
|
args.add("--log-lib=sc-log-test+6");
|
||||||
|
args.add("--log-lib=sc-log-test/6");
|
||||||
|
args.add("--log-lib=sc-log-test:6");
|
||||||
|
args.add("--log-lib=sc-log-test:verbose");
|
||||||
|
args.add("--log-lib=sc-log-test2+3");
|
||||||
|
args.add("--log-lib=sc-log-test");
|
||||||
|
args.add("--log-with-stupid-parameter=sdkfjsqdlkf");
|
||||||
|
args.add("--help");
|
||||||
|
Logger.init(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(2)
|
||||||
|
public void bbSecondInitialisation() {
|
||||||
|
List<String> args = new ArrayList<>();
|
||||||
|
Logger.init(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(3)
|
||||||
|
public void ccBasicLogCall() {
|
||||||
|
Log.print("Simple print");
|
||||||
|
Log.todo("Simple todo");
|
||||||
|
Log.error("Simple error");
|
||||||
|
Log.warning("Simple warning");
|
||||||
|
Log.info("Simple info");
|
||||||
|
Log.debug("Simple debug");
|
||||||
|
Log.verbose("Simple verbose");
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO REFACTO REMOVE this and set it in the Test of the reggol.
|
||||||
|
public static String getAAAAAAA(int dfsdf) {
|
||||||
|
int hhh = 0;
|
||||||
|
for (int kkk = 0; kkk < dfsdf; kkk++)
|
||||||
|
for (int iii = 0; iii < 10000; iii++)
|
||||||
|
for (int jjj = 0; jjj < 100000; jjj++)
|
||||||
|
for (int lll = 0; lll < 100000; lll++)
|
||||||
|
hhh++;
|
||||||
|
return "kkk" + hhh;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void testLog() {
|
||||||
|
Log.print("test direct [START]");
|
||||||
|
// test de 10 secondes contre 0.0?? second quand le niveau n'est pas assez grand ...
|
||||||
|
long timeStart = System.currentTimeMillis();
|
||||||
|
for (int iii = 0; iii < 100000000; iii++)
|
||||||
|
Log2.debug("test direct");
|
||||||
|
long timeStop = System.currentTimeMillis();
|
||||||
|
Log.print("test direct [END] : " + timeStart + " to " + timeStop + " ==> delta=" + (timeStop - timeStart));
|
||||||
|
Log.print("test concat [START]");
|
||||||
|
// C'est très long dans les 2 cas ...
|
||||||
|
timeStart = System.currentTimeMillis();
|
||||||
|
for (int iii = 0; iii < 6; iii++)
|
||||||
|
Log2.debug("test concat: non fonctionnel, il applelle le get a chaque log ... " + getAAAAAAA(iii));
|
||||||
|
timeStop = System.currentTimeMillis();
|
||||||
|
Log.print("test concat [END] : " + timeStart + " to " + timeStop + " ==> delta=" + (timeStop - timeStart));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(4)
|
||||||
|
public void ddTestSimpleLog() {
|
||||||
|
testLog();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(4)
|
||||||
|
public void eeUsage() {
|
||||||
|
Logger.usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1
version.txt
Normal file
1
version.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0.9.0-dev
|
Loading…
x
Reference in New Issue
Block a user