From 7e0988806a87b1394ca4403709e1a98bc328aaa6 Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 28 Jun 2010 01:48:52 +0000 Subject: [PATCH] fixes to make the size() method work properly, other preproc bits --- .../core/.settings/org.eclipse.jdt.core.prefs | 602 ++++++++++-------- android/core/src/processing/core/PApplet.java | 335 ++++++---- android/tool/.classpath | 1 + .../app/tools/android/AndroidEnvironment.java | 29 +- .../processing/app/tools/android/Build.java | 102 ++- .../app/preproc/PdePreprocessor.java | 8 +- todo.txt | 17 +- 7 files changed, 632 insertions(+), 462 deletions(-) diff --git a/android/core/.settings/org.eclipse.jdt.core.prefs b/android/core/.settings/org.eclipse.jdt.core.prefs index b1565cec8..18842e30a 100644 --- a/android/core/.settings/org.eclipse.jdt.core.prefs +++ b/android/core/.settings/org.eclipse.jdt.core.prefs @@ -1,270 +1,332 @@ -#Thu Mar 04 09:10:39 EST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -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.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=20 -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=36 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 -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_import_groups=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.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.format_block_comments=false -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_javadoc_comments=false -org.eclipse.jdt.core.formatter.comment.format_line_comments=false -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=false -org.eclipse.jdt.core.formatter.indentation.size=2 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not 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=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_parenthesized_expression_in_throw=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.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -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.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -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=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=2 -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +#Sun Jun 27 10:56:40 EDT 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +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.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=ignore +org.eclipse.jdt.core.compiler.problem.deadCode=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.enumIdentifier=error +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.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +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=warning +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=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=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=warning +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.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +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.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=20 +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=36 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 +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_import_groups=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.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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_javadoc_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +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=false +org.eclipse.jdt.core.formatter.indentation.size=2 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not 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=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_parenthesized_expression_in_throw=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.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +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.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +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=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true diff --git a/android/core/src/processing/core/PApplet.java b/android/core/src/processing/core/PApplet.java index dc84e7467..4653d1d77 100644 --- a/android/core/src/processing/core/PApplet.java +++ b/android/core/src/processing/core/PApplet.java @@ -42,8 +42,7 @@ import java.util.zip.*; import android.app.Activity; import android.net.Uri; import android.text.format.Time; -import android.util.DisplayMetrics; -import android.util.Log; +import android.util.*; import android.view.SurfaceView; import android.opengl.GLSurfaceView; import android.view.WindowManager; @@ -51,6 +50,8 @@ import android.os.Bundle; import android.os.Handler; //import android.os.Looper; import android.view.*; +//import android.view.ViewGroup.LayoutParams; +import android.widget.LinearLayout; import android.widget.RelativeLayout; @@ -214,7 +215,6 @@ public class PApplet extends Activity implements PConstants, Runnable { /** Post events to the main thread that created the Activity */ Handler handler; - /** * Last key pressed. *

@@ -309,7 +309,6 @@ public class PApplet extends Activity implements PConstants, Runnable { protected boolean paused; protected SurfaceView surfaceView; - protected SurfaceHolder surfaceHolder; /** * The Window object for Android. @@ -391,8 +390,8 @@ public class PApplet extends Activity implements PConstants, Runnable { ////////////////////////////////////////////////////////////// -// ViewGroup viewGroup; - RelativeLayout layout; + RelativeLayout overallLayout; + LinearLayout layout; /** Called with the activity is first created. */ @Override @@ -417,8 +416,8 @@ public class PApplet extends Activity implements PConstants, Runnable { getWindowManager().getDefaultDisplay().getMetrics(dm); screenWidth = dm.widthPixels; screenHeight = dm.heightPixels; - println("density is " + dm.density); - println("densityDpi is " + dm.densityDpi); +// println("density is " + dm.density); +// println("densityDpi is " + dm.densityDpi); println(dm); //println("screen size is " + screenWidth + "x" + screenHeight); @@ -429,22 +428,63 @@ public class PApplet extends Activity implements PConstants, Runnable { // surfaceView.setLayoutParams(); // viewGroup.setLayoutParams(LayoutParams.) // RelativeLayout layout = new RelativeLayout(this); - layout = new RelativeLayout(this); - layout.setGravity(RelativeLayout.CENTER_IN_PARENT); +// RelativeLayout overallLayout = new RelativeLayout(this); + overallLayout = new RelativeLayout(this); +// RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.FILL_PARENT); +//lp.addRule(RelativeLayout.RIGHT_OF, tv1.getId()); +// layout.setGravity(RelativeLayout.CENTER_IN_PARENT); if (sketchRenderer().equals(A2D)) { - surfaceView = new SketchSurfaceView2D(this); + surfaceView = new SketchSurfaceView2D(this, sketchWidth(), sketchHeight()); } else if (sketchRenderer().equals(A3D)) { - surfaceView = new SketchSurfaceView3D(this); + surfaceView = new SketchSurfaceView3D(this, sketchWidth(), sketchHeight()); } + g = ((SketchSurfaceView) surfaceView).getGraphics(); +// surfaceView.setLayoutParams(new LayoutParams(sketchWidth(), sketchHeight())); - layout.addView(surfaceView); +// layout.addView(surfaceView); +// surfaceView.setVisibility(1); +// println("visibility " + surfaceView.getVisibility() + " " + SurfaceView.VISIBLE); +// layout.addView(surfaceView); +// AttributeSet as = new AttributeSet(); +// RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(layout, as); + + RelativeLayout.LayoutParams lp = + new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, + RelativeLayout.LayoutParams.WRAP_CONTENT); + lp.addRule(RelativeLayout.CENTER_IN_PARENT); - width = screenWidth; - height = screenHeight; +// lp.addRule(android.R.styleable.ViewGroup_Layout_layout_height, +// layout.add + //lp.addRule(, arg1) + //layout.addView(surfaceView, sketchWidth(), sketchHeight()); + +// new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, +// RelativeLayout.LayoutParams.FILL_PARENT); + layout = new LinearLayout(this); + layout.addView(surfaceView, sketchWidth(), sketchHeight()); + overallLayout.addView(layout, lp); + +// layout.addView(surfaceView, lp); +// surfaceView.setLayoutParams(new LayoutParams(sketchWidth(), sketchHeight())); + +// RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams() +// layout.addView(surfaceView, new LayoutParams(arg0) + + // TODO probably don't want to set these here, can't we wait for surfaceChanged()? + // removing this in 0187 +// width = screenWidth; +// height = screenHeight; + +// int left = (screenWidth - iwidth) / 2; +// int right = screenWidth - (left + iwidth); +// int top = (screenHeight - iheight) / 2; +// int bottom = screenHeight - (top + iheight); +// surfaceView.setPadding(left, top, right, bottom); + // android:layout_width // window.setContentView(surfaceView); // set full screen - window.setContentView(layout); + window.setContentView(overallLayout); // code below here formerly from init() @@ -533,22 +573,130 @@ public class PApplet extends Activity implements PConstants, Runnable { // ANDROID SURFACE VIEW + // TODO this is only used by A2D, when finishing up a draw. but if the + // surfaceview has changed, then it might belong to an a3d surfaceview. hrm. public SurfaceHolder getSurfaceHolder() { - //return surfaceView.getHolder(); - return surfaceHolder; + return surfaceView.getHolder(); +// return surfaceHolder; } + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + public interface SketchSurfaceView { public PGraphics getGraphics(); } + + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + public class SketchSurfaceView2D extends SurfaceView + implements SketchSurfaceView, SurfaceHolder.Callback { + PGraphicsAndroid2D g2; + SurfaceHolder surfaceHolder; + + + public SketchSurfaceView2D(Context context, int wide, int high) { + super(context); + +// println("surface holder"); + // Install a SurfaceHolder.Callback so we get notified when the + // underlying surface is created and destroyed + surfaceHolder = getHolder(); + surfaceHolder.addCallback(this); + surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_GPU); + +// println("creating graphics"); + g2 = new PGraphicsAndroid2D(); + // Set semi-arbitrary size; will be set properly when surfaceChanged() called + g2.setSize(wide, high); +// newGraphics.setSize(getWidth(), getHeight()); + g2.setParent(PApplet.this); + g2.setPrimary(true); + // Set the value for 'g' once everything is ready (otherwise rendering + // may attempt before setSize(), setParent() etc) +// g = newGraphics; + +// println("setting focusable, requesting focus"); + setFocusable(true); + setFocusableInTouchMode(true); + requestFocus(); +// println("done making surface view"); + } + + + public PGraphics getGraphics() { + return g2; + } + + + // part of SurfaceHolder.Callback + public void surfaceCreated(SurfaceHolder holder) { + } + + + // part of SurfaceHolder.Callback + public void surfaceDestroyed(SurfaceHolder holder) { + g2.dispose(); + } + + + // part of SurfaceHolder.Callback + public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { + System.out.println("SketchSurfaceView2D.surfaceChanged() " + w + " " + h); + surfaceChanged = true; + +// width = w; +// height = h; +// +// g.setSize(w, h); + } + + + @Override + public void onWindowFocusChanged(boolean hasFocus) { + surfaceWindowFocusChanged(hasFocus); + } + + + @Override + public boolean onTouchEvent(MotionEvent event) { + return surfaceTouchEvent(event); + } + + + @Override + public boolean onKeyDown(int code, KeyEvent event) { + return surfaceKeyDown(code, event); + } + + + @Override + public boolean onKeyUp(int code, KeyEvent event) { + return surfaceKeyUp(code, event); + } + + + // don't think i want to call stop() from here, since it might be swapping renderers +// @Override +// protected void onDetachedFromWindow() { +// super.onDetachedFromWindow(); +// stop(); +// } + } + + + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + public class SketchSurfaceView3D extends GLSurfaceView implements SketchSurfaceView { PGraphicsAndroid3D g3; + SurfaceHolder surfaceHolder; - public SketchSurfaceView3D(Context context) { + public SketchSurfaceView3D(Context context, int wide, int high) { super(context); surfaceHolder = getHolder(); // are these two needed? @@ -573,7 +721,7 @@ public class PApplet extends Activity implements PConstants, Runnable { // before surfaceChanged() is ever called. g3 = new PGraphicsAndroid3D(); // Set semi-arbitrary size; will be set properly when surfaceChanged() called - g3.setSize(screenWidth, screenHeight); + g3.setSize(wide, high); g3.setParent(PApplet.this); g3.setPrimary(true); // g = newGraphics; @@ -674,104 +822,7 @@ public class PApplet extends Activity implements PConstants, Runnable { } - public class SketchSurfaceView2D extends SurfaceView implements SurfaceHolder.Callback { - PGraphicsAndroid2D g2; - - - public SketchSurfaceView2D(Context context) { - super(context); - -// println("surface holder"); - // Install a SurfaceHolder.Callback so we get notified when the - // underlying surface is created and destroyed - surfaceHolder = getHolder(); - surfaceHolder.addCallback(this); - surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_GPU); - -// println("creating graphics"); - g2 = new PGraphicsAndroid2D(); - // Set semi-arbitrary size; will be set properly when surfaceChanged() called - g2.setSize(screenWidth, screenHeight); -// newGraphics.setSize(getWidth(), getHeight()); - g2.setParent(PApplet.this); - g2.setPrimary(true); - // Set the value for 'g' once everything is ready (otherwise rendering - // may attempt before setSize(), setParent() etc) -// g = newGraphics; - -// println("setting focusable, requesting focus"); - setFocusable(true); - setFocusableInTouchMode(true); - requestFocus(); -// println("done making surface view"); - } - - - public PGraphics getGraphics() { - return g2; - } - - - // part of SurfaceHolder.Callback - public void surfaceCreated(SurfaceHolder holder) { - } - - - // part of SurfaceHolder.Callback - public void surfaceDestroyed(SurfaceHolder holder) { - g2.dispose(); - } - - - // part of SurfaceHolder.Callback - public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { - System.out.println("SketchSurfaceView2D.surfaceChanged() " + w + " " + h); - surfaceChanged = true; - -// width = w; -// height = h; -// -// g.setSize(w, h); - } - - - /** - * Inform the view that the window focus has changed. - */ - @Override - public void onWindowFocusChanged(boolean hasFocus) { - surfaceWindowFocusChanged(hasFocus); - } - - - @Override - public boolean onTouchEvent(MotionEvent event) { - return surfaceTouchEvent(event); - } - - - @Override - public boolean onKeyDown(int code, KeyEvent event) { - return surfaceKeyDown(code, event); - } - - - @Override - public boolean onKeyUp(int code, KeyEvent event) { - return surfaceKeyUp(code, event); - } - - - // don't think i want to call stop() from here, since it might be swapping renderers -// @Override -// protected void onDetachedFromWindow() { -// super.onDetachedFromWindow(); -// stop(); -// } - } - - - // versions of these inside PApplet + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . /** @@ -794,6 +845,7 @@ public class PApplet extends Activity implements PConstants, Runnable { * then motionX, motionY, motionPressed, and motionEvent will not be set. */ public boolean surfaceTouchEvent(MotionEvent event) { +// println(event); checkMotionEvent(event); //return super.onTouchEvent(event); return true; @@ -814,9 +866,7 @@ public class PApplet extends Activity implements PConstants, Runnable { } - ////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////// + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . public int sketchWidth() { @@ -839,7 +889,10 @@ public class PApplet extends Activity implements PConstants, Runnable { // //setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); // } + + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + /** * Called by the browser or applet viewer to inform this applet that it * should start its execution. It is called after the init method and @@ -1144,15 +1197,17 @@ public class PApplet extends Activity implements PConstants, Runnable { protected void resizeRenderer(int iwidth, int iheight) { // println("resizeRenderer request for " + iwidth + " " + iheight); if (width != iwidth || height != iheight) { - int left = (screenWidth - iwidth) / 2; - int right = screenWidth - (left + iwidth); - int top = (screenHeight - iheight) / 2; - int bottom = screenHeight - (top + iheight); - surfaceView.setPadding(left, top, right, bottom); +// int left = (screenWidth - iwidth) / 2; +// int right = screenWidth - (left + iwidth); +// int top = (screenHeight - iheight) / 2; +// int bottom = screenHeight - (top + iheight); +// surfaceView.setPadding(left, top, right, bottom); g.setSize(iwidth, iheight); width = iwidth; height = iheight; + overallLayout.invalidate(); + layout.invalidate(); } } @@ -1243,20 +1298,26 @@ public class PApplet extends Activity implements PConstants, Runnable { // width = iwidth; // height = iheight; // if () - + + // Remove the old view from the layout + layout.removeView(surfaceView); + if (irenderer.equals(A2D)) { - surfaceView = new SketchSurfaceView2D(PApplet.this); + surfaceView = new SketchSurfaceView2D(PApplet.this, iwidth, iheight); } else if (irenderer.equals(A3D)) { - surfaceView = new SketchSurfaceView3D(PApplet.this); + surfaceView = new SketchSurfaceView3D(PApplet.this, iwidth, iheight); } g = ((SketchSurfaceView) surfaceView).getGraphics(); - width = screenWidth; - height = screenHeight; + // these don't seem like a good idea +// width = screenWidth; +// height = screenHeight; - println("getting window"); - Window window = getWindow(); - window.setContentView(surfaceView); // set full screen +// println("getting window"); +// Window window = getWindow(); +// window.setContentView(surfaceView); // set full screen +// layout.removeAllViews(); + layout.addView(surfaceView); // fire resize event to make sure the applet is the proper size // setSize(iwidth, iheight); @@ -1508,8 +1569,6 @@ public class PApplet extends Activity implements PConstants, Runnable { /** * Main method for the primary animation thread. - * - * Painting in AWT and Swing */ public void run() { // not good to make this synchronized, locks things up long beforeTime = System.nanoTime(); @@ -1590,6 +1649,7 @@ public class PApplet extends Activity implements PConstants, Runnable { public void handleDraw() { +// println("inside handleDraw() " + millis()); if (surfaceChanged) { int newWidth = surfaceView.getWidth(); int newHeight = surfaceView.getHeight(); @@ -1957,8 +2017,10 @@ public class PApplet extends Activity implements PConstants, Runnable { // if someone else wants to intercept the key, they should // set key to zero (or something besides the "ESC"). +// println(event); if (action == KeyEvent.ACTION_DOWN) { if (key == KeyEvent.KEYCODE_BACK) { +// println("KEYCODE_BACK, calling exit()"); exit(); } } @@ -2308,6 +2370,7 @@ public class PApplet extends Activity implements PConstants, Runnable { * to render a single frame, save it, and quit. */ public void exit() { + println("exit() called"); if (thread == null) { // exit immediately, stop() has already been called, // meaning that the main thread has long since exited diff --git a/android/tool/.classpath b/android/tool/.classpath index f72c393c7..9df929025 100644 --- a/android/tool/.classpath +++ b/android/tool/.classpath @@ -5,5 +5,6 @@ + diff --git a/android/tool/src/processing/app/tools/android/AndroidEnvironment.java b/android/tool/src/processing/app/tools/android/AndroidEnvironment.java index c28a28088..164900275 100644 --- a/android/tool/src/processing/app/tools/android/AndroidEnvironment.java +++ b/android/tool/src/processing/app/tools/android/AndroidEnvironment.java @@ -12,7 +12,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; -import processing.app.EditorConsole; +//import processing.app.EditorConsole; import processing.app.exec.ProcessResult; import processing.app.tools.android.EmulatorController.State; @@ -41,7 +41,7 @@ class AndroidEnvironment { public static void killAdbServer() { - // System.err.print("Shutting down any existing adb server..."); + System.err.println("Shutting down any existing adb server..."); System.err.flush(); try { AndroidSDK.runADB("kill-server"); @@ -55,8 +55,8 @@ class AndroidEnvironment { private AndroidEnvironment() { - // System.err.println("Starting up AndroidEnvironment"); - killAdbServer(); + System.out.println("Starting up AndroidEnvironment"); +// killAdbServer(); Runtime.getRuntime().addShutdownHook( new Thread("AndroidEnvironment Shutdown") { @Override @@ -66,11 +66,10 @@ class AndroidEnvironment { }); } - + private void shutdown() { - // System.err.println("Shutting down AndroidEnvironment"); - for (final AndroidDevice device : new ArrayList(devices - .values())) { + System.out.println("Shutting down AndroidEnvironment"); + for (AndroidDevice device : new ArrayList(devices.values())) { device.shutdown(); } killAdbServer(); @@ -83,8 +82,8 @@ class AndroidEnvironment { return blockingGetEmulator(); } }; - final FutureTask task = new FutureTask( - androidFinder); + final FutureTask task = + new FutureTask(androidFinder); deviceLaunchThread.execute(task); return task; } @@ -233,9 +232,9 @@ class AndroidEnvironment { public static List listDevices() { ProcessResult result; try { - System.out.println("listing devices 00"); +// System.out.println("listing devices 00"); result = AndroidSDK.runADB("devices"); - System.out.println("listing devices 05"); +// System.out.println("listing devices 05"); } catch (InterruptedException e) { return Collections.emptyList(); } catch (IOException e) { @@ -245,7 +244,7 @@ class AndroidEnvironment { // e.printStackTrace(EditorConsole.systemErr); return Collections.emptyList(); } - System.out.println("listing devices 10"); +// System.out.println("listing devices 10"); if (!result.succeeded()) { if (result.getStderr().contains("protocol fault (no status)")) { System.err.println("bleh: " + result); // THIS IS WORKING @@ -254,7 +253,7 @@ class AndroidEnvironment { } return Collections.emptyList(); } - System.out.println("listing devices 20"); +// System.out.println("listing devices 20"); // might read "List of devices attached" final String stdout = result.getStdout(); @@ -263,7 +262,7 @@ class AndroidEnvironment { return Collections.emptyList(); } - System.out.println("listing devices 30"); +// System.out.println("listing devices 30"); final List devices = new ArrayList(); for (final String line : result) { if (!line.contains("\t")) { diff --git a/android/tool/src/processing/app/tools/android/Build.java b/android/tool/src/processing/app/tools/android/Build.java index 79856f65d..0b8357745 100644 --- a/android/tool/src/processing/app/tools/android/Build.java +++ b/android/tool/src/processing/app/tools/android/Build.java @@ -6,10 +6,14 @@ import java.util.*; import org.apache.tools.ant.*; +import antlr.RecognitionException; +import antlr.TokenStreamException; + import processing.app.*; import processing.app.exec.*; import processing.app.debug.RunnerException; import processing.app.preproc.PdePreprocessor; +import processing.app.preproc.PreprocessResult; import processing.core.PApplet; @@ -22,58 +26,63 @@ class Build { private final AndroidSDK sdk; String className; - File tempBuildFolder; - File buildFile; static final String sdkVersion = "7"; + String sketchSize; + String sketchWidth = "screenWidth"; + String sketchHeight = "screenHeight"; + String sketchRenderer = "A2D"; + + public Build(final Editor editor, final AndroidSDK sdk) { this.editor = editor; this.sdk = sdk; } - // TODO this needs to be a generic function inside Sketch or elsewhere - /* - protected int[] getSketchSize() { - int wide = AVD.DEFAULT_WIDTH; - int high = AVD.DEFAULT_HEIGHT; - // String renderer = ""; + // TODO this needs to be a generic function inside Sketch or elsewhere + protected boolean calcSketchSize() { // This matches against any uses of the size() function, whether numbers // or variables or whatever. This way, no warning is shown if size() isn't // actually used in the applet, which is the case especially for anyone // who is cutting/pasting from the reference. - final String sizeRegex = "(?:^|\\s|;)size\\s*\\(\\s*(\\S+)\\s*,\\s*(\\d+),?\\s*([^\\)]*)\\s*\\)"; + final String sizeRegex = + "(?:^|\\s|;)size\\s*\\(\\s*(\\S+)\\s*,\\s*(\\d+),?\\s*([^\\)]*)\\s*\\)\\s*\\;"; +// "(?:^|\\s|;)size\\s*\\(\\s*(\\S+)\\s*,\\s*(\\d+),?\\s*([^\\)]*)\\s*\\)"; + // This is identical to the version in Sketch.java, but adds the semicolon - final Sketch sketch = editor.getSketch(); - final String scrubbed = Sketch - .scrubComments(sketch.getCode(0).getProgram()); - final String[] matches = PApplet.match(scrubbed, sizeRegex); + Sketch sketch = editor.getSketch(); + String scrubbed = Sketch.scrubComments(sketch.getCode(0).getProgram()); + String[] matches = PApplet.match(scrubbed, sizeRegex); if (matches != null) { try { - wide = Integer.parseInt(matches[1]); - high = Integer.parseInt(matches[2]); - - // Adding back the trim() for 0136 to handle Bug #769 - // if (matches.length == 4) renderer = matches[3].trim(); - + // these are ignored, just checking for the exception + Integer.parseInt(matches[1]); + Integer.parseInt(matches[2]); } catch (final NumberFormatException e) { // found a reference to size, but it didn't // seem to contain numbers - final String message = "The size of this applet could not automatically be\n" - + "determined from your code.\n" - + "Use only numeric values (not variables) for the size()\n" - + "command. See the size() reference for an explanation."; - + final String message = + "The size of this applet could not automatically be\n" + + "determined from your code.\n" + + "Use only numeric values (not variables) for the size()\n" + + "command. See the size() reference for an explanation."; Base.showWarning("Could not find sketch size", message, null); + return false; + } + sketchSize = matches[0]; + sketchWidth = matches[1]; + sketchHeight = matches[2]; + if (matches[3].trim().length() != 0) { + sketchRenderer = matches[3]; } } - return new int[] { wide, high }; + return true; } - */ public File createProject() { @@ -104,6 +113,10 @@ class Build { // grab code from current editing window sketch.prepare(); + if (!calcSketchSize()) { + editor.statusError("Could not parse the size() command."); + return null; + } className = sketch.preprocess(buildPath, new Preproc(sketch.getName())); if (className != null) { final File androidXML = new File(tempBuildFolder, "AndroidManifest.xml"); @@ -118,8 +131,8 @@ class Build { final File libsFolder = mkdirs(tempBuildFolder, "libs"); final File assetsFolder = mkdirs(tempBuildFolder, "assets"); - final InputStream input = PApplet.createInput(AndroidTool - .getCoreZipLocation()); + final InputStream input = + PApplet.createInput(AndroidTool.getCoreZipLocation()); PApplet.saveStream(new File(libsFolder, "processing-core.jar"), input); try { @@ -333,6 +346,16 @@ class Build { super(sketchName); } + public PreprocessResult write(Writer out, String program, String codeFolderPackages[]) + throws RunnerException, RecognitionException, TokenStreamException { + if (sketchSize != null) { + int start = program.indexOf(sketchSize); + program = program.substring(0, start) + + program.substring(start + sketchSize.length()); + } + return super.write(out, program, codeFolderPackages); + } + @Override protected int writeImports(final PrintWriter out, final List programImports, @@ -342,10 +365,31 @@ class Build { // add two lines for the package above return 2 + super.writeImports(out, programImports, codeFolderImports); } + + protected void writeFooter(PrintWriter out, String className) { + if (mode == Mode.STATIC) { + // close off draw() definition + out.println("noLoop();"); + out.println(indent + "}"); + } + + if ((mode == Mode.STATIC) || (mode == Mode.ACTIVE)) { + out.println(); + out.println(indent + "public int sketchWidth() { return " + sketchWidth + "; }"); + out.println(indent + "public int sketchHeight() { return " + sketchHeight + "; }"); + out.println(indent + "public String sketchRenderer() { return " + sketchRenderer + "; }"); + + // close off the class definition + out.println("}"); + } + } @Override public String[] getCoreImports() { - return new String[] { "processing.core.*", "processing.xml.*" }; + return new String[] { + "processing.core.*", + "processing.xml.*" + }; } @Override diff --git a/app/src/processing/app/preproc/PdePreprocessor.java b/app/src/processing/app/preproc/PdePreprocessor.java index 606500a35..65dcbda6b 100644 --- a/app/src/processing/app/preproc/PdePreprocessor.java +++ b/app/src/processing/app/preproc/PdePreprocessor.java @@ -151,7 +151,7 @@ public class PdePreprocessor implements PdeTokenTypes { // used for calling the ASTFactory to get the root node private static final int ROOT_ID = 0; - private final String indent; + protected final String indent; private final String name; public static enum Mode { @@ -176,7 +176,7 @@ public class PdePreprocessor implements PdeTokenTypes { this.advClassName = advClassName; } - private Mode mode; + protected Mode mode; public void setMode(final Mode mode) { // System.err.println("Setting program type to " + programType); @@ -291,8 +291,8 @@ public class PdePreprocessor implements PdeTokenTypes { return write(out, program, null); } - public PreprocessResult write(final Writer out, String program, - final String codeFolderPackages[]) + public PreprocessResult write(Writer out, String program, + String codeFolderPackages[]) throws RunnerException, RecognitionException, TokenStreamException { // these ones have the .* at the end, since a class name might be at the end diff --git a/todo.txt b/todo.txt index 8bec56d2e..ebb46e75f 100644 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,13 @@ 0187 pde +X don't require an editor window to be open at all times +X The com.apple.eawt.Application now has a setDefaultMenuBar(JMenuBar) method +X that sets a default menu bar when no other Frames are open. +X could check for availability of method +X and if it's there, don't require people to quit +X Prevent horizontal scroll offset from disappearing +X http://code.google.com/p/processing/issues/detail?id=280 +o horizontal scroller gets weird sometimes +o http://dev.processing.org/bugs/show_bug.cgi?id=23 'public class' inside first tab (or 'final int a = 10') throws off mode detect @@ -9,12 +18,6 @@ _ so user thinks nothing is happening and overundo. _ http://dev.processing.org/bugs/show_bug.cgi?id=35 _ http://code.google.com/p/processing/issues/detail?id=15 -_ don't require an editor window to be open at all times -_ The com.apple.eawt.Application now has a setDefaultMenuBar(JMenuBar) method -_ that sets a default menu bar when no other Frames are open. -_ could check for availability of method -_ and if it's there, don't require people to quit -The com.apple.eawt.Application now has a setDefaultMenuBar(JFrame) method that sets a default menu bar in your application when no other Frames are open. This feature requires your app to use both the Aqua Look and Feel and apple.laf.useScreenMenuBar=true property to hook up the native menu bar delegates correctly. This long-requested feature should remove the need to create an invisible or offscreen window to simulate the appearance of a true "default" menu bar. closing this bug, because we'll be replacing the current video library with another sometime later this summer. as such, i won't be doing any more bug fixes on the current video library. in the meantime, we recommend using gsvideo, opencv, or one of the other video libraries that are available. @@ -845,8 +848,6 @@ _ to overwrite. i.e. make a change and save in external editor, _ don't actually _ when running with external editor, hide the editor text area _ http://dev.processing.org/bugs/show_bug.cgi?id=20 -_ horizontal scroller gets weird sometimes -_ http://dev.processing.org/bugs/show_bug.cgi?id=23 _ add mnemonics for menus (alt-f to open 'file') _ http://dev.processing.org/bugs/show_bug.cgi?id=26 _ option to just print all code in project