svn commit: r12979 - branches/gsoc2007/maurelio1234/src_new: . .settings META-INF org/argouml/language/java/cognitive/critics org/argouml/pattern/cognitive/critics org/argouml/ui/cmd

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2007-07-04 01:58:13-0700
New Revision: 12979

Added:
   branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java
   branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java
   branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/CrConsiderFacade.java
   branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/InitPatternCritics.java
   branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/InitUiCmdSubsystem.java
   branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/SettingsTabShortcuts.java
Modified:
   branches/gsoc2007/maurelio1234/src_new/   (props changed)
   branches/gsoc2007/maurelio1234/src_new/.project
   branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.core.prefs
   branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.ui.prefs
   branches/gsoc2007/maurelio1234/src_new/META-INF/MANIFEST.MF
   branches/gsoc2007/maurelio1234/src_new/build.bat
   branches/gsoc2007/maurelio1234/src_new/build.sh
   branches/gsoc2007/maurelio1234/src_new/build.xml
   branches/gsoc2007/maurelio1234/src_new/build2.bat
   branches/gsoc2007/maurelio1234/src_new/build2.sh
   branches/gsoc2007/maurelio1234/src_new/default.properties

Log:
merged r12975

Modified: branches/gsoc2007/maurelio1234/src_new/.project
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/.project?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/.project&p2=branches/gsoc2007/maurelio1234/src_new/.project&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/.project	(original)
+++ branches/gsoc2007/maurelio1234/src_new/.project	2007-07-04 01:58:13-0700
@@ -21,17 +21,17 @@
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>de.mvmsoft.checkclipse.CheckclipseBuilder</name>
+			<name>org.eclipse.pde.ManifestBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
+			<name>org.eclipse.pde.SchemaBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
+			<name>de.mvmsoft.checkclipse.CheckclipseBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>

Modified: branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.core.prefs
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.core.prefs?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.core.prefs&p2=branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.core.prefs&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.core.prefs	(original)
+++ branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.core.prefs	2007-07-04 01:58:13-0700
@@ -1,5 +1,13 @@
-#Sat May 12 06:13:43 BRT 2007
+#Sat Jun 30 21:55:28 EDT 2007
 eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -33,7 +41,7 @@
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
 org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -72,3 +80,249 @@
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=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=true
+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=do not 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=8
+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=true
+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=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false

Modified: branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.ui.prefs
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.ui.prefs?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.ui.prefs&p2=branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.ui.prefs&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.ui.prefs	(original)
+++ branches/gsoc2007/maurelio1234/src_new/.settings/org.eclipse.jdt.ui.prefs	2007-07-04 01:58:13-0700
@@ -1,3 +1,15 @@
-#Sat May 12 06:13:43 BRT 2007
+#Fri Jun 15 13:13:14 EDT 2007
 eclipse.preferences.version=1
+formatter_profile=_ArgoUML
+formatter_settings_version=10
 internal.default.compliance=default
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructor
 comment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n *\r\n * ${tags}\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment fo
 r non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * ${tags}\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.
 newtype" name\="newtype">// $$Id\: eclipse-argo-codetemplates.xml 11347 2006-10-26 22\:37\:44Z linus $$\r\n// Copyright (c) ${year} The Regents of the University of California. All\r\n// Rights Reserved. Permission to use, copy, modify, and distribute this\r\n// software and its documentation without fee, and without a written\r\n// agreement is hereby granted, provided that the above copyright notice\r\n// and this paragraph appear in all copies. This software program and\r\n// documentation are copyrighted by The Regents of the University of\r\n// California. The software program and documentation are supplied "AS\r\n// IS", without any accompanying services from The Regents. The Regents\r\n// does not warrant that the operation of the program will be\r\n// uninterrupted or error-free. The end-user understands that the program\r\n// was developed for research purposes and is advised 
 not to rely\r\n// exclusively on the program for any reason. IN NO EVENT SHALL THE\r\n// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,\r\n// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,\r\n// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF\r\n// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF\r\n// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY\r\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE\r\n// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF\r\n// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,\r\n// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoin
 sert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n<
 /template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// TODO\: Auto-generated catch block\r\nLOG.error("Exception", ${exception_var});</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// TODO\: Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// TODO\: Auto-generated constructor stub</template><templ
 ate autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>

Modified: branches/gsoc2007/maurelio1234/src_new/META-INF/MANIFEST.MF
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/META-INF/MANIFEST.MF?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/META-INF/MANIFEST.MF&p2=branches/gsoc2007/maurelio1234/src_new/META-INF/MANIFEST.MF&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/META-INF/MANIFEST.MF	(original)
+++ branches/gsoc2007/maurelio1234/src_new/META-INF/MANIFEST.MF	2007-07-04 01:58:13-0700
@@ -20,6 +20,7 @@
  org.argouml.cognitive.critics.ui,
  org.argouml.cognitive.ui,
  org.argouml.configuration,
+ org.argouml.gefext,
  org.argouml.i18n,
  org.argouml.kernel,
  org.argouml.language.java.cognitive.critics,

Modified: branches/gsoc2007/maurelio1234/src_new/build.bat
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/build.bat?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/build.bat&p2=branches/gsoc2007/maurelio1234/src_new/build.bat&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/build.bat	(original)
+++ branches/gsoc2007/maurelio1234/src_new/build.bat	2007-07-04 01:58:13-0700
@@ -5,7 +5,7 @@
 rem
 
 setlocal
-set ANT_HOME=..\tools\apache-ant-1.6.5
+set ANT_HOME=..\tools\apache-ant-1.7.0
 
 :: Convert relative path to absolute
 pushd %ANT_HOME%

Modified: branches/gsoc2007/maurelio1234/src_new/build.sh
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/build.sh?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/build.sh&p2=branches/gsoc2007/maurelio1234/src_new/build.sh&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/build.sh	(original)
+++ branches/gsoc2007/maurelio1234/src_new/build.sh	2007-07-04 01:58:13-0700
@@ -30,7 +30,7 @@
 #
 # build.sh always calls the version of ant distributed with ArgoUML
 #
-ANT_HOME=`pwd`/../tools/apache-ant-1.6.5
+ANT_HOME=`pwd`/../tools/apache-ant-1.7.0
 
 echo ANT_HOME is: $ANT_HOME
 echo

Modified: branches/gsoc2007/maurelio1234/src_new/build.xml
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/build.xml?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/build.xml&p2=branches/gsoc2007/maurelio1234/src_new/build.xml&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/build.xml	(original)
+++ branches/gsoc2007/maurelio1234/src_new/build.xml	2007-07-04 01:58:13-0700
@@ -759,6 +759,27 @@
            optimize="false" 
            destdir="${argo.tests.classes}"
            srcdir="${argo.tests.src}"
+	   includes="org/argouml/uml/reveng/TestJavaImportUnicode.java"
+           excludes="org/argouml/model/uml/**"
+	   encoding="iso8859-1"
+    	   source="1.5"
+           target="1.5">
+      <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
+      <classpath>
+        <pathelement location="${argo.build.classes}"/>
+        <pathelement location="${junit.jar.path}"/>
+        <pathelement location="${easymock.jar.path}"/>
+        <pathelement location="${jdepend.jar.path}"/>
+	<path refid="argo.compile.classpath"/>
+      </classpath>
+    </javac>
+
+    <!-- We want debug, optimize, deprecation to be non-modifiable here -->
+    <javac debug="true" 
+           deprecation="${deprecation}"
+           optimize="false" 
+           destdir="${argo.tests.classes}"
+           srcdir="${argo.tests.src}"
            excludes="org/argouml/model/uml/**"
     	   source="1.5"
            target="1.5">

Modified: branches/gsoc2007/maurelio1234/src_new/build2.bat
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/build2.bat?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/build2.bat&p2=branches/gsoc2007/maurelio1234/src_new/build2.bat&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/build2.bat	(original)
+++ branches/gsoc2007/maurelio1234/src_new/build2.bat	2007-07-04 01:58:13-0700
@@ -4,7 +4,7 @@
 :: build.bat always calls the version of ant distributed with ArgoUML
 
 setlocal
-set ANT_HOME=..\argouml-core-tools\apache-ant-1.6.5
+set ANT_HOME=..\argouml-core-tools\apache-ant-1.7.0
 
 :: Convert relative path to absolute
 pushd %ANT_HOME%

Modified: branches/gsoc2007/maurelio1234/src_new/build2.sh
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/build2.sh?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/build2.sh&p2=branches/gsoc2007/maurelio1234/src_new/build2.sh&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/build2.sh	(original)
+++ branches/gsoc2007/maurelio1234/src_new/build2.sh	2007-07-04 01:58:13-0700
@@ -32,7 +32,7 @@
 #
 # build.sh always calls the version of ant distributed with ArgoUML
 #
-ANT_HOME=`pwd`/../argouml-core-tools/apache-ant-1.6.5
+ANT_HOME=`pwd`/../argouml-core-tools/apache-ant-1.7.0
 
 echo ANT_HOME is: $ANT_HOME
 echo

Modified: branches/gsoc2007/maurelio1234/src_new/default.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/default.properties?view=diff&rev=12979&p1=branches/gsoc2007/maurelio1234/src_new/default.properties&p2=branches/gsoc2007/maurelio1234/src_new/default.properties&r1=12978&r2=12979
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/default.properties	(original)
+++ branches/gsoc2007/maurelio1234/src_new/default.properties	2007-07-04 01:58:13-0700
@@ -102,12 +102,12 @@
 log4j.jar.path=${argo.lib.dir}/log4j-1.2.6.jar
 ocl-argo.jar.path=${argo.lib.dir}/ocl-argo-1.1.jar
 swidgets.jar.path=${argo.lib.dir}/swidgets-0.1.4.jar
-toolbar.jar.path=${argo.lib.dir}/toolbar-1.4beta.jar
+toolbar.jar.path=${argo.lib.dir}/toolbar-1.4.jar
 #
 # JARs from tools directory
 #
 javasrc.jar.path=${argo.tools.lib.dir}/javasrc-2001-beta.jar
-jdepend.jar.path=${argo.tools.dir}/jdepend-2.2/lib/jdepend.jar
+jdepend.jar.path=${argo.tools.dir}/jdepend-2.9/lib/jdepend-2.9.jar
 junit.jar.path=${argo.tools.dir}/junit-3.8.1/junit.jar
 easymock.jar.path=${argo.tools.dir}/lib/easymock12.jar
 

Added: branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java?view=auto&rev=12979
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java	2007-07-04 01:58:13-0700
@@ -0,0 +1,128 @@
+// $Id: CrReservedNameJava.java 12967 2007-07-03 11:58:21Z mvw $

+// Copyright (c) 1996-2007 The Regents of the University of California. All

+// Rights Reserved. Permission to use, copy, modify, and distribute this

+// software and its documentation without fee, and without a written

+// agreement is hereby granted, provided that the above copyright notice

+// and this paragraph appear in all copies.  This software program and

+// documentation are copyrighted by The Regents of the University of

+// California. The software program and documentation are supplied "AS

+// IS", without any accompanying services from The Regents. The Regents

+// does not warrant that the operation of the program will be

+// uninterrupted or error-free. The end-user understands that the program

+// was developed for research purposes and is advised not to rely

+// exclusively on the program for any reason.  IN NO EVENT SHALL THE

+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,

+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,

+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF

+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF

+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY

+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE

+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF

+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,

+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

+

+package org.argouml.language.java.cognitive.critics;

+

+import java.util.ArrayList;

+import java.util.List;

+

+import org.argouml.uml.cognitive.critics.CrReservedName;

+

+/**

+ * Critic to check whether the name of a ModelElement in the Model resembles or

+ * matches a Java keyword.

+ * 

+ * @author Tom Morris

+ */

+public class CrReservedNameJava extends CrReservedName {

+

+    /**

+     * Constructor.

+     */

+    public CrReservedNameJava() {

+        super(getJavaNames());

+    }

+

+    /**

+     * Return a list of Java keywords and reserved names.

+     * @return the list of names

+     */

+    private static List<String> getJavaNames() {

+

+        List<String> javaReserved = new ArrayList<String>();

+

+        javaReserved.add("public");

+        javaReserved.add("private");

+        javaReserved.add("protected");

+        javaReserved.add("package");

+        javaReserved.add("import");

+        javaReserved.add("java");

+        javaReserved.add("class");

+        javaReserved.add("interface");

+        javaReserved.add("extends");

+        javaReserved.add("implements");

+        javaReserved.add("native");

+        javaReserved.add("boolean");

+        javaReserved.add("void");

+        javaReserved.add("int");

+        javaReserved.add("char");

+        javaReserved.add("float");

+        javaReserved.add("long");

+        javaReserved.add("short");

+        javaReserved.add("byte");

+        javaReserved.add("double");

+        javaReserved.add("String");

+        javaReserved.add("Vector");

+        javaReserved.add("Hashtable");

+        javaReserved.add("Properties");

+

+        javaReserved.add("null");

+        javaReserved.add("true");

+        javaReserved.add("false");

+        javaReserved.add("rest");

+        javaReserved.add("operator");

+        javaReserved.add("inner");

+        javaReserved.add("outer");

+        javaReserved.add("this");

+        javaReserved.add("super");

+        javaReserved.add("byvalue");

+        javaReserved.add("cast");

+        javaReserved.add("const");

+        javaReserved.add("future");

+        javaReserved.add("generic");

+        javaReserved.add("goto");

+        javaReserved.add("throws");

+        javaReserved.add("try");

+        javaReserved.add("catch");

+        javaReserved.add("finally");

+        javaReserved.add("new");

+

+        javaReserved.add("synchronized");

+        javaReserved.add("static");

+        javaReserved.add("final");

+        javaReserved.add("abstract");

+        javaReserved.add("for");

+        javaReserved.add("if");

+        javaReserved.add("else");

+        javaReserved.add("while");

+        javaReserved.add("return");

+        javaReserved.add("continue");

+        javaReserved.add("break");

+        javaReserved.add("do");

+        javaReserved.add("until");

+        javaReserved.add("switch");

+        javaReserved.add("case");

+        javaReserved.add("default");

+        javaReserved.add("instanceof");

+        javaReserved.add("var");

+        javaReserved.add("volatile");

+        javaReserved.add("transient");

+

+        javaReserved.add("assert");

+

+        return javaReserved;

+    }

+

+}

+


Added: branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java?view=auto&rev=12979
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java	2007-07-04 01:58:13-0700
@@ -0,0 +1,65 @@
+// $Id: InitJavaCritics.java 12967 2007-07-03 11:58:21Z mvw $

+// Copyright (c) 2007 The Regents of the University of California. All

+// Rights Reserved. Permission to use, copy, modify, and distribute this

+// software and its documentation without fee, and without a written

+// agreement is hereby granted, provided that the above copyright notice

+// and this paragraph appear in all copies. This software program and

+// documentation are copyrighted by The Regents of the University of

+// California. The software program and documentation are supplied "AS

+// IS", without any accompanying services from The Regents. The Regents

+// does not warrant that the operation of the program will be

+// uninterrupted or error-free. The end-user understands that the program

+// was developed for research purposes and is advised not to rely

+// exclusively on the program for any reason. IN NO EVENT SHALL THE

+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,

+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,

+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF

+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF

+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY

+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE

+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF

+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,

+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

+

+package org.argouml.language.java.cognitive.critics;

+

+import java.util.Collections;

+import java.util.List;

+

+import org.argouml.application.api.GUISettingsTabInterface;

+import org.argouml.application.api.InitSubsystem;

+import org.argouml.cognitive.Agency;

+import org.argouml.cognitive.Critic;

+import org.argouml.model.Model;

+

+/**

+ * Initialise the Java related critics. <p>

+ * 

+ * TODO: Test and then enable the CrReservedNameJava.

+ *

+ * @author Michiel

+ */

+public class InitJavaCritics implements InitSubsystem {

+

+    private static Critic crMultiInherit = new CrMultipleInheritance();

+    private static Critic crMultiRealization = new CrMultipleRealization();

+    //private static Critic crReservedNameJava = new CrReservedNameJava();

+

+    public List<GUISettingsTabInterface> getProjectSettingsTabs() {

+        return Collections.emptyList();

+    }

+

+    public List<GUISettingsTabInterface> getSettingsTabs() {

+        return Collections.emptyList();

+    }

+

+    public void init() {

+        Object classCls = Model.getMetaTypes().getUMLClass();

+        Object interfaceCls = Model.getMetaTypes().getInterface();

+        Agency.register(crMultiInherit, classCls);

+        Agency.register(crMultiRealization, interfaceCls);

+        //Agency.register(crReservedNameJava, interfaceCls);

+    }

+

+}


Added: branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/CrConsiderFacade.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/CrConsiderFacade.java?view=auto&rev=12979
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/CrConsiderFacade.java	2007-07-04 01:58:13-0700
@@ -0,0 +1,62 @@
+// $Id: CrConsiderFacade.java 12974 2007-07-03 19:02:05Z mvw $

+// Copyright (c) 1996-2006 The Regents of the University of California. All

+// Rights Reserved. Permission to use, copy, modify, and distribute this

+// software and its documentation without fee, and without a written

+// agreement is hereby granted, provided that the above copyright notice

+// and this paragraph appear in all copies.  This software program and

+// documentation are copyrighted by The Regents of the University of

+// California. The software program and documentation are supplied "AS

+// IS", without any accompanying services from The Regents. The Regents

+// does not warrant that the operation of the program will be

+// uninterrupted or error-free. The end-user understands that the program

+// was developed for research purposes and is advised not to rely

+// exclusively on the program for any reason.  IN NO EVENT SHALL THE

+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,

+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,

+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF

+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF

+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY

+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE

+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF

+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,

+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

+

+package org.argouml.pattern.cognitive.critics;

+

+import org.argouml.cognitive.Designer;

+import org.argouml.uml.cognitive.UMLDecision;

+import org.argouml.uml.cognitive.critics.CrUML;

+

+/**

+ * A critic to suggest using the facade stereotype. <p>

+ *

+ * TODO: At the moment only a dummy implementation,

+ * see issue 3093.

+*/

+public class CrConsiderFacade extends CrUML {

+

+    /**

+     * The constructor.

+     */

+    public CrConsiderFacade() {

+        setupHeadAndDesc();

+	addSupportedDecision(UMLDecision.PATTERNS);

+	addTrigger("ownedElement");

+    }

+

+    /*

+     * @see org.argouml.uml.cognitive.critics.CrUML#predicate2(

+     *      java.lang.Object, org.argouml.cognitive.Designer)

+     */

+    public boolean predicate2(Object dm, Designer dsgr) {

+	/* TODO: Add implementation. */

+	return NO_PROBLEM;

+    }

+

+    /**

+     * The UID.

+     */

+    private static final long serialVersionUID = -5513915374319458662L;

+} /* end class CrEmptyPackage */

+


Added: branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/InitPatternCritics.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/InitPatternCritics.java?view=auto&rev=12979
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/src_new/org/argouml/pattern/cognitive/critics/InitPatternCritics.java	2007-07-04 01:58:13-0700
@@ -0,0 +1,66 @@
+// $Id: InitPatternCritics.java 12955 2007-07-01 19:46:05Z mvw $

+// Copyright (c) 2007 The Regents of the University of California. All

+// Rights Reserved. Permission to use, copy, modify, and distribute this

+// software and its documentation without fee, and without a written

+// agreement is hereby granted, provided that the above copyright notice

+// and this paragraph appear in all copies. This software program and

+// documentation are copyrighted by The Regents of the University of

+// California. The software program and documentation are supplied "AS

+// IS", without any accompanying services from The Regents. The Regents

+// does not warrant that the operation of the program will be

+// uninterrupted or error-free. The end-user understands that the program

+// was developed for research purposes and is advised not to rely

+// exclusively on the program for any reason. IN NO EVENT SHALL THE

+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,

+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,

+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF

+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF

+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY

+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE

+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF

+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,

+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

+

+package org.argouml.pattern.cognitive.critics;

+

+import java.util.Collections;

+import java.util.List;

+

+import org.argouml.application.api.GUISettingsTabInterface;

+import org.argouml.application.api.InitSubsystem;

+import org.argouml.cognitive.Agency;

+import org.argouml.cognitive.Critic;

+import org.argouml.model.Model;

+

+/**

+ * Initialise the Pattern related Critics.

+ *

+ * @author Michiel

+ */

+public class InitPatternCritics implements InitSubsystem {

+

+    private static Critic crConsiderSingleton = new CrConsiderSingleton();

+

+    private static Critic crSingletonViolatedMSA =

+        new CrSingletonViolatedMissingStaticAttr();

+

+    private static Critic crSingletonViolatedOPC =

+        new CrSingletonViolatedOnlyPrivateConstructors();

+

+    public List<GUISettingsTabInterface> getProjectSettingsTabs() {

+        return Collections.emptyList();

+    }

+

+    public List<GUISettingsTabInterface> getSettingsTabs() {

+        return Collections.emptyList();

+    }

+

+    public void init() {

+        Object classCls = Model.getMetaTypes().getUMLClass();

+        Agency.register(crConsiderSingleton, classCls);

+        Agency.register(crSingletonViolatedMSA, classCls);

+        Agency.register(crSingletonViolatedOPC, classCls);

+    }

+

+}


Added: branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/InitUiCmdSubsystem.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/InitUiCmdSubsystem.java?view=auto&rev=12979
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/InitUiCmdSubsystem.java	2007-07-04 01:58:13-0700
@@ -0,0 +1,57 @@
+// $Id: InitUiCmdSubsystem.java 12959 2007-07-02 17:53:38Z mvw $

+// Copyright (c) 2007 The Regents of the University of California. All

+// Rights Reserved. Permission to use, copy, modify, and distribute this

+// software and its documentation without fee, and without a written

+// agreement is hereby granted, provided that the above copyright notice

+// and this paragraph appear in all copies. This software program and

+// documentation are copyrighted by The Regents of the University of

+// California. The software program and documentation are supplied "AS

+// IS", without any accompanying services from The Regents. The Regents

+// does not warrant that the operation of the program will be

+// uninterrupted or error-free. The end-user understands that the program

+// was developed for research purposes and is advised not to rely

+// exclusively on the program for any reason. IN NO EVENT SHALL THE

+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,

+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,

+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF

+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF

+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY

+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE

+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF

+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,

+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

+

+package org.argouml.ui.cmd;

+

+import java.util.ArrayList;

+import java.util.Collections;

+import java.util.List;

+

+import org.argouml.application.api.GUISettingsTabInterface;

+import org.argouml.application.api.InitSubsystem;

+

+/**

+ * Initialise this subsystem.

+ *

+ * @author Michiel

+ */

+public class InitUiCmdSubsystem implements InitSubsystem {

+

+    public List<GUISettingsTabInterface> getProjectSettingsTabs() {

+        return Collections.emptyList();

+    }

+

+    public List<GUISettingsTabInterface> getSettingsTabs() {

+        List<GUISettingsTabInterface> result = 

+            new ArrayList<GUISettingsTabInterface>();

+        result.add(new SettingsTabShortcuts());

+        return result;

+    }

+

+    public void init() {

+        ActionAdjustSnap.init();

+        ActionAdjustGrid.init();

+    }

+

+}


Added: branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/SettingsTabShortcuts.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/SettingsTabShortcuts.java?view=auto&rev=12979
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/src_new/org/argouml/ui/cmd/SettingsTabShortcuts.java	2007-07-04 01:58:13-0700
@@ -0,0 +1,615 @@
+// $Id: SettingsTabShortcuts.java 12959 2007-07-02 17:53:38Z mvw $

+// Copyright (c) 2006-2007 The Regents of the University of California. All

+// Rights Reserved. Permission to use, copy, modify, and distribute this

+// software and its documentation without fee, and without a written

+// agreement is hereby granted, provided that the above copyright notice

+// and this paragraph appear in all copies. This software program and

+// documentation are copyrighted by The Regents of the University of

+// California. The software program and documentation are supplied "AS

+// IS", without any accompanying services from The Regents. The Regents

+// does not warrant that the operation of the program will be

+// uninterrupted or error-free. The end-user understands that the program

+// was developed for research purposes and is advised not to rely

+// exclusively on the program for any reason. IN NO EVENT SHALL THE

+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,

+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,

+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF

+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF

+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY

+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE

+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF

+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,

+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

+

+package org.argouml.ui.cmd;

+

+import java.awt.BorderLayout;

+import java.awt.Color;

+import java.awt.GridBagConstraints;

+import java.awt.GridBagLayout;

+import java.awt.Insets;

+import java.awt.event.ActionEvent;

+import java.awt.event.ActionListener;

+import java.text.MessageFormat;

+

+import javax.swing.BorderFactory;

+import javax.swing.ButtonGroup;

+import javax.swing.JLabel;

+import javax.swing.JOptionPane;

+import javax.swing.JPanel;

+import javax.swing.JRadioButton;

+import javax.swing.JScrollPane;

+import javax.swing.JTable;

+import javax.swing.KeyStroke;

+import javax.swing.ListSelectionModel;

+import javax.swing.event.ListSelectionEvent;

+import javax.swing.event.ListSelectionListener;

+import javax.swing.table.AbstractTableModel;

+import javax.swing.table.DefaultTableCellRenderer;

+

+import org.argouml.application.api.GUISettingsTabInterface;

+import org.argouml.i18n.Translator;

+import org.argouml.util.KeyEventUtils;

+

+/**

+ * Tab for the settings dialog that makes it possible to customize Actions'

+ * shortcuts

+ * 

+ * @author andrea.nironi@gmail

+ */

+class SettingsTabShortcuts extends JPanel implements

+        GUISettingsTabInterface, ActionListener, ListSelectionListener,

+        ShortcutChangedListener {

+

+    /**

+     * The UID.

+     */

+    private static final long serialVersionUID = -2033414439459450620L;

+

+    private static final String NONE_NAME = Translator

+            .localize("label.shortcut-none");

+

+    private static final String DEFAULT_NAME = Translator

+            .localize("label.shortcut-default");

+

+    private static final String CUSTOM_NAME = Translator

+            .localize("label.shortcut-custom");

+

+    /**

+     * The table of modules.

+     */

+    private JTable table;

+

+    private JPanel selectedContainer;

+

+    private ShortcutField shortcutField = new ShortcutField("", 12);

+

+    private Color shortcutFieldDefaultBg = null;

+

+    private JRadioButton customButton = new JRadioButton(CUSTOM_NAME);

+

+    private JRadioButton defaultButton = new JRadioButton(DEFAULT_NAME);

+

+    private JRadioButton noneButton = new JRadioButton(NONE_NAME);

+

+    private JLabel warningLabel = new JLabel(" ");

+

+    private Action target;

+

+    private Action[] actions = ShortcutMgr.getShortcuts();

+

+    private int lastRowSelected = -1;

+

+    /**

+     * The names of the columns in the table.

+     */

+    private final String[] columnNames = {

+            Translator.localize("misc.column-name.action"),

+            Translator.localize("misc.column-name.shortcut"),

+            Translator.localize("misc.column-name.default") };

+

+    /**

+     * The objects representing the available actions

+     */

+    private Object[][] elements;

+

+    /*

+     * @see GUISettingsTabInterface#getTabKey()

+     */

+    public String getTabKey() {

+        return "tab.shortcuts";

+    }

+

+    /*

+     * @see GUISettingsTabInterface#getTabPanel()

+     */

+    public JPanel getTabPanel() {

+        if (table == null) {

+            setLayout(new GridBagLayout());

+            GridBagConstraints panelConstraints = new GridBagConstraints();

+            panelConstraints.gridx = 0;

+            panelConstraints.gridy = 0;

+            panelConstraints.anchor = GridBagConstraints.NORTH;

+            panelConstraints.fill = GridBagConstraints.BOTH;

+            panelConstraints.weightx = 5;

+            panelConstraints.weighty = 15;

+

+            // let's add the table, inside a JScrollPane

+            table = new JTable(new ShortcutTableModel());

+            table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);

+            table.setShowVerticalLines(true);

+            table.setDefaultRenderer(KeyStroke.class,

+                    new KeyStrokeCellRenderer());

+            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

+            table.getSelectionModel().addListSelectionListener(this);

+

+            JPanel tableContainer = new JPanel(new BorderLayout());

+            tableContainer.setBorder(

+                    BorderFactory.createTitledBorder(

+                            Translator.localize(

+                                    "dialog.shortcut.titled-border.actions")));

+            tableContainer.add(new JScrollPane(table));

+            add(tableContainer, panelConstraints);

+

+            // now, let's set up the "selected action" container

+            customButton.addActionListener(this);

+            defaultButton.addActionListener(this);

+            noneButton.addActionListener(this);

+

+            selectedContainer = new JPanel(new GridBagLayout());

+            selectedContainer.setBorder(

+                    BorderFactory.createTitledBorder(

+                            Translator.localize(

+                                    "dialog.shortcut.titled-border.selected")));

+            GridBagConstraints constraints = new GridBagConstraints();

+            constraints.gridx = 0;

+            constraints.gridy = 0;

+            constraints.insets = new Insets(0, 5, 10, 0);

+

+            noneButton.setActionCommand(NONE_NAME);

+            defaultButton.setActionCommand(DEFAULT_NAME);

+            customButton.setActionCommand(CUSTOM_NAME);

+            noneButton.addActionListener(this);

+            defaultButton.addActionListener(this);

+            customButton.addActionListener(this);

+            ButtonGroup radioButtonGroup = new ButtonGroup();

+            radioButtonGroup.add(noneButton);

+            radioButtonGroup.add(defaultButton);

+            radioButtonGroup.add(customButton);

+            selectedContainer.add(noneButton, constraints);

+            constraints.gridx = 1;

+            constraints.insets = new Insets(0, 5, 10, 0);

+            selectedContainer.add(defaultButton, constraints);

+            constraints.gridx = 2;

+            constraints.insets = new Insets(0, 5, 10, 0);

+            selectedContainer.add(customButton, constraints);

+

+            constraints.gridx = 3;

+            constraints.weightx = 10.0;

+            constraints.insets = new Insets(0, 10, 10, 15);

+            constraints.fill = GridBagConstraints.HORIZONTAL;

+            shortcutField.addShortcutChangedListener(this);

+            shortcutFieldDefaultBg = shortcutField.getBackground();

+            selectedContainer.add(shortcutField, constraints);

+            constraints.gridwidth = 4;

+            constraints.gridy = 1;

+            constraints.gridx = 0;

+            constraints.anchor = GridBagConstraints.WEST;

+            constraints.insets = new Insets(0, 10, 5, 10);

+            warningLabel.setForeground(Color.RED);

+            selectedContainer.add(warningLabel, constraints);

+

+            panelConstraints.gridy = 1;

+            panelConstraints.anchor = GridBagConstraints.CENTER;

+            panelConstraints.fill = GridBagConstraints.BOTH;

+            panelConstraints.weightx = 1;

+            panelConstraints.weighty = 1;

+            add(selectedContainer, panelConstraints);

+

+            this.enableFields(false);

+        }

+

+        return this;

+    }

+

+    /**

+     * Enable/disable the field of the lower panel

+     * 

+     * @param enable

+     *            whether to enable the fields or not

+     */

+    private void enableFields(boolean enable) {

+        shortcutField.setEditable(enable);

+        customButton.setEnabled(enable);

+        defaultButton.setEnabled(enable);

+        noneButton.setEnabled(enable);

+    }

+

+    /**

+     * Sets the current target

+     * 

+     * @param t

+     *            the new target

+     */

+    private void setTarget(Object t) {

+        target = (Action) t;

+        // let's enable the radiobuttons container

+        enableFields(true);

+        // updating the radiobuttons container's title

+        selectedContainer.setBorder(BorderFactory.createTitledBorder(Translator

+                .localize("dialog.shortcut.titled-border.selected-partial")

+                + " \"" + target.getActionName() + "\""));

+        shortcutField.setText(KeyEventUtils.formatKeyStroke(target

+                .getCurrentShortcut()));

+        resetKeyStrokeConflict();

+

+        // let's select the correct radio button

+        if (target.getCurrentShortcut() == null) {

+            // no shortcuts --> NONE

+            noneButton.setSelected(true);

+            shortcutField.setEnabled(false);

+        } else if (target.getDefaultShortcut() != null

+                && target.getCurrentShortcut().equals(

+                        target.getDefaultShortcut())) {

+            // current shortcut == default --> DEFAULT

+            defaultButton.setSelected(true);

+            shortcutField.setEnabled(false);

+        } else {

+            // customized shortcut --> CUSTOM

+            customButton.setSelected(true);

+            shortcutField.setEnabled(true);

+            shortcutField.requestFocus();

+        }

+    }

+

+    /*

+     * @see org.argouml.ui.GUISettingsTabInterface#handleResetToDefault()

+     */

+    public void handleResetToDefault() {

+        // Do nothing - these buttons are not shown.

+    }

+

+    /*

+     * @see org.argouml.ui.GUISettingsTabInterface#handleSettingsTabCancel()

+     */

+    public void handleSettingsTabCancel() {

+        // Do nothing!

+        // The next time we refresh, we will fetch the values again.

+    }

+

+    /*

+     * @see org.argouml.ui.GUISettingsTabInterface#handleSettingsTabRefresh()

+     */

+    public void handleSettingsTabRefresh() {

+        // let's reload the shortcuts

+        actions = ShortcutMgr.getShortcuts();

+        table.setModel(new ShortcutTableModel());

+    }

+

+    /*

+     * @see org.argouml.ui.GUISettingsTabInterface#handleSettingsTabSave()

+     */

+    public void handleSettingsTabSave() {

+        if (getActionAlreadyAssigned(ShortcutMgr

+                .decodeKeyStroke(shortcutField.getText())) != null) {

+            // conflict detected: showing a warning to the user, instead of

+            // saving shortcuts

+            JOptionPane.showMessageDialog(this, 

+                    Translator.localize(

+                            "optionpane.shortcut-save-conflict"),

+                    Translator.localize(

+                            "optionpane.shortcut-save-conflict-title"),

+                          JOptionPane.WARNING_MESSAGE);

+        } else {

+            // saving shortcuts

+            ShortcutMgr.saveShortcuts(actions);

+        }

+    }

+

+    /**

+     * This is called every time a row is selected. It just updates the fields

+     * and the buttons status

+     * 

+     * @see javax.swing.event.ListSelectionListener#valueChanged(javax.swing.event.ListSelectionEvent)

+     */

+    public void valueChanged(ListSelectionEvent lse) {

+        if (lse.getValueIsAdjusting()) {

+            return;

+        }

+        Object src = lse.getSource();

+        if (src != table.getSelectionModel() || table.getSelectedRow() == -1) {

+            return;

+        }

+        // if a shortcut has been select then we have to check if the actual

+        // action is in conflict with other ones

+        if (!noneButton.isSelected()) {

+            Action oldAction = getActionAlreadyAssigned(ShortcutMgr

+                    .decodeKeyStroke(shortcutField.getText()));

+            if (oldAction != null) {

+                // this shortcut was already been assigned to another action;

+                // let's pop-up a message for the user

+                String t = MessageFormat.format(Translator

+                        .localize("optionpane.conflict-shortcut"),

+                        new Object[] {shortcutField.getText(),

+                                oldAction.getActionName() });

+                int response = JOptionPane.showConfirmDialog(this, t, t,

+                        JOptionPane.YES_NO_OPTION);

+                switch (response) {

+                case JOptionPane.YES_OPTION:

+                    oldAction.setCurrentShortcut(null);

+                    // blanking the old action's shortcut..

+                    // and now refreshing the table.

+                    table.setValueAt(oldAction, -1, -1);

+                    break;

+                case JOptionPane.NO_OPTION:

+                    // re-selecting the old row, without changing the target -

+                    // and without throwing another ListSelectionEvent!

+                    table.getSelectionModel().removeListSelectionListener(this);

+                    table.getSelectionModel().setSelectionInterval(

+                            lastRowSelected, lastRowSelected);

+                    table.getSelectionModel().addListSelectionListener(this);

+                    return;

+                }

+            }

+        }

+        // let's change the target

+        setTarget(actions[table.getSelectedRow()]);

+

+        lastRowSelected = table.getSelectedRow();

+    }

+

+    /**

+     * Verifies if the given keyStroke has already been assigned

+     * to another action 

+     * 

+     * @param keyStroke

+     *            the KeyStroke to be checked

+     * @return the Action that has already been assigned

+     */

+    public Action getActionAlreadyAssigned(KeyStroke keyStroke) {

+        for (int i = 0; i < actions.length; i++) {

+            if (actions[i].getCurrentShortcut() != null

+                    && actions[i].getCurrentShortcut().equals(keyStroke)

+                    && !actions[i].getActionName().equals(

+                            target.getActionName())) {

+                return actions[i];

+            }

+        }

+        // duplicate shortcut not found; let's check for duplicates

+        KeyStroke duplicate = ShortcutMgr.getDuplicate(keyStroke);

+        if (duplicate != null) {

+            // there's a duplicate: let's recheck if there is a conflict

+            for (int i = 0; i < actions.length; i++) {

+                if (actions[i].getCurrentShortcut() != null

+                        && actions[i].getCurrentShortcut().equals(duplicate)

+                        && !actions[i].getActionName().equals(

+                                target.getActionName())) {

+                    return actions[i];

+                }

+            }            

+        }

+        return null;

+    }

+

+    /**

+     * This is called every time a panel button (custom / default / none) is

+     * pressed.

+     * 

+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)

+     */

+    public void actionPerformed(ActionEvent e) {

+        resetKeyStrokeConflict();

+

+        if (e.getSource() == customButton) {

+            setKeyStrokeValue(ShortcutMgr.decodeKeyStroke(shortcutField

+                    .getText()));

+            shortcutField.setEnabled(true);

+            shortcutField.requestFocus();

+        } else if (e.getSource() == defaultButton) {

+            setKeyStrokeValue(target.getDefaultShortcut());

+            shortcutField.setEnabled(false);

+            checkShortcutAlreadyAssigned(target.getDefaultShortcut());

+        } else if (e.getSource() == noneButton) {

+            setKeyStrokeValue(null);

+            shortcutField.setEnabled(false);

+        }

+    }

+

+    /**

+     * This method simply reset the "conflict" gui, by blanking the warning

+     * label and resetting the shortcut's background color

+     *

+     */

+    private void resetKeyStrokeConflict() {

+        this.warningLabel.setText(" ");

+        this.shortcutField.setBackground(shortcutFieldDefaultBg);

+    }

+

+    /**

+     * Updates the GUI with the given new KeyStroke

+     * 

+     * @param newKeyStroke      the KeyStroke to be set

+     */

+    private void setKeyStrokeValue(KeyStroke newKeyStroke) {

+        String formattedKeyStroke = KeyEventUtils.formatKeyStroke(newKeyStroke);

+        // updating the shortcut field

+        shortcutField.setText(formattedKeyStroke);

+        // updating the table data

+        table.getModel().setValueAt(newKeyStroke, table.getSelectedRow(), 1);

+        // updating the actions

+        actions[table.getSelectedRow()].setCurrentShortcut(newKeyStroke);

+        table.repaint();

+    }

+

+    /**

+     * Listener method for ShortcutChangedEvents

+     * 

+     * @see org.argouml.ui.cmd.ShortcutChangedListener#shortcutChange(org.argouml.ui.cmd.ShortcutChangedEvent)

+     */

+    public void shortcutChange(ShortcutChangedEvent event) {

+        checkShortcutAlreadyAssigned(event.getKeyStroke());

+        setKeyStrokeValue(event.getKeyStroke());

+        this.selectedContainer.repaint();

+    }

+

+    /**

+     * Update the GUI, if there is a conflict for the given key stroke

+     * 

+     * @param newKeyStroke      the key stroke to be checked

+     */

+    private void checkShortcutAlreadyAssigned(KeyStroke newKeyStroke) {

+        Action oldAction = getActionAlreadyAssigned(newKeyStroke);

+        if (oldAction != null) {

+            // the shortcut has already been assigned to another action!

+            this.shortcutField.setBackground(Color.YELLOW);

+            this.warningLabel.setText(MessageFormat.format(Translator

+                    .localize("misc.shortcuts.conflict"),

+                    new Object[] {KeyEventUtils.formatKeyStroke(oldAction

+                            .getCurrentShortcut()), 

+                            oldAction.getActionName()}));

+        } else {

+            resetKeyStrokeConflict();

+        }

+    }

+

+    /**

+     * Table model for the table with modules.

+     */

+    class ShortcutTableModel extends AbstractTableModel {

+

+        /**

+         * Constructor.

+         */

+        public ShortcutTableModel() {

+            elements = new Object[actions.length][3];

+

+            for (int i = 0; i < elements.length; i++) {

+                Action currentAction = actions[i];

+                elements[i][0] = currentAction.getActionName();

+                elements[i][1] = currentAction.getCurrentShortcut();

+                elements[i][2] = currentAction.getDefaultShortcut();

+            }

+        }

+

+        /*

+         * @see javax.swing.table.TableModel#getColumnCount()

+         */

+        public int getColumnCount() {

+            return columnNames.length;

+        }

+

+        /*

+         * @see javax.swing.table.TableModel#getColumnName(int)

+         */

+        public String getColumnName(int col) {

+            return columnNames[col];

+        }

+

+        /*

+         * @see javax.swing.table.TableModel#getRowCount()

+         */

+        public int getRowCount() {

+            return elements.length;

+        }

+

+        /*

+         * @see javax.swing.table.TableModel#getValueAt(int, int)

+         */

+        public Object getValueAt(int row, int col) {

+            return elements[row][col];

+        }

+

+        /**

+         * Sets the value in the cell at <code>col</code> and

+         * <code>row</code> to <code>ob</code>. If <code>ob</code> is

+         * an Action instance, then the <code>col</code> and <code>row</code>

+         * parameters are ignored, and the ob Action is searched among the 

+         * elements and the actions.

+         * 

+         * @see javax.swing.table.TableModel#setValueAt( java.lang.Object, int,

+         *      int)

+         */

+        public void setValueAt(Object ob, int row, int col) {

+            // if the given object is a KeyStroke instance, then we ca

+            if (ob instanceof Action) {

+                Action newValueAction = (Action) ob;

+                for (int i = 0; i < elements.length; i++) {

+                    if (elements[i][0].equals(newValueAction.getActionName())) {

+                        elements[i][1] = newValueAction.getCurrentShortcut();

+                        repaint();

+                        break;

+                    }

+                }

+                // let's update also the actions array

+                for (int i = 0; i < actions.length; i++) {

+                    if (actions[i].getKey().equals(newValueAction.getKey())) {

+                        actions[i].setCurrentShortcut(newValueAction

+                                .getCurrentShortcut());

+                        break;

+                    }

+                }

+

+            } else {

+                elements[row][col] = ob;

+            }

+        }

+

+        /*

+         * @see javax.swing.table.TableModel#getColumnClass(int)

+         */

+        public Class getColumnClass(int col) {

+            switch (col) {

+            case 0:

+                return String.class;

+            case 1:

+                return KeyStroke.class;

+            case 2:

+                return KeyStroke.class;

+            default:

+                return null;

+            }

+        }

+

+        /*

+         * @see javax.swing.table.TableModel#isCellEditable(int, int)

+         */

+        public boolean isCellEditable(int row, int col) {

+            return false;

+        }

+

+        /**

+         * The UID.

+         */

+        private static final long serialVersionUID = -5970280716477119863L;

+    }

+}

+

+/**

+ * Argo's renderer for a KeyStroke object

+ *

+ * @author [email protected]

+ */

+class KeyStrokeCellRenderer extends DefaultTableCellRenderer {

+    /**

+     * The UID.

+     */

+    private static final long serialVersionUID = -7086302679799095974L;

+

+    public KeyStrokeCellRenderer() {

+        super();

+        setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

+    }

+

+    /**

+     * Format the given KeyStroke

+     * 

+     * @see javax.swing.table.DefaultTableCellRenderer#setValue(java.lang.Object)

+     */

+    public void setValue(Object value) {

+        if (value != null && value instanceof KeyStroke) {

+            value = KeyEventUtils.formatKeyStroke((KeyStroke) value);

+        }

+        super.setValue(value);

+    }

+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.