From: <jsa...@us...> - 2008-10-27 16:15:15
|
Revision: 43 http://flexotask.svn.sourceforge.net/flexotask/?rev=43&view=rev Author: jsauerbach Date: 2008-10-27 16:15:09 +0000 (Mon, 27 Oct 2008) Log Message: ----------- Enter intial code set into repository Added Paths: ----------- trunk/flexotask-devtest/.classpath trunk/flexotask-devtest/.project trunk/flexotask-devtest/.settings/ trunk/flexotask-devtest/.settings/org.eclipse.jdt.core.prefs trunk/flexotask-devtest/.settings/org.eclipse.jdt.ui.prefs trunk/flexotask-devtest/META-INF/ trunk/flexotask-devtest/META-INF/MANIFEST.MF trunk/flexotask-devtest/build.properties trunk/flexotask-devtest/launch/ trunk/flexotask-devtest/launch/Run devtime validator test suite.launch trunk/flexotask-devtest/launch/Run rewriter test suite.launch trunk/flexotask-devtest/src/ trunk/flexotask-devtest/src/base/ trunk/flexotask-devtest/src/base/DevtimeCheckerTestCase.java trunk/flexotask-devtest/src/base/RewriterTestCase.java trunk/flexotask-devtest/src/com/ trunk/flexotask-devtest/src/com/ibm/ trunk/flexotask-devtest/src/com/ibm/realtime/ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/rewriting/ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/rewriting/TestCodeRewriter.java trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/validation/ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/validation/TestDevtimeCodeValidator.java trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/system/ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/system/TestCodeValidator.java trunk/flexotask-devtest/src/testall/ trunk/flexotask-devtest/src/testall/AllDevtimeCheckerTests.java trunk/flexotask-devtest/src/testall/AllRewriterTests.java trunk/flexotask-devtest/src/testall/AllTests.java trunk/flexotask-devtest/tst/ trunk/flexotask-devtest/tst/devtime/ trunk/flexotask-devtest/tst/devtime/test1/ trunk/flexotask-devtest/tst/devtime/test1/IllegalStable.java trunk/flexotask-devtest/tst/devtime/test1/MyFlexotask.java trunk/flexotask-devtest/tst/devtime/test1/MyFlexotaskWithIllegalStable.java trunk/flexotask-devtest/tst/devtime/test1/MyStable.java trunk/flexotask-devtest/tst/devtime/test1/TestMyFlexotask.java trunk/flexotask-devtest/tst/devtime/test2/ trunk/flexotask-devtest/tst/devtime/test2/CheckFunctionTests.java trunk/flexotask-devtest/tst/devtime/test3/ trunk/flexotask-devtest/tst/devtime/test3/DevTimeStaticDiagnostic.java trunk/flexotask-devtest/tst/rewriter/ trunk/flexotask-devtest/tst/rewriter/test1/ trunk/flexotask-devtest/tst/rewriter/test1/MyFlexotask.java trunk/flexotask-devtest/tst/rewriter/test1/TestMyFlexotask.java Added: trunk/flexotask-devtest/.classpath =================================================================== --- trunk/flexotask-devtest/.classpath (rev 0) +++ trunk/flexotask-devtest/.classpath 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="binbase" path="src"/> + <classpathentry kind="src" output="bintst" path="tst"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> + <classpathentry combineaccessrules="false" kind="src" path="/flexotask"/> + <classpathentry combineaccessrules="false" kind="src" path="/flexotask-development"/> + <classpathentry combineaccessrules="false" kind="src" path="/realtime-analysis"/> + <classpathentry combineaccessrules="false" kind="src" path="/flexotask-functiontest"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: trunk/flexotask-devtest/.project =================================================================== --- trunk/flexotask-devtest/.project (rev 0) +++ trunk/flexotask-devtest/.project 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>flexotask-devtest</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> Added: trunk/flexotask-devtest/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/flexotask-devtest/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/flexotask-devtest/.settings/org.eclipse.jdt.core.prefs 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,313 @@ +#Tue Oct 21 15:50:21 EDT 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=0 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false Added: trunk/flexotask-devtest/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- trunk/flexotask-devtest/.settings/org.eclipse.jdt.ui.prefs (rev 0) +++ trunk/flexotask-devtest/.settings/org.eclipse.jdt.ui.prefs 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,10 @@ +#Mon Oct 27 11:37:47 EDT 2008 +eclipse.preferences.version=1 +formatter_profile=_IBM +formatter_settings_version=10 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.javadoc=false +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * This file is part of Flexible Task Graphs\r\n * (http\://sourceforge.net/projects/flexotasks)\r\n *\r\n * Copyright (c) 2006 - 2008 IBM Corporation.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\r\n */\r\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/** */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\r\n * This file is part of Flexible Task Graphs\r\n * (http\://sourceforge.net/projects/flexotasks)\r\n *\r\n * Copyright (c) 2006 - 2008 IBM Corporation.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\r\n */\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> Added: trunk/flexotask-devtest/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask-devtest/META-INF/MANIFEST.MF (rev 0) +++ trunk/flexotask-devtest/META-INF/MANIFEST.MF 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Flexotask_unittest Plug-in +Bundle-SymbolicName: flexotask_devtest +Bundle-Version: 1.0.0 +Require-Bundle: org.eclipse.core.runtime Added: trunk/flexotask-devtest/build.properties =================================================================== --- trunk/flexotask-devtest/build.properties (rev 0) +++ trunk/flexotask-devtest/build.properties 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . Property changes on: trunk/flexotask-devtest/build.properties ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/flexotask-devtest/launch/Run devtime validator test suite.launch =================================================================== --- trunk/flexotask-devtest/launch/Run devtime validator test suite.launch (rev 0) +++ trunk/flexotask-devtest/launch/Run devtime validator test suite.launch 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/flexotask-unittest/src/testall/AllDevtimeCheckerTests.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="testall.AllDevtimeCheckerTests"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="flexotask-devtest"/> +</launchConfiguration> Added: trunk/flexotask-devtest/launch/Run rewriter test suite.launch =================================================================== --- trunk/flexotask-devtest/launch/Run rewriter test suite.launch (rev 0) +++ trunk/flexotask-devtest/launch/Run rewriter test suite.launch 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/flexotask-unittest/src/testall/AllRewriterTests.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="testall.AllRewriterTests"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="flexotask-devtest"/> +</launchConfiguration> Added: trunk/flexotask-devtest/src/base/DevtimeCheckerTestCase.java =================================================================== --- trunk/flexotask-devtest/src/base/DevtimeCheckerTestCase.java (rev 0) +++ trunk/flexotask-devtest/src/base/DevtimeCheckerTestCase.java 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,160 @@ +/* + * This file is part of Flexible Task Graphs + * (http://sourceforge.net/projects/flexotasks) + * + * Copyright (c) 2006 - 2008 IBM Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + */ +package base; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import junit.framework.TestCase; + +import org.eclipse.core.runtime.NullProgressMonitor; + +import com.ibm.realtime.flexotask.AtomicException; +import com.ibm.realtime.flexotask.AtomicFlexotask; +import com.ibm.realtime.flexotask.ExternalMethods; +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.Stable; +import com.ibm.realtime.flexotask.development.validation.CodeAnalysisResult; +import com.ibm.realtime.flexotask.development.validation.TestDevtimeCodeValidator; +import com.ibm.realtime.flexotask.template.FlexotaskStableMode; +import com.ibm.realtime.flexotask.template.FlexotaskTaskTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskValidationException; +import com.ibm.realtime.flexotask.validation.ValidationContext; + +/** + * Base test class for doing testing of the development time checker + */ +public abstract class DevtimeCheckerTestCase extends TestCase { + /** The context used by the validator */ + protected ValidationContext context; + /** The validator used for the devtime checking */ + protected TestDevtimeCodeValidator validator; + /** The original context classloader */ + protected ClassLoader originalClassLoader; + + public DevtimeCheckerTestCase() { + } + + /** + * Configure the classloader and instantiate new devtime validator. + */ + protected void setUp() { + originalClassLoader = Thread.currentThread().getContextClassLoader(); + ClassLoader cl = originalClassLoader; + if (cl == null) cl = ClassLoader.getSystemClassLoader(); + context = new ValidationContext(cl, Stable.class, + Flexotask.class, AtomicFlexotask.class, AtomicException.class, + ExternalMethods.class); + } + + /** + * Causes for teardown and setup to occur + */ + protected void reset() { + tearDown(); + setUp(); + } + + protected void tearDown() { + Thread.currentThread().setContextClassLoader(originalClassLoader); + context = null; + validator = null; + } + + /** + * Returns a set of class objects, representing the class objects of the + * classes having the names provided in the array. + * @param classNames names as an array of strings + * @return names as a Set of classes + * @throws ClassNotFoundException + */ + private Set getFlexotaskClasses(String[] classNames) throws ClassNotFoundException { + Set flexotaskClasses = new HashSet(); + for (int i = 0; i < classNames.length; i++) { + flexotaskClasses.add(context.getClassLoader().loadClass(classNames[i])); + } + return flexotaskClasses; + } + + /** + * Get the flexotask classes named in a template + * @param template the template + * @return the set of classes named therein + * @throws ClassNotFoundException + */ + private Set getFlexotaskClasses(FlexotaskTemplate template) throws ClassNotFoundException { + Set flexotaskClasses = new HashSet(); + for (Iterator j = template.getTasks().iterator(); j.hasNext(); ) { + FlexotaskTaskTemplate taskTmpl = (FlexotaskTaskTemplate) j.next(); + System.out.println("file: " + context); + System.out.println("file: " + context.getClassLoader()); + Class clazz = context.getClassLoader().loadClass(taskTmpl.getImplementationClass()); + flexotaskClasses.add(clazz); + } + return flexotaskClasses; + } + + /** + * Do validation on a set of class names and a set of stable classes, using manual mode + * @param classNames the class names + * @param manualStableClasses the stable classes + * @return a CodeAnalysisResult + * @throws ClassNotFoundException + * @throws FlexotaskValidationException + */ + protected final CodeAnalysisResult doValidation(String[] classNames, String[] manualStableClasses) + throws ClassNotFoundException, FlexotaskValidationException + { + Set flexotaskClasses = getFlexotaskClasses(classNames); + validator = new TestDevtimeCodeValidator(context); + validator.setStableMode(FlexotaskStableMode.MANUAL); + validator.setStableClasses(manualStableClasses); + return validator.validate(new NullProgressMonitor(), flexotaskClasses); + } + + /** + * Do validation on a set of class names using a particular stable mode. If the mode is manual, the manual + * class list is the same as the class names + * @param classNames the class names + * @param mode the stable mode + * @return a CodeAnalysisResult + * @throws ClassNotFoundException + * @throws FlexotaskValidationException + */ + protected final CodeAnalysisResult doValidation(String[] classNames, FlexotaskStableMode mode) + throws ClassNotFoundException, FlexotaskValidationException + { + Set flexotaskClasses = getFlexotaskClasses(classNames); + validator = new TestDevtimeCodeValidator(context); + validator.setStableMode(mode); + if (mode == FlexotaskStableMode.MANUAL) + validator.setStableClasses(classNames); + return validator.validate(new NullProgressMonitor(), flexotaskClasses); + } + + /** + * Do validation on a template + * @param template the template to validate + * @return a CodeAnalysisResult + * @throws ClassNotFoundException + * @throws FlexotaskValidationException + */ + protected final CodeAnalysisResult doValidation(FlexotaskTemplate template) throws ClassNotFoundException, FlexotaskValidationException { + Set flexotaskClasses = getFlexotaskClasses(template); + validator = new TestDevtimeCodeValidator(context, template); + return validator.validate(new NullProgressMonitor(), flexotaskClasses); + } +} Property changes on: trunk/flexotask-devtest/src/base/DevtimeCheckerTestCase.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/flexotask-devtest/src/base/RewriterTestCase.java =================================================================== --- trunk/flexotask-devtest/src/base/RewriterTestCase.java (rev 0) +++ trunk/flexotask-devtest/src/base/RewriterTestCase.java 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,120 @@ +/* + * This file is part of Flexible Task Graphs + * (http://sourceforge.net/projects/flexotasks) + * + * Copyright (c) 2006 - 2008 IBM Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + */ +package base; + +import java.io.File; +import java.io.FileOutputStream; +import java.util.Iterator; + +import org.eclipse.core.runtime.NullProgressMonitor; + +import com.ibm.realtime.flexotask.development.rewriting.CodeRewriteResult; +import com.ibm.realtime.flexotask.development.rewriting.RewrittenClass; +import com.ibm.realtime.flexotask.development.rewriting.TestCodeRewriter; +import com.ibm.realtime.flexotask.development.validation.CodeAnalysisResult; +import com.ibm.realtime.flexotask.template.FlexotaskStableMode; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; + +/** + * Base class for doing testing of the code rewriter. + */ +public abstract class RewriterTestCase extends DevtimeCheckerTestCase { + /** The code rewriter used for the test */ + protected TestCodeRewriter rewriter; + + protected void setUp() { + super.setUp(); + File genFolder = new File("generated"); + //if (genFolder.exists() && !delDirectory(genFolder)) { + // fail("Could not empty output folder for generated files."); + //} + } + + /** + * Deletes the contents of the directory provided, except the CVS directory + * @param dir + * @param delete + * @return + */ + private boolean delDirectory(File dir) { + if (dir.exists() && dir.isDirectory()) { + String[] children = dir.list(); + for (int i=0; i < children.length; i++) { + boolean success = delDirectory(new File(dir, children[i])); + if (!success) { + return false; + } + } + } + return dir.delete(); + } + + /** + * Do rewriting following a validation based on the flexotask classes, whose + * names are provided in the string array. + * + * @param classNames + * @return + * @throws Exception + */ + protected final CodeRewriteResult doRewriting(String[] classNames, FlexotaskStableMode mode) + throws Exception { + CodeAnalysisResult result = doValidation(classNames, mode); + rewriter = new TestCodeRewriter(context, result); + return rewriter.rewrite(new NullProgressMonitor()); + } + + protected final CodeRewriteResult doRewriting(FlexotaskTemplate template) + throws Exception { + CodeAnalysisResult result = doValidation(template); + rewriter = new TestCodeRewriter(context, result); + CodeRewriteResult res = rewriter.rewrite(new NullProgressMonitor()); + persistClasses(res); + return res; + } + + /** + * Persist the rewritten classes into the 'generated' output directory + * @param result + * @throws Exception + */ + protected void persistClasses(CodeRewriteResult result) throws Exception { + File genFolder = new File("generated"); + if (!genFolder.exists() && !genFolder.mkdir()) + throw new Exception("Output directory for generated files does not exist and could not be created."); + // loop through the rewritten classes and persist them + for (Iterator j = result.getRewrittenClasses().iterator(); j.hasNext(); ) { + RewrittenClass rc = (RewrittenClass) j.next(); + // create output path for rewritten class + String packageName = rc.getJavaClassName(); + packageName = packageName.substring(0, packageName.lastIndexOf('.') > 0 ? packageName.lastIndexOf('.') : 0); + + File packagePath = new File(genFolder, packageName.replace('.', File.separatorChar)); + if (!packagePath.exists()) + packagePath.mkdirs(); + + String filename = rc.getJavaClassName() + ".class"; + int pathNameLength = (int) packageName.length() + (packageName.length() > 0 ? 1 : 0); + filename = filename.substring(pathNameLength, filename.length()); + + File f = new File(packagePath, filename); + if (f.exists()) + f.delete(); + FileOutputStream baos = new FileOutputStream(f); + + rc.writeToStream(baos); + baos.flush(); + } + } +} Property changes on: trunk/flexotask-devtest/src/base/RewriterTestCase.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/rewriting/TestCodeRewriter.java =================================================================== --- trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/rewriting/TestCodeRewriter.java (rev 0) +++ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/rewriting/TestCodeRewriter.java 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,44 @@ +/* + * This file is part of Flexible Task Graphs + * (http://sourceforge.net/projects/flexotasks) + * + * Copyright (c) 2006 - 2008 IBM Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + */ +package com.ibm.realtime.flexotask.development.rewriting; + +import com.ibm.realtime.flexotask.development.builder.BuildException; +import com.ibm.realtime.flexotask.development.validation.CodeAnalysisResult; +import com.ibm.realtime.flexotask.validation.ValidationContext; + +/** + * Extends the rewriter to enable checking of internal state. + */ +public class TestCodeRewriter extends CodeRewriter { + /** The validation context used for the rewriting */ + private ValidationContext context; + + public TestCodeRewriter(ValidationContext context, + CodeAnalysisResult analysisResult) throws BuildException { + super(context, analysisResult); + this.context = context; + } + + /** + * Returns true if the list of generated guard classes contains a guard class + * for the class having the provided name, otherwise false. + * @param className + * @return + * @throws Exception + */ + public boolean hasGuardForClass(String className) throws Exception { + Class c = context.getClassLoader().loadClass(className); + return guardClasses.containsKey(c); + } +} Property changes on: trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/rewriting/TestCodeRewriter.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/validation/TestDevtimeCodeValidator.java =================================================================== --- trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/validation/TestDevtimeCodeValidator.java (rev 0) +++ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/validation/TestDevtimeCodeValidator.java 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,70 @@ +/* + * This file is part of Flexible Task Graphs + * (http://sourceforge.net/projects/flexotasks) + * + * Copyright (c) 2006 - 2008 IBM Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + */ +package com.ibm.realtime.flexotask.development.validation; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.runtime.IProgressMonitor; + +import com.ibm.realtime.flexotask.template.FlexotaskStableMode; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskValidationException; +import com.ibm.realtime.flexotask.validation.ValidationContext; + +/** + * Extends the devtime code validator to enable checking of internal state. + */ +public class TestDevtimeCodeValidator extends DevtimeCodeValidator { + public TestDevtimeCodeValidator(ValidationContext context) { + super(context); + } + + public TestDevtimeCodeValidator(ValidationContext context, FlexotaskTemplate template) + throws FlexotaskValidationException { + super(context, template); + } + + public CodeAnalysisResult validate(IProgressMonitor monitor, + Set flexotaskClasses) throws FlexotaskValidationException { + return super.validate(monitor, flexotaskClasses); + } + + public void setStableMode(FlexotaskStableMode sm) { + stableMode = sm; + } + + /** + * Returns true if the class with the provided class name is contained in the + * provided set, otherwise false. Used to test if devtime checker has found + * the expected classes and put them into the right categories. + * @param set + * @param className + * @return + * @throws Exception + */ + public boolean isClassContainedInSet(Set set, String className) + throws Exception { + Class c = context.getClassLoader().loadClass(className); + return set.contains(c); + } + + public void setStableClasses(String[] classNames) throws ClassNotFoundException { + Set sClasses = new HashSet(); + for (int i = 0; i < classNames.length; i++) { + sClasses.add(Class.forName(classNames[i])); + } + this.stableClasses = sClasses; + } +} Property changes on: trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/development/validation/TestDevtimeCodeValidator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/system/TestCodeValidator.java =================================================================== --- trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/system/TestCodeValidator.java (rev 0) +++ trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/system/TestCodeValidator.java 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,43 @@ +/* + * This file is part of Flexible Task Graphs + * (http://sourceforge.net/projects/flexotasks) + * + * Copyright (c) 2006 - 2008 IBM Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + */ +package com.ibm.realtime.flexotask.system; + +import java.util.Map; + +import com.ibm.realtime.flexotask.distribution.FlexotaskDistributer; +import com.ibm.realtime.flexotask.template.FlexotaskStableMode; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskValidationException; + +/** + * Extends the inittime code validator to enable checking of internal state. + */ +public class TestCodeValidator extends CodeValidator { + public TestCodeValidator(FlexotaskTemplate template) + throws FlexotaskValidationException { + super(template); + } + + public Object[] validate(Map initializationMap) throws FlexotaskValidationException { + return super.validate(initializationMap, new FlexotaskDistributer.LocalTimerService()); + } + + /** + * Used to set the stable mode, when checking orphan flexotasks + * @param mode the stable mode + */ + public void setStableMode(FlexotaskStableMode mode) { + stableMode = mode; + } +} Property changes on: trunk/flexotask-devtest/src/com/ibm/realtime/flexotask/system/TestCodeValidator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/flexotask-devtest/src/testall/AllDevtimeCheckerTests.java =================================================================== --- trunk/flexotask-devtest/src/testall/AllDevtimeCheckerTests.java (rev 0) +++ trunk/flexotask-devtest/src/testall/AllDevtimeCheckerTests.java 2008-10-27 16:15:09 UTC (rev 43) @@ -0,0 +1,27 @@ +/* + * This file is part of Flexible Task Graphs + * (http://sourceforge.net/projects/flexota... [truncated message content] |