Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 150750 Details for
Bug 293598
improve xlc scanner info support and backport v10.1 support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch - ignore the non-CDT parts
rdt_2_1_scanner_disc.patch.txt (text/plain), 232.26 KB, created by
Chris Recoskie
on 2009-10-28 13:00:34 EDT
(
hide
)
Description:
patch - ignore the non-CDT parts
Filename:
MIME Type:
Creator:
Chris Recoskie
Created:
2009-10-28 13:00:34 EDT
Size:
232.26 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.managedbuilder.xlc.core >Index: .settings/org.eclipse.jdt.core.prefs >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.core/.settings/org.eclipse.jdt.core.prefs,v >retrieving revision 1.1 >diff -u -r1.1 org.eclipse.jdt.core.prefs >--- .settings/org.eclipse.jdt.core.prefs 21 Jan 2008 20:15:58 -0000 1.1 >+++ .settings/org.eclipse.jdt.core.prefs 28 Oct 2009 16:52:46 -0000 >@@ -1,248 +1,5 @@ >-#Thu Oct 04 14:01:35 BRT 2007 >+#Tue Sep 29 13:43:50 EDT 2009 > eclipse.preferences.version=1 >-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=1 >-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.clear_blank_lines=false > org.eclipse.jdt.core.formatter.comment.format_comments=true >-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=false >-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=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=1 >-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true >-org.eclipse.jdt.core.formatter.tabulation.char=tab >-org.eclipse.jdt.core.formatter.tabulation.size=4 >-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false >Index: .settings/org.eclipse.jdt.ui.prefs >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.core/.settings/org.eclipse.jdt.ui.prefs,v >retrieving revision 1.1 >diff -u -r1.1 org.eclipse.jdt.ui.prefs >--- .settings/org.eclipse.jdt.ui.prefs 21 Jan 2008 20:15:57 -0000 1.1 >+++ .settings/org.eclipse.jdt.ui.prefs 28 Oct 2009 16:52:46 -0000 >@@ -1,6 +1,5 @@ >-#Thu Oct 04 14:01:35 BRT 2007 >+#Tue Sep 29 13:43:50 EDT 2009 > eclipse.preferences.version=1 >-formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile >-formatter_settings_version=10 >+formatter_settings_version=11 > internal.default.compliance=default > org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.core/META-INF/MANIFEST.MF,v >retrieving revision 1.4 >diff -u -r1.4 MANIFEST.MF >--- META-INF/MANIFEST.MF 28 Jan 2008 18:27:49 -0000 1.4 >+++ META-INF/MANIFEST.MF 28 Oct 2009 16:52:46 -0000 >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName > Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.xlc.core;singleton:=true >-Bundle-Version: 5.0.0.qualifier >+Bundle-Version: 5.0.3.qualifier > Bundle-Vendor: %providerName > Bundle-Localization: plugin > Require-Bundle: org.eclipse.cdt.managedbuilder.core, >#P org.eclipse.ptp.remote.core >Index: src/org/eclipse/ptp/remote/core/IRemoteProcessBuilder.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core/IRemoteProcessBuilder.java,v >retrieving revision 1.1 >diff -u -r1.1 IRemoteProcessBuilder.java >--- src/org/eclipse/ptp/remote/core/IRemoteProcessBuilder.java 22 Jul 2008 21:37:34 -0000 1.1 >+++ src/org/eclipse/ptp/remote/core/IRemoteProcessBuilder.java 28 Oct 2009 16:52:47 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007 IBM Corporation and others. >+ * Copyright (c) 2007, 2009 IBM Corporation and others. > * 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 >@@ -62,6 +62,13 @@ > * @return an IFileStore reference to the working directory > */ > public abstract IFileStore directory(); >+ >+ /** >+ * Returns the user's home directory on the target system. >+ * >+ * @return IFileStore corresponding to the location, or <code>null</code> if the home directory cannot be determined. >+ */ >+ public abstract IFileStore getHomeDirectory(); > > /** > * Sets this process builder's working directory. >Index: src/org/eclipse/ptp/remote/core/AbstractRemoteProcessBuilder.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core/AbstractRemoteProcessBuilder.java,v >retrieving revision 1.1 >diff -u -r1.1 AbstractRemoteProcessBuilder.java >--- src/org/eclipse/ptp/remote/core/AbstractRemoteProcessBuilder.java 22 Jul 2008 21:37:34 -0000 1.1 >+++ src/org/eclipse/ptp/remote/core/AbstractRemoteProcessBuilder.java 28 Oct 2009 16:52:47 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007 IBM Corporation and others. >+ * Copyright (c) 2007, 2009 IBM Corporation and others. > * 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 >@@ -78,6 +78,13 @@ > public IFileStore directory() { > return remoteDir; > } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ptp.remote.core.IRemoteProcessBuilder#getHomeDirectory() >+ */ >+ public IFileStore getHomeDirectory() { >+ return null; >+ } > > /* (non-Javadoc) > * @see org.eclipse.ptp.remote.core.IRemoteProcessBuilder#directory(org.eclipse.core.filesystem.IFileStore) >Index: src/org/eclipse/ptp/remote/internal/core/LocalProcessBuilder.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/internal/core/LocalProcessBuilder.java,v >retrieving revision 1.1 >diff -u -r1.1 LocalProcessBuilder.java >--- src/org/eclipse/ptp/remote/internal/core/LocalProcessBuilder.java 24 Jul 2008 17:03:46 -0000 1.1 >+++ src/org/eclipse/ptp/remote/internal/core/LocalProcessBuilder.java 28 Oct 2009 16:52:47 -0000 >@@ -19,13 +19,24 @@ > > import org.eclipse.cdt.utils.spawner.ProcessFactory; > import org.eclipse.core.filesystem.EFS; >+import org.eclipse.core.filesystem.IFileStore; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Path; > import org.eclipse.ptp.remote.core.AbstractRemoteProcessBuilder; > import org.eclipse.ptp.remote.core.IRemoteConnection; > import org.eclipse.ptp.remote.core.IRemoteProcess; > > public class LocalProcessBuilder extends AbstractRemoteProcessBuilder { >+ /* (non-Javadoc) >+ * @see org.eclipse.ptp.remote.core.AbstractRemoteProcessBuilder#getHomeDirectory() >+ */ >+ @Override >+ public IFileStore getHomeDirectory() { >+ String pathString = System.getProperty("user.home"); >+ return EFS.getLocalFileSystem().getStore(new Path(pathString)); >+ } >+ > private ProcessFactory localProcessBuilder; > > private Map<String, String> remoteEnv = new HashMap<String, String>(); >#P org.eclipse.ptp.rdt.managedbuilder.xlc.ui >Index: src/org/eclipse/ptp/rdt/managedbuilder/xlc/ui/RemoteProjectEnvironmentSupplier.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.managedbuilder.xlc.ui/src/org/eclipse/ptp/rdt/managedbuilder/xlc/ui/RemoteProjectEnvironmentSupplier.java,v >retrieving revision 1.3 >diff -u -r1.3 RemoteProjectEnvironmentSupplier.java >--- src/org/eclipse/ptp/rdt/managedbuilder/xlc/ui/RemoteProjectEnvironmentSupplier.java 1 Sep 2009 15:52:21 -0000 1.3 >+++ src/org/eclipse/ptp/rdt/managedbuilder/xlc/ui/RemoteProjectEnvironmentSupplier.java 28 Oct 2009 16:52:47 -0000 >@@ -28,11 +28,11 @@ > import org.eclipse.ptp.remote.core.IRemoteProcessBuilder; > import org.eclipse.ptp.remote.core.IRemoteServices; > import org.eclipse.ptp.remote.core.exception.RemoteConnectionException; >-import org.eclipse.ptp.services.core.IService; >-import org.eclipse.ptp.services.core.IServiceConfiguration; >-import org.eclipse.ptp.services.core.IServiceProvider; >-import org.eclipse.ptp.services.core.ProjectNotConfiguredException; >-import org.eclipse.ptp.services.core.ServiceModelManager; >+import org.eclipse.ptp.rdt.services.core.IService; >+import org.eclipse.ptp.rdt.services.core.IServiceConfiguration; >+import org.eclipse.ptp.rdt.services.core.IServiceProvider; >+import org.eclipse.ptp.rdt.services.core.ProjectNotConfiguredException; >+import org.eclipse.ptp.rdt.services.core.ServiceModelManager; > > /** > * Supplies environment variables from the remote system. >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.managedbuilder.xlc.ui/plugin.xml,v >retrieving revision 1.3 >diff -u -r1.3 plugin.xml >--- plugin.xml 15 Jun 2009 14:34:55 -0000 1.3 >+++ plugin.xml 28 Oct 2009 16:52:47 -0000 >@@ -7,7 +7,6 @@ > fileVersion="4.0.0"> > </managedBuildRevision> > <builder >- commandLauncher="org.eclipse.ptp.rdt.core.remotemake.RemoteCommandLauncher" > id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.builder1" > isAbstract="false" > isVariableCaseSensitive="false" >@@ -29,12 +28,13 @@ > errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" > id="org.eclipse.ptp.rdt.managedbuild.config.xlc.exe.debug"> > <toolChain >- archList="all" >- configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier" >- id="org.eclipse.ptp.rdt.managedbuild.toolchain.xlc.exe.debug" >- name="%ToolChainName.Dbg" >- osList="all" >- targetTool="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.linker.exe.debug;org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.linker.exe.debug"> >+ archList="all" >+ configurationEnvironmentSupplier="RemoteConfigurationEnvironmentSupplier" >+ id="org.eclipse.ptp.rdt.managedbuild.toolchain.xlc.exe.debug" >+ name="%ToolChainName.Dbg" >+ osList="all" >+ scannerConfigDiscoveryProfileId="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerProjectProfile" >+ targetTool="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.linker.exe.debug;org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.linker.exe.debug"> > <targetPlatform > id="org.eclipse.ptp.rdt.managedbuild.target.xlc.platform.exe.debug" > name="%PlatformName.Dbg" >@@ -48,7 +48,7 @@ > </builder> > <tool > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.compiler.exe.debug" >- superClass="org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.compiler.base"> >+ superClass="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.cpp"> > <option > id="org.eclipse.ptp.rdt.xlc.cpp.compiler.exe.debug.option.optimization.level" > defaultValue="xlc.c.compiler.optimization.level.none" >@@ -62,7 +62,7 @@ > </tool> > <tool > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.compiler.exe.debug" >- superClass="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.compiler.base"> >+ superClass="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.c"> > <option > id="org.eclipse.ptp.rdt.xlc.c.compiler.exe.debug.option.optimization.level" > defaultValue="xlc.c.optimization.level.none" >@@ -95,11 +95,13 @@ > errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" > id="org.eclipse.ptp.rdt.managedbuild.config.xlc.exe.release"> > <toolChain >- archList="all" >- id="org.eclipse.ptp.rdt.managedbuild.toolchain.xlc.exe.release" >- name="%ToolChainName.Rel" >- osList="all" >- targetTool="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.linker.exe.release;org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.linker.exe.release"> >+ archList="all" >+ configurationEnvironmentSupplier="RemoteConfigurationEnvironmentSupplier" >+ id="org.eclipse.ptp.rdt.managedbuild.toolchain.xlc.exe.release" >+ name="%ToolChainName.Dbg" >+ osList="all" >+ scannerConfigDiscoveryProfileId="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerProjectProfile" >+ targetTool="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.linker.exe.release;org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.linker.exe.release"> > <targetPlatform > id="org.eclipse.ptp.rdt.managedbuild.target.xlc.platform.exe.release" > name="%PlatformName.Rel" >@@ -113,7 +115,7 @@ > </builder> > <tool > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.compiler.exe.release" >- superClass="org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.compiler.base"> >+ superClass="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.cpp"> > <option > id="org.eclipse.ptp.rdt.xlc.cpp.compiler.exe.release.option.optimization.level" > defaultValue="xlc.c.optimization.level.Level5" >@@ -127,7 +129,7 @@ > </tool> > <tool > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.compiler.exe.release" >- superClass="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.compiler.base"> >+ superClass="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.c"> > <option > id="org.eclipse.ptp.rdt.xlc.c.compiler.exe.release.option.optimization.level" > defaultValue="xlc.c.optimization.level.Level5" >@@ -156,23 +158,24 @@ > </configuration> > </projectType> > <toolChain >- archList="all" >- configurationEnvironmentSupplier="RemoteConfigurationEnvironmentSupplier" >- id="org.eclipse.ptp.rdt.managedbuild.toolchain.xlc.base" >- name="%ToolChainName.Dbg" >- osList="all" >- targetTool="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.linker.exe.debug;org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.linker.exe.debug"> >+ archList="all" >+ configurationEnvironmentSupplier="RemoteConfigurationEnvironmentSupplier" >+ id="org.eclipse.ptp.rdt.managedbuild.toolchain.xlc.base" >+ name="%ToolChainName.Dbg" >+ osList="all" >+ scannerConfigDiscoveryProfileId="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerProjectProfile" >+ targetTool="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.linker.exe.debug;org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.linker.exe.debug"> > <builder > superClass="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.builder1" > id="org.eclipse.ptp.rdt.managedbuilder.xlc.builder.base"> > </builder> > <tool > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.cpp.compiler.base" >- superClass="cdt.managedbuild.tool.xlc.cpp.compiler"> >+ superClass="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.cpp"> > </tool> > <tool > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.compiler.base" >- superClass="cdt.managedbuild.tool.xlc.c.compiler"> >+ superClass="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.c"> > </tool> > <tool > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.c.linker.exe.base" >@@ -186,23 +189,63 @@ > id="org.eclipse.ptp.rdt.managedbuild.tool.xlc.assembler.exe.base" > superClass="cdt.managedbuild.tool.xlc.assembler"> > </tool> >- </toolChain> >+ </toolChain> >+ <tool >+ id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.cpp" >+ isAbstract="false" >+ name="Remote XL C++ Compiler" >+ superClass="cdt.managedbuild.tool.xlc.cpp.compiler.abstract"> >+ <inputType >+ id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.cpp.c.compiler.input" >+ primaryInput="true" >+ scannerConfigDiscoveryProfileId="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerProjectProfile|org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerFileProfile" >+ superClass="cdt.managedbuild.tool.xlc.c.compiler.input"> >+ </inputType> >+ <inputType >+ id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.cpp.compiler.input" >+ primaryInput="true" >+ scannerConfigDiscoveryProfileId="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerProjectProfile|org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerFileProfile" >+ superClass="cdt.managedbuild.tool.xlc.cpp.compiler.input"> >+ </inputType> >+ <outputType >+ outputs="o" >+ buildVariable="OBJS" >+ id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.cpp.compiler.output"> >+ </outputType> >+ </tool> >+ <tool >+ id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.compiler.c" >+ isAbstract="false" >+ name="Remote XL C Compiler" >+ superClass="cdt.managedbuild.tool.xlc.c.compiler.abstract"> >+ <inputType >+ id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.c.compiler.input" >+ primaryInput="true" >+ scannerConfigDiscoveryProfileId="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerProjectProfile|org.eclipse.ptp.rdt.managedbuilder.xlc.ui.RemoteXLCPerFileProfile" >+ superClass="cdt.managedbuild.tool.xlc.c.compiler.input"> >+ </inputType> >+ <outputType >+ outputs="o" >+ buildVariable="OBJS" >+ id="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.c.compiler.output"> >+ </outputType> >+ </tool> > </extension> > <extension > id="RemoteXLCPerProjectProfile" > name="%extension.name" > point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> > <scannerInfoCollector >- class="org.eclipse.ptp.rdt.core.remotemake.ProjectDescriptionCollector" >+ class="org.eclipse.cdt.make.xlc.core.scannerconfig.PerProjectXLCScannerInfoCollector" > scope="project"/> > <!-- The ScannerInfoProvider search for the information needed by the profile and send it to the ScannerInfoCollector --> >- <scannerInfoProvider providerId="org.eclipse.ptp.rdt.managedbuilder.xlc.ui.specsFile"> >+ <scannerInfoProvider providerId="specsFile"> > <!-- Specifies the compiler command that returns the information about standard include directories and standard definitions --> > <!-- The compiler command used will be always a C compiler command --> > <!-- The output for C or C++ projects will be different as the ScannerInfoProvider substitute the ${specs_file} variable below with a dummy "c" file or "cpp" file --> > <run > arguments="-E -v ${specs_file_path}" >- command="${XL_compilerRoot}/xlC" >+ command="xlC" > class="org.eclipse.ptp.rdt.core.remotemake.RemoteSpecsRunSIProvider"> > </run> > <!-- Specifies the parser for the output generated by the compiler with the above command line --> >@@ -210,6 +253,25 @@ > class="org.eclipse.cdt.make.xlc.core.scannerconfig.XlCSpecsConsoleParser"> > </scannerInfoConsoleParser> > </scannerInfoProvider> >+ <buildOutputProvider> >+ <scannerInfoConsoleParser >+ class="org.eclipse.cdt.make.xlc.core.scannerconfig.XLCPerProjectBuildOutputParser"> >+ </scannerInfoConsoleParser> >+ </buildOutputProvider> >+ </extension> >+ <extension >+ id="RemoteXLCPerFileProfile" >+ name="Remote XL C/C++ Per File Profile" >+ point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> >+ <scannerInfoCollector >+ class="org.eclipse.cdt.make.xlc.core.scannerconfig.PerFileXLCScannerInfoCollector" >+ scope="file"> >+ </scannerInfoCollector> >+ <buildOutputProvider> >+ <scannerInfoConsoleParser >+ class="org.eclipse.cdt.make.xlc.core.scannerconfig.XLCPerFileBuildOutputParser"> >+ </scannerInfoConsoleParser> >+ </buildOutputProvider> > </extension> > > </plugin> >Index: src/RemoteConfigurationEnvironmentSupplier.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.managedbuilder.xlc.ui/src/RemoteConfigurationEnvironmentSupplier.java,v >retrieving revision 1.3 >diff -u -r1.3 RemoteConfigurationEnvironmentSupplier.java >--- src/RemoteConfigurationEnvironmentSupplier.java 1 Sep 2009 15:52:21 -0000 1.3 >+++ src/RemoteConfigurationEnvironmentSupplier.java 28 Oct 2009 16:52:47 -0000 >@@ -28,11 +28,11 @@ > import org.eclipse.ptp.remote.core.IRemoteProcessBuilder; > import org.eclipse.ptp.remote.core.IRemoteServices; > import org.eclipse.ptp.remote.core.exception.RemoteConnectionException; >-import org.eclipse.ptp.services.core.IService; >-import org.eclipse.ptp.services.core.IServiceConfiguration; >-import org.eclipse.ptp.services.core.IServiceProvider; >-import org.eclipse.ptp.services.core.ProjectNotConfiguredException; >-import org.eclipse.ptp.services.core.ServiceModelManager; >+import org.eclipse.ptp.rdt.services.core.IService; >+import org.eclipse.ptp.rdt.services.core.IServiceConfiguration; >+import org.eclipse.ptp.rdt.services.core.IServiceProvider; >+import org.eclipse.ptp.rdt.services.core.ProjectNotConfiguredException; >+import org.eclipse.ptp.rdt.services.core.ServiceModelManager; > > > /** >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.managedbuilder.xlc.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.3 >diff -u -r1.3 MANIFEST.MF >--- META-INF/MANIFEST.MF 1 Sep 2009 15:52:20 -0000 1.3 >+++ META-INF/MANIFEST.MF 28 Oct 2009 16:52:47 -0000 >@@ -8,14 +8,15 @@ > Bundle-Vendor: %Bundle-Vendor > Require-Bundle: org.eclipse.ui, > org.eclipse.core.runtime, >- org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100", >- org.eclipse.cdt.managedbuilder.xlc.core;bundle-version="5.0.0", >- org.eclipse.cdt.managedbuilder.xlc.ui;bundle-version="6.0.0", >+ org.eclipse.cdt.managedbuilder.core;bundle-version="[5.0.2.200908281004,5.1.0)", >+ org.eclipse.cdt.managedbuilder.xlc.core;bundle-version="[5.0.2.200908281004,5.1.0)", >+ org.eclipse.cdt.managedbuilder.xlc.ui;bundle-version="[5.0.2.200908281004,5.1.0)", > org.eclipse.ptp.rdt.core;bundle-version="1.0.0", >- org.eclipse.core.resources;bundle-version="3.5.0", >- org.eclipse.ptp.remote.core;bundle-version="2.1.0", >- org.eclipse.cdt.core;bundle-version="5.1.0", >- org.eclipse.ptp.services.core;bundle-version="1.0.0" >+ org.eclipse.core.resources;bundle-version="3.4.0", >+ org.eclipse.ptp.remote.core;bundle-version="[2.1.0,3.0.0)", >+ org.eclipse.cdt.core;bundle-version="[5.0.2.200908281004,5.1.0)", >+ org.eclipse.ptp.rdt.services;bundle-version="1.0.1", >+ org.eclipse.cdt.make.xlc.core;bundle-version="5.0.0" > Bundle-RequiredExecutionEnvironment: J2SE-1.5 > Bundle-ActivationPolicy: lazy > Export-Package: org.eclipse.ptp.rdt.managedbuilder.xlc.ui >#P org.eclipse.ptp.rdt.core >Index: src/org/eclipse/ptp/rdt/core/remotemake/RemoteRunSIProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.core/src/org/eclipse/ptp/rdt/core/remotemake/RemoteRunSIProvider.java,v >retrieving revision 1.1 >diff -u -r1.1 RemoteRunSIProvider.java >--- src/org/eclipse/ptp/rdt/core/remotemake/RemoteRunSIProvider.java 1 Oct 2008 16:31:40 -0000 1.1 >+++ src/org/eclipse/ptp/rdt/core/remotemake/RemoteRunSIProvider.java 28 Oct 2009 16:52:48 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008 IBM Corporation and others. >+ * Copyright (c) 2008, 2009 IBM Corporation and others. > * 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 >@@ -20,14 +20,18 @@ > import org.eclipse.cdt.make.core.scannerconfig.IExternalScannerInfoProvider; > import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2; > import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2; > import org.eclipse.cdt.make.core.scannerconfig.InfoContext; > import org.eclipse.cdt.make.internal.core.StreamMonitor; > import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerInfoConsoleParserFactory; > import org.eclipse.cdt.make.internal.core.scannerconfig2.SCMarkerGenerator; >+import org.eclipse.core.filesystem.IFileStore; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Path; > import org.eclipse.core.runtime.SubProgressMonitor; > import org.eclipse.ptp.internal.rdt.core.remotemake.RemoteProcessClosure; > import org.eclipse.ptp.rdt.core.RDTLog; >@@ -39,6 +43,7 @@ > import org.eclipse.ptp.rdt.services.core.IServiceProvider; > import org.eclipse.ptp.rdt.services.core.ServiceModelManager; > import org.eclipse.ptp.remote.core.IRemoteConnection; >+import org.eclipse.ptp.remote.core.IRemoteFileManager; > import org.eclipse.ptp.remote.core.IRemoteProcess; > import org.eclipse.ptp.remote.core.IRemoteProcessBuilder; > import org.eclipse.ptp.remote.core.IRemoteServices; >@@ -56,7 +61,12 @@ > */ > protected abstract List<String> getCommand(IProject project, String providerId, IScannerConfigBuilderInfo2 buildInfo); > >- >+ /** >+ * Subclasses need to provide the working directory that the command will run in. >+ * >+ * @return String >+ */ >+ protected abstract IPath getWorkingDirectory(IProject project); > > public boolean invokeProvider(IProgressMonitor monitor, IResource resource, > String providerId, IScannerConfigBuilderInfo2 buildInfo, >@@ -96,6 +106,11 @@ > > IProject project = resource.getProject(); > >+ if(collector instanceof IScannerInfoCollector2) { >+ IScannerInfoCollector2 s2 = (IScannerInfoCollector2) collector; >+ s2.setProject(project); >+ } >+ > IRemoteExecutionServiceProvider executionProvider = getExecutionServiceProvider(project); > if(executionProvider == null || monitor.isCanceled()) > return false; >@@ -114,6 +129,15 @@ > IRemoteServices remoteServices = executionProvider.getRemoteServices(); > IRemoteProcessBuilder processBuilder = remoteServices.getProcessBuilder(connection, runCommand); > >+ // get the configuration directory for the provider... this is where the build >+ // should execute >+ String configPath = executionProvider.getConfigLocation(); >+ IRemoteFileManager remoteFileManager = remoteServices.getFileManager(connection); >+ IFileStore workingDir = remoteFileManager.getResource(new Path(configPath), monitor); >+ >+ // set the working directory for the process to be the config directory >+ processBuilder.directory(workingDir); >+ > monitor.worked(1); > > // the output of the command goes to the console >Index: src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.core/src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java,v >retrieving revision 1.4.2.3 >diff -u -r1.4.2.3 RemoteMakeBuilder.java >--- src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java 6 Jul 2009 18:41:03 -0000 1.4.2.3 >+++ src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java 28 Oct 2009 16:52:48 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008 IBM Corporation and others. >+ * Copyright (c) 2008, 2009 IBM Corporation and others. > * 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 >@@ -19,8 +19,13 @@ > import java.util.List; > import java.util.Map; > >+import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext; >+import org.eclipse.cdt.build.core.scannerconfig.ICfgScannerConfigBuilderInfo2Set; >+import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager; > import org.eclipse.cdt.core.CCorePlugin; > import org.eclipse.cdt.core.ErrorParserManager; >+import org.eclipse.cdt.core.IMarkerGenerator; >+import org.eclipse.cdt.core.ProblemMarkerInfo; > import org.eclipse.cdt.core.envvar.IEnvironmentVariable; > import org.eclipse.cdt.core.model.ICModelMarker; > import org.eclipse.cdt.core.resources.IConsole; >@@ -28,13 +33,29 @@ > import org.eclipse.cdt.make.core.IMakeBuilderInfo; > import org.eclipse.cdt.make.core.MakeBuilder; > import org.eclipse.cdt.make.core.MakeCorePlugin; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser; >+import org.eclipse.cdt.make.core.scannerconfig.InfoContext; > import org.eclipse.cdt.make.internal.core.MakeMessages; > import org.eclipse.cdt.make.internal.core.StreamMonitor; > import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerInfoConsoleParserFactory; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.SCMarkerGenerator; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfile; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager; > import org.eclipse.cdt.managedbuilder.core.IBuilder; > import org.eclipse.cdt.managedbuilder.core.IConfiguration; >+import org.eclipse.cdt.managedbuilder.core.IFileInfo; >+import org.eclipse.cdt.managedbuilder.core.IFolderInfo; >+import org.eclipse.cdt.managedbuilder.core.IInputType; > import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; >+import org.eclipse.cdt.managedbuilder.core.IResourceInfo; >+import org.eclipse.cdt.managedbuilder.core.ITool; > import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; >+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin; > import org.eclipse.core.filesystem.IFileStore; > import org.eclipse.core.resources.IMarker; > import org.eclipse.core.resources.IProject; >@@ -206,8 +227,21 @@ > final OutputStream stdout = epm.getOutputStream(); > final OutputStream stderr = epm.getOutputStream(); > >- ConsoleOutputSniffer sniffer = ScannerInfoConsoleParserFactory.getMakeBuilderOutputSniffer( >- stdout, stderr, getProject(), workingDirectory, null, this, null); >+ String scannerDiscID = mbsInfo.getDefaultConfiguration().getToolChain().getScannerConfigDiscoveryProfileId(); >+ >+ IScannerConfigBuilderInfo2 scBuilderInfo = ScannerConfigProfileManager. >+ createScannerConfigBuildInfo2(ManagedBuilderCorePlugin.getDefault().getPluginPreferences(), >+ scannerDiscID, false); >+ int foo = 1; >+ IScannerInfoCollector collector = (IScannerInfoCollector) ScannerConfigProfileManager.getInstance().getSCProfileConfiguration(scannerDiscID).getScannerInfoCollectorElement().createScannerInfoCollector(); >+ >+ if(collector instanceof IScannerInfoCollector2) { >+ IScannerInfoCollector2 s2 = (IScannerInfoCollector2) collector; >+ s2.setProject(currProject); >+ } >+ >+ SCMarkerGenerator markerGenerator = new SCMarkerGenerator(); >+ ConsoleOutputSniffer sniffer = ScannerInfoUtility.createBuildOutputSniffer(stdout, stderr, currProject, mbsInfo.getDefaultConfiguration(), workingDirectory, markerGenerator , collector); > OutputStream consoleOut = (sniffer == null ? stdout : sniffer.getOutputStream()); > OutputStream consoleErr = (sniffer == null ? stderr : sniffer.getErrorStream()); > >@@ -353,6 +387,11 @@ > consoleOut.close(); > consoleErr.close(); > epm.reportProblems(); >+ >+// if(collector instanceof IScannerInfoCollector2) { >+// IScannerInfoCollector2 s2 = (IScannerInfoCollector2) collector; >+// s2.updateScannerConfiguration(monitor); >+// } > cos.close(); > } > } catch (Exception e) { >@@ -422,4 +461,6 @@ > } > return makeArray(targets); > } >+ >+ > } >Index: src/org/eclipse/ptp/rdt/core/remotemake/RemoteGCCSpecsRunSIProvider.java >=================================================================== >RCS file: src/org/eclipse/ptp/rdt/core/remotemake/RemoteGCCSpecsRunSIProvider.java >diff -N src/org/eclipse/ptp/rdt/core/remotemake/RemoteGCCSpecsRunSIProvider.java >--- src/org/eclipse/ptp/rdt/core/remotemake/RemoteGCCSpecsRunSIProvider.java 1 Oct 2008 16:31:40 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,102 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 IBM Corporation and others. >- * 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 - Initial API and implementation >- *******************************************************************************/ >-package org.eclipse.ptp.rdt.core.remotemake; >- >-import java.io.ByteArrayInputStream; >-import java.io.InputStream; >-import java.util.ArrayList; >-import java.util.List; >- >-import org.eclipse.cdt.core.CCProjectNature; >-import org.eclipse.cdt.core.CProjectNature; >-import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2; >-import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerConfigUtil; >-import org.eclipse.core.resources.IFile; >-import org.eclipse.core.resources.IFolder; >-import org.eclipse.core.resources.IProject; >-import org.eclipse.core.resources.IResource; >-import org.eclipse.core.runtime.CoreException; >-import org.eclipse.ptp.rdt.core.RDTLog; >- >- >-/** >- * Gets the command to run gcc from the scanner discovery extension point >- * and prepares it to run. >- * >- * @author Mike Kucera >- */ >-public class RemoteGCCSpecsRunSIProvider extends RemoteRunSIProvider { >- >- public static final String SPECS_FILE_PATH_VAR = "${specs_file_path}"; //$NON-NLS-1$ >- public static final String SPECS_FOLDER_NAME = ".specs"; //$NON-NLS-1$ >- >- >- @Override >- protected List<String> getCommand(IProject project, String providerId, IScannerConfigBuilderInfo2 buildInfo) { >- // get the command that is provided in the extension point >- String gcc = buildInfo.getProviderRunCommand(providerId); >- String args = buildInfo.getProviderRunArguments(providerId); >- String specsFileName = getSpecsFileName(project); >- >- if(gcc == null || args == null || specsFileName == null) >- return null; >- >- IFile specsFile; >- try { >- specsFile = createSpecsFile(project, specsFileName); >- } catch (CoreException e) { >- RDTLog.logError(e); >- return null; >- } >- >- String specsFilePath = specsFile.getLocationURI().getRawPath(); >- args = args.replace(SPECS_FILE_PATH_VAR, specsFilePath); >- >- List<String> command = new ArrayList<String>(); >- command.add(gcc); >- for(String arg : args.split(" ")) //$NON-NLS-1$ >- command.add(arg); >- >- return command; >- } >- >- >- /** >- * Create an empty "specs" file in a hidden directory in the project. >- * Use EFS (via resources) for this for simplicity. >- */ >- private static IFile createSpecsFile(IProject project, String specsFileName) throws CoreException { >- IFolder specsFolder = project.getFolder(SPECS_FOLDER_NAME); >- if(!specsFolder.exists()) { >- specsFolder.create(IResource.HIDDEN, true, null); // should not fire resource event >- } >- >- IFile specsFile = specsFolder.getFile(specsFileName); >- if(!specsFile.exists()) { >- InputStream is = new ByteArrayInputStream("\n".getBytes()); //$NON-NLS-1$ >- specsFile.create(is, true, null); >- } >- >- return specsFile; >- } >- >- >- private static String getSpecsFileName(IProject project) { >- try { >- if(project.hasNature(CCProjectNature.CC_NATURE_ID)) >- return GCCScannerConfigUtil.CPP_SPECS_FILE; >- else if(project.hasNature(CProjectNature.C_NATURE_ID)) >- return GCCScannerConfigUtil.C_SPECS_FILE; >- } catch(CoreException e) { } >- >- return null; >- } >-} >Index: src/org/eclipse/ptp/rdt/core/resources/RemoteMakeNature.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.core/src/org/eclipse/ptp/rdt/core/resources/RemoteMakeNature.java,v >retrieving revision 1.2 >diff -u -r1.2 RemoteMakeNature.java >--- src/org/eclipse/ptp/rdt/core/resources/RemoteMakeNature.java 23 Sep 2008 19:58:44 -0000 1.2 >+++ src/org/eclipse/ptp/rdt/core/resources/RemoteMakeNature.java 28 Oct 2009 16:52:48 -0000 >@@ -139,6 +139,36 @@ > } > > /** >+ * Adds a builder to the build spec for the project. >+ * >+ * @param project >+ * @param builderID >+ * @param mon >+ * @throws CoreException >+ */ >+ public static void updateProjectDescription(IProject project, String builderID, IProgressMonitor mon) throws CoreException { >+ // setup builder >+ IProjectDescription description = project.getDescription(); >+ ICommand[] commands = new ICommand[1]; >+ commands[0] = description.newCommand(); >+ commands[0].setBuilderName(builderID); >+ description.setBuildSpec(commands); >+ >+ // add nature >+ String[] prevNatures= description.getNatureIds(); >+ for (int i= 0; i < prevNatures.length; i++) { >+ if (NATURE_ID.equals(prevNatures[i])) >+ return; >+ } >+ String[] newNatures= new String[prevNatures.length + 1]; >+ System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length); >+ newNatures[prevNatures.length]= NATURE_ID; >+ description.setNatureIds(newNatures); >+ >+ project.setDescription(description, mon); >+ } >+ >+ /** > * Removes a builder from the project's build spec. > * > * @param project >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.core/plugin.xml,v >retrieving revision 1.3.2.5 >diff -u -r1.3.2.5 plugin.xml >--- plugin.xml 26 Oct 2009 15:39:41 -0000 1.3.2.5 >+++ plugin.xml 28 Oct 2009 16:52:48 -0000 >@@ -22,6 +22,9 @@ > <builder > id="org.eclipse.ptp.rdt.core.remoteMakeBuilder"> > </builder> >+ <builder >+ id="org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder"> >+ </builder> > </extension> > <extension > id="org.eclipse.ptp.rdt.core.remoteMakeBuilder" >@@ -51,7 +54,7 @@ > <run > command="gcc" > arguments="-E -P -v -dD ${specs_file_path}" >- class="org.eclipse.ptp.rdt.core.remotemake.RemoteGCCSpecsRunSIProvider"/> >+ class="org.eclipse.ptp.rdt.core.remotemake.RemoteSpecsRunSIProvider"/> > <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/> > </scannerInfoProvider> > </extension> >Index: src/org/eclipse/ptp/rdt/core/serviceproviders/IRemoteExecutionServiceProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.core/src/org/eclipse/ptp/rdt/core/serviceproviders/IRemoteExecutionServiceProvider.java,v >retrieving revision 1.2 >diff -u -r1.2 IRemoteExecutionServiceProvider.java >--- src/org/eclipse/ptp/rdt/core/serviceproviders/IRemoteExecutionServiceProvider.java 23 Sep 2008 19:58:46 -0000 1.2 >+++ src/org/eclipse/ptp/rdt/core/serviceproviders/IRemoteExecutionServiceProvider.java 28 Oct 2009 16:52:48 -0000 >@@ -41,4 +41,11 @@ > * @return IRemoteConnection > */ > public IRemoteConnection getConnection(); >+ >+ /** >+ * Gets the path to the configuration area on the the server. >+ * >+ * @return String >+ */ >+ public String getConfigLocation(); > } >Index: src/org/eclipse/ptp/rdt/core/remotemake/RemoteSpecsRunSIProvider.java >=================================================================== >RCS file: src/org/eclipse/ptp/rdt/core/remotemake/RemoteSpecsRunSIProvider.java >diff -N src/org/eclipse/ptp/rdt/core/remotemake/RemoteSpecsRunSIProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ptp/rdt/core/remotemake/RemoteSpecsRunSIProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,224 @@ >+/******************************************************************************* >+ * Copyright (c) 2008, 2009 IBM Corporation and others. >+ * 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 - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.ptp.rdt.core.remotemake; >+ >+import java.io.ByteArrayInputStream; >+import java.io.IOException; >+import java.io.InputStream; >+import java.io.OutputStream; >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.cdt.core.CCProjectNature; >+import org.eclipse.cdt.core.CProjectNature; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2; >+import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerConfigUtil; >+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; >+import org.eclipse.cdt.managedbuilder.macros.BuildMacroException; >+import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider; >+import org.eclipse.cdt.utils.FileSystemUtilityManager; >+import org.eclipse.core.filesystem.EFS; >+import org.eclipse.core.filesystem.IFileInfo; >+import org.eclipse.core.filesystem.IFileStore; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.ptp.rdt.core.RDTLog; >+import org.eclipse.ptp.rdt.core.serviceproviders.IRemoteExecutionServiceProvider; >+import org.eclipse.ptp.rdt.core.services.IRDTServiceConstants; >+import org.eclipse.ptp.rdt.services.core.IService; >+import org.eclipse.ptp.rdt.services.core.IServiceConfiguration; >+import org.eclipse.ptp.rdt.services.core.IServiceProvider; >+import org.eclipse.ptp.rdt.services.core.ServiceModelManager; >+import org.eclipse.ptp.remote.core.IRemoteConnection; >+import org.eclipse.ptp.remote.core.IRemoteFileManager; >+import org.eclipse.ptp.remote.core.IRemoteProcessBuilder; >+import org.eclipse.ptp.remote.core.IRemoteServices; >+import org.eclipse.ptp.remote.core.exception.RemoteConnectionException; >+ >+ >+/** >+ * Gets the command to run gcc from the scanner discovery extension point >+ * and prepares it to run. >+ * >+ * @author Mike Kucera >+ */ >+public class RemoteSpecsRunSIProvider extends RemoteRunSIProvider { >+ >+ public static final String SPECS_FILE_PATH_VAR = "${specs_file_path}"; //$NON-NLS-1$ >+ public static final String SPECS_FOLDER_NAME = ".specs"; //$NON-NLS-1$ >+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$ >+ >+ >+ @Override >+ protected List<String> getCommand(IProject project, String providerId, IScannerConfigBuilderInfo2 buildInfo) { >+ // get the command that is provided in the extension point >+ String gcc = buildInfo.getProviderRunCommand(providerId); >+ >+ // resolve macros in the run command >+ try { >+ gcc = ManagedBuildManager.getBuildMacroProvider().resolveValue(gcc, EMPTY_STRING, null, >+ IBuildMacroProvider.CONTEXT_CONFIGURATION, >+ ManagedBuildManager.getBuildInfo(project).getDefaultConfiguration()); >+ } catch (BuildMacroException e1) { >+ RDTLog.logError(e1); >+ return null; >+ } >+ >+ String args = buildInfo.getProviderRunArguments(providerId); >+ String specsFileName = getSpecsFileName(project); >+ >+ if(gcc == null || args == null || specsFileName == null) >+ return null; >+ >+ IFileStore specsFilestore; >+ try { >+ specsFilestore = createSpecsFile(project, specsFileName, null); >+ } catch (CoreException e) { >+ RDTLog.logError(e); >+ return null; >+ } catch (IOException e) { >+ RDTLog.logError(e); >+ return null; >+ } >+ >+ String specsFilePath = FileSystemUtilityManager.getDefault().getPathFromURI(specsFilestore.toURI()); >+ args = args.replace(SPECS_FILE_PATH_VAR, specsFilePath); >+ >+ List<String> command = new ArrayList<String>(); >+ command.add(gcc); >+ for(String arg : args.split(" ")) //$NON-NLS-1$ >+ command.add(arg); >+ >+ return command; >+ } >+ >+ >+ /** >+ * Create an empty "specs" file in the server folder using EFS. >+ * @param monitor >+ * @throws IOException >+ */ >+ private static IFileStore createSpecsFile(IProject project, String specsFileName, IProgressMonitor monitor) throws CoreException, IOException { >+ ServiceModelManager smm = ServiceModelManager.getInstance(); >+ IServiceConfiguration serviceConfig = smm.getActiveConfiguration(project); >+ IService buildService = smm.getService(IRDTServiceConstants.SERVICE_BUILD); >+ IServiceProvider provider = serviceConfig.getServiceProvider(buildService); >+ IRemoteExecutionServiceProvider executionProvider = null; >+ if(provider instanceof IRemoteExecutionServiceProvider) { >+ executionProvider = (IRemoteExecutionServiceProvider) provider; >+ } >+ >+ if (executionProvider != null) { >+ >+ IRemoteServices remoteServices = executionProvider.getRemoteServices(); >+ >+ IRemoteConnection connection = executionProvider.getConnection(); >+ >+ if(!connection.isOpen()) >+ try { >+ connection.open(null); >+ } catch (RemoteConnectionException e) { >+ RDTLog.logError(e); >+ } >+ >+ // get the config dir >+ IRemoteProcessBuilder processBuilder = remoteServices.getProcessBuilder(connection, ""); //$NON-NLS-1$ >+ String configPath = executionProvider.getConfigLocation(); >+ IRemoteFileManager remoteFileManager = remoteServices.getFileManager(connection); >+ IFileStore workingDir = remoteFileManager.getResource(new Path(configPath), monitor); >+ >+ // set the working directory for the process to be the config directory >+ processBuilder.directory(workingDir); >+ >+ IFileStore specsFile = workingDir.getChild(specsFileName); >+ >+ IFileInfo fileInfo = specsFile.fetchInfo(); >+ >+ if (!fileInfo.exists()) { >+ InputStream is = new ByteArrayInputStream("\n".getBytes()); //$NON-NLS-1$ >+ OutputStream os = specsFile.openOutputStream(EFS.NONE, null); >+ try { >+ >+ int data = is.read(); >+ while (data != -1) { >+ os.write(data); >+ data = is.read(); >+ } >+ >+ is.close(); >+ os.close(); >+ } catch (IOException e) { >+ RDTLog.logError(e); >+ } >+ >+ >+ } >+ >+ return specsFile; >+ >+ } >+ >+ >+ return null; >+ } >+ >+ >+ private static String getSpecsFileName(IProject project) { >+ try { >+ if(project.hasNature(CCProjectNature.CC_NATURE_ID)) >+ return GCCScannerConfigUtil.CPP_SPECS_FILE; >+ else if(project.hasNature(CProjectNature.C_NATURE_ID)) >+ return GCCScannerConfigUtil.C_SPECS_FILE; >+ } catch(CoreException e) { } >+ >+ return null; >+ } >+ >+ >+ @Override >+ protected IPath getWorkingDirectory(IProject project) { >+ >+ ServiceModelManager smm = ServiceModelManager.getInstance(); >+ IServiceConfiguration serviceConfig = smm.getActiveConfiguration(project); >+ IService buildService = smm.getService(IRDTServiceConstants.SERVICE_BUILD); >+ IServiceProvider provider = serviceConfig.getServiceProvider(buildService); >+ IRemoteExecutionServiceProvider executionProvider = null; >+ if(provider instanceof IRemoteExecutionServiceProvider) { >+ executionProvider = (IRemoteExecutionServiceProvider) provider; >+ } >+ >+ if (executionProvider != null) { >+ >+ IRemoteServices remoteServices = executionProvider.getRemoteServices(); >+ >+ IRemoteConnection connection = executionProvider.getConnection(); >+ >+ if(!connection.isOpen()) >+ try { >+ connection.open(null); >+ } catch (RemoteConnectionException e) { >+ RDTLog.logError(e); >+ } >+ >+ // get the CWD >+ IRemoteProcessBuilder processBuilder = remoteServices.getProcessBuilder(connection, ""); //$NON-NLS-1$ >+ IFileStore workingDir = processBuilder.directory(); >+ >+ // TODO: this will have to change when the filesystem utility stuff is checked in >+ IPath path = new Path(FileSystemUtilityManager.getDefault().getPathFromURI(workingDir.toURI())); >+ return path; >+ } >+ return null; >+ } >+} >Index: src/org/eclipse/ptp/rdt/core/remotemake/ScannerInfoUtility.java >=================================================================== >RCS file: src/org/eclipse/ptp/rdt/core/remotemake/ScannerInfoUtility.java >diff -N src/org/eclipse/ptp/rdt/core/remotemake/ScannerInfoUtility.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ptp/rdt/core/remotemake/ScannerInfoUtility.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,133 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 IBM Corporation and others. >+ * 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 - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.ptp.rdt.core.remotemake; >+ >+import java.io.OutputStream; >+import java.util.ArrayList; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext; >+import org.eclipse.cdt.build.core.scannerconfig.ICfgScannerConfigBuilderInfo2Set; >+import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager; >+import org.eclipse.cdt.core.IMarkerGenerator; >+import org.eclipse.cdt.internal.core.ConsoleOutputSniffer; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser; >+import org.eclipse.cdt.make.core.scannerconfig.InfoContext; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfile; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager; >+import org.eclipse.cdt.managedbuilder.core.IConfiguration; >+import org.eclipse.cdt.managedbuilder.core.IFileInfo; >+import org.eclipse.cdt.managedbuilder.core.IFolderInfo; >+import org.eclipse.cdt.managedbuilder.core.IInputType; >+import org.eclipse.cdt.managedbuilder.core.IResourceInfo; >+import org.eclipse.cdt.managedbuilder.core.ITool; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.runtime.IPath; >+ >+/** >+ * @author crecoskie >+ * >+ */ >+public class ScannerInfoUtility { >+ public static ConsoleOutputSniffer createBuildOutputSniffer(OutputStream outputStream, >+ OutputStream errorStream, >+ IProject project, >+ IConfiguration cfg, >+ IPath workingDirectory, >+ IMarkerGenerator markerGenerator, >+ IScannerInfoCollector collector){ >+ ICfgScannerConfigBuilderInfo2Set container = CfgScannerConfigProfileManager.getCfgScannerConfigBuildInfo(cfg); >+ Map map = container.getInfoMap(); >+ List clParserList = new ArrayList(); >+ >+ if(container.isPerRcTypeDiscovery()){ >+ IResourceInfo[] rcInfos = cfg.getResourceInfos(); >+ for(int q = 0; q < rcInfos.length; q++){ >+ IResourceInfo rcInfo = rcInfos[q]; >+ ITool tools[]; >+ if(rcInfo instanceof IFileInfo){ >+ tools = ((IFileInfo)rcInfo).getToolsToInvoke(); >+ } else { >+ tools = ((IFolderInfo)rcInfo).getFilteredTools(); >+ } >+ for(int i = 0; i < tools.length; i++){ >+ ITool tool = tools[i]; >+ IInputType[] types = tool.getInputTypes(); >+ >+ if(types.length != 0){ >+ for(int k = 0; k < types.length; k++){ >+ IInputType type = types[k]; >+ CfgInfoContext c = new CfgInfoContext(rcInfo, tool, type); >+ contributeToConsoleParserList(project, map, c, workingDirectory, markerGenerator, collector, clParserList); >+ } >+ } else { >+ CfgInfoContext c = new CfgInfoContext(rcInfo, tool, null); >+ contributeToConsoleParserList(project, map, c, workingDirectory, markerGenerator, collector, clParserList); >+ } >+ } >+ } >+ } >+ >+ if(clParserList.size() == 0){ >+ contributeToConsoleParserList(project, map, new CfgInfoContext(cfg), workingDirectory, markerGenerator, collector, clParserList); >+ } >+ >+ if(clParserList.size() != 0){ >+ return new ConsoleOutputSniffer(outputStream, errorStream, >+ (IScannerInfoConsoleParser[])clParserList.toArray(new IScannerInfoConsoleParser[clParserList.size()])); >+ } >+ >+ return null; >+ } >+ >+ public static boolean contributeToConsoleParserList( >+ IProject project, >+ Map map, >+ CfgInfoContext context, >+ IPath workingDirectory, >+ IMarkerGenerator markerGenerator, >+ IScannerInfoCollector collector, >+ List parserList){ >+ IScannerConfigBuilderInfo2 info = (IScannerConfigBuilderInfo2)map.get(context); >+ InfoContext ic = context.toInfoContext(); >+ boolean added = false; >+ if (info != null && >+ info.isAutoDiscoveryEnabled() && >+ info.isBuildOutputParserEnabled()) { >+ >+ String id = info.getSelectedProfileId(); >+ ScannerConfigProfile profile = ScannerConfigProfileManager.getInstance().getSCProfileConfiguration(id); >+ if(profile.getBuildOutputProviderElement() != null){ >+ // get the make builder console parser >+ SCProfileInstance profileInstance = ScannerConfigProfileManager.getInstance(). >+ getSCProfileInstance(project, ic, id); >+ >+ IScannerInfoConsoleParser clParser = profileInstance.createBuildOutputParser(); >+ if (collector == null) { >+ collector = profileInstance.getScannerInfoCollector(); >+ } >+ if(clParser != null){ >+ clParser.startup(project, workingDirectory, collector, >+ info.isProblemReportingEnabled() ? markerGenerator : null); >+ parserList.add(clParser); >+ added = true; >+ } >+ >+ } >+ } >+ >+ return added; >+ } >+} >#P org.eclipse.cdt.make.xlc.core >Index: src/org/eclipse/cdt/make/xlc/core/scannerconfig/DefaultXlCScannerInfoCollector.java >=================================================================== >RCS file: src/org/eclipse/cdt/make/xlc/core/scannerconfig/DefaultXlCScannerInfoCollector.java >diff -N src/org/eclipse/cdt/make/xlc/core/scannerconfig/DefaultXlCScannerInfoCollector.java >--- src/org/eclipse/cdt/make/xlc/core/scannerconfig/DefaultXlCScannerInfoCollector.java 22 Jan 2008 18:46:42 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,24 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2007, 2008 IBM Corporation and others. >- * 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 org.eclipse.cdt.make.xlc.core.scannerconfig; >- >-import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3; >-import org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector; >-import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector; >- >-/** >- * @author laggarcia >- * >- */ >-public class DefaultXlCScannerInfoCollector extends PerProjectSICollector >- implements IScannerInfoCollector3, IManagedScannerInfoCollector { >- >-} >Index: .settings/org.eclipse.jdt.core.prefs >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.make.xlc.core/.settings/org.eclipse.jdt.core.prefs,v >retrieving revision 1.1 >diff -u -r1.1 org.eclipse.jdt.core.prefs >--- .settings/org.eclipse.jdt.core.prefs 21 Jan 2008 20:16:41 -0000 1.1 >+++ .settings/org.eclipse.jdt.core.prefs 28 Oct 2009 16:52:48 -0000 >@@ -1,248 +1,5 @@ >-#Thu Oct 04 14:01:28 BRT 2007 >+#Tue Sep 29 13:43:38 EDT 2009 > eclipse.preferences.version=1 >-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=1 >-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.clear_blank_lines=false > org.eclipse.jdt.core.formatter.comment.format_comments=true >-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=false >-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=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=1 >-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true >-org.eclipse.jdt.core.formatter.tabulation.char=tab >-org.eclipse.jdt.core.formatter.tabulation.size=4 >-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false >Index: .settings/org.eclipse.jdt.ui.prefs >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.make.xlc.core/.settings/org.eclipse.jdt.ui.prefs,v >retrieving revision 1.1 >diff -u -r1.1 org.eclipse.jdt.ui.prefs >--- .settings/org.eclipse.jdt.ui.prefs 21 Jan 2008 20:16:41 -0000 1.1 >+++ .settings/org.eclipse.jdt.ui.prefs 28 Oct 2009 16:52:48 -0000 >@@ -1,5 +1,4 @@ >-#Thu Oct 04 14:01:28 BRT 2007 >+#Tue Sep 29 13:43:38 EDT 2009 > eclipse.preferences.version=1 >-formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile >-formatter_settings_version=10 >+formatter_settings_version=11 > internal.default.compliance=default >Index: src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java >=================================================================== >RCS file: src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java >diff -N src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,412 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2009 IBM Corporation and others. >+ * 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 - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.cdt.make.xlc.core.scannerconfig; >+ >+import java.util.ArrayList; >+import java.util.HashMap; >+import java.util.LinkedList; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.cdt.core.CCorePlugin; >+import org.eclipse.cdt.core.IMarkerGenerator; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector; >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser; >+import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes; >+import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.AbstractGCCBOPConsoleParserUtility; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.CCommandDSC; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfile.BuildOutputProvider; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IWorkspaceRoot; >+import org.eclipse.core.resources.ResourcesPlugin; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.Platform; >+import org.eclipse.core.runtime.content.IContentType; >+import org.eclipse.core.runtime.content.IContentTypeManager; >+ >+import sun.misc.FpUtils; >+ >+/** >+ * @author crecoskie >+ * >+ */ >+public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsoleParser { >+ >+ protected static final String[] COMPILER_INVOCATION = { "xlc", "xlC"//$NON-NLS-1$ //$NON-NLS-2$ >+ }; >+ protected static final String DASHIDASH = "-I-"; //$NON-NLS-1$ >+ protected static final String DASHI = "-I"; //$NON-NLS-1$ >+ protected static final String DASHD = "-D"; //$NON-NLS-1$ >+ >+ protected IProject fProject; >+ protected IScannerInfoCollector fCollector; >+ protected IPath fWorkingDir; >+ protected IMarkerGenerator fMarkerGenerator; >+ protected XLCBuildOutputParserUtility fUtility; >+ >+ protected boolean fBMultiline = false; >+ protected String fSMultiline = ""; //$NON-NLS-1$ >+ >+ protected String[] fCompilerCommands = { "xlc", "xlC" }; >+ >+ /** >+ * @return Returns the fProject. >+ */ >+ protected IProject getProject() { >+ return fProject; >+ } >+ >+ /** >+ * @return Returns the fCollector. >+ */ >+ protected IScannerInfoCollector getCollector() { >+ return fCollector; >+ } >+ >+ public void startup(IProject project, IScannerInfoCollector collector) { >+ fProject = project; >+ fCollector = collector; >+ fCompilerCommands = computeCompilerCommands(); >+ } >+ >+ /** >+ * Returns array of additional compiler commands to look for >+ * >+ * @return String[] >+ */ >+ protected String[] computeCompilerCommands() { >+ if (fProject != null) { >+ SCProfileInstance profileInstance = ScannerConfigProfileManager.getInstance().getSCProfileInstance( >+ fProject, ScannerConfigProfileManager.NULL_PROFILE_ID); >+ BuildOutputProvider boProvider = profileInstance.getProfile().getBuildOutputProviderElement(); >+ if (boProvider != null) { >+ String compilerCommandsString = boProvider.getScannerInfoConsoleParser().getCompilerCommands(); >+ if (compilerCommandsString != null && compilerCommandsString.length() > 0) { >+ String[] compilerCommands = compilerCommandsString.split(",\\s*"); //$NON-NLS-1$ >+ if (compilerCommands.length > 0) { >+ String[] compilerInvocation = new String[COMPILER_INVOCATION.length + compilerCommands.length]; >+ System.arraycopy(COMPILER_INVOCATION, 0, compilerInvocation, 0, COMPILER_INVOCATION.length); >+ System.arraycopy(compilerCommands, 0, compilerInvocation, COMPILER_INVOCATION.length, >+ compilerCommands.length); >+ return compilerInvocation; >+ } >+ } >+ } >+ } >+ return COMPILER_INVOCATION; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see >+ * org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser#processLine >+ * (java.lang.String) >+ */ >+ public boolean processLine(String line) { >+ boolean rc = false; >+ int lineBreakPos = line.length() - 1; >+ char[] lineChars = line.toCharArray(); >+ while (lineBreakPos >= 0 && Character.isWhitespace(lineChars[lineBreakPos])) { >+ lineBreakPos--; >+ } >+ if (lineBreakPos >= 0) { >+ if (lineChars[lineBreakPos] != '\\' || (lineBreakPos > 0 && lineChars[lineBreakPos - 1] == '\\')) { >+ lineBreakPos = -1; >+ } >+ } >+ // check for multiline commands (ends with '\') >+ if (lineBreakPos >= 0) { >+ fSMultiline += line.substring(0, lineBreakPos); >+ fBMultiline = true; >+ return rc; >+ } >+ if (fBMultiline) { >+ line = fSMultiline + line; >+ fBMultiline = false; >+ fSMultiline = ""; //$NON-NLS-1$ >+ } >+ line = line.trim(); >+ TraceUtil.outputTrace("XLCBuildOutputParser parsing line: [", line, "]"); //$NON-NLS-1$ //$NON-NLS-2$ >+ // make\[[0-9]*\]: error_desc >+ int firstColon = line.indexOf(':'); >+ String make = line.substring(0, firstColon + 1); >+ if (firstColon != -1 && make.indexOf("make") != -1) { //$NON-NLS-1$ >+ boolean enter = false; >+ String msg = line.substring(firstColon + 1).trim(); >+ if ((enter = msg.startsWith("Entering directory")) || //$NON-NLS-1$ >+ (msg.startsWith("Leaving directory"))) { //$NON-NLS-1$ >+ int s = msg.indexOf('`'); >+ int e = msg.indexOf('\''); >+ if (s != -1 && e != -1) { >+ String dir = msg.substring(s + 1, e); >+ if (getUtility() != null) { >+ getUtility().changeMakeDirectory(dir, getDirectoryLevel(line), enter); >+ } >+ return rc; >+ } >+ } >+ } >+ // call sublclass to process a single line >+ return processSingleLine(line.trim()); >+ } >+ >+ protected XLCBuildOutputParserUtility getUtility() { >+ if (fUtility == null) >+ fUtility = new XLCBuildOutputParserUtility(fProject, fWorkingDir, fMarkerGenerator); >+ >+ return fUtility; >+ } >+ >+ protected int getDirectoryLevel(String line) { >+ int s = line.indexOf('['); >+ int num = 0; >+ if (s != -1) { >+ int e = line.indexOf(']'); >+ String number = line.substring(s + 1, e).trim(); >+ try { >+ num = Integer.parseInt(number); >+ } catch (NumberFormatException exc) { >+ } >+ } >+ return num; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see >+ * org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser#shutdown >+ * () >+ */ >+ public void shutdown() { >+ if (getUtility() != null) { >+ getUtility().reportProblems(); >+ } >+ } >+ >+ /** >+ * Tokenizes a line into an array of commands. Commands are separated by >+ * ';', '&&' or '||'. Tokens are separated by whitespace unless found inside >+ * of quotes, back-quotes, or double quotes. Outside of single-, double- or >+ * back-quotes a backslash escapes white-spaces, all quotes, the backslash, >+ * '&' and '|'. A backslash used for escaping is removed. Quotes other than >+ * the back-quote plus '&&', '||', ';' are removed, also. >+ * >+ * @param line >+ * to tokenize >+ * @return array of commands >+ */ >+ protected String[][] tokenize(String line, boolean escapeInsideDoubleQuotes) { >+ ArrayList<String[]> commands = new ArrayList<String[]>(); >+ ArrayList<String> tokens = new ArrayList<String>(); >+ StringBuffer token = new StringBuffer(); >+ >+ final char[] input = line.toCharArray(); >+ boolean nextEscaped = false; >+ char currentQuote = 0; >+ for (int i = 0; i < input.length; i++) { >+ final char c = input[i]; >+ final boolean escaped = nextEscaped; >+ nextEscaped = false; >+ >+ if (currentQuote != 0) { >+ if (c == currentQuote) { >+ if (escaped) { >+ token.append(c); >+ } else { >+ if (c == '`') { >+ token.append(c); // preserve back-quotes >+ } >+ currentQuote = 0; >+ } >+ } else { >+ if (escapeInsideDoubleQuotes && currentQuote == '"' && c == '\\') { >+ nextEscaped = !escaped; >+ if (escaped) { >+ token.append(c); >+ } >+ } else { >+ if (escaped) { >+ token.append('\\'); >+ } >+ token.append(c); >+ } >+ } >+ } else { >+ switch (c) { >+ case '\\': >+ if (escaped) { >+ token.append(c); >+ } else { >+ nextEscaped = true; >+ } >+ break; >+ case '\'': >+ case '"': >+ case '`': >+ if (escaped) { >+ token.append(c); >+ } else { >+ if (c == '`') { >+ token.append(c); >+ } >+ currentQuote = c; >+ } >+ break; >+ case ';': >+ if (escaped) { >+ token.append(c); >+ } else { >+ endCommand(token, tokens, commands); >+ } >+ break; >+ case '&': >+ case '|': >+ if (escaped || i + 1 >= input.length || input[i + 1] != c) { >+ token.append(c); >+ } else { >+ i++; >+ endCommand(token, tokens, commands); >+ } >+ break; >+ >+ default: >+ if (Character.isWhitespace(c)) { >+ if (escaped) { >+ token.append(c); >+ } else { >+ endToken(token, tokens); >+ } >+ } else { >+ if (escaped) { >+ token.append('\\'); // for windows put backslash >+ // back onto the token. >+ } >+ token.append(c); >+ } >+ } >+ } >+ } >+ endCommand(token, tokens, commands); >+ return commands.toArray(new String[commands.size()][]); >+ } >+ >+ protected void endCommand(StringBuffer token, ArrayList<String> tokens, ArrayList<String[]> commands) { >+ endToken(token, tokens); >+ if (!tokens.isEmpty()) { >+ commands.add(tokens.toArray(new String[tokens.size()])); >+ tokens.clear(); >+ } >+ } >+ >+ protected void endToken(StringBuffer token, ArrayList<String> tokens) { >+ if (token.length() > 0) { >+ tokens.add(token.toString()); >+ token.setLength(0); >+ } >+ } >+ >+ protected boolean processSingleLine(String line) { >+ boolean rc = false; >+ String[][] tokens = tokenize(line, true); >+ for (int i = 0; i < tokens.length; i++) { >+ String[] command = tokens[i]; >+ if (processCommand(command)) { >+ rc = true; >+ } else { // go inside quotes, if the compiler is called per wrapper >+ // or shell script >+ for (int j = 0; j < command.length; j++) { >+ String[][] subtokens = tokenize(command[j], true); >+ for (int k = 0; k < subtokens.length; k++) { >+ String[] subcommand = subtokens[k]; >+ if (subcommand.length > 1) { // only proceed if there is >+ // any additional info >+ if (processCommand(subcommand)) { >+ rc = true; >+ } >+ } >+ } >+ } >+ } >+ } >+ return rc; >+ } >+ >+ protected int findCompilerInvocation(String[] tokens) { >+ for (int i = 0; i < tokens.length; i++) { >+ final String token = tokens[i].toLowerCase(); >+ final int searchFromOffset = Math.max(token.lastIndexOf('/'), token.lastIndexOf('\\')) + 1; >+ for (int j = 0; j < fCompilerCommands.length; j++) { >+ if (token.indexOf(fCompilerCommands[j], searchFromOffset) != -1) { >+ return i; >+ } >+ } >+ } >+ return -1; >+ } >+ >+ public void startup(IProject project, IPath workingDirectory, IScannerInfoCollector collector, >+ IMarkerGenerator markerGenerator) { >+ fProject = project; >+ fWorkingDir = workingDirectory; >+ fCollector = collector; >+ fMarkerGenerator = markerGenerator; >+ >+ } >+ >+ abstract protected boolean processCommand(String[] tokens); >+ >+ protected List<String> getFileExtensionsList() { >+ IContentTypeManager manager = Platform.getContentTypeManager(); >+ List<String> extensions = new LinkedList<String>(); >+ IContentType cSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CSOURCE); >+ IContentType cppSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CXXSOURCE); >+ >+ String[] cExtensions = cSource.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); >+ String[] cppExtensions = cppSource.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); >+ >+ for (int k = 0; k < cExtensions.length; k++) { >+ extensions.add("." + cExtensions[k]); >+ } >+ >+ for (int k = 0; k < cppExtensions.length; k++) { >+ extensions.add("." + cppExtensions[k]); >+ } >+ >+ return extensions; >+ } >+ >+ protected String[] getFileExtensions() { >+ IContentTypeManager manager = Platform.getContentTypeManager(); >+ List<String> extensions = new LinkedList<String>(); >+ IContentType cSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CSOURCE); >+ IContentType cppSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CXXSOURCE); >+ >+ String[] cExtensions = cSource.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); >+ String[] cppExtensions = cppSource.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); >+ >+ for (int k = 0; k < cExtensions.length; k++) { >+ extensions.add("." + cExtensions[k]); >+ } >+ >+ for (int k = 0; k < cppExtensions.length; k++) { >+ extensions.add("." + cppExtensions[k]); >+ } >+ >+ return extensions.toArray(new String[0]); >+ } >+ >+} >Index: src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java >=================================================================== >RCS file: src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java >diff -N src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,117 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 IBM Corporation and others. >+ * 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 - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.cdt.make.xlc.core.scannerconfig; >+ >+import java.util.ArrayList; >+import java.util.HashMap; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.CCommandDSC; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IWorkspaceRoot; >+import org.eclipse.core.resources.ResourcesPlugin; >+import org.eclipse.core.runtime.IPath; >+ >+/** >+ * @author crecoskie >+ * >+ */ >+public class XLCPerFileBuildOutputParser extends AbstractXLCBuildOutputParser { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.cdt.make.xlc.core.scannerconfig.AbstractXLCBuildOutputParser#processCommand(java.lang.String[]) >+ */ >+ @Override >+ protected boolean processCommand(String[] tokens) { >+ // GCC C/C++ compiler invocation >+ int compilerInvocationIndex= findCompilerInvocation(tokens); >+ if (compilerInvocationIndex < 0) { >+ return false; >+ } >+ >+ // find a file name >+ int extensionsIndex = -1; >+ boolean found = false; >+ String filePath = null; >+ for (int i = compilerInvocationIndex+1; i < tokens.length; i++) { >+ String token= tokens[i]; >+ int k = token.lastIndexOf('.'); >+ if (k != -1 && (token.length() - k < 5)) { >+ String fileExtension = token.substring(k); >+ extensionsIndex = getFileExtensionsList().indexOf(fileExtension); >+ if (extensionsIndex != -1) { >+ filePath = token; >+ found = true; >+ break; >+ } >+ } >+ } >+ if (!found) { >+ TraceUtil.outputTrace("Error identifying file name :1", tokens, TraceUtil.EOL); //$NON-NLS-1$ >+ return false; >+ } >+ // sanity check >+ if (filePath.indexOf(getFileExtensions()[extensionsIndex]) == -1) { >+ TraceUtil.outputTrace("Error identifying file name :2", tokens, TraceUtil.EOL); //$NON-NLS-1$ >+ return false; >+ } >+ if (fUtility != null) { >+ IPath pFilePath = fUtility.getAbsolutePath(filePath); >+ String shortFileName = pFilePath.removeFileExtension().lastSegment(); >+ >+ // generalize occurrences of the file name >+ for (int i = compilerInvocationIndex+1; i < tokens.length; i++) { >+ String token = tokens[i]; >+ if (token.equals("-include")) { //$NON-NLS-1$ >+ ++i; >+ } >+ else if (token.equals("-imacros")) { //$NON-NLS-1$ >+ ++i; >+ } >+ else if (token.equals(filePath)) { >+ tokens[i]= "LONG_NAME"; //$NON-NLS-1$ >+ } >+ else if (token.startsWith(shortFileName)) { >+ tokens[i]= token.replaceFirst(shortFileName, "SHORT_NAME"); //$NON-NLS-1$ >+ } >+ } >+ >+ IFile file= null; >+ IPath baseDirectory= fUtility.getBaseDirectory(); >+ if (baseDirectory.isPrefixOf(pFilePath)) { >+ IPath relPath = pFilePath.removeFirstSegments(baseDirectory.segmentCount()); >+ //Note: We add the scanner-config even if the resource doesn't actually >+ //exist below this project (which may happen when reading existing >+ //build logs, because resources can be created as part of the build >+ //and may not exist at the time of analyzing the config but re-built >+ //later on. >+ //if (getProject().exists(relPath)) { >+ file = getProject().getFile(relPath); >+ } else { >+ file = getUtility().findFileInWorkspace(pFilePath); >+ } >+ if (file != null) { >+ CCommandDSC cmd = getUtility().getNewCCommandDSC(tokens, compilerInvocationIndex, extensionsIndex > 0); >+ List cmdList = new ArrayList(); >+ cmdList.add(cmd); >+ Map sc = new HashMap(1); >+ sc.put(ScannerInfoTypes.COMPILER_COMMAND, cmdList); >+ getCollector().contributeToScannerConfig(file, sc); >+ } else >+ TraceUtil.outputError("Build command for file outside project: "+pFilePath.toString(), tokens); //$NON-NLS-1$ >+ } >+ return true; } >+ >+} >Index: src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerProjectXLCScannerInfoCollector.java >=================================================================== >RCS file: src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerProjectXLCScannerInfoCollector.java >diff -N src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerProjectXLCScannerInfoCollector.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerProjectXLCScannerInfoCollector.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+/******************************************************************************* >+ * Copyright (c) 2007, 20089 IBM Corporation and others. >+ * 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 org.eclipse.cdt.make.xlc.core.scannerconfig; >+ >+import java.util.Arrays; >+import java.util.LinkedList; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.PerFileSICollector; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector; >+import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector; >+import org.eclipse.core.runtime.IPath; >+ >+/** >+ * @author laggarcia >+ * >+ */ >+public class PerProjectXLCScannerInfoCollector extends PerProjectSICollector >+ implements IScannerInfoCollector3, IManagedScannerInfoCollector { >+} >Index: src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java >=================================================================== >RCS file: src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java >diff -N src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,712 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2009 IBM Corporation and others. >+ * 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 - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.cdt.make.xlc.core.scannerconfig; >+ >+import java.io.File; >+import java.io.IOException; >+import java.net.URI; >+import java.net.URISyntaxException; >+import java.util.ArrayList; >+import java.util.HashMap; >+import java.util.Iterator; >+import java.util.List; >+import java.util.Map; >+import java.util.Vector; >+ >+import org.eclipse.cdt.core.IMarkerGenerator; >+import org.eclipse.cdt.core.ProblemMarkerInfo; >+import org.eclipse.cdt.make.core.MakeCorePlugin; >+import org.eclipse.cdt.make.internal.core.MakeMessages; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.CCommandDSC; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.KVStringPair; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.SCDOptionsEnum; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil; >+import org.eclipse.cdt.utils.FileSystemUtilityManager; >+import org.eclipse.core.resources.IContainer; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.resources.IWorkspaceRoot; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.Path; >+ >+/** >+ * @author crecoskie >+ * >+ */ >+public class XLCBuildOutputParserUtility { >+ protected class Problem { >+ protected String description; >+ protected IResource file; >+ protected int lineNumber; >+ protected int severity; >+ protected String variableName; >+ >+ public Problem(IResource file, int lineNumber, String desciption, int severity, String variableName) { >+ this.file = file; >+ this.lineNumber = lineNumber; >+ this.description = desciption; >+ this.severity = severity; >+ this.variableName = variableName; >+ } >+ } >+ public static IPath convertCygpath(IPath path) { >+ if (path.segmentCount() > 1 && path.segment(0).equals("cygdrive")) { //$NON-NLS-1$ >+ StringBuffer buf = new StringBuffer(2); >+ buf.append(Character.toUpperCase(path.segment(1).charAt(0))); >+ buf.append(':'); >+ path = path.removeFirstSegments(2); >+ path = path.setDevice(buf.toString()); >+ path = path.makeAbsolute(); >+ } >+ return path; >+ } >+ private List commandsList2; >+ private int commandsN = 0; >+ private List compiledFileList; >+ >+ private Map directoryCommandListMap; >+ >+ private IPath fBaseDirectory; >+ private String fDefaultMacroDefinitionValue= "1"; //$NON-NLS-1$ >+ private Vector<IPath> fDirectoryStack; >+ private ArrayList<Problem> fErrors; >+ private int filesN = 0; >+ >+ private IMarkerGenerator fMarkerGenerator; >+ >+ private IProject project; >+ >+ private int workingDirsN = 0; >+ >+ /* >+ * For tracking the location of files being compiled >+ */ >+ private Map<String, IFile> fFilesInProject; >+ private List<String> fCollectedFiles; >+ private List<String> fNameConflicts; >+ >+ /** >+ * >+ */ >+ public XLCBuildOutputParserUtility(IProject project, IPath workingDirectory, >+ IMarkerGenerator markerGenerator) { >+ fDirectoryStack = new Vector<IPath>(); >+ fErrors = new ArrayList<Problem>(); >+ this.project = project; >+ fBaseDirectory = getPathForResource(project); >+ if (workingDirectory != null) { >+ pushDirectory(workingDirectory); >+ } >+ } >+ >+ private IPath getPathForResource(IResource resource) { >+ // TODO: when the file system utility stuff is in, this will have to call it to get the path >+ // for now, get the path from the URI >+ URI locationURI = resource.getLocationURI(); >+ IPath path = new Path(locationURI.getPath()); >+ return path; >+ } >+ >+ /** >+ * Adds a mapping filename, generic_command >+ * @param longFileName >+ * @param genericLine >+ */ >+ void addGenericCommandForFile(String longFileName, String genericCommand) { >+ // if a file name has already been added once, return >+ if (compiledFileList.contains(longFileName)) >+ return; >+ compiledFileList.add(longFileName); >+ >+ String workingDir = getWorkingDirectory().toString(); >+ List directoryCommandList = (List) directoryCommandListMap.get(workingDir); >+ if (directoryCommandList == null) { >+ directoryCommandList = new ArrayList(); >+ directoryCommandListMap.put(workingDir, directoryCommandList); >+ ++workingDirsN; >+ } >+ Map command21FileListMap = null; >+ for (Iterator i = directoryCommandList.iterator(); i.hasNext(); ) { >+ command21FileListMap = (Map) i.next(); >+ List fileList = (List) command21FileListMap.get(genericCommand); >+ if (fileList != null) { >+ if (!fileList.contains(longFileName)) { >+ fileList.add(longFileName); >+ ++filesN; >+ } >+ return; >+ } >+ } >+ command21FileListMap = new HashMap(1); >+ directoryCommandList.add(command21FileListMap); >+ ++commandsN; >+ List fileList = new ArrayList(); >+ command21FileListMap.put(genericCommand, fileList); >+ fileList.add(longFileName); >+ ++filesN; >+ } >+ >+ /** >+ * Adds a mapping command line -> file, this time without a dir >+ * @param longFileName >+ * @param genericLine >+ */ >+ void addGenericCommandForFile2(String longFileName, String genericLine) { >+ // if a file name has already been added once, return >+ if (compiledFileList.contains(longFileName)) >+ return; >+ compiledFileList.add(longFileName); >+ >+ String[] tokens = genericLine.split("\\s+"); //$NON-NLS-1$ >+ CCommandDSC command = getNewCCommandDSC(tokens, 0, false); // assume .c file type >+ int index = commandsList2.indexOf(command); >+ if (index == -1) { >+ commandsList2.add(command); >+ ++commandsN; >+ } >+ else { >+ command = (CCommandDSC) commandsList2.get(index); >+ } >+// // add a file >+// command.addFile(longFileName); >+// ++filesN; >+ } >+ >+ public void changeMakeDirectory(String dir, int dirLevel, boolean enterDir) { >+ if (enterDir) { >+ /* Sometimes make screws up the output, so >+ * "leave" events can't be seen. Double-check level >+ * here. >+ */ >+ for (int parseLevel = getDirectoryLevel(); dirLevel < parseLevel; parseLevel = getDirectoryLevel()) { >+ popDirectory(); >+ } >+ pushDirectory(new Path(dir)); >+ } else { >+ popDirectory(); >+ /* Could check to see if they match */ >+ } >+ } >+ >+ /** >+ * Called by the console line parsers to generate a problem marker. >+ */ >+ public void generateMarker(IResource file, int lineNumber, String desc, int severity, String varName) { >+ // No need to collect markers if marker generator is not present >+ if (fMarkerGenerator != null) { >+ Problem problem = new Problem(file, lineNumber, desc, severity, varName); >+ fErrors.add(problem); >+ } >+ } >+ >+ /** >+ * >+ */ >+ void generateReport() { >+ TraceUtil.metricsTrace("Stats for directory ", //$NON-NLS-1$ >+ "Generic command: '", "' applicable for:", //$NON-NLS-1$ //$NON-NLS-2$ >+ directoryCommandListMap); >+ TraceUtil.summaryTrace("Discovery summary", workingDirsN, commandsN, filesN); //$NON-NLS-1$ >+ } >+ >+ /** >+ * @param filePath : String >+ * @return filePath : IPath - not <code>null</code> >+ */ >+ public IPath getAbsolutePath(String filePath) { >+ IPath pFilePath; >+ if (filePath.startsWith("/")) { //$NON-NLS-1$ >+ return convertCygpath(new Path(filePath)); >+ } >+ else if (filePath.startsWith("\\") || //$NON-NLS-1$ >+ (!filePath.startsWith(".") && //$NON-NLS-1$ >+ filePath.length() > 2 && filePath.charAt(1) == ':' && >+ (filePath.charAt(2) == '\\' || filePath.charAt(2) == '/'))) { >+ // absolute path >+ pFilePath = new Path(filePath); >+ } >+ else { >+ // relative path >+ IPath cwd = getWorkingDirectory(); >+ if (!cwd.isAbsolute()) { >+ cwd = getBaseDirectory().append(cwd); >+ } >+ if (filePath.startsWith("`pwd`")) { //$NON-NLS-1$ >+ if (filePath.length() > 5 && (filePath.charAt(5) == '/' || filePath.charAt(5) == '\\')) { >+ filePath = filePath.substring(6); >+ } >+ else { >+ filePath = filePath.substring(5); >+ } >+ } >+ pFilePath = cwd.append(filePath); >+ } >+ return pFilePath; >+ } >+ /** >+ * @return Returns the fBaseDirectory. >+ */ >+ public IPath getBaseDirectory() { >+ return fBaseDirectory; >+ } >+ >+ /** >+ * Returns all CCommandDSC collected so far. >+ * Currently this list is not filled, so it will always return an empty list. >+ * @return List of CCommandDSC >+ */ >+ public List getCCommandDSCList() { >+ return new ArrayList(commandsList2); >+ } >+ >+ protected int getDirectoryLevel() { >+ return fDirectoryStack.size(); >+ } >+ /** >+ * @return Returns the fDirectoryStack. >+ */ >+ protected Vector<IPath> getDirectoryStack() { >+ return fDirectoryStack; >+ } >+ /** >+ * @return Returns the fErrors. >+ */ >+ protected ArrayList<Problem> getErrors() { >+ return fErrors; >+ } >+ /** >+ * @return Returns the fMarkerGenerator. >+ */ >+ protected IMarkerGenerator getMarkerGenerator() { >+ return fMarkerGenerator; >+ } >+ >+ /** >+ * @param genericLine >+ * @param cppFileType >+ * @return CCommandDSC compile command description >+ */ >+ public CCommandDSC getNewCCommandDSC(String[] tokens, final int idxOfCompilerCommand, boolean cppFileType) { >+ ArrayList dirafter = new ArrayList(); >+ ArrayList includes = new ArrayList(); >+ CCommandDSC command = new CCommandDSC(cppFileType, getProject()); >+ command.addSCOption(new KVStringPair(SCDOptionsEnum.COMMAND.toString(), tokens[idxOfCompilerCommand])); >+ for (int i = idxOfCompilerCommand+1; i < tokens.length; ++i) { >+ String token = tokens[i]; >+ //Target specific options: see GccScannerInfoConsoleParser >+ if (token.startsWith("-m") || //$NON-NLS-1$ >+ token.equals("-ansi") || //$NON-NLS-1$ >+ token.equals("-posix") || //$NON-NLS-1$ >+ token.equals("-pthread") || //$NON-NLS-1$ >+ token.startsWith("-O") || //$NON-NLS-1$ >+ token.equals("-fno-inline") || //$NON-NLS-1$ >+ token.startsWith("-finline") || //$NON-NLS-1$ >+ token.equals("-fno-exceptions") || //$NON-NLS-1$ >+ token.equals("-fexceptions") || //$NON-NLS-1$ >+ token.equals("-fshort-wchar") || //$NON-NLS-1$ >+ token.equals("-fshort-double") || //$NON-NLS-1$ >+ token.equals("-fno-signed-char") || //$NON-NLS-1$ >+ token.equals("-fsigned-char") || //$NON-NLS-1$ >+ token.startsWith("-fabi-version=") //$NON-NLS-1$ >+ ) { >+ command.addSCOption(new KVStringPair(SCDOptionsEnum.COMMAND.toString(), token)); >+ continue; >+ } >+ for (int j = SCDOptionsEnum.MIN; j <= SCDOptionsEnum.MAX; ++j) { >+ final SCDOptionsEnum optionKind = SCDOptionsEnum.getSCDOptionsEnum(j); >+ if (token.startsWith(optionKind.toString())) { >+ String option = token.substring( >+ optionKind.toString().length()).trim(); >+ if (option.length() > 0) { >+ // ex. -I/dir >+ } >+ else if (optionKind.equals(SCDOptionsEnum.IDASH)) { >+ for (Iterator iter=includes.iterator(); iter.hasNext(); ) { >+ option = (String)iter.next(); >+ KVStringPair pair = new KVStringPair(SCDOptionsEnum.IQUOTE.toString(), option); >+ command.addSCOption(pair); >+ } >+ includes = new ArrayList(); >+ // -I- has no parameter >+ } >+ else { >+ // ex. -I /dir >+ // take a next token >+ if (i+1 < tokens.length && !tokens[i+1].startsWith("-")) { //$NON-NLS-1$ >+ option = tokens[++i]; >+ } >+ else break; >+ } >+ >+ if (option.length() > 0 && ( >+ optionKind.equals(SCDOptionsEnum.INCLUDE) || >+ optionKind.equals(SCDOptionsEnum.INCLUDE_FILE) || >+ optionKind.equals(SCDOptionsEnum.IMACROS_FILE) || >+ optionKind.equals(SCDOptionsEnum.IDIRAFTER) || >+ optionKind.equals(SCDOptionsEnum.ISYSTEM) || >+ optionKind.equals(SCDOptionsEnum.IQUOTE) )) { >+ option = (getAbsolutePath(option)).toString(); >+ } >+ >+ if (optionKind.equals(SCDOptionsEnum.IDIRAFTER)) { >+ KVStringPair pair = new KVStringPair(SCDOptionsEnum.INCLUDE.toString(), option); >+ dirafter.add(pair); >+ } >+ else if (optionKind.equals(SCDOptionsEnum.INCLUDE)) { >+ includes.add(option); >+ } >+ else { // add the pair >+ if (optionKind.equals(SCDOptionsEnum.DEFINE)) { >+ if (option.indexOf('=') == -1) { >+ option += '='+ fDefaultMacroDefinitionValue; >+ } >+ } >+ KVStringPair pair = new KVStringPair(optionKind.toString(), option); >+ command.addSCOption(pair); >+ } >+ break; >+ } >+ } >+ } >+ String option; >+ for (Iterator iter=includes.iterator(); iter.hasNext(); ) { >+ option = (String)iter.next(); >+ KVStringPair pair = new KVStringPair(SCDOptionsEnum.INCLUDE.toString(), option); >+ command.addSCOption(pair); >+ } >+ for (Iterator iter=dirafter.iterator(); iter.hasNext(); ) { >+ command.addSCOption((KVStringPair)iter.next()); >+ } >+ return command; >+ } >+ >+ /** >+ * @return Returns the project. >+ */ >+ protected IProject getProject() { >+ return project; >+ } >+ >+ public IPath getWorkingDirectory() { >+ if (fDirectoryStack.size() != 0) { >+ return fDirectoryStack.lastElement(); >+ } >+ // Fallback to the Project Location >+ // FIXME: if the build did not start in the Project ? >+ return fBaseDirectory; >+ } >+ >+ protected IPath popDirectory() { >+ int i = getDirectoryLevel(); >+ if (i != 0) { >+ IPath dir = fDirectoryStack.lastElement(); >+ fDirectoryStack.removeElementAt(i - 1); >+ return dir; >+ } >+ return new Path(""); //$NON-NLS-1$ >+ } >+ >+ protected void pushDirectory(IPath dir) { >+ if (dir != null) { >+ IPath pwd = null; >+ if (fBaseDirectory != null && fBaseDirectory.isPrefixOf(dir)) { >+ pwd = dir.removeFirstSegments(fBaseDirectory.segmentCount()); >+ } else { >+ // check if it is a cygpath >+ pwd= convertCygpath(dir); >+ } >+ fDirectoryStack.addElement(pwd); >+ } >+ } >+ >+ public boolean reportProblems() { >+ boolean reset = false; >+ for (Iterator<Problem> iter = fErrors.iterator(); iter.hasNext(); ) { >+ Problem problem = iter.next(); >+ if (problem.severity == IMarkerGenerator.SEVERITY_ERROR_BUILD) { >+ reset = true; >+ } >+ if (problem.file == null) { >+ fMarkerGenerator.addMarker(new ProblemMarkerInfo( >+ project, >+ problem.lineNumber, >+ problem.description, >+ problem.severity, >+ problem.variableName)); >+ } else { >+ fMarkerGenerator.addMarker(new ProblemMarkerInfo( >+ problem.file, >+ problem.lineNumber, >+ problem.description, >+ problem.severity, >+ problem.variableName)); >+ } >+ } >+ fErrors.clear(); >+ return reset; >+ } >+ >+ public void setDefaultMacroDefinitionValue(String val) { >+ if (val != null) { >+ fDefaultMacroDefinitionValue= val; >+ } >+ } >+ >+ public String getDefaultMacroDefinitionValue() { >+ return fDefaultMacroDefinitionValue; >+ } >+ >+ public String normalizePath(String path) { >+ int column = path.indexOf(':'); >+ if (column > 0) { >+ char driveLetter = path.charAt(column - 1); >+ if (Character.isLowerCase(driveLetter)) { >+ StringBuffer sb = new StringBuffer(); >+ if (column - 1 > 0) { >+ sb.append(path.substring(0, column-1)); >+ } >+ sb.append(Character.toUpperCase(driveLetter)); >+ sb.append(path.substring(column)); >+ path = sb.toString(); >+ } >+ } >+ if (path.indexOf('.') == -1 || path.equals(".")) { //$NON-NLS-1$ >+ return (new Path(path)).toString(); // convert separators to '/' >+ } >+ // lose "./" segments since they confuse the Path normalization >+ StringBuffer buf = new StringBuffer(path); >+ int len = buf.length(); >+ StringBuffer newBuf = new StringBuffer(buf.length()); >+ int scp = 0; // starting copy point >+ int ssp = 0; // starting search point >+ int sdot; >+ boolean validPrefix; >+ while (ssp < len && (sdot = buf.indexOf(".", ssp)) != -1) { //$NON-NLS-1$ >+ validPrefix = false; >+ int ddot = buf.indexOf("..", ssp);//$NON-NLS-1$ >+ if (sdot < ddot || ddot == -1) { >+ newBuf.append(buf.substring(scp, sdot)); >+ scp = sdot; >+ ssp = sdot + 1; >+ if (ssp < len) { >+ if (sdot == 0 || buf.charAt(sdot - 1) == '/' || buf.charAt(sdot - 1) == '\\') { >+ validPrefix = true; >+ } >+ char nextChar = buf.charAt(ssp); >+ if (validPrefix && nextChar == '/') { >+ ++ssp; >+ scp = ssp; >+ } >+ else if (validPrefix && nextChar == '\\') { >+ ++ssp; >+ if (ssp < len - 1 && buf.charAt(ssp) == '\\') { >+ ++ssp; >+ } >+ scp = ssp; >+ } >+ else { >+ // no path delimiter, must be '.' inside the path >+ scp = ssp - 1; >+ } >+ } >+ } >+ else if (sdot == ddot) { >+ ssp = sdot + 2; >+ } >+ } >+ newBuf.append(buf.substring(scp, len)); >+ >+ IPath orgPath = new Path(newBuf.toString()); >+ return orgPath.toString(); >+ } >+ >+ >+ /** >+ * Called by the console line parsers to find a file with a given name. >+ * @param fileName >+ * @return IFile or null >+ */ >+ public IFile findFile(String fileName) { >+ IFile file = findFilePath(fileName); >+ if (file == null) { >+ // Try the project's map. >+ file = findFileName(fileName); >+ if (file != null) { >+ // If there is a conflict then try all files in the project. >+ if (isConflictingName(fileName)) { >+ file = null; >+ >+ // Create a problem marker >+ final String error = MakeMessages.getString("ConsoleParser.Ambiguous_Filepath_Error_Message"); //$NON-NLS-1$ >+ TraceUtil.outputError(error, fileName); >+ generateMarker(getProject(), -1, error+fileName, IMarkerGenerator.SEVERITY_WARNING, null); >+ } >+ } >+ } >+ return file; >+ } >+ >+ /** >+ * @param filePath >+ * @return >+ */ >+ protected IFile findFilePath(String filePath) { >+ IPath path = null; >+ IPath fp = new Path(filePath); >+ if (fp.isAbsolute()) { >+ if (getBaseDirectory().isPrefixOf(fp)) { >+ int segments = getBaseDirectory().matchingFirstSegments(fp); >+ path = fp.removeFirstSegments(segments); >+ } else { >+ path = fp; >+ } >+ } else { >+ path = getWorkingDirectory().append(filePath); >+ } >+ >+ IFile file = null; >+ // The workspace may throw an IllegalArgumentException >+ // Catch it and the parser should fallback to scan the entire project. >+ try { >+ file = findFileInWorkspace(path); >+ } catch (Exception e) { >+ } >+ >+ // We have to do another try, on Windows for cases like "TEST.C" vs "test.c" >+ // We use the java.io.File canonical path. >+ if (file == null || !file.exists()) { >+ File f = path.toFile(); >+ try { >+ String canon = f.getCanonicalPath(); >+ path = new Path(canon); >+ file = findFileInWorkspace(path); >+ } catch (IOException e1) { >+ } >+ } >+ return (file != null && file.exists()) ? file : null; >+ } >+ >+ /** >+ * @param fileName >+ * @return >+ */ >+ protected IFile findFileName(String fileName) { >+ IPath path = new Path(fileName); >+ return (IFile) fFilesInProject.get(path.lastSegment()); >+ } >+ >+ protected IFile findFileInWorkspace(IPath path) { >+ IFile file = null; >+ if (path.isAbsolute()) { >+ IWorkspaceRoot root = getProject().getWorkspace().getRoot(); >+ >+ // construct a URI, based on the project's locationURI, that points >+ // to the given path >+ URI projectURI = project.getLocationURI(); >+ >+ URI newURI = FileSystemUtilityManager.getDefault().replacePath(projectURI, path.toString()); >+ >+ IFile[] files = root.findFilesForLocationURI(newURI); >+ >+ for (int i = 0; i < files.length; i++) { >+ if (files[i].getProject().equals(getProject())) { >+ file = files[i]; >+ break; >+ } >+ } >+ >+ } else { >+ file = getProject().getFile(path); >+ } >+ return file; >+ } >+ >+ protected void collectFiles(IContainer parent, List result) { >+ try { >+ IResource[] resources = parent.members(); >+ for (int i = 0; i < resources.length; i++) { >+ IResource resource = resources[i]; >+ if (resource instanceof IFile) { >+ result.add(resource); >+ } else if (resource instanceof IContainer) { >+ collectFiles((IContainer) resource, result); >+ } >+ } >+ } catch (CoreException e) { >+ MakeCorePlugin.log(e.getStatus()); >+ } >+ } >+ >+ protected boolean isConflictingName(String fileName) { >+ IPath path = new Path(fileName); >+ return fNameConflicts.contains(path.lastSegment()); >+ } >+ >+ public List translateRelativePaths(IFile file, String fileName, List includes) { >+ List translatedIncludes = new ArrayList(includes.size()); >+ for (Iterator i = includes.iterator(); i.hasNext(); ) { >+ String include = (String) i.next(); >+ IPath includePath = new Path(include); >+ if (!includePath.isAbsolute() && !includePath.isUNC()) { // do not translate UNC paths >+ // First try the current working directory >+ IPath cwd = getWorkingDirectory(); >+ if (!cwd.isAbsolute()) { >+ cwd = getBaseDirectory().append(cwd); >+ } >+ >+ IPath filePath = new Path(fileName); >+ if (!filePath.isAbsolute()) { >+ // check if the cwd is the right one >+ // appending fileName to cwd should yield file path >+ filePath = cwd.append(fileName); >+ } >+ if (!filePath.toString().equalsIgnoreCase(file.getLocation().toString())) { >+ // must be the cwd is wrong >+ // check if file name starts with ".." >+ if (fileName.startsWith("..")) { //$NON-NLS-1$ >+ // probably multiple choices for cwd, hopeless >+ final String error = MakeMessages.getString("ConsoleParser.Working_Directory_Error_Message"); //$NON-NLS-1$ >+ TraceUtil.outputError(error, fileName); >+ generateMarker(file, -1, error, IMarkerGenerator.SEVERITY_WARNING, fileName); >+ break; >+ } >+ else { >+ // remove common segments at the end >+ IPath tPath = new Path(fileName); >+ if (fileName.startsWith(".")) { //$NON-NLS-1$ >+ tPath = tPath.removeFirstSegments(1); >+ } >+ // get the file path from the file >+ filePath = file.getLocation(); >+ IPath lastFileSegment = filePath.removeFirstSegments(filePath.segmentCount() - tPath.segmentCount()); >+ if (lastFileSegment.matchingFirstSegments(tPath) == tPath.segmentCount()) { >+ cwd = filePath.removeLastSegments(tPath.segmentCount()); >+ } >+ } >+ } >+ >+ IPath candidatePath = cwd.append(includePath); >+ File dir = candidatePath.toFile(); >+ include = candidatePath.toString(); >+ if (!dir.exists()) { >+ final String error = MakeMessages.getString("ConsoleParser.Nonexistent_Include_Path_Error_Message"); //$NON-NLS-1$ >+ TraceUtil.outputError(error, include); >+// generateMarker(file, -1, error+include, IMarkerGenerator.SEVERITY_WARNING, fileName); >+ } >+ } >+ // TODO VMIR for now add unresolved paths as well >+ translatedIncludes.add(include); >+ } >+ return translatedIncludes; >+ } >+} >Index: src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java >=================================================================== >RCS file: src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java >diff -N src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,173 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 IBM Corporation and others. >+ * 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 - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.cdt.make.xlc.core.scannerconfig; >+ >+import java.io.File; >+import java.io.IOException; >+import java.util.ArrayList; >+import java.util.HashMap; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.cdt.core.IMarkerGenerator; >+import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes; >+import org.eclipse.cdt.make.internal.core.MakeMessages; >+import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.AbstractGCCBOPConsoleParserUtility; >+import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IWorkspaceRoot; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.Path; >+ >+/** >+ * @author crecoskie >+ * >+ */ >+public class XLCPerProjectBuildOutputParser extends >+ AbstractXLCBuildOutputParser { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.cdt.make.xlc.core.scannerconfig.AbstractXLCBuildOutputParser#processCommand(java.lang.String[]) >+ */ >+ @Override >+ protected boolean processCommand(String[] tokens) { >+ int compilerInvocationIdx= findCompilerInvocation(tokens); >+ if (compilerInvocationIdx<0) { >+ return false; >+ } >+ >+ if (compilerInvocationIdx+1 >= tokens.length) { >+ return false; >+ } >+ >+ // Recognized gcc or g++ compiler invocation >+ List includes = new ArrayList(); >+ List symbols = new ArrayList(); >+ List targetSpecificOptions = new ArrayList(); >+ >+ String fileName = null; >+ for (int j= compilerInvocationIdx+1; j < tokens.length; j++) { >+ String token = tokens[j]; >+ if (token.equals(DASHIDASH)) { >+ } >+ else if (token.startsWith(DASHI)) { >+ String candidate= null; >+ if (token.length() > 2) { >+ candidate= token.substring(2).trim(); >+ } >+ else if (j+1 < tokens.length) { >+ candidate= tokens[j+1]; >+ if (candidate.startsWith("-")) { //$NON-NLS-1$ >+ candidate= null; >+ } >+ else { >+ j++; >+ } >+ } >+ if (candidate != null && candidate.length() > 0) { >+ if (getUtility() != null) { >+ candidate= getUtility().normalizePath(candidate); >+ } >+ if (!includes.contains(candidate)) { >+ includes.add(candidate); >+ } >+ } >+ } >+ else if (token.startsWith(DASHD)) { >+ String candidate= null; >+ if (token.length() > 2) { >+ candidate= token.substring(2).trim(); >+ } >+ else if (j+1 < tokens.length) { >+ candidate= tokens[j+1]; >+ if (candidate.startsWith("-")) { //$NON-NLS-1$ >+ candidate= null; >+ } >+ else { >+ j++; >+ } >+ } >+ if (candidate != null && candidate.length() > 0) { >+ if (candidate.indexOf('=') == -1) { >+ candidate+= '='+ getUtility().getDefaultMacroDefinitionValue(); >+ } >+ if (!symbols.contains(candidate)) { >+ symbols.add(candidate); >+ } >+ } >+ } >+ >+ else if (fileName == null) { >+ int extIndex = token.lastIndexOf('.'); >+ String extension=null; >+ >+ if(extIndex != -1) >+ extension = token.substring(extIndex); >+ >+ List<String> extensions = getFileExtensionsList(); >+ if(extension != null && extensions.contains(extension)) >+ fileName = token; >+ } >+ } >+ >+ if (fileName == null) { >+ return false; // return when no file was given (analogous to GCCPerFileBOPConsoleParser) >+ } >+ >+ IProject project = getProject(); >+ IFile file = null; >+ List translatedIncludes = includes; >+ if (includes.size() > 0) { >+ if (fileName != null) { >+ if (getUtility() != null) { >+ file = getUtility().findFile(fileName); >+ if (file != null) { >+ project = file.getProject(); >+ translatedIncludes = getUtility().translateRelativePaths(file, fileName, includes); >+ } >+ } >+ } >+ else { >+ StringBuffer line= new StringBuffer(); >+ for (int j = 0; j < tokens.length; j++) { >+ line.append(tokens[j]); >+ line.append(' '); >+ } >+ final String error = MakeMessages.getString("ConsoleParser.Filename_Missing_Error_Message"); //$NON-NLS-1$ >+ TraceUtil.outputError(error, line.toString()); >+ if (getUtility() != null) { >+ getUtility().generateMarker(getProject(), -1, error + line.toString(), IMarkerGenerator.SEVERITY_WARNING, null); >+ } >+ } >+ if (file == null && getUtility() != null) { // real world case >+ // remove include paths since there was no chance to translate them >+ translatedIncludes.clear(); >+ } >+ } >+ // Contribute discovered includes and symbols to the ScannerInfoCollector >+ if (translatedIncludes.size() > 0 || symbols.size() > 0) { >+ Map scannerInfo = new HashMap(); >+ scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, translatedIncludes); >+ scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols); >+ scannerInfo.put(ScannerInfoTypes.TARGET_SPECIFIC_OPTION, targetSpecificOptions); >+ getCollector().contributeToScannerConfig(project, scannerInfo); >+ >+ TraceUtil.outputTrace("Discovered scanner info for file \'" + fileName + '\'', //$NON-NLS-1$ >+ "Include paths", includes, translatedIncludes, "Defined symbols", symbols); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ return true; >+ >+} >+ >+ >+ >+} >Index: src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java >=================================================================== >RCS file: src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java >diff -N src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,53 @@ >+/******************************************************************************* >+ * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * 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 org.eclipse.cdt.make.xlc.core.scannerconfig; >+ >+import java.util.Arrays; >+import java.util.LinkedList; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3; >+import org.eclipse.cdt.make.internal.core.scannerconfig2.PerFileSICollector; >+import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector; >+import org.eclipse.core.runtime.IPath; >+ >+/** >+ * @author laggarcia >+ * >+ */ >+public class PerFileXLCScannerInfoCollector extends PerFileSICollector >+ implements IScannerInfoCollector3, IManagedScannerInfoCollector { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector#getDefinedSymbols() >+ */ >+ public Map getDefinedSymbols() { >+ return getAllSymbols(); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector#getIncludePaths() >+ */ >+ public List getIncludePaths() { >+ List<String> pathStrings = new LinkedList<String>(); >+ >+ List<IPath> paths = Arrays.asList(getAllIncludePaths(INCLUDE_PATH)); >+ paths.addAll(Arrays.asList(getAllIncludePaths(QUOTE_INCLUDE_PATH))); >+ >+ for(IPath path : paths) { >+ pathStrings.add(path.toString()); >+ } >+ >+ return pathStrings; >+ } >+ >+} >#P org.eclipse.cdt.managedbuilder.xlc.ui >Index: src/org/eclipse/cdt/managedbuilder/xlc/ui/Messages.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/Messages.java,v >retrieving revision 1.2.2.2 >diff -u -r1.2.2.2 Messages.java >--- src/org/eclipse/cdt/managedbuilder/xlc/ui/Messages.java 7 Nov 2008 14:25:04 -0000 1.2.2.2 >+++ src/org/eclipse/cdt/managedbuilder/xlc/ui/Messages.java 28 Oct 2009 16:52:49 -0000 >@@ -17,6 +17,7 @@ > private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.xlc.ui.messages"; //$NON-NLS-1$ > public static String XLCompiler_v8; > public static String XLCompiler_v9; >+ public static String XLCompiler_v10; > public static String XLCompilerPreferencePage_0; > public static String XLCompilerPreferencePage_1; > public static String XLCompilerPreferencePage_2; >Index: src/org/eclipse/cdt/managedbuilder/xlc/ui/messages.properties >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/messages.properties,v >retrieving revision 1.3.2.2 >diff -u -r1.3.2.2 messages.properties >--- src/org/eclipse/cdt/managedbuilder/xlc/ui/messages.properties 7 Nov 2008 14:25:04 -0000 1.3.2.2 >+++ src/org/eclipse/cdt/managedbuilder/xlc/ui/messages.properties 28 Oct 2009 16:52:49 -0000 >@@ -11,6 +11,7 @@ > > XLCompiler_v8=v8.0 > XLCompiler_v9=v9.0 >+XLCompiler_v10=v10.1 > XLCompilerPreferencePage_0=XL C/C++ Compiler Preferences > XLCompilerPreferencePage_1=Compiler Root Path: > XLCompilerPreferencePage_2=Compiler Version: >Index: src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/PreferenceConstants.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/PreferenceConstants.java,v >retrieving revision 1.3 >diff -u -r1.3 PreferenceConstants.java >--- src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/PreferenceConstants.java 11 Jun 2008 15:48:13 -0000 1.3 >+++ src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/PreferenceConstants.java 28 Oct 2009 16:52:49 -0000 >@@ -24,5 +24,6 @@ > > public static final String P_XL_COMPILER_VERSION_8_NAME = Messages.XLCompiler_v8; > public static final String P_XL_COMPILER_VERSION_9_NAME = Messages.XLCompiler_v9; >+ public static final String P_XL_COMPILER_VERSION_10_NAME = Messages.XLCompiler_v10; > > } >Index: src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/XLCompilerPreferencePage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/XLCompilerPreferencePage.java,v >retrieving revision 1.3.2.1 >diff -u -r1.3.2.1 XLCompilerPreferencePage.java >--- src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/XLCompilerPreferencePage.java 7 Nov 2008 14:25:04 -0000 1.3.2.1 >+++ src/org/eclipse/cdt/managedbuilder/xlc/ui/preferences/XLCompilerPreferencePage.java 28 Oct 2009 16:52:49 -0000 >@@ -58,16 +58,13 @@ > { > // always return true, as we don't want to fail cases when compiler is installed remotely > // just warn user >- if (getPage() != null) >+ if (!super.doCheckState()) > { >- if (!super.doCheckState()) >- { >- getPage().setMessage(Messages.XLCompilerPreferencePage_3, IMessageProvider.WARNING); >- } >- else >- { >- getPage().setMessage(originalMessage, 0); >- } >+ setMessage(Messages.XLCompilerPreferencePage_3, IMessageProvider.WARNING); >+ } >+ else >+ { >+ setMessage(originalMessage); > } > > return true; >@@ -83,7 +80,8 @@ > addField(pathEditor); > > String[][] versionEntries = {{PreferenceConstants.P_XL_COMPILER_VERSION_8_NAME, Messages.XLCompiler_v8}, >- {PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME, Messages.XLCompiler_v9}}; >+ {PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME, Messages.XLCompiler_v9}, >+ {PreferenceConstants.P_XL_COMPILER_VERSION_10_NAME, Messages.XLCompiler_v10}}; > > addField(new ComboFieldEditor(PreferenceConstants.P_XLC_COMPILER_VERSION, > Messages.XLCompilerPreferencePage_2, versionEntries, getFieldEditorParent())); >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.4 >diff -u -r1.4 MANIFEST.MF >--- META-INF/MANIFEST.MF 28 Jan 2008 18:27:47 -0000 1.4 >+++ META-INF/MANIFEST.MF 28 Oct 2009 16:52:49 -0000 >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName > Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.xlc.ui; singleton := true >-Bundle-Version: 5.0.0.qualifier >+Bundle-Version: 5.0.3.qualifier > Bundle-Activator: org.eclipse.cdt.managedbuilder.xlc.ui.XLCUIPlugin > Bundle-Localization: plugin > Require-Bundle: org.eclipse.ui, >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/plugin.xml,v >retrieving revision 1.13.2.3 >diff -u -r1.13.2.3 plugin.xml >--- plugin.xml 29 Sep 2009 19:44:29 -0000 1.13.2.3 >+++ plugin.xml 28 Oct 2009 16:52:49 -0000 >@@ -127,9 +127,9 @@ > </tool> > <tool > command="${XL_compilerRoot}/xlc" >- id="cdt.managedbuild.tool.xlc.c.compiler" >+ id="cdt.managedbuild.tool.xlc.c.compiler.abstract" > isAbstract="true" >- name="%ToolName.compiler.xlc.c" >+ name="Abstract XL C Compiler" > natureFilter="cnature" > outputFlag="-o" > superClass="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractCompiler"> >@@ -219,23 +219,26 @@ > value="__IBMC__"> > </listOptionValue> > </option> >+ <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.objcc" >+ command="-qunique" >+ defaultValue="false" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.output.unique.v10" >+ isAbstract="false" >+ name="%Option.unique.v10" >+ resourceFilter="all" >+ valueType="boolean"> >+ </option> > </tool> > <tool > command="${XL_compilerRoot}/xlC" >- id="cdt.managedbuild.tool.xlc.cpp.compiler" >+ id="cdt.managedbuild.tool.xlc.cpp.compiler.abstract" > isAbstract="true" >- name="%ToolName.compiler.xlc.cpp" >+ name="Abstract XL C++ Compiler" > natureFilter="ccnature" > outputFlag="-o" > superClass="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractCompiler"> >- <inputType >- dependencyContentType="org.eclipse.cdt.core.cxxHeader" >- dependencyExtensions="h,H,hpp" >- id="cdt.managedbuild.tool.xlc.cpp.compiler.input" >- scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP" >- sourceContentType="org.eclipse.cdt.core.cxxSource" >- sources="c,C,cc,cxx,cpp"> >- </inputType> > <option > category="xlc.c.compiler.category.Input" > command="-+" >@@ -275,6 +278,7 @@ > valueType="string"> > </option> > <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.output" > id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling" > isAbstract="false" >@@ -313,6 +317,66 @@ > </enumeratedOptionValue> > </option> > <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.output" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v10" >+ isAbstract="false" >+ name="%Option.namemangling.v10.name" >+ resourceFilter="all" >+ valueType="enumerated"> >+ <enumeratedOptionValue >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.default" >+ isDefault="true" >+ name="%Option.default"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=ansi" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.ansi" >+ name="%Option.namemangling.ansi"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v10" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v10" >+ name="%Option.namemangling.v10"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v9" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v9" >+ name="%Option.namemangling.v9"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v8" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v8" >+ name="%Option.namemangling.v8"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v7" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v7" >+ name="%Option.namemangling.v7"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v6" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.enumeratedOptionValue22" >+ name="%Option.namemangling.v6"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v5" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v5" >+ name="%Option.namemangling.v5"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v4" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v4" >+ name="%Option.namemangling.v4"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnamemangling=v3" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v3" >+ name="%Option.namemangling.v3"> >+ </enumeratedOptionValue> >+ </option> >+ >+ <option > category="xlc.c.compiler.category.output" > id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.objectmodel" > isAbstract="false" >@@ -370,7 +434,7 @@ > </enumeratedOptionValue> > </option> > <option >- category="xlc.c.compiler.category.output" >+ category="xlc.c.compiler.category.objcc" > command="-qunique" > defaultValue="false" > id="org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.output.unique" >@@ -449,12 +513,13 @@ > errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" > id="cdt.managedbuild.config.xlc.exe.debug"> > <toolChain >- archList="all" >- osList="all" >- name="%ToolChainName.Dbg" >- targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.debug;cdt.managedbuild.tool.xlc.cpp.linker.exe.debug" >- configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier" >- id="cdt.managedbuild.toolchain.xlc.exe.debug"> >+ archList="all" >+ configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier" >+ id="cdt.managedbuild.toolchain.xlc.exe.debug" >+ name="%ToolChainName.Dbg" >+ osList="all" >+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP" >+ targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.debug;cdt.managedbuild.tool.xlc.cpp.linker.exe.debug"> > <targetPlatform > id="cdt.managedbuild.target.xlc.platform.exe.debug" > name="%PlatformName.Dbg" >@@ -514,11 +579,12 @@ > errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" > id="cdt.managedbuild.config.xlc.exe.release"> > <toolChain >- archList="all" >- osList="all" >- name="%ToolChainName.Rel" >- targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.release;cdt.managedbuild.tool.xlc.cpp.linker.exe.release" >- id="cdt.managedbuild.toolchain.xlc.exe.release"> >+ archList="all" >+ id="cdt.managedbuild.toolchain.xlc.exe.release" >+ name="%ToolChainName.Rel" >+ osList="all" >+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP" >+ targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.release;cdt.managedbuild.tool.xlc.cpp.linker.exe.release"> > <targetPlatform > id="cdt.managedbuild.target.xlc.platform.exe.release" > name="%PlatformName.Rel" >@@ -570,6 +636,7 @@ > superClass="cdt.managedbuild.tool.xlc.assembler"> > </tool> > </toolChain> >+ > </configuration> > </projectType> > >@@ -654,7 +721,7 @@ > id="cdt.managedbuild.toolchain.xlc.so.release"> > <targetPlatform > id="cdt.managedbuild.target.xlc.platform.so.release" >- name="%PlatformName.Rel" >+ name="%PlatformName.Rel" > osList="all" > archList="all"> > </targetPlatform> >@@ -830,11 +897,12 @@ > </toolChain> > </configuration> > </projectType> >+ > <tool >- errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" >- id="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractCompiler" >- isAbstract="true" >- name="Abstract XL Compiler"> >+ errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractCompiler" >+ isAbstract="true" >+ name="Abstract XL Compiler"> > <envVarBuildPath > pathType="buildpathInclude" > variableList="CPATH,C_INCLUDE_PATH"> >@@ -1584,7 +1652,7 @@ > </enumeratedOptionValue> > </option> > <option >- applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCv8ApplicabiltyCalculator" >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.optimization" > id="xlc.c.compiler.option.optimization.arch" > name="%Option.optimization.arch" >@@ -1716,7 +1784,7 @@ > </enumeratedOptionValue> > </option> > <option >- applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCv9ApplicabilityCalculator" >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.optimization" > id="xlc.c.compiler.option.optimization.arch.9.0" > name="%Option.optimization.arch" >@@ -1818,7 +1886,7 @@ > </enumeratedOptionValue> > </option> > <option >- applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCv8ApplicabiltyCalculator" >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.optimization" > id="xlc.c.compiler.option.optimization.tune" > name="%Option.optimization.tune" >@@ -1945,7 +2013,7 @@ > </enumeratedOptionValue> > </option> > <option >- applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCv9ApplicabilityCalculator" >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.optimization" > id="xlc.c.compiler.option.optimization.tune.9.0" > name="%Option.optimization.tune" >@@ -2212,12 +2280,22 @@ > valueType="boolean"> > </option> > <option >- defaultValue="false" >- name="%Option.optimization.smp" >- category="xlc.c.compiler.category.optimization" >- command="-qsmp" >- id="xlc.c.compiler.option.optimization.smp" >- valueType="boolean"> >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.optimization" >+ command="-qsmp" >+ defaultValue="false" >+ id="xlc.c.compiler.option.optimization.smp" >+ name="%Option.optimization.smp" >+ valueType="boolean"> >+ </option> >+ <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.optimization" >+ command="-qsmp=" >+ id="xlc.c.compiler.option.optimization.smp.v10" >+ name="%Option.optimization.smp.v10" >+ tip="%Option.optimization.smp.v10.tooltip" >+ valueType="string"> > </option> > <option > name="%Option.optimization.Spill" >@@ -2227,12 +2305,22 @@ > valueType="string"> > </option> > <option >- defaultValue="false" >- name="%Option.optimization.Strict" >- category="xlc.c.compiler.category.optimization" >- command="-qstrict" >- id="xlc.c.compiler.option.optimization.strict" >- valueType="boolean"> >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.optimization" >+ command="-qstrict" >+ defaultValue="false" >+ id="xlc.c.compiler.option.optimization.strict" >+ name="%Option.optimization.Strict" >+ valueType="boolean"> >+ </option> >+ <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.optimization" >+ command="-qstrict=" >+ id="xlc.c.compiler.option.optimization.strict.v10" >+ name="%Option.optimization.Strict.v10" >+ tip="%Option.optimization.Strict.v10.tooltip" >+ valueType="string"> > </option> > <option > name="%Option.optimization.loopinduction" >@@ -2431,11 +2519,61 @@ > valueType="string"> > </option> > <option >- name="%Option.tls" >- category="xlc.c.compiler.category.cc" >- command="-qtls=" >- id="xlc.c.compiler.option.cc.tls" >- valueType="string"> >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.cc" >+ command="-qtls=" >+ id="xlc.c.compiler.option.cc.tls" >+ name="%Option.tls" >+ valueType="string"> >+ </option> >+ >+ <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.objcc" >+ id="xlc.c.compiler.option.cc.tls.v10" >+ name="%Option.tls" >+ valueType="enumerated"> >+ <enumeratedOptionValue >+ id="xlc.c.compiler.option.cc.tls.none" >+ isDefault="true" >+ name="%Option.none"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qtls=unsupported" >+ id="xlc.c.compiler.option.cc.tls.unsupported" >+ isDefault="true" >+ name="%Option.tls.unsupported"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qtls=default" >+ id="xlc.c.compiler.option.cc.tls.default" >+ name="%Option.tls.default"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qtls=global-dynamic" >+ id="xlc.c.compiler.option.cc.tls.global-dynamic" >+ name="%Option.tls.global-dynamic"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qtls=initial-exec" >+ id="xlc.c.compiler.option.cc.tls.initial-exec" >+ name="%Option.tls.initial-exec"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qtls=local-exec" >+ id="xlc.c.compiler.option.cc.tls.local-exec" >+ name="%Option.tls.local-exec"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qtls=local-dynamic" >+ id="xlc.c.compiler.option.cc.tls.local-dynamic" >+ name="%Option.tls.local-dynamic"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qnotls" >+ id="xlc.c.compiler.option.cc.tls.notls" >+ name="%Option.tls.notls"> >+ </enumeratedOptionValue> > </option> > <optionCategory > name="%OptionCategory.lm" >@@ -2540,7 +2678,7 @@ > > <option > name="%Option.info" >- category="xlc.c.compiler.category.lm" >+ category="xlc.c.compiler.category.ecd" > command="-qinfo=" > id="xlc.c.compiler.option.lm.info" > valueType="string"> >@@ -2800,7 +2938,7 @@ > > <!-- Version 9 Options --> > <option >- applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCv9ApplicabilityCalculator" >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.ifp" > id="xlc.c.compiler.option.ifp.dfp" > name="%Option.dfp" >@@ -2823,7 +2961,7 @@ > </option> > > <option >- applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCv9ApplicabilityCalculator" >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.output" > command="-C!" > defaultValue="false" >@@ -2832,7 +2970,7 @@ > valueType="boolean"> > </option> > <option >- applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCv9ApplicabilityCalculator" >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" > category="xlc.c.compiler.category.ecd" > command="-qoptdebug" > defaultValue="false" >@@ -2840,28 +2978,52 @@ > name="%Option.optdebug" > valueType="boolean"> > </option> >- >- >- <inputType >- dependencyContentType="org.eclipse.cdt.core.cHeader" >- dependencyExtensions="h" >- id="cdt.managedbuild.tool.xlc.c.compiler.input" >- scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile" >- sourceContentType="org.eclipse.cdt.core.cSource" >- sources="c"> >- </inputType> >- <outputType >- outputs="o" >- buildVariable="OBJS" >- id="cdt.managedbuild.tool.xlc.c.compiler.output"> >- </outputType> >+ <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.output" >+ id="xlc.c.compiler.option.output.macros" >+ name="%Option.macros" >+ valueType="enumerated"> >+ <enumeratedOptionValue >+ id="xlc.c.compiler.option.output.macros.none" >+ isDefault="true" >+ name="%Option.none"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qshowmacros=all" >+ id="xlc.c.compiler.option.output.macros.all" >+ name="%Option.macros.all"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qshowmacros=pre" >+ id="xlc.c.compiler.option.output.macros.pre" >+ name="%Option.macros.pre"> >+ </enumeratedOptionValue> >+ <enumeratedOptionValue >+ command="-qshowmacros=nopre" >+ id="xlc.c.compiler.option.output.macros.nopre" >+ name="%Option.macros.nopre"> >+ </enumeratedOptionValue> >+ </option> >+ <option >+ applicabilityCalculator="org.eclipse.cdt.managedbuilder.xlc.ui.properties.XLCApplicabilityCalculator" >+ category="xlc.c.compiler.category.output" >+ command="-qnotimestamps" >+ id="xlc.c.compiler.option.output.timestamps" >+ name="%Options.timestamps" >+ valueType="boolean"> >+ </option> >+ <optionCategory >+ id="xlc.c.compiler.category.objcc" >+ name="%OptionCategory.objcc"> >+ </optionCategory> > </tool> > <tool >- errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" >- id="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractLinker" >- isAbstract="true" >- name="Abstract XL Linker" >- outputFlag="-o"> >+ errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractLinker" >+ isAbstract="true" >+ name="Abstract XL Linker" >+ outputFlag="-o"> > <envVarBuildPath > pathType="buildpathLibrary" > variableList="LIBRARY_PATH"> >@@ -3053,11 +3215,11 @@ > </outputType> > </tool> > <tool >- errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" >- id="org.eclipse.cdt.managedbuilder.xlc.ui.tool.linker.abstractSOLinker" >- isAbstract="true" >- name="Abstract XL Shared Object Linker" >- superClass="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractLinker"> >+ errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser" >+ id="org.eclipse.cdt.managedbuilder.xlc.ui.tool.linker.abstractSOLinker" >+ isAbstract="true" >+ name="Abstract XL Shared Object Linker" >+ superClass="org.eclipse.cdt.managedbuilder.xlc.ui.tool.abstractLinker"> > <option > name="%Option.Linking.mkshrobj" > id="xlc.c.link.so.option.shared" >@@ -3095,10 +3257,58 @@ > id="cdt.managedbuild.tool.xlc.c.linker.so.debug.output"> > </outputType> > </tool> >- >- >- >- >+ <tool >+ id="cdt.managedbuild.tool.xlc.c.compiler" >+ isAbstract="false" >+ name="Local XL C Compiler" >+ superClass="cdt.managedbuild.tool.xlc.c.compiler.abstract"> >+ <inputType >+ dependencyContentType="org.eclipse.cdt.core.cHeader" >+ dependencyExtensions="h" >+ id="cdt.managedbuild.tool.xlc.c.compiler.input" >+ name="Local C Sources" >+ primaryInput="true" >+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile" >+ sourceContentType="org.eclipse.cdt.core.cSource" >+ sources="c"> >+ </inputType> >+ <outputType >+ outputs="o" >+ buildVariable="OBJS" >+ id="cdt.managedbuild.tool.xlc.c.compiler.output"> >+ </outputType> >+ </tool> >+ <tool >+ id="cdt.managedbuild.tool.xlc.cpp.compiler" >+ isAbstract="false" >+ name="Local XL C++ Compiler" >+ superClass="cdt.managedbuild.tool.xlc.cpp.compiler.abstract"> >+ <inputType >+ dependencyContentType="org.eclipse.cdt.core.cHeader" >+ dependencyExtensions="h" >+ id="cdt.managedbuild.tool.xlc.cpp.c.compiler.input" >+ name="Local C Sources" >+ primaryInput="true" >+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile" >+ sourceContentType="org.eclipse.cdt.core.cSource" >+ sources="c"> >+ </inputType> >+ <inputType >+ dependencyContentType="org.eclipse.cdt.core.cxxHeader" >+ dependencyExtensions="h,H,hpp" >+ id="cdt.managedbuild.tool.xlc.cpp.compiler.input" >+ name="Local C++ Sources" >+ primaryInput="true" >+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP" >+ sourceContentType="org.eclipse.cdt.core.cxxSource" >+ sources="c,C,cc,cxx,cpp"> >+ </inputType> >+ <outputType >+ buildVariable="OBJS" >+ id="org.eclipse.cdt.managedbuilder.xlc.cpp.compiler.output" >+ outputs="o"> >+ </outputType> >+ </tool> > > </extension> > <extension >@@ -3156,6 +3366,7 @@ > <projectType > projectTypeID="cdt.managedbuild.target.xlc.lib"> > </projectType> >+ > </wizardPage> > </extension> > <extension >Index: src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 XLCompilerPropertyPage.java >--- src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java 4 Feb 2009 15:19:44 -0000 1.2.4.2 >+++ src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java 28 Oct 2009 16:52:49 -0000 >@@ -1,11 +1,11 @@ > /******************************************************************************* >- * Copyright (c) 2007 IBM Corporation and others. >- * 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: >+ * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * 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 org.eclipse.cdt.managedbuilder.xlc.ui.properties; >@@ -45,16 +45,13 @@ > { > // always return true, as we don't want to fail cases when compiler is installed remotely > // just warn user >- if (getPage() != null) >+ if (!super.doCheckState()) > { >- if (!super.doCheckState()) >- { >- getPage().setMessage(Messages.XLCompilerPropertyPage_2, IMessageProvider.WARNING); >- } >- else >- { >- getPage().setMessage(originalMessage, 0); >- } >+ setMessage(Messages.XLCompilerPropertyPage_2, IMessageProvider.WARNING); >+ } >+ else >+ { >+ setMessage(originalMessage); > } > > return true; >@@ -90,7 +87,8 @@ > fPathEditor.setStringValue(currentPath); > > String[] versionEntries = {PreferenceConstants.P_XL_COMPILER_VERSION_8_NAME, >- PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME}; >+ PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME, >+ PreferenceConstants.P_XL_COMPILER_VERSION_10_NAME}; > > Composite versionParent = getFieldEditorParent(); > >Index: src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/applicability.properties >=================================================================== >RCS file: src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/applicability.properties >diff -N src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/applicability.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/applicability.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,31 @@ >+############################################################################### >+# Copyright (c) 2007, 2008 IBM Corporation and others. >+# 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 >+############################################################################### >+ >+xlc.applicability.version.order=v8.0,v9.0,v10.1 >+ >+xlc.c.compiler.option.optimization.arch=v8.0 >+xlc.c.compiler.option.optimization.arch.9.0=v9.0+ >+xlc.c.compiler.option.optimization.tune=v8.0 >+xlc.c.compiler.option.optimization.tune.9.0=v9.0+ >+xlc.c.compiler.option.ifp.dfp=v9.0+ >+xlc.c.compiler.option.preprocessor.PreprocessRemoveComments=v9.0+ >+xlc.c.compiler.option.ecd.optdebug=v9.0+ >+xlc.c.compiler.option.optimization.smp=v8.0,v9.0 >+xlc.c.compiler.option.optimization.smp.v10=v10.1 >+xlc.c.compiler.option.optimization.strict=v8.0,v9.0 >+xlc.c.compiler.option.optimization.strict.v10=v10.1 >+org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.output.unique.v10=v10.1 >+org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling=v8.0,v9.0 >+org.eclipse.cdt.managedbuilder.xlc.ui.cpp.option.namemangling.v10=v10.1 >+xlc.c.compiler.option.cc.tls=v8.0,v9.0 >+xlc.c.compiler.option.cc.tls.v10=v10.1 >+xlc.c.compiler.option.output.macros=v10.1 >+xlc.c.compiler.option.output.timestamps=v10.1 >Index: src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCApplicabilityCalculator.java >=================================================================== >RCS file: src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCApplicabilityCalculator.java >diff -N src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCApplicabilityCalculator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCApplicabilityCalculator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,279 @@ >+/******************************************************************************* >+ * Copyright (c) 2007, 2008 IBM Corporation and others. >+ * 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 org.eclipse.cdt.managedbuilder.xlc.ui.properties; >+ >+import java.io.IOException; >+import java.io.InputStream; >+import java.util.ArrayList; >+import java.util.HashMap; >+import java.util.Iterator; >+import java.util.List; >+import java.util.Map; >+import java.util.Properties; >+import java.util.ResourceBundle; >+import java.util.Set; >+ >+import org.eclipse.cdt.managedbuilder.core.IBuildObject; >+import org.eclipse.cdt.managedbuilder.core.IConfiguration; >+import org.eclipse.cdt.managedbuilder.core.IFolderInfo; >+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions; >+import org.eclipse.cdt.managedbuilder.core.IManagedProject; >+import org.eclipse.cdt.managedbuilder.core.IOption; >+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability; >+import org.eclipse.cdt.managedbuilder.xlc.ui.XLCUIPlugin; >+import org.eclipse.cdt.managedbuilder.xlc.ui.preferences.PreferenceConstants; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.QualifiedName; >+import org.eclipse.jface.preference.IPreferenceStore; >+ >+/** >+ * @author rkerimov >+ * >+ * This applicability calculator hides/shows options that are specific to the XL compiler versions >+ * >+ */ >+ >+public class XLCApplicabilityCalculator implements IOptionApplicability >+{ >+ private static final String BUNDLE_NAME = "org/eclipse/cdt/managedbuilder/xlc/ui/properties/applicability.properties"; >+ private static final String PROP_NAME_VERSION_ORDER = "xlc.applicability.version.order"; >+ private static final String PROP_VALUE_PLUS = "+"; >+ >+ private static boolean initialized; >+ private static List versionOrder; >+ private static Map applicabilityMap; >+ >+ public XLCApplicabilityCalculator() >+ { >+ if (!initialized) >+ { >+ Properties props = null; >+ >+ ClassLoader loader = this.getClass().getClassLoader(); >+ InputStream input = null; >+ >+ if (loader != null) >+ input = loader.getResourceAsStream(BUNDLE_NAME); >+ >+ if (input == null) >+ input = ClassLoader.getSystemResourceAsStream(BUNDLE_NAME); >+ >+ try >+ { >+ if (input != null) >+ { >+ props = new Properties(); >+ props.load(input); >+ >+ Set entrySet = props.entrySet(); >+ Iterator iterator = entrySet.iterator(); >+ while (iterator.hasNext()) >+ { >+ Map.Entry entry = (Map.Entry) iterator.next(); >+ >+ String key = (String) entry.getKey(); >+ String value = (String) entry.getValue(); >+ >+ if (value == null) >+ value = ""; >+ >+ if (key.equals(PROP_NAME_VERSION_ORDER)) >+ { >+ versionOrder = new ArrayList(); >+ String[] versions = value.split(","); >+ >+ if (versions != null) >+ { >+ for (int i = 0; i < versions.length; i ++) >+ { >+ versionOrder.add(versions[i].trim()); >+ } >+ } >+ } >+ else >+ { >+ if (applicabilityMap == null) >+ applicabilityMap = new HashMap(); >+ >+ List applicList = (List) applicabilityMap.get(key); >+ if (applicList == null) >+ { >+ applicList = new ArrayList(); >+ applicabilityMap.put(key, applicList); >+ } >+ >+ boolean hasGreaterOption = false; >+ //find if ends with + and set as separate option >+ if (value.endsWith(PROP_VALUE_PLUS)) >+ { >+ hasGreaterOption = true; >+ value = value.substring(0, value.length() - PROP_VALUE_PLUS.length()); >+ } >+ >+ String[] versions = value.split(","); >+ >+ if (versions != null) >+ { >+ for (int i = 0; i < versions.length; i ++) >+ { >+ applicList.add(versions[i].trim()); >+ } >+ >+ } >+ >+ if (hasGreaterOption) >+ applicList.add(PROP_VALUE_PLUS); >+ } >+ } >+ } >+ } >+ catch (IOException e) >+ { >+ e.printStackTrace(); >+ } >+ finally >+ { >+ if (input != null) >+ { >+ try >+ { >+ input.close(); >+ } >+ catch (IOException e) >+ { >+ // ignore >+ } >+ } >+ } >+ >+ initialized = true; >+ >+ } >+ } >+ >+ private boolean isApplicable(IBuildObject configuration, IHoldsOptions holder, IOption option) >+ { >+ // first we check the preference for this project, if it exists >+ IProject project = null; >+ if(configuration instanceof IConfiguration) >+ { >+ IConfiguration config = (IConfiguration) configuration; >+ IManagedProject managedProject = config.getManagedProject(); >+ >+ project = (IProject) managedProject.getOwner(); >+ } >+ else if(configuration instanceof IFolderInfo) >+ { >+ IFolderInfo folderInfo = (IFolderInfo) configuration; >+ >+ IConfiguration config = folderInfo.getParent(); >+ >+ IManagedProject managedProject = config.getManagedProject(); >+ >+ project = (IProject) managedProject.getOwner(); >+ >+ } >+ >+ if (project == null) >+ return false; >+ >+ String currentVersion = null; >+ try { >+ currentVersion = project.getPersistentProperty(new QualifiedName("", >+ PreferenceConstants.P_XLC_COMPILER_VERSION)); >+ } catch (CoreException e) { >+ e.printStackTrace(); >+ } >+ >+ if(currentVersion == null) >+ { >+ // if the property isn't set, then use the workbench preference >+ IPreferenceStore prefStore = XLCUIPlugin.getDefault().getPreferenceStore(); >+ currentVersion = prefStore.getString(PreferenceConstants.P_XLC_COMPILER_VERSION); >+ } >+ >+ //if applicability list is empty that means all options applicable to all versions >+ if (applicabilityMap == null) >+ return true; >+ >+ //if applicability list for this option is not defined then option has no applicability restrictions >+ List applicList = (List) applicabilityMap.get(option.getId()); >+ if (applicList == null || applicList.isEmpty()) >+ return true; >+ >+ //if version is defined in the list - perfect match >+ if (applicList.contains(currentVersion)) >+ return true; >+ >+ //if applicability is defined as 'starting from this version and greater', i.e. 'v8.0+', >+ //then we need to find out if current version is greater than the last valid in the list >+ String lastOption = (String) applicList.get(applicList.size() - 1); >+ >+ if (lastOption != null && lastOption.equals(PROP_VALUE_PLUS)) >+ { >+ //if 'greater than' option is specified but no version order exists, consider config error and return false >+ if (versionOrder == null) >+ return false; >+ >+ //check for the last valid version in applicability list >+ String validVersion = null; >+ //start with element before the + >+ for (int k = applicList.size() - 2; k >= 0; k --) >+ { >+ String version = (String) applicList.get(k); >+ >+ if (versionOrder.contains(version)) >+ { >+ validVersion = version; >+ break; >+ } >+ } >+ >+ //if version that applicability starts with doesn't exist - config error >+ if (validVersion == null) >+ return false; >+ >+ //compare if current compiler version is greater than the applicability version >+ if (versionOrder.indexOf(currentVersion) > versionOrder.indexOf(validVersion)) >+ return true; >+ } >+ >+ >+ return false; >+ >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption) >+ */ >+ public boolean isOptionEnabled(IBuildObject configuration, >+ IHoldsOptions holder, IOption option) { >+ return isApplicable(configuration, holder, option); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption) >+ */ >+ public boolean isOptionUsedInCommandLine(IBuildObject configuration, >+ IHoldsOptions holder, IOption option) { >+ return isApplicable(configuration, holder, option); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption) >+ */ >+ public boolean isOptionVisible(IBuildObject configuration, >+ IHoldsOptions holder, IOption option) { >+ return isApplicable(configuration, holder, option); >+ } >+ >+} >#P org.eclipse.ptp.remote.rse.core >Index: src/org/eclipse/ptp/remote/rse/core/RSEProcessBuilder.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.rse.core/src/org/eclipse/ptp/remote/rse/core/RSEProcessBuilder.java,v >retrieving revision 1.5.2.1 >diff -u -r1.5.2.1 RSEProcessBuilder.java >--- src/org/eclipse/ptp/remote/rse/core/RSEProcessBuilder.java 3 Apr 2009 18:59:14 -0000 1.5.2.1 >+++ src/org/eclipse/ptp/remote/rse/core/RSEProcessBuilder.java 28 Oct 2009 16:52:50 -0000 >@@ -11,12 +11,21 @@ > package org.eclipse.ptp.remote.rse.core; > > import java.io.IOException; >+import java.net.URI; >+import java.net.URISyntaxException; > import java.util.Arrays; > import java.util.HashMap; > import java.util.List; > import java.util.Map; > >+import org.eclipse.core.filesystem.EFS; >+import org.eclipse.core.filesystem.IFileStore; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.Status; > import org.eclipse.ptp.remote.core.AbstractRemoteProcessBuilder; > import org.eclipse.ptp.remote.core.IRemoteConnection; > import org.eclipse.ptp.remote.core.IRemoteProcess; >@@ -142,4 +151,70 @@ > return inputString.replaceAll(" ", "\\\\ "); //$NON-NLS-1$ //$NON-NLS-2$ > } > >+ @Override >+ public IFileStore directory() { >+ if(super.directory() == null) { >+ // get CWD >+ Map<String, String> envMap = environment(); >+ >+ // check PWD first for UNIX systems >+ String cwd = envMap.get("PWD"); >+ >+ // if that didn't work, try %CD% for Windows systems >+ if(cwd == null) { >+ cwd = envMap.get("CD"); >+ } >+ >+ if(cwd != null) { >+ URI uri=null; >+ try { >+ uri = new URI("rse", connection.getHost().getHostName(), cwd, null); >+ } catch (URISyntaxException e) { >+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage())); >+ } >+ try { >+ return EFS.getStore(uri); >+ } catch (CoreException e) { >+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage())); >+ } >+ } >+ >+ } >+ return super.directory(); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ptp.remote.core.AbstractRemoteProcessBuilder#getHomeDirectory() >+ */ >+ public IFileStore getHomeDirectory() { >+ // determine the home directory using environment variables >+ Map<String, String> envMap = environment(); >+ >+ // check HOME first for UNIX systems >+ String homeDir = envMap.get("HOME"); >+ >+ // if that didn't work, try %USERPROFILE% for Windows systems >+ if(homeDir == null) { >+ homeDir = envMap.get("USERPROFILE"); >+ IPath homePath = new Path(homeDir); >+ homeDir = "/" + homePath.toString(); >+ } >+ >+ if(homeDir != null) { >+ URI uri=null; >+ try { >+ uri = new URI("rse", connection.getHost().getHostName(), homeDir, null); >+ } catch (URISyntaxException e) { >+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage())); >+ } >+ try { >+ return EFS.getStore(uri); >+ } catch (CoreException e) { >+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage())); >+ } >+ } >+ >+ return null; >+ } >+ > } >\ No newline at end of file >#P org.eclipse.cdt.make.core >Index: src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java,v >retrieving revision 1.24.4.3 >diff -u -r1.24.4.3 PerFileSICollector.java >--- src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java 19 Mar 2009 10:29:46 -0000 1.24.4.3 >+++ src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java 28 Oct 2009 16:52:50 -0000 >@@ -61,15 +61,15 @@ > * @author vhirsl > */ > public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoCollectorCleaner { >- private static final int INCLUDE_PATH = 1; >- private static final int QUOTE_INCLUDE_PATH = 2; >- private static final int INCLUDE_FILE = 3; >- private static final int MACROS_FILE = 4; >+ protected static final int INCLUDE_PATH = 1; >+ protected static final int QUOTE_INCLUDE_PATH = 2; >+ protected static final int INCLUDE_FILE = 3; >+ protected static final int MACROS_FILE = 4; > >- private class ScannerInfoData implements IDiscoveredScannerInfoSerializable { >- private final Map<Integer, Set<IFile>> commandIdToFilesMap; // command id and set of files it applies to >- private final Map<IFile, Integer> fileToCommandIdMap; // maps each file to the corresponding command id >- private final Map<Integer, CCommandDSC> commandIdCommandMap; // map of all commands >+ protected class ScannerInfoData implements IDiscoveredScannerInfoSerializable { >+ protected final Map<Integer, Set<IFile>> commandIdToFilesMap; // command id and set of files it applies to >+ protected final Map<IFile, Integer> fileToCommandIdMap; // maps each file to the corresponding command id >+ protected final Map<Integer, CCommandDSC> commandIdCommandMap; // map of all commands > > public ScannerInfoData() { > commandIdCommandMap = new LinkedHashMap<Integer, CCommandDSC>(); // [commandId, command] >@@ -153,7 +153,7 @@ > > } > >- private static class ProjectScannerInfo { >+ protected static class ProjectScannerInfo { > IPath[] includePaths; > IPath[] quoteIncludePaths; > IPath[] includeFiles; >@@ -169,28 +169,28 @@ > } > > public static final String COLLECTOR_ID = MakeCorePlugin.getUniqueIdentifier() + ".PerFileSICollector"; //$NON-NLS-1$ >- private static final String CC_ELEM = "compilerCommand"; //$NON-NLS-1$ >- private static final String ID_ATTR = "id"; //$NON-NLS-1$ >- private static final String FILE_TYPE_ATTR = "fileType"; //$NON-NLS-1$ >- private static final String APPLIES_TO_ATTR = "appliesToFiles"; //$NON-NLS-1$ >- private static final String FILE_ELEM = "file"; //$NON-NLS-1$ >- private static final String PATH_ATTR = "path"; //$NON-NLS-1$ >+ protected static final String CC_ELEM = "compilerCommand"; //$NON-NLS-1$ >+ protected static final String ID_ATTR = "id"; //$NON-NLS-1$ >+ protected static final String FILE_TYPE_ATTR = "fileType"; //$NON-NLS-1$ >+ protected static final String APPLIES_TO_ATTR = "appliesToFiles"; //$NON-NLS-1$ >+ protected static final String FILE_ELEM = "file"; //$NON-NLS-1$ >+ protected static final String PATH_ATTR = "path"; //$NON-NLS-1$ > >- private IProject project; >- private InfoContext context; >+ protected IProject project; >+ protected InfoContext context; > >- private ScannerInfoData sid; // scanner info data >- private ProjectScannerInfo psi = null; // sum of all scanner info >+ protected ScannerInfoData sid; // scanner info data >+ protected ProjectScannerInfo psi = null; // sum of all scanner info > >-// private List siChangedForFileList; // list of files for which scanner info has changed >- private final Map<IResource, Integer> siChangedForFileMap; // (file, comandId) map for deltas >- private final List<Integer> siChangedForCommandIdList; // list of command ids for which scanner info has changed >+// protected List siChangedForFileList; // list of files for which scanner info has changed >+ protected final Map<IResource, Integer> siChangedForFileMap; // (file, comandId) map for deltas >+ protected final List<Integer> siChangedForCommandIdList; // list of command ids for which scanner info has changed > >- private final SortedSet<Integer> freeCommandIdPool; // sorted set of free command ids >- private int commandIdCounter = 0; >+ protected final SortedSet<Integer> freeCommandIdPool; // sorted set of free command ids >+ protected int commandIdCounter = 0; > > /** monitor for data access */ >- private final Object fLock = new Object(); >+ protected final Object fLock = new Object(); > > /** > * >@@ -280,7 +280,7 @@ > * @param commandId > * @param scannerInfo > */ >- private void addScannerInfo(Integer commandId, Map scannerInfo) { >+ protected void addScannerInfo(Integer commandId, Map scannerInfo) { > assert Thread.holdsLock(fLock); > CCommandDSC cmd = sid.commandIdCommandMap.get(commandId); > if (cmd != null) { >@@ -303,7 +303,7 @@ > * @param file > * @param object > */ >- private void addCompilerCommand(IFile file, CCommandDSC cmd) { >+ protected void addCompilerCommand(IFile file, CCommandDSC cmd) { > assert Thread.holdsLock(fLock); > List<CCommandDSC> existingCommands = new ArrayList<CCommandDSC>(sid.commandIdCommandMap.values()); > int index = existingCommands.indexOf(cmd); >@@ -331,7 +331,7 @@ > * @param file > * @param cmd > */ >- private void generateFileDelta(IFile file, CCommandDSC cmd) { >+ protected void generateFileDelta(IFile file, CCommandDSC cmd) { > assert Thread.holdsLock(fLock); > Integer commandId = cmd.getCommandIdAsInteger(); > Integer oldCommandId = sid.fileToCommandIdMap.get(file); >@@ -350,7 +350,7 @@ > * @param file > * @param cmd > */ >- private void applyFileDeltas() { >+ protected void applyFileDeltas() { > assert Thread.holdsLock(fLock); > for (Iterator<IResource> i = siChangedForFileMap.keySet().iterator(); i.hasNext(); ) { > IFile file = (IFile) i.next(); >@@ -396,7 +396,7 @@ > generateProjectScannerInfo(); > } > >- private void generateProjectScannerInfo() { >+ protected void generateProjectScannerInfo() { > assert Thread.holdsLock(fLock); > psi = new ProjectScannerInfo(); > psi.includePaths = getAllIncludePaths(INCLUDE_PATH); >@@ -406,7 +406,7 @@ > psi.definedSymbols = getAllSymbols(); > } > >- private void removeUnusedCommands() { >+ protected void removeUnusedCommands() { > assert Thread.holdsLock(fLock); > for (Iterator i = sid.commandIdToFilesMap.entrySet().iterator(); i.hasNext(); ) { > Entry entry = (Entry) i.next(); >@@ -437,7 +437,7 @@ > * @param type > * @param object > */ >- private void addScannerInfo(ScannerInfoTypes type, List delta) { >+ protected void addScannerInfo(ScannerInfoTypes type, List delta) { > // TODO Auto-generated method stub > > } >@@ -487,7 +487,7 @@ > return new PerFileDiscoveredPathInfo(); > } > >- private boolean scannerInfoChanged() { >+ protected boolean scannerInfoChanged() { > assert Thread.holdsLock(fLock); > // return !siChangedForFileList.isEmpty(); > return !siChangedForFileMap.isEmpty(); >@@ -621,7 +621,7 @@ > * > * @author vhirsl > */ >- private class PerFileDiscoveredPathInfo implements IPerFileDiscoveredPathInfo2 { >+ protected class PerFileDiscoveredPathInfo implements IPerFileDiscoveredPathInfo2 { > /* (non-Javadoc) > * @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getProject() > */ >@@ -797,7 +797,7 @@ > > } > >- private Map<IResource, PathInfo> calculatePathInfoMap(){ >+ protected Map<IResource, PathInfo> calculatePathInfoMap(){ > assert Thread.holdsLock(fLock); > Map<IResource, PathInfo> map = new HashMap<IResource, PathInfo>(sid.fileToCommandIdMap.size() + 1); > Map.Entry entry; >@@ -828,7 +828,7 @@ > return map; > } > >- private static PathInfo createFilePathInfo(CCommandDSC cmd){ >+ protected static PathInfo createFilePathInfo(CCommandDSC cmd){ > IPath[] includes = stringListToPathArray(cmd.getIncludes()); > IPath[] quotedIncludes = stringListToPathArray(cmd.getQuoteIncludes()); > IPath[] incFiles = stringListToPathArray(cmd.getIncludeFile()); >@@ -849,7 +849,7 @@ > * @param path > * @return > */ >- private CCommandDSC getCommand(IPath path) { >+ protected CCommandDSC getCommand(IPath path) { > try { > IFile file = project.getWorkspace().getRoot().getFile(path); > return getCommand(file); >@@ -859,7 +859,7 @@ > } > } > >- private CCommandDSC getCommand(IFile file) { >+ protected CCommandDSC getCommand(IFile file) { > CCommandDSC cmd = null; > if (file != null) { > Integer cmdId = sid.fileToCommandIdMap.get(file); >@@ -880,7 +880,7 @@ > * > * @return list of IPath(s). > */ >- private IPath[] getAllIncludePaths(int type) { >+ protected IPath[] getAllIncludePaths(int type) { > List<String> allIncludes = new ArrayList<String>(); > for (Iterator<Integer> i = sid.commandIdCommandMap.keySet().iterator(); i.hasNext(); ) { > Integer cmdId = i.next(); >@@ -921,7 +921,7 @@ > * @param allIncludes > * @return > */ >- private static IPath[] stringListToPathArray(List<String> discovered) { >+ protected static IPath[] stringListToPathArray(List<String> discovered) { > List<Path> allIncludes = new ArrayList<Path>(discovered.size()); > for (Iterator<String> j = discovered.iterator(); j.hasNext(); ) { > String include = j.next(); >@@ -935,7 +935,7 @@ > /** > * @return > */ >- private Map<String, String> getAllSymbols() { >+ protected Map<String, String> getAllSymbols() { > assert Thread.holdsLock(fLock); > Map<String, String> symbols = new HashMap<String, String>(); > for (Iterator<Integer> i = sid.commandIdCommandMap.keySet().iterator(); i.hasNext(); ) { >#P org.eclipse.ptp.rdt.ui >Index: src/org/eclipse/ptp/rdt/ui/serviceproviders/RemoteBuildServiceProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/serviceproviders/RemoteBuildServiceProvider.java,v >retrieving revision 1.4.2.1 >diff -u -r1.4.2.1 RemoteBuildServiceProvider.java >--- src/org/eclipse/ptp/rdt/ui/serviceproviders/RemoteBuildServiceProvider.java 21 Sep 2009 22:00:36 -0000 1.4.2.1 >+++ src/org/eclipse/ptp/rdt/ui/serviceproviders/RemoteBuildServiceProvider.java 28 Oct 2009 16:52:52 -0000 >@@ -10,10 +10,17 @@ > *******************************************************************************/ > package org.eclipse.ptp.rdt.ui.serviceproviders; > >+import java.net.URI; >+ >+import org.eclipse.cdt.utils.FileSystemUtilityManager; >+import org.eclipse.core.filesystem.IFileStore; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.Path; > import org.eclipse.ptp.rdt.core.serviceproviders.IRemoteExecutionServiceProvider; > import org.eclipse.ptp.rdt.ui.messages.Messages; > import org.eclipse.ptp.remote.core.IRemoteConnection; > import org.eclipse.ptp.remote.core.IRemoteConnectionManager; >+import org.eclipse.ptp.remote.core.IRemoteProcessBuilder; > import org.eclipse.ptp.remote.core.IRemoteServices; > import org.eclipse.ptp.remote.core.PTPRemoteCorePlugin; > import org.eclipse.ptp.rdt.services.core.ServiceProvider; >@@ -38,8 +45,42 @@ > public static final String NAME = Messages.getString("RemoteBuildServiceProvider.0"); //$NON-NLS-1$ > > private IRemoteConnection fRemoteConnection = null; >+ >+ private String fConfigLocation = null; > > >+ private String getDefaultPath(IRemoteServices remoteServices, IRemoteConnection connection) { >+ // get the user's home directory >+ IRemoteProcessBuilder processBuilder = remoteServices.getProcessBuilder(connection, ""); //$NON-NLS-1$ >+ IFileStore homeStore = processBuilder.getHomeDirectory(); >+ URI uri = homeStore.toURI(); >+ String pathString = FileSystemUtilityManager.getDefault().getPathFromURI(uri); >+ IPath path = new Path(pathString); >+ path = path.append(".eclipsesettings"); //$NON-NLS-1$ >+ return path.toString(); >+ >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ptp.rdt.core.serviceproviders.IRemoteExecutionServiceProvider#getConfigLocation() >+ */ >+ public String getConfigLocation() { >+ if(isConfigured()) { >+ if(fConfigLocation != null) >+ return fConfigLocation; >+ else { >+ fConfigLocation = getDefaultPath(getRemoteServices(), getConnection()); >+ } >+ } >+ >+ >+ return fConfigLocation; // most likely null >+ } >+ >+ public void setConfigLocation(String configLocation) { >+ fConfigLocation = configLocation; >+ } >+ > public String getConfigurationString() { > if (isConfigured()) { > return getRemoteServices().getName() + ": " + getRemoteConnectionName(); //$NON-NLS-1$ >Index: src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesServiceProviderContributor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesServiceProviderContributor.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 RemoteServicesServiceProviderContributor.java >--- src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesServiceProviderContributor.java 21 Sep 2009 22:00:35 -0000 1.1.2.2 >+++ src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesServiceProviderContributor.java 28 Oct 2009 16:52:52 -0000 >@@ -42,6 +42,7 @@ > private IRemoteServices fSelectedProvider; > private Map<Integer, IRemoteConnection> fComboIndexToRemoteConnectionMap = new HashMap<Integer, IRemoteConnection>(); > private IRemoteConnection fSelectedConnection; >+ private RemoteBuildServiceFileLocationWidget fBuildConfigLocationWidget; > > > public void configureServiceProvider(IServiceProvider provider, final Composite container) { >@@ -95,7 +96,15 @@ > > // populate the combo with a list of providers > populateConnectionCombo(connectionCombo); >- >+ >+ String configPath = RemoteBuildServiceFileLocationWidget.getDefaultPath(fSelectedProvider, fSelectedConnection); >+ >+ fBuildConfigLocationWidget = new RemoteBuildServiceFileLocationWidget(container, SWT.NONE, fSelectedProvider, fSelectedConnection, configPath); >+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); >+ data.horizontalSpan = 3; >+ fBuildConfigLocationWidget.setLayoutData(data); // set layout to grab horizontal space >+ >+ > // new connection button > final Button newConnectionButton = new Button(container, SWT.PUSH); > newConnectionButton.setText(Messages.getString("RemoteServicesProviderSelectionDialog.1")); //$NON-NLS-1$ >@@ -174,6 +183,10 @@ > // set the provider > fProvider.setRemoteToolsProviderID(fSelectedProvider.getId()); > fProvider.setRemoteToolsConnection(fSelectedConnection); >+ if(fBuildConfigLocationWidget != null) { >+ fBuildConfigLocationWidget.setRemoteConnection(fSelectedProvider, fSelectedConnection); >+ fProvider.setConfigLocation(fBuildConfigLocationWidget.getConfigLocationPath()); >+ } > > } > >Index: src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java,v >retrieving revision 1.2.2.1 >diff -u -r1.2.2.1 RemoteMakefileWizardHandler.java >--- src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java 23 Oct 2009 23:29:44 -0000 1.2.2.1 >+++ src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java 28 Oct 2009 16:52:52 -0000 >@@ -96,11 +96,12 @@ > mngr.setProjectDescription(project, des); > > // remove all builders from the project... I really wish there was a less hacky way to do this that wasn't so damn slow >- IProjectDescription projectDescription = project.getDescription(); >- projectDescription.setBuildSpec(new ICommand[0]); >- project.setDescription(projectDescription, IProject.FORCE, new NullProgressMonitor()); >- RemoteMakeNature.addToBuildSpec(project, RemoteMakeBuilder.REMOTE_MAKE_BUILDER_ID, new NullProgressMonitor()); >- RemoteMakeNature.addNature(project, new NullProgressMonitor()); >+// IProjectDescription projectDescription = project.getDescription(); >+// projectDescription.setBuildSpec(new ICommand[0]); >+// project.setDescription(projectDescription, IProject.FORCE, new NullProgressMonitor()); >+// RemoteMakeNature.addToBuildSpec(project, RemoteMakeBuilder.REMOTE_MAKE_BUILDER_ID, new NullProgressMonitor()); >+ RemoteMakeNature.updateProjectDescription(project, RemoteMakeBuilder.REMOTE_MAKE_BUILDER_ID, new NullProgressMonitor()); >+ //RemoteMakeNature.addNature(project, new NullProgressMonitor()); > > // set the build directory by default to be that of the project... the usual workspace macro doesn't work as the workspace resides locally > // and the project resides remotely >Index: src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesProviderSelectionDialog.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesProviderSelectionDialog.java,v >retrieving revision 1.4 >diff -u -r1.4 RemoteServicesProviderSelectionDialog.java >--- src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesProviderSelectionDialog.java 23 Sep 2008 19:58:39 -0000 1.4 >+++ src/org/eclipse/ptp/rdt/ui/wizards/RemoteServicesProviderSelectionDialog.java 28 Oct 2009 16:52:52 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008 IBM Corporation and others. >+ * Copyright (c) 2008, 2009 IBM Corporation and others. > * 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 >@@ -19,6 +19,7 @@ > import org.eclipse.ptp.rdt.ui.messages.Messages; > import org.eclipse.ptp.rdt.ui.serviceproviders.RemoteBuildServiceProvider; > import org.eclipse.ptp.remote.core.IRemoteConnection; >+import org.eclipse.ptp.remote.core.IRemoteProcessBuilder; > import org.eclipse.ptp.remote.core.IRemoteServices; > import org.eclipse.ptp.remote.core.PTPRemoteCorePlugin; > import org.eclipse.ptp.remote.ui.IRemoteUIConnectionManager; >@@ -49,7 +50,6 @@ > */ > public class RemoteServicesProviderSelectionDialog extends Dialog { > >- > private RemoteBuildServiceProvider fProvider; > > private Map<Integer, IRemoteServices> fComboIndexToRemoteServicesProviderMap = new HashMap<Integer, IRemoteServices>(); >@@ -59,6 +59,10 @@ > private Map<Integer, IRemoteConnection> fComboIndexToRemoteConnectionMap = new HashMap<Integer, IRemoteConnection>(); > > private IRemoteConnection fSelectedConnection; >+ >+ private String fConfigLocation; >+ >+ private RemoteBuildServiceFileLocationWidget fBuildConfigLocationWidget; > > public RemoteServicesProviderSelectionDialog(IServiceProvider provider, Shell parentShell) { > super(parentShell); >@@ -128,6 +132,13 @@ > newConnectionButton.setText(Messages.getString("RemoteServicesProviderSelectionDialog.1")); //$NON-NLS-1$ > updateNewConnectionButtonEnabled(newConnectionButton); > >+ String configPath = RemoteBuildServiceFileLocationWidget.getDefaultPath(fSelectedProvider, fSelectedConnection); >+ >+ fBuildConfigLocationWidget = new RemoteBuildServiceFileLocationWidget(container, SWT.NONE, fSelectedProvider, fSelectedConnection, configPath); >+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); >+ data.horizontalSpan = 3; >+ fBuildConfigLocationWidget.setLayoutData(data); // set layout to grab horizontal space >+ > > newConnectionButton.addSelectionListener(new SelectionListener() { > >@@ -263,6 +274,7 @@ > // set the provider > fProvider.setRemoteToolsProviderID(fSelectedProvider.getId()); > fProvider.setRemoteToolsConnection(fSelectedConnection); >+ fProvider.setConfigLocation(fBuildConfigLocationWidget.getConfigLocationPath()); > > } > >Index: src/org/eclipse/ptp/rdt/ui/wizards/ConvertToRemoteWizardPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/ConvertToRemoteWizardPage.java,v >retrieving revision 1.6.2.4 >diff -u -r1.6.2.4 ConvertToRemoteWizardPage.java >--- src/org/eclipse/ptp/rdt/ui/wizards/ConvertToRemoteWizardPage.java 23 Oct 2009 23:29:44 -0000 1.6.2.4 >+++ src/org/eclipse/ptp/rdt/ui/wizards/ConvertToRemoteWizardPage.java 28 Oct 2009 16:52:52 -0000 >@@ -29,6 +29,8 @@ > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.jface.viewers.SelectionChangedEvent; > import org.eclipse.ptp.rdt.core.RDTLog; >+import org.eclipse.ptp.rdt.core.remotemake.RemoteMakeBuilder; >+import org.eclipse.ptp.rdt.core.resources.RemoteMakeNature; > import org.eclipse.ptp.rdt.core.resources.RemoteNature; > import org.eclipse.ptp.rdt.services.core.IServiceConfiguration; > import org.eclipse.ptp.rdt.services.core.IServiceModelManager; >@@ -126,6 +128,7 @@ > monitor.beginTask(Messages.getString("WizardProjectConversion.monitor.convertingToRemoteProject"), 3); //$NON-NLS-1$ > try { > RemoteNature.addRemoteNature(project, monitor); >+ RemoteMakeNature.updateProjectDescription(project, RemoteMakeBuilder.BUILDER_ID, monitor); > configureServicesForRemoteProject(project); > } catch (InvocationTargetException e) { > RDTLog.logError(e); >@@ -144,6 +147,7 @@ > monitor.beginTask(Messages.getString("WizardProjectConversion.monitor.convertingToRemoteProject"), 3); //$NON-NLS-1$ > try { > RemoteNature.addRemoteNature(project, monitor); >+ RemoteMakeNature.updateProjectDescription(project, RemoteMakeBuilder.BUILDER_ID, monitor); > configureServicesForRemoteProject(project); > } catch (InvocationTargetException e) { > RDTLog.logError(e); >Index: src/org/eclipse/ptp/rdt/ui/messages/messages.properties >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/messages/messages.properties,v >retrieving revision 1.11.2.5 >diff -u -r1.11.2.5 messages.properties >--- src/org/eclipse/ptp/rdt/ui/messages/messages.properties 27 Oct 2009 16:31:09 -0000 1.11.2.5 >+++ src/org/eclipse/ptp/rdt/ui/messages/messages.properties 28 Oct 2009 16:52:52 -0000 >@@ -28,6 +28,8 @@ > ServiceModelWidget.2=Configure... > ServiceModelWidget.3=Provider Configuration > ServiceModelWidget.4=Not configured >+RemoteBuildServiceFileLocationWidget.0=Select Remote Directory For Build Service Configuration Files >+RemoteBuildServiceFileLocationWidget.1=Build Configuration Location > RemoteBuildServiceProvider.0=RDT Remote Build Service > NullCIndexServiceProvider.0=Null search query > NullCIndexServiceProvider.1=Null query - no matches to report. >Index: src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java >=================================================================== >RCS file: src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java >diff -N src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,170 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 IBM Corporation and others. >+ * 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: >+ * Mike Kucera (IBM) - Initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.ptp.rdt.ui.wizards; >+ >+import java.net.URI; >+import java.util.HashMap; >+import java.util.Map; >+ >+import org.eclipse.cdt.utils.FileSystemUtilityManager; >+import org.eclipse.core.filesystem.IFileStore; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.ListenerList; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.ptp.rdt.ui.messages.Messages; >+import org.eclipse.ptp.remote.core.IRemoteConnection; >+import org.eclipse.ptp.remote.core.IRemoteProcessBuilder; >+import org.eclipse.ptp.remote.core.IRemoteServices; >+import org.eclipse.ptp.remote.ui.IRemoteUIServices; >+import org.eclipse.ptp.remote.ui.PTPRemoteUIPlugin; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.ModifyEvent; >+import org.eclipse.swt.events.ModifyListener; >+import org.eclipse.swt.events.SelectionAdapter; >+import org.eclipse.swt.events.SelectionEvent; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Button; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Group; >+import org.eclipse.swt.widgets.Text; >+ >+public class RemoteBuildServiceFileLocationWidget extends Composite { >+ >+ private IRemoteConnection fRemoteConnection = null; >+ private IRemoteServices fRemoteServices = null; >+ >+ ///private final Label label; >+ private final Text text; >+ private final Button browseButton; >+ //private final Button validateButton; >+ private final Button defaultButton; >+ >+ private Map<String,String> previousSelections = new HashMap<String,String>(); >+ private String fPath; >+ >+ public RemoteBuildServiceFileLocationWidget(Composite parent, int style, final IRemoteServices remoteServices, IRemoteConnection initialConnection, String defaultPath) { >+ super(parent, style); >+ >+ fRemoteServices = remoteServices; >+ fRemoteConnection = initialConnection; >+ fPath = defaultPath; >+ >+ GridLayout layout = new GridLayout(1, false); >+ layout.marginHeight = 0; >+ layout.marginWidth = 0; >+ this.setLayout(layout); >+ this.setLayoutData(new GridData(GridData.FILL_BOTH)); >+ >+ Group group = new Group(this, SWT.NONE); >+ group.setText(Messages.getString(Messages.getString("RemoteBuildServiceFileLocationWidget.1"))); //$NON-NLS-1$ >+ group.setLayout(new GridLayout(2, false)); >+ group.setLayoutData(new GridData(GridData.FILL_BOTH)); >+ >+ text = new Text(group, SWT.BORDER); >+ GridData data = new GridData(GridData.FILL_HORIZONTAL); >+ //data.widthHint = 300; >+ data.horizontalSpan = 2; >+ text.setLayoutData(data); >+ text.addModifyListener(new ModifyListener() { >+ public void modifyText(ModifyEvent e) { >+ String path = text.getText(); >+ >+ previousSelections.put(key(remoteServices, fRemoteConnection), path); >+ >+ fPath = path; >+ } >+ }); >+ >+ browseButton = new Button(group, SWT.NONE); >+ browseButton.setText(Messages.getString("IndexFileLocationWidget.1")); //$NON-NLS-1$ >+ browseButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ browseButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ browse(); >+ } >+ }); >+ >+ defaultButton = new Button(group, SWT.NONE); >+ defaultButton.setText(Messages.getString("IndexFileLocationWidget.2")); //$NON-NLS-1$ >+ defaultButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ defaultButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ restoreDefault(); >+ } >+ }); >+ >+ if(defaultPath != null) >+ text.setText(defaultPath); >+ } >+ >+ >+ public IRemoteConnection getConnection() { >+ return fRemoteConnection; >+ } >+ >+ >+ public void setRemoteConnection(IRemoteServices remoteServices, IRemoteConnection connection) { >+ if(connection == null || remoteServices == null) >+ throw new IllegalArgumentException(); >+ >+ fRemoteConnection = connection; >+ fRemoteServices = remoteServices; >+ >+ String path = previousSelections.get(key(remoteServices, connection)); >+ if(path == null) >+ path = getDefaultPath(remoteServices, connection); >+ if(path == null) >+ path = ""; //$NON-NLS-1$ >+ >+ text.setText(path); // modify event listener updates map >+ } >+ >+ >+ public static String getDefaultPath(IRemoteServices remoteServices, IRemoteConnection connection) { >+ // get the user's home directory >+ IRemoteProcessBuilder processBuilder = remoteServices.getProcessBuilder(connection, ""); //$NON-NLS-1$ >+ IFileStore homeStore = processBuilder.getHomeDirectory(); >+ URI uri = homeStore.toURI(); >+ String pathString = FileSystemUtilityManager.getDefault().getPathFromURI(uri); >+ IPath path = new Path(pathString); >+ path = path.append(".eclipsesettings"); //$NON-NLS-1$ >+ return path.toString(); >+ >+ } >+ >+ >+ private static String key(IRemoteServices remoteServices, IRemoteConnection connection) { >+ return remoteServices.getName() + ":" + connection.getName(); //$NON-NLS-1$ >+ } >+ >+ public String getConfigLocationPath() { >+ return text.getText(); >+ } >+ >+ private void browse() { >+ IRemoteUIServices uiServices = PTPRemoteUIPlugin.getDefault().getRemoteUIServices(fRemoteServices); >+ IPath remotePath = uiServices.getUIFileManager().browseDirectory(this.getShell(), Messages.getString("RemoteBuildServiceFileLocationWidget.0"), fPath); //$NON-NLS-1$ >+ if(remotePath != null) >+ fPath = remotePath.toString(); >+ >+ text.setText(fPath); >+ >+ } >+ >+ private void restoreDefault() { >+ String defaultPath = getDefaultPath(fRemoteServices, fRemoteConnection); >+ fPath = defaultPath; >+ text.setText(fPath); >+ } >+ >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cdtdoug
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 293598
: 150750 |
150754
|
153172