diff options
author | cbridgha | 2006-07-10 20:55:18 +0000 |
---|---|---|
committer | cbridgha | 2006-07-10 20:55:18 +0000 |
commit | 969f50c65486a06481544c708145b8c0a5555e05 (patch) | |
tree | 85262f644cdf48eae49469ca024cc9f2f570a1ab /plugins/org.eclipse.jem.beaninfo | |
parent | 6ea2a73377d751ee0b5446d45a48c116905400a2 (diff) | |
download | webtools.javaee-200607102108.tar.gz webtools.javaee-200607102108.tar.xz webtools.javaee-200607102108.zip |
This commit was manufactured by cvs2svn to create tag 'v200607102108'.v200607102108
Diffstat (limited to 'plugins/org.eclipse.jem.beaninfo')
100 files changed, 0 insertions, 33110 deletions
diff --git a/plugins/org.eclipse.jem.beaninfo/.classpath b/plugins/org.eclipse.jem.beaninfo/.classpath deleted file mode 100644 index c305e18ee..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.classpath +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="beaninfoCommon"/> - <classpathentry kind="src" path="beaninfo"/> - <classpathentry output="bin_vm_beaninfovm" kind="src" path="vm_beaninfovm"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/plugins/org.eclipse.jem.beaninfo/.cvsignore b/plugins/org.eclipse.jem.beaninfo/.cvsignore deleted file mode 100644 index 9b8171d4d..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -bin -build.xml -bin_beaninfocommon -bin_vm_beaninfovm diff --git a/plugins/org.eclipse.jem.beaninfo/.options b/plugins/org.eclipse.jem.beaninfo/.options deleted file mode 100644 index 5b246520d..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.options +++ /dev/null @@ -1,3 +0,0 @@ -org.eclipse.jem.beaninfo/debug/logtrace=default -org.eclipse.jem.beaninfo/debug/logtracefile=default -org.eclipse.jem.beaninfo/debug/loglevel=default diff --git a/plugins/org.eclipse.jem.beaninfo/.project b/plugins/org.eclipse.jem.beaninfo/.project deleted file mode 100644 index c03103858..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.project +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.jem.beaninfo</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.ibm.rtp.tools.rose.builder</name> - <arguments> - <dictionary> - <key>rose</key> - <value></value> - </dictionary> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>com.ibm.rtp.tools.rose.toolnature</nature> - </natures> -</projectDescription> diff --git a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 794b7f611..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Wed May 18 16:43:27 EDT 2005 -eclipse.preferences.version=1 -encoding//beaninfo/org/eclipse/jem/internal/beaninfo/core/messages.properties=8859_1 diff --git a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b466cc794..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,289 +0,0 @@ -#Tue Feb 21 10:09:18 EST 2006 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=error -org.eclipse.jdt.core.compiler.problem.unusedLocal=error -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=1 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1 -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=150 -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=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=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=do not 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=150 -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 diff --git a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 855e13665..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Tue Feb 21 10:09:18 EST 2006 -eclipse.preferences.version=1 -formatter_profile=_jve -formatter_settings_version=10 -org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=java;javax;org;org.eclipse.wtp;org.eclipse.jem;org.eclipse.ve.internal.cdm;org.eclipse.ve.internal.cde;org.eclipse.ve.internal.jcm;org.eclipse.ve.internal.java;org.eclipse.ve;com; -org.eclipse.jdt.ui.ondemandthreshold=3 -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> diff --git a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.pde.core.prefs b/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 59dc1688c..000000000 --- a/plugins/org.eclipse.jem.beaninfo/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Thu Jun 16 11:09:08 EDT 2005 -eclipse.preferences.version=1 -selfhosting.binExcludes=/org.eclipse.jem.beaninfo/bin_vm_beaninfovm diff --git a/plugins/org.eclipse.jem.beaninfo/META-INF/MANIFEST.MF b/plugins/org.eclipse.jem.beaninfo/META-INF/MANIFEST.MF deleted file mode 100644 index 57ae733b6..000000000 --- a/plugins/org.eclipse.jem.beaninfo/META-INF/MANIFEST.MF +++ /dev/null @@ -1,30 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.jem.beaninfo; singleton:=true -Bundle-Version: 1.2.0.qualifier -Bundle-Activator: org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Export-Package: org.eclipse.jem.beaninfo.common, - org.eclipse.jem.beaninfo.vm, - org.eclipse.jem.internal.beaninfo, - org.eclipse.jem.internal.beaninfo.adapters, - org.eclipse.jem.internal.beaninfo.common, - org.eclipse.jem.internal.beaninfo.core, - org.eclipse.jem.internal.beaninfo.impl -Require-Bundle: org.eclipse.jem.proxy, - com.ibm.etools.emf.event;resolution:=optional, - org.eclipse.jdt.core, - org.eclipse.jem.workbench, - org.eclipse.core.resources, - org.eclipse.emf.ecore, - org.eclipse.jem, - org.eclipse.emf.ecore.xmi, - org.eclipse.osgi, - org.eclipse.ui;resolution:=optional, - org.eclipse.core.runtime, - org.eclipse.debug.core, - org.eclipse.jem.util, - org.eclipse.emf.ecore.change -Eclipse-LazyStart: true diff --git a/plugins/org.eclipse.jem.beaninfo/about.html b/plugins/org.eclipse.jem.beaninfo/about.html deleted file mode 100644 index afceed0cc..000000000 --- a/plugins/org.eclipse.jem.beaninfo/about.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<html><head><title>About</title> - - - -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head><body lang="EN-US"> -<h2>About This Content</h2> - -<p>May 2, 2006</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> - -</body></html>
\ No newline at end of file diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanDecorator.java deleted file mode 100644 index 717b5b0c0..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanDecorator.java +++ /dev/null @@ -1,432 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: BeanDecorator.java,v $ - * $Revision: 1.10 $ $Date: 2005/08/24 20:31:28 $ - */ - - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.jem.java.JavaClass; -import java.net.URL; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Bean Decorator</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * Equivalent to BeanDecorator in java. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperProperties <em>Merge Super Properties</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperMethods <em>Merge Super Methods</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperEvents <em>Merge Super Events</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectProperties <em>Introspect Properties</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectMethods <em>Introspect Methods</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectEvents <em>Introspect Events</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isDoBeaninfo <em>Do Beaninfo</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedPropertyNames <em>Not Inherited Property Names</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedMethodNames <em>Not Inherited Method Names</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedEventNames <em>Not Inherited Event Names</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getCustomizerClass <em>Customizer Class</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator() - * @model - * @generated - */ - - -public interface BeanDecorator extends FeatureDecorator{ - - /** - * Returns the value of the '<em><b>Merge Super Properties</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Merge Super Properties</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Should the properties of super types be merged when asking for eAllAttributes/eAllReferences. - * <!-- end-model-doc --> - * @return the value of the '<em>Merge Super Properties</em>' attribute. - * @see #isSetMergeSuperProperties() - * @see #unsetMergeSuperProperties() - * @see #setMergeSuperProperties(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_MergeSuperProperties() - * @model default="true" unsettable="true" - * @generated - */ - boolean isMergeSuperProperties(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperProperties <em>Merge Super Properties</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Merge Super Properties</em>' attribute. - * @see #isSetMergeSuperProperties() - * @see #unsetMergeSuperProperties() - * @see #isMergeSuperProperties() - * @generated - */ - void setMergeSuperProperties(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperProperties <em>Merge Super Properties</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetMergeSuperProperties() - * @see #isMergeSuperProperties() - * @see #setMergeSuperProperties(boolean) - * @generated - */ - void unsetMergeSuperProperties(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperProperties <em>Merge Super Properties</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Merge Super Properties</em>' attribute is set. - * @see #unsetMergeSuperProperties() - * @see #isMergeSuperProperties() - * @see #setMergeSuperProperties(boolean) - * @generated - */ - boolean isSetMergeSuperProperties(); - - /** - * Returns the value of the '<em><b>Merge Super Methods</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Merge Super Behaviors</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Should the methods of super types be merged when asking for eAllBehaviors. - * <!-- end-model-doc --> - * @return the value of the '<em>Merge Super Methods</em>' attribute. - * @see #isSetMergeSuperMethods() - * @see #unsetMergeSuperMethods() - * @see #setMergeSuperMethods(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_MergeSuperMethods() - * @model default="true" unsettable="true" - * @generated - */ - boolean isMergeSuperMethods(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperMethods <em>Merge Super Methods</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Merge Super Methods</em>' attribute. - * @see #isSetMergeSuperMethods() - * @see #unsetMergeSuperMethods() - * @see #isMergeSuperMethods() - * @generated - */ - void setMergeSuperMethods(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperMethods <em>Merge Super Methods</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetMergeSuperMethods() - * @see #isMergeSuperMethods() - * @see #setMergeSuperMethods(boolean) - * @generated - */ - void unsetMergeSuperMethods(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperMethods <em>Merge Super Methods</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Merge Super Methods</em>' attribute is set. - * @see #unsetMergeSuperMethods() - * @see #isMergeSuperMethods() - * @see #setMergeSuperMethods(boolean) - * @generated - */ - boolean isSetMergeSuperMethods(); - - /** - * Returns the value of the '<em><b>Merge Super Events</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Merge Super Events</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Should the events of super types be merged when asking for eAllEvents. - * <!-- end-model-doc --> - * @return the value of the '<em>Merge Super Events</em>' attribute. - * @see #isSetMergeSuperEvents() - * @see #unsetMergeSuperEvents() - * @see #setMergeSuperEvents(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_MergeSuperEvents() - * @model default="true" unsettable="true" - * @generated - */ - boolean isMergeSuperEvents(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperEvents <em>Merge Super Events</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Merge Super Events</em>' attribute. - * @see #isSetMergeSuperEvents() - * @see #unsetMergeSuperEvents() - * @see #isMergeSuperEvents() - * @generated - */ - void setMergeSuperEvents(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperEvents <em>Merge Super Events</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetMergeSuperEvents() - * @see #isMergeSuperEvents() - * @see #setMergeSuperEvents(boolean) - * @generated - */ - void unsetMergeSuperEvents(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperEvents <em>Merge Super Events</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Merge Super Events</em>' attribute is set. - * @see #unsetMergeSuperEvents() - * @see #isMergeSuperEvents() - * @see #setMergeSuperEvents(boolean) - * @generated - */ - boolean isSetMergeSuperEvents(); - - /** - * Returns the value of the '<em><b>Introspect Properties</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Introspect Properties</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Should the properties from the introspection be added to the class. This allows properties to not be introspected and to use only what is defined explicitly in the JavaClass xmi file. - * <!-- end-model-doc --> - * @return the value of the '<em>Introspect Properties</em>' attribute. - * @see #setIntrospectProperties(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_IntrospectProperties() - * @model default="true" - * @generated - */ - boolean isIntrospectProperties(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectProperties <em>Introspect Properties</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Introspect Properties</em>' attribute. - * @see #isIntrospectProperties() - * @generated - */ - void setIntrospectProperties(boolean value); - - /** - * Returns the value of the '<em><b>Introspect Methods</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Introspect Behaviors</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Should the methods from the introspection be added to the class. This allows methods to not be introspected and to use only what is defined explicitly in the JavaClass xmi file. - * <!-- end-model-doc --> - * @return the value of the '<em>Introspect Methods</em>' attribute. - * @see #setIntrospectMethods(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_IntrospectMethods() - * @model default="true" - * @generated - */ - boolean isIntrospectMethods(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectMethods <em>Introspect Methods</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Introspect Methods</em>' attribute. - * @see #isIntrospectMethods() - * @generated - */ - void setIntrospectMethods(boolean value); - - /** - * Returns the value of the '<em><b>Introspect Events</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Introspect Events</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Should the events from the introspection be added to the class. This allows events to not be introspected and to use only what is defined explicitly in the JavaClass xmi file. - * <!-- end-model-doc --> - * @return the value of the '<em>Introspect Events</em>' attribute. - * @see #setIntrospectEvents(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_IntrospectEvents() - * @model default="true" - * @generated - */ - boolean isIntrospectEvents(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectEvents <em>Introspect Events</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Introspect Events</em>' attribute. - * @see #isIntrospectEvents() - * @generated - */ - void setIntrospectEvents(boolean value); - - /** - * Returns the value of the '<em><b>Customizer Class</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Customizer Class</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Customizer Class</em>' reference. - * @see #setCustomizerClass(JavaClass) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_CustomizerClass() - * @model - * @generated - */ - JavaClass getCustomizerClass(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getCustomizerClass <em>Customizer Class</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Customizer Class</em>' reference. - * @see #getCustomizerClass() - * @generated - */ - void setCustomizerClass(JavaClass value); - - /** - * Returns the value of the '<em><b>Do Beaninfo</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Do Beaninfo</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This means do we go and get the beaninfo from the remote vm. If false, then it will not try to get the beaninfo. This doesn't prevent introspection through reflection. That is controled by the separate introspect... attributes. - * <!-- end-model-doc --> - * @return the value of the '<em>Do Beaninfo</em>' attribute. - * @see #setDoBeaninfo(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_DoBeaninfo() - * @model default="true" - * @generated - */ - boolean isDoBeaninfo(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isDoBeaninfo <em>Do Beaninfo</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Do Beaninfo</em>' attribute. - * @see #isDoBeaninfo() - * @generated - */ - void setDoBeaninfo(boolean value); - - /** - * Returns the value of the '<em><b>Not Inherited Property Names</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This is the list of inherited property names to not use in getAllProperties(). These names are properties that should not be inherited and should not show through. If the inherited property is not on the list then it will show in getAllProperties(). - * <p> - * This list will be empty if all properties are inherited or if the mergeSuperProperties flag is false. - * <p> - * Note: This attribute is not meant to be changed by clients. It is an internal attribute. - * <!-- end-model-doc --> - * @return the value of the '<em>Not Inherited Property Names</em>' attribute list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_NotInheritedPropertyNames() - * @model type="java.lang.String" - * @generated - */ - EList getNotInheritedPropertyNames(); - - /** - * Returns the value of the '<em><b>Not Inherited Method Names</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This is the list of inherited method names to not use in eAllOperations(). These names are operations that should not be inherited and should not show through. If the inherited operation is not on the list then it will show in getAllOperations(). - * <p> - * This list will be empty if all operations are inherited or if the mergeSuperBehaviors flag is false. - * <!-- end-model-doc --> - * @return the value of the '<em>Not Inherited Method Names</em>' attribute list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_NotInheritedMethodNames() - * @model type="java.lang.String" - * @generated - */ - EList getNotInheritedMethodNames(); - - /** - * Returns the value of the '<em><b>Not Inherited Event Names</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This is the list of inherited event names to not use in getAllEvents(). These names are events that should not be inherited and should not show through. If the inherited event is not on the list then it will show in getAllEvents(). - * <p> - * This list will be empty if all events are inherited or if the mergeSuperEvents flag is false. - * <!-- end-model-doc --> - * @return the value of the '<em>Not Inherited Event Names</em>' attribute list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanDecorator_NotInheritedEventNames() - * @model type="java.lang.String" - * @generated - */ - EList getNotInheritedEventNames(); - - /** - * Return the URL of a 16x16 Color icon - */ - URL getIconURL(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanEvent.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanEvent.java deleted file mode 100644 index aabdaf450..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanEvent.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: BeanEvent.java,v $ - * $Revision: 1.7 $ $Date: 2005/08/24 20:31:28 $ - */ - -import org.eclipse.jem.java.JavaEvent; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Bean Event</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * Event from Introspection/Reflection. - * <p> - * The BeanEvent will be under the JavaClass' events and allEvents feature. Each BeanEvent will be decorated by an EventSetDecorator. - * <!-- end-model-doc --> - * - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getBeanEvent() - * @model - * @generated - */ - -public interface BeanEvent extends JavaEvent{ - - - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeaninfoFactory.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeaninfoFactory.java deleted file mode 100644 index b1d7b52f1..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeaninfoFactory.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: BeaninfoFactory.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:28 $ - */ - - -import org.eclipse.emf.ecore.EFactory; -/** - * <!-- begin-user-doc --> - * The <b>Factory</b> for the model. - * It provides a create method for each non-abstract class of the model. - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage - * @generated - */ - - -public interface BeaninfoFactory extends EFactory{ - /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - BeaninfoFactory eINSTANCE = new org.eclipse.jem.internal.beaninfo.impl.BeaninfoFactoryImpl(); - - /** - * Returns a new object of class '<em>Feature Decorator</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Feature Decorator</em>'. - * @generated - */ - FeatureDecorator createFeatureDecorator(); - - /** - * Returns a new object of class '<em>Event Set Decorator</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Event Set Decorator</em>'. - * @generated - */ - EventSetDecorator createEventSetDecorator(); - - /** - * Returns a new object of class '<em>Method Proxy</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Method Proxy</em>'. - * @generated - */ - MethodProxy createMethodProxy(); - - /** - * Returns a new object of class '<em>Property Decorator</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Property Decorator</em>'. - * @generated - */ - PropertyDecorator createPropertyDecorator(); - - /** - * Returns a new object of class '<em>Indexed Property Decorator</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Indexed Property Decorator</em>'. - * @generated - */ - IndexedPropertyDecorator createIndexedPropertyDecorator(); - - /** - * Returns a new object of class '<em>Bean Decorator</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Bean Decorator</em>'. - * @generated - */ - BeanDecorator createBeanDecorator(); - - /** - * Returns a new object of class '<em>Method Decorator</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Method Decorator</em>'. - * @generated - */ - MethodDecorator createMethodDecorator(); - - /** - * Returns a new object of class '<em>Parameter Decorator</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Parameter Decorator</em>'. - * @generated - */ - ParameterDecorator createParameterDecorator(); - - /** - * Returns the package supported by this factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the package supported by this factory. - * @generated - */ - BeaninfoPackage getBeaninfoPackage(); - - /** - * Returns a new object of class '<em>Bean Event</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Bean Event</em>'. - * @generated - */ - BeanEvent createBeanEvent(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeaninfoPackage.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeaninfoPackage.java deleted file mode 100644 index fd4599d2a..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeaninfoPackage.java +++ /dev/null @@ -1,2692 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: BeaninfoPackage.java,v $ - * $Revision: 1.10 $ $Date: 2005/09/15 20:09:52 $ - */ - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; - -import org.eclipse.jem.java.JavaRefPackage; -/** - * <!-- begin-user-doc --> - * The <b>Package</b> for the model. - * It contains accessors for the meta objects to represent - * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> - * </ul> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.BeaninfoFactory - * @model kind="package" - * @generated - */ - -public interface BeaninfoPackage extends EPackage{ - /** - * The package name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNAME = "beaninfo"; //$NON-NLS-1$ - - /** - * The package namespace URI. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNS_URI = "http:///org/eclipse/jem/internal/beaninfo/beaninfo.ecore"; //$NON-NLS-1$ - - /** - * The package namespace name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNS_PREFIX = "org.eclipse.jem.internal.beaninfo.beaninfo"; //$NON-NLS-1$ - - /** - * The singleton instance of the package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - BeaninfoPackage eINSTANCE = org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl.init(); - - - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl <em>Feature Decorator</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getFeatureDecorator() - * @generated - */ - int FEATURE_DECORATOR = 0; - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__EANNOTATIONS = EcorePackage.EANNOTATION__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__SOURCE = EcorePackage.EANNOTATION__SOURCE; - - /** - * The feature id for the '<em><b>Details</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__DETAILS = EcorePackage.EANNOTATION__DETAILS; - - /** - * The feature id for the '<em><b>EModel Element</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__EMODEL_ELEMENT = EcorePackage.EANNOTATION__EMODEL_ELEMENT; - - /** - * The feature id for the '<em><b>Contents</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__CONTENTS = EcorePackage.EANNOTATION__CONTENTS; - - /** - * The feature id for the '<em><b>References</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__REFERENCES = EcorePackage.EANNOTATION__REFERENCES; - - /** - * The feature id for the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__DISPLAY_NAME = EcorePackage.EANNOTATION_FEATURE_COUNT + 0; - /** - * The feature id for the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__SHORT_DESCRIPTION = EcorePackage.EANNOTATION_FEATURE_COUNT + 1; - /** - * The feature id for the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__CATEGORY = EcorePackage.EANNOTATION_FEATURE_COUNT + 2; - /** - * The feature id for the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__EXPERT = EcorePackage.EANNOTATION_FEATURE_COUNT + 3; - - /** - * The feature id for the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__HIDDEN = EcorePackage.EANNOTATION_FEATURE_COUNT + 4; - - /** - * The feature id for the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__PREFERRED = EcorePackage.EANNOTATION_FEATURE_COUNT + 5; - - /** - * The feature id for the '<em><b>Merge Introspection</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__MERGE_INTROSPECTION = EcorePackage.EANNOTATION_FEATURE_COUNT + 6; - /** - * The feature id for the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY = EcorePackage.EANNOTATION_FEATURE_COUNT + 7; - - /** - * The feature id for the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__IMPLICITLY_SET_BITS = EcorePackage.EANNOTATION_FEATURE_COUNT + 8; - - /** - * The feature id for the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG = EcorePackage.EANNOTATION_FEATURE_COUNT + 9; - - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl <em>Event Set Decorator</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getEventSetDecorator() - * @generated - */ - int EVENT_SET_DECORATOR = 2; - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.MethodProxyImpl <em>Method Proxy</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.MethodProxyImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getMethodProxy() - * @generated - */ - int METHOD_PROXY = 7; - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl <em>Property Decorator</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getPropertyDecorator() - * @generated - */ - int PROPERTY_DECORATOR = 5; - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.IndexedPropertyDecoratorImpl <em>Indexed Property Decorator</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.IndexedPropertyDecoratorImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getIndexedPropertyDecorator() - * @generated - */ - int INDEXED_PROPERTY_DECORATOR = 6; - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl <em>Bean Decorator</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getBeanDecorator() - * @generated - */ - int BEAN_DECORATOR = 1; - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.MethodDecoratorImpl <em>Method Decorator</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.MethodDecoratorImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getMethodDecorator() - * @generated - */ - int METHOD_DECORATOR = 3; - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.ParameterDecoratorImpl <em>Parameter Decorator</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.ParameterDecoratorImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getParameterDecorator() - * @generated - */ - int PARAMETER_DECORATOR = 4; - /** - * The meta object id for the '<em>Feature Attribute Value</em>' data type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getFeatureAttributeValue() - * @generated - */ - int FEATURE_ATTRIBUTE_VALUE = 11; - /** - * The feature id for the '<em><b>Attributes</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR__ATTRIBUTES = EcorePackage.EANNOTATION_FEATURE_COUNT + 10; - /** - * The number of structural features of the the '<em>Feature Decorator</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_DECORATOR_FEATURE_COUNT = EcorePackage.EANNOTATION_FEATURE_COUNT + 11; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__EANNOTATIONS = FEATURE_DECORATOR__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__SOURCE = FEATURE_DECORATOR__SOURCE; - - /** - * The feature id for the '<em><b>Details</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__DETAILS = FEATURE_DECORATOR__DETAILS; - - /** - * The feature id for the '<em><b>EModel Element</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__EMODEL_ELEMENT = FEATURE_DECORATOR__EMODEL_ELEMENT; - - /** - * The feature id for the '<em><b>Contents</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__CONTENTS = FEATURE_DECORATOR__CONTENTS; - - /** - * The feature id for the '<em><b>References</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__REFERENCES = FEATURE_DECORATOR__REFERENCES; - - /** - * The feature id for the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__DISPLAY_NAME = FEATURE_DECORATOR__DISPLAY_NAME; - /** - * The feature id for the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__SHORT_DESCRIPTION = FEATURE_DECORATOR__SHORT_DESCRIPTION; - /** - * The feature id for the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__CATEGORY = FEATURE_DECORATOR__CATEGORY; - /** - * The feature id for the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__EXPERT = FEATURE_DECORATOR__EXPERT; - - /** - * The feature id for the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__HIDDEN = FEATURE_DECORATOR__HIDDEN; - - /** - * The feature id for the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__PREFERRED = FEATURE_DECORATOR__PREFERRED; - - /** - * The feature id for the '<em><b>Merge Introspection</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__MERGE_INTROSPECTION = FEATURE_DECORATOR__MERGE_INTROSPECTION; - /** - * The feature id for the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY = FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY; - - /** - * The feature id for the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__IMPLICITLY_SET_BITS = FEATURE_DECORATOR__IMPLICITLY_SET_BITS; - - /** - * The feature id for the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__IMPLICIT_DECORATOR_FLAG = FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG; - - /** - * The feature id for the '<em><b>Attributes</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__ATTRIBUTES = FEATURE_DECORATOR__ATTRIBUTES; - /** - * The feature id for the '<em><b>Merge Super Properties</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__MERGE_SUPER_PROPERTIES = FEATURE_DECORATOR_FEATURE_COUNT + 0; - /** - * The feature id for the '<em><b>Merge Super Methods</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__MERGE_SUPER_METHODS = FEATURE_DECORATOR_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Merge Super Events</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__MERGE_SUPER_EVENTS = FEATURE_DECORATOR_FEATURE_COUNT + 2; - /** - * The feature id for the '<em><b>Introspect Properties</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__INTROSPECT_PROPERTIES = FEATURE_DECORATOR_FEATURE_COUNT + 3; - /** - * The feature id for the '<em><b>Introspect Methods</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__INTROSPECT_METHODS = FEATURE_DECORATOR_FEATURE_COUNT + 4; - - /** - * The feature id for the '<em><b>Introspect Events</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__INTROSPECT_EVENTS = FEATURE_DECORATOR_FEATURE_COUNT + 5; - /** - * The feature id for the '<em><b>Do Beaninfo</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__DO_BEANINFO = FEATURE_DECORATOR_FEATURE_COUNT + 6; - /** - * The feature id for the '<em><b>Not Inherited Property Names</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__NOT_INHERITED_PROPERTY_NAMES = FEATURE_DECORATOR_FEATURE_COUNT + 7; - - /** - * The feature id for the '<em><b>Not Inherited Method Names</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__NOT_INHERITED_METHOD_NAMES = FEATURE_DECORATOR_FEATURE_COUNT + 8; - - /** - * The feature id for the '<em><b>Not Inherited Event Names</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__NOT_INHERITED_EVENT_NAMES = FEATURE_DECORATOR_FEATURE_COUNT + 9; - - /** - * The feature id for the '<em><b>Customizer Class</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR__CUSTOMIZER_CLASS = FEATURE_DECORATOR_FEATURE_COUNT + 10; - /** - * The number of structural features of the the '<em>Bean Decorator</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_DECORATOR_FEATURE_COUNT = FEATURE_DECORATOR_FEATURE_COUNT + 11; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__EANNOTATIONS = FEATURE_DECORATOR__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__SOURCE = FEATURE_DECORATOR__SOURCE; - - /** - * The feature id for the '<em><b>Details</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__DETAILS = FEATURE_DECORATOR__DETAILS; - - /** - * The feature id for the '<em><b>EModel Element</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__EMODEL_ELEMENT = FEATURE_DECORATOR__EMODEL_ELEMENT; - - /** - * The feature id for the '<em><b>Contents</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__CONTENTS = FEATURE_DECORATOR__CONTENTS; - - /** - * The feature id for the '<em><b>References</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__REFERENCES = FEATURE_DECORATOR__REFERENCES; - - /** - * The feature id for the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__DISPLAY_NAME = FEATURE_DECORATOR__DISPLAY_NAME; - /** - * The feature id for the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__SHORT_DESCRIPTION = FEATURE_DECORATOR__SHORT_DESCRIPTION; - /** - * The feature id for the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__CATEGORY = FEATURE_DECORATOR__CATEGORY; - /** - * The feature id for the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__EXPERT = FEATURE_DECORATOR__EXPERT; - - /** - * The feature id for the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__HIDDEN = FEATURE_DECORATOR__HIDDEN; - - /** - * The feature id for the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__PREFERRED = FEATURE_DECORATOR__PREFERRED; - - /** - * The feature id for the '<em><b>Merge Introspection</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__MERGE_INTROSPECTION = FEATURE_DECORATOR__MERGE_INTROSPECTION; - /** - * The feature id for the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY = FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY; - - /** - * The feature id for the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__IMPLICITLY_SET_BITS = FEATURE_DECORATOR__IMPLICITLY_SET_BITS; - - /** - * The feature id for the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__IMPLICIT_DECORATOR_FLAG = FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG; - - /** - * The feature id for the '<em><b>Attributes</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__ATTRIBUTES = FEATURE_DECORATOR__ATTRIBUTES; - /** - * The feature id for the '<em><b>In Default Event Set</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET = FEATURE_DECORATOR_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Unicast</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__UNICAST = FEATURE_DECORATOR_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Listener Methods Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__LISTENER_METHODS_EXPLICIT_EMPTY = FEATURE_DECORATOR_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.BeanEventImpl <em>Bean Event</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.BeanEventImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getBeanEvent() - * @generated - */ - int BEAN_EVENT = 8; - /** - * The feature id for the '<em><b>Add Listener Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__ADD_LISTENER_METHOD = FEATURE_DECORATOR_FEATURE_COUNT + 3; - /** - * The feature id for the '<em><b>Listener Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__LISTENER_METHODS = FEATURE_DECORATOR_FEATURE_COUNT + 4; - /** - * The feature id for the '<em><b>Listener Type</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__LISTENER_TYPE = FEATURE_DECORATOR_FEATURE_COUNT + 5; - /** - * The feature id for the '<em><b>Remove Listener Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD = FEATURE_DECORATOR_FEATURE_COUNT + 6; - /** - * The feature id for the '<em><b>Event Adapter Class</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS = FEATURE_DECORATOR_FEATURE_COUNT + 7; - - /** - * The feature id for the '<em><b>Ser List Mthd</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR__SER_LIST_MTHD = FEATURE_DECORATOR_FEATURE_COUNT + 8; - - /** - * The number of structural features of the the '<em>Event Set Decorator</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int EVENT_SET_DECORATOR_FEATURE_COUNT = FEATURE_DECORATOR_FEATURE_COUNT + 9; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__EANNOTATIONS = FEATURE_DECORATOR__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__SOURCE = FEATURE_DECORATOR__SOURCE; - - /** - * The feature id for the '<em><b>Details</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__DETAILS = FEATURE_DECORATOR__DETAILS; - - /** - * The feature id for the '<em><b>EModel Element</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__EMODEL_ELEMENT = FEATURE_DECORATOR__EMODEL_ELEMENT; - - /** - * The feature id for the '<em><b>Contents</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__CONTENTS = FEATURE_DECORATOR__CONTENTS; - - /** - * The feature id for the '<em><b>References</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__REFERENCES = FEATURE_DECORATOR__REFERENCES; - - /** - * The feature id for the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__DISPLAY_NAME = FEATURE_DECORATOR__DISPLAY_NAME; - /** - * The feature id for the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__SHORT_DESCRIPTION = FEATURE_DECORATOR__SHORT_DESCRIPTION; - /** - * The feature id for the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__CATEGORY = FEATURE_DECORATOR__CATEGORY; - /** - * The feature id for the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__EXPERT = FEATURE_DECORATOR__EXPERT; - - /** - * The feature id for the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__HIDDEN = FEATURE_DECORATOR__HIDDEN; - - /** - * The feature id for the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__PREFERRED = FEATURE_DECORATOR__PREFERRED; - - /** - * The feature id for the '<em><b>Merge Introspection</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__MERGE_INTROSPECTION = FEATURE_DECORATOR__MERGE_INTROSPECTION; - /** - * The feature id for the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY = FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY; - - /** - * The feature id for the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__IMPLICITLY_SET_BITS = FEATURE_DECORATOR__IMPLICITLY_SET_BITS; - - /** - * The feature id for the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__IMPLICIT_DECORATOR_FLAG = FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG; - - /** - * The feature id for the '<em><b>Attributes</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__ATTRIBUTES = FEATURE_DECORATOR__ATTRIBUTES; - /** - * The feature id for the '<em><b>Parms Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__PARMS_EXPLICIT_EMPTY = FEATURE_DECORATOR_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Parameter Descriptors</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__PARAMETER_DESCRIPTORS = FEATURE_DECORATOR_FEATURE_COUNT + 1; - /** - * The feature id for the '<em><b>Ser Parm Desc</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR__SER_PARM_DESC = FEATURE_DECORATOR_FEATURE_COUNT + 2; - - /** - * The number of structural features of the the '<em>Method Decorator</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_DECORATOR_FEATURE_COUNT = FEATURE_DECORATOR_FEATURE_COUNT + 3; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__EANNOTATIONS = FEATURE_DECORATOR__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__SOURCE = FEATURE_DECORATOR__SOURCE; - - /** - * The feature id for the '<em><b>Details</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__DETAILS = FEATURE_DECORATOR__DETAILS; - - /** - * The feature id for the '<em><b>EModel Element</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__EMODEL_ELEMENT = FEATURE_DECORATOR__EMODEL_ELEMENT; - - /** - * The feature id for the '<em><b>Contents</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__CONTENTS = FEATURE_DECORATOR__CONTENTS; - - /** - * The feature id for the '<em><b>References</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__REFERENCES = FEATURE_DECORATOR__REFERENCES; - - /** - * The feature id for the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__DISPLAY_NAME = FEATURE_DECORATOR__DISPLAY_NAME; - /** - * The feature id for the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__SHORT_DESCRIPTION = FEATURE_DECORATOR__SHORT_DESCRIPTION; - /** - * The feature id for the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__CATEGORY = FEATURE_DECORATOR__CATEGORY; - /** - * The feature id for the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__EXPERT = FEATURE_DECORATOR__EXPERT; - - /** - * The feature id for the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__HIDDEN = FEATURE_DECORATOR__HIDDEN; - - /** - * The feature id for the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__PREFERRED = FEATURE_DECORATOR__PREFERRED; - - /** - * The feature id for the '<em><b>Merge Introspection</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__MERGE_INTROSPECTION = FEATURE_DECORATOR__MERGE_INTROSPECTION; - /** - * The feature id for the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY = FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY; - - /** - * The feature id for the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__IMPLICITLY_SET_BITS = FEATURE_DECORATOR__IMPLICITLY_SET_BITS; - - /** - * The feature id for the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__IMPLICIT_DECORATOR_FLAG = FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG; - - /** - * The feature id for the '<em><b>Attributes</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__ATTRIBUTES = FEATURE_DECORATOR__ATTRIBUTES; - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__NAME = FEATURE_DECORATOR_FEATURE_COUNT + 0; - /** - * The feature id for the '<em><b>Parameter</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR__PARAMETER = FEATURE_DECORATOR_FEATURE_COUNT + 1; - /** - * The number of structural features of the the '<em>Parameter Decorator</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARAMETER_DECORATOR_FEATURE_COUNT = FEATURE_DECORATOR_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__EANNOTATIONS = FEATURE_DECORATOR__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__SOURCE = FEATURE_DECORATOR__SOURCE; - - /** - * The feature id for the '<em><b>Details</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__DETAILS = FEATURE_DECORATOR__DETAILS; - - /** - * The feature id for the '<em><b>EModel Element</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__EMODEL_ELEMENT = FEATURE_DECORATOR__EMODEL_ELEMENT; - - /** - * The feature id for the '<em><b>Contents</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__CONTENTS = FEATURE_DECORATOR__CONTENTS; - - /** - * The feature id for the '<em><b>References</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__REFERENCES = FEATURE_DECORATOR__REFERENCES; - - /** - * The feature id for the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__DISPLAY_NAME = FEATURE_DECORATOR__DISPLAY_NAME; - /** - * The feature id for the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__SHORT_DESCRIPTION = FEATURE_DECORATOR__SHORT_DESCRIPTION; - /** - * The feature id for the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__CATEGORY = FEATURE_DECORATOR__CATEGORY; - /** - * The feature id for the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__EXPERT = FEATURE_DECORATOR__EXPERT; - - /** - * The feature id for the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__HIDDEN = FEATURE_DECORATOR__HIDDEN; - - /** - * The feature id for the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__PREFERRED = FEATURE_DECORATOR__PREFERRED; - - /** - * The feature id for the '<em><b>Merge Introspection</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__MERGE_INTROSPECTION = FEATURE_DECORATOR__MERGE_INTROSPECTION; - /** - * The feature id for the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY = FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY; - - /** - * The feature id for the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__IMPLICITLY_SET_BITS = FEATURE_DECORATOR__IMPLICITLY_SET_BITS; - - /** - * The feature id for the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG = FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG; - - /** - * The feature id for the '<em><b>Attributes</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__ATTRIBUTES = FEATURE_DECORATOR__ATTRIBUTES; - /** - * The feature id for the '<em><b>Bound</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__BOUND = FEATURE_DECORATOR_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Constrained</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__CONSTRAINED = FEATURE_DECORATOR_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Design Time</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__DESIGN_TIME = FEATURE_DECORATOR_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>Always Incompatible</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE = FEATURE_DECORATOR_FEATURE_COUNT + 3; - - /** - * The feature id for the '<em><b>Filter Flags</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__FILTER_FLAGS = FEATURE_DECORATOR_FEATURE_COUNT + 4; - /** - * The feature id for the '<em><b>Field Read Only</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__FIELD_READ_ONLY = FEATURE_DECORATOR_FEATURE_COUNT + 5; - - /** - * The feature id for the '<em><b>Property Editor Class</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS = FEATURE_DECORATOR_FEATURE_COUNT + 6; - /** - * The feature id for the '<em><b>Read Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__READ_METHOD = FEATURE_DECORATOR_FEATURE_COUNT + 7; - /** - * The feature id for the '<em><b>Write Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__WRITE_METHOD = FEATURE_DECORATOR_FEATURE_COUNT + 8; - /** - * The feature id for the '<em><b>Field</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR__FIELD = FEATURE_DECORATOR_FEATURE_COUNT + 9; - - /** - * The number of structural features of the the '<em>Property Decorator</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PROPERTY_DECORATOR_FEATURE_COUNT = FEATURE_DECORATOR_FEATURE_COUNT + 10; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__EANNOTATIONS = PROPERTY_DECORATOR__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__SOURCE = PROPERTY_DECORATOR__SOURCE; - - /** - * The feature id for the '<em><b>Details</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__DETAILS = PROPERTY_DECORATOR__DETAILS; - - /** - * The feature id for the '<em><b>EModel Element</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT = PROPERTY_DECORATOR__EMODEL_ELEMENT; - - /** - * The feature id for the '<em><b>Contents</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__CONTENTS = PROPERTY_DECORATOR__CONTENTS; - - /** - * The feature id for the '<em><b>References</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__REFERENCES = PROPERTY_DECORATOR__REFERENCES; - - /** - * The feature id for the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__DISPLAY_NAME = PROPERTY_DECORATOR__DISPLAY_NAME; - /** - * The feature id for the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__SHORT_DESCRIPTION = PROPERTY_DECORATOR__SHORT_DESCRIPTION; - /** - * The feature id for the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__CATEGORY = PROPERTY_DECORATOR__CATEGORY; - /** - * The feature id for the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__EXPERT = PROPERTY_DECORATOR__EXPERT; - - /** - * The feature id for the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__HIDDEN = PROPERTY_DECORATOR__HIDDEN; - - /** - * The feature id for the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__PREFERRED = PROPERTY_DECORATOR__PREFERRED; - - /** - * The feature id for the '<em><b>Merge Introspection</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__MERGE_INTROSPECTION = PROPERTY_DECORATOR__MERGE_INTROSPECTION; - /** - * The feature id for the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY = PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY; - - /** - * The feature id for the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__IMPLICITLY_SET_BITS = PROPERTY_DECORATOR__IMPLICITLY_SET_BITS; - - /** - * The feature id for the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG = PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG; - - /** - * The feature id for the '<em><b>Attributes</b></em>' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__ATTRIBUTES = PROPERTY_DECORATOR__ATTRIBUTES; - /** - * The feature id for the '<em><b>Bound</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__BOUND = PROPERTY_DECORATOR__BOUND; - - /** - * The feature id for the '<em><b>Constrained</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__CONSTRAINED = PROPERTY_DECORATOR__CONSTRAINED; - - /** - * The feature id for the '<em><b>Design Time</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__DESIGN_TIME = PROPERTY_DECORATOR__DESIGN_TIME; - - /** - * The feature id for the '<em><b>Always Incompatible</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE = PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE; - - /** - * The feature id for the '<em><b>Filter Flags</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__FILTER_FLAGS = PROPERTY_DECORATOR__FILTER_FLAGS; - /** - * The feature id for the '<em><b>Field Read Only</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__FIELD_READ_ONLY = PROPERTY_DECORATOR__FIELD_READ_ONLY; - - /** - * The feature id for the '<em><b>Property Editor Class</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS = PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS; - /** - * The feature id for the '<em><b>Read Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__READ_METHOD = PROPERTY_DECORATOR__READ_METHOD; - /** - * The feature id for the '<em><b>Write Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__WRITE_METHOD = PROPERTY_DECORATOR__WRITE_METHOD; - /** - * The feature id for the '<em><b>Field</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__FIELD = PROPERTY_DECORATOR__FIELD; - - /** - * The feature id for the '<em><b>Indexed Read Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD = PROPERTY_DECORATOR_FEATURE_COUNT + 0; - /** - * The feature id for the '<em><b>Indexed Write Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD = PROPERTY_DECORATOR_FEATURE_COUNT + 1; - /** - * The number of structural features of the the '<em>Indexed Property Decorator</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INDEXED_PROPERTY_DECORATOR_FEATURE_COUNT = PROPERTY_DECORATOR_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__EANNOTATIONS = EcorePackage.EOPERATION__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__NAME = EcorePackage.EOPERATION__NAME; - /** - * The feature id for the '<em><b>Ordered</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__ORDERED = EcorePackage.EOPERATION__ORDERED; - - /** - * The feature id for the '<em><b>Unique</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__UNIQUE = EcorePackage.EOPERATION__UNIQUE; - - /** - * The feature id for the '<em><b>Lower Bound</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__LOWER_BOUND = EcorePackage.EOPERATION__LOWER_BOUND; - - /** - * The feature id for the '<em><b>Upper Bound</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__UPPER_BOUND = EcorePackage.EOPERATION__UPPER_BOUND; - - /** - * The feature id for the '<em><b>Many</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__MANY = EcorePackage.EOPERATION__MANY; - - /** - * The feature id for the '<em><b>Required</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__REQUIRED = EcorePackage.EOPERATION__REQUIRED; - - /** - * The feature id for the '<em><b>EType</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__ETYPE = EcorePackage.EOPERATION__ETYPE; - - /** - * The feature id for the '<em><b>EContaining Class</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__ECONTAINING_CLASS = EcorePackage.EOPERATION__ECONTAINING_CLASS; - - /** - * The feature id for the '<em><b>EParameters</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__EPARAMETERS = EcorePackage.EOPERATION__EPARAMETERS; - - /** - * The feature id for the '<em><b>EExceptions</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__EEXCEPTIONS = EcorePackage.EOPERATION__EEXCEPTIONS; - - /** - * The feature id for the '<em><b>Method</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY__METHOD = EcorePackage.EOPERATION_FEATURE_COUNT + 0; - /** - * The number of structural features of the the '<em>Method Proxy</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int METHOD_PROXY_FEATURE_COUNT = EcorePackage.EOPERATION_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__EANNOTATIONS = JavaRefPackage.JAVA_EVENT__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__NAME = JavaRefPackage.JAVA_EVENT__NAME; - /** - * The feature id for the '<em><b>Ordered</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__ORDERED = JavaRefPackage.JAVA_EVENT__ORDERED; - - /** - * The feature id for the '<em><b>Unique</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__UNIQUE = JavaRefPackage.JAVA_EVENT__UNIQUE; - - /** - * The feature id for the '<em><b>Lower Bound</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__LOWER_BOUND = JavaRefPackage.JAVA_EVENT__LOWER_BOUND; - - /** - * The feature id for the '<em><b>Upper Bound</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__UPPER_BOUND = JavaRefPackage.JAVA_EVENT__UPPER_BOUND; - - /** - * The feature id for the '<em><b>Many</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__MANY = JavaRefPackage.JAVA_EVENT__MANY; - - /** - * The feature id for the '<em><b>Required</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__REQUIRED = JavaRefPackage.JAVA_EVENT__REQUIRED; - - /** - * The feature id for the '<em><b>EType</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__ETYPE = JavaRefPackage.JAVA_EVENT__ETYPE; - - /** - * The feature id for the '<em><b>Changeable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__CHANGEABLE = JavaRefPackage.JAVA_EVENT__CHANGEABLE; - - /** - * The feature id for the '<em><b>Volatile</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__VOLATILE = JavaRefPackage.JAVA_EVENT__VOLATILE; - - /** - * The feature id for the '<em><b>Transient</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__TRANSIENT = JavaRefPackage.JAVA_EVENT__TRANSIENT; - - /** - * The feature id for the '<em><b>Default Value Literal</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__DEFAULT_VALUE_LITERAL = JavaRefPackage.JAVA_EVENT__DEFAULT_VALUE_LITERAL; - - /** - * The feature id for the '<em><b>Default Value</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__DEFAULT_VALUE = JavaRefPackage.JAVA_EVENT__DEFAULT_VALUE; - - /** - * The feature id for the '<em><b>Unsettable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__UNSETTABLE = JavaRefPackage.JAVA_EVENT__UNSETTABLE; - - /** - * The feature id for the '<em><b>Derived</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__DERIVED = JavaRefPackage.JAVA_EVENT__DERIVED; - - /** - * The feature id for the '<em><b>EContaining Class</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT__ECONTAINING_CLASS = JavaRefPackage.JAVA_EVENT__ECONTAINING_CLASS; - - /** - * The number of structural features of the the '<em>Bean Event</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int BEAN_EVENT_FEATURE_COUNT = JavaRefPackage.JAVA_EVENT_FEATURE_COUNT + 0; - - - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.impl.FeatureAttributeMapEntryImpl <em>Feature Attribute Map Entry</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.impl.FeatureAttributeMapEntryImpl - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getFeatureAttributeMapEntry() - * @generated - */ - int FEATURE_ATTRIBUTE_MAP_ENTRY = 9; - - /** - * The feature id for the '<em><b>Key</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_ATTRIBUTE_MAP_ENTRY__KEY = 0; - - /** - * The feature id for the '<em><b>Value</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_ATTRIBUTE_MAP_ENTRY__VALUE = 1; - - /** - * The number of structural features of the the '<em>Feature Attribute Map Entry</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int FEATURE_ATTRIBUTE_MAP_ENTRY_FEATURE_COUNT = 2; - - - /** - * The meta object id for the '{@link org.eclipse.jem.internal.beaninfo.ImplicitItem <em>Implicit Item</em>}' enum. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jem.internal.beaninfo.ImplicitItem - * @see org.eclipse.jem.internal.beaninfo.impl.BeaninfoPackageImpl#getImplicitItem() - * @generated - */ - int IMPLICIT_ITEM = 10; - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator <em>Feature Decorator</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Feature Decorator</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator - * @generated - */ - EClass getFeatureDecorator(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getDisplayName <em>Display Name</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Display Name</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#getDisplayName() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_DisplayName(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getShortDescription <em>Short Description</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Short Description</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#getShortDescription() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_ShortDescription(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getCategory <em>Category</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Category</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#getCategory() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_Category(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isExpert <em>Expert</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Expert</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#isExpert() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_Expert(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isHidden <em>Hidden</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Hidden</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#isHidden() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_Hidden(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isPreferred <em>Preferred</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Preferred</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#isPreferred() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_Preferred(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isMergeIntrospection <em>Merge Introspection</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Merge Introspection</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#isMergeIntrospection() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_MergeIntrospection(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isAttributesExplicitEmpty <em>Attributes Explicit Empty</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Attributes Explicit Empty</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#isAttributesExplicitEmpty() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_AttributesExplicitEmpty(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitlySetBits <em>Implicitly Set Bits</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Implicitly Set Bits</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitlySetBits() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_ImplicitlySetBits(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitDecoratorFlag <em>Implicit Decorator Flag</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Implicit Decorator Flag</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitDecoratorFlag() - * @see #getFeatureDecorator() - * @generated - */ - EAttribute getFeatureDecorator_ImplicitDecoratorFlag(); - - /** - * Returns the meta object for the map '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getAttributes <em>Attributes</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the map '<em>Attributes</em>'. - * @see org.eclipse.jem.internal.beaninfo.FeatureDecorator#getAttributes() - * @see #getFeatureDecorator() - * @generated - */ - EReference getFeatureDecorator_Attributes(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator <em>Event Set Decorator</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Event Set Decorator</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator - * @generated - */ - EClass getEventSetDecorator(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isInDefaultEventSet <em>In Default Event Set</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>In Default Event Set</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#isInDefaultEventSet() - * @see #getEventSetDecorator() - * @generated - */ - EAttribute getEventSetDecorator_InDefaultEventSet(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isUnicast <em>Unicast</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Unicast</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#isUnicast() - * @see #getEventSetDecorator() - * @generated - */ - EAttribute getEventSetDecorator_Unicast(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isListenerMethodsExplicitEmpty <em>Listener Methods Explicit Empty</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Listener Methods Explicit Empty</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#isListenerMethodsExplicitEmpty() - * @see #getEventSetDecorator() - * @generated - */ - EAttribute getEventSetDecorator_ListenerMethodsExplicitEmpty(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getAddListenerMethod <em>Add Listener Method</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Add Listener Method</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#getAddListenerMethod() - * @see #getEventSetDecorator() - * @generated - */ - EReference getEventSetDecorator_AddListenerMethod(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getListenerMethods <em>Listener Methods</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Listener Methods</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#getListenerMethods() - * @see #getEventSetDecorator() - * @generated - */ - EReference getEventSetDecorator_ListenerMethods(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getListenerType <em>Listener Type</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Listener Type</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#getListenerType() - * @see #getEventSetDecorator() - * @generated - */ - EReference getEventSetDecorator_ListenerType(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getRemoveListenerMethod <em>Remove Listener Method</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Remove Listener Method</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#getRemoveListenerMethod() - * @see #getEventSetDecorator() - * @generated - */ - EReference getEventSetDecorator_RemoveListenerMethod(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getEventAdapterClass <em>Event Adapter Class</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Event Adapter Class</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#getEventAdapterClass() - * @see #getEventSetDecorator() - * @generated - */ - EReference getEventSetDecorator_EventAdapterClass(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getSerListMthd <em>Ser List Mthd</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Ser List Mthd</em>'. - * @see org.eclipse.jem.internal.beaninfo.EventSetDecorator#getSerListMthd() - * @see #getEventSetDecorator() - * @generated - */ - EReference getEventSetDecorator_SerListMthd(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.MethodProxy <em>Method Proxy</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Method Proxy</em>'. - * @see org.eclipse.jem.internal.beaninfo.MethodProxy - * @generated - */ - EClass getMethodProxy(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.MethodProxy#getMethod <em>Method</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Method</em>'. - * @see org.eclipse.jem.internal.beaninfo.MethodProxy#getMethod() - * @see #getMethodProxy() - * @generated - */ - EReference getMethodProxy_Method(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator <em>Property Decorator</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Property Decorator</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator - * @generated - */ - EClass getPropertyDecorator(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isBound <em>Bound</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Bound</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#isBound() - * @see #getPropertyDecorator() - * @generated - */ - EAttribute getPropertyDecorator_Bound(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isConstrained <em>Constrained</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Constrained</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#isConstrained() - * @see #getPropertyDecorator() - * @generated - */ - EAttribute getPropertyDecorator_Constrained(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isDesignTime <em>Design Time</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Design Time</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#isDesignTime() - * @see #getPropertyDecorator() - * @generated - */ - EAttribute getPropertyDecorator_DesignTime(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isAlwaysIncompatible <em>Always Incompatible</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Always Incompatible</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#isAlwaysIncompatible() - * @see #getPropertyDecorator() - * @generated - */ - EAttribute getPropertyDecorator_AlwaysIncompatible(); - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getFilterFlags <em>Filter Flags</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute list '<em>Filter Flags</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#getFilterFlags() - * @see #getPropertyDecorator() - * @generated - */ - EAttribute getPropertyDecorator_FilterFlags(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isFieldReadOnly <em>Field Read Only</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Field Read Only</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#isFieldReadOnly() - * @see #getPropertyDecorator() - * @generated - */ - EAttribute getPropertyDecorator_FieldReadOnly(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getPropertyEditorClass <em>Property Editor Class</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Property Editor Class</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#getPropertyEditorClass() - * @see #getPropertyDecorator() - * @generated - */ - EReference getPropertyDecorator_PropertyEditorClass(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getReadMethod <em>Read Method</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Read Method</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#getReadMethod() - * @see #getPropertyDecorator() - * @generated - */ - EReference getPropertyDecorator_ReadMethod(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getWriteMethod <em>Write Method</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Write Method</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#getWriteMethod() - * @see #getPropertyDecorator() - * @generated - */ - EReference getPropertyDecorator_WriteMethod(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getField <em>Field</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Field</em>'. - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#getField() - * @see #getPropertyDecorator() - * @generated - */ - EReference getPropertyDecorator_Field(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator <em>Indexed Property Decorator</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Indexed Property Decorator</em>'. - * @see org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator - * @generated - */ - EClass getIndexedPropertyDecorator(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedReadMethod <em>Indexed Read Method</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Indexed Read Method</em>'. - * @see org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedReadMethod() - * @see #getIndexedPropertyDecorator() - * @generated - */ - EReference getIndexedPropertyDecorator_IndexedReadMethod(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedWriteMethod <em>Indexed Write Method</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Indexed Write Method</em>'. - * @see org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedWriteMethod() - * @see #getIndexedPropertyDecorator() - * @generated - */ - EReference getIndexedPropertyDecorator_IndexedWriteMethod(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator <em>Bean Decorator</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Bean Decorator</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator - * @generated - */ - EClass getBeanDecorator(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperProperties <em>Merge Super Properties</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Merge Super Properties</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperProperties() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_MergeSuperProperties(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperMethods <em>Merge Super Methods</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Merge Super Methods</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperMethods() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_MergeSuperMethods(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperEvents <em>Merge Super Events</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Merge Super Events</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#isMergeSuperEvents() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_MergeSuperEvents(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectProperties <em>Introspect Properties</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Introspect Properties</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectProperties() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_IntrospectProperties(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectMethods <em>Introspect Methods</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Introspect Methods</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectMethods() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_IntrospectMethods(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectEvents <em>Introspect Events</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Introspect Events</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#isIntrospectEvents() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_IntrospectEvents(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getCustomizerClass <em>Customizer Class</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Customizer Class</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#getCustomizerClass() - * @see #getBeanDecorator() - * @generated - */ - EReference getBeanDecorator_CustomizerClass(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.MethodDecorator <em>Method Decorator</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Method Decorator</em>'. - * @see org.eclipse.jem.internal.beaninfo.MethodDecorator - * @generated - */ - EClass getMethodDecorator(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.MethodDecorator#isParmsExplicitEmpty <em>Parms Explicit Empty</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Parms Explicit Empty</em>'. - * @see org.eclipse.jem.internal.beaninfo.MethodDecorator#isParmsExplicitEmpty() - * @see #getMethodDecorator() - * @generated - */ - EAttribute getMethodDecorator_ParmsExplicitEmpty(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jem.internal.beaninfo.MethodDecorator#getParameterDescriptors <em>Parameter Descriptors</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Parameter Descriptors</em>'. - * @see org.eclipse.jem.internal.beaninfo.MethodDecorator#getParameterDescriptors() - * @see #getMethodDecorator() - * @generated - */ - EReference getMethodDecorator_ParameterDescriptors(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.jem.internal.beaninfo.MethodDecorator#getSerParmDesc <em>Ser Parm Desc</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Ser Parm Desc</em>'. - * @see org.eclipse.jem.internal.beaninfo.MethodDecorator#getSerParmDesc() - * @see #getMethodDecorator() - * @generated - */ - EReference getMethodDecorator_SerParmDesc(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.ParameterDecorator <em>Parameter Decorator</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Parameter Decorator</em>'. - * @see org.eclipse.jem.internal.beaninfo.ParameterDecorator - * @generated - */ - EClass getParameterDecorator(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.ParameterDecorator#getName <em>Name</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Name</em>'. - * @see org.eclipse.jem.internal.beaninfo.ParameterDecorator#getName() - * @see #getParameterDecorator() - * @generated - */ - EAttribute getParameterDecorator_Name(); - - /** - * Returns the meta object for data type '{@link org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue <em>Feature Attribute Value</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for data type '<em>Feature Attribute Value</em>'. - * @see org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue - * @model instanceClass="org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue" - * @generated - */ - EDataType getFeatureAttributeValue(); - - /** - * Returns the factory that creates the instances of the model. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the factory that creates the instances of the model. - * @generated - */ - BeaninfoFactory getBeaninfoFactory(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#isDoBeaninfo <em>Do Beaninfo</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Do Beaninfo</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#isDoBeaninfo() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_DoBeaninfo(); - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedPropertyNames <em>Not Inherited Property Names</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute list '<em>Not Inherited Property Names</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedPropertyNames() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_NotInheritedPropertyNames(); - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedMethodNames <em>Not Inherited Method Names</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute list '<em>Not Inherited Method Names</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedMethodNames() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_NotInheritedMethodNames(); - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedEventNames <em>Not Inherited Event Names</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute list '<em>Not Inherited Event Names</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanDecorator#getNotInheritedEventNames() - * @see #getBeanDecorator() - * @generated - */ - EAttribute getBeanDecorator_NotInheritedEventNames(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jem.internal.beaninfo.ParameterDecorator#getParameter <em>Parameter</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Parameter</em>'. - * @see org.eclipse.jem.internal.beaninfo.ParameterDecorator#getParameter() - * @see #getParameterDecorator() - * @generated - */ - EReference getParameterDecorator_Parameter(); - - /** - * Returns the meta object for class '{@link org.eclipse.jem.internal.beaninfo.BeanEvent <em>Bean Event</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Bean Event</em>'. - * @see org.eclipse.jem.internal.beaninfo.BeanEvent - * @generated - */ - EClass getBeanEvent(); - - /** - * Returns the meta object for class '{@link java.util.Map.Entry <em>Feature Attribute Map Entry</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Feature Attribute Map Entry</em>'. - * @see java.util.Map.Entry - * @model keyType="java.lang.String" - * valueType="org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue" valueDataType="org.eclipse.jem.internal.beaninfo.FeatureAttributeValue" - * @generated - */ - EClass getFeatureAttributeMapEntry(); - - /** - * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Key</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Key</em>'. - * @see java.util.Map.Entry - * @see #getFeatureAttributeMapEntry() - * @generated - */ - EAttribute getFeatureAttributeMapEntry_Key(); - - /** - * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Value</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Value</em>'. - * @see java.util.Map.Entry - * @see #getFeatureAttributeMapEntry() - * @generated - */ - EAttribute getFeatureAttributeMapEntry_Value(); - - /** - * Returns the meta object for enum '{@link org.eclipse.jem.internal.beaninfo.ImplicitItem <em>Implicit Item</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for enum '<em>Implicit Item</em>'. - * @see org.eclipse.jem.internal.beaninfo.ImplicitItem - * @generated - */ - EEnum getImplicitItem(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/EventSetDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/EventSetDecorator.java deleted file mode 100644 index 817bf4762..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/EventSetDecorator.java +++ /dev/null @@ -1,326 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: EventSetDecorator.java,v $ - * $Revision: 1.8 $ $Date: 2005/10/06 15:18:38 $ - */ - - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.Method; -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Event Set Decorator</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * Equivalent to EventSetDecorator in java. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isInDefaultEventSet <em>In Default Event Set</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isUnicast <em>Unicast</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isListenerMethodsExplicitEmpty <em>Listener Methods Explicit Empty</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getAddListenerMethod <em>Add Listener Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getListenerMethods <em>Listener Methods</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getListenerType <em>Listener Type</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getRemoveListenerMethod <em>Remove Listener Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getEventAdapterClass <em>Event Adapter Class</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getSerListMthd <em>Ser List Mthd</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator() - * @model - * @generated - */ - - -public interface EventSetDecorator extends FeatureDecorator{ - - /** - * Returns the value of the '<em><b>In Default Event Set</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>In Default Event Set</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>In Default Event Set</em>' attribute. - * @see #isSetInDefaultEventSet() - * @see #unsetInDefaultEventSet() - * @see #setInDefaultEventSet(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_InDefaultEventSet() - * @model unsettable="true" - * @generated - */ - boolean isInDefaultEventSet(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isInDefaultEventSet <em>In Default Event Set</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>In Default Event Set</em>' attribute. - * @see #isSetInDefaultEventSet() - * @see #unsetInDefaultEventSet() - * @see #isInDefaultEventSet() - * @generated - */ - void setInDefaultEventSet(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isInDefaultEventSet <em>In Default Event Set</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetInDefaultEventSet() - * @see #isInDefaultEventSet() - * @see #setInDefaultEventSet(boolean) - * @generated - */ - void unsetInDefaultEventSet(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isInDefaultEventSet <em>In Default Event Set</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>In Default Event Set</em>' attribute is set. - * @see #unsetInDefaultEventSet() - * @see #isInDefaultEventSet() - * @see #setInDefaultEventSet(boolean) - * @generated - */ - boolean isSetInDefaultEventSet(); - - /** - * Returns the value of the '<em><b>Unicast</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Unicast</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Unicast</em>' attribute. - * @see #isSetUnicast() - * @see #unsetUnicast() - * @see #setUnicast(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_Unicast() - * @model unsettable="true" - * @generated - */ - boolean isUnicast(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isUnicast <em>Unicast</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Unicast</em>' attribute. - * @see #isSetUnicast() - * @see #unsetUnicast() - * @see #isUnicast() - * @generated - */ - void setUnicast(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isUnicast <em>Unicast</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetUnicast() - * @see #isUnicast() - * @see #setUnicast(boolean) - * @generated - */ - void unsetUnicast(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isUnicast <em>Unicast</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Unicast</em>' attribute is set. - * @see #unsetUnicast() - * @see #isUnicast() - * @see #setUnicast(boolean) - * @generated - */ - boolean isSetUnicast(); - - /** - * Returns the value of the '<em><b>Listener Methods Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Set true if the listenerMethods feature is explicitly set as empty and is not to have listener methods merged in from BeanInfo or reflection. - * <!-- end-model-doc --> - * @return the value of the '<em>Listener Methods Explicit Empty</em>' attribute. - * @see #setListenerMethodsExplicitEmpty(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_ListenerMethodsExplicitEmpty() - * @model - * @generated - */ - boolean isListenerMethodsExplicitEmpty(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#isListenerMethodsExplicitEmpty <em>Listener Methods Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Listener Methods Explicit Empty</em>' attribute. - * @see #isListenerMethodsExplicitEmpty() - * @generated - */ - void setListenerMethodsExplicitEmpty(boolean value); - - /** - * Returns the value of the '<em><b>Add Listener Method</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Add Listener Method</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Add Listener Method</em>' reference. - * @see #setAddListenerMethod(Method) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_AddListenerMethod() - * @model required="true" - * @generated - */ - Method getAddListenerMethod(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getAddListenerMethod <em>Add Listener Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Add Listener Method</em>' reference. - * @see #getAddListenerMethod() - * @generated - */ - void setAddListenerMethod(Method value); - - /** - * Returns the value of the '<em><b>Listener Methods</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jem.internal.beaninfo.MethodProxy}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Listener Methods</em>' containment reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * listener methods. If it is desired that the list be explicitly empty and not have BeanInfo set it, then set listenerMethodsExplicitEmpty to true. - * <p> - * ListenerMethods will be decorated with MethodDecorators. - * <p> - * Note: This is a derived setting, which means it will not notify out changes to it. To here changes to it, listen on "serListMthd" notifications instead. - * <!-- end-model-doc --> - * @return the value of the '<em>Listener Methods</em>' reference list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_ListenerMethods() - * @model type="org.eclipse.jem.internal.beaninfo.MethodProxy" required="true" transient="true" volatile="true" derived="true" - * @generated - */ - EList getListenerMethods(); - - /** - * Returns the value of the '<em><b>Listener Type</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Listener Type</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Listener Type</em>' reference. - * @see #setListenerType(JavaClass) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_ListenerType() - * @model required="true" - * @generated - */ - JavaClass getListenerType(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getListenerType <em>Listener Type</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Listener Type</em>' reference. - * @see #getListenerType() - * @generated - */ - void setListenerType(JavaClass value); - - /** - * Returns the value of the '<em><b>Remove Listener Method</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Remove Listener Method</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Remove Listener Method</em>' reference. - * @see #setRemoveListenerMethod(Method) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_RemoveListenerMethod() - * @model required="true" - * @generated - */ - Method getRemoveListenerMethod(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getRemoveListenerMethod <em>Remove Listener Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Remove Listener Method</em>' reference. - * @see #getRemoveListenerMethod() - * @generated - */ - void setRemoveListenerMethod(Method value); - - /** - * Returns the value of the '<em><b>Event Adapter Class</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * For some listener interfaces an adapter class is provided that implements default no-op methods, e.g. java.awt.event.FocusEvent which has java.awt.event.FocusAdapter. The Adapter class is provided in a key/value pair on the java.beans.EventSetDescriptor with a key defined in a static final constants EVENTADAPTERCLASS = "eventAdapterClass". - * <!-- end-model-doc --> - * @return the value of the '<em>Event Adapter Class</em>' reference. - * @see #setEventAdapterClass(JavaClass) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_EventAdapterClass() - * @model - * @generated - */ - JavaClass getEventAdapterClass(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.EventSetDecorator#getEventAdapterClass <em>Event Adapter Class</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Event Adapter Class</em>' reference. - * @see #getEventAdapterClass() - * @generated - */ - void setEventAdapterClass(JavaClass value); - - /** - * Returns the value of the '<em><b>Ser List Mthd</b></em>' containment reference list. - * The list contents are of type {@link org.eclipse.jem.internal.beaninfo.MethodProxy}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This is a private feature. It is used internally only. - * <!-- end-model-doc --> - * @return the value of the '<em>Ser List Mthd</em>' containment reference list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getEventSetDecorator_SerListMthd() - * @model type="org.eclipse.jem.internal.beaninfo.MethodProxy" containment="true" required="true" - * @generated - */ - EList getSerListMthd(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/FeatureDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/FeatureDecorator.java deleted file mode 100644 index 9422ab0d4..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/FeatureDecorator.java +++ /dev/null @@ -1,491 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: FeatureDecorator.java,v $ - * $Revision: 1.9 $ $Date: 2005/09/15 20:09:51 $ - */ - - -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.ecore.EAnnotation; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Feature Decorator</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * Equivalent to FeatureDescriptor in java. - * <p> - * Note: If any attribute is explicitly set then the BeanInfo/Reflection will not be merged into the decorator. This provides a way of overriding the BeanInfos. Also for any many-valued attribute, if it is desired to have it explicitly empty and not have BeanInfo fill it in, there will be another attribute named of the form "attibutueExplicitEmpty" If this is true then the BeanInfo will not merge in and will leave it empty. - * <p> - * These comments about merging apply to all subclasses of this decorator too. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getDisplayName <em>Display Name</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getShortDescription <em>Short Description</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getCategory <em>Category</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isExpert <em>Expert</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isHidden <em>Hidden</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isPreferred <em>Preferred</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isMergeIntrospection <em>Merge Introspection</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isAttributesExplicitEmpty <em>Attributes Explicit Empty</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitlySetBits <em>Implicitly Set Bits</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitDecoratorFlag <em>Implicit Decorator Flag</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getAttributes <em>Attributes</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator() - * @model - * @generated - */ - - -public interface FeatureDecorator extends EAnnotation{ - - /** - * Returns the value of the '<em><b>Display Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Display Name</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Display Name</em>' attribute. - * @see #isSetDisplayName() - * @see #unsetDisplayName() - * @see #setDisplayName(String) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_DisplayName() - * @model unsettable="true" - * @generated - */ - String getDisplayName(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getDisplayName <em>Display Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Display Name</em>' attribute. - * @see #isSetDisplayName() - * @see #unsetDisplayName() - * @see #getDisplayName() - * @generated - */ - void setDisplayName(String value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getDisplayName <em>Display Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetDisplayName() - * @see #getDisplayName() - * @see #setDisplayName(String) - * @generated - */ - void unsetDisplayName(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getDisplayName <em>Display Name</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Display Name</em>' attribute is set. - * @see #unsetDisplayName() - * @see #getDisplayName() - * @see #setDisplayName(String) - * @generated - */ - boolean isSetDisplayName(); - - /** - * Returns the value of the '<em><b>Short Description</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Short Description</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Short Description</em>' attribute. - * @see #isSetShortDescription() - * @see #unsetShortDescription() - * @see #setShortDescription(String) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_ShortDescription() - * @model unsettable="true" - * @generated - */ - String getShortDescription(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getShortDescription <em>Short Description</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Short Description</em>' attribute. - * @see #isSetShortDescription() - * @see #unsetShortDescription() - * @see #getShortDescription() - * @generated - */ - void setShortDescription(String value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getShortDescription <em>Short Description</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetShortDescription() - * @see #getShortDescription() - * @see #setShortDescription(String) - * @generated - */ - void unsetShortDescription(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getShortDescription <em>Short Description</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Short Description</em>' attribute is set. - * @see #unsetShortDescription() - * @see #getShortDescription() - * @see #setShortDescription(String) - * @generated - */ - boolean isSetShortDescription(); - - /** - * Returns the value of the '<em><b>Category</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Category</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Category</em>' attribute. - * @see #setCategory(String) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_Category() - * @model - * @generated - */ - String getCategory(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getCategory <em>Category</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Category</em>' attribute. - * @see #getCategory() - * @generated - */ - void setCategory(String value); - - /** - * Returns the value of the '<em><b>Expert</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Expert</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Expert</em>' attribute. - * @see #isSetExpert() - * @see #unsetExpert() - * @see #setExpert(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_Expert() - * @model unsettable="true" - * @generated - */ - boolean isExpert(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isExpert <em>Expert</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Expert</em>' attribute. - * @see #isSetExpert() - * @see #unsetExpert() - * @see #isExpert() - * @generated - */ - void setExpert(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isExpert <em>Expert</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetExpert() - * @see #isExpert() - * @see #setExpert(boolean) - * @generated - */ - void unsetExpert(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isExpert <em>Expert</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Expert</em>' attribute is set. - * @see #unsetExpert() - * @see #isExpert() - * @see #setExpert(boolean) - * @generated - */ - boolean isSetExpert(); - - /** - * Returns the value of the '<em><b>Hidden</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Hidden</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Hidden</em>' attribute. - * @see #isSetHidden() - * @see #unsetHidden() - * @see #setHidden(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_Hidden() - * @model unsettable="true" - * @generated - */ - boolean isHidden(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isHidden <em>Hidden</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Hidden</em>' attribute. - * @see #isSetHidden() - * @see #unsetHidden() - * @see #isHidden() - * @generated - */ - void setHidden(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isHidden <em>Hidden</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetHidden() - * @see #isHidden() - * @see #setHidden(boolean) - * @generated - */ - void unsetHidden(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isHidden <em>Hidden</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Hidden</em>' attribute is set. - * @see #unsetHidden() - * @see #isHidden() - * @see #setHidden(boolean) - * @generated - */ - boolean isSetHidden(); - - /** - * Returns the value of the '<em><b>Preferred</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Preferred</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Preferred</em>' attribute. - * @see #isSetPreferred() - * @see #unsetPreferred() - * @see #setPreferred(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_Preferred() - * @model unsettable="true" - * @generated - */ - boolean isPreferred(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isPreferred <em>Preferred</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Preferred</em>' attribute. - * @see #isSetPreferred() - * @see #unsetPreferred() - * @see #isPreferred() - * @generated - */ - void setPreferred(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isPreferred <em>Preferred</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetPreferred() - * @see #isPreferred() - * @see #setPreferred(boolean) - * @generated - */ - void unsetPreferred(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isPreferred <em>Preferred</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Preferred</em>' attribute is set. - * @see #unsetPreferred() - * @see #isPreferred() - * @see #setPreferred(boolean) - * @generated - */ - boolean isSetPreferred(); - - /** - * Returns the value of the '<em><b>Merge Introspection</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Merge Introspection</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Should the introspection results be merged into this decorator. If this is set to false, then the introspection results are ignored for this particular decorator. This is an internal feature simply to allow desired override capabilities. Customers would use it to prevent ANY introspection/reflection from occurring. - * <!-- end-model-doc --> - * @return the value of the '<em>Merge Introspection</em>' attribute. - * @see #setMergeIntrospection(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_MergeIntrospection() - * @model default="true" - * @generated - */ - boolean isMergeIntrospection(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isMergeIntrospection <em>Merge Introspection</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Merge Introspection</em>' attribute. - * @see #isMergeIntrospection() - * @generated - */ - void setMergeIntrospection(boolean value); - - /** - * Returns the value of the '<em><b>Attributes Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * The attributes are explicitly set as empty and not retrieved from the beaninfo/reflection. Customers should set this if they want the list of attributes to be empty and not merged with the BeanInfo results. - * <!-- end-model-doc --> - * @return the value of the '<em>Attributes Explicit Empty</em>' attribute. - * @see #setAttributesExplicitEmpty(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_AttributesExplicitEmpty() - * @model - * @generated - */ - boolean isAttributesExplicitEmpty(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#isAttributesExplicitEmpty <em>Attributes Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Attributes Explicit Empty</em>' attribute. - * @see #isAttributesExplicitEmpty() - * @generated - */ - void setAttributesExplicitEmpty(boolean value); - - /** - * Returns the value of the '<em><b>Implicitly Set Bits</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * A bitflag for which attributes have been set by BeanInfo/Reflection. - * <p> - * This is an internal attribute that is used by the BeanInfo maintanance. It is not meant to be used by customers. - * <!-- end-model-doc --> - * @return the value of the '<em>Implicitly Set Bits</em>' attribute. - * @see #setImplicitlySetBits(long) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_ImplicitlySetBits() - * @model - * @generated - */ - long getImplicitlySetBits(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitlySetBits <em>Implicitly Set Bits</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Implicitly Set Bits</em>' attribute. - * @see #getImplicitlySetBits() - * @generated - */ - void setImplicitlySetBits(long value); - - /** - * Returns the value of the '<em><b>Implicit Decorator Flag</b></em>' attribute. - * The literals are from the enumeration {@link org.eclipse.jem.internal.beaninfo.ImplicitItem}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Is this decorator/feature implicit. This means created by Introspection/Reflection and not by customer. - * <p> - * This is an internal attribute that is used by the BeanInfo maintanance. It is not meant to be used by customers. - * <!-- end-model-doc --> - * @return the value of the '<em>Implicit Decorator Flag</em>' attribute. - * @see org.eclipse.jem.internal.beaninfo.ImplicitItem - * @see #setImplicitDecoratorFlag(ImplicitItem) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_ImplicitDecoratorFlag() - * @model - * @generated - */ - ImplicitItem getImplicitDecoratorFlag(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.FeatureDecorator#getImplicitDecoratorFlag <em>Implicit Decorator Flag</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Implicit Decorator Flag</em>' attribute. - * @see org.eclipse.jem.internal.beaninfo.ImplicitItem - * @see #getImplicitDecoratorFlag() - * @generated - */ - void setImplicitDecoratorFlag(ImplicitItem value); - - /** - * Returns the value of the '<em><b>Attributes</b></em>' map. - * The key is of type {@link java.lang.String}, - * and the value is of type {@link org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue}, - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Attributes</em>' containment reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Feature attributes. Key/value pairs. If it is desired that the feature attributes is explicitly empty and not have BeanInfo/reflection set it, set attributesExplicitEmpty to true. - * <!-- end-model-doc --> - * @return the value of the '<em>Attributes</em>' map. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getFeatureDecorator_Attributes() - * @model mapType="org.eclipse.jem.internal.beaninfo.FeatureAttributeMapEntry" keyType="java.lang.String" valueType="org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue" - * @generated - */ - EMap getAttributes(); - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @model kind="operation" - * @generated - */ - String getName(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/ImplicitItem.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/ImplicitItem.java deleted file mode 100644 index c5e5b4bdb..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/ImplicitItem.java +++ /dev/null @@ -1,168 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> - * A representation of the literals of the enumeration '<em><b>Implicit Item</b></em>', - * and utility methods for working with them. - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This enum is an internal enum. It is used by BeanInfo for cache maintenance. - * <p> - * This enum is not meant to be used by clients. - * <!-- end-model-doc --> - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getImplicitItem() - * @model - * @generated - */ -public final class ImplicitItem extends AbstractEnumerator { - /** - * The '<em><b>NOT IMPLICIT</b></em>' literal value. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Means this decorator is not implicit. That is it was created by customer. - * <!-- end-model-doc --> - * @see #NOT_IMPLICIT_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NOT_IMPLICIT = 0; - - /** - * The '<em><b>IMPLICIT DECORATOR</b></em>' literal value. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This means that the decorator is implicit. That is it was not created by the customer. - * <!-- end-model-doc --> - * @see #IMPLICIT_DECORATOR_LITERAL - * @model - * @generated - * @ordered - */ - public static final int IMPLICIT_DECORATOR = 1; - - /** - * The '<em><b>IMPLICIT DECORATOR AND FEATURE</b></em>' literal value. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This means the decorator and the feature where implicit. That is they were not created by the customer. - * <!-- end-model-doc --> - * @see #IMPLICIT_DECORATOR_AND_FEATURE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int IMPLICIT_DECORATOR_AND_FEATURE = 2; - - /** - * The '<em><b>NOT IMPLICIT</b></em>' literal object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #NOT_IMPLICIT - * @generated - * @ordered - */ - public static final ImplicitItem NOT_IMPLICIT_LITERAL = new ImplicitItem(NOT_IMPLICIT, "NOT_IMPLICIT"); - - /** - * The '<em><b>IMPLICIT DECORATOR</b></em>' literal object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #IMPLICIT_DECORATOR - * @generated - * @ordered - */ - public static final ImplicitItem IMPLICIT_DECORATOR_LITERAL = new ImplicitItem(IMPLICIT_DECORATOR, "IMPLICIT_DECORATOR"); - - /** - * The '<em><b>IMPLICIT DECORATOR AND FEATURE</b></em>' literal object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #IMPLICIT_DECORATOR_AND_FEATURE - * @generated - * @ordered - */ - public static final ImplicitItem IMPLICIT_DECORATOR_AND_FEATURE_LITERAL = new ImplicitItem(IMPLICIT_DECORATOR_AND_FEATURE, "IMPLICIT_DECORATOR_AND_FEATURE"); - - /** - * An array of all the '<em><b>Implicit Item</b></em>' enumerators. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private static final ImplicitItem[] VALUES_ARRAY = - new ImplicitItem[] { - NOT_IMPLICIT_LITERAL, - IMPLICIT_DECORATOR_LITERAL, - IMPLICIT_DECORATOR_AND_FEATURE_LITERAL, - }; - - /** - * A public read-only list of all the '<em><b>Implicit Item</b></em>' enumerators. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>Implicit Item</b></em>' literal with the specified name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static ImplicitItem get(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - ImplicitItem result = VALUES_ARRAY[i]; - if (result.toString().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>Implicit Item</b></em>' literal with the specified value. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static ImplicitItem get(int value) { - switch (value) { - case NOT_IMPLICIT: return NOT_IMPLICIT_LITERAL; - case IMPLICIT_DECORATOR: return IMPLICIT_DECORATOR_LITERAL; - case IMPLICIT_DECORATOR_AND_FEATURE: return IMPLICIT_DECORATOR_AND_FEATURE_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private ImplicitItem(int value, String name) { - super(value, name); - } - -} //ImplicitItem diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/IndexedPropertyDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/IndexedPropertyDecorator.java deleted file mode 100644 index 2ea23b7cc..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/IndexedPropertyDecorator.java +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: IndexedPropertyDecorator.java,v $ - * $Revision: 1.7 $ $Date: 2005/08/24 20:31:28 $ - */ - - -import org.eclipse.jem.java.Method; -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Indexed Property Decorator</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * Equivalent to IndexedPropertyDecorator - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedReadMethod <em>Indexed Read Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedWriteMethod <em>Indexed Write Method</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getIndexedPropertyDecorator() - * @model - * @generated - */ - - -public interface IndexedPropertyDecorator extends PropertyDecorator{ - /** - * Returns the value of the '<em><b>Indexed Read Method</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Indexed Read Method</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Indexed Read Method</em>' reference. - * @see #isSetIndexedReadMethod() - * @see #unsetIndexedReadMethod() - * @see #setIndexedReadMethod(Method) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getIndexedPropertyDecorator_IndexedReadMethod() - * @model unsettable="true" - * @generated - */ - Method getIndexedReadMethod(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedReadMethod <em>Indexed Read Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Indexed Read Method</em>' reference. - * @see #isSetIndexedReadMethod() - * @see #unsetIndexedReadMethod() - * @see #getIndexedReadMethod() - * @generated - */ - void setIndexedReadMethod(Method value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedReadMethod <em>Indexed Read Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetIndexedReadMethod() - * @see #getIndexedReadMethod() - * @see #setIndexedReadMethod(Method) - * @generated - */ - void unsetIndexedReadMethod(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedReadMethod <em>Indexed Read Method</em>}' reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Indexed Read Method</em>' reference is set. - * @see #unsetIndexedReadMethod() - * @see #getIndexedReadMethod() - * @see #setIndexedReadMethod(Method) - * @generated - */ - boolean isSetIndexedReadMethod(); - - /** - * Returns the value of the '<em><b>Indexed Write Method</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Indexed Write Method</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Indexed Write Method</em>' reference. - * @see #isSetIndexedWriteMethod() - * @see #unsetIndexedWriteMethod() - * @see #setIndexedWriteMethod(Method) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getIndexedPropertyDecorator_IndexedWriteMethod() - * @model unsettable="true" - * @generated - */ - Method getIndexedWriteMethod(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedWriteMethod <em>Indexed Write Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Indexed Write Method</em>' reference. - * @see #isSetIndexedWriteMethod() - * @see #unsetIndexedWriteMethod() - * @see #getIndexedWriteMethod() - * @generated - */ - void setIndexedWriteMethod(Method value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedWriteMethod <em>Indexed Write Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetIndexedWriteMethod() - * @see #getIndexedWriteMethod() - * @see #setIndexedWriteMethod(Method) - * @generated - */ - void unsetIndexedWriteMethod(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator#getIndexedWriteMethod <em>Indexed Write Method</em>}' reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Indexed Write Method</em>' reference is set. - * @see #unsetIndexedWriteMethod() - * @see #getIndexedWriteMethod() - * @see #setIndexedWriteMethod(Method) - * @generated - */ - boolean isSetIndexedWriteMethod(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/MethodDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/MethodDecorator.java deleted file mode 100644 index a8147e66b..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/MethodDecorator.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: MethodDecorator.java,v $ - * $Revision: 1.7 $ $Date: 2005/08/24 20:31:28 $ - */ - - -import org.eclipse.emf.common.util.EList; -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Method Decorator</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * Equivalent to MethodDecorator in java. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.MethodDecorator#isParmsExplicitEmpty <em>Parms Explicit Empty</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.MethodDecorator#getParameterDescriptors <em>Parameter Descriptors</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.MethodDecorator#getSerParmDesc <em>Ser Parm Desc</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getMethodDecorator() - * @model - * @generated - */ - - -public interface MethodDecorator extends FeatureDecorator{ - /** - * Returns the value of the '<em><b>Parms Explicit Empty</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Set true if the parms feature is explicitly set as empty and is not to have parameters merged in from BeanInfo or reflection. - * <!-- end-model-doc --> - * @return the value of the '<em>Parms Explicit Empty</em>' attribute. - * @see #setParmsExplicitEmpty(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getMethodDecorator_ParmsExplicitEmpty() - * @model - * @generated - */ - boolean isParmsExplicitEmpty(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.MethodDecorator#isParmsExplicitEmpty <em>Parms Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Parms Explicit Empty</em>' attribute. - * @see #isParmsExplicitEmpty() - * @generated - */ - void setParmsExplicitEmpty(boolean value); - - /** - * Returns the value of the '<em><b>Parameter Descriptors</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jem.internal.beaninfo.ParameterDecorator}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Parameter Descriptors</em>' containment reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This is the parameter descriptors list. - * <p> - * Note: This is a derived setting, which means it will not notify out changes to it. To here changes to it, listen on "serParmDesc" notifications instead. - * <!-- end-model-doc --> - * @return the value of the '<em>Parameter Descriptors</em>' reference list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getMethodDecorator_ParameterDescriptors() - * @model type="org.eclipse.jem.internal.beaninfo.ParameterDecorator" transient="true" volatile="true" derived="true" - * @generated - */ - EList getParameterDescriptors(); - - /** - * Returns the value of the '<em><b>Ser Parm Desc</b></em>' containment reference list. - * The list contents are of type {@link org.eclipse.jem.internal.beaninfo.ParameterDecorator}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Ser Parm Desc</em>' containment reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * This is a private feature. It is used internally only. - * <!-- end-model-doc --> - * @return the value of the '<em>Ser Parm Desc</em>' containment reference list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getMethodDecorator_SerParmDesc() - * @model type="org.eclipse.jem.internal.beaninfo.ParameterDecorator" containment="true" - * @generated - */ - EList getSerParmDesc(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/MethodProxy.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/MethodProxy.java deleted file mode 100644 index 8743a2a03..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/MethodProxy.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: MethodProxy.java,v $ - * $Revision: 1.7 $ $Date: 2005/08/24 20:31:28 $ - */ - - -import org.eclipse.emf.ecore.EOperation; - -import org.eclipse.jem.java.Method; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Method Proxy</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * This is just a wrapper of a java Method. It allows access to the method but doesn't duplicate the interface for it. - * <p> - * MethodProxies will be in the eBehaviors setting for any methods that are in the JavaClass methods setting so that they are not duplicated. - * <p> - * MethodProxies would also have MethodDecorators. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.MethodProxy#getMethod <em>Method</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getMethodProxy() - * @model - * @generated - */ - - -public interface MethodProxy extends EOperation{ - /** - * Returns the value of the '<em><b>Method</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Method</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Method</em>' reference. - * @see #setMethod(Method) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getMethodProxy_Method() - * @model required="true" - * @generated - */ - Method getMethod(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.MethodProxy#getMethod <em>Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Method</em>' reference. - * @see #getMethod() - * @generated - */ - void setMethod(Method value); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/ParameterDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/ParameterDecorator.java deleted file mode 100644 index fd0e8a5f7..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/ParameterDecorator.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: ParameterDecorator.java,v $ - * $Revision: 1.6 $ $Date: 2005/08/24 20:31:28 $ - */ - - -import org.eclipse.jem.java.JavaParameter; -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Parameter Decorator</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.ParameterDecorator#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.ParameterDecorator#getParameter <em>Parameter</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getParameterDecorator() - * @model - * @generated - */ - - -public interface ParameterDecorator extends FeatureDecorator{ - /** - * Returns the value of the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Name</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * The name is explicit here because unlike the other feature decorators, the name does not come from the object being decorated. - * <!-- end-model-doc --> - * @return the value of the '<em>Name</em>' attribute. - * @see #setName(String) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getParameterDecorator_Name() - * @model - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.ParameterDecorator#getName <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Name</em>' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the '<em><b>Parameter</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Parameter</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * The JavaParameter that this ParameterDecorator is decorating. Can't use eDecorates in this. - * <!-- end-model-doc --> - * @return the value of the '<em>Parameter</em>' reference. - * @see #setParameter(JavaParameter) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getParameterDecorator_Parameter() - * @model transient="true" - * @generated - */ - JavaParameter getParameter(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.ParameterDecorator#getParameter <em>Parameter</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Parameter</em>' reference. - * @see #getParameter() - * @generated - */ - void setParameter(JavaParameter value); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/PropertyDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/PropertyDecorator.java deleted file mode 100644 index c9fa8462b..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/PropertyDecorator.java +++ /dev/null @@ -1,513 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo; -/* - * $RCSfile: PropertyDecorator.java,v $ - * $Revision: 1.10 $ $Date: 2005/09/15 20:09:51 $ - */ - - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClassifier; - -import org.eclipse.jem.java.Field; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.Method; -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Property Decorator</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * Equivalent to PropertyDecorator in java. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isBound <em>Bound</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isConstrained <em>Constrained</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isDesignTime <em>Design Time</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isAlwaysIncompatible <em>Always Incompatible</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getFilterFlags <em>Filter Flags</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isFieldReadOnly <em>Field Read Only</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getPropertyEditorClass <em>Property Editor Class</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getReadMethod <em>Read Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getWriteMethod <em>Write Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getField <em>Field</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator() - * @model - * @generated - */ - - -public interface PropertyDecorator extends FeatureDecorator{ - /** - * Returns the value of the '<em><b>Bound</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Bound</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Bound</em>' attribute. - * @see #isSetBound() - * @see #unsetBound() - * @see #setBound(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_Bound() - * @model unsettable="true" - * @generated - */ - boolean isBound(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isBound <em>Bound</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Bound</em>' attribute. - * @see #isSetBound() - * @see #unsetBound() - * @see #isBound() - * @generated - */ - void setBound(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isBound <em>Bound</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetBound() - * @see #isBound() - * @see #setBound(boolean) - * @generated - */ - void unsetBound(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isBound <em>Bound</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Bound</em>' attribute is set. - * @see #unsetBound() - * @see #isBound() - * @see #setBound(boolean) - * @generated - */ - boolean isSetBound(); - - /** - * Returns the value of the '<em><b>Constrained</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Constrained</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Constrained</em>' attribute. - * @see #isSetConstrained() - * @see #unsetConstrained() - * @see #setConstrained(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_Constrained() - * @model unsettable="true" - * @generated - */ - boolean isConstrained(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isConstrained <em>Constrained</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Constrained</em>' attribute. - * @see #isSetConstrained() - * @see #unsetConstrained() - * @see #isConstrained() - * @generated - */ - void setConstrained(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isConstrained <em>Constrained</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetConstrained() - * @see #isConstrained() - * @see #setConstrained(boolean) - * @generated - */ - void unsetConstrained(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isConstrained <em>Constrained</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Constrained</em>' attribute is set. - * @see #unsetConstrained() - * @see #isConstrained() - * @see #setConstrained(boolean) - * @generated - */ - boolean isSetConstrained(); - - /** - * Returns the value of the '<em><b>Design Time</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Design Time</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * If not set, then normal default processing. - * - * If set true, then this property is a design time property. This means it will show up in the property sheet, but it won't be able to be connected to at runtime. It may not even be a true bean property but instead the builder will know how to handle it. - * - * If set false, then this property will not show up on the property sheet, but will be able to be connected to for runtime. - * <!-- end-model-doc --> - * @return the value of the '<em>Design Time</em>' attribute. - * @see #isSetDesignTime() - * @see #unsetDesignTime() - * @see #setDesignTime(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_DesignTime() - * @model unsettable="true" - * @generated - */ - boolean isDesignTime(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isDesignTime <em>Design Time</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Design Time</em>' attribute. - * @see #isSetDesignTime() - * @see #unsetDesignTime() - * @see #isDesignTime() - * @generated - */ - void setDesignTime(boolean value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isDesignTime <em>Design Time</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetDesignTime() - * @see #isDesignTime() - * @see #setDesignTime(boolean) - * @generated - */ - void unsetDesignTime(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isDesignTime <em>Design Time</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Design Time</em>' attribute is set. - * @see #unsetDesignTime() - * @see #isDesignTime() - * @see #setDesignTime(boolean) - * @generated - */ - boolean isSetDesignTime(); - - /** - * Returns the value of the '<em><b>Always Incompatible</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Always Incompatible</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * If set true, then when multiple objects are selected, this property is always incompatible with each other. So in this case the property will not show up on the property sheet if more than one object has been selected. - * <!-- end-model-doc --> - * @return the value of the '<em>Always Incompatible</em>' attribute. - * @see #setAlwaysIncompatible(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_AlwaysIncompatible() - * @model - * @generated - */ - boolean isAlwaysIncompatible(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isAlwaysIncompatible <em>Always Incompatible</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Always Incompatible</em>' attribute. - * @see #isAlwaysIncompatible() - * @generated - */ - void setAlwaysIncompatible(boolean value); - - /** - * Returns the value of the '<em><b>Filter Flags</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Filter Flags</em>' attribute list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Filter Flags</em>' attribute list. - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_FilterFlags() - * @model type="java.lang.String" - * @generated - */ - EList getFilterFlags(); - - /** - * Returns the value of the '<em><b>Field Read Only</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Is this field read-only (i.e. is a "final" field). This is only referenced if the field reference is set. - * <!-- end-model-doc --> - * @return the value of the '<em>Field Read Only</em>' attribute. - * @see #setFieldReadOnly(boolean) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_FieldReadOnly() - * @model - * @generated - */ - boolean isFieldReadOnly(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#isFieldReadOnly <em>Field Read Only</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Field Read Only</em>' attribute. - * @see #isFieldReadOnly() - * @generated - */ - void setFieldReadOnly(boolean value); - - /** - * Returns the value of the '<em><b>Property Editor Class</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Property Editor Class</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Property Editor Class</em>' reference. - * @see #setPropertyEditorClass(JavaClass) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_PropertyEditorClass() - * @model - * @generated - */ - JavaClass getPropertyEditorClass(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getPropertyEditorClass <em>Property Editor Class</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Property Editor Class</em>' reference. - * @see #getPropertyEditorClass() - * @generated - */ - void setPropertyEditorClass(JavaClass value); - - /** - * Returns the value of the '<em><b>Read Method</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Read Method</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Read Method</em>' reference. - * @see #isSetReadMethod() - * @see #unsetReadMethod() - * @see #setReadMethod(Method) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_ReadMethod() - * @model unsettable="true" - * @generated - */ - Method getReadMethod(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getReadMethod <em>Read Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Read Method</em>' reference. - * @see #isSetReadMethod() - * @see #unsetReadMethod() - * @see #getReadMethod() - * @generated - */ - void setReadMethod(Method value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getReadMethod <em>Read Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetReadMethod() - * @see #getReadMethod() - * @see #setReadMethod(Method) - * @generated - */ - void unsetReadMethod(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getReadMethod <em>Read Method</em>}' reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Read Method</em>' reference is set. - * @see #unsetReadMethod() - * @see #getReadMethod() - * @see #setReadMethod(Method) - * @generated - */ - boolean isSetReadMethod(); - - /** - * Returns the value of the '<em><b>Write Method</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Write Method</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Write Method</em>' reference. - * @see #isSetWriteMethod() - * @see #unsetWriteMethod() - * @see #setWriteMethod(Method) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_WriteMethod() - * @model unsettable="true" - * @generated - */ - Method getWriteMethod(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getWriteMethod <em>Write Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Write Method</em>' reference. - * @see #isSetWriteMethod() - * @see #unsetWriteMethod() - * @see #getWriteMethod() - * @generated - */ - void setWriteMethod(Method value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getWriteMethod <em>Write Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetWriteMethod() - * @see #getWriteMethod() - * @see #setWriteMethod(Method) - * @generated - */ - void unsetWriteMethod(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getWriteMethod <em>Write Method</em>}' reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Write Method</em>' reference is set. - * @see #unsetWriteMethod() - * @see #getWriteMethod() - * @see #setWriteMethod(Method) - * @generated - */ - boolean isSetWriteMethod(); - - /** - * Returns the value of the '<em><b>Field</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * If this is set, then this property is a field and not a getter/setter property. This is an extension that the Visual Editor uses to the BeanInfo model. - * <!-- end-model-doc --> - * @return the value of the '<em>Field</em>' reference. - * @see #isSetField() - * @see #unsetField() - * @see #setField(Field) - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#getPropertyDecorator_Field() - * @model unsettable="true" - * @generated - */ - Field getField(); - - /** - * Sets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getField <em>Field</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Field</em>' reference. - * @see #isSetField() - * @see #unsetField() - * @see #getField() - * @generated - */ - void setField(Field value); - - /** - * Unsets the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getField <em>Field</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetField() - * @see #getField() - * @see #setField(Field) - * @generated - */ - void unsetField(); - - /** - * Returns whether the value of the '{@link org.eclipse.jem.internal.beaninfo.PropertyDecorator#getField <em>Field</em>}' reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Field</em>' reference is set. - * @see #unsetField() - * @see #getField() - * @see #setField(Field) - * @generated - */ - boolean isSetField(); - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Get the property type. - * <!-- end-model-doc --> - * @model kind="operation" - * @generated - */ - EClassifier getPropertyType(); - - /** - * <!-- begin-user-doc --> - * This property type is not persisted if this class is serialized into an XMI file. Nor is - * it a property that can be set from an XMI file. It is an operation. It is used by - * clients which want a PropertyDecorator that is not part of a BeanInfo model. - * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * Set the property type. - * <!-- end-model-doc --> - * @model - * @generated - */ - void setPropertyType(EClassifier propertyType); - - /** - * @return boolean for whether this property is writeable or not - * It could have a write method or it could have a field (e.g. java.awt.Insets.top) - */ - boolean isWriteable(); - - /** - * @return boolean for whether this property is readable or not - * It could have a read method or it could have a field (e.g. java.awt.Insets.top) - */ - boolean isReadable(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeanInfoAdapterMessages.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeanInfoAdapterMessages.java deleted file mode 100644 index 2b49711d4..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeanInfoAdapterMessages.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 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.jem.internal.beaninfo.adapters; - -import org.eclipse.osgi.util.NLS; - -public final class BeanInfoAdapterMessages extends NLS { - - private static final String BUNDLE_NAME = "org.eclipse.jem.internal.beaninfo.adapters.messages";//$NON-NLS-1$ - - private BeanInfoAdapterMessages() { - // Do not instantiate - } - - public static String INTROSPECT_FAILED_EXC_; - public static String BeaninfoClassAdapter_ClassNotFound; - public static String BeaninfoNature_InvalidProject; - public static String UICreateRegistryJobHandler_StartBeaninfoRegistry; - - static { - NLS.initializeMessages(BUNDLE_NAME, BeanInfoAdapterMessages.class); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeanInfoDecoratorUtility.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeanInfoDecoratorUtility.java deleted file mode 100644 index bbe85767f..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeanInfoDecoratorUtility.java +++ /dev/null @@ -1,1457 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 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 - *******************************************************************************/ -/* - * $RCSfile: BeanInfoDecoratorUtility.java,v $ - * $Revision: 1.8 $ $Date: 2006/05/17 20:13:00 $ - */ -package org.eclipse.jem.internal.beaninfo.adapters; - -import java.io.*; -import java.util.*; - -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.*; -import org.eclipse.emf.ecore.change.*; -import org.eclipse.emf.ecore.util.EcoreUtil; - -import org.eclipse.jem.internal.beaninfo.*; -import org.eclipse.jem.internal.beaninfo.common.*; -import org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin; -import org.eclipse.jem.internal.beaninfo.core.Utilities; -import org.eclipse.jem.internal.beaninfo.impl.*; -import org.eclipse.jem.internal.proxy.core.*; -import org.eclipse.jem.java.*; - -/** - * This is a utility class for handling the BeanInfo decorators with respect to the overrides (explicit settings) vs. introspected/reflected (implicit - * settings) It handles the transmission of data from the VM for introspection. - * @since 1.1.0 - */ -public class BeanInfoDecoratorUtility { - - /** - * Clear out the implicit settings for FeatureDecorator. - * - * @param decor - * - * @since 1.1.0 - */ - public static void clear(FeatureDecorator decor) { - long implicitSettings = decor.getImplicitlySetBits(); - // For each setting, see if it was implicitly set, and if it was, then unset it. - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_DISPLAYNAME_IMPLICIT) != 0) - decor.unsetDisplayName(); - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_SHORTDESC_IMPLICIT) != 0) - decor.unsetShortDescription(); - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_CATEGORY_IMPLICIT) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getFeatureDecorator_Category()); - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_EXPERT_IMPLICIT) != 0) - decor.unsetExpert(); - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_HIDDEN_IMPLICIT) != 0) - decor.unsetHidden(); - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_PREFERRED_IMPLICIT) != 0) - decor.unsetPreferred(); - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_ATTRIBUTES_IMPLICIT) != 0) { - for (Iterator itr = decor.getAttributes().listIterator(); itr.hasNext();) { - FeatureAttributeMapEntryImpl entry = (FeatureAttributeMapEntryImpl)itr.next(); - if (entry.getTypedValue().isImplicitValue()) { - itr.remove(); - } - } - } - decor - .setImplicitlySetBits(implicitSettings - & ~(FeatureDecoratorImpl.FEATURE_DISPLAYNAME_IMPLICIT | FeatureDecoratorImpl.FEATURE_SHORTDESC_IMPLICIT - | FeatureDecoratorImpl.FEATURE_CATEGORY_IMPLICIT | FeatureDecoratorImpl.FEATURE_EXPERT_IMPLICIT - | FeatureDecoratorImpl.FEATURE_HIDDEN_IMPLICIT | FeatureDecoratorImpl.FEATURE_PREFERRED_IMPLICIT | FeatureDecoratorImpl.FEATURE_ATTRIBUTES_IMPLICIT)); - } - - /** - * Clear out the implicit settings for BeanDecorator - * - * @param decor - * - * @since 1.1.0 - */ - public static void clear(BeanDecorator decor) { - clear((FeatureDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - // For each setting, see if it was implicitly set, and if it was, then unset it. - if ((implicitSettings & BeanDecoratorImpl.BEAN_CUSTOMIZER_IMPLICIT) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getBeanDecorator_CustomizerClass()); - if ((implicitSettings & BeanDecoratorImpl.BEAN_MERGE_INHERITED_PROPERTIES_IMPLICIT) != 0) - decor.unsetMergeSuperProperties(); - if ((implicitSettings & BeanDecoratorImpl.BEAN_MERGE_INHERITED_OPERATIONS_IMPLICIT) != 0) - decor.unsetMergeSuperMethods(); - if ((implicitSettings & BeanDecoratorImpl.BEAN_MERGE_INHERITED_EVENTS_IMPLICIT) != 0) - decor.unsetMergeSuperEvents(); - if (decor.eIsSet(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedPropertyNames())) - decor.eUnset(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedPropertyNames()); // Just clear them. This is our attribute. It should - // not be set overrides. - if (decor.eIsSet(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedMethodNames())) - decor.eUnset(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedMethodNames()); // Just clear them. This is our attribute. It should - // not be set overrides. - if (decor.eIsSet(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedEventNames())) - decor.eUnset(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedEventNames()); // Just clear them. This is our attribute. It should not - // be set overrides. - - decor.setImplicitlySetBits(implicitSettings - & ~(BeanDecoratorImpl.BEAN_CUSTOMIZER_IMPLICIT | BeanDecoratorImpl.BEAN_MERGE_INHERITED_PROPERTIES_IMPLICIT - | BeanDecoratorImpl.BEAN_MERGE_INHERITED_OPERATIONS_IMPLICIT | BeanDecoratorImpl.BEAN_MERGE_INHERITED_EVENTS_IMPLICIT)); - } - - /** - * Clear out the implicit settings of the PropertyDecorator. - * - * @param decor - * - * @since 1.1.0 - */ - public static void clear(PropertyDecorator decor) { - clear((FeatureDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - // For each setting, see if it was implicitly set, and if it was, then unset it. - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_EDITOR_CLASS_IMPLICIT) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getPropertyDecorator_PropertyEditorClass()); - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_READMETHOD_IMPLICIT) != 0) - decor.unsetReadMethod(); - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_WRITEMETHOD_IMPLICIT) != 0) - decor.unsetWriteMethod(); - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_FIELD_IMPLICIT) != 0) { - decor.unsetField(); - decor.eUnset(BeaninfoPackage.eINSTANCE.getPropertyDecorator_Field()); - } - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_BOUND_IMPLICIT) != 0) - decor.unsetBound(); - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_CONSTRAINED_IMPLICIT) != 0) - decor.unsetConstrained(); - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_DESIGNTIME_IMPLICIT) != 0) - decor.unsetDesignTime(); - decor.setImplicitlySetBits(implicitSettings - & ~(PropertyDecoratorImpl.PROPERTY_EDITOR_CLASS_IMPLICIT | PropertyDecoratorImpl.PROPERTY_READMETHOD_IMPLICIT - | PropertyDecoratorImpl.PROPERTY_WRITEMETHOD_IMPLICIT | PropertyDecoratorImpl.PROPERTY_BOUND_IMPLICIT - | PropertyDecoratorImpl.PROPERTY_CONSTRAINED_IMPLICIT | PropertyDecoratorImpl.PROPERTY_DESIGNTIME_IMPLICIT)); - } - - /** - * Clear out the implicit settings of the IndexedPropertyDecorator. - * - * @param decor - * - * @since 1.1.0 - */ - public static void clear(IndexedPropertyDecorator decor) { - clear((PropertyDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - // For each setting, see if it was implicitly set, and if it was, then unset it. - if ((implicitSettings & IndexedPropertyDecoratorImpl.INDEXED_READMETHOD_IMPLICIT) != 0) - decor.unsetIndexedReadMethod(); - if ((implicitSettings & IndexedPropertyDecoratorImpl.INDEXED_WRITEMETHOD_IMPLICIT) != 0) - decor.unsetIndexedWriteMethod(); - decor.setImplicitlySetBits(implicitSettings - & ~(IndexedPropertyDecoratorImpl.INDEXED_READMETHOD_IMPLICIT | IndexedPropertyDecoratorImpl.INDEXED_WRITEMETHOD_IMPLICIT)); - } - - /** - * Clear the method decorator of any implicit settings. - * - * @param decor - * - * @since 1.1.0 - */ - public static void clear(MethodDecorator decor) { - clear((FeatureDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - // For each setting, see if it was implicitly set, and if it was, then unset it. - if ((implicitSettings & (MethodDecoratorImpl.METHOD_PARAMETERS_IMPLICIT | MethodDecoratorImpl.METHOD_PARAMETERS_DEFAULT)) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getMethodDecorator_SerParmDesc()); - decor.setImplicitlySetBits(implicitSettings - & ~(MethodDecoratorImpl.METHOD_PARAMETERS_IMPLICIT | MethodDecoratorImpl.METHOD_PARAMETERS_DEFAULT)); - } - - /** - * Clear the event set decorator of any implicit settings. - * - * @param decor - * - * @since 1.1.0 - */ - public static void clear(EventSetDecorator decor) { - clear((FeatureDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - // For each setting, see if it was implicitly set, and if it was, then unset it. - if ((implicitSettings & EventSetDecoratorImpl.EVENT_ADDLISTENERMETHOD_IMPLICIT) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getEventSetDecorator_AddListenerMethod()); - if ((implicitSettings & EventSetDecoratorImpl.EVENT_ADAPTERCLASS_IMPLICIT) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getEventSetDecorator_EventAdapterClass()); - if ((implicitSettings & (EventSetDecoratorImpl.EVENT_LISTENERMETHODS_IMPLICIT | EventSetDecoratorImpl.EVENT_LISTENERMETHODS_DEFAULT)) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getEventSetDecorator_SerListMthd()); - if ((implicitSettings & EventSetDecoratorImpl.EVENT_REMOVELISTENERMETHOD_IMPLICIT) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getEventSetDecorator_RemoveListenerMethod()); - if ((implicitSettings & EventSetDecoratorImpl.EVENT_DEFAULTEVENTSET_IMPLICIT) != 0) - decor.unsetInDefaultEventSet(); - if ((implicitSettings & EventSetDecoratorImpl.EVENT_UNICAST_IMPLICIT) != 0) - decor.unsetUnicast(); - if ((implicitSettings & EventSetDecoratorImpl.EVENT_LISTENERTYPE_IMPLICIT) != 0) - decor.eUnset(BeaninfoPackage.eINSTANCE.getEventSetDecorator_ListenerType()); - - decor.setImplicitlySetBits(implicitSettings - & ~(EventSetDecoratorImpl.EVENT_ADDLISTENERMETHOD_IMPLICIT | EventSetDecoratorImpl.EVENT_ADAPTERCLASS_IMPLICIT - | EventSetDecoratorImpl.EVENT_LISTENERMETHODS_IMPLICIT | EventSetDecoratorImpl.EVENT_LISTENERMETHODS_DEFAULT - | EventSetDecoratorImpl.EVENT_REMOVELISTENERMETHOD_IMPLICIT | EventSetDecoratorImpl.EVENT_DEFAULTEVENTSET_IMPLICIT - | EventSetDecoratorImpl.EVENT_UNICAST_IMPLICIT | EventSetDecoratorImpl.EVENT_LISTENERTYPE_IMPLICIT)); - - } - - public static void introspect(IBeanProxy modelBeaninfoProxy, IntrospectCallBack callback) { - ProxyIntrospectCallBack cb = new ProxyIntrospectCallBack(callback); - modelBeaninfoProxy.getProxyFactoryRegistry().getCallbackRegistry().registerCallback(modelBeaninfoProxy, cb); - try { - BeaninfoProxyConstants.getConstants(modelBeaninfoProxy.getProxyFactoryRegistry()).getSendBeanInfoProxy() - .invokeCatchThrowableExceptions(modelBeaninfoProxy); - } finally { - modelBeaninfoProxy.getProxyFactoryRegistry().getCallbackRegistry().deregisterCallback(modelBeaninfoProxy); - } - - } - - /** - * This call back is for each requested type of record. It allows the callee to process this record. - * - * @since 1.1.0 - */ - public interface IntrospectCallBack { - - /** - * Process the BeanDecoratorRecord. The callee can decide what needs to be done with this record. It would return the BeandDecorator that needs - * to have the record applied to. If it returns <code>null</code> then the record will be ignored. - * <p> - * Note: This will be called on a separate thread from that which initiated the request. Therefor be careful with any locks because you may - * have them on a separate thread. - * - * @param record - * @return BeanDecorator to be applied to, or <code>null</code> if record is to be ignored. - * - * @since 1.1.0 - */ - public BeanDecorator process(BeanRecord record); - - /** - * Process the PropertyRecord. The callee can decide what needs to be done with this record. It would return the PropertyDecorator that needs - * to have the record applied to. If it returns <code>null</code> then the record will be ignored. - * <p> - * Note: This will be called on a separate thread from that which initiated the request. Therefor be careful with any locks because you may - * have them on a separate thread. - * - * @param record - * @return PropertyDecorator to be applied to, or <code>null</code> if record is to be ignored. - * - * @since 1.1.0 - */ - public PropertyDecorator process(PropertyRecord record); - - /** - * Process the IndexedPropertyRecord. The callee can decide what needs to be done with this record. It would return the - * IndexedPropertyDecorator that needs to have the record applied to. If it returns <code>null</code> then the record will be ignored. - * - * <p> - * Note: This will be called on a separate thread from that which initiated the request. Therefor be careful with any locks because you may - * have them on a separate thread. - * - * @param record - * @return PropertyDecorator to be applied to, or <code>null</code> if record is to be ignored. There is a possibility that a straight - * PropertyDecorator can be returned instead (in the case that it was explictly set by overrides as a property but beaninfo thinks it - * is an index. This can be handled by it will only set the PropertyRecord part. It normally should be an IndexedPropertyDecorator - * returned. - * - * @since 1.1.0 - */ - public PropertyDecorator process(IndexedPropertyRecord record); - - /** - * Process the MethodRecord. The callee can decide what needs to be done with this record. It would return the MethodDecorator that needs to - * have the record applied to. If it returns <code>null</code> then the record will be ignored. - * - * <p> - * Note: This will be called on a separate thread from that which initiated the request. Therefor be careful with any locks because you may - * have them on a separate thread. - * - * @param record - * @return MethodDecorator to be applied to, or <code>null</code> if record is to be ignored. - * - * @since 1.1.0 - */ - - public MethodDecorator process(MethodRecord record); - - /** - * Process the EventRecord. The callee can decide what needs to be done with this record. It would return the EventSetDecorator that needs to - * have the record applied to. If it returns <code>null</code> then the record will be ignored. - * - * <p> - * Note: This will be called on a separate thread from that which initiated the request. Therefor be careful with any locks because you may - * have them on a separate thread. - * - * @param record - * @return EventSetDecorator to be applied to, or <code>null</code> if record is to be ignored. - * - * @since 1.1.0 - */ - - public EventSetDecorator process(EventSetRecord record); - } - - private static class ProxyIntrospectCallBack implements ICallback { - - private IntrospectCallBack introspectCallback; - - public ProxyIntrospectCallBack(IntrospectCallBack introspectCallback) { - this.introspectCallback = introspectCallback; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBack(int, org.eclipse.jem.internal.proxy.core.IBeanProxy) - */ - public Object calledBack(int msgID, IBeanProxy parm) { - return null; // Not used. - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBack(int, java.lang.Object) - */ - public Object calledBack(int msgID, Object parm) { - return null; // Not used. - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBack(int, java.lang.Object[]) - */ - public Object calledBack(int msgID, Object[] parms) { - return null; // Not used. - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBackStream(int, java.io.InputStream) - */ - public void calledBackStream(int msgID, InputStream is) { - ObjectInputStream ois; - try { - ois = new ObjectInputStream(is); - while (true) { - int cmdId = ois.readInt(); - switch (cmdId) { - case IBeanInfoIntrospectionConstants.BEAN_DECORATOR_SENT: - try { - BeanRecord br = (BeanRecord) ois.readObject(); - BeanDecorator bd = introspectCallback.process(br); - if (bd != null) { - clear(bd); - applyRecord(bd, br); - } - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassCastException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassNotFoundException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - break; - case IBeanInfoIntrospectionConstants.PROPERTY_DECORATORS_SENT: - try { - int propCount = ois.readInt(); - for (int i = 0; i < propCount; i++) { - PropertyRecord pr = (PropertyRecord) ois.readObject(); - if (pr.getClass() == IndexedPropertyRecord.class) { - IndexedPropertyRecord ipr = (IndexedPropertyRecord) pr; - PropertyDecorator ip = introspectCallback.process(ipr); - if (ip != null) { - // It actually could be either a property decorator or an indexed property decorator. This could happen - // because the overrides file has explicitly declared a PropertyDecorator, so we can't change it to an - // Indexed. - // So in that case we can only fill the property part. - if (ip.eClass().getClassifierID() == BeaninfoPackage.INDEXED_PROPERTY_DECORATOR) - applyRecord((IndexedPropertyDecorator) ip, ipr); - else - applyRecord(ip, pr); // It was forced to be a property and not indexed. - } - } else { - PropertyDecorator p = introspectCallback.process(pr); - if (p != null) { - // It actually could be either a property decorator or an indexed property decorator. This could happen - // because the overrides file has explicitly declared an IndexedPropertyDecorator, so we can't change it - // to an - // Property. - // So in that case we can only fill the property part. - applyRecord(p, pr); - } - } - } - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassNotFoundException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassCastException e) { - // In case we got bad data sent in. - BeaninfoPlugin.getPlugin().getLogger().log(e); - } finally { - } - break; - - case IBeanInfoIntrospectionConstants.METHOD_DECORATORS_SENT: - try { - int opCount = ois.readInt(); - for (int i = 0; i < opCount; i++) { - MethodRecord mr = (MethodRecord) ois.readObject(); - MethodDecorator m = introspectCallback.process(mr); - if (m != null) - applyRecord(m, mr); - } - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassNotFoundException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassCastException e) { - // In case we got bad data sent in. - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - break; - - case IBeanInfoIntrospectionConstants.EVENT_DECORATORS_SENT: - try { - int opCount = ois.readInt(); - for (int i = 0; i < opCount; i++) { - EventSetRecord evr = (EventSetRecord) ois.readObject(); - EventSetDecorator e = introspectCallback.process(evr); - if (e != null) - applyRecord(e, evr); - } - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassNotFoundException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassCastException e) { - // In case we got bad data sent in. - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - break; - - case IBeanInfoIntrospectionConstants.DONE: - return; // Good. This is a good stop. - - default: - return; // This is invalid. Should of gotton something. - } - } - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - } - } - - /** - * Apply the feature record to the feature decorator. This is protected because this is an abstract and should never be called by itself. - * <p> - * - * @param decor - * @param record - * - * @since 1.1.0 - */ - protected static void applyRecord(FeatureDecorator decor, FeatureRecord record) { - // Subclasses will clear their decor, which will automatically clear the FeatureDecor part for us. - long implicitSettings = decor.getImplicitlySetBits(); - if (record.displayName != null && !decor.isSetDisplayName()) { - decor.setDisplayName(record.displayName); - implicitSettings |= FeatureDecoratorImpl.FEATURE_DISPLAYNAME_IMPLICIT; - } - if (record.shortDescription != null && !decor.isSetShortDescription()) { - decor.setShortDescription(record.shortDescription); - implicitSettings |= FeatureDecoratorImpl.FEATURE_SHORTDESC_IMPLICIT; - } - if (record.category != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getFeatureDecorator_Category())) { - decor.setCategory(record.category); - implicitSettings |= FeatureDecoratorImpl.FEATURE_CATEGORY_IMPLICIT; - } - if (!decor.isSetExpert()) { - if (decor.isExpert() != record.expert) - decor.setExpert(record.expert); // Don't want to explicitly set it if it is equal to default (this will put less out to the cache file - // and so will parse and apply faster). - implicitSettings |= FeatureDecoratorImpl.FEATURE_EXPERT_IMPLICIT; - } - if (!decor.isSetHidden()) { - if (decor.isHidden() != record.hidden) - decor.setHidden(record.hidden); - implicitSettings |= FeatureDecoratorImpl.FEATURE_HIDDEN_IMPLICIT; - } - if (!decor.isSetPreferred()) { - if (decor.isPreferred() != record.preferred) - decor.setPreferred(record.preferred); - implicitSettings |= FeatureDecoratorImpl.FEATURE_PREFERRED_IMPLICIT; - } - if (record.attributeNames != null && !decor.isAttributesExplicitEmpty()) { - // This is a list, so we need to read an fill in. - EMap attrs = decor.getAttributes(); - for (int i = 0; i < record.attributeNames.length; i++) { - FeatureAttributeMapEntryImpl entry = (FeatureAttributeMapEntryImpl) ((BeaninfoFactoryImpl) BeaninfoFactory.eINSTANCE) - .createFeatureAttributeMapEntry(); - entry.setTypedKey(record.attributeNames[i]); - FeatureAttributeValue fv = record.attributeValues[i]; - fv.setImplicitValue(true); - entry.setTypedValue(fv); - attrs.add(entry); - } - implicitSettings |= FeatureDecoratorImpl.FEATURE_ATTRIBUTES_IMPLICIT; - } - - decor.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Apply the bean record to the bean decorator. - * - * @param decor - * @param record - * - * @since 1.1.0 - */ - public static void applyRecord(BeanDecorator decor, BeanRecord record) { - applyRecord((FeatureDecorator) decor, record); - - long implicitSettings = decor.getImplicitlySetBits(); - if (record.customizerClassName != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getBeanDecorator_CustomizerClass())) { - decor.setCustomizerClass(createJavaClassProxy(record.customizerClassName)); - implicitSettings |= BeanDecoratorImpl.BEAN_CUSTOMIZER_IMPLICIT; - } - if (!decor.isSetMergeSuperProperties()) { - if (decor.isMergeSuperProperties() != record.mergeInheritedProperties) - decor.setMergeSuperProperties(record.mergeInheritedProperties); - implicitSettings |= BeanDecoratorImpl.BEAN_MERGE_INHERITED_PROPERTIES_IMPLICIT; - } - if (!decor.isSetMergeSuperMethods()) { - if (decor.isMergeSuperMethods() != record.mergeInheritedOperations) - decor.setMergeSuperMethods(record.mergeInheritedOperations); - implicitSettings |= BeanDecoratorImpl.BEAN_MERGE_INHERITED_OPERATIONS_IMPLICIT; - } - if (!decor.isSetMergeSuperEvents()) { - if (decor.isMergeSuperEvents() != record.mergeInheritedEvents) - decor.setMergeSuperEvents(record.mergeInheritedEvents); - implicitSettings |= BeanDecoratorImpl.BEAN_MERGE_INHERITED_EVENTS_IMPLICIT; - } - if (record.notInheritedPropertyNames != null) { - // This is always applied. This isn't a client override so we can just slam it. - decor.getNotInheritedPropertyNames().addAll(Arrays.asList(record.notInheritedPropertyNames)); - } - if (record.notInheritedOperationNames != null) { - // This is always applied. This isn't a client override so we can just slam it. - decor.getNotInheritedMethodNames().addAll(Arrays.asList(record.notInheritedOperationNames)); - } - if (record.notInheritedEventNames != null) { - // This is always applied. This isn't a client override so we can just slam it. - decor.getNotInheritedEventNames().addAll(Arrays.asList(record.notInheritedEventNames)); - } - - decor.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Apply the PropertyRecord to the PropertyDecorator. - * - * @param decor - * @param record - * - * @since 1.1.0 - */ - public static void applyRecord(PropertyDecorator decor, PropertyRecord record) { - applyRecord((FeatureDecorator) decor, record); - - applyOnly(decor, record); - } - - /* - * Apply only to property decorator part. Allows IndexedProperty to apply just the Property part and not do duplicate work - */ - private static void applyOnly(PropertyDecorator decor, PropertyRecord record) { - long implicitSettings = decor.getImplicitlySetBits(); - if (record.propertyEditorClassName != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getPropertyDecorator_PropertyEditorClass())) { - decor.setPropertyEditorClass(createJavaClassProxy(record.propertyEditorClassName)); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_EDITOR_CLASS_IMPLICIT; - } - if (record.readMethod != null && !decor.isSetReadMethod()) { - decor.setReadMethod(createJavaMethodProxy(record.readMethod)); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_READMETHOD_IMPLICIT; - } - if (record.writeMethod != null && !decor.isSetWriteMethod()) { - decor.setWriteMethod(createJavaMethodProxy(record.writeMethod)); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_WRITEMETHOD_IMPLICIT; - } - if (record.field != null && !decor.isSetField()) { - decor.setField(createJavaFieldProxy(record.field)); - if (decor.isFieldReadOnly() != record.field.readOnly) - decor.setFieldReadOnly(record.field.readOnly); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_FIELD_IMPLICIT; - } - if (!decor.isSetBound()) { - if (decor.isBound() != record.bound) - decor.setBound(record.bound); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_BOUND_IMPLICIT; - } - if (!decor.isSetConstrained()) { - if (decor.isConstrained() != record.constrained) - decor.setConstrained(record.constrained); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_CONSTRAINED_IMPLICIT; - } - if (record.designTime != null && !decor.isSetDesignTime()) { - // Design time is slightly different than the other booleans because - // explicitly set to true/false is important versus not explicitly set at all (which is false). - decor.setDesignTime(record.designTime.booleanValue()); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_DESIGNTIME_IMPLICIT; - } - - decor.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - - } - - public static void applyRecord(IndexedPropertyDecorator decor, IndexedPropertyRecord record) { - applyRecord((FeatureDecorator) decor, record); - applyOnly(decor, record); - - long implicitSettings = decor.getImplicitlySetBits(); - if (record.indexedReadMethod != null && !decor.isSetIndexedReadMethod()) { - decor.setIndexedReadMethod(createJavaMethodProxy(record.indexedReadMethod)); - implicitSettings |= IndexedPropertyDecoratorImpl.INDEXED_READMETHOD_IMPLICIT; - } - if (record.indexedWriteMethod != null && !decor.isSetIndexedWriteMethod()) { - decor.setIndexedWriteMethod(createJavaMethodProxy(record.indexedWriteMethod)); - implicitSettings |= IndexedPropertyDecoratorImpl.INDEXED_WRITEMETHOD_IMPLICIT; - } - decor.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Apply the method record to the method decorator. - * - * @param decor - * @param record - * - * @since 1.1.0 - */ - public static void applyRecord(MethodDecorator decor, MethodRecord record) { - applyRecord((FeatureDecorator) decor, record); - - long implicitSettings = decor.getImplicitlySetBits(); - if (record.parameters != null && !decor.isParmsExplicitEmpty() - && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getMethodDecorator_ParameterDescriptors())) { - // This is a list, so we need to read an fill in. - List parms = decor.getSerParmDesc(); // So as not to have it implicitly fill it in, which it would if we called getParameterDescriptors. - for (int i = 0; i < record.parameters.length; i++) { - ParameterDecorator parm = BeaninfoFactory.eINSTANCE.createParameterDecorator(); - applyRecord(parm, record.parameters[i]); - parms.add(parm); - } - implicitSettings |= MethodDecoratorImpl.METHOD_PARAMETERS_IMPLICIT; - implicitSettings &= ~MethodDecoratorImpl.METHOD_PARAMETERS_DEFAULT; // Should of already been cleared, but be safe. - } - - decor.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - public static void applyRecord(ParameterDecorator decor, ParameterRecord record) { - applyRecord((FeatureDecorator) decor, record); - - long implicitSettings = decor.getImplicitlySetBits(); - if (record.name != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getParameterDecorator_Name())) { - decor.setName(record.name); - implicitSettings |= ParameterDecoratorImpl.PARAMETER_NAME_IMPLICIT; - } - decor.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Apply the event set record to the event set decorator. - * - * @param decor - * @param record - * - * @since 1.1.0 - */ - public static void applyRecord(EventSetDecorator decor, EventSetRecord record) { - applyRecord((FeatureDecorator) decor, record); - - long implicitSettings = decor.getImplicitlySetBits(); - if (record.addListenerMethod != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_AddListenerMethod())) { - decor.setAddListenerMethod(createJavaMethodProxy(record.addListenerMethod)); - implicitSettings |= EventSetDecoratorImpl.EVENT_ADDLISTENERMETHOD_IMPLICIT; - } - if (record.eventAdapterClassName != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_EventAdapterClass())) { - decor.setEventAdapterClass(createJavaClassProxy(record.eventAdapterClassName)); - implicitSettings |= EventSetDecoratorImpl.EVENT_ADAPTERCLASS_IMPLICIT; - } - if (record.listenerMethodDescriptors != null && !decor.isListenerMethodsExplicitEmpty() - && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_ListenerMethods())) { - List methods = decor.getSerListMthd(); // So as not to have it implicitly fill it in, which it would if we called getListenerMethods. - for (int i = 0; i < record.listenerMethodDescriptors.length; i++) { - BeaninfoFactory bfact = BeaninfoFactory.eINSTANCE; - MethodRecord mr = record.listenerMethodDescriptors[i]; - Method method = createJavaMethodProxy(mr.methodForDescriptor); - // We need a method proxy, and a method decorator. - MethodProxy mproxy = bfact.createMethodProxy(); - mproxy.setMethod(method); - mproxy.setName(mr.name); - MethodDecorator md = bfact.createMethodDecorator(); - applyRecord(md, mr); - mproxy.getEAnnotations().add(md); - methods.add(mproxy); - } - implicitSettings |= EventSetDecoratorImpl.EVENT_LISTENERMETHODS_IMPLICIT; - implicitSettings &= ~EventSetDecoratorImpl.EVENT_LISTENERMETHODS_DEFAULT; // Should of already been cleared, but be safe. - } - if (record.listenerTypeName != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_ListenerType())) { - decor.setListenerType(createJavaClassProxy(record.listenerTypeName)); - implicitSettings |= EventSetDecoratorImpl.EVENT_LISTENERTYPE_IMPLICIT; - } - if (record.removeListenerMethod != null && !decor.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_RemoveListenerMethod())) { - decor.setRemoveListenerMethod(createJavaMethodProxy(record.removeListenerMethod)); - implicitSettings |= EventSetDecoratorImpl.EVENT_REMOVELISTENERMETHOD_IMPLICIT; - } - if (!decor.isSetInDefaultEventSet()) { - if (record.inDefaultEventSet != decor.isInDefaultEventSet()) - decor.setInDefaultEventSet(record.inDefaultEventSet); - implicitSettings |= EventSetDecoratorImpl.EVENT_DEFAULTEVENTSET_IMPLICIT; - } - if (!decor.isSetUnicast()) { - if (record.unicast != decor.isUnicast()) - decor.setUnicast(record.unicast); - implicitSettings |= EventSetDecoratorImpl.EVENT_UNICAST_IMPLICIT; - } - - decor.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Create a java class proxy for the given name. By being a proxy we don't need to actually have the resource set. Nor do we need to fluff one up - * until someone actually asks for it. - * <p> - * The jniName must refer to a JavaClass or errors could occur later on. - * - * @param jniName - * classname in JNI format. - * @return JavaClass proxy or <code>null</code> if not a java class (it may be a type). - * - * @since 1.1.0 - */ - public static JavaClass createJavaClassProxy(String jniName) { - JavaHelpers jh = createJavaTypeProxy(jniName); - return jh instanceof JavaClass ? (JavaClass) jh : null; - } - - /** - * Create a JavaHelpers proxy for the given name. By being a proxy we don't need to actually have the resource set. Nor do we need to fluff one up - * until someone actually asks for it. - * - * @param jniName - * typename in JNI format. - * @return JavaHelper proxy. - * - * @since 1.1.0 - */ - public static JavaHelpers createJavaTypeProxy(String jniName) { - String formalName = MapJNITypes.getFormalTypeName(jniName); - - URI uri = Utilities.getJavaClassURI(formalName); - JavaHelpers jh = null; - if (MapJNITypes.isFormalTypePrimitive(formalName)) - jh = JavaRefFactory.eINSTANCE.createJavaDataType(); - else - jh = JavaRefFactory.eINSTANCE.createJavaClass(); - ((InternalEObject) jh).eSetProxyURI(uri); - return jh; - } - - public static Method createJavaMethodProxy(ReflectMethodRecord method) { - String[] parmTypes = method.parameterTypeNames != null ? new String[method.parameterTypeNames.length] : null; - if (parmTypes != null) - for (int i = 0; i < method.parameterTypeNames.length; i++) { - parmTypes[i] = MapJNITypes.getFormalTypeName(method.parameterTypeNames[i]); - } - URI uri = Utilities.getMethodURI(MapJNITypes.getFormalTypeName(method.className), method.methodName, parmTypes); - Method methodEMF = JavaRefFactory.eINSTANCE.createMethod(); - ((InternalEObject) methodEMF).eSetProxyURI(uri); - return methodEMF; - } - - public static Field createJavaFieldProxy(ReflectFieldRecord field) { - URI uri = Utilities.getFieldURI(MapJNITypes.getFormalTypeName(field.className), field.fieldName); - Field fieldEMF = JavaRefFactory.eINSTANCE.createField(); - ((InternalEObject) fieldEMF).eSetProxyURI(uri); - return fieldEMF; - } - - /** - * Set the properties on the PropertyDecorator. These come from reflection. Since this is a private interface between BeaninfoClassAdapter and - * this class, not all possible settings need to be mentioned. Only the ones that can be set by reflection. It is assumed that clear has already - * been done so that there are no old implicit settings. It will check if properties are set already before setting so that don't wipe out - * explicit settings. - * - * @param prop - * @param bound - * @param constrained - * @param getter - * @param setter - * - * @since 1.1.0 - */ - public static void setProperties(PropertyDecorator prop, boolean bound, boolean constrained, Method getter, Method setter) { - long implicitSettings = prop.getImplicitlySetBits(); - if (getter != null && !prop.isSetReadMethod()) { - prop.setReadMethod(getter); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_READMETHOD_IMPLICIT; - } - if (setter != null && !prop.isSetWriteMethod()) { - prop.setWriteMethod(setter); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_WRITEMETHOD_IMPLICIT; - } - if (!prop.isSetBound()) { - if (prop.isBound() != bound) - prop.setBound(bound); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_BOUND_IMPLICIT; - } - if (!prop.isSetConstrained()) { - if (prop.isConstrained() != constrained) - prop.setConstrained(constrained); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_CONSTRAINED_IMPLICIT; - } - prop.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Set the properties on the IndexedPropertyDecorator. These come from reflection. It is only the indexed portion. The base property portion - * should have already been set. Since this is a private interface between BeaninfoClassAdapter and this class, not all possible settings need to - * be mentioned. Only the ones that can be set by reflection. It is assumed that clear has already been done so that there are no old implicit - * settings. It will check if properties are set already before setting so that don't wipe out explicit settings. - * - * @param prop - * @param indexedGetter - * @param indexedSetter - * - * @since 1.1.0 - */ - public static void setProperties(IndexedPropertyDecorator prop, Method indexedGetter, Method indexedSetter) { - long implicitSettings = prop.getImplicitlySetBits(); - if (indexedGetter != null && !prop.isSetIndexedReadMethod()) { - prop.setIndexedReadMethod(indexedGetter); - implicitSettings |= IndexedPropertyDecoratorImpl.INDEXED_READMETHOD_IMPLICIT; - } - if (indexedSetter != null && !prop.isSetIndexedWriteMethod()) { - prop.setIndexedWriteMethod(indexedSetter); - implicitSettings |= IndexedPropertyDecoratorImpl.INDEXED_WRITEMETHOD_IMPLICIT; - } - prop.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Set the properties on the EventSetDecorator. These come from reflection. Since this is a private interface between BeaninfoClassAdapter and - * this class, not all possible settings need to be mentioned. Only the ones that can be set by reflection. It is assumed that clear has already - * been done so that there are no old implicit settings. It will check if properties are set already before setting so that don't wipe out - * explicit settings. - * - * @param event - * @param bound - * @param constrained - * @param getter - * @param setter - * - * @since 1.1.0 - */ - public static void setProperties(EventSetDecorator event, Method addListenerMethod, Method removeListenerMethod, boolean unicast, - JavaClass listenerType) { - long implicitSettings = event.getImplicitlySetBits(); - if (addListenerMethod != null && !event.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_AddListenerMethod())) { - event.setAddListenerMethod(addListenerMethod); - implicitSettings |= EventSetDecoratorImpl.EVENT_ADDLISTENERMETHOD_IMPLICIT; - } - if (removeListenerMethod != null && !event.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_RemoveListenerMethod())) { - event.setRemoveListenerMethod(removeListenerMethod); - implicitSettings |= EventSetDecoratorImpl.EVENT_REMOVELISTENERMETHOD_IMPLICIT; - } - if (!event.isSetUnicast()) { - if (event.isUnicast() != unicast) - event.setUnicast(unicast); - implicitSettings |= PropertyDecoratorImpl.PROPERTY_BOUND_IMPLICIT; - } - if (listenerType != null && !event.eIsSet(BeaninfoPackage.eINSTANCE.getEventSetDecorator_ListenerType())) { - event.setListenerType(listenerType); - implicitSettings |= EventSetDecoratorImpl.EVENT_LISTENERTYPE_IMPLICIT; - } - - event.setImplicitlySetBits(implicitSettings); // Now save was implicitly set. - } - - /** - * Build the appropriate change record for the bean decorator. Either it is an add of a new bean decorator or it is the setting of the implicit - * settings on an non-implicit bean decorator. - * @param cd - * @param bd - * - * @since 1.1.0 - */ - public static void buildChange(ChangeDescription cd, BeanDecorator bd) { - // Only do anything if merge introspection. If no merge introspection, then there is no change needed. - if (bd.isMergeIntrospection()) { - if (bd.getImplicitDecoratorFlag() != ImplicitItem.NOT_IMPLICIT_LITERAL) { - // It is implicit, so do an add to end, new value. - doAddToEnd(cd, getFeatureChangeList(cd, bd.getEModelElement()), EcorePackage.eINSTANCE.getEModelElement_EAnnotations(), bd, true); - } else { - // Just do sets on implicit changed ones - buildNonImplicitChange(cd, getFeatureChangeList(cd, bd), bd); - } - } - - } - - /** - * Build the appropriate change record for the property decorator. Either it is an add of a new property decorator or it is the setting of the implicit - * settings on an non-implicit property decorator. The same is true of the feature that it decorates. It may be new or it may be an existing one. - * @param cd - * @param pd - * - * @since 1.1.0 - */ - public static void buildChange(ChangeDescription cd, PropertyDecorator pd) { - // Only do changes if merge introspection. If not merging, then there are no changes. - if (pd.isMergeIntrospection()) { - boolean indexed = pd.eClass().getClassifierID() == BeaninfoPackage.INDEXED_PROPERTY_DECORATOR; - EStructuralFeature feature = (EStructuralFeature) pd.getEModelElement(); - switch (pd.getImplicitDecoratorFlag().getValue()) { - case ImplicitItem.IMPLICIT_DECORATOR: - // The decorator is implicit, so clone it, and apply to feature, and then do the standard property applies to the feature. - List fcs = getFeatureChangeList(cd, feature); - doAddToEnd(cd, fcs, pd.eContainingFeature(), pd, true); - buildNonImplicitChange(cd, fcs, feature, indexed); - break; - case ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE: - // The decorator AND feature are implicit. Just clone them and add to the class. - doAddToEnd(cd, getFeatureChangeList(cd, feature.eContainer()), feature.eContainingFeature(), feature, true); - break; - case ImplicitItem.NOT_IMPLICIT: - // Neither the feature nor the decorator are implicit. So need to do applies against them. - buildNonImplicitChange(cd, getFeatureChangeList(cd, pd), pd, indexed); - buildNonImplicitChange(cd, getFeatureChangeList(cd, feature), feature, indexed); - break; - } - } - } - - /** - * Build the appropriate change record for the event set decorator. Either it is an add of a new event set decorator or it is the setting of the implicit - * settings on an non-implicit event set decorator. The same is true of the feature that it decorates. It may be new or it may be an existing one. - * @param cd - * @param ed - * - * @since 1.1.0 - */ - public static void buildChange(ChangeDescription cd, EventSetDecorator ed) { - // Only build changes if merge introspection. If not merge then there are no changes. - if (ed.isMergeIntrospection()) { - JavaEvent event = (JavaEvent) ed.getEModelElement(); - switch (ed.getImplicitDecoratorFlag().getValue()) { - case ImplicitItem.IMPLICIT_DECORATOR: - // The decorator is implicit, so clone it, and apply to feature, and then do the standard property applies to the feature. - List fcs = getFeatureChangeList(cd, event); - doAddToEnd(cd, fcs, ed.eContainingFeature(), ed, true); - buildNonImplicitChange(cd, fcs, event); - break; - case ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE: - // The decorator AND feature are implicit. Just clone them and add to the class. - doAddToEnd(cd, getFeatureChangeList(cd, event.eContainer()), event.eContainingFeature(), event, true); - break; - case ImplicitItem.NOT_IMPLICIT: - // Neither the feature nor the decorator are implicit. So need to do applies against them. - buildNonImplicitChange(cd, getFeatureChangeList(cd, ed), ed); - buildNonImplicitChange(cd, getFeatureChangeList(cd, event), event); - break; - } - } - } - - /** - * Build the appropriate change record for the method decorator. Either it is an add of a new method decorator or it is the setting of the implicit - * settings on an non-implicit method decorator. The same is true of the operation that it decorates. It may be new or it may be an existing one. - * @param cd - * @param md - * - * @since 1.1.0 - */ - public static void buildChange(ChangeDescription cd, MethodDecorator md) { - // Only do any builds if merge introspection. If not merge introspection then nothing should be changed. - if (md.isMergeIntrospection()) { - EOperation oper = (EOperation) md.getEModelElement(); - switch (md.getImplicitDecoratorFlag().getValue()) { - case ImplicitItem.IMPLICIT_DECORATOR: - // The decorator is implicit, so clone it, and apply to feature, and then do the standard property applies to the feature. - List fcs = getFeatureChangeList(cd, oper); - doAddToEnd(cd, fcs, md.eContainingFeature(), md, true); - buildNonImplicitChange(cd, fcs, oper); - break; - case ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE: - // The decorator AND feature are implicit. Just clone them and add to the class. - doAddToEnd(cd, getFeatureChangeList(cd, oper.eContainer()), oper.eContainingFeature(), oper, true); - break; - case ImplicitItem.NOT_IMPLICIT: - // Neither the feature nor the decorator are implicit. So need to do applies against them. - buildNonImplicitChange(cd, getFeatureChangeList(cd, md), md); - buildNonImplicitChange(cd, getFeatureChangeList(cd, oper), oper); - break; - } - } - } - - private final static Integer ZERO = new Integer(0); - private final static Integer ONE = new Integer(1); - private final static Integer MINUS_ONE = new Integer(-1); - - /** - * Build the non-implicit changes into the feature. This creates changes for the implicit settings - * that always occur for a property decorator. - * - * @param cd - * @param fcs FeatureChanges list for the feature. - * @param feature - * @param indexed <code>true</code> if this is for an indexed feature. - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, EStructuralFeature feature, boolean indexed) { - doSet(cd, fcs, EcorePackage.eINSTANCE.getENamedElement_Name(), feature.getName(), false); - doSet(cd, fcs, EcorePackage.eINSTANCE.getEStructuralFeature_Transient(), Boolean.FALSE, false); - doSet(cd, fcs, EcorePackage.eINSTANCE.getEStructuralFeature_Volatile(), Boolean.FALSE, false); - doSet(cd, fcs, EcorePackage.eINSTANCE.getEStructuralFeature_Changeable(), Boolean.valueOf(feature.isChangeable()), false); - doSet(cd, fcs, EcorePackage.eINSTANCE.getETypedElement_EType(), feature.getEType(), false); - if (!indexed) { - doSet(cd, fcs, EcorePackage.eINSTANCE.getETypedElement_LowerBound(), ZERO, false); - doSet(cd, fcs, EcorePackage.eINSTANCE.getETypedElement_UpperBound(), ONE, false); - } else { - doSet(cd, fcs, EcorePackage.eINSTANCE.getETypedElement_LowerBound(), ZERO, false); - doSet(cd, fcs, EcorePackage.eINSTANCE.getETypedElement_UpperBound(), MINUS_ONE, false); - doSet(cd, fcs, EcorePackage.eINSTANCE.getETypedElement_Unique(), Boolean.TRUE, false); - } - } - - /** - * Build the non-implicit changes into the event. This creates changes for the implicit settings - * that always occur for an event set decorator. - * - * @param cd - * @param fcs FeatureChanges list for the feature. - * @param event - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, JavaEvent event) { - doSet(cd, fcs, EcorePackage.eINSTANCE.getENamedElement_Name(), event.getName(), false); - } - - /** - * Build the non-implicit changes into the operation. This creates changes for the implicit settings - * that always occur for an method decorator. - * - * @param cd - * @param fcs FeatureChanges list for the feature. - * @param oper - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, EOperation oper) { - doSet(cd, fcs, EcorePackage.eINSTANCE.getENamedElement_Name(), oper.getName(), false); - try { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getMethodProxy_Method(), ((MethodProxy) oper).getMethod(), false); // This is a method that is not in this resource, so no clone. - } catch (ClassCastException e) { - // It will be a MethodProxy 99.9% of the time, so save by not doing instanceof. - } - } - - /** - * Build up the changes for a non-implicit feature decorator. This means create changes for implicit set features. - * - * @param cd - * @param fcs - * the FeatureChanges list for the given decorator. - * @param decor - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, FeatureDecorator decor) { - long implicitSettings = decor.getImplicitlySetBits(); - if (implicitSettings != 0) - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_ImplicitlySetBits(), new Long(implicitSettings), false); - - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_DISPLAYNAME_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_DisplayName(), decor.getDisplayName(), false); - } - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_SHORTDESC_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_ShortDescription(), decor.getShortDescription(), false); - } - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_CATEGORY_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_Category(), decor.getCategory(), false); - } - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_EXPERT_IMPLICIT) != 0 && decor.isSetExpert()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_Expert(), Boolean.valueOf(decor.isExpert()), false); - } - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_HIDDEN_IMPLICIT) != 0 && decor.isSetHidden()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_Hidden(), Boolean.valueOf(decor.isHidden()), false); - } - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_PREFERRED_IMPLICIT) != 0 && decor.isSetPreferred()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_Preferred(), Boolean.valueOf(decor.isPreferred()), false); - } - if ((implicitSettings & FeatureDecoratorImpl.FEATURE_ATTRIBUTES_IMPLICIT) != 0) { - for (Iterator itr = decor.getAttributes().listIterator(); itr.hasNext();) { - FeatureAttributeMapEntryImpl entry = (FeatureAttributeMapEntryImpl)itr.next(); - if (entry.getTypedValue().isImplicitValue()) { - doAddToEnd(cd, fcs, BeaninfoPackage.eINSTANCE.getFeatureDecorator_Attributes(), entry, true); - } - } - } - } - - /** - * Build up the changes for a non-implicit bean decorator. This means create changes for implicit set features. - * - * @param cd - * @param fcs - * the FeatureChanges list for the given decorator. - * @param decor - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, BeanDecorator decor) { - buildNonImplicitChange(cd, fcs, (FeatureDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - if ((implicitSettings & BeanDecoratorImpl.BEAN_CUSTOMIZER_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getBeanDecorator_CustomizerClass(), decor.getCustomizerClass(), false); // Customizer class is - // not in this resource, - // so we don't clone it. - } - if ((implicitSettings & BeanDecoratorImpl.BEAN_MERGE_INHERITED_PROPERTIES_IMPLICIT) != 0 && decor.isSetMergeSuperProperties()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getBeanDecorator_MergeSuperProperties(), Boolean.valueOf(decor.isMergeSuperProperties()), false); - } - if ((implicitSettings & BeanDecoratorImpl.BEAN_MERGE_INHERITED_OPERATIONS_IMPLICIT) != 0 && decor.isSetMergeSuperMethods()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getBeanDecorator_MergeSuperMethods(), Boolean.valueOf(decor.isMergeSuperMethods()), false); - } - if ((implicitSettings & BeanDecoratorImpl.BEAN_MERGE_INHERITED_EVENTS_IMPLICIT) != 0 && decor.isSetMergeSuperEvents()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getBeanDecorator_MergeSuperEvents(), Boolean.valueOf(decor.isMergeSuperEvents()), false); - } - if (!decor.getNotInheritedPropertyNames().isEmpty()) { - doAddAllToEnd(cd, fcs, BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedPropertyNames(), decor.getNotInheritedPropertyNames(), false); - } - if (!decor.getNotInheritedMethodNames().isEmpty()) { - doAddAllToEnd(cd, fcs, BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedMethodNames(), decor.getNotInheritedMethodNames(), false); - } - if (!decor.getNotInheritedEventNames().isEmpty()) { - doAddAllToEnd(cd, fcs, BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedEventNames(), decor.getNotInheritedEventNames(), false); - } - } - - /** - * Build up the changes for a non-implicit property decorator. This means create changes for implicit set features. - * - * @param cd - * @param fcs - * the FeatureChanges list for the given decorator. - * @param decor - * @param indexed <code>true</code> if this is an indexed property decorator. - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, PropertyDecorator decor, boolean indexed) { - buildNonImplicitChange(cd, fcs, decor); - long implicitSettings = decor.getImplicitlySetBits(); - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_EDITOR_CLASS_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_PropertyEditorClass(), decor.getPropertyEditorClass(), false); // Property Editor class is - // not in this resource, - // so we don't clone it. - } - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_READMETHOD_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_ReadMethod(), decor.getReadMethod(), false); - } - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_WRITEMETHOD_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_WriteMethod(), decor.getWriteMethod(), false); - } - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_FIELD_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_Field(), decor.getField(), false); - if (decor.eIsSet(BeaninfoPackage.eINSTANCE.getPropertyDecorator_FieldReadOnly())) - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_FieldReadOnly(), Boolean.valueOf(decor.isFieldReadOnly()), false); - } - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_BOUND_IMPLICIT) != 0 && decor.isSetBound()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_Bound(), Boolean.valueOf(decor.isBound()), false); - } - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_CONSTRAINED_IMPLICIT) != 0 && decor.isSetConstrained()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_Constrained(), Boolean.valueOf(decor.isConstrained()), false); - } - if ((implicitSettings & PropertyDecoratorImpl.PROPERTY_DESIGNTIME_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getPropertyDecorator_DesignTime(), Boolean.valueOf(decor.isDesignTime()), false); - } - - if (indexed) { - IndexedPropertyDecorator ipd = (IndexedPropertyDecorator) decor; - if ((implicitSettings & IndexedPropertyDecoratorImpl.INDEXED_READMETHOD_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getIndexedPropertyDecorator_IndexedReadMethod(), ipd.getIndexedReadMethod(), false); - } - if ((implicitSettings & IndexedPropertyDecoratorImpl.INDEXED_WRITEMETHOD_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getIndexedPropertyDecorator_IndexedWriteMethod(), ipd.getIndexedWriteMethod(), false); - } - } - } - - /** - * Build up the changes for a non-implicit event set decorator. This means create changes for implicit set features. - * - * @param cd - * @param fcs - * the FeatureChanges list for the given decorator. - * @param decor - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, EventSetDecorator decor) { - buildNonImplicitChange(cd, fcs, (FeatureDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - if ((implicitSettings & EventSetDecoratorImpl.EVENT_ADDLISTENERMETHOD_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getEventSetDecorator_AddListenerMethod(), decor.getAddListenerMethod(), false); // listener method is - // not in this resource, - // so we don't clone it. - } - if ((implicitSettings & EventSetDecoratorImpl.EVENT_ADAPTERCLASS_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getEventSetDecorator_EventAdapterClass(), decor.getEventAdapterClass(), false); - } - if ((implicitSettings & EventSetDecoratorImpl.EVENT_LISTENERMETHODS_IMPLICIT) != 0) { - doAddAllToEnd(cd, fcs, BeaninfoPackage.eINSTANCE.getEventSetDecorator_SerListMthd(), decor.getSerListMthd(), true); // These need to be cloned because they are contained here. - } - if ((implicitSettings & EventSetDecoratorImpl.EVENT_LISTENERTYPE_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getEventSetDecorator_ListenerType(), decor.getListenerType(), false); - } - if ((implicitSettings & EventSetDecoratorImpl.EVENT_REMOVELISTENERMETHOD_IMPLICIT) != 0) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getEventSetDecorator_RemoveListenerMethod(), decor.getRemoveListenerMethod(), false); - } - if ((implicitSettings & EventSetDecoratorImpl.EVENT_DEFAULTEVENTSET_IMPLICIT) != 0 && decor.isSetInDefaultEventSet()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getEventSetDecorator_InDefaultEventSet(), Boolean.valueOf(decor.isInDefaultEventSet()), false); - } - if ((implicitSettings & EventSetDecoratorImpl.EVENT_UNICAST_IMPLICIT) != 0 && decor.isSetUnicast()) { - doSet(cd, fcs, BeaninfoPackage.eINSTANCE.getEventSetDecorator_Unicast(), Boolean.valueOf(decor.isUnicast()), false); - } - } - - /** - * Build up the changes for a non-implicit method decorator. This means create changes for implicit set features. - * - * @param cd - * @param fcs - * the FeatureChanges list for the given decorator. - * @param decor - * - * @since 1.1.0 - */ - protected static void buildNonImplicitChange(ChangeDescription cd, List fcs, MethodDecorator decor) { - buildNonImplicitChange(cd, fcs, (FeatureDecorator) decor); - long implicitSettings = decor.getImplicitlySetBits(); - if ((implicitSettings & MethodDecoratorImpl.METHOD_PARAMETERS_IMPLICIT) != 0) { - doAddAllToEnd(cd, fcs, BeaninfoPackage.eINSTANCE.getMethodDecorator_SerParmDesc(), decor.getSerParmDesc(), true); - } - } - - - /** - * Get the feature change list for an object. Create it one if necessary. - * - * @param cd - * @param object - * @return feature change list. - * - * @since 1.1.0 - */ - protected static List getFeatureChangeList(ChangeDescription cd, EObject object) { - List fcs = (List) cd.getObjectChanges().get(object); // Get the feature changes if any. - if (fcs == null) { - Map.Entry entry = ChangeFactory.eINSTANCE.createEObjectToChangesMapEntry(object); - cd.getObjectChanges().add(entry); - fcs = (List) entry.getValue(); - } - return fcs; - } - - /** - * Return the FeatureChange record for a feature wrt/object. Create one if necessary. If it creates it, it will mark it as "set". All of our - * changes here are set kind of changes, not unset kind. - * - * @param fcs - * feature change list from the ChangeDescripion.getObjectChanges for the given object. - * @param feature - * @return feature change - * - * @since 1.1.0 - */ - protected static FeatureChange getFeatureChange(List fcs, EStructuralFeature feature) { - if (!fcs.isEmpty()) { - for (int i = 0; i < fcs.size(); i++) { - FeatureChange fc = (FeatureChange) fcs.get(i); - if (fc.getFeature() == feature) - return fc; - } - } - - // Either new object changes or no feature change found. Create one. - FeatureChange fc = ChangeFactory.eINSTANCE.createFeatureChange(feature, null, true); - fcs.add(fc); - return fc; - } - - /** - * Create a change for add to end of the given feature (must be isMany()). If newObject is true, then this means this is not a pointer to an - * existing object and so it must be cloned. It is assumed that there will be no further changes to this object because those will not be known - * about. - * - * @param cd - * @param fcs - * feature change list from the ChangeDescripion.getObjectChanges for the given object. - * @param feature - * the feature being added to. - * @param addedValue - * the value being added. - * @param newValue - * <code>true</code> if new object in the resource, a clone will be made. <code>false</code> if an existing object. Must be an - * EObject for cloning. Best if not true for non-eobjects. - * @return the addedValue or the clone if it was cloned. - * - * @since 1.1.0 - */ - protected static Object doAddToEnd(ChangeDescription cd, List fcs, EStructuralFeature feature, Object addedValue, boolean newValue) { - FeatureChange fc = getFeatureChange(fcs, feature); - if (newValue) { - try { - addedValue = EcoreUtil.copy((EObject) addedValue); - cd.getObjectsToAttach().add(addedValue); - } catch (ClassCastException e) { - // Normally should not occur, but if it does, it means we can't clone, so don't clone. - } - } - List lcs = fc.getListChanges(); - // Find the one with add and -1, i.e. add to end. There should only be one. - ListChange lc = null; - for (int i = 0; i < lcs.size(); i++) { - ListChange lca = (ListChange) lcs.get(i); - if (lca.getKind() == ChangeKind.ADD_LITERAL && lca.getIndex() == -1) { - lc = lca; - break; - } - } - if (lc == null) { - lc = ChangeFactory.eINSTANCE.createListChange(); - lcs.add(lc); - } - - lc.getValues().add(addedValue); - return addedValue; - } - - /** - * Create a change for add all to end of the given feature (must be isMany()). If newValue is true, then this means this is not a pointer to - * existing objects and so it must be cloned. It is assumed that there will be no further changes to this object because those will not be known - * about. - * - * @param cd - * @param fcs - * feature change list from the ChangeDescripion.getObjectChanges for the given object. - * @param feature - * the feature being added to. - * @param addedValues - * the values being added. - * @param newValue - * <code>true</code> if new objects in the resource, clones will be made. <code>false</code> if an existing object. Must be EObject - * for cloning. Best if not true for non-eobjects. - * @return the addedValues or the clones if it was cloned. - * - * @since 1.1.0 - */ - protected static Object doAddAllToEnd(ChangeDescription cd, List fcs, EStructuralFeature feature, Collection addedValues, boolean newValue) { - FeatureChange fc = getFeatureChange(fcs, feature); - if (newValue) { - try { - addedValues = EcoreUtil.copyAll(addedValues); - cd.getObjectsToAttach().addAll(addedValues); - } catch (ClassCastException e) { - // Normally should not occur, but if it does, it means we can't clone, so don't clone. - } - } - List lcs = fc.getListChanges(); - // Find the one with add and -1, i.e. add to end. There should only be one. - ListChange lc = null; - for (int i = 0; i < lcs.size(); i++) { - ListChange lca = (ListChange) lcs.get(i); - if (lca.getKind() == ChangeKind.ADD_LITERAL && lca.getIndex() == -1) { - lc = lca; - break; - } - } - if (lc == null) { - lc = ChangeFactory.eINSTANCE.createListChange(); - lcs.add(lc); - } - - lc.getValues().addAll(addedValues); - return addedValues; - } - - /** - * Create a change for set a given feature (must be !isMany()). If newValue is true, then this means this is not a pointer to an existing object - * and so it must be cloned. It is assumed that there will be no further changes to this object because those will not be known about. - * <p> - * Any further sets to this feature will result in the previous setting being lost. - * - * @param cd - * @param fcs - * feature change list from the ChangeDescripion.getObjectChanges for the given object. - * @param feature - * the feature being set to. - * @param setValue - * the value being set. - * @param newValue - * <code>true</code> if new object in the resource, a clone will be made. <code>false</code> if an existing object. Must be an - * EObject for cloning. Best if not true for non-eobjects. - * @return the setValue or the clone if it was cloned. - * - * @since 1.1.0 - */ - protected static Object doSet(ChangeDescription cd, List fcs, EStructuralFeature feature, Object setValue, boolean newValue) { - - FeatureChange fc = getFeatureChange(fcs, feature); - if (newValue) { - try { - setValue = EcoreUtil.copy((EObject) setValue); - cd.getObjectsToAttach().add(setValue); - } catch (ClassCastException e) { - // Normally should not occur, but if it does, it means we can't clone, so don't clone. - } - } - - if (setValue instanceof EObject) - fc.setReferenceValue((EObject) setValue); - else - fc.setDataValue(EcoreUtil.convertToString((EDataType) feature.getEType(), setValue)); - return setValue; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoAdapterFactory.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoAdapterFactory.java deleted file mode 100644 index 1774b9766..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoAdapterFactory.java +++ /dev/null @@ -1,229 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: BeaninfoAdapterFactory.java,v $ - * $Revision: 1.9 $ $Date: 2005/09/13 20:30:47 $ - */ -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.*; - -import org.eclipse.core.resources.IProject; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.resource.ResourceSet; - -import org.eclipse.jem.internal.beaninfo.core.*; -import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter; -import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry; -import org.eclipse.jem.java.ArrayType; -import org.eclipse.jem.util.emf.workbench.ProjectResourceSet; -/** - * BeaninfoAdapterFactory - the factory for - * beaninfo introspection to populate the Java Model. - * Creation date: (11/1/2000 11:52:55 AM) - * @author: Administrator - */ -public class BeaninfoAdapterFactory extends AdapterFactoryImpl { - protected IBeaninfoSupplier fInfoSupplier; - - // Maintain a mapping of the source objects to the adaptors which have - // introspected from them. This allows a close operation to force those - // adapters to clear out the data. It also allows for marking an adapter as stale - // so that next time it introspects it will re-get the data. - // - // This is a WeakReference so that we don't hold onto adapters that were - // explicitly removed in other ways. - private Map fIntrospected = new HashMap(); // NOTE: This is to be accessed only under sync(this)! - private ReferenceQueue fRefQ = new ReferenceQueue(); - private static class WeakValue extends WeakReference { - private Object key; - public WeakValue(Object aKey, Object value, ReferenceQueue que) { - super(value, que); - key = aKey; - } - - public Object getKey() { - return key; - } - }; - - public BeaninfoAdapterFactory(IBeaninfoSupplier supplier) { - fInfoSupplier = supplier; - } - - public Adapter createAdapter(Notifier target, Object type) { - if (type == IIntrospectionAdapter.ADAPTER_KEY) { - return !(target instanceof ArrayType) ? new BeaninfoClassAdapter(this) : null; // Array types don't have beaninfo adapters. - } else - return new BeaninfoSuperAdapter(); - } - - /** - * @see org.eclipse.emf.common.notify.AdapterFactory#isFactoryForType(Object) - */ - public boolean isFactoryForType(Object type) { - return IIntrospectionAdapter.ADAPTER_KEY == type || BeaninfoSuperAdapter.ADAPTER_KEY == type; - } - - public ProxyFactoryRegistry getRegistry() { - return fInfoSupplier.getRegistry(); - } - - public boolean isRegistryCreated() { - return fInfoSupplier.isRegistryCreated(); - } - - public ProxyFactoryRegistry recycleRegistry() { - markAllStale(); // At this point in time we need to mark them all stale because we are recycling. MarkAllStale also closes the registry. - return getRegistry(); - } - - public IProject getProject() { - return fInfoSupplier.getProject(); - } - - public ProjectResourceSet getNewResourceSet() { - return fInfoSupplier.getNewResourceSet(); - } - - public ResourceSet getProjectResourceSet() { - return fInfoSupplier.getProjectResourceSet(); - } - - /** - * Close ALL adapters. Also remove the adapters so that they - * are not being held onto. This means we are closing the project or removing the nature. - */ - public void closeAll(boolean clearResults) { - processQueue(); - synchronized (this) { - // We are going to be removing all of them, so just set introspected to an empty one - // and use the real one. This way we won't get concurrent modifications as we remove - // it from the notifier removeAdapter. - Map intr = fIntrospected; - fIntrospected = Collections.EMPTY_MAP; // Since we are closing we can keep the unmodifiable one here. - Iterator i = intr.values().iterator(); - while (i.hasNext()) { - BeaninfoClassAdapter a = (BeaninfoClassAdapter) ((WeakValue) i.next()).get(); - if (a != null) { - if (clearResults) - a.clearIntrospection(); - Notifier notifier = a.getTarget(); - if (notifier != null) - notifier.eAdapters().remove(a); - } - } - } - } - - /** - * Mark all stale, but leave the overrides alone. The overrides aren't stale. - * - * - * @since 1.1.0.1 - */ - public void markAllStale() { - markAllStale(false); - } - - /** - * Mark ALL adapters as stale. This occurs because we've recycled the registry. - * - * @param clearOverrides clear the overrides too. This is full-fledged stale. The overrides are stale too. - */ - public void markAllStale(boolean clearOverrides) { - ProxyFactoryRegistry fact = isRegistryCreated() ? getRegistry() : null; - processQueue(); - synchronized (this) { - Iterator i = fIntrospected.values().iterator(); - while (i.hasNext()) { - BeaninfoClassAdapter a = (BeaninfoClassAdapter) ((WeakValue) i.next()).get(); - if (a != null) - a.markStaleFactory(fact, clearOverrides); - } - fInfoSupplier.closeRegistry(); // Get rid of the registry now since it is not needed. This way we won't accidentily hold onto it when not needed. - } - } - /** - * Mark the introspection as stale for a source object. Also clear results if told to. - * @param sourceName Fully qualified source name, use type for reflection, i.e. "a.b.c.Class1$InnerClass" - * @param clearResults clear out the results. If false, they will be reused if possible on recycle. - */ - public void markStaleIntrospection(String sourceName, boolean clearResults) { - processQueue(); - synchronized (this) { - WeakValue ref = (WeakValue) fIntrospected.get(sourceName); - if (ref != null) { - BeaninfoClassAdapter a = (BeaninfoClassAdapter) ref.get(); - if (a != null) { - if (clearResults) - a.clearIntrospection(); - a.markStaleFactory(isRegistryCreated() ? getRegistry() : null); // Mark it stale with the current registry. - } - } - } - } - - public void markStaleIntrospectionPlusInner(String sourceName, boolean clearResults) { - processQueue(); - String sourceNameForInner = sourceName + '$'; - synchronized (this) { - Iterator itr = fIntrospected.entrySet().iterator(); - while (itr.hasNext()) { - Map.Entry entry = (Map.Entry) itr.next(); - String entryName = (String) entry.getKey(); - if (entryName.equals(sourceName) || entryName.startsWith(sourceNameForInner)) { - // It is the item or one of its inner classes. - WeakValue ref = (WeakValue) entry.getValue(); - BeaninfoClassAdapter a = (BeaninfoClassAdapter) ref.get(); - if (a != null) { - if (clearResults) - a.clearIntrospection(); - a.markStaleFactory(isRegistryCreated() ? getRegistry() : null); // Mark it stale with the current registry. - } - } - } - } - } - - /** - * Register an adapter for introspection. - * @param sourceName Fully qualified source name, use type for reflection, i.e. "a.b.c.Class1$InnerClass" - * @param adapter The adapter to register - */ - public void registerIntrospection(String sourceName, BeaninfoClassAdapter adapter) { - // Create it as a weak reference so that it doesn't hold onto the adapter if it is ever removed - // and thrown away (or the MOF resource itself is thrown away). - processQueue(); - synchronized (this) { - fIntrospected.put(sourceName, new WeakValue(sourceName, adapter, fRefQ)); - } - } - - /** - * Remove adapter. This happens in the case that adapter is being removed and - * we want to remove it from our list. This is an internal API only for use by - * the adapter itself. - */ - public synchronized void removeAdapter(BeaninfoClassAdapter a) { - fIntrospected.remove(a.getJavaClass().getQualifiedNameForReflection()); - } - - private synchronized void processQueue() { - WeakValue wv; - while ((wv = (WeakValue) fRefQ.poll()) != null) { - fIntrospected.remove(wv.getKey()); - } - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoClassAdapter.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoClassAdapter.java deleted file mode 100644 index 6277c63a4..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoClassAdapter.java +++ /dev/null @@ -1,2678 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: BeaninfoClassAdapter.java,v $ - * $Revision: 1.53 $ $Date: 2006/05/23 15:43:06 $ - */ - -import java.io.FileNotFoundException; -import java.lang.ref.WeakReference; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.text.MessageFormat; -import java.util.*; -import java.util.logging.Level; -import java.util.regex.Pattern; - -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.*; -import org.eclipse.emf.common.notify.*; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.common.util.*; -import org.eclipse.emf.ecore.*; -import org.eclipse.emf.ecore.change.*; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.ESuperAdapter; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.*; -import org.eclipse.emf.ecore.xmi.PackageNotFoundException; -import org.eclipse.emf.ecore.xmi.XMIResource; - -import org.eclipse.jem.internal.beaninfo.*; -import org.eclipse.jem.internal.beaninfo.common.*; -import org.eclipse.jem.internal.beaninfo.core.*; -import org.eclipse.jem.internal.beaninfo.core.BeanInfoCacheController.ClassEntry; -import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter; -import org.eclipse.jem.internal.proxy.core.*; -import org.eclipse.jem.java.*; -import org.eclipse.jem.java.internal.impl.JavaClassImpl; -import org.eclipse.jem.util.TimerTests; -import org.eclipse.jem.util.logger.proxy.Logger; - -/** - * Beaninfo adapter for doing introspection on a Java Model class. - * <p> - * The first time a introspect request is made, it will use the ClassEntry from the cache controller to determine if it should load from the - * cache or do a complete introspection. After that it will always do a complete introspection when it is marked as needing introspection. - * This is because the cache is useless to us then. At that point in time we already know that we or one of our superclasses or one of - * outer classes has changed, thereby requiring us to reintrospect, the cache is invalid at that point. Also once we did an introspection we - * don't want to do a load from cache but instead do a merge because someone may of been holding onto the features and we don't want to - * throw them away unnecessarily. - * <p> - * TODO Need to re-look into this to see if we can do a merge with the cache file because if it was an external jar and it has now gone - * valid, why waste time reintrospecting. But this needs to be carefully thought about. - * <p> - * The resource change listener - * will automatically mark any subclasses (both the BeaninfoClassAdapter and the ClassEntry) as being stale for us. That way we don't need - * to waste time checking the ce and superclasses everytime. We will keep the ClassEntry around simply to make the marking of it as stale easier for the - * resource listener. Finding the ce everytime would be expensive. - * <p> - * This is the process for determining if introspection required: - * <ol> - * <li>If needsIntrospection flag is false, then do nothing. Doesn't need introspection. - * <li>If class is undefined, then just set up for an undefined class and return. (In this case the CE should be thrown away, it should of been deleted). - * <li>If never introspected (not RETRIEVED_FULL_DOCUMENT), get the CE, get the modification stamp and call isStaleStamp. This determines if this - * stamp or any super class stamp is stale wrt to current stamp. If it is not stale, then load from cache because the cache is good. - * <li>If no cache or cache is stale or has introspected once, then introspect and replace cache. - * </ol> - * - */ - -public class BeaninfoClassAdapter extends AdapterImpl implements IIntrospectionAdapter { - - public static final String REFLECT_PROPERTIES = "Reflect properties"; // Reflect properties in IDE //$NON-NLS-1$ - public static final String APPLY_EXTENSIONS = "Apply Overrides"; // Apply override files //$NON-NLS-1$ - public static final String REMOTE_INTROSPECT = "Remote Introspect"; // Introspect on remote //$NON-NLS-1$ - public static final String INTROSPECT = "Introspect"; // Straight introspection, whether load from cache or introspect. //$NON-NLS-1$ - public static final String LOAD_FROM_CACHE = "Load from Cache"; //$NON-NLS-1$ - - - public static BeaninfoClassAdapter getBeaninfoClassAdapter(EObject jc) { - return (BeaninfoClassAdapter) EcoreUtil.getExistingAdapter(jc, IIntrospectionAdapter.ADAPTER_KEY); - } - - /** - * Clear out the introspection because introspection is being closed or removed from the project. - * Don't want anything hanging around that we had done. - */ - public void clearIntrospection() { - // Clear out the beandecorator if implicitly created. - Iterator beanItr = getJavaClass().getEAnnotationsInternal().iterator(); - while (beanItr.hasNext()) { - EAnnotation dec = (EAnnotation) beanItr.next(); - if (dec instanceof BeanDecorator) { - BeanDecorator decor = (BeanDecorator) dec; - if (decor.getImplicitDecoratorFlag() == ImplicitItem.IMPLICIT_DECORATOR_LITERAL) { - beanItr.remove(); - ((InternalEObject) decor).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - } else { - BeanInfoDecoratorUtility.clear((BeanDecorator) dec); - } - break; - } - } - // Clear out the features that we implicitly created. - Iterator propItr = getJavaClass().getEStructuralFeaturesInternal().iterator(); - while (propItr.hasNext()) { - EStructuralFeature prop = (EStructuralFeature) propItr.next(); - Iterator pdItr = prop.getEAnnotations().iterator(); - while (pdItr.hasNext()) { - EAnnotation dec = (EAnnotation) pdItr.next(); - if (dec instanceof PropertyDecorator) { - PropertyDecorator pd = (PropertyDecorator) dec; - if (pd.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL) - BeanInfoDecoratorUtility.clear(pd); - else { - pdItr.remove(); // Remove it from the property. - ((InternalEObject) pd).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - } - if (pd.getImplicitDecoratorFlag() == ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL) { - propItr.remove(); // Remove the feature itself - ((InternalEObject) prop).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - } - break; - } - } - } - - // Clear out the operations that we implicitly created. - Iterator operItr = getJavaClass().getEOperationsInternal().iterator(); - while (operItr.hasNext()) { - EOperation oper = (EOperation) operItr.next(); - Iterator mdItr = oper.getEAnnotations().iterator(); - while (mdItr.hasNext()) { - EAnnotation dec = (EAnnotation) mdItr.next(); - if (dec instanceof MethodDecorator) { - MethodDecorator md = (MethodDecorator) dec; - if (md.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL) - BeanInfoDecoratorUtility.clear(md); - else { - mdItr.remove(); // Remove it from the operation. - ((InternalEObject) md).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - } - if (md.getImplicitDecoratorFlag() == ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL) { - operItr.remove(); // Remove the oepration itself - ((InternalEObject) oper).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - } - break; - } - } - - // Clear out the events that we implicitly created. - Iterator evtItr = getJavaClass().getEventsGen().iterator(); - while (evtItr.hasNext()) { - JavaEvent evt = (JavaEvent) evtItr.next(); - Iterator edItr = evt.getEAnnotations().iterator(); - while (edItr.hasNext()) { - EAnnotation dec = (EAnnotation) edItr.next(); - if (dec instanceof EventSetDecorator) { - EventSetDecorator ed = (EventSetDecorator) dec; - if (ed.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL) - BeanInfoDecoratorUtility.clear(ed); - else { - edItr.remove(); // Remove it from the event. - ((InternalEObject) ed).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - } - if (ed.getImplicitDecoratorFlag() == ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL) { - evtItr.remove(); // Remove the event itself - ((InternalEObject) evt).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - } - break; - } - } - } - } - - synchronized(this) { - needsIntrospection = true; - } - } - - private void clearAll() { - clearIntrospection(); // First get rid of the ones we did so that they are marked as proxies. - - // Clear out the annotations. - getJavaClass().getEAnnotationsInternal().clear(); - // Clear out the attributes. - getJavaClass().getEStructuralFeaturesInternal().clear(); - // Clear out the operations. - getJavaClass().getEOperationsInternal().clear(); - // Clear out the events. - getJavaClass().getEventsGen().clear(); - - retrievedExtensionDocument = NEVER_RETRIEVED_EXTENSION_DOCUMENT; // Since we cleared everything, go back to no doc applied. - } - - - /** - * @version 1.0 - * @author - */ - - // A URI that will never resolve. Used to mark an object as no longer valid. - protected static final URI BAD_URI = URI.createURI("baduri"); //$NON-NLS-1$ - - protected boolean needsIntrospection = true; - - protected BeanInfoCacheController.ClassEntry classEntry; - - protected boolean isIntrospecting; - - protected boolean isDoingAllProperties; - - protected boolean isDoingAllOperations; - - protected boolean isDoingAllEvents; - - protected final static int - NEVER_RETRIEVED_EXTENSION_DOCUMENT = 0, - RETRIEVED_ROOT_ONLY = 1, - RETRIEVED_FULL_DOCUMENT = 2, - CLEAR_EXTENSIONS = 3; - protected int retrievedExtensionDocument = NEVER_RETRIEVED_EXTENSION_DOCUMENT; - - protected BeaninfoAdapterFactory adapterFactory; - - private WeakReference staleFactory; // When reference not null, then this factory is a stale factory and - // a new one is needed when the factory returned == this one. - // It is a WeakRef so that if the factory goes away on its own - // that we don't hold onto it. - - // A temporary hashset of the local properties. Used when creating a new - // property to use the old one. It is cleared out at the end of attribute introspection. - // It is only built once during attribute introspection so that we have the snapshot - // of before the introspection (i.e. the ones that were specifically added by users - // and not through introspection). The ones that we are adding do not need to be checked - // against each other because there will not be conflicts. - // - // Also at the end, we will go through the properties and see if it exists in the fPropertiesMap and - // it is not the value Boolean.FALSE in the map, and the entry is implicitly created. This means this - // was an implicit entry from the previous introspection and was not re-created in this introspection. - private HashMap propertiesMap; - private List featuresRealList; // Temp pointer to the real list we are building. It is the true list in java class. - - // A temporary hashmap of the local operations. Used when creating a new - // operation to reuse the old one. It is cleared out at the end of operation introspection. - // It is only built once during operation introspection so that we have the snapshot - // of before the introspection. - private HashMap operationsMap; - private EList operationsRealList; // Temp pointer to the real list we are building. It is the true list in java class. - // A set of operations as we create them so that we which ones we added/kept and which are no longer in use and can be removed. - // If they aren't in this set at the end, then we know it should be removed if it is one we had created in the past. - private HashSet newoperations; - - // A temporary hashset of the local events. Used when creating a new - // event to use the old one. It is cleared out at the end of event introspection. - // It is only built once during event introspection so that we have the snapshot - // of before the introspection (i.e. the ones that were specifically added by users - // and not through introspection). The ones that we are adding do not need to be checked - // against each other because there will not be conflicts. - // - // Also at the end, we will go through the events and see if it exists in the fEventsMap and - // it is not the value Boolean.FALSE in the map, and the entry is implicitly created. This means this - // was an implicit entry from the previous introspection and was not re-created in this introspection. - private HashMap eventsMap; - private EList eventsRealList; // Temp pointer to the real list we are building. It is the true list in java class. - - private Boolean defaultBound; - // Whether this class is default bound or not (i.e. does this class implement add/remove property change listener. If null, then not yet queried. - - public BeaninfoClassAdapter(BeaninfoAdapterFactory factory) { - super(); - adapterFactory = factory; - } - - /* - * Answer whether this java class is still connected to a live resource. It happens during unloading - * that we are no longer connected to a resource (because the javapackage has already been processed and - * unloaded) or the resource is in the process of being unloaded, but the unloading process will still - * call accessors on this java class, which will come over here. In those cases we should treat as - * introspection completed without doing anything. - */ - protected boolean isResourceConnected() { - Resource res = getJavaClass().eResource(); - return res != null && res.isLoaded(); - } - - protected final ProxyFactoryRegistry getRegistry() { - ProxyFactoryRegistry factory = adapterFactory.getRegistry(); - if (staleFactory != null && factory == staleFactory.get()) { - // We need to recycle the factory. The returned factory is the same factory when it went stale. - factory = adapterFactory.recycleRegistry(); - } - staleFactory = null; // Whether we recycled or not, it is no longer stale. - return factory; - } - - /** - * Return whether this adapter has been marked as stale. Needed - * by the users so that they can recycle if necessary. - */ - public boolean isStale() { - return staleFactory != null; - } - - protected BeaninfoAdapterFactory getAdapterFactory() { - return adapterFactory; - } - - public boolean isAdapterForType(Object key) { - return IIntrospectionAdapter.ADAPTER_KEY.equals(key); - } - - /** - * This map is keyed by name. It is a snapshot of the properties at the - * time the introspection/reflection of properties was started. It is used - * for quick lookup. - * - * Once a property is used, the entry is replaced with a Boolean.FALSE. This - * is so we know which have already been used and at the end, which need - * to be deleted since they weren't used (i.e. the ones that aren't FALSE). - */ - protected HashMap getPropertiesMap() { - if (propertiesMap == null) { - List localFeatures = getJavaClass().getEStructuralFeaturesInternal(); - propertiesMap = new HashMap(localFeatures.size()); - Iterator itr = localFeatures.iterator(); - while (itr.hasNext()) { - EStructuralFeature feature = (EStructuralFeature) itr.next(); - propertiesMap.put(feature.getName(), feature); - } - } - return propertiesMap; - } - - /** - * Get it once so that we don't need to keep getting it over and over. - */ - protected List getFeaturesList() { - if (featuresRealList == null) - featuresRealList = getJavaClass().getEStructuralFeaturesInternal(); - return featuresRealList; - } - - /** - * The map is keyed by longName. If a Method is passed in, then the - * id of the method is used (this is in reflection), if an IBeanProxy - * is passed in, then an id is created and looked up (this is in introspection). - * The map is used for a quick lookup of behaviors at the time introspection - * of behaviors started. - */ - protected HashMap getOperationsMap() { - if (operationsMap == null) { - List locals = getJavaClass().getEOperationsInternal(); - int l = locals.size(); - operationsMap = new HashMap(l); - for (int i = 0; i < l; i++) { - EOperation op = (EOperation) locals.get(i); - operationsMap.put(formLongName(op), op); - } - } - return operationsMap; - } - - /** - * Get it once so that we don't need to keep getting it over and over. - */ - protected EList getOperationsList() { - if (operationsRealList == null) - operationsRealList = getJavaClass().getEOperationsInternal(); - return operationsRealList; - } - - /** - * The map is keyed by name. - * The map is used for a quick lookup of events at the time introspection - * of events started. - * - * Once an event is used, the entry is replaced with a Boolean.FALSE. This - * is so we know which have already been used and at the end, which need - * to be deleted since they weren't used (i.e. the ones that aren't FALSE). - */ - protected HashMap getEventsMap() { - if (eventsMap == null) { - List locals = getJavaClass().getEventsGen(); - eventsMap = new HashMap(locals.size()); - Iterator itr = locals.iterator(); - while (itr.hasNext()) { - JavaEvent event = (JavaEvent) itr.next(); - eventsMap.put(event.getName(), event); - } - } - return eventsMap; - } - - /** - * Get it once so that we don't need to keep getting it over and over. - */ - protected EList getEventsList() { - if (eventsRealList == null) - eventsRealList = getJavaClass().getEventsGen(); - return eventsRealList; - } - - public void introspectIfNecessary() { - introspectIfNecessary(false); - } - - protected void introspectIfNecessary(boolean doOperations) { - boolean doIntrospection = false; - synchronized (this) { - doIntrospection = needsIntrospection && !isIntrospecting; - if (doIntrospection) - isIntrospecting = true; - } - if (doIntrospection) { - boolean didIntrospection = false; - try { - introspect(doOperations); - didIntrospection = true; - } catch (Throwable e) { - BeaninfoPlugin.getPlugin().getLogger().log( - new Status( - IStatus.WARNING, - BeaninfoPlugin.getPlugin().getBundle().getSymbolicName(), - 0, - MessageFormat.format( - BeanInfoAdapterMessages.INTROSPECT_FAILED_EXC_, - new Object[] { getJavaClass().getJavaName(), ""}), //$NON-NLS-1$ - e)); - } finally { - synchronized (this) { - isIntrospecting = false; - needsIntrospection = !didIntrospection; - } - } - } - } - - /** - * Get the class entry. - * @return - * - * @since 1.1.0 - */ - public BeanInfoCacheController.ClassEntry getClassEntry() { - return classEntry; - } - - private boolean canUseCache() { - // We check our level, we assume not stale unless CE says stale. - synchronized (this) { - // We may already have a class entry due to a subclass doing a check, so if we do, we'll use it. Else we'll get the latest one. - if (classEntry == null) - classEntry = BeanInfoCacheController.INSTANCE.getClassEntry(getJavaClass()); - if (classEntry != null) { - // We have a cache to check. - long modStamp = classEntry.getModificationStamp(); - // A sanity check, if this was an old, but now deleted one we want to throw it away and get it again. It may now be valid. - if (modStamp == BeanInfoCacheController.ClassEntry.DELETED_MODIFICATION_STAMP) { - classEntry = BeanInfoCacheController.INSTANCE.getClassEntry(getJavaClass()); - if (classEntry != null) - modStamp = classEntry.getModificationStamp(); - } - if (modStamp == IResource.NULL_STAMP || modStamp == BeanInfoCacheController.ClassEntry.DELETED_MODIFICATION_STAMP) - return false; // We are stale. - } else - return false; // We don't have a cache entry to check against, which means are deleted, or never cached. - } - - // Now try the supers to see if we are out of date to them. - // Note: Only if this is an interface could there be more than one eSuperType. - List supers = getJavaClass().getESuperTypes(); - if (!supers.isEmpty()) { - BeaninfoClassAdapter bca = getBeaninfoClassAdapter((EObject) supers.get(0)); - ClassEntry superCE = bca.getClassEntry(); - // If super is defined and out of date don't use cache. If super is undefined and super modification stamp is not super_undefined, - // then that means it was defined at time of cache and now not defined, so don't use cache. - if (superCE != null) { - if (superCE.getModificationStamp() != classEntry.getSuperModificationStamp()) - return false; // Out-of-date wrt/super. - } else if (classEntry.getSuperModificationStamp() != ClassEntry.SUPER_UNDEFINED_MODIFICATION_STAMP) - return false; // was previously defined, and now undefined, so out of date. - String[] iNames = classEntry.getInterfaceNames(); - if (iNames != null) { - if (iNames.length != supers.size() - 1) - return false; // We have a different number of supers, so stale. - // Now the interfaces may not be in the same order, but there shouldn't be too many, so we'll use O(n2) lookup. We'll try starting at - // the same index just in case. That way if they are the same order it will be linear instead. Most likely will be same order. - long[] iStamp = classEntry.getInterfaceModificationStamps(); - for (int i = 1; i <= iNames.length; i++) { - JavaClass javaClass = (JavaClass) supers.get(i); - String intName = (javaClass).getQualifiedNameForReflection(); - // Find it in the names list. - int stop = i-1; - int indx = stop; // Start at the stop, when we hit it again we will be done. - boolean found = false; - do { - if (iNames[indx].equals(intName)) { - found = true; - break; - } - } while ((++indx)%iNames.length != stop); - if (!found) - return false; // Couldn't find it, so we are stale.] - - superCE = getBeaninfoClassAdapter(javaClass).getClassEntry(); - if (superCE != null) { - if (superCE.getModificationStamp() != iStamp[indx]) - return false; // Out-of-date wrt/interface. - } else if (iStamp[indx] != ClassEntry.SUPER_UNDEFINED_MODIFICATION_STAMP) - return false; // was previously defined, and now undefined, so out of date. - } - } - } - return true; // If we got here everything is ok. - } - - private boolean canUseOverrideCache() { - // We check our config stamp. - // TODO in future can we listen for config changes and mark classes stale if the config changes? - synchronized (this) { - // We may already have a class entry due to a subclass doing a check, so if we do, we'll use it. Else we'll get the latest one. - if (classEntry == null) - classEntry = BeanInfoCacheController.INSTANCE.getClassEntry(getJavaClass()); - if (classEntry != null) { - // We have a cache to check. - // A sanity check, if this was an old, but now deleted one we want to throw it away and get it again. It may now be valid. - if (classEntry.isDeleted()) { - classEntry = BeanInfoCacheController.INSTANCE.getClassEntry(getJavaClass()); - if (classEntry != null) - if (classEntry.isDeleted()) - return false; // We have been deleted. Probably shouldn't of gotton here in this case. - } - } else - return false; // We don't have a cache entry to check against, which means are deleted, or never cached. - return classEntry.getConfigurationModificationStamp() == Platform.getPlatformAdmin().getState(false).getTimeStamp(); - } - - } - - /** - * Check if the cache for this entry is stale compared to the modification stamp, or if the modification stamp itself is stale, meaning - * subclass was stale already. - * - * @param requestStamp the timestamp to compare against. - * @return <code>true</code> if we can use the incoming cache stamp. - * - * @since 1.1.0 - */ - protected boolean canUseCache(long requestStamp) { - long modStamp; - // Now get the current mod stamp for this class so we can compare it. - synchronized (this) { - // We may already have a class entry due to a subclass doing a check, so if we do, we'll use it. Else we'll get the latest one. - if (classEntry == null) - classEntry = BeanInfoCacheController.INSTANCE.getClassEntry(getJavaClass()); - if (classEntry != null) { - // We have a cache to check. - modStamp = classEntry.getModificationStamp(); - // A sanity check, if this was an old, but now deleted one we want to throw it away and get it again. It may now be valid. - if (modStamp == BeanInfoCacheController.ClassEntry.DELETED_MODIFICATION_STAMP) { - classEntry = BeanInfoCacheController.INSTANCE.getClassEntry(getJavaClass()); - if (classEntry != null) - modStamp = classEntry.getModificationStamp(); - } - if (modStamp == IResource.NULL_STAMP && modStamp == BeanInfoCacheController.ClassEntry.DELETED_MODIFICATION_STAMP) - return false; // Since we are stale, child asking question must also be stale and can't use the cache. - } else - return false; // We don't have a cache entry to check against, so child must be stale too. - } - // If the requested stamp is not the same as ours, then it is out of date (it couldn't be newer but it could be older). - return requestStamp == modStamp; - } - - /* - * This should only be called through introspectIfNecessary so that flags are set correctly. - */ - private void introspect(boolean doOperations) { - IBeanProxy beaninfo = null; - try { - if (isResourceConnected()) { - // See if are valid kind of class. - if (getJavaClass().getKind() == TypeKind.UNDEFINED_LITERAL) { - // Not valid, don't let any further introspection occur. - // Mark that we've done all introspections so as not to waste time until we get notified that it has been added - // back in. - synchronized(this) { - if (classEntry != null) { - classEntry.markDeleted(); // mark it deleted in case still sitting in cache (maybe because it was in an external jar, we can't know if deleted when jar changed). - classEntry = null; // Get rid of it since now deleted. - } - needsIntrospection = false; - } - - if (retrievedExtensionDocument == RETRIEVED_FULL_DOCUMENT || retrievedExtensionDocument == CLEAR_EXTENSIONS) { - // We've been defined at one point. Need to clear everything and step back - // to never retrieved so that we now get the root added in. If we had been - // previously defined, then we didn't have root. We will have to lose - // all other updates too. But they can come back when we're defined. - // Or we've been asked to clear all. - clearAll(); - retrievedExtensionDocument = NEVER_RETRIEVED_EXTENSION_DOCUMENT; - } - if (retrievedExtensionDocument == NEVER_RETRIEVED_EXTENSION_DOCUMENT) - applyExtensionDocument(true); // Add in Root stuff so that it will work correctly even though undefined. - } else { - // TODO For now cause recycle of vm if any super type is stale so that if registry is stale for the super type it will be - // recreated. This is needed because reflection requires superProperties, etc. and recreating the registry - // currently re-marks everyone as stale, including this subclass. This would mean that - // re-introspection would need to be done, even though we just did it. The stale registry business needs to be re-addressed so that it is - // a lot smarter. - List supers = getJavaClass().getEAllSuperTypes(); - for (int i = 0; i < supers.size(); i++) { - BeaninfoClassAdapter bca = (BeaninfoClassAdapter) EcoreUtil.getExistingAdapter((EObject) supers.get(i), - IIntrospectionAdapter.ADAPTER_KEY); - if (bca != null && bca.isStale()) - bca.getRegistry(); - } - // Now we need to force introspection, if needed, of all parents because we need them to be up-to-date for the - // class entry. - // TODO see if we can come up with a better way that we KNOW the CE is correct, even if any supers are stale. - supers = getJavaClass().getESuperTypes(); - for (int i = 0; i < supers.size(); i++) { - BeaninfoClassAdapter bca = (BeaninfoClassAdapter) EcoreUtil.getRegisteredAdapter((EObject) supers.get(i), - IIntrospectionAdapter.ADAPTER_KEY); - bca.introspectIfNecessary(); - } - - TimerTests.basicTest.startCumulativeStep(INTROSPECT); - if (retrievedExtensionDocument == RETRIEVED_ROOT_ONLY || retrievedExtensionDocument == CLEAR_EXTENSIONS) { - // We need to clear out EVERYTHING because we are coming from an undefined to a defined. - // Nothing previous is now valid. (Particularly the root stuff). - // Or we had a Clean requested and need to clear the extensions too. - clearAll(); - } - boolean firstTime = false; - if (retrievedExtensionDocument != RETRIEVED_FULL_DOCUMENT) { - firstTime = true; // If we need to apply the extension doc, then this is the first time. - applyExtensionDocument(false); // Apply the extension doc before we do anything. - } - - // Now check to see if we can use the cache. - boolean doIntrospection = true; - if (firstTime) { - // Check if we can use the cache. Use Max value so that first level test (ourself) will always pass and go on to the supers. - if (canUseCache()) { - TimerTests.basicTest.startCumulativeStep(LOAD_FROM_CACHE); - // We can use the cache. - Resource cres = BeanInfoCacheController.INSTANCE.getCache(getJavaClass(), classEntry, true); - if (cres != null) { - try { - // Got a cache to use, now apply it. - for (Iterator cds = cres.getContents().iterator(); cds.hasNext();) { - ChangeDescription cacheCD = (ChangeDescription) cds.next(); - cacheCD.apply(); - } - // We need to walk through and create the appropriate ID's for events/actions/properties because by - // default from the change descriptions these don't get reflected back. And if some one doesn't - // use an ID to get them, they won't have an id set. - doIDs(); - doIntrospection = false; - } catch (RuntimeException e) { - BeaninfoPlugin.getPlugin().getLogger().log( - MessageFormat.format( - BeanInfoAdapterMessages.INTROSPECT_FAILED_EXC_, - new Object[] { getJavaClass().getJavaName(), ""}), //$NON-NLS-1$ - Level.WARNING); - BeaninfoPlugin.getPlugin().getLogger().log(e); - } finally { - // Remove the cres since it is now invalid. The applies cause them to be invalid. - cres.getResourceSet().getResources().remove(cres); - if (doIntrospection) { - // Apply had failed. We don't know how far it went. We need to wipe out and reget EVERYTHING. - clearAll(); - applyExtensionDocument(false); // Re-apply the extension doc before we do anything else. - } - } - } - TimerTests.basicTest.stopCumulativeStep(LOAD_FROM_CACHE); - } - } - - if (doIntrospection) { - // Finally we can get to handling ourselves. - TimerTests.basicTest.startCumulativeStep(REMOTE_INTROSPECT); - BeanDecorator decor = Utilities.getBeanDecorator(getJavaClass()); - if (decor == null) { - decor = BeaninfoFactory.eINSTANCE.createBeanDecorator(); - decor.setImplicitDecoratorFlag(ImplicitItem.IMPLICIT_DECORATOR_LITERAL); - getJavaClass().getEAnnotations().add(decor); - } else - BeanInfoDecoratorUtility.clear(decor); // Clear out previous results. - - boolean doReflection = true; - if (doOperations) - newoperations = new HashSet(50); - if (decor.isDoBeaninfo()) { - int doFlags = 0; - if (decor == null || decor.isMergeIntrospection()) - doFlags |= IBeanInfoIntrospectionConstants.DO_BEAN_DECOR; - if (decor == null || decor.isIntrospectEvents()) - doFlags |= IBeanInfoIntrospectionConstants.DO_EVENTS; - if (decor == null || decor.isIntrospectProperties()) - doFlags |= IBeanInfoIntrospectionConstants.DO_PROPERTIES; - if (doOperations && (decor == null || decor.isIntrospectMethods())) - doFlags |= IBeanInfoIntrospectionConstants.DO_METHODS; - - if (doFlags != 0) { - // There was something remote to do. - IBeanTypeProxy targetType = null; - ProxyFactoryRegistry registry = getRegistry(); - if (registry != null && registry.isValid()) - targetType = registry.getBeanTypeProxyFactory().getBeanTypeProxy(getJavaClass().getQualifiedNameForReflection()); - if (targetType != null) { - if (targetType.getInitializationError() == null) { - // If an exception is thrown, treat this as no proxy, however log it because we - // shouldn't have exceptions during introspection, but if we do it should be logged - // so it can be corrected. - try { - BeaninfoProxyConstants proxyConstants = getProxyConstants(); - if (proxyConstants != null) { - beaninfo = proxyConstants.getIntrospectProxy().invoke( - null, - new IBeanProxy[] { targetType, - getRegistry().getBeanProxyFactory().createBeanProxyWith(false), - getRegistry().getBeanProxyFactory().createBeanProxyWith(doFlags)}); - } - } catch (ThrowableProxy e) { - BeaninfoPlugin.getPlugin().getLogger().log( - new Status(IStatus.WARNING, BeaninfoPlugin.getPlugin().getBundle().getSymbolicName(), 0, - MessageFormat.format(BeanInfoAdapterMessages.INTROSPECT_FAILED_EXC_, new Object[] { //$NON-NLS-1$ - getJavaClass().getJavaName(), ""}), //$NON-NLS-1$ - e)); - } - } else { - // The class itself couldn't be initialized. Just log it, but treat as no proxy. - BeaninfoPlugin.getPlugin().getLogger() - .log( - new Status(IStatus.WARNING, BeaninfoPlugin.getPlugin().getBundle().getSymbolicName(), 0, - MessageFormat.format(BeanInfoAdapterMessages.INTROSPECT_FAILED_EXC_, new Object[] { //$NON-NLS-1$ - getJavaClass().getJavaName(), targetType.getInitializationError()}), null)); - } - } else { - // The class itself could not be found. Just log it, but treat as no proxy. - BeaninfoPlugin.getPlugin().getLogger().log( - new Status(IStatus.INFO, BeaninfoPlugin.getPlugin().getBundle().getSymbolicName(), 0, MessageFormat.format( - BeanInfoAdapterMessages.INTROSPECT_FAILED_EXC_, new Object[] { - getJavaClass().getJavaName(), - BeanInfoAdapterMessages.BeaninfoClassAdapter_ClassNotFound}), - null)); - } - - if (beaninfo != null) { - doReflection = false; // We have a beaninfo, so we are doing introspection. - final BeanDecorator bdecor = decor; - // We have a beaninfo to process. - BeanInfoDecoratorUtility.introspect(beaninfo, new BeanInfoDecoratorUtility.IntrospectCallBack() { - - /*; (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.adapters.BeanInfoDecoratorUtility.IntrospectCallBack#process(org.eclipse.jem.internal.beaninfo.common.BeanRecord) - */ - public BeanDecorator process(BeanRecord record) { - return bdecor; - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.adapters.BeanInfoDecoratorUtility.IntrospectCallBack#process(org.eclipse.jem.internal.beaninfo.common.PropertyRecord) - */ - public PropertyDecorator process(PropertyRecord record) { - return calculateProperty(record, false); - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.adapters.BeanInfoDecoratorUtility.IntrospectCallBack#process(org.eclipse.jem.internal.beaninfo.common.IndexedPropertyRecord) - */ - public PropertyDecorator process(IndexedPropertyRecord record) { - return calculateProperty(record, true); - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.adapters.BeanInfoDecoratorUtility.IntrospectCallBack#process(org.eclipse.jem.internal.beaninfo.common.MethodRecord) - */ - public MethodDecorator process(MethodRecord record) { - return calculateOperation(record); - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.adapters.BeanInfoDecoratorUtility.IntrospectCallBack#process(org.eclipse.jem.internal.beaninfo.common.EventSetRecord) - */ - public EventSetDecorator process(EventSetRecord record) { - return calculateEvent(record); - } - }); - } - } - } - - if (doReflection) { - // Need to do reflection stuff. - if (decor.isIntrospectProperties()) - reflectProperties(); - if (doOperations && decor.isIntrospectMethods()) - reflectOperations(); - if (decor.isIntrospectEvents()) - reflectEvents(); - } - ChangeDescription cd = ChangeFactory.eINSTANCE.createChangeDescription(); - BeanInfoDecoratorUtility.buildChange(cd, decor); - finalizeProperties(cd); - if (doOperations) - finalizeOperations(cd); - finalizeEvents(cd); - - classEntry = BeanInfoCacheController.INSTANCE.newCache(getJavaClass(), cd, doOperations ? BeanInfoCacheController.REFLECTION_OPERATIONS_CACHE : BeanInfoCacheController.REFLECTION_CACHE); - TimerTests.basicTest.stopCumulativeStep(REMOTE_INTROSPECT); - } - TimerTests.basicTest.stopCumulativeStep(INTROSPECT); - } - getAdapterFactory().registerIntrospection(getJavaClass().getQualifiedNameForReflection(), this); - } - } finally { - if (beaninfo != null) { - beaninfo.getProxyFactoryRegistry().releaseProxy(beaninfo); // Dispose of the beaninfo since we now have everything. - } - eventsMap = null; // Clear out the temp lists. - eventsRealList = null; - operationsMap = null; // Clear out the temp lists. - operationsRealList = null; - newoperations = null; - propertiesMap = null; // Get rid of accumulated map. - featuresRealList = null; // Release the real list. - } - } - - private void doIDs() { - // Do properties. - if (getJavaClass().eIsSet(EcorePackage.eINSTANCE.getEClass_EStructuralFeatures())) { - List features = getFeaturesList(); - int len = features.size(); - for (int i = 0; i < len; i++) { - EStructuralFeature f = (EStructuralFeature) features.get(i); - PropertyDecorator pd = Utilities.getPropertyDecorator(f); - if (pd == null || !pd.isMergeIntrospection()) - continue; // Not a property for us to give an ID to. - setPropertyID(f.getName(), f); - } - } - - // Do events. - if (getJavaClass().eIsSet(JavaRefPackage.eINSTANCE.getJavaClass_Events())) { - List events = getEventsList(); - int len = events.size(); - for (int i = 0; i < len; i++) { - BeanEvent e = (BeanEvent) events.get(i); - EventSetDecorator ed = Utilities.getEventSetDecorator(e); - if (ed == null || !ed.isMergeIntrospection()) - continue; // Not an event for us to give an ID to. - setEventID(e.getName(), e); - } - } - - // Do Operations. - if (getJavaClass().eIsSet(EcorePackage.eINSTANCE.getEClass_EOperations())) { - List ops = getOperationsList(); - int len = ops.size(); - for (int i = 0; i < len; i++) { - EOperation o = (EOperation) ops.get(i); - MethodDecorator md = Utilities.getMethodDecorator(o); - if (md == null || !md.isMergeIntrospection()) - continue; // Not an event for us to give an ID to. - setMethodID(o.getName(), o); - } - } - } - - private static final String ROOT_OVERRIDE = BeaninfoPlugin.ROOT+'.'+BeaninfoPlugin.OVERRIDE_EXTENSION; //$NON-NLS-1$ - - protected void applyExtensionDocument(boolean rootOnly) { - try { - TimerTests.basicTest.startCumulativeStep(APPLY_EXTENSIONS); - boolean canUseCache = !rootOnly && canUseOverrideCache(); - boolean alreadyRetrievedRoot = retrievedExtensionDocument == RETRIEVED_ROOT_ONLY; - retrievedExtensionDocument = rootOnly ? RETRIEVED_ROOT_ONLY : RETRIEVED_FULL_DOCUMENT; - JavaClass jc = getJavaClass(); - Resource mergeIntoResource = jc.eResource(); - ResourceSet rset = mergeIntoResource.getResourceSet(); - String className = jc.getName(); - if (canUseCache) { - // We can use the cache, see if we actually have one. - if (getClassEntry().overrideCacheExists()) { - // Get the cache and apply it before anything else. - Resource cacheRes = BeanInfoCacheController.INSTANCE.getCache(jc, getClassEntry(), false); - if (cacheRes != null) { - try { - new ExtensionDocApplies(null, rset, jc, null).run(cacheRes); - } catch (WrappedException e) { - BeaninfoPlugin.getPlugin().getLogger().log( - new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, - "Error processing file\"" + cacheRes.getURI() + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$ - } finally { - cacheRes.getResourceSet().getResources().remove(cacheRes); // We don't need it around once we do the merge. Normal merge would of gotton rid of it, but in case of error we do it here. - } - } else - canUseCache = false; // Need to rebuild the cache. - } - } - List overrideCache = null; - if (!alreadyRetrievedRoot && (rootOnly || jc.getSupertype() == null)) { - // It is a root class. Need to merge in root stuff. - if (!canUseCache) { - overrideCache = createOverrideCache(overrideCache, getAdapterFactory().getProject(), BeaninfoPlugin.ROOT, ROOT_OVERRIDE, rset, jc); - } - applyExtensionDocTo(rset, jc, ROOT_OVERRIDE, BeaninfoPlugin.ROOT, BeaninfoPlugin.ROOT); - if (rootOnly) - return; - } - - String baseOverridefile = className + '.' + BeaninfoPlugin.OVERRIDE_EXTENSION; // getName() returns inner classes with "$" notation, which is good. //$NON-NLS-1$ - String packageName = jc.getJavaPackage().getPackageName(); - if (!canUseCache) { - overrideCache = createOverrideCache(overrideCache, getAdapterFactory().getProject(), packageName, baseOverridefile, rset, jc); - } - applyExtensionDocTo(rset, jc, baseOverridefile, packageName, className); - - if (!canUseCache) { - // We have an override cache to store. If the cache is null, this will flag that there is no override cache for the current configuration. That way we won't bother trying again until config changes. - BeanInfoCacheController.INSTANCE.newCache(jc, overrideCache, BeanInfoCacheController.OVERRIDES_CACHE); - } - - } finally { - TimerTests.basicTest.stopCumulativeStep(APPLY_EXTENSIONS); - } - } - - /* - * Build up the fixed overrides into the cache, and apply as we gather them. - * Return the cache or null if the cache is empty at the end. - */ - private List createOverrideCache(List cache, IProject project, String packageName, String overrideFile, ResourceSet rset, JavaClass mergeIntoJavaClass) { - // Now get the overrides paths - String[] paths = BeaninfoPlugin.getPlugin().getOverridePaths(project, packageName); - if (paths.length == 0) - return cache; - - // Now apply the overrides. - if (cache == null) - cache = new ArrayList(); - BeaninfoPlugin.IOverrideRunnable runnable = new ExtensionDocApplies(overrideFile, rset, mergeIntoJavaClass, cache); - for (int i = 0; i < paths.length; i++) { - runnable.run(paths[i]); - } - return !cache.isEmpty() ? cache : null; - } - - private static final URI ROOT_URI = URI.createGenericURI(BeaninfoPlugin.ROOT_SCHEMA, BeaninfoPlugin.ROOT_OPAQUE, null); - private static final String ROOT_FRAGMENT = "//@root"; //$NON-NLS-1$ - private static final Pattern FRAGMENT_SPLITTER = Pattern.compile("/"); //$NON-NLS-1$ - - // TODO This is to make event util optional. This should be removed entirely with 1.3 when event util goes away. - private static boolean RETRIEVED_EVENT_METHODS; - private static Object EVENT_FACTORY_INSTANCE; - private static java.lang.reflect.Method CREATE_EVENT_UTIL_METHOD; - private static java.lang.reflect.Method DO_FORWARD_EVENTS_METHOD; - - private static boolean isEventUtilLoaded() { - if (!RETRIEVED_EVENT_METHODS) { - try { - Class eventFactoryClass = Class.forName("com.ibm.etools.emf.event.EventFactory"); - Field eventFactoryField = eventFactoryClass.getField("eINSTANCE"); - Object eventFactoryInstance = eventFactoryField.get(null); - java.lang.reflect.Method createEventMethod = eventFactoryClass.getMethod("createEventUtil", new Class[] {Notifier.class, ResourceSet.class}); - Class eventUtilClass = createEventMethod.getReturnType(); - java.lang.reflect.Method doForwardEventsMethod = eventUtilClass.getMethod("doForwardEvents", new Class[] {List.class}); - EVENT_FACTORY_INSTANCE = eventFactoryInstance; - CREATE_EVENT_UTIL_METHOD = createEventMethod; - DO_FORWARD_EVENTS_METHOD = doForwardEventsMethod; - } catch (ClassNotFoundException e) { - } catch (SecurityException e) { - } catch (NoSuchFieldException e) { - } catch (IllegalArgumentException e) { - } catch (IllegalAccessException e) { - } catch (NoSuchMethodException e) { - } - RETRIEVED_EVENT_METHODS = true; - } - return EVENT_FACTORY_INSTANCE != null; - - } - private class ExtensionDocApplies implements BeaninfoPlugin.IOverrideRunnable { - - private final String overrideFile; - private final ResourceSet rset; - private final JavaClass mergeIntoJavaClass; - private final List overridesCache; - - public ExtensionDocApplies(String overrideFile, ResourceSet rset, JavaClass mergeIntoJavaClass, List overridesCache) { - this.overrideFile = overrideFile; - this.rset = rset; - this.mergeIntoJavaClass = mergeIntoJavaClass; - this.overridesCache = overridesCache; - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IOverrideRunnable#run(java.lang.String) - */ - public void run(String overridePath) { - Resource overrideRes = null; - URI uri = URI.createURI(overridePath+overrideFile); - try { - overrideRes = rset.getResource(uri, true); - run(overrideRes); - } catch (WrappedException e) { - // FileNotFoundException is ok - if (!(e.exception() instanceof FileNotFoundException)) { - if (e.exception() instanceof CoreException - && ((CoreException) e.exception()).getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) { - // This is ok. Means uri_mapping not set so couldn't find in Workspace, also ok. - } else if (e.exception() instanceof PackageNotFoundException && ((PackageNotFoundException) e.exception()).getMessage().indexOf("event.xmi") != -1) { - if (!RETRIEVED_EVENT_METHODS) { - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "An old style override file using the com.ibm.event format was found, but com.ibm.event was not installed. The first such file is "+uri, null)); //$NON-NLS-1$ - RETRIEVED_EVENT_METHODS = true; // Mark we've retrieved. This is ok because if event is missing here, it will be missing for retrieve too. - } - } else { - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + uri + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - // In case it happened after creating resource but during load. Need to get rid of it in the finally. - overrideRes = rset.getResource(uri, false); - } catch (Exception e) { - // Couldn't load it for some reason. - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + uri + "\"", e)); //$NON-NLS-1$ //$NON-NLS-2$ - overrideRes = rset.getResource(uri, false); // In case it happened after creating resource but during load so that we can get rid of it. - } finally { - if (overrideRes != null) - rset.getResources().remove(overrideRes); // We don't need it around once we do the merge. Normal merge would of gotton rid of it, but in case of error we do it here. - } - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IOverrideRunnable#run(org.eclipse.emf.ecore.resource.Resource) - */ - public void run(Resource overrideRes) { - try { - EList contents = overrideRes.getContents(); - if (overridesCache != null) { - // TODO Until https://bugs.eclipse.org/bugs/show_bug.cgi?id=109169 is fixed, we need our own Copier. - EcoreUtil.Copier copier = new EcoreUtil.Copier() { - - private static final long serialVersionUID = 1L; - - protected void copyReference(EReference eReference, EObject eObject, EObject copyEObject) { - if (eObject.eIsSet(eReference)) { - if (eReference.isMany()) { - List source = (List) eObject.eGet(eReference); - InternalEList target = (InternalEList) copyEObject.eGet(getTarget(eReference)); - if (source.isEmpty()) { - target.clear(); - } else { - boolean isBidirectional = eReference.getEOpposite() != null; - int index = 0; - for (Iterator k = ((EcoreEList) source).basicIterator(); k.hasNext();) { - Object referencedEObject = k.next(); - Object copyReferencedEObject = get(referencedEObject); - if (copyReferencedEObject == null) { - if (!isBidirectional) { - target.addUnique(index, referencedEObject); - ++index; - } - } else { - if (isBidirectional) { - int position = target.indexOf(copyReferencedEObject); - if (position == -1) { - target.addUnique(index, copyReferencedEObject); - } else if (index != position) { - target.move(index, copyReferencedEObject); - } - } else { - target.addUnique(index, copyReferencedEObject); - } - ++index; - } - } - } - } else { - Object referencedEObject = eObject.eGet(eReference, false); - if (referencedEObject == null) { - copyEObject.eSet(getTarget(eReference), null); - } else { - Object copyReferencedEObject = get(referencedEObject); - if (copyReferencedEObject == null) { - if (eReference.getEOpposite() == null) { - copyEObject.eSet(getTarget(eReference), referencedEObject); - } - } else { - copyEObject.eSet(getTarget(eReference), copyReferencedEObject); - } - } - } - } - } - }; - - // We fixup the CD first so that when serialized it will be to the correct object already. Simplifies apply later. - Iterator itr = contents.iterator(); - while (itr.hasNext()) { - Object o = itr.next(); - if (o instanceof ChangeDescription) { - fixupCD((ChangeDescription) o); - } - } - - Collection result = copier.copyAll(contents); - copier.copyReferences(); - overridesCache.addAll(result); // Make a copy for the override cache to be used next time needed. - } - - if (!contents.isEmpty()) { - // TODO It could be either the old event model or the new ChangeDescription. When we remove Event Model we need to remove - // the test. This could be the override cache too, so we must apply the contents in the order they are in the resource. - try { - List events = null; - Object[] eventsParm = null; - Iterator itr = contents.iterator(); - while (itr.hasNext()) { - Object o = itr.next(); - if (o instanceof ChangeDescription) { - ChangeDescription cd = (ChangeDescription) o; - fixupCD(cd); - cd.apply(); - } else if (isEventUtilLoaded()) { - if (events == null) { - events = new ArrayList(1); - events.add(null); // EventUtil needs a list, but we will be calling one by one. So just reuse this list. - eventsParm = new Object[] { events}; - } - // It is the old format. - events.set(0, o); - try { - Object util = CREATE_EVENT_UTIL_METHOD.invoke(EVENT_FACTORY_INSTANCE, new Object[] {mergeIntoJavaClass, rset}); - DO_FORWARD_EVENTS_METHOD.invoke(util, eventsParm); - } catch (IllegalArgumentException e) { - } catch (IllegalAccessException e) { - } catch (InvocationTargetException e) { - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error processing file\"" + overrideRes.getURI() + "\"", e.getCause())); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - } - } finally { - uninstallRootResource(); - } - } - } catch (WrappedException e) { - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error processing file\"" + overrideRes.getURI() + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /* - * fix it up so that references to "X:ROOT#//@root" are replaced with reference to the javaclass. - */ - private void fixupCD(ChangeDescription cd) { - EStructuralFeature keyFeature = ChangePackage.eINSTANCE.getEObjectToChangesMapEntry_Key(); - Iterator changes = cd.getObjectChanges().iterator(); - while (changes.hasNext()) { - EObject entry = (EObject) changes.next(); - EObject key = (EObject) entry.eGet(keyFeature, false); - if (key != null && key.eIsProxy()) { - // See if it is our special. - URI uri = ((InternalEObject) key).eProxyURI(); - String rootFrag = uri.fragment(); - if (BeaninfoPlugin.ROOT_SCHEMA.equals(uri.scheme()) && BeaninfoPlugin.ROOT_OPAQUE.equals(uri.opaquePart()) && (rootFrag != null && rootFrag.startsWith(ROOT_FRAGMENT))) { - // It is one of ours. Get the fragment, remove the leading //root and append to the end of the - // uri from the java class itself. - if (rootFrag.length() <= ROOT_FRAGMENT.length()) - entry.eSet(keyFeature, mergeIntoJavaClass); // No sub-path, so just the java class. - else { - // There is a sub-path below the java class that is needed. Need to walk down the path. - String[] path = FRAGMENT_SPLITTER.split(rootFrag.substring(ROOT_FRAGMENT.length()+1)); - InternalEObject newKey = (InternalEObject) mergeIntoJavaClass; - for (int i = 0; newKey != null && i < path.length; i++) { - newKey = (InternalEObject) newKey.eObjectForURIFragmentSegment(path[i]); - } - if (newKey != null) - entry.eSet(keyFeature, newKey); - } - } - } - } - } - - /* - * Uninstall the fake root resource. This must be called after installRootResource has been called. So must use try/finally. - * - * - * @since 1.2.0 - */ - private void uninstallRootResource() { - Resource root = rset.getResource(ROOT_URI, false); - if (root != null) - rset.getResources().remove(root); - } - } - protected void applyExtensionDocTo(ResourceSet rset, JavaClass mergeIntoJavaClass, String overrideFile, String packageName, String className) { - BeaninfoPlugin.getPlugin().applyOverrides(getAdapterFactory().getProject(), packageName, className, mergeIntoJavaClass, rset, - new ExtensionDocApplies(overrideFile, rset, mergeIntoJavaClass, null)); - } - - /** - * Return the target as a JavaClass - */ - protected JavaClassImpl getJavaClass() { - return (JavaClassImpl) getTarget(); - } - - /** - * Answer the beaninfo constants record - */ - protected BeaninfoProxyConstants getProxyConstants() { - return BeaninfoProxyConstants.getConstants(getRegistry()); - } - - /** - * @see org.eclipse.jem.java.beaninfo.IIntrospectionAdapter#getEStructuralFeatures() - */ - public EList getEStructuralFeatures() { - introspectIfNecessary(); - return getJavaClass().getEStructuralFeaturesInternal(); - } - - /** - * @see org.eclipse.jem.java.beaninfo.IIntrospectionAdapter#getAllProperties() - */ - public EList getAllProperties() { - return allProperties(); - } - - /** - * @see org.eclipse.jem.java.beaninfo.IIntrospectionAdapter#getEOperations() - */ - public EList getEOperations() { - if (getClassEntry() != null && getClassEntry().isOperationsStored()) - introspectIfNecessary(); // Already stored, just do if necessary. - else { - synchronized (this) { - needsIntrospection = true; // Force reintrospection because we either aren't storing operations, or have never loaded. - } - introspectIfNecessary(true); // But force the operations now. - } - return getJavaClass().getEOperationsInternal(); - } - - /** - * @see org.eclipse.jem.java.beaninfo.IIntrospectionAdapter#getEAllOperations() - */ - public BasicEList getEAllOperations() { - return allOperations(); - } - - /** - * @see org.eclipse.jem.java.beaninfo.IIntrospectionAdapter#getEvents() - */ - public EList getEvents() { - introspectIfNecessary(); - return getJavaClass().getEventsGen(); - } - - /** - * @see org.eclipse.jem.java.beaninfo.IIntrospectionAdapter#getAllEvents() - */ - public EList getAllEvents() { - return allEvents(); - } - - private void finalizeProperties(ChangeDescription cd) { - // Now go through the list and remove those that should be removed, and set the etype for those that don't have it set. - Map oldLocals = getPropertiesMap(); - Iterator itr = getFeaturesList().iterator(); - while (itr.hasNext()) { - EStructuralFeature a = (EStructuralFeature) itr.next(); - PropertyDecorator p = Utilities.getPropertyDecorator(a); - Object aOld = oldLocals.get(a.getName()); - if (aOld != null && aOld != Boolean.FALSE) { - // A candidate for removal. It was in the old list and it was not processed. - if (p != null) { - ImplicitItem implicit = p.getImplicitDecoratorFlag(); - if (implicit != ImplicitItem.NOT_IMPLICIT_LITERAL) { - p.setEModelElement(null); // Remove from the feature; - ((InternalEObject) p).eSetProxyURI(BAD_URI); - // Mark it as bad proxy so we know it is no longer any use. - p = null; - if (implicit == ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL) { - itr.remove(); // Remove it, this was implicitly created and not processed this time. - ((InternalEObject) a).eSetProxyURI(BAD_URI); // Mark it as bad proxy so we know it is no longer any use. - continue; - } - // Need to go on because we need to check the eType to make sure it is set. At this point we have no decorator but we still have a feature. - } - } - } - - // [79083] Also check for eType not set, and if it is, set it to EObject type. That way it will be valid, but not valid as - // a bean setting. - if (a.getEType() == null) { - // Set it to EObject type. If it becomes valid later (through the class being changed), then the introspect/reflect - // will set it to the correct type. - a.setEType(EcorePackage.eINSTANCE.getEObject()); - Logger logger = BeaninfoPlugin.getPlugin().getLogger(); - if (logger.isLoggingLevel(Level.WARNING)) - logger.logWarning("Feature \""+getJavaClass().getQualifiedName()+"->"+a.getName()+"\" did not have a type set. Typically due to override file creating feature but property not found on introspection/reflection."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - - if (p != null && cd != null) { - // Now create the appropriate cache entry for this property. - BeanInfoDecoratorUtility.buildChange(cd, p); - } - } - } - - /** - * merge all the Properties (i.e. supertypes) (properties) - */ - protected EList allProperties() { - - EList jcAllProperties = getJavaClass().getAllPropertiesGen(); - BeaninfoSuperAdapter superAdapter = - (BeaninfoSuperAdapter) EcoreUtil.getRegisteredAdapter(getJavaClass(), BeaninfoSuperAdapter.class); - if (jcAllProperties != null) { - // See if new one required. - if (superAdapter == null || !superAdapter.isAllPropertiesCollectionModified()) - return jcAllProperties; - // Can't get superadapter, so must not be attached to a resource, so return current list. Or no change required. - } - - UniqueEList.FastCompare allProperties = new UniqueEList.FastCompare() { - /** - * Comment for <code>serialVersionUID</code> - * - * @since 1.1.0 - */ - private static final long serialVersionUID = 1L; - - protected Object[] newData(int capacity) { - return new EStructuralFeature[capacity]; - } - }; - boolean doAllProperties = false; - synchronized(this) { - // If we are introspecting, don't do all properties because it is an invalid list. Just return empty without reseting the all modified flag. - doAllProperties = !isDoingAllProperties && !isIntrospecting && isResourceConnected(); - if (doAllProperties) - isDoingAllProperties = true; - } - if (doAllProperties) { - try { - EList localProperties = getJavaClass().getProperties(); - // Kludge: BeanInfo spec doesn't address Interfaces, but some people want to use them. - // Interfaces can have multiple extends, while the Introspector ignores these for reflection, - // the truth is most people want these. So we will add them in. But since there could be more than one it - // gets confusing. We need to look for dups from the super types and still keep order. - // - // Supertypes will never be more than one entry for classes, it is possible to be 0, 1, 2 or more for interfaces. - List superTypes = getJavaClass().getESuperTypes(); - if (!superTypes.isEmpty()) { - // Now we need to merge in the supers. - BeanDecorator bd = Utilities.getBeanDecorator(getJavaClass()); - // If there is only one supertype, we can add to the actual events, else we will use the linked hashset so that - // we don't add possible duplicates (e.g. IA extends IB,IC and IB extends IC. In this case there would be dups - // because IB would contribute IC's too). - Collection workingAllProperties = superTypes.size() == 1 ? (Collection) allProperties : new LinkedHashSet(); - // We will now merge as directed. - boolean mergeAll = bd == null || bd.isMergeSuperProperties(); - if (!mergeAll) { - // we don't to want to merge super properties, but we still need super non-properties or explict ones. - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List supers = ((JavaClass) superTypes.get(i)).getAllProperties(); - int len = supers.size(); - for (int i1 = 0; i1 < len; i1++) { - EStructuralFeature p = (EStructuralFeature) supers.get(i1); - PropertyDecorator pd = Utilities.getPropertyDecorator(p); - if ( pd == null || (pd.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL && !pd.isMergeIntrospection())) - workingAllProperties.add(p); - } - } - } else { - // We want to merge all. - // BeanInfo could of given us the not merge list. If the list is empty, then we accept all. - if (bd != null && bd.eIsSet(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedPropertyNames())) { - // We were given a list of names. - // Get the names into a set to create a quick lookup. - HashSet superSet = new HashSet(bd.getNotInheritedPropertyNames()); - - // Now walk and add in non-bean properties (and bean properties that were explicitly added and not mergeable (i.e. didn't come thru beaninfo)) - // and add those not specifically called out by BeanInfo in the not inherited list. - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List supers = ((JavaClass) superTypes.get(i)).getAllProperties(); - int len = supers.size(); - for (int i1 = 0; i1 < len; i1++) { - EStructuralFeature p = (EStructuralFeature) supers.get(i1); - PropertyDecorator pd = Utilities.getPropertyDecorator(p); - if (pd == null || (pd.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL && !pd.isMergeIntrospection()) || !superSet.contains(pd.getName())) - workingAllProperties.add(p); - } - } - } else { - // BeanInfo (or reflection always does this) called out that all super properties are good - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - workingAllProperties.addAll(((JavaClass) superTypes.get(i)).getAllProperties()); - } - } - } - if (workingAllProperties != allProperties) - allProperties.addAll(workingAllProperties); // Now copy over the ordered super properties. - } - allProperties.addAll(localProperties); - superAdapter.setAllPropertiesCollectionModified(false); // Now built, so reset to not changed. - } finally { - synchronized(this) { - isDoingAllProperties = false; - } - } - } - - if (!allProperties.isEmpty()) { - allProperties.shrink(); - return new EcoreEList.UnmodifiableEList.FastCompare( - getJavaClass(), - null, - allProperties.size(), - allProperties.data()); - } else - return ECollections.EMPTY_ELIST; - } - - /* - * Fill in the property using the prop record. If this one that should have merging done, then - * return the PropertyDecorator so that it can have the PropertyRecord merged into it. Else - * return null if no merging. - */ - protected PropertyDecorator calculateProperty(PropertyRecord pr, boolean indexed) { - // If this is an indexed property, then a few fields will not be set in here, but - // will instead be set by the calculateIndexedProperty, which will be called. - JavaHelpers type = pr.propertyTypeName != null ? Utilities.getJavaType(MapJNITypes.getFormalTypeName(pr.propertyTypeName), getJavaClass().eResource().getResourceSet()) : null; - - if (indexed) { - // If no array write method found, then see if there is an indexed write method. If there is, then it is changable. - if (type == null) { - // If no array type from above, create one from the indexed type proxy. Add '[]' to turn it into an array. - type = Utilities.getJavaType(MapJNITypes.getFormalTypeName(((IndexedPropertyRecord) pr).indexedPropertyTypeName)+"[]", getJavaClass().eResource().getResourceSet()); //$NON-NLS-1$ - } - } - - if (type != null) - return createProperty(pr.name, indexed, type); // A valid property descriptor. - else - return null; - } - - /** - * Fill in the property and its decorator using the passed in information. - */ - protected PropertyDecorator createProperty(String name, boolean indexed, EClassifier type) { - // First find if there is already a property of this name, and if there is, is the PropertyDecorator - // marked to not allow merging in of introspection results. - HashMap existingLocals = getPropertiesMap(); - EStructuralFeature prop = null; - PropertyDecorator pd = null; - Object p = existingLocals.get(name); - if (Boolean.FALSE == p) - return null; // We've already processed this name, can't process it again. - if (p != null) { - // We've found one of the same name. Whether we modify it or use it as is, we put in a - // special dummy in its place. That marks that we've already processed it and accepted it. - existingLocals.put(name, Boolean.FALSE); - - // If the decorator for this entry says not to merge then return. - // If there is no PropertyDecorator, then we will merge. If they - // didn't want to merge then should of created of property decorator and said no merge. - pd = Utilities.getPropertyDecorator((EStructuralFeature) p); - if (pd != null && !pd.isMergeIntrospection()) - return null; - prop = (EStructuralFeature) p; - } - - // Need to test if this is an implicit decorator and it is not of the - // same type (i.e. is indexed now but wasn't or visa-versa, then we need - // to get rid of the decorator and recreate it. If it is not implicit, then - // we have to use it as is because the user specified, so it won't become - // an indexed if the user did not created it as an index, and visa-versa. - // Also if it is implicit, then we need to unset certain features that may of - // been set by a previous reflection which has now become introspected. - // When reflected we set the actual fields instead of the letting proxy determine them. - if (pd != null) { - if (pd.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL) { - // We can't change the type for explicit. - indexed = pd instanceof IndexedPropertyDecorator; - } else { - if ((indexed && !(pd instanceof IndexedPropertyDecorator)) || (!indexed && pd instanceof IndexedPropertyDecorator)) { - // It is implicit and of a different type, so just get rid of it and let it be recreated correctly. - prop.getEAnnotations().remove(pd); - pd = null; - } - } - if (pd != null) - if (indexed) - BeanInfoDecoratorUtility.clear((IndexedPropertyDecorator) pd); - else - BeanInfoDecoratorUtility.clear(pd); - } - - ImplicitItem implicit = pd == null ? ImplicitItem.IMPLICIT_DECORATOR_LITERAL : pd.getImplicitDecoratorFlag(); - if (prop == null) { - // We will create a new property. - // We can't have an implicit feature, but an explicit decorator. - getFeaturesList().add(prop = EcoreFactory.eINSTANCE.createEReference()); - implicit = ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL; - } - - setPropertyID(name, prop); - prop.setName(name); - prop.setTransient(false); - prop.setVolatile(false); - - // Containment and Unsettable is tricky for EReferences. There is no way to know whether it has been explicitly set to false, or it defaulted to - // false because ECore has not made containment/unsettable an unsettable feature. So we need to instead use the algorithm of if we here - // created the feature, then we will by default set it to containment/unsettable. If it was created through diff merge, then - // we will leave it alone. It is the responsibility of the merge file writer to set containment/unsettable correctly. - if (implicit == ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL) { - prop.setUnsettable(true); - } - prop.setEType(type); - if (!indexed) { - prop.setLowerBound(0); - prop.setUpperBound(1); - } else { - prop.setLowerBound(0); - prop.setUpperBound(-1); - prop.setUnique(true); - } - - // Now create/fill in the property descriptor for it. - // If there already is one then we - // will use it. This allows merging with beanfinfo. - if (pd == null) { - pd = - (!indexed) - ? BeaninfoFactory.eINSTANCE.createPropertyDecorator() - : BeaninfoFactory.eINSTANCE.createIndexedPropertyDecorator(); - pd.setImplicitDecoratorFlag(implicit); - prop.getEAnnotations().add(pd); - } - return pd; - } - - /** - * @param name - * @param prop - * - * @since 1.1.0 - */ - private void setPropertyID(String name, EStructuralFeature prop) { - // Now fill it in. Normal id for an attribute is "classname.attributename" but we can't use that - // for us because that format is used by Java Core for a field and there would be confusion. - // So we will use '/' instead. - ((XMIResource) prop.eResource()).setID(prop, getJavaClass().getName() + BeaninfoJavaReflectionKeyExtension.FEATURE + name); - } - - /* - * Reflect the properties. This requires going through local methods and matching them up to - * see if they are properties. - */ - private void reflectProperties() { - // If we are set to mergeSuperTypeProperties, then we need to get the super properties. - // This is so that duplicate any from super that we find here. When reflecting we don't - // allow discovered duplicates unless they are different types. - // - // Kludge: BeanInfo spec doesn't address Interfaces, but some people want to use them. - // Interfaces can have multiple extends, while the Introspector ignores these for reflection, - // the truth is most people want these. So we will add them in. But since there could be more than one it - // gets confusing. We need to look for dups from the super types. - // - // Supertypes will never be more than one entry for classes, it is possible to be 0, 1, 2 or more for interfaces. - TimerTests.basicTest.startCumulativeStep(REFLECT_PROPERTIES); - Set supers = new HashSet(50); - BeanDecorator bd = Utilities.getBeanDecorator(getJavaClass()); - if (bd == null || bd.isMergeSuperProperties()) { - List superTypes = getJavaClass().getESuperTypes(); - if (!superTypes.isEmpty()) { - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List superAll = ((JavaClass) superTypes.get(i)).getAllProperties(); - int len = superAll.size(); - for (int i1=0; i1<len; i1++) { - EStructuralFeature sf = (EStructuralFeature) superAll.get(i1); - supers.add(sf.getName()); - } - } - } - } - - // If any of the classes in the hierarchy are bound, then all reflected properties are considered bound. - boolean isBound = isDefaultBound(); - if (!isBound) { - List superTypes = getJavaClass().getEAllSuperTypes(); - // Start from end because that will be first class above the this one. - for (int i=superTypes.size()-1; !isBound && i>=0; i--) { - JavaClass spr = (JavaClass) superTypes.get(i); - BeaninfoClassAdapter bi = (BeaninfoClassAdapter) EcoreUtil.getExistingAdapter(spr, IIntrospectionAdapter.ADAPTER_KEY); - // They should all be reflected, but be on safe side, check if null. - if (bi != null) - isBound = bi.isDefaultBound(); - } - } - - HashMap props = new HashMap(); - - Iterator itr = getJavaClass().getPublicMethods().iterator(); - while (itr.hasNext()) { - Method mthd = (Method) itr.next(); - if (mthd.isStatic() || mthd.isConstructor()) - continue; // Statics/constructors don't participate as properties - if (mthd.getName().startsWith("get")) { //$NON-NLS-1$ - String name = java.beans.Introspector.decapitalize(mthd.getName().substring(3)); - if (name.length() == 0 || supers.contains(name)) - continue; // Had get(...) and not getXXX(...) so not a getter. Or this is the same name as a super, either way ignore it. - PropertyInfo propInfo = (PropertyInfo) props.get(name); - if (propInfo == null) { - propInfo = new PropertyInfo(); - if (propInfo.setGetter(mthd, false)) - props.put(name, propInfo); - } else - propInfo.setGetter(mthd, false); - } else if (mthd.getName().startsWith("is")) { //$NON-NLS-1$ - String name = java.beans.Introspector.decapitalize(mthd.getName().substring(2)); - if (name.length() == 0 || supers.contains(name)) - continue; // Had is(...) and not isXXX(...) so not a getter. Or this is the same name as a super, either way ignore it. - PropertyInfo propInfo = (PropertyInfo) props.get(name); - if (propInfo == null) { - propInfo = new PropertyInfo(); - if (propInfo.setGetter(mthd, true)) - props.put(name, propInfo); - } else - propInfo.setGetter(mthd, true); - } else if (mthd.getName().startsWith("set")) { //$NON-NLS-1$ - String name = java.beans.Introspector.decapitalize(mthd.getName().substring(3)); - if (name.length() == 0 || supers.contains(name)) - continue; // Had set(...) and not setXXX(...) so not a setter. Or this is the same name as a super, either way ignore it. - PropertyInfo propInfo = (PropertyInfo) props.get(name); - if (propInfo == null) { - propInfo = new PropertyInfo(); - if (propInfo.setSetter(mthd)) - props.put(name, propInfo); - } else - propInfo.setSetter(mthd); - } - } - - // Now go through the hash map and create the properties. - itr = props.entrySet().iterator(); - while (itr.hasNext()) { - Map.Entry entry = (Map.Entry) itr.next(); - ((PropertyInfo) entry.getValue()).createProperty((String) entry.getKey(), isBound); - } - TimerTests.basicTest.stopCumulativeStep(REFLECT_PROPERTIES); - } - - private class PropertyInfo { - - public EClassifier type, indexedType; - public boolean constrained; - public Method getter, setter, indexedGetter, indexedSetter; - - public boolean setGetter(Method get, boolean mustBeBoolean) { - List parms = get.getParameters(); - if (parms.size() > 1) - return false; // Invalid - improper number of parms. - boolean indexed = parms.size() == 1; - if (indexed && !((JavaParameter) parms.get(0)).getEType().getName().equals("int")) //$NON-NLS-1$ - return false; // Invalid - a parm that is not an int is invalid for indexed. - EClassifier retType = get.getReturnType(); - if (retType == null || retType.getName().equals("void")) //$NON-NLS-1$ - return false; // Invalid - must have a return type - if (mustBeBoolean && !retType.getName().equals("boolean")) //$NON-NLS-1$ - return false; // Invalid - it must be a boolean. - if (indexed) { - if (indexedType != null) { - if (indexedType != retType) - return false; // Invalid - type is different from previous info. - } - if (type != null && !(((JavaHelpers) type).isArray() && ((ArrayType) type).getComponentType() == retType)) - return false; // Invalid - indexed type doesn't match component type of base type. - } else { - if (type != null) { - if (type != retType) - return false; // Invalid - type is different from previous info. - } - if (indexedType != null && !(((JavaHelpers) retType).isArray() && ((ArrayType) retType).getComponentType() == indexedType)) - if (type == null) { - // We had a potential indexed and had not yet found the regular type. We've now found - // the regular type, and it is not indexed. So it takes priority and will wipe out - // the indexed type. - indexedGetter = null; - indexedSetter = null; - indexedType = null; - } else - return false; // Invalid - indexed type doesn't match component type of base type we already have - } - - if (indexed) { - if (indexedGetter != null) - return false; // Already have an indexed getter. - indexedGetter = get; - indexedType = retType; - } else { - if (getter != null) - return false; // Already have a getter - getter = get; - type = retType; - } - return true; - } - - public boolean setSetter(Method set) { - List parms = set.getParameters(); - if (parms.size() > 2 || parms.size() < 1) - return false; // Invalid - improper number of parms. - boolean indexed = parms.size() == 2; - if (indexed && !((JavaParameter) parms.get(0)).getEType().getName().equals("int")) //$NON-NLS-1$ - return false; // Invalid - a parm that is not an int is invalid for indexed. - EClassifier retType = set.getReturnType(); - if (retType != null && !retType.getName().equals("void")) //$NON-NLS-1$ - return false; // Invalid - must not have a return type - EClassifier propType = null; - if (indexed) { - propType = ((JavaParameter) parms.get(1)).getEType(); - if (indexedType != null) { - if (indexedType != propType) - return false; // Invalid - type is different from previous info. - } - if (type != null && !(((JavaHelpers) type).isArray() && ((ArrayType) type).getComponentType() == propType)) - return false; // Invalid - indexed type doesn't match component type of base type, or base type not an array - } else { - propType = ((JavaParameter) parms.get(0)).getEType(); - if (type != null) { - if (type != propType) - return false; // Invalid - type is different from previous info. - } - if (indexedType != null - && !(((JavaHelpers) propType).isArray() && ((ArrayType) propType).getComponentType() == indexedType)) - if (type == null) { - // We had a potential indexed and had not yet found the regular type. We've now found - // the regular type, and it is not indexed of the correct type. So it takes priority and will wipe out - // the indexed type. - indexedGetter = null; - indexedSetter = null; - indexedType = null; - } else - return false; // Invalid - indexed type doesn't match component type of base type from this setter. - } - - if (indexed) { - if (indexedSetter != null) - return false; // Already have an indexed getter. - indexedSetter = set; - indexedType = propType; - } else { - if (setter != null) - return false; // Already have a getter - setter = set; - type = propType; - } - - if (set.getJavaExceptions().contains(Utilities.getJavaClass("java.beans.PropertyVetoException", getJavaClass().eResource().getResourceSet()))) //$NON-NLS-1$ - constrained = true; - return true; - } - - public void createProperty(String name, boolean isBound) { - boolean indexed = indexedType != null; - if (indexed && type == null) - return; // A potential indexed, but never found the getter/setter of the regular type. - - PropertyDecorator prop = - BeaninfoClassAdapter.this.createProperty( - name, - indexed, - type); - if (prop == null) - return; // Reflection not wanted. - - indexed = prop instanceof IndexedPropertyDecorator; // It could of been forced back to not indexed if explicitly set. - - // At this point in time all implicit settings have been cleared. This is done back in createProperty() method above. - // So now apply reflected settings on the property decorator. - BeanInfoDecoratorUtility.setProperties(prop, isBound, constrained, getter, setter); - if (indexed) - BeanInfoDecoratorUtility.setProperties((IndexedPropertyDecorator) prop, indexedGetter, indexedSetter); - - } - }; - - /* - * Should only be called from introspect so that flags are correct. - */ - private void finalizeOperations(ChangeDescription cd) { - // Now go through the list and remove those that should be removed. - Iterator itr = getOperationsList().iterator(); - while (itr.hasNext()) { - EOperation a = (EOperation) itr.next(); - MethodDecorator m = Utilities.getMethodDecorator(a); - if (!newoperations.contains(a)) { - // A candidate for removal. It is in the list but we didn't add it. Check to see if it one we had created in the past. - // If no methoddecorator, then keep it, not one ours. - if (m != null) { - ImplicitItem implicit = m.getImplicitDecoratorFlag(); - if (implicit != ImplicitItem.NOT_IMPLICIT_LITERAL) { - m.setEModelElement(null); // Remove it because it was implicit. - ((InternalEObject) m).eSetProxyURI(BAD_URI); - if (implicit == ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL) { - itr.remove(); // The operation was implicit too. - ((InternalEObject) a).eSetProxyURI(BAD_URI); - } - continue; // At this point we no longer have a method decorator, so go to next. - } - } - } - - if (m != null && cd != null) { - // Now create the appropriate cache entry for this method. - BeanInfoDecoratorUtility.buildChange(cd, m); - } - } - } - - /** - * Fill in the behavior and its decorator using the mthdDesc. - */ - protected MethodDecorator calculateOperation(MethodRecord record) { - return createOperation(record.name, formLongName(record), null, record); - } - - /** - * Fill in the behavior and its decorator using the passed in information. - */ - protected MethodDecorator createOperation(String name, String longName, Method method, MethodRecord record) { - // First find if there is already a behavior of this name and method signature , and if there is, is the MethodDecorator - // marked to not allow merging in of introspection results. - HashMap existingLocals = getOperationsMap(); - EOperation oper = null; - MethodDecorator md = null; - Object b = null; - if (name != null) - b = existingLocals.get(longName); - else - b = existingLocals.get(longName); - - if (b != null) { - // If the decorator for this entry says not to merge then return. - // If there is no decorator, then we will merge. If they didn't want to - // merge, then they should of created a decorator with no merge on it. - md = Utilities.getMethodDecorator((EOperation) b); - if (md != null && !md.isMergeIntrospection()) - return null; - oper = (EOperation) b; - } - - // Need to find the method and method id. - if (method == null) { - // No method sent, create a proxy to it from the record. - method = BeanInfoDecoratorUtility.createJavaMethodProxy(record.methodForDescriptor); - } - - ImplicitItem implicit = md == null ? ImplicitItem.IMPLICIT_DECORATOR_LITERAL : ImplicitItem.NOT_IMPLICIT_LITERAL; - if (oper == null) { - // We will create a new MethodProxy. - oper = BeaninfoFactory.eINSTANCE.createMethodProxy(); - getOperationsList().add(oper); - implicit = ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL; - } - if (name == null) - name = method.getName(); - - // Now fill it in. - if (oper instanceof MethodProxy) - ((MethodProxy) oper).setMethod(method); - setMethodID(name, oper); - oper.setName(name); - newoperations.add(oper); - - // Now create/fill in the method decorator for it. - // If there already is one then we - // will use it. This allows merging with beaninfo. - if (md == null) { - md = BeaninfoFactory.eINSTANCE.createMethodDecorator(); - md.setImplicitDecoratorFlag(implicit); - oper.getEAnnotations().add(md); - } else - BeanInfoDecoratorUtility.clear(md); - return md; - } - - /** - * @param name - * @param oper - * - * @since 1.1.0 - */ - private void setMethodID(String name, EOperation oper) { - ((XMIResource) oper.eResource()).setID(oper, getJavaClass().getName() + BeaninfoJavaReflectionKeyExtension.BEHAVIOR + name); - } - - private void reflectOperations() { - // If we are set to mergeSuperTypeBehaviors, then we need to get the super behaviors. - // This is so that duplicate any from super that we find here. When reflecting we don't - // allow discovered duplicates unless they are different signatures. So all super operations - // will be allowed and we will not override them. - // - // Kludge: BeanInfo spec doesn't address Interfaces, but some people want to use them. - // Interfaces can have multiple extends, while the Introspector ignores these for reflection, - // the truth is most people want these. So we will add them in. But since there could be more than one it - // gets confusing. We need to look for dups from the super types. - // - // Supertypes will never be more than one entry for classes, it is possible to be 0, 1, 2 or more for interfaces. - Set supers = new HashSet(50); - BeanDecorator bd = Utilities.getBeanDecorator(getJavaClass()); - if (bd == null || bd.isMergeSuperMethods()) { - List superTypes = getJavaClass().getESuperTypes(); - if (!superTypes.isEmpty()) { - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List superAll = ((JavaClass) superTypes.get(i)).getEAllOperations(); - int len = superAll.size(); - for (int i1=0; i1<len; i1++) { - EOperation op = (EOperation) superAll.get(i1); - supers.add(formLongName(op)); - } - } - } - } - - Iterator itr = getJavaClass().getPublicMethods().iterator(); - while (itr.hasNext()) { - Method mthd = (Method) itr.next(); - if (mthd.isStatic() || mthd.isConstructor()) - continue; // Statics/constructors don't participate as behaviors - String longName = formLongName(mthd); - // Add if super not already contain it. - if (!supers.contains(longName)) - createOperation(null, longName, mthd, null); // Don't pass a name, try to create it by name, only use ID if there is more than one of the same name. - } - } - - /* - * merge all the Behaviors(i.e. supertypes) - */ - protected BasicEList allOperations() { - BasicEList jcAllOperations = (BasicEList) getJavaClass().primGetEAllOperations(); - BeaninfoSuperAdapter superAdapter = - (BeaninfoSuperAdapter) EcoreUtil.getRegisteredAdapter(getJavaClass(), BeaninfoSuperAdapter.class); - if (jcAllOperations != null) { - // See if new one required. - if (superAdapter == null || !superAdapter.isAllOperationsCollectionModified()) - return jcAllOperations; - // Can't get superadapter, so must not be attached to a resource, so return current list. Or no change required. - } - - UniqueEList.FastCompare allOperations = new UniqueEList.FastCompare() { - /** - * Comment for <code>serialVersionUID</code> - * - * @since 1.1.0 - */ - private static final long serialVersionUID = 1L; - - protected Object[] newData(int capacity) { - return new EOperation[capacity]; - } - }; - boolean doAllOperations = false; - synchronized(this) { - // If we are introspecting, don't do all operatoins because it is an invalid list. Just return empty without reseting the all modified flag. - doAllOperations = !isDoingAllOperations && !isIntrospecting && isResourceConnected(); - if (doAllOperations) - isDoingAllOperations = true; - } - - if (doAllOperations) { - try { - EList localOperations = getJavaClass().getEOperations(); - // Kludge: BeanInfo spec doesn't address Interfaces, but some people want to use them. - // Interfaces can have multiple extends, while the Introspector ignores these for reflection, - // the truth is most people want these. So we will add them in. But since there could be more than one it - // gets confusing. We need to look for dups from the super types and still keep order. - // - // Supertypes will never be more than one entry for classes, it is possible to be 0, 1, 2 or more for interfaces. - List superTypes = getJavaClass().getESuperTypes(); - if (!superTypes.isEmpty()) { - // Now we need to merge in the supers. - BeanDecorator bd = Utilities.getBeanDecorator(getJavaClass()); - // If there is only one supertype, we can add to the actual events, else we will use the linked hashset so that - // we don't add possible duplicates (e.g. IA extends IB,IC and IB extends IC. In this case there would be dups - // because IB would contribute IC's too). - Collection workingAllOperations = superTypes.size() == 1 ? (Collection) allOperations : new LinkedHashSet(); - // We will now merge as directed. - boolean mergeAll = bd == null || bd.isMergeSuperMethods(); - if (!mergeAll) { - // we don't to want to merge super operations, but we still need super non-operations. - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List supers = ((JavaClass) superTypes.get(i)).getEAllOperations(); - int len = supers.size(); - for (int i1 = 0; i1 < len; i1++) { - EOperation o = (EOperation) supers.get(i1); - MethodDecorator md = Utilities.getMethodDecorator(o); - if (md == null || (md.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL && !md.isMergeIntrospection())) - workingAllOperations.add(o); - } - } - } else { - // We want to merge all. - // BeanInfo could of given us the don't merge list. If the list is empty, then we accept all. - if (bd != null && bd.eIsSet(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedMethodNames())) { - // We were given a list of names. - // Get the names into a set to create a quick lookup. - HashSet superSet = new HashSet(bd.getNotInheritedMethodNames()); - - // Now walk and add in non-bean operations (and bean operations that were explicitly added and not mergeable (i.e. didn't come thru beaninfo)) - // and add those not specifically called out by BeanInfo not merge list. - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List supers = ((JavaClass) superTypes.get(i)).getEAllOperations(); - int len = supers.size(); - for (int i1 = 0; i1 < len; i1++) { - EOperation o = (EOperation) supers.get(i1); - MethodDecorator md = Utilities.getMethodDecorator(o); - if (md == null || (md.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL && !md.isMergeIntrospection())) - workingAllOperations.add(o); - else { - String longName = formLongName(o); - if (longName == null || !superSet.contains(longName)) - workingAllOperations.add(o); - } - } - } - } else { - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - workingAllOperations.addAll(((JavaClass) superTypes.get(i)).getEAllOperations()); - } - } - } - if (workingAllOperations != allOperations) - allOperations.addAll(workingAllOperations); // Now copy over the ordered super operations. - } - allOperations.addAll(localOperations); - ESuperAdapter sa = getJavaClass().getESuperAdapter(); - sa.setAllOperationsCollectionModified(false); // Now built, so reset to not changed. - } finally { - synchronized(this) { - isDoingAllProperties = false; - } - } - } - - allOperations.shrink(); - return new EcoreEList.UnmodifiableEList.FastCompare( - getJavaClass(), - EcorePackage.eINSTANCE.getEClass_EAllOperations(), - allOperations.size(), - allOperations.data()); - - } - - /* - * Should only be called from introspect so that flags are correct. - */ - private void finalizeEvents(ChangeDescription cd) { - // Now go through the list and remove those that should be removed. - Map oldLocals = getEventsMap(); - Iterator itr = getEventsList().iterator(); - while (itr.hasNext()) { - JavaEvent a = (JavaEvent) itr.next(); - EventSetDecorator e = Utilities.getEventSetDecorator(a); - Object aOld = oldLocals.get(a.getName()); - if (aOld != null && aOld != Boolean.FALSE) { - // A candidate for removal. It was in the old list and it was not processed. - if (e != null) { - ImplicitItem implicit = e.getImplicitDecoratorFlag(); - if (implicit != ImplicitItem.NOT_IMPLICIT_LITERAL) { - e.setEModelElement(null); // Remove it because it was implicit. - ((InternalEObject) e).eSetProxyURI(BAD_URI); - if (implicit == ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL) { - itr.remove(); // The feature was implicit too. - ((InternalEObject) a).eSetProxyURI(BAD_URI); - } - continue; // At this point we don't have a decorator any more, so don't bother going on. - } - } - } - - if (e != null && cd != null) { - // Now create the appropriate cache entry for this event. - BeanInfoDecoratorUtility.buildChange(cd, e); - } - } - } - - /** - * Fill in the event and its decorator using the eventDesc. - */ - protected EventSetDecorator calculateEvent(EventSetRecord record) { - return createEvent(record.name); - } - - /** - * Fill in the event and its decorator using the passed in information. - */ - protected EventSetDecorator createEvent(String name) { - // First find if there is already an event of this name, and if there is, is the EventSetDecorator - // marked to not allow merging in of introspection results. - HashMap existingLocals = getEventsMap(); - JavaEvent event = null; - EventSetDecorator ed = null; - Object b = existingLocals.get(name); - if (Boolean.FALSE == b) - return null; // We've already processed this event, can't process it again. - if (b != null) { - // We've found one of the same event. Whether we modify it or use it as is, we put in a - // special dummy in its place. That marks that we've already processed it and accepted it. - existingLocals.put(name, Boolean.FALSE); - - // If the decorator for this entry says not to merge then return. - // If there is no decorator, then we will merge. If they didn't want to - // merge, then they should of created a decorator with no merge on it. - ed = Utilities.getEventSetDecorator((JavaEvent) b); - if (ed != null && !ed.isMergeIntrospection()) - return null; - event = (JavaEvent) b; - } - - ImplicitItem implicit = ed == null ? ImplicitItem.IMPLICIT_DECORATOR_LITERAL : ImplicitItem.NOT_IMPLICIT_LITERAL; - if (event == null) { - // We will create a new Event. - event = BeaninfoFactory.eINSTANCE.createBeanEvent(); - getEventsList().add(event); - implicit = ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL; // Can't have an implicit feature but explicit decorator. - } - - setEventID(name, event); - event.setName(name); - - // Now create in the event decorator for it. - // If there already is one then we - // will use it. This allows merging with beaninfo. - if (ed == null) { - ed = BeaninfoFactory.eINSTANCE.createEventSetDecorator(); - ed.setImplicitDecoratorFlag(implicit); - event.getEAnnotations().add(ed); - } else - BeanInfoDecoratorUtility.clear(ed); - return ed; - } - - /** - * @param name - * @param event - * - * @since 1.1.0 - */ - private void setEventID(String name, JavaEvent event) { - // Now fill it in. - ((XMIResource) event.eResource()).setID(event, getJavaClass().getName() + BeaninfoJavaReflectionKeyExtension.EVENT + name); - } - - /** - * Reflect the events. This requires going through local public methods and creating an - * event for the discovered events. - */ - protected void reflectEvents() { - // If we are set to mergeSuperTypeEvents, then we need to get the super events. - // This is so that duplicate any from super that we find here. When reflecting we don't - // allow discovered duplicates. - // - // Kludge: BeanInfo spec doesn't address Interfaces, but some people want to use them. - // Interfaces can have multiple extends, while the Introspector ignores these for reflection, - // the truth is most people want these. So we will add them in. But since there could be more than one it - // gets confusing. We need to look for dups from the super types. - // - // Supertypes will never be more than one entry for classes, it is possible to be 0, 1, 2 or more for interfaces. - Set supers = new HashSet(50); - BeanDecorator bd = Utilities.getBeanDecorator(getJavaClass()); - if (bd == null || bd.isMergeSuperEvents()) { - List superTypes = getJavaClass().getESuperTypes(); - if (!superTypes.isEmpty()) { - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List superAll = ((JavaClass) superTypes.get(i)).getAllEvents(); - int len = superAll.size(); - for (int i1=0; i1<len; i1++) { - JavaEvent se = (JavaEvent) superAll.get(i1); - supers.add(se.getName()); - } - } - } - } - - HashMap events = new HashMap(); - eventListenerClass = (JavaClass) JavaRefFactory.eINSTANCE.reflectType("java.util.EventListener", getJavaClass()); // Initialize, needed for building eventinfos. //$NON-NLS-1$ - tooManyExceptionClass = (JavaClass) JavaRefFactory.eINSTANCE.reflectType("java.util.TooManyListenersException", getJavaClass()); // Initialize, needed for building eventinfos. //$NON-NLS-1$ - Iterator itr = getJavaClass().getPublicMethods().iterator(); - while (itr.hasNext()) { - Method mthd = (Method) itr.next(); - if (mthd.isStatic() || mthd.isConstructor()) - continue; // Statics/constructors don't participate in events. - String key = validEventAdder(mthd); - if (key != null) { - EventInfo eventInfo = (EventInfo) events.get(key); - if (eventInfo == null) { - eventInfo = new EventInfo(); - eventInfo.setAdder(mthd); - events.put(key, eventInfo); - } else - eventInfo.setAdder(mthd); - } else { - key = validEventRemove(mthd); - if (key != null) { - EventInfo eventInfo = (EventInfo) events.get(key); - if (eventInfo == null) { - eventInfo = new EventInfo(); - eventInfo.setRemover(mthd); - events.put(key, eventInfo); - } else - eventInfo.setRemover(mthd); - } - } - } - - eventListenerClass = null; // No longer need it. - - // Now actually create the events. - HashSet eventNames = new HashSet(events.size()); // Set of found event names, to prevent duplicates - Iterator evtItr = events.entrySet().iterator(); - while (evtItr.hasNext()) { - Map.Entry eventMap = (Map.Entry) evtItr.next(); - EventInfo ei = (EventInfo) eventMap.getValue(); - if (ei.isValidInfo()) { - String eventName = getEventName((String) eventMap.getKey()); - if (eventNames.contains(eventName)) - continue; // Aleady created it. (Note: Introspector actually takes last one over previous dups, but the order is totally undefined, so choosing first is just as good or bad. - - if (supers.contains(eventName)) - continue; // Don't override a super event. - - if (ei.createEvent(eventName)) - eventNames.add(eventName); // It was validly created. - } - } - - tooManyExceptionClass = null; // No longer need it. - } - - /** - * merge all the Events (i.e. supertypes) - */ - protected EList allEvents() { - - EList jcAllEvents = getJavaClass().getAllEventsGen(); - BeaninfoSuperAdapter superAdapter = - (BeaninfoSuperAdapter) EcoreUtil.getRegisteredAdapter(getJavaClass(), BeaninfoSuperAdapter.class); - if (jcAllEvents != null) { - // See if new one required. - if (superAdapter == null || !superAdapter.isAllEventsCollectionModified()) - return jcAllEvents; - // Can't get superadapter, so must not be attached to a resource, so return current list. Or no change required. - } - - UniqueEList.FastCompare allEvents = new UniqueEList.FastCompare() { - /** - * Comment for <code>serialVersionUID</code> - * - * @since 1.1.0 - */ - private static final long serialVersionUID = 1L; - - protected Object[] newData(int capacity) { - return new JavaEvent[capacity]; - } - }; - - boolean doAllEvents = false; - synchronized(this) { - // If we are introspecting, don't do all properties because it is an invalid list. Just return empty without reseting the all modified flag. - doAllEvents = !isDoingAllEvents && !isIntrospecting && isResourceConnected(); - if (doAllEvents) - isDoingAllEvents = true; - } - - if (doAllEvents) { - try { - EList localEvents = getJavaClass().getEvents(); - // Kludge: BeanInfo spec doesn't address Interfaces, but some people want to use them. - // Interfaces can have multiple extends, while the Introspector ignores these for reflection, - // the truth is most people want these. So we will add them in. But since there could be more than one it - // gets confusing. We need to look for dups from the super types and still keep order. - // - // Supertypes will never be more than one entry for classes, it is possible to be 0, 1, 2 or more for interfaces. - List superTypes = getJavaClass().getESuperTypes(); - if (!superTypes.isEmpty()) { - // Now we need to merge in the supers. - BeanDecorator bd = Utilities.getBeanDecorator(getJavaClass()); - // If there is only one supertype, we can add to the actual events, else we will use the linked hashset so that - // we don't add possible duplicates (e.g. IA extends IB,IC and IB extends IC. In this case there would be dups - // because IB would contribute IC's too). - Collection workingAllEvents = superTypes.size() == 1 ? (Collection) allEvents : new LinkedHashSet(); - // We will now merge as directed. - boolean mergeAll = bd == null || bd.isMergeSuperEvents(); - if (!mergeAll) { - // we don't to want to merge super events, but we still need super non-events or explicit ones. - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List supers = ((JavaClass) superTypes.get(i)).getAllEvents(); - int len = supers.size(); - for (int i1 = 0; i1 < len; i1++) { - JavaEvent e = (JavaEvent) supers.get(i1); - EventSetDecorator ed = Utilities.getEventSetDecorator(e); - if (ed == null || (ed.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL && !ed.isMergeIntrospection())) - workingAllEvents.add(e); - } - } - } else { - // We want to merge all. - // BeanInfo has given us the not merge list. If the list is empty, then we accept all. - if (bd != null && bd.eIsSet(BeaninfoPackage.eINSTANCE.getBeanDecorator_NotInheritedEventNames())) { - // We were given a list of names. - // Get the names into a set to create a quick lookup. - HashSet superSet = new HashSet(bd.getNotInheritedEventNames()); - - // Now walk and add in non-bean events (and bean events that were explicitly added and not mergeable (i.e. didn't come thru beaninfo)) - // and add those not specifically called out by BeanInfo. - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - List supers = ((JavaClass) superTypes.get(i)).getAllEvents(); - int len = supers.size(); - for (int i1 = 0; i1 < len; i1++) { - JavaEvent e = (JavaEvent) supers.get(i1); - EventSetDecorator ed = Utilities.getEventSetDecorator(e); - if (ed == null || (ed.getImplicitDecoratorFlag() == ImplicitItem.NOT_IMPLICIT_LITERAL && !ed.isMergeIntrospection()) || !superSet.contains(ed.getName())) - workingAllEvents.add(e); - } - } - } else { - // BeanInfo called out that all super events should be added, or no beaninfo. - int lenST = superTypes.size(); - for (int i=0; i<lenST; i++) { - workingAllEvents.addAll(((JavaClass) superTypes.get(i)).getAllEvents()); - } - } - } - if (workingAllEvents != allEvents) - allEvents.addAll(workingAllEvents); // Now copy over the ordered super events. - } - allEvents.addAll(localEvents); - superAdapter.setAllEventsCollectionModified(false); // Now built, so reset to not changed. - } finally { - synchronized (this) { - isDoingAllEvents = false; - } - } - } - - if (allEvents.isEmpty()) - return ECollections.EMPTY_ELIST; - else { - allEvents.shrink(); - return new EcoreEList.UnmodifiableEList.FastCompare( - getJavaClass(), - JavaRefPackage.eINSTANCE.getJavaClass_AllEvents(), - allEvents.size(), - allEvents.data()); - } - - } - - private JavaClass eventListenerClass, // Event Listener class. Needed for validation. - tooManyExceptionClass; // Too many listeners exception. - - /* - * Pass in the key, it will be used to form the name. - */ - protected String getEventName(String key) { - return key.substring(0, key.indexOf(':')); - } - - /* - * Answers event key if valid, null if not valid. - */ - protected String validEventAdder(Method method) { - String name = method.getName(); - if (!name.startsWith("add") || !name.endsWith("Listener")) //$NON-NLS-1$ //$NON-NLS-2$ - return null; // Not valid format for an add listener name. - // Note. The Bean specs only state that it should be "add<ListenerType>" but the - // introspector implicitly adds an additional constraint in that the listener type - // should end with "Listener". If it doesn't the introspector would actually throw - // an index out of bounds. We'll just ignore such methods. - - List parms = method.getParameters(); - if (parms.size() != 1) - return null; // Invalid - improper number of parms. - - EClassifier returnType = method.getReturnType(); - if (returnType == null || !returnType.getName().equals("void")) //$NON-NLS-1$ - return null; // Invalid - must be void return type. - - EClassifier parmType = ((JavaParameter) parms.get(0)).getEType(); - if (!BeaninfoClassAdapter.this.eventListenerClass.isAssignableFrom(parmType)) - return null; // Parm must be inherit from EventListener - - // Beans introspector also requires that the "listener" part of the name be a - // suffix of the type name. So if the type name was "ISomeListener" then - // the method name must be "addSomeListener" (actually "addomeListener" - // would also be valid according to the introspector!). - // This allows the type to be an interface using the "I" convention while not - // requiring the "I" to be in the name of the event. - if (!parmType.getName().endsWith(name.substring(3))) - return null; // It is not "add{ListenerType}". - - // This is a unique containing event name and listener type - // This is so we can have a unique key for two events with the same - // name but different listener type. (This matches Introspector so that we aren't - // coming up with different results. - return java.beans.Introspector.decapitalize(name.substring(3, name.length() - 8)) - + ':' - + ((JavaHelpers) parmType).getQualifiedName(); - } - - /* - * Answers event key if valid, null if not valid. - */ - protected String validEventRemove(Method method) { - String name = method.getName(); - if (!name.startsWith("remove") || !name.endsWith("Listener")) //$NON-NLS-1$ //$NON-NLS-2$ - return null; // Not valid format for a remove listener name. - // Note. The Bean specs only state that it should be "add<ListenerType>" but the - // introspector implicitly adds an additional constraint in that the listener type name - // should end with "Listener". If it doesn't the introspector would actually throw - // an index out of bounds. We'll just ignore such methods. - - - List parms = method.getParameters(); - if (parms.size() != 1) - return null; // Invalid - improper number of parms. - - EClassifier returnType = method.getReturnType(); - if (returnType == null || !returnType.getName().equals("void")) //$NON-NLS-1$ - return null; // Invalid - must be void return type. - - EClassifier parmType = ((JavaParameter) parms.get(0)).getEType(); - if (!BeaninfoClassAdapter.this.eventListenerClass.isAssignableFrom(parmType)) - return null; // Parm must be inherit from EventListener - - // Beans introspector also requires that the "listener" part of the name be a - // suffix of the type name. So if the type name was "ISomeListener" then - // the method name must be "removeSomeListener" (actually "removeomeListener" - // would also be valid according to the introspector!). - // This allows the type to be an interface using the "I" convention while not - // requiring the "I" to be in the name of the event. - if (!parmType.getName().endsWith(name.substring(6))) - return null; // It is not "add{ListenerType}". - - // This is a unique containing event name and listener type - // This is so we can have a unique key for two events with the same - // name but different listener type. (This matches Introspector so that we aren't - // coming up with different results). - return java.beans.Introspector.decapitalize(name.substring(6, name.length() - 8)) - + ':' - + ((JavaHelpers) parmType).getQualifiedName(); - } - - public boolean isDefaultBound() { - if (defaultBound == null) { - // Haven't yet decided on it. - Iterator methods = getJavaClass().getPublicMethods().iterator(); - boolean foundAdd = false, foundRemove = false; - while (methods.hasNext() && (!foundAdd || !foundRemove)) { - Method method = (Method) methods.next(); - if ("addPropertyChangeListener".equals(method.getName())) { //$NON-NLS-1$ - List parms = method.getParameters(); - if (parms.size() == 1) { - JavaParameter parm = (JavaParameter) parms.get(0); - if ("java.beans.PropertyChangeListener".equals(((JavaHelpers) parm.getEType()).getQualifiedName())) { //$NON-NLS-1$ - foundAdd = true; - continue; - } - } - } else if ("removePropertyChangeListener".equals(method.getName())) { //$NON-NLS-1$ - List parms = method.getParameters(); - if (parms.size() == 1) { - JavaParameter parm = (JavaParameter) parms.get(0); - if ("java.beans.PropertyChangeListener".equals(((JavaHelpers) parm.getEType()).getQualifiedName())) { //$NON-NLS-1$ - foundRemove = true; - continue; - } - } - } - } - - defaultBound = (foundAdd && foundRemove) ? Boolean.TRUE : Boolean.FALSE; - } - return defaultBound.booleanValue(); - } - - private class EventInfo { - - public Method addListenerMethod; - public Method removeListenerMethod; - - public void setAdder(Method addMethod) { - addListenerMethod = addMethod; - } - - public void setRemover(Method removeMethod) { - removeListenerMethod = removeMethod; - } - - // Answer whether this is a valid event info. - public boolean isValidInfo() { - return (addListenerMethod != null && removeListenerMethod != null); - } - - public boolean createEvent(String name) { - EventSetDecorator ed = BeaninfoClassAdapter.this.createEvent(name); - if (ed == null) - return false; // Reflection not wanted. - - - // See if unicast. - boolean unicast = false; - List exceptions = addListenerMethod.getJavaExceptions(); - int len = exceptions.size(); - for(int i=0; i<len; i++) { - if (exceptions.get(i) == BeaninfoClassAdapter.this.tooManyExceptionClass) { - unicast = true; - break; - } - } - // We'll let listener methods get retrieved dynamically when needed. - BeanInfoDecoratorUtility.setProperties(ed, addListenerMethod, removeListenerMethod, unicast, (JavaClass) ((JavaParameter) addListenerMethod.getParameters().get(0)).getEType()); - return true; - } - - } - - /** - * Marh the factory as stale, but leave the overrides alone. They are not stale. - * @param stale - * - * @since 1.1.0.1 - */ - public void markStaleFactory(ProxyFactoryRegistry stale) { - markStaleFactory(stale, false); - } - - /** - * Mark this factory as the stale factory. - * - * @param clearOverriddes clear the overrides too. They are stale. - */ - public void markStaleFactory(ProxyFactoryRegistry stale, boolean clearOverriddes) { - if (staleFactory == null) { - // It's not stale so make it stale. - // So that next access will re-introspect - defaultBound = null; // So query on next request. - staleFactory = new WeakReference(stale); - - // Need to mark the esuperadapter that things have changed so that any - // subtype will know to reuse the parent for anything that requires knowing parent info. - Adapter a = EcoreUtil.getExistingAdapter(getTarget(), ESuperAdapter.class); - // Simulate that this objects super has changed. This will make all subclasses - // think about the super has changed and next retrieving anything that involves the - // super will cause a rebuild to occur. - Notification note = - new ENotificationImpl((InternalEObject) getTarget(), Notification.SET, EcorePackage.ECLASS__ESUPER_TYPES, null, null); - if (a != null) - a.notifyChanged(note); - // Do the same with BeaninfoSuperAdapter so that events also will be rebuilt. - a = EcoreUtil.getExistingAdapter(getTarget(), BeaninfoSuperAdapter.ADAPTER_KEY); - if (a != null) - a.notifyChanged(note); - synchronized (this) { - needsIntrospection = true; - if (clearOverriddes) { - retrievedExtensionDocument = CLEAR_EXTENSIONS; - if (classEntry != null) { - classEntry.markDeleted(); - classEntry = null; // Get a new one next time. - } - } - } - } - } - - /** - * Form a longname for the addkey function. - */ - private String formLongName(EOperation feature) { - Method mthd = null; - if (feature instanceof Method) - mthd = (Method) feature; - else if (feature instanceof MethodProxy) - mthd = ((MethodProxy) feature).getMethod(); - else - return null; // Don't know what it is. - - StringBuffer longName = new StringBuffer(100); - longName.append(feature.getName()); // Feature Name - longName.append(':'); - longName.append(mthd.getName()); // Method Name - longName.append('('); - List p = mthd.getParameters(); - for (int i = 0; i < p.size(); i++) { - JavaParameter parm = (JavaParameter) p.get(i); - if (i>0) - longName.append(','); - longName.append(parm.getJavaType().getQualifiedName()); - } - - return longName.toString(); - } - - /* - * More than one operation can have the same name. To identify them uniquely, the long name is created, - * which is formed from the name and the method signature. - */ - private String formLongName(MethodRecord record) { - StringBuffer longName = new StringBuffer(100); - longName.append(record.name); // Feature Name - longName.append(':'); - longName.append(record.methodForDescriptor.methodName); // Method Name - longName.append('('); - String[] p = record.methodForDescriptor.parameterTypeNames; - if (p != null) - for (int i = 0; i < p.length; i++) { - if (i>0) - longName.append(','); - longName.append(MapJNITypes.getFormalTypeName(p[i])); - } - - return longName.toString(); - } - /** - * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(Notification) - */ - public void notifyChanged(Notification msg) { - // In case of removing adapter, make sure we are first removed from the factory so it doesn't know about us anymore. - if (msg.getEventType() == Notification.REMOVING_ADAPTER) - getAdapterFactory().removeAdapter(this); - } - - /** - * @see java.lang.Object#toString() - */ - public String toString() { - return super.toString() + '(' + (getJavaClass() != null ? getJavaClass().getQualifiedName() : "?") + ')'; //$NON-NLS-1$ - } - - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoJavaReflectionKeyExtension.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoJavaReflectionKeyExtension.java deleted file mode 100644 index 773b911d9..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoJavaReflectionKeyExtension.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: BeaninfoJavaReflectionKeyExtension.java,v $ - * $Revision: 1.7 $ $Date: 2005/09/14 23:30:38 $ - */ - -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.xmi.XMIResource; - -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.adapters.IJavaReflectionKey; -import org.eclipse.jem.java.adapters.IJavaReflectionKeyExtension; - -/** - * Java Reflection Key extension to retrieve keys for beaninfo creations. - * - * Handles attributes and behaviors. - * - * @version 1.0 - * @author R. L. Kulp - */ -public class BeaninfoJavaReflectionKeyExtension implements IJavaReflectionKeyExtension { - - // The format of the keys are: - // behaviors: "classname/behavior/behaviorname" - // structural features: "classname/featurename" - public static final String - BEHAVIOR = "/operation/", // Piece in key that indicates this is a behavior. //$NON-NLS-1$ - EVENT = "/event/", // Piece in key that indicates this is an event. //$NON-NLS-1$ - FEATURE = "/"; // Piece in key that indicates this is an attribute. //$NON-NLS-1$ - - /** - * Get the object for this key. - */ - public Object getObject(String key, IJavaReflectionKey reflectionKey) { - if (key != null) { - int ibehave = key.indexOf(BEHAVIOR); - if (ibehave > -1) { - // We have a possible behavior. - String classname = key.substring(0, ibehave); - int ibehaveName = ibehave+BEHAVIOR.length(); - if (ibehaveName < key.length()) { - JavaClass javaclass = getJavaClass(reflectionKey, classname); - if (javaclass != null) { - javaclass.getEOperations(); // Get the list introspected and populated if not already. - return reflectionKey.primGet(key); // It should now be there, - } - } - } else { - int ievent = key.indexOf(EVENT); - if (ievent > -1) { - // We have a possible event. - String classname = key.substring(0, ievent); - int ieventName = ievent+EVENT.length(); - if (ieventName < key.length()) { - JavaClass javaclass = getJavaClass(reflectionKey, classname); - if (javaclass != null) { - javaclass.getEvents(); // Get the list introspected and populated if not already. - return reflectionKey.primGet(key); // It should now be there, - } - } - } else { - int ifeature = key.indexOf(FEATURE); - if (ifeature > -1) { - // We have a possible feature. - String classname = key.substring(0, ifeature); - int ifeatureName = ifeature+FEATURE.length(); - if (ifeatureName < key.length()) { - String feature = key.substring(ifeatureName); - JavaClass javaclass = getJavaClass(reflectionKey, classname); - if (javaclass != null) { - // This is just a hack until we can get ID situation straightened out. - // Need to cause introspection of the attributes and references. - javaclass.getEStructuralFeatures(); - Object result = reflectionKey.primGet(key); // See if it now got added as an id. - if (result == null) { - // Well, it could of been added by the diff merge, which as of now can't handle ids. - // So we will find it within the attributes/references. - result = findFeature(feature, javaclass.getEReferences()); - if (result == null) - result = findFeature(feature, javaclass.getEAttributes()); - if (result instanceof EStructuralFeature) { - // Need to add it as an id so next time won't come through here. - ((XMIResource) javaclass.eResource()).setID((EObject) result, key); // So next time it will find it directly. - } - } - return result; - } - } - } - } - } - } - - return null; - } - - private EStructuralFeature findFeature(String featureName, List featureList) { - Iterator itr = featureList.iterator(); - while (itr.hasNext()) { - EStructuralFeature feature = (EStructuralFeature) itr.next(); - if (featureName.equals(feature.getName())) { - return feature; - } - } - return null; - } - - protected JavaClass getJavaClass(IJavaReflectionKey reflectionKey, String classname) { - Object eclass = reflectionKey.primGet(classname); - if (eclass == null) - eclass = reflectionKey.getJavaType(classname); // Let it create it. - if (eclass instanceof JavaClass) - return (JavaClass) eclass; - else - return null; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoModelSynchronizer.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoModelSynchronizer.java deleted file mode 100644 index 7251c7638..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoModelSynchronizer.java +++ /dev/null @@ -1,198 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: BeaninfoModelSynchronizer.java,v $ - * $Revision: 1.10 $ $Date: 2006/05/17 20:13:00 $ - */ - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jdt.core.*; - -import org.eclipse.jem.workbench.utility.JavaModelListener; -/** - * This class listens for changes to the java model and flushs the - * appropriate class introspection. - */ - -public class BeaninfoModelSynchronizer extends JavaModelListener { - protected BeaninfoAdapterFactory fAdapterFactory; - protected IJavaProject fProject; // The project this listener is opened on. - private static final IPath BEANINFOCONFIG_PATH = new Path(BeaninfoNature.P_BEANINFO_SEARCH_PATH); //$NON-NLS-1$ - - public BeaninfoModelSynchronizer(BeaninfoAdapterFactory aFactory, IJavaProject aProject) { - super(ElementChangedEvent.POST_CHANGE); - fAdapterFactory = aFactory; - fProject = aProject; - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.adapters.jdom.JavaModelListener#getJavaProject() - */ - protected IJavaProject getJavaProject() { - return fProject; - } - /* (non-Javadoc) - * @see org.eclipse.jem.internal.adapters.jdom.JavaModelListener#isAlsoClasspathChange(org.eclipse.core.runtime.IPath) - */ - protected boolean isAlsoClasspathChange(IPath path) { - return path.equals(BEANINFOCONFIG_PATH); - } - - /** - * Stop the synchronizer from listening to any more changes. - */ - public void stopSynchronizer(boolean clearResults) { - JavaCore.removeElementChangedListener(this); - getAdapterFactory().closeAll(clearResults); - } - - public BeaninfoAdapterFactory getAdapterFactory() { - return fAdapterFactory; - } - - protected void processJavaElementChanged(IJavaProject element, IJavaElementDelta delta) { - if (isInClasspath(element)) { - if (delta.getKind() == IJavaElementDelta.REMOVED || delta.getKind() == IJavaElementDelta.ADDED) { - // Don't need to do anything for delete/close/add/open of main project because there is much more that needs to - // be done by BeaninfoNature on project close/delete, so nature listens for this and does the appropriate cleanup. - if (!element.equals(fProject)) { - // However, all other projects are required projects and if they are deleted/closed/added/opened when need to do - // a full flush because we don't know any of the state, whether they are still there or not. - getAdapterFactory().markAllStale(); - } - return; - } else if (isClasspathResourceChange(delta)) { - getAdapterFactory().markAllStale(); // The .classpath file (or .beaninfoconfig) itself in SOME DEPENDENT PROJECT has changed. - return; - } - processChildren(element, delta); - } - } - - /** - * Handle the change for a single element, children will be handled separately. - * If a working copy, then ignore it because we don't care about changes until - * they are committed. Else, if the CU has changed content then mark all of the - * types in this CU (such as inner classes) as stale. - * If it is not a content change then process the children. - */ - protected void processJavaElementChanged(ICompilationUnit element, IJavaElementDelta delta) { - switch (delta.getKind()) { - case IJavaElementDelta.CHANGED : - // A file save had occurred. It doesn't matter if currently working copy or not. - // It means something has changed to the file on disk, but don't know what. - if ((delta.getFlags() & IJavaElementDelta.F_PRIMARY_RESOURCE) != 0) { - getAdapterFactory().markStaleIntrospectionPlusInner(getFullNameFromElement(element), false); // Flush everything, including inner classes. - } - - break; - case IJavaElementDelta.ADDED: - case IJavaElementDelta.REMOVED: - // Need to know for add because we optimize the beaninfo such that once found as undefined, it won't - // introspect again until we mark it stale. So we need to mark it stale to refresh it. - - // It doesn't matter if totally removed or just moved somewhere else, we will clear out - // adapter because there could be a rename which would be a different class. - // Currently the element is already deleted or added and there is no way to find the types in the unit to flush. - // So instead we ask factory to flush all it any that start with it plus for inner classes. - getAdapterFactory().markStaleIntrospectionPlusInner(getFullNameFromElement(element), true); // Flush everything, including inner classes. - break; - } - } - - /** - * Handle the change for a single element, children will be handled separately. - */ - protected void processJavaElementChanged(IClassFile element, IJavaElementDelta delta) { - if (delta.getKind() == IJavaElementDelta.REMOVED) { - // It doesn't matter if totally removed or just moved somewhere else, we will clear out and remove the - // adapter because there could be a rename which would be a different class. - // Currently the element is already deleted and there is no way to find the types in the unit to remove. - // So instead we ask factory to remove all it any that start with it plus for inner classes. - getAdapterFactory().markStaleIntrospectionPlusInner(getFullNameFromElement(element), true); - return; // Since the classfile was removed we don't need to process the children (actually the children list will be empty - } - IJavaElementDelta[] children = delta.getAffectedChildren(); - for (int ii = 0; ii < children.length; ii++) { - processDelta(children[ii]); - } - } - - protected String getFullNameFromElement(IJavaElement element) { - String name = element.getElementName(); - if (!(element instanceof ICompilationUnit || element instanceof IClassFile)) - return name; // Shouldn't be here - - // remove extension. - int periodNdx = name.lastIndexOf('.'); - if (periodNdx == -1) - return name; // Shouldn't be here. There should be an extension - - String typeName = null; - String parentName = element.getParent().getElementName(); - if (parentName == null || parentName.length() == 0) - typeName = name.substring(0, periodNdx); // In default package - else - typeName = parentName + "." + name.substring(0, periodNdx); //$NON-NLS-1$ - - return typeName; - } - - /** - * Handle the change for a single element, children will be handled separately. - * If the classpath has changed, mark all as stale because we don't know what - * has changed. Things that were in the path may no longer be in the path, or - * the order was changed, which could affect the introspection. - */ - protected void processJavaElementChanged(IPackageFragmentRoot element, IJavaElementDelta delta) { - if (isClassPathChange(delta)) - fAdapterFactory.markAllStale(); - else - super.processJavaElementChanged(element, delta); - } - - protected void processJavaElementChanged(IPackageFragment element, IJavaElementDelta delta) { - switch (delta.getKind()) { - case IJavaElementDelta.ADDED: - break; // Don't need to do anything on a new package. If this was from a new fragroot, we would recycle already. Otherwise, it will find this package on the first use. - case IJavaElementDelta.REMOVED: - if (delta.getAffectedChildren().length == 0) - fAdapterFactory.markAllStale(); - break; - default : - super.processJavaElementChanged(element, delta); - } - } - - - /** - * Handle the change for a single element, children will be handled separately. - * Something about the type has changed. If it was removed (not a move), then close the - * adapter too. - */ - protected void processJavaElementChanged(IType element, IJavaElementDelta delta) { - if (delta.getKind() == IJavaElementDelta.REMOVED) { - // Close it out. Doesn't matter if moved_to, that would be a rename which requires brand new class. - // We can't actually get rid of the beaninfo adapter because it may be asked for again - // just to see if not defined. It may also come back later and we want to know about - // it to recycle the vm. - getAdapterFactory().markStaleIntrospection(element.getFullyQualifiedName(), true); - } else - getAdapterFactory().markStaleIntrospection(element.getFullyQualifiedName(), false); // Just mark it stale - processChildren(element, delta); - } - - public String toString() { - return super.toString()+" "+fProject.getElementName(); //$NON-NLS-1$ - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoNature.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoNature.java deleted file mode 100644 index 6011fa438..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoNature.java +++ /dev/null @@ -1,1026 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: BeaninfoNature.java,v $ - * $Revision: 1.43 $ $Date: 2006/05/23 15:43:06 $ - */ - -import java.io.*; -import java.text.MessageFormat; -import java.util.*; -import java.util.logging.Level; - -import javax.xml.parsers.*; -import javax.xml.transform.*; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.*; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; -import org.eclipse.jdt.core.*; -import org.osgi.framework.Bundle; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.xml.sax.InputSource; - -import org.eclipse.jem.internal.beaninfo.core.*; -import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter; -import org.eclipse.jem.internal.java.init.JavaInit; -import org.eclipse.jem.internal.plugin.JavaEMFNature; -import org.eclipse.jem.internal.proxy.core.*; -import org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo.ContainerPaths; -import org.eclipse.jem.java.adapters.JavaXMIFactory; -import org.eclipse.jem.util.emf.workbench.ProjectResourceSet; -import org.eclipse.jem.util.emf.workbench.ResourceHandler; - - -/** - * The beaninfo nature. It is created for a project and holds the - * necessary info for beaninfo to be performed on a project. - */ - -public class BeaninfoNature implements IProjectNature { - - public static final String NATURE_ID = BeaninfoPlugin.PI_BEANINFO_PLUGINID + ".BeanInfoNature"; //$NON-NLS-1$ - public static final String P_BEANINFO_SEARCH_PATH = ".beaninfoConfig"; //$NON-NLS-1$ - - public static final QualifiedName CONFIG_INFO_SESSION_KEY = new QualifiedName(BeaninfoPlugin.PI_BEANINFO_PLUGINID, "CONFIG_INFO"); //$NON-NLS-1$ - public static final QualifiedName BEANINFO_CONTRIBUTORS_SESSION_KEY = new QualifiedName(BeaninfoPlugin.PI_BEANINFO_PLUGINID, "BEANINFO_CONTRIBUTORS"); //$NON-NLS-1$ - - private ProxyFactoryRegistry.IRegistryListener registryListener = new ProxyFactoryRegistry.IRegistryListener() { - /** - * @see org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry.IRegistryListener#registryTerminated(ProxyFactoryRegistry) - */ - public void registryTerminated(ProxyFactoryRegistry registry) { - prematureRegistryTerminate(); - markAllStale(); - }; - }; - - /** - * Get the runtime nature for the project, create it if necessary. - */ - public static BeaninfoNature getRuntime(IProject project) throws CoreException { - JavaEMFNature.createRuntime(project); // Must force JAVAEMFNature creation first before we try to get ours. There is a chicken/egg problem if we let our nature try to get JavaEMFNature during setProject. - if (project.hasNature(NATURE_ID)) - return (BeaninfoNature) project.getNature(NATURE_ID); - else - return createRuntime(project); - } - - /** - * Return whether this project has a BeanInfo runtime turned on. - * - * @param project - * @return <code>true</code> if it has the a BeanInfo runtime. - * @throws CoreException - * - * @since 1.0.0 - */ - public static boolean hasRuntime(IProject project) throws CoreException { - return project.hasNature(NATURE_ID); - } - - /** - * Test if this is a valid project for a Beaninfo Nature. It must be - * a JavaProject. - */ - public static boolean isValidProject(IProject project) { - try { - return project.hasNature(JavaCore.NATURE_ID); - } catch (CoreException e) { - return false; - } - } - - /** - * Create the runtime. - */ - private static BeaninfoNature createRuntime(IProject project) throws CoreException { - if (!isValidProject(project)) - throw new CoreException( - new Status( - IStatus.ERROR, - BeaninfoPlugin.PI_BEANINFO_PLUGINID, - 0, - MessageFormat.format( - BeanInfoAdapterMessages.INTROSPECT_FAILED_EXC_, - new Object[] { project.getName(), BeanInfoAdapterMessages.BeaninfoNature_InvalidProject}), - null)); - - addNatureToProject(project, NATURE_ID); - return (BeaninfoNature) project.getNature(NATURE_ID); - } - - private static void addNatureToProject(IProject proj, String natureId) throws CoreException { - IProjectDescription description = proj.getDescription(); - String[] prevNatures = description.getNatureIds(); - String[] newNatures = new String[prevNatures.length + 1]; - System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length); - newNatures[prevNatures.length] = natureId; - description.setNatureIds(newNatures); - proj.setDescription(description, null); - } - - private IProject fProject; - protected ProxyFactoryRegistry fRegistry; - protected ResourceSet javaRSet; - protected BeaninfoModelSynchronizer fSynchronizer; - protected static BeaninfoJavaReflectionKeyExtension fReflectionKeyExtension; - - /** - * Configures the project with this nature. - * This is called by <code>IProject.getNature</code> and should not - * be called directly by clients. - * The nature extension id is added to the list of natures on the project by - * <code>IProject.getNature</code>, and need not be added here. - * - * @exception CoreException if this method fails. - */ - public void configure() throws CoreException { - } - - /** - * Removes this nature from the project, performing any required deconfiguration. - * This is called by <code>IProject.removeNature</code> and should not - * be called directly by clients. - * The nature id is removed from the list of natures on the project by - * <code>IProject.removeNature</code>, and need not be removed here. - * - * @exception CoreException if this method fails. - */ - public void deconfigure() throws CoreException { - removeSharedProperty(P_BEANINFO_SEARCH_PATH, null); - cleanup(true, true); - } - - /** - * Shutdown the nature. Called by BeanInfoPlugin to tell the nature that the plugin is being shutdown. - * It needs to cleanup. - * TODO <package-protected> because only BeanInfoPlugin should call it. (public for now but when we make - * BeanInfoNature an API it will be moved into the same package as BeanInfoPlugin). - * - * @since 1.0.0 - */ - public void shutdown() { - cleanup(true, false); - } - - - /** - * Return a new ResourceSet that is linked correctly to this Beaninfo Nature. - * <p> - * This links up a ResourceSet so that it will work correctly with this nature. - * It makes sure that going through the ResourceSet that any "java:/..." - * classes can be found and it makes sure that any new classes are placed into the - * nature's resource set and not resource set doing the calling. - * <p> - * This should be used any time a resource set is needed that is not the - * project wide resource set associated with beaninfos, but will reference - * Java Model classes or instantiate. - * <p> - * An additional change is made too. The ResourceFactoryRegistry's extensionToResourceFactory map is modified - * to have an "java"->XMIResourceFactory entry added to it if EMF Examples is loaded. EMF Examples add - * the "java" extension and sets it to their own special JavaResourceFactory. - * If EMF Examples is not loaded, then it falls back to the default "*" mapping, which is to XMIResourceFactory. - * This normally causes problems for many - * customers. If users of this resource set really want the EMF examples entry instead, after they retrieve the - * new resource set they can do this: - * <p> - * <pre><code> - * rset = beaninfoNature.newResourceSet(); - * rset.getResourceFactoryRegistry().getExtensionToFactoryMap().remove("java"); - * </code></pre> - * - * @return a ResourceSet that is specially connected to the JEM java model. - * - * @since 1.0.0 - */ - public ProjectResourceSet newResourceSet() { - SpecialResourceSet rset = new SpecialResourceSet(); - rset.add(new ResourceHandler() { - public EObject getEObjectFailed(ResourceSet originatingResourceSet, URI uri, boolean loadOnDemand) { - return null; // We don't have any special things we can do in this case. - } - - public Resource getResource(ResourceSet originatingResourceSet, URI uri) { - // Always try to get it out of the nature's resource set because it may of been loaded there either as - // the "java:..." type or it could of been an override extra file (such as an override EMF package, for - // example jcf has a side package containing the definition of the new attribute type. That file - // will also be loaded into this resourceset. So to find it we need to go in here and try. - // - // However, if not found we won't go and try to load the resource. That could load in the wrong place. - // Kludge: Because of a bug (feature :-)) in XMLHandler.getPackageFromURI(), it doesn't use getResource(...,true) and it tries instead - // to use uri inputstream to load the package when not found. This bypasses our special create resource and so - // packages are not automatically created. So we need to do load on demand here instead if it is a java protocol. - // EMF will not be fixing this. It is working as designed. - return getResourceSet().getResource(uri, JavaXMIFactory.SCHEME.equals(uri.scheme())); - } - - public Resource createResource(ResourceSet originatingResourceSet, URI uri) { - // This is the one. It has got here because it couldn't find a resource already loaded. - // If it is a "java:/..." protocol resource, then we want to make sure it is loaded at the BeaninfoNature context - // instead of the lower one. - if (JavaXMIFactory.SCHEME.equals(uri.scheme())) - return getResourceSet().getResource(uri, true); - else - return null; - } - }); - // [71473] Restore "*.java" to be an XMIResource. If EMF Examples are loaded they overload this and load their special resource for "*.java" which we don't want. - // If some user really wants that, they grab the resource resource set and remove our override. - if (Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("java")) { //$NON-NLS-1$ - // Need to add an override to go to XMI instead. - rset.getResourceFactoryRegistry().getExtensionToFactoryMap().put("java", new XMIResourceFactoryImpl()); //$NON-NLS-1$ - } - return rset; - } - /** - * Clean up, this means either the project is being closed, deleted, or it means that - * the nature is being removed from the project. Either way that means to - * terminate the VM and remove what we added to the context if the flag says clear it. - * <p> - * This should be called ONLY when this instance of the nature is no longer needed. It - * will be recreated for any new uses. That is because we will be removing ourselves - * from the list of active natures in the BeanInfoPlugin. - * <p> - * <b>Note:</b> This will be called from the BeanInfoCacheController. It knows when the project is - * being closed or deleted. - * - * @param clearResults clear the results such that any JEM model objects have no BeanInfo - * adapters attached to them. This allows BeanInfo to be GC'd without being hung onto. - * - * @param deregister Deregister from the BeanInfoPlugin. Normally this will always be true, but it - * will be called with false when BeanInfoPlugin is calling back to shutdown. - */ - public synchronized void cleanup(boolean clearResults, boolean deregister) { - if (deregister) - BeaninfoPlugin.getPlugin().removeBeanInfoNature(this); - fSynchronizer.stopSynchronizer(clearResults); - Init.cleanup(javaRSet, clearResults); - if (fRegistry != null) - fRegistry.terminateRegistry(true); - - projectCleaned(); - javaRSet = null; - fRegistry = null; - fProject = null; - fSynchronizer = null; - } - - /** - * Returns the project to which this project nature applies. - * - * @return the project handle - */ - public IProject getProject() { - return fProject; - } - - /** - * Sets the project to which this nature applies. - * Used when instantiating this project nature runtime. - * This is called by <code>IProject.addNature</code> - * and should not be called directly by clients. - * - * @param project the project to which this nature applies - */ - public void setProject(IProject project) { -// BeanInfoCacheController.INSTANCE.getClass(); // Instantiates the controller if not already started. - fProject = project; - BeaninfoPlugin.getPlugin().addBeanInfoNature(this); - - try { - // The nature has been started for this project, need to setup the introspection process now. - JavaEMFNature javaNature = JavaEMFNature.createRuntime(fProject); - JavaInit.init(); - if (fReflectionKeyExtension == null) { - // Register the reflection key extension. - fReflectionKeyExtension = new BeaninfoJavaReflectionKeyExtension(); - JavaXMIFactory.INSTANCE.registerReflectionKeyExtension(fReflectionKeyExtension); - } - - javaRSet = javaNature.getResourceSet(); - Init.initialize(javaRSet, new IBeaninfoSupplier() { - public ProxyFactoryRegistry getRegistry() { - return BeaninfoNature.this.getRegistry(); - } - - public boolean isRegistryCreated() { - return BeaninfoNature.this.isRegistryCreated(); - } - - public void closeRegistry() { - BeaninfoNature.this.closeRegistry(); - } - - public IProject getProject() { - return BeaninfoNature.this.getProject(); - } - - public ProjectResourceSet getNewResourceSet() { - return BeaninfoNature.this.newResourceSet(); - } - - public ResourceSet getProjectResourceSet() { - return getResourceSet(); - } - }); - fSynchronizer = - new BeaninfoModelSynchronizer( - (BeaninfoAdapterFactory) EcoreUtil.getAdapterFactory(javaRSet.getAdapterFactories(), IIntrospectionAdapter.ADAPTER_KEY), - JavaCore.create(javaNature.getProject())); - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e.getStatus()); - } - } - - /** - * Close the registry. It needs to be recycled because a class has changed - * and now the new class needs to be accessed. - */ - protected void closeRegistry() { - ProxyFactoryRegistry reg = null; - synchronized (this) { - reg = fRegistry; - fRegistry = null; - try { - // Wipe out the Session properties so that they are recomputed. - getProject().setSessionProperty(CONFIG_INFO_SESSION_KEY, null); - getProject().setSessionProperty(BEANINFO_CONTRIBUTORS_SESSION_KEY, null); - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.INFO); - } - } - if (reg != null) { - reg.removeRegistryListener(registryListener); - reg.terminateRegistry(); - } - } - - private static final String PI_CLASS = "class"; //$NON-NLS-1$ - - /** - * Using the given configuration info, compute the BeanInfo config info needed. This sets the - * session properties BEANINFO_CONTRIBUTORS_SESSION_KEY and CONFIG_INFO_SESSION_KEY. - * - * @param info - * @throws CoreException - * - * @since 1.1.0 - */ - public static void computeBeanInfoConfigInfo(IConfigurationContributionInfo info) throws CoreException { - // First time for this nature, or first time after registry reset. Need to compute the info. - // It is possible for this to be called BEFORE the first usage of BeanInfo. The editor usually - // brings up the editor's registry before it gets anything from BeanInfo. - List contributorsList = new ArrayList(10); - if (!info.getContainerIds().isEmpty()) { - // Run through all of the visible container ids that are applicable and get BeanInfo contributors. - Iterator containerIdItr = info.getContainerIds().values().iterator(); - while (containerIdItr.hasNext()) { - ContainerPaths containerPaths = (ContainerPaths) containerIdItr.next(); - IConfigurationElement[] contributors = BeaninfoPlugin.getPlugin().getContainerIdContributors(containerPaths.getContainerId(), containerPaths.getVisibleContainerPaths()); - for (int i = 0; i < contributors.length; i++) { - try { - Object contributor = contributors[i].createExecutableExtension(PI_CLASS); - if (contributor instanceof IBeanInfoContributor) - contributorsList.add(contributor); - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING); - } - } - } - } - - if (!info.getPluginIds().isEmpty()) { - // Run through all of the visible plugin ids that are applicable and get BeanInfo contributors. - Iterator pluginIdItr = info.getPluginIds().entrySet().iterator(); - while (pluginIdItr.hasNext()) { - Map.Entry entry = (Map.Entry) pluginIdItr.next(); - if (((Boolean) entry.getValue()).booleanValue()) { - IConfigurationElement[] contributors = BeaninfoPlugin.getPlugin().getPluginContributors( - (String) entry.getKey()); - if (contributors != null) { - for (int i = 0; i < contributors.length; i++) { - try { - Object contributor = contributors[i].createExecutableExtension(PI_CLASS); - if (contributor instanceof IBeanInfoContributor) - contributorsList.add(contributor); - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING); - } - } - } - } - } - } - - // Save it for all beaninfo processing (and configuration processing if they implement proxy configuration contributor). - IBeanInfoContributor[] explicitContributors = (IBeanInfoContributor[]) contributorsList.toArray(new IBeanInfoContributor[contributorsList.size()]); - info.getJavaProject().getProject().setSessionProperty(BEANINFO_CONTRIBUTORS_SESSION_KEY, explicitContributors); - // Save it for override processing. That happens over and over later after all config processing is done. - // Do it last so that if there is a race condition, since this property is a flag to indicate we have data, - // we need to make sure the Beaninfo data is already set at the point we set this. - // We could actually set it twice because of this, but it is the same data, so, so what. - info.getJavaProject().getProject().setSessionProperty(CONFIG_INFO_SESSION_KEY, info); - } - - /** - * Get registry, creating it if necessary. - * @return the registry. - * - * @since 1.0.0 - */ - public ProxyFactoryRegistry getRegistry() { - synchronized (this) { - if (fRegistry != null) - return fRegistry; - } - // Now need to start the appropriate job. In another class so that it can handle dynamically checking if - // UI is available to even do this (it maybe not in a UI mode, so then just do it. - CreateRegistryJobHandler.createRegistry(this); - return fRegistry; - } - - private static final long NO_PREMATURE_TERMINATE_TIME = -1; - private int registryPrematureTerminateCount; - private long registryLastPrematureTerminateTime = NO_PREMATURE_TERMINATE_TIME; - - /* - * This is <package-protected> so that only the appropriate create job in this - * package can call it. This is because this must be controlled to only be - * done when build not in progress and serial access. - */ - void createRegistry(IProgressMonitor pm) { - pm.beginTask(BeanInfoAdapterMessages.UICreateRegistryJobHandler_StartBeaninfoRegistry, 100); - if (isRegistryCreated()) { - pm.done(); - return; // It had already been created. Could of been because threads were racing to do the creation, and one got there first. - } - - // Test to see if we have terminated too many times within the last 10 minutes. If we have then don't try again. - synchronized(this) { - if (registryLastPrematureTerminateTime != NO_PREMATURE_TERMINATE_TIME) { - long lastPrematureTerminateInterval = System.currentTimeMillis() - registryLastPrematureTerminateTime; - // Don't try again within 1 sec of last premature terminate. It will still be bad. - // Of if there have been more than 3 and it has been 10 mins since the last try. - if (lastPrematureTerminateInterval < 3*1000 || (registryPrematureTerminateCount > 3 && lastPrematureTerminateInterval < 10 * 60 * 1000)) - return; - } - } - - ProxyFactoryRegistry registry = null; - try { - ConfigurationContributor configurationContributor = (ConfigurationContributor) getConfigurationContributor(); - configurationContributor.setNature(this); - registry = ProxyLaunchSupport.startImplementation(fProject, "Beaninfo", //$NON-NLS-1$ - new IConfigurationContributor[] { configurationContributor}, false, new SubProgressMonitor(pm, 100)); - synchronized(this) { - if (!isRegistryCreated()) { - projectCleaned(); - registry.addRegistryListener(registryListener); - fRegistry = registry; - } else { - // It was created while we were creating. So use the current one. Terminate the one just created. Not needed. - registry.terminateRegistry(false); - } - } - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e.getStatus()); - } finally { - if (registry == null) { - // It didn't create. Treat as premature terminate. - prematureRegistryTerminate(); - } - pm.done(); - } - } - - /** - * Called by others in package (BeaninfoCacheController) to let know a clean has occured. - * - * TODO this should be package-protected but until in same package as cache controller it is public. - * @since 1.2.0 - */ - public synchronized void projectCleaned() { - // On a clean we will reset the counters. - registryPrematureTerminateCount = 0; - registryLastPrematureTerminateTime = NO_PREMATURE_TERMINATE_TIME; - } - - public synchronized boolean isRegistryCreated() { - return fRegistry != null; - } - - /** - * Check to see if the nature is still valid. If the project has been - * renamed, the nature is still around, but the project has been closed. - * So the nature is now invalid. - * - * @return Is this a valid nature. I.e. is the project still open. - */ - public boolean isValidNature() { - return fProject != null; - } - - /** - * Set the search path onto the registry. - */ - protected void setProxySearchPath(ProxyFactoryRegistry registry, List searchPaths) { - if (searchPaths != null) { - String[] stringSearchPath = (String[]) searchPaths.toArray(new String[searchPaths.size()]); - Utilities.setBeanInfoSearchPath(registry, stringSearchPath); - } else - Utilities.setBeanInfoSearchPath(registry, null); - } - - private static final String ENCODING = "UTF-8"; //$NON-NLS-1$ - static final String sBeaninfos = "beaninfos"; // Root element name //$NON-NLS-1$ - /** - * Get the persistent search path. It is copy. - */ - public BeaninfosDoc getSearchPath() { - BeaninfosDoc bdoc = null; - try { - InputStream property = getSharedProperty(P_BEANINFO_SEARCH_PATH); - if (property != null) { - try { - // Need to reconstruct from the XML format. - Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new InputStreamReader(property, ENCODING))); - Element root = doc.getDocumentElement(); - if (root != null && root.getNodeName().equalsIgnoreCase(sBeaninfos)) { - bdoc = BeaninfosDoc.readEntry(new DOMReader(), root, getProject()); - } - } finally { - try { - property.close(); - } catch (IOException e) { - } - } - } - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e.getStatus()); - } catch (Exception e) { - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "", e)); //$NON-NLS-1$ - } - return bdoc; - } - - /** - * Set the persistent search path. No progress monitor. - */ - public void setSearchPath(BeaninfosDoc searchPath) throws CoreException { - setSearchPath(searchPath, null); - } - - /** - * Set the persistent search path with a progress monitor - */ - public void setSearchPath(BeaninfosDoc searchPath, IProgressMonitor monitor) throws CoreException { - String property = null; - if (searchPath != null && searchPath.getSearchpath().length > 0) { - try { - Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); - Element root = doc.createElement(sBeaninfos); // Create Root Element - IBeaninfosDocEntry[] entries = searchPath.getSearchpath(); - for (int i = 0; i < entries.length; i++) - root.appendChild(entries[i].writeEntry(doc, getProject())); // Add to the search path - doc.appendChild(root); // Add Root to Document - StringWriter strWriter = new StringWriter(); - - Result result = new StreamResult(strWriter); - Source source = new DOMSource(doc); - Transformer transformer = TransformerFactory.newInstance().newTransformer(); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$ - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$ - transformer.transform(source, result); - property = strWriter.toString(); - } catch (TransformerConfigurationException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING); - } catch (TransformerException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING); - } catch (ParserConfigurationException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING); - } catch (FactoryConfigurationError e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING); - } - } - - if (property != null) { - // If it hasn't changed, don't write it back out. This is so that if the file hasn't - // been checked out and it is the same, we don't want to bother the user. This is because - // we don't know if the user had simply browsed the search path or had actually changed and - // set it back to what it was. In either of those cases it would be a bother to ask the - // user to checkout the file. - InputStream is = getSharedProperty(P_BEANINFO_SEARCH_PATH); - if (is != null) { - try { - try { - InputStreamReader reader = new InputStreamReader(is, ENCODING); - char[] chars = new char[1000]; - StringBuffer oldProperty = new StringBuffer(1000); - int read = reader.read(chars); - while (read != -1) { - oldProperty.append(chars, 0, read); - read = reader.read(chars); - } - if (oldProperty.toString().equals(property)) - return; - } catch (IOException e) { - } // Didn't change. - } finally { - try { - is.close(); - } catch (IOException e) { - } - } - } - setSharedProperty(P_BEANINFO_SEARCH_PATH, property, monitor); - } else - removeSharedProperty(P_BEANINFO_SEARCH_PATH, monitor); - } - - /** - * Return the resource set for all java packages in this nature. - */ - public ResourceSet getResourceSet() { - return javaRSet; - } - - protected void markAllStale() { - // Mark all stale so that the registry will be recycled. - if (fRegistry != null) { - // We have a registry running, we need to indicate recycle is needed. - fSynchronizer.getAdapterFactory().markAllStale(); - // Mark all stale. Next time we need anything it will be recycled. - } - } - - /** - * Compute the file name to use for a given shared property - */ - protected String computeSharedPropertyFileName(QualifiedName qName) { - return qName.getLocalName(); - } - - /** - * Retrieve a shared property on a project. If the property is not defined, answers null. - * Note that it is orthogonal to IResource persistent properties, and client code has to decide - * which form of storage to use appropriately. Shared properties produce real resource files which - * can be shared through a VCM onto a server. Persistent properties are not shareable. - * - */ - protected InputStream getSharedProperty(String propertyFileName) throws CoreException { - IFile rscFile = getProject().getFile(propertyFileName); - if (rscFile.exists()) - return rscFile.getContents(true); - else - return null; - } - - /** - * Record a shared persistent property onto a project. - * Note that it is orthogonal to IResource persistent properties, and client code has to decide - * which form of storage to use appropriately. Shared properties produce real resource files which - * can be shared through a VCM onto a server. Persistent properties are not shareable. - * - * shared properties end up in resource files, and thus cannot be modified during - * delta notifications (a CoreException would then be thrown). - * - */ - protected void setSharedProperty(String propertyName, String value, IProgressMonitor monitor) throws CoreException { - - try { - IFile rscFile = getProject().getFile(propertyName); - InputStream input = new ByteArrayInputStream(value.getBytes(ENCODING)); - // update the resource content - if (rscFile.exists()) { - rscFile.setContents(input, true, false, null); - } else { - rscFile.create(input, true, monitor); - } - } catch (UnsupportedEncodingException e) { - } - } - - /** - * Remove a shared persistent property onto a project. - * Note that it is orthogonal to IResource persistent properties, and client code has to decide - * which form of storage to use appropriately. Shared properties produce real resource files which - * can be shared through a VCM onto a server. Persistent properties are not shareable. - * - * shared properties end up in resource files, and thus cannot be modified during - * delta notifications (a CoreException would then be thrown). - * - */ - protected void removeSharedProperty(String propertyName, IProgressMonitor monitor) throws CoreException { - - IFile rscFile = getProject().getFile(propertyName); - rscFile.delete(true, true, monitor); - } - - /** - * Return a configuration contributor that sets up a vm to allow - * introspection. This will make sure the appropriate paths - * are in the classpath to allow access to the beaninfos, and - * it will setup the beaninfo search path for this project. - */ - public IConfigurationContributor getConfigurationContributor() { - return new ConfigurationContributor(getSearchPath()); - } - - private void prematureRegistryTerminate() { - synchronized(BeaninfoNature.this) { - registryPrematureTerminateCount++; - registryLastPrematureTerminateTime = System.currentTimeMillis(); - } - } - - private static class ConfigurationContributor extends ConfigurationContributorAdapter { - - private BeaninfosDoc doc; - List computedSearchPath; - - // The nature. If the nature is not set then this contributor is one - // used by some other later proxy registry to get the beaninfo classes into their paths. In that case - // we can expect the config info to be in the session variable for our use. Otherwise we will need to - // add it here. Also don't set searchpath stuff if not nature because only the beaninfo one will do introspection. - private BeaninfoNature nature; - - private IConfigurationContributionInfo info; - private IBeanInfoContributor[] explicitContributors; - - public ConfigurationContributor(BeaninfosDoc doc) { - this.doc = doc; - } - - /* - * Set that this is the nature contributor. Not null, means that this is the contributor being - * used to setup the registry for the project's beaninfo nature. null (default) means that this - * is one created to add to some editor's registry. - * - * Note: This MUST be set before initialize is called or it will not work correctly. If not set, it - * will be considered not for BeanInfo nature directly. - */ - public void setNature(BeaninfoNature nature) { - this.nature = nature; - if (nature != null) - computedSearchPath = new ArrayList(3); // We will be gathering this info. - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributor#initialize(org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo) - */ - public void initialize(IConfigurationContributionInfo info) { - this.info = info; - try { - if (info.getJavaProject().getProject().getSessionProperty(CONFIG_INFO_SESSION_KEY) == null) { - // TODO For now we will rebuild for each time we open a registry, but it actually is only needed if a classpath - // changes for some reason. At that point we can get it out of here. - - computeBeanInfoConfigInfo(info); - } - explicitContributors = (IBeanInfoContributor[]) info.getJavaProject().getProject().getSessionProperty(BEANINFO_CONTRIBUTORS_SESSION_KEY); - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - } - - public void contributeClasspaths(final IConfigurationContributionController controller) throws CoreException { - // Contribute for this project - contributeClasspathsForProject(controller, info.getJavaProject().getProject(), doc, true); - - if (!info.getProjectPaths().isEmpty()) { - // Run through all of the visible projects and contribute the classpaths (which come from the BeanInfo docs, if they have any). - IWorkspaceRoot root = info.getJavaProject().getProject().getWorkspace().getRoot(); - Iterator projIter = info.getProjectPaths().entrySet().iterator(); - while (projIter.hasNext()) { - Map.Entry entry = (Map.Entry) projIter.next(); - if (((Boolean) entry.getValue()).booleanValue()) { - IResource res = root.findMember((IPath) entry.getKey()); - if (res instanceof IProject && ((IProject) res).isOpen() && BeaninfoNature.hasRuntime((IProject) res)) - contributeClasspathsForProject(controller, (IProject) res, BeaninfoNature.getRuntime((IProject) res) - .getSearchPath(), false); - } - } - } - - if (!info.getContainerIds().isEmpty()) { - // Run through all of the visible container ids that are applicable. - Iterator containerIdItr = info.getContainerIds().values().iterator(); - while (containerIdItr.hasNext()) { - ContainerPaths containerPaths = (ContainerPaths) containerIdItr.next(); - processBeaninfoEntries(BeaninfoPlugin.getPlugin().getContainerIdBeanInfos(containerPaths.getContainerId(), containerPaths.getVisibleContainerPaths()), - controller, info.getJavaProject()); - } - - } - - if (!info.getPluginIds().isEmpty()) { - // Run through all of the visible plugin ids that are applicable. - Iterator pluginIdItr = info.getPluginIds().entrySet().iterator(); - while (pluginIdItr.hasNext()) { - Map.Entry entry = (Map.Entry) pluginIdItr.next(); - if (((Boolean) entry.getValue()).booleanValue()) { - processBeaninfoEntries(BeaninfoPlugin.getPlugin().getPluginBeanInfos((String) entry.getKey()), controller, info.getJavaProject()); - } - } - - } - - if (!info.getContainers().isEmpty()) { - // Run through all of the visible containers that implement IBeanInfoContributor and ask them for the contributions. - Iterator containerItr = info.getContainers().entrySet().iterator(); - while (containerItr.hasNext()) { - Map.Entry entry = (Map.Entry) containerItr.next(); - if (((Boolean) entry.getValue()).booleanValue()) { - if (entry.getKey() instanceof IBeanInfoContributor) - processBeaninfoEntries(((IBeanInfoContributor) entry.getKey()).getBeanInfoEntryContributions(info), - controller, info.getJavaProject()); - } - } - - } - - // And finally run through the explicit contributors. - for (int i = 0; i < explicitContributors.length; i++) { - final IBeanInfoContributor contributor = explicitContributors[i]; - processBeaninfoEntries(contributor.getBeanInfoEntryContributions(info), controller, info.getJavaProject()); - if (contributor instanceof IConfigurationContributor) { - SafeRunner.run(new ISafeRunnable() { - public void handleException(Throwable exception) { - // do nothing. by default platform logs. - } - - public void run() throws Exception {; - if (contributor instanceof IConfigurationContributor) - ((IConfigurationContributor) contributor).contributeClasspaths(controller); - } - }); - } - } - - // Add the common to the end of the classpath. (Since we are now a jarred plugin, the common is not the plugin jar itself). - controller.contributeClasspath(BeaninfoPlugin.getPlugin().getBundle(), (IPath) null, IConfigurationContributionController.APPEND_USER_CLASSPATH, false); //$NON-NLS-1$ - - // Add the beaninfovm.jar and any nls to the end of the classpath. - controller.contributeClasspath(BeaninfoPlugin.getPlugin().getBundle(), "vm/beaninfovm.jar", IConfigurationContributionController.APPEND_USER_CLASSPATH, true); //$NON-NLS-1$ - } - - private IClasspathEntry get(IClasspathEntry[] array, SearchpathEntry se) { - for (int i = 0; i < array.length; i++) { - if (array[i].getEntryKind() == se.getKind() && array[i].getPath().equals(se.getPath())) - return array[i]; - } - return null; - } - - private static final IBeaninfosDocEntry[] EMPTY_ENTRIES = new IBeaninfosDocEntry[0]; - - /* - * Contribute classpaths for the specified project. If doc is passed in, then this is the top level and - * all should be added. If no doc, then this is pre-req'd project, and then we will handle exported entries only. - */ - protected void contributeClasspathsForProject( - IConfigurationContributionController controller, - IProject project, - BeaninfosDoc doc, - boolean toplevelProject) - throws CoreException { - - IJavaProject jProject = JavaCore.create(project); - IClasspathEntry[] rawPath = jProject.getRawClasspath(); - - // Search path of this project - IBeaninfosDocEntry[] entries = (doc != null) ? doc.getSearchpath() : EMPTY_ENTRIES; - - for (int i = 0; i < entries.length; i++) { - IBeaninfosDocEntry entry = entries[i]; - if (entry instanceof BeaninfoEntry) { - BeaninfoEntry be = (BeaninfoEntry) entry; - if (toplevelProject || be.isExported()) { - // First project or this is an exported beaninfo, so we process it. - processBeaninfoEntry(be, controller, jProject); - } - } else if (nature != null){ - // Just a search path entry. There is no beaninfo jar to pick up. - // We have a nature, so we process search path. - SearchpathEntry se = (SearchpathEntry) entry; - if (!toplevelProject) { - // We are in a nested project, find the raw classpath entry to see - // if this entry is exported. Only do it if exported. (Note: exported is only used on non-source. Source are always exported). - IClasspathEntry cpe = get(rawPath, se); - if (cpe == null || (cpe.getEntryKind() != IClasspathEntry.CPE_SOURCE && !cpe.isExported())) { - continue; // Not exist or not exported, so we don't want it here either. - } - } - - String pkg = se.getPackage(); - if (pkg != null) { - // Explicit search path - if (!computedSearchPath.contains(pkg)) - computedSearchPath.add(pkg); - } else { - // We no longer allow this, but just to be on safe side we test for it. - } - } - } - } - - protected void processBeaninfoEntries( - BeaninfoEntry[] entries, - IConfigurationContributionController controller, - IJavaProject javaProject) - throws CoreException { - if (entries != null) { - for (int i = 0; i < entries.length; i++) - processBeaninfoEntry(entries[i], controller, javaProject); - } - } - - protected void processBeaninfoEntry( - BeaninfoEntry entry, - IConfigurationContributionController controller, - IJavaProject javaProject) - throws CoreException { - Object[] cps = entry.getClasspath(javaProject); - for (int j = 0; j < cps.length; j++) { - Object cp = cps[j]; - if (cp instanceof IProject) - controller.contributeProject((IProject) cp); - else if (cp instanceof String) - controller.contributeClasspath(ProxyLaunchSupport.convertStringPathToURL((String) cp), IConfigurationContributionController.APPEND_USER_CLASSPATH); - else if (cp instanceof IPath) { - IPath path = (IPath) cp; - Bundle bundle = Platform.getBundle(path.segment(0)); - if (bundle != null) - controller.contributeClasspath(bundle, path.removeFirstSegments(1), IConfigurationContributionController.APPEND_USER_CLASSPATH, true); - } - } - - if (nature != null) { - // Now add in the package names. - SearchpathEntry[] sees = entry.getSearchPaths(); - for (int j = 0; j < sees.length; j++) { - SearchpathEntry searchpathEntry = sees[j]; - if (!computedSearchPath.contains(searchpathEntry.getPackage())) - computedSearchPath.add(searchpathEntry.getPackage()); - } - } - } - - public void contributeToConfiguration(final ILaunchConfigurationWorkingCopy config) { - for (int i = 0; i < explicitContributors.length; i++) { - final int ii = i; - SafeRunner.run(new ISafeRunnable() { - public void handleException(Throwable exception) { - // do nothing. by default platform logs. - } - - public void run() throws Exception { - IBeanInfoContributor contributor = explicitContributors[ii]; - if (contributor instanceof IConfigurationContributor) - ((IConfigurationContributor) contributor).contributeToConfiguration(config); - } - }); - } - } - - public void contributeToRegistry(final ProxyFactoryRegistry registry) { - if (nature != null) - nature.setProxySearchPath(registry, computedSearchPath); - for (int i = 0; i < explicitContributors.length; i++) { - final int ii = i; - SafeRunner.run(new ISafeRunnable() { - public void handleException(Throwable exception) { - // do nothing. by default platform logs. - } - - public void run() throws Exception { - IBeanInfoContributor contributor = explicitContributors[ii]; - if (contributor instanceof IConfigurationContributor) - ((IConfigurationContributor) contributor).contributeToRegistry(registry); - } - }); - } - } - } - - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoProxyConstants.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoProxyConstants.java deleted file mode 100644 index b401b2a02..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoProxyConstants.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 - *******************************************************************************/ -/* - * $RCSfile: BeaninfoProxyConstants.java,v $ - * $Revision: 1.7 $ $Date: 2006/05/23 15:43:06 $ - */ -package org.eclipse.jem.internal.beaninfo.adapters; - -import org.eclipse.jem.internal.proxy.core.*; - -/** - * This holds the proxy constants for access in beaninfo. It is created on a per-registry basis and stored in the constants section of the registry so - * that they can be accessed as needed. - * <p> - * To gain access to these constants, use the static accessor method "getConstants()" so that the instance is not created until actually needed. - * - * @since 1.0.0 - */ -public final class BeaninfoProxyConstants { - - private static final Object REGISTRY_KEY = new Object(); - - private final IMethodProxy introspectProxy; - - private final IMethodProxy getBeanInfoSearchPathProxy; - - private final IMethodProxy setBeanInfoSearchPathProxy; - - private final IMethodProxy sendBeanInfoProxy; - - /** - * Get the constants instance for the specified registry. - */ - public static BeaninfoProxyConstants getConstants(ProxyFactoryRegistry registry) { - if (registry != null && registry.isValid()) { - BeaninfoProxyConstants constants = (BeaninfoProxyConstants) registry.getConstants(REGISTRY_KEY); - if (constants == null) - registry.registerConstants(REGISTRY_KEY, constants = new BeaninfoProxyConstants(registry)); - return constants; - } else - return null; - } - - private BeaninfoProxyConstants(ProxyFactoryRegistry registry) { - - IStandardBeanTypeProxyFactory typeFactory = registry.getBeanTypeProxyFactory(); - - IBeanTypeProxy introspector = typeFactory.getBeanTypeProxy("java.beans.Introspector"); //$NON-NLS-1$ - getBeanInfoSearchPathProxy = introspector.getMethodProxy("getBeanInfoSearchPath"); //$NON-NLS-1$ - setBeanInfoSearchPathProxy = introspector.getMethodProxy("setBeanInfoSearchPath", "[Ljava.lang.String;"); //$NON-NLS-1$ //$NON-NLS-2$ - - IBeanTypeProxy modelingBeaninfo = typeFactory.getBeanTypeProxy("org.eclipse.jem.internal.beaninfo.vm.ModelingBeanInfo");//$NON-NLS-1$ - introspectProxy = modelingBeaninfo.getMethodProxy("introspect", new String[] { "java.lang.Class", "boolean", "int"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - - sendBeanInfoProxy = modelingBeaninfo.getMethodProxy("send"); //$NON-NLS-1$ - - } - - /** - * Get the sendBeanDecorator method proxy from ModelingBeanInfo. - * @return - * - * @since 1.1.0 - */ - public IMethodProxy getSendBeanInfoProxy() { - return sendBeanInfoProxy; - } - - /** - * Get the getBeanInfoSearchPath method proxy from Introspector. - * @return - * - * @since 1.0.0 - */ - public IMethodProxy getGetBeanInfoSearchPathProxy() { - return getBeanInfoSearchPathProxy; - } - - /** - * Get the setBeanInfoSearchPath method proxy from Introspector. - * @return - * - * @since 1.0.0 - */ - public IMethodProxy getSetBeanInfoSearchPathProxy() { - return setBeanInfoSearchPathProxy; - } - - /** - * Get the introspect method proxy from ModelingBeanInfo. - * @return - * - * @since 1.1.0 - */ - public IMethodProxy getIntrospectProxy() { - return introspectProxy; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoSuperAdapter.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoSuperAdapter.java deleted file mode 100644 index 672d8bcd3..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoSuperAdapter.java +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: BeaninfoSuperAdapter.java,v $ - * $Revision: 1.7 $ $Date: 2005/09/14 23:30:38 $ - */ - -import java.util.Collection; -import java.util.Iterator; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.ecore.impl.ESuperAdapter; -import org.eclipse.emf.ecore.util.EcoreUtil; - -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.internal.impl.JavaClassImpl; - -/** - * Used to know when events or any of the super classes change so - * that we can re-construct our all events list next time we need it. - * @version 1.0 - * @author - */ -public class BeaninfoSuperAdapter extends AdapterImpl { - - public static final Class ADAPTER_KEY = BeaninfoSuperAdapter.class; - - private boolean allEventsCollectionModified = true; - private boolean allPropertiesCollectionModified = true; - private boolean allOperationsCollectionModified = true; - - public BeaninfoSuperAdapter() { - super(); - } - - public void notifyChanged(Notification msg) { - if (msg.getEventType() != Notification.REMOVING_ADAPTER) - setFlags(msg.getFeatureID(JavaClass.class)); - } - - public boolean isAllEventsCollectionModified() { - return allEventsCollectionModified; - } - - public void setAllEventsCollectionModified(boolean newEventsModified) { - allEventsCollectionModified = newEventsModified; - } - - public boolean isAllOperationsCollectionModified() { - return allOperationsCollectionModified; - } - - public void setAllOperationsCollectionModified(boolean newOperationsModified) { - allOperationsCollectionModified = newOperationsModified; - } - - public void setAllPropertiesCollectionModified(boolean allPropertiesCollectionModified) { - this.allPropertiesCollectionModified = allPropertiesCollectionModified; - } - - public boolean isAllPropertiesCollectionModified() { - return allPropertiesCollectionModified; - } - - public Collection getSubclasses() { - // Get them from the ESuperAdapter. Easiest to do. - ESuperAdapter ea = ((JavaClassImpl) getTarget()).getESuperAdapter(); - return ea.getSubclasses(); - } - - public boolean isAdapterForType(Object type) { - return ADAPTER_KEY.equals(type); - } - - void setFlags(int featureId) { - switch (featureId) { - case JavaRefPackage.JAVA_CLASS__EVENTS : - setAllEventsCollectionModified(true); - break; - - case JavaRefPackage.JAVA_CLASS__EOPERATIONS: - setAllOperationsCollectionModified(true); - break; - - case JavaRefPackage.JAVA_CLASS__ESUPER_TYPES: - setAllEventsCollectionModified(true); - setAllPropertiesCollectionModified(true); - break; - - case JavaRefPackage.JAVA_CLASS__ESTRUCTURAL_FEATURES: - setAllPropertiesCollectionModified(true); - break; - - default : - break; - } - Iterator i = getSubclasses().iterator(); - while (i.hasNext()) { - Notifier n = (Notifier) i.next(); - BeaninfoSuperAdapter a = (BeaninfoSuperAdapter) EcoreUtil.getExistingAdapter(n, ADAPTER_KEY); - if (a != null) - a.setFlags(featureId); - } - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/CreateRegistryJobHandler.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/CreateRegistryJobHandler.java deleted file mode 100644 index a676113ce..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/CreateRegistryJobHandler.java +++ /dev/null @@ -1,165 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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 - *******************************************************************************/ -/* - * $RCSfile: CreateRegistryJobHandler.java,v $ - * $Revision: 1.14 $ $Date: 2005/08/24 20:31:29 $ - */ -package org.eclipse.jem.internal.beaninfo.adapters; - -import java.util.logging.Level; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.*; -import org.eclipse.core.runtime.jobs.*; - -import org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin; -import org.eclipse.jem.util.logger.proxy.Logger; - - - -/** - * This class is used by BeaninfoNature to handle the creation of the registry, - * This class will be a singleton. It is needed to handle if UI active without - * requiring UI plugin. (So headless will work too). The subclass <code>UICreateRegistryJobHandler</code> - * will be instantiated in case of UI active. - * @since 1.0.0 - */ -class CreateRegistryJobHandler { - private static CreateRegistryJobHandler jobHandler = null; - - public static void createRegistry(BeaninfoNature nature) { - synchronized (CreateRegistryJobHandler.class) { - if (jobHandler == null) { - if (Platform.getBundle("org.eclipse.ui") != null) { //$NON-NLS-1$ - try { - // There is a UI, it may not be active, but bring in UICreateRegistryJobHandler to do the - // actual work since it can reference the UI. - jobHandler = (CreateRegistryJobHandler) Class.forName("org.eclipse.jem.internal.beaninfo.adapters.UICreateRegistryJobHandler").newInstance(); //$NON-NLS-1$ - } catch (InstantiationException e) { - jobHandler = new CreateRegistryJobHandler(); - } catch (IllegalAccessException e) { - jobHandler = new CreateRegistryJobHandler(); - } catch (ClassNotFoundException e) { - jobHandler = new CreateRegistryJobHandler(); - } - } - } - } - - // See if Autobuild sleeping or waiting. This could be a race condition for us. We can't wait for it - // because we may already have the build rule locked by our thread. No way of testing this if beginRule was used. - // We can test if we are a build job (not an inline build), and if so, just go on. - // Maybe we can figure out in future if we find race condition happens significant amount of time. - IJobManager jobManager = Platform.getJobManager(); - Job currentJob = jobManager.currentJob(); - if (currentJob == null || (!currentJob.belongsTo(ResourcesPlugin.FAMILY_AUTO_BUILD) && !currentJob.belongsTo(ResourcesPlugin.FAMILY_MANUAL_BUILD))) { - // See if autojob is waiting or sleeping. - // Give it up to a second at .2 second intervals to try (i.e. 5 tries) - int tries = 5; - while (isAutoWaiting() && --tries>0) { - try { - Thread.sleep(200); // Wait just .2 seconds to give build a chance to start. If it is still not started, then just go on. - } catch (InterruptedException e) { - } - } - if (tries==0) { - Logger logger = BeaninfoPlugin.getPlugin().getLogger(); - if (logger.isLoggingLevel(Level.WARNING)) - logger.log("Build job waiting when trying to start beaninfo registry. Possible race.", Level.WARNING); // $NON-NLS-1$ //$NON-NLS-1$ - } - } - - jobHandler.processCreateRegistry(nature); - } - - private static boolean isAutoWaiting() { - Job[] autojobs = Platform.getJobManager().find(ResourcesPlugin.FAMILY_AUTO_BUILD); - for (int i = 0; i < autojobs.length; i++) { - int state = autojobs[i].getState(); - if (state == Job.WAITING || state == Job.SLEEPING) - return true; - } - return false; - } - - - /** - * Process the create of the registry. This should be overridden to - * do what the UI needs. The UI implimentation should call doCreateRegistry at the - * appropriate time. - * - * @param nature - * - * @since 1.0.0 - */ - protected void processCreateRegistry(final BeaninfoNature nature) { - IJobManager jobManager = Platform.getJobManager(); - ISchedulingRule buildRule = ResourcesPlugin.getWorkspace().getRuleFactory().buildRule(); - boolean gotRuleLocally = true; - try { - try { - jobManager.beginRule(buildRule, new NullProgressMonitor()); - } catch (IllegalArgumentException e) { - gotRuleLocally = false; // This thread already had a rule, and it conflicted with the build rule, so we need to spawn off. - } - if (gotRuleLocally) - doCreateRegistry(nature, new NullProgressMonitor()); - } finally { - jobManager.endRule(buildRule); // Whether we got the rule or not, we must do endrule. - } - - if (!gotRuleLocally) { - // Spawn off to a job and wait for it. Hopefully we don't have a deadlock somewhere. - Job doCreateJob = new Job(BeanInfoAdapterMessages.UICreateRegistryJobHandler_StartBeaninfoRegistry) { - - protected IStatus run(IProgressMonitor monitor) { - doCreateRegistry(nature, monitor); - return Status.OK_STATUS; - } - }; - doCreateJob.schedule(); - while (true) { - try { - doCreateJob.join(); - break; - } catch (InterruptedException e) { - } - } - } - } - - /* - * Do the creation. It is expected that the build rule has already been given to this thread. - * It is important that the build rule be given to this thread. This is so that a build won't - * start trying to create the same registry (which has happened in the past) at the same time - * a different thread was trying to start the registry. You would either have a deadlock, or - * a race and get two different registries started. - * - * The build rule also means that all beaninfo registry creations will be serialized and have - * a race condition. The unfortunate part is that two independent project's registries can't be - * created at same time. But that is the result of the build rule. We can't allow the builds, so - * we need to stop all parallel beaninfo registry creations. - * - * @param nature - * @param pm - * - * @since 1.0.0 - */ - protected final void doCreateRegistry(BeaninfoNature nature, IProgressMonitor pm) { - pm.beginTask("", 100); //$NON-NLS-1$ - try { - nature.createRegistry(new SubProgressMonitor(pm, 100)); - } finally { - pm.done(); - } - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/DOMReader.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/DOMReader.java deleted file mode 100644 index 9f8775341..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/DOMReader.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: DOMReader.java,v $ - * $Revision: 1.7 $ $Date: 2005/08/24 20:31:29 $ - */ - -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - - - -/** - * The internal class for reading dom elements. - * @version 1.0 - * @author - */ -class DOMReader implements IReader { - - /* - * @see IReader#getChildren(Object) - */ - public Object getChildren(Object node) { - return (node instanceof Node) ? ((Node) node).getChildNodes() : null; - } - - - /* - * @see IReader#getLength(Object) - */ - public int getLength(Object nodeList) { - return (nodeList instanceof NodeList) ? ((NodeList) nodeList).getLength() : 0; - } - - /* - * @see IReader#getItem(Object, int) - */ - public Object getItem(Object nodeList, int index) { - return (nodeList instanceof NodeList) ? ((NodeList) nodeList).item(index) : null; - } - - /* - * @see IReader#isNodeTypeElement(Object) - */ - public boolean isNodeTypeElement(Object node) { - return (node instanceof Node) ? ((Node) node).getNodeType() == Node.ELEMENT_NODE : false; - } - - /* - * @see IReader#getNodeName(Object) - */ - public String getNodeName(Object node) { - return (node instanceof Node) ? ((Node) node).getNodeName() : ""; //$NON-NLS-1$ - } - - /* - * @see IReader#getAttribute(Object, String) - */ - public String getAttribute(Object element, String attributeName) { - return (element instanceof Element) && ((Element) element).hasAttribute(attributeName) ? ((Element) element).getAttribute(attributeName) : null; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IReader.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IReader.java deleted file mode 100644 index ed6bf6771..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IReader.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: IReader.java,v $ - * $Revision: 1.6 $ $Date: 2005/08/24 20:31:29 $ - */ -/** - * This is internal interface for reading beaninfoConfig either through IConfigurationElements or - * w3.dom.Nodes. This is because when reading the .beaninfoConfig we will be using Nodes, but - * when reading configs from registered extensions they will be IConfigurationElements. - * @version 1.0 - * TODO Need to move to core when we make things API. - */ -public interface IReader { - - public Object getChildren(Object node); - public int getLength(Object nodeList); - public Object getItem(Object nodeList, int index); - public boolean isNodeTypeElement(Object node); // Is this an element type node - public String getNodeName(Object node); - public String getAttribute(Object element, String attributeName); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SpecialResourceSet.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SpecialResourceSet.java deleted file mode 100644 index 8b291be61..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SpecialResourceSet.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.adapters; -/* - * $RCSfile: SpecialResourceSet.java,v $ - * $Revision: 1.9 $ $Date: 2005/08/24 20:31:29 $ - */ - -import org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl; -import org.eclipse.jem.util.plugin.JEMUtilPlugin; - - -/** - * A Special resource set that is used to link together to the beaninfo - * nature's resource set and makes sure that any request for a new "java:/..." - * JavaClass is redirected to the beaninfo nature's resource set. Otherwise - * the classes will be all over the place and not all gathered in one place. - * - * *package* protected because no one should create one of these. They are - * returned by the BeaninfoNature.newResourceSet() request. - * - * @version 1.0 - * @author - */ -class SpecialResourceSet extends ProjectResourceSetImpl { - - /** - * Constructor for SpecialResourceSet. - * @param aProject - */ - public SpecialResourceSet() { - super(null); - JEMUtilPlugin.getSharedCache().stopListening(this); // We don't care about listening. - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/UICreateRegistryJobHandler.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/UICreateRegistryJobHandler.java deleted file mode 100644 index d198f634a..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/UICreateRegistryJobHandler.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2006 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 - *******************************************************************************/ -/* - * $RCSfile: UICreateRegistryJobHandler.java,v $ - * $Revision: 1.9 $ $Date: 2006/05/17 20:13:00 $ - */ -package org.eclipse.jem.internal.beaninfo.adapters; - -import java.lang.reflect.InvocationTargetException; -import java.util.logging.Level; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.*; -import org.eclipse.core.runtime.jobs.*; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.custom.BusyIndicator; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.progress.IProgressService; - -import org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin; - -/** - * This is the version which can actually reference and use the UI classes. It won't be loaded except if ui plugin is available. - * - * It will check to see if UI is running, and if it is not, then let super class handle. If it is running, then if this is the UI thread, do special - * but run in ui, else if not then let super handle it normally. - * - * @since 1.0.0 - */ -class UICreateRegistryJobHandler extends CreateRegistryJobHandler { - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.beaninfo.adapters.CreateRegistryJobHandler#processCreateRegistry(org.eclipse.jem.internal.beaninfo.adapters.BeaninfoNature) - */ - protected void processCreateRegistry(final BeaninfoNature nature) { - if (PlatformUI.isWorkbenchRunning()) { - if (Display.getCurrent() == null) - super.processCreateRegistry(nature); // We are not in the UI thread. Do normal. - else { - IProgressService ps = PlatformUI.getWorkbench().getProgressService(); - final ISchedulingRule buildRule = ResourcesPlugin.getWorkspace().getRuleFactory().buildRule(); - // First find out if we already have the build rule. If we do, we MUST run in the UI thread. Have no option, can't transfer the - // rule to the thread and then back to us when done. - // This means a busy cursor instead of a possible progress dialog to keep the UI active. Only possible deadlock - // situation is if some other thread has the build rule (other than the build) and is doing an asyncExec or - // is waiting on something from the UI thread. - final IJobManager jobManager = Platform.getJobManager(); - Job currentJob = jobManager.currentJob(); - if (currentJob == null || currentJob.getRule() == null || !currentJob.getRule().contains(buildRule)) { - // UI is not in a job, or it is and there is no rule, or there is a rule and it is not compatible with the buildRule. - // In that case we need to run in another thread. That is so that we can put up a progress dialog if it takes - // too long. - // If no rule then we can't run in UI because some other job may have the rule, and there is no way to test - // for this. So we don't want to block the UI entirely waiting for the rule, so we can use progress dialog - // for this. Also if we have a rule and it conflicts with build rule then we should also go to another thread. - // busyCursorWhile will do this. It will run the create in another thread but keep the UI responsive with - // progress dialog after a "long operation" timeout. - try { - ps.busyCursorWhile(new IRunnableWithProgress() { - - public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { - monitor.beginTask("", 200); //$NON-NLS-1$ - try { - jobManager.beginRule(buildRule, new SubProgressMonitor(monitor, 100)); - doCreateRegistry(nature, new SubProgressMonitor(monitor, 100)); - } finally { - jobManager.endRule(buildRule); - monitor.done(); - } - } - }); - } catch (InterruptedException e1) { - } catch (InvocationTargetException e2) { - BeaninfoPlugin.getPlugin().getLogger().log(e2.getCause(), Level.WARNING); - } - } else { - // We are a job in the UI and we have or can contain the build rule. Therefor we must run in the UI thread itself. Otherwise - // there will be a deadlock because we have the build rule and the other thread won't be able to get it. - // Note: There is ProgressService.runInUI() but that guy is complicated with some interactions I'm not sure about. Safer to do this. - BusyIndicator.showWhile(Display.getCurrent(), new Runnable() { - public void run() { - try { - jobManager.beginRule(buildRule, new NullProgressMonitor()); - doCreateRegistry(nature, new NullProgressMonitor()); - } finally { - jobManager.endRule(buildRule); - } - } - }); - } - } - } else - super.processCreateRegistry(nature); // Workbench not running, do default. - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/messages.properties b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/messages.properties deleted file mode 100644 index 79ff64c3d..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/messages.properties +++ /dev/null @@ -1,19 +0,0 @@ -############################################################################### -# Copyright (c) 2004, 2005 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 -############################################################################### -# -# $Source: /cvsroot/webtools/jeetools.move/webtools.javaee.git/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/messages.properties,v $ -# $Revision: 1.6 $ $Date: 2005/08/24 20:31:29 $ -# - -INTROSPECT_FAILED_EXC_ = IWAV0155E Introspection failed on class "{0}." msg="{1}." -BeaninfoClassAdapter_ClassNotFound = Class not found -BeaninfoNature_InvalidProject = Invalid project -UICreateRegistryJobHandler_StartBeaninfoRegistry = Start Beaninfo registry diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoCacheController.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoCacheController.java deleted file mode 100644 index 8bad0d84a..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoCacheController.java +++ /dev/null @@ -1,1603 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: BeanInfoCacheController.java,v $ - * $Revision: 1.19 $ $Date: 2006/05/23 15:43:06 $ - */ -package org.eclipse.jem.internal.beaninfo.core; - -import java.io.*; -import java.util.*; -import java.util.logging.Level; - -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.*; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.emf.common.notify.*; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.change.ChangeDescription; -import org.eclipse.emf.ecore.change.impl.EObjectToChangesMapEntryImpl; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.jdt.core.*; - -import org.eclipse.jem.internal.beaninfo.adapters.*; -import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.util.emf.workbench.ProjectResourceSet; -import org.eclipse.jem.util.logger.proxy.Logger; -import org.eclipse.jem.util.plugin.JEMUtilPlugin; -import org.eclipse.jem.util.plugin.JEMUtilPlugin.CleanResourceChangeListener; - -/** - * Controller of the BeanInfo cache. There is one per workspace (it is a static). - * - * The cache is stored on a per IPackageFragmentRoot basis. Each package fragment root will be: - * - * <pre> - * - * root{999}/classname.xmi - * - * </pre> - * - * "root{999}" will be a unigue name (root appended with a number}, one for each package fragment root. The "classname.xmi" will be the BeanInfo cache - * for a class in the root. A root can't have more than one class with the same name, so there shouldn't be any collisions. - * <p> - * Now roots can either be in a project, or they can be an external jar (which can be shared between projects). - * <p> - * Now all roots for a project will be stored in the project's working location - * {@link org.eclipse.core.resources.IProject#getWorkingLocation(java.lang.String)}under the ".cache" directory. It will be this format in each - * project location (under the org.eclipse.jem.beaninfo directory): - * - * <pre> - * - * .index - * root{999}/... - * - * </pre> - * - * The ".index" file will be stored/loaded through an ObjectStream. It will be a {@link BeanInfoCacheController.Index}. It is the index to all of the - * root's in the directory. - * <p> - * All of the external jar roots will be stored in the org.eclipse.jem.beaninfo plugin's state location - * {@link org.eclipse.core.runtime.Platform#getStateLocation(org.osgi.framework.Bundle)}under the ".cache" directory. The format of this directory - * will be the same as for each project. And the roots will be for each unique shared external jar (such as the differnt jre's rt.jars). - * <p> - * Note: There are so many places where synchronization is needed, so it is decided to synchronize only on BeanInfoCacheController.INSTANCE. It would - * be too easy to get a dead-lock because the order of synchronizations can't be easily controlled. Since each piece of sync control is very short - * (except for save of the indices, but that is ok because we don't want them changing while saving) it shouldn't block a lot. There is one place we - * violate this and that is we do a sync on ClassEntry instance when working with the pending. This is necessary because we don't want the cache write - * job to hold up everything while writing, so we sync on the entry being written instead. There we must be very careful that we never to - * BeanInfoCacheControler.INSTANCE sync and then a ClassEntry sync because we could deadlock. The CE access under the covers may do a CE sync and then - * a BeanInfoCacheController.INSTANCE sync. - * - * @since 1.1.0 - */ -public class BeanInfoCacheController { - - /** - * Singleton cache controller. - * - * @since 1.1.0 - */ - public static final BeanInfoCacheController INSTANCE = new BeanInfoCacheController(); - - private BeanInfoCacheController() { - // Start up save participent. This only is used for saving indexes and shutdown. Currently the saved state delta - // is of no interest. If a project is deleted while we were not up, then the project index would be gone, so - // our data will automatically be gone for the project. - // If a class was deleted while the project's beaninfo was not active, the cache will still contain it. If the class ever came back it - // would be stale and so recreated. If it never comes back, until a clean is done, it would just hang around. - // The problem with delete is it is hard to determine that the file is actually a class of interest. The javamodel - // handles that for us but we won't have a javamodel to handle this on start up to tell us the file was a class of interest. So - // we'll take the hit of possible cache for non-existant classes. A clean will take care of this. - saveParticipant = new SaveParticipant(); - try { - ResourcesPlugin.getWorkspace().addSaveParticipant(BeaninfoPlugin.getPlugin(), saveParticipant); - } catch (CoreException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e.getStatus()); - } - - // Create a cleanup listener to handle clean requests and project deletes. We need to know about project deletes while - // active because we may have a project index in memory and that needs to be thrown away. - JEMUtilPlugin.addCleanResourceChangeListener(new CleanResourceChangeListener() { - - protected void cleanProject(IProject project) { - // Get rid of the project index and the data for the project. - synchronized (BeanInfoCacheController.this) { - try { - Index projectIndex = (Index) project.getSessionProperty(PROJECT_INDEX_KEY); - if (projectIndex != null) { - project.setSessionProperty(PROJECT_INDEX_KEY, null); - projectIndex.markDead(); - cleanDirectory(getCacheDir(project).toFile(), true); - } - BeaninfoNature nature = BeaninfoPlugin.getPlugin().getNature(project); - if (nature != null) { - nature.projectCleaned(); - BeaninfoAdapterFactory adapterFactory = (BeaninfoAdapterFactory) EcoreUtil.getAdapterFactory(nature.getResourceSet().getAdapterFactories(), IIntrospectionAdapter.ADAPTER_KEY); - if (adapterFactory != null) { - adapterFactory.markAllStale(true); // Also clear the overrides. - } - } - } catch (CoreException e) { - // Shouldn't occur. - } - } - } - - protected void cleanAll() { - synchronized(BeanInfoCacheController.this) { - // Get MAIN_INDEX, mark it dead, and then delete everything under it. - if (MAIN_INDEX != null) { - MAIN_INDEX.markDead(); - MAIN_INDEX = null; - cleanDirectory(getCacheDir(null).toFile(), true); - } - } - super.cleanAll(); - } - - public void resourceChanged(IResourceChangeEvent event) { - // We don't need to handle PRE_CLOSE because SaveParticipent project save will handle closing. - switch (event.getType()) { - case IResourceChangeEvent.PRE_DELETE: - // Don't need to clear the cache directory because Eclipse will get rid of it. - synchronized (BeanInfoCacheController.this) { - try { - Index projectIndex = (Index) event.getResource().getSessionProperty(PROJECT_INDEX_KEY); - if (projectIndex != null) { - // No need to remove from the project because the project is going away and will clean itself up. - projectIndex.markDead(); - } - } catch (CoreException e) { - // Shouldn't occur. - } - } - // Flow into PRE_CLOSE to release the nature. - case IResourceChangeEvent.PRE_CLOSE: - // About to close or delete, so release the nature, if any. - IProject project = (IProject) event.getResource(); - BeaninfoNature nature = BeaninfoPlugin.getPlugin().getNature(project); - if (nature != null) { - nature.cleanup(false, true); - } - break; - default: - super.resourceChanged(event); - break; - } - } - - }, IResourceChangeEvent.PRE_DELETE | IResourceChangeEvent.PRE_CLOSE); - } - - protected SaveParticipant saveParticipant; - - /** - * An index structure for the Main and Project indexes. Access to the index contents and methods should synchronize on the index itself. - * <p> - * Getting to the index instance should only be through the <code>getMainIndex()</code> and <code>getProjectIndex(IProject)</code> accessors - * so that synchronization and serialization is controlled. - * - * @since 1.1.0 - */ - protected static class Index implements Serializable { - - private static final long serialVersionUID = 1106864425567L; - - /* - * Is this a dirty index, i.e. it has been changed and needs to be saved. - */ - transient private boolean dirty; - - private static final int DEAD = -1; // Used in highRootNumber to indicate the index is dead. - /** - * The highest root number used. It is incremented everytime one is needed. It doesn't ever decrease to recover removed roots. - * - * @since 1.1.0 - */ - public int highRootNumber; - - /** - * Map of root names to the root Index. The key is a {@link IPath}. The path will be relative to the workspace if a project root, or an - * absolute local path to the archive if it is an external archive. It is the IPath to package fragment root (either a folder or a jar file). - * <p> - * The value will be a {@link BeanInfoCacheController.RootIndex}. This is the index for the contents of that root. - * - * @since 1.1.0 - */ - transient public Map rootToRootIndex; - - /** - * @param dirty - * The dirty to set. - * - * @since 1.1.0 - */ - public void setDirty(boolean dirty) { - synchronized (BeanInfoCacheController.INSTANCE) { - this.dirty = dirty; - } - } - - /** - * @return Returns the dirty. - * - * @since 1.1.0 - */ - public boolean isDirty() { - synchronized (BeanInfoCacheController.INSTANCE) { - return dirty; - } - } - - /** - * Answer if this index is dead. It is dead if a clean has occurred. This is needed because there could be some ClassEntry's still - * around (such as in the pending write queue) that are for cleaned roots. This is used to test if it has been cleaned. - * @return - * - * @since 1.1.0 - */ - public boolean isDead() { - return highRootNumber == DEAD; - } - - /** - * Mark the index as dead. - * - * - * @since 1.1.0 - */ - void markDead() { - highRootNumber = DEAD; - } - - private void writeObject(ObjectOutputStream os) throws IOException { - os.defaultWriteObject(); - // Now write out the root to root index map. We are not serializing the Map directly using normal Map serialization because - // the key of the map is an IPath (which is a Path under the covers) and Path is not serializable. - os.writeInt(rootToRootIndex.size()); - for (Iterator mapItr = rootToRootIndex.entrySet().iterator(); mapItr.hasNext();) { - Map.Entry entry = (Map.Entry) mapItr.next(); - os.writeUTF(((IPath) entry.getKey()).toString()); - os.writeObject(entry.getValue()); - } - } - - private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException { - is.defaultReadObject(); - int size = is.readInt(); - rootToRootIndex = new HashMap(size < 100 ? 100 : size); - while (size-- > 0) { - rootToRootIndex.put(new Path(is.readUTF()), is.readObject()); - } - } - } - - /** - * An index for a root. It has an entry for each class in this root. The class cache entry describes the cache, whether it is stale, what the - * current mod stamp is, etc. - * - * @since 1.1.0 - */ - public static abstract class RootIndex implements Serializable { - - private static final long serialVersionUID = 1106868674101L; - - transient private IPath cachePath; // Absolute local filesystem IPath to the root cache directory. Computed at runtime because it may change - // if workspace relocated. - - protected Map classNameToClassEntry; // Map of class names to class entries. - - private String rootName; // Name of the root directory in the cache (e.g. "root1"). - - protected Index index; // Index containing this root index. - - protected RootIndex() { - } - - public RootIndex(String rootName, Index index) { - this.rootName = rootName; - classNameToClassEntry = new HashMap(100); // When created brand new, put in a map. Otherwise object stream will create the map. - this.index = index; - } - - /** - * Get the index that points to this root. - * @return - * - * @since 1.1.0 - */ - Index getIndex() { - return index; - } - - /** - * Return the root directory name - * - * @return rootname - * - * @since 1.1.0 - */ - public String getRootName() { - return rootName; - } - - /** - * Set this RootIndex (and the containing Index) as being dirty and in need of saving. - * - * - * @since 1.1.0 - */ - public void setDirty() { - index.setDirty(true); - } - - /* - * Setup for index. It will initialize the path. Once set it won't set it again. This will be called repeatedly by the cache controller - * because there is no way to know if it was lazily created or was brought in from file. When brought in from file the path is not set because - * it should be relocatable and we don't want absolute paths out on the disk caches, and we don't want to waste time creating the path at load - * time because it may not be needed for a while. So it will be lazily created. <p> If the project is set, then the path will be relative to - * the project's working location. If project is <code> null </code> then it will be relative to the BeanInfo plugin's state location. <p> - * This is <package-protected> because only the creator (BeanInfoCacheController class) should set this up. - * - * @param project - * - * @since 1.1.0 - */ - void setupIndex(IProject project) { - if (getCachePath() == null) - cachePath = getCacheDir(project).append(rootName); - } - - /** - * @return Returns the path of the cache directory for the root. - * - * @since 1.1.0 - */ - public IPath getCachePath() { - return cachePath; - } - - /** - * Return whether this is a root for a archive or a folder. - * - * @return <code>true</code> if archive for a root. <code>false</code> if archive for a folder. - * - * @since 1.1.0 - */ - public abstract boolean isArchiveRoot(); - } - - /** - * A root index that is for an archive, either internal or external. It contains the archive's modification stamp. Each class cache entry will - * have this same modification stamp. If the archive is changed then all of the class cache entries will be removed because they are all possibly - * stale. No way to know which may be stale and which not. - * - * @since 1.1.0 - */ - public static class ArchiveRootIndex extends RootIndex { - - private static final long serialVersionUID = 110686867444L; - - private long archiveModificationStamp; - - /* - * For serializer to call. - */ - protected ArchiveRootIndex() { - } - - public ArchiveRootIndex(String rootName, long archiveModificationStamp, Index index) { - super(rootName, index); - this.archiveModificationStamp = archiveModificationStamp; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.beaninfo.core.BeanInfoCacheController.RootIndex#isArchiveRoot() - */ - public boolean isArchiveRoot() { - return true; - } - - /* - * Set the modification stamp. <p> <package-protected> because only the cache controller should change it. - * - * @param archiveModificationStamp The archiveModificationStamp to set. - * - * @see BeanInfoCacheController#MODIFICATION_STAMP_STALE - * @since 1.1.0 - */ - void setArchiveModificationStamp(long archiveModificationStamp) { - this.archiveModificationStamp = archiveModificationStamp; - setDirty(); - } - - /** - * Returns the modification stamp. - * - * @return Returns the archiveModificationStamp. - * @see BeanInfoCacheController#MODIFICATION_STAMP_STALE - * @since 1.1.0 - */ - public long getArchiveModificationStamp() { - return archiveModificationStamp; - } - } - - /** - * This is a root index for a folder (which will be in the workspace). Each class cache entry can have a different modification stamp with a - * folder root index. - * - * @since 1.1.0 - */ - public static class FolderRootIndex extends RootIndex { - - private static final long serialVersionUID = 1106868674922L; - - /* - * For serialization. - */ - protected FolderRootIndex() { - } - - /** - * @param rootName - * - * @since 1.1.0 - */ - public FolderRootIndex(String rootName, Index index) { - super(rootName, index); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.beaninfo.core.BeanInfoCacheController.RootIndex#isArchiveRoot() - */ - public boolean isArchiveRoot() { - return false; - } - } - - /** - * An individual class entry from the cache. It has an entry for each class in the root. The class cache entry describes the cache, whether it is - * stale, what the current mod stamp is, etc. - * <p> - * There is a method to call to see if deleted. This should only be called if entry is being held on to because - * <code>getClassEntry(JavaClass)</code> will never return a deleted entry. There is a method to get the modification stamp of the current cache - * entry. This is the time stamp of the cooresponding class resource (or archive file) that the cache file was created from. If the value is - * <code>IResource.NULL_STAMP</code>, then the cache file is known to be stale. Otherwise if the value is less than a modification stamp of a - * super class then the cache file is stale. - * - * @see ClassEntry#isDeleted() - * @see ClassEntry#getModificationStamp() - * @see BeanInfoCacheController#getClassEntry(JavaClass) - * @since 1.1.0 - */ - public static class ClassEntry implements Serializable { - - private static final long serialVersionUID = 1106868674333L; - - public static final long DELETED_MODIFICATION_STAMP = Long.MIN_VALUE; // This flag won't be seen externally. It is used to indicate the entry - // has been deleted for those that have been holding a CE. - - /** - * Check against the super modification stamp and the interface stamps to see if they were set - * by undefined super class or interface at cache creation time. - * - * @since 1.1.0 - */ - public static final long SUPER_UNDEFINED_MODIFICATION_STAMP = Long.MIN_VALUE+1; - - private long modificationStamp; - private long superModificationStamp; // Stamp of superclass, if any, at time of cache creation. - private String[] interfaceNames; // Interfaces names (null if no interfaces) - private long[] interfaceModicationStamps; // Modification stamps of interfaces, if any. (null if no interfaces). - private transient Resource pendingResource; // Resource is waiting to be saved, but the timestamps are for this pending resource so that we know what it will be ahead of time. At this point the class will be introspected. - - private RootIndex rootIndex; // The root index this class entry is in, so that any changes can mark the entry as dirty. - - private String className; // The classname for this entry. - - private boolean saveOperations; // Flag for saving operations. Once this is set, it will continue to save operations in the cache in addition to everything else. - - private long configurationModificationStamp; // Modification stamp of the Eclipse configuration. Used to determine if the cache of override files is out of date due to a config change. - private boolean overrideCacheExists; // Flag that there is an override cache to load. This is orthogonal to the config mod stamp because it simply means that on the current configuration there is no override cache. - private transient Resource pendingOverrideResource; // Override resource is waiting to be saved. - - protected ClassEntry() { - } - - ClassEntry(RootIndex rootIndex, String className) { - this.setRootIndex(rootIndex); - this.className = className; - modificationStamp = IResource.NULL_STAMP; - rootIndex.classNameToClassEntry.put(className, this); - } - - /** - * - * @return - * - * @since 1.1.0 - */ - public String getClassName() { - return className; - } - - /** - * Return whether the entry has been deleted. This will never be seen in an entry that is still in an index. It is used for entries that have - * been removed from the index. It is for classes (such as the BeanInfoClassAdapter) which are holding onto a copy of entry to let them know. - * <p> - * Holders of entries should call isDeleted if they don't need to further check the mod stamp. Else they should call getModificationStamp and - * check of deleted, stale, or mod stamp. That would save extra synchronizations. If entry is deleted then it should throw the entry away. - * - * @return <code>true</code> if the entry has been deleted, <code>false</code> if still valid. - * - * @see ClassEntry#getModificationStamp() - * @see ClassEntry#isStale() - * @see ClassEntry#DELETED_MODIFICATION_STAMP - * @since 1.1.0 - */ - public boolean isDeleted() { - return getModificationStamp() == DELETED_MODIFICATION_STAMP; - } - - /** - * Mark the entry as deleted. It will also be removed from root index in that case. - * <p> - * Note: It is public only so that BeanInfoClassAdapter can access it. It should not be called by anyone else outside of BeanInfo. - */ - public synchronized void markDeleted() { - if (!isDeleted()) { - getRootIndex().classNameToClassEntry.remove(className); - setModificationStamp(DELETED_MODIFICATION_STAMP); // Also marks index as dirty. - } - } - - /** - * Return whether the entry is stale or not. This orthoganal to isDeleted. isDeleted will not be true if isStale and isStale will not be true - * if isDeleted. Normally you should use getModificationStamp and check the value for IResource.NULL_STAMP and other values to bring it down - * to only one synchronized call to CE, but if only needing to know if stale, you can use this. - * - * @return - * - * @since 1.1.0 - * @see IResource#NULL_STAMP - * @see ClassEntry#getModificationStamp() - * @see ClassEntry#isDeleted() - */ - public boolean isStale() { - return getModificationStamp() == IResource.NULL_STAMP; - } - - /** - * Return the modification stamp. For those holding onto an entry, and they need to know more than if just deleted, then they should just the - * return value from getModificationStamp. Else they should use isDeleted or isStale. - * - * @return modification stamp, or {@link IResource#NULL_STAMP}if stale or not yet created, or {@link ClassEntry#DELETED_MODIFICATION_STAMP} - * if deleted. - * - * @see ClassEntry#isDeleted() - * @see ClassEntry#isStale() - * @since 1.1.0 - */ - public synchronized long getModificationStamp() { - return modificationStamp; - } - - /** - * Return the super modification stamp. - * @return - * - * @since 1.1.0 - */ - public synchronized long getSuperModificationStamp() { - return superModificationStamp; - } - - /** - * Return the interface names or <code>null</code> if no interface names. - * @return - * - * @since 1.1.0 - */ - public synchronized String[] getInterfaceNames() { - return interfaceNames; - } - - /** - * Return the interface modification stamps or <code>null</code> if no interfaces. - * @return - * - * @since 1.1.0 - */ - public synchronized long[] getInterfaceModificationStamps() { - return interfaceModicationStamps; - } - - /* - * Set the modification stamp. <p> <package-protected> because only the cache controller should set it. @param modificationStamp - * - * @since 1.1.0 - */ - void setModificationStamp(long modificationStamp) { - if (this.modificationStamp != modificationStamp) { - this.modificationStamp = modificationStamp; - getRootIndex().setDirty(); - } - } - - /** - * Answer whether operations are also stored in the cache for this class. By default they are not. Once turned on they - * will always be stored for this class until the class is deleted. - * - * @return <code>true</code> if operations are cached, <code>false</code> if they are not cached. - * - * @since 1.1.0 - */ - public synchronized boolean isOperationsStored() { - return saveOperations; - } - - /* - * Set the operations stored flag. - * @param storeOperations - * - * @see BeanInfoCacheController.ClassEntry#isOperationsStored() - * @since 1.1.0 - */ - void setOperationsStored(boolean storeOperations) { - saveOperations = storeOperations; - } - - /** - * Get the configuration modification stamp of the last saved override cache. - * - * @return - * - * @since 1.1.0 - */ - public synchronized long getConfigurationModificationStamp() { - return configurationModificationStamp; - } - - /* - * Set the configuration modification stamp. - * <p> <package-protected> because only the cache controller should access it. - * - * @param configurationModificationStamp - * - * @since 1.1.0 - */ - void setConfigurationModificationStamp(long configurationModificationStamp) { - this.configurationModificationStamp = configurationModificationStamp; - getRootIndex().setDirty(); - } - - /** - * Answer whether there is an override cache available. - * @return - * - * @since 1.1.0 - */ - public synchronized boolean overrideCacheExists() { - return overrideCacheExists; - } - - /* - * Set the override cache exists flag. - * <p> <package-protected> because only the cache controller should access it. - * @param overrideCacheExists - * - * @since 1.1.0 - */ - void setOverrideCacheExists(boolean overrideCacheExists) { - this.overrideCacheExists = overrideCacheExists; - } - - /** - * Get the pending resource or <code>null</code> if not pending. - * - * @return the pending resource or <code>null</code> if not pending. - * - * @since 1.1.0 - */ - public synchronized Resource getPendingResource() { - return pendingResource; - } - - /* - * Set the entry. The sequence get,do something,set must be grouped within a synchronized(ClassEntry). - * <p> <package-protected> because only the cache controller should access it. - * @param cacheResource The cacheResource to set. - * - * @since 1.1.0 - */ - void setPendingResource(Resource pendingResource) { - this.pendingResource = pendingResource; - } - - /** - * Get the pending override resource or <code>null</code> if not pending. - * - * @return the pending override resource or <code>null</code> if not pending. - * - * @since 1.1.0 - */ - public synchronized Resource getPendingOverrideResource() { - return pendingOverrideResource; - } - - /* - * Set the entry. The sequence get,do something,set must be grouped within a synchronized(ClassEntry). - * <p> <package-protected> because only the cache controller should access it. - * @param cacheResource The cacheResource to set. - * - * @since 1.1.0 - */ - void setPendingOverrideResource(Resource pendingOverrideResource) { - this.pendingOverrideResource = pendingOverrideResource; - } - - /* - * <package-protected> because only the cache controller should access it. @param rootIndex The rootIndex to set. - * - * @since 1.1.0 - */ - void setRootIndex(RootIndex rootIndex) { - this.rootIndex = rootIndex; - } - - /* - * <package-protected> because only the cache controller should access it. @return Returns the rootIndex. - * - * @since 1.1.0 - */ - RootIndex getRootIndex() { - return rootIndex; - } - - /* - * <package-protected> because only the cache controller should access it. - * - * @since 1.1.0 - */ - void setSuperModificationStamp(long superModificationStamp) { - this.superModificationStamp = superModificationStamp; - } - - /* - * <package-protected> because only the cache controller should access it. - * - * @since 1.1.0 - */ - void setInterfaceNames(String[] interfaceNames) { - this.interfaceNames = interfaceNames; - } - - /* - * <package-protected> because only the cache controller should access it. - * - * @since 1.1.0 - */ - void setInterfaceModificationStamps(long[] interfaceModificationStamps) { - this.interfaceModicationStamps = interfaceModificationStamps; - } - - } - - /* - * Main index for the external jars. This variable should not be referenced directly except through the getMainIndex() accessor. That controls - * synchronization and restoration as needed. - */ - private static Index MAIN_INDEX; - - /* - * Key into the Project's session data for the project index. The Project index is stored in the project's session data. That - * way when the project is closed or deleted it will go away. - * - * The project indexes will be read in as needed on a per-project basis. This variable should not be - * referenced directly except through the getProjectIndex(IProject) accessor. That controls synchronization and restoration as needed. - * Only during cleanup and such where we don't want to create one if it doesn't exist you must use sync(this). Be careful to keep - * the sync small. - */ - private static final QualifiedName PROJECT_INDEX_KEY = new QualifiedName(BeaninfoPlugin.PI_BEANINFO_PLUGINID, "project_index"); //$NON-NLS-1$ - - /* - * Suffix for class cache files. - */ - private static final String CLASS_CACHE_SUFFIX = ".xmi"; //$NON-NLS-1$ - /* - * Suffic for class override cache files. - */ - private static final String OVERRIDE_CACHE_SUFFIX = ".override.xmi"; //$NON-NLS-1$ - - /** - * Return the current class entry for the JavaClass, or <code>null</code> if no current entry. - * - * @param jclass - * @return class entry or <code>null</code> if no current entry. - * - * @since 1.1.0 - */ - public ClassEntry getClassEntry(JavaClass jclass) { - IType type = (IType) jclass.getReflectionType(); - RootIndex rootIndex = getRootIndex(type); - String className = jclass.getQualifiedNameForReflection(); - return getClassEntry(rootIndex, className, false); - } - - /** - * Enumeration for newCache: Signals that this cache is the Reflection Cache with no operations in it. - * @since 1.1.0 - */ - public final static int REFLECTION_CACHE = 1; - /** - * Enumeration for newCache: Signals that this cache is the Reflection Cache with operations in it. - * @since 1.1.0 - */ - public final static int REFLECTION_OPERATIONS_CACHE = 2; - /** - * Enumeration for newCache: Signals that this cache is the Overrides cache. - * @since 1.1.0 - */ - public final static int OVERRIDES_CACHE = 3; - /** - * A new cache entry for the given class has been created. Need to write it out. - * - * @param jclass - * the JavaClass the cache is for. - * @param cache - * the ChangeDescription to put out if cacheType is Reflection types, a List if override cache type. - * @param cacheType - * {@link BeanInfoCacheController.ClassEntry#REFLECTION_CACHE} for the enum values. - * @return new class entry (or old one if same one). Should always replace one being held by this one. <code>null</code> if cache could not be - * updated for some reason. - * @since 1.1.0 - */ - public ClassEntry newCache(JavaClass jclass, Object cache, int cacheType) { - if (BeaninfoPlugin.getPlugin().getLogger().isLoggingLevel(Level.FINER)) { - Logger logger = BeaninfoPlugin.getPlugin().getLogger(); - String type = cacheType!=OVERRIDES_CACHE?"Class":"Overrides"; //$NON-NLS-1$ //$NON-NLS-2$ - if (cacheType == OVERRIDES_CACHE && cache == null) - type+=" empty"; //$NON-NLS-1$ - logger.log("Creating cache for class "+jclass.getQualifiedNameForReflection()+" cache type="+type, Level.FINER); //$NON-NLS-1$ //$NON-NLS-2$ - } - ChangeDescription cd = null; - if (cacheType != OVERRIDES_CACHE) { - // First go through the cd and remove any empty changes. This is because we created the feature change before we knew what went into - // it, and at times nothing goes into it. - cd = (ChangeDescription) cache; - for (Iterator iter = cd.getObjectChanges().iterator(); iter.hasNext();) { - EObjectToChangesMapEntryImpl fcEntry = (EObjectToChangesMapEntryImpl) iter.next(); - if (((List) fcEntry.getValue()).isEmpty()) - iter.remove(); // Empty changes, remove it. - } - } - IType type = (IType) jclass.getReflectionType(); - RootIndex rootIndex = getRootIndex(type); - String className = jclass.getQualifiedNameForReflection(); - ClassEntry ce = getClassEntry(rootIndex, className, true); // Create it if not existing. - // Sync on ce so that only can create a cache for a class at a time and so that writing (if occurring at the same time for the class) can be - // held up. - // this is a violation of the agreement to only sync on THIS, but it is necessary or else the write job would lock everything out while it is - // writing. This way it only locks out one class, if the class is at the same time. - // We shouldn't have deadlock because here we lock ce and then THIS (maybe). The write job will lock ce, and then lock THIS. Everywhere else - // we must - // also do lock ce then THIS. Mustn't do other way around or possibility of deadlock. Be careful that any synchronized methods in this class - // do - // not lock an existing ce. - ResourceSet cacheRset = null; - synchronized (ce) { - Resource cres; - if (cacheType != OVERRIDES_CACHE) { - cres = ce.getPendingResource(); - if (cres != null) { - // We have a pending, so clear and reuse the resource. - cres.getContents().clear(); - } else { - // Not currently writing or waiting to write, so create a new resource. - cres = jclass.eResource().getResourceSet().createResource( - URI.createFileURI(rootIndex.getCachePath().append(className + CLASS_CACHE_SUFFIX).toString())); - } - cacheRset = cres.getResourceSet(); - ce.setOperationsStored(cacheType == REFLECTION_OPERATIONS_CACHE); - ce.setPendingResource(cres); - cres.getContents().add(cd); - // Archives use same mod as archive (retrieve from rootindex), while non-archive use the underlying resource's mod stamp. - if (rootIndex.isArchiveRoot()) - ce.setModificationStamp(((ArchiveRootIndex) rootIndex).getArchiveModificationStamp()); - else { - try { - ce.setModificationStamp(type.getUnderlyingResource().getModificationStamp()); - } catch (JavaModelException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - ce.markDeleted(); // Mark as deleted in case this was an existing that someone is holding. - return null; // Couldn't do it, throw cache entry away. This actually should never occur. - } - } - // Need to get the supers info. - List supers = jclass.getESuperTypes(); - if (!supers.isEmpty()) { - // We assume that they all have been introspected. This was done back in main introspection. If they are introspected they will have a class entry. - BeaninfoClassAdapter bca = BeaninfoClassAdapter.getBeaninfoClassAdapter((EObject) supers.get(0)); - ClassEntry superCE = bca.getClassEntry(); - if (superCE != null) - ce.setSuperModificationStamp(superCE.getModificationStamp()); - else - ce.setSuperModificationStamp(ClassEntry.SUPER_UNDEFINED_MODIFICATION_STAMP); // No classentry means undefined. So put something in so that when it becomes defined we will know. - if(supers.size() == 1) { - ce.setInterfaceNames(null); - ce.setInterfaceModificationStamps(null); - } else { - String[] interNames = new String[supers.size()-1]; - long[] interMods = new long[interNames.length]; - for (int i = 1, indx = 0; indx < interNames.length; i++, indx++) { - JavaClass javaClass = (JavaClass) supers.get(i); - bca = BeaninfoClassAdapter.getBeaninfoClassAdapter(javaClass); - bca.introspectIfNecessary(); // Force introspection to get a valid super mod stamp. - superCE = bca.getClassEntry(); - interNames[indx] = javaClass.getQualifiedNameForReflection(); - if (superCE != null) - interMods[indx] = superCE.getModificationStamp(); - else - interMods[indx] = ClassEntry.SUPER_UNDEFINED_MODIFICATION_STAMP; // No classentry means undefined. So put something in so that when it becomes defined we will know. - } - ce.setInterfaceNames(interNames); - ce.setInterfaceModificationStamps(interMods); - } - } else { - ce.setSuperModificationStamp(IResource.NULL_STAMP); - ce.setInterfaceNames(null); - ce.setInterfaceModificationStamps(null); - } - } else { - // We are an override cache. - if (cache != null) { - cres = ce.getPendingOverrideResource(); - if (cres != null) { - // We have a pending, so clear and reuse the resource. - cres.getContents().clear(); - } else { - // Not currently writing or waiting to write, so create a new resource. - cres = jclass.eResource().getResourceSet().createResource( - URI.createFileURI(rootIndex.getCachePath().append(className + OVERRIDE_CACHE_SUFFIX).toString())); - } - cacheRset = cres.getResourceSet(); - cres.getContents().addAll((List) cache); - ce.setPendingOverrideResource(cres); - ce.setOverrideCacheExists(true); - } else { - ce.setPendingOverrideResource(null); - ce.setOverrideCacheExists(false); - } - ce.setConfigurationModificationStamp(Platform.getPlatformAdmin().getState(false).getTimeStamp()); - } - } - queueClassEntry(ce, cacheRset); // Now queue it up. - return ce; - } - - /** - * Get the cache resource for the given java class. - * <p> - * NOTE: It is the responsibility of the caller to ALWAYS remove the Resource from its resource set when done with it. - * - * @param jclass - * @param ce the class entry for the jclass - * @param reflectCache <code>true</code> if this the reflection/introspection cache or <code>false</code> if this is the override cache. - * @return the loaded cache resource, or <code>null</code> if not there (for some reason) or an error trying to load it. - * - * @since 1.1.0 - */ - public Resource getCache(JavaClass jclass, ClassEntry ce, boolean reflectCache) { - String className = jclass.getQualifiedNameForReflection(); - if (BeaninfoPlugin.getPlugin().getLogger().isLoggingLevel(Level.FINER)) { - Logger logger = BeaninfoPlugin.getPlugin().getLogger(); - String type = reflectCache?"Class":"Overrides"; //$NON-NLS-1$ //$NON-NLS-2$ - logger.log("Loading cache for class "+className+" cache type="+type, Level.FINER); //$NON-NLS-1$ //$NON-NLS-2$ - } - - if (reflectCache) { - boolean waitForJob = false; - synchronized (ce) { - if (ce.getPendingResource() != null) { - // We have one pending. So wait until write cache job is done, and then load it in. - // Note: Can't just copy the pending resource because it has references to JavaClasses - // and these could be in a different project (since this could be a workspace wide class). - // We would get the wrong java classes then when we apply it. - waitForJob = true; - if (BeaninfoPlugin.getPlugin().getLogger().isLoggingLevel(Level.FINER)) - BeaninfoPlugin.getPlugin().getLogger().log("Using pending class cache.", Level.FINER); //$NON-NLS-1$ - } - } - if (waitForJob) - waitForCacheSaveJob(); - - try { - return jclass.eResource().getResourceSet().getResource( - URI.createFileURI(ce.getRootIndex().getCachePath().append( - className + CLASS_CACHE_SUFFIX).toString()), true); - } catch (Exception e) { - // Something happened and couldn't load it. - // TODO - need to remove the Level.INFO arg when the beaninfo cache is working dynamically - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.INFO); - return null; - } - } else { - boolean waitForJob = false; - synchronized (ce) { - if (ce.getPendingOverrideResource() != null) { - // We have one pending. So wait until write cache job is done, and then load it in. - // Note: Can't just copy the pending resource because it has references to JavaClasses - // and these could be in a different project (since this could be a workspace wide class). - // We would get the wrong java classes then when we apply it. - waitForJob = true; - if (BeaninfoPlugin.getPlugin().getLogger().isLoggingLevel(Level.FINER)) - BeaninfoPlugin.getPlugin().getLogger().log("Using pending override cache.", Level.FINER); //$NON-NLS-1$ - } - } - if (waitForJob) - waitForCacheSaveJob(); - - try { - return jclass.eResource().getResourceSet().getResource( - URI.createFileURI(ce.getRootIndex().getCachePath().append( - className + OVERRIDE_CACHE_SUFFIX).toString()), true); - } catch (Exception e) { - // Something happened and couldn't load it. - // TODO - need to remove the Level.INFO arg when the beaninfo cache is working dynamically - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.INFO); - return null; - } - } - } - - private synchronized ClassEntry getClassEntry(RootIndex rootIndex, String className, boolean createEntry) { - ClassEntry ce = (ClassEntry) rootIndex.classNameToClassEntry.get(className); - if (createEntry && ce == null) { - // Need to create one. - ce = new ClassEntry(rootIndex, className); - // Don't actually mark the rootIndex dirty until the cache for it is actually saved out. - } - return ce; - } - - private static final String ROOT_PREFIX = "root"; //$NON-NLS-1$ - - /* - * Get the root index for the appropriate cache for the given java class. - */ - private RootIndex getRootIndex(IType type) { - IPackageFragmentRoot root = (IPackageFragmentRoot) type.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT); - if (!root.isExternal()) { - // So it is in a project. Get the project index. - return getRootIndex(root, root.getJavaProject().getProject()); - } else { - // It is an external jar (archive), so needs to come from main index, no project. - return getRootIndex(root, null); - } - } - - /* - * Get the root index for the given root. A Project index if project is not null. - */ - private synchronized RootIndex getRootIndex(IPackageFragmentRoot root, IProject project) { - Index index = project != null ? getProjectIndex(project) : getMainIndex(); - IPath rootPath = root.getPath(); - RootIndex rootIndex = (RootIndex) index.rootToRootIndex.get(rootPath); - if (rootIndex == null) { - // Need to do a new root path. - String rootName = ROOT_PREFIX + (++index.highRootNumber); - rootIndex = root.isArchive() ? createArchiveRootIndex(root, rootName, index) : new FolderRootIndex(rootName, index); - index.rootToRootIndex.put(rootPath, rootIndex); - // Don't set index dirty until we actually save a class cache file. Until then it only needs to be in memory. - } - rootIndex.setupIndex(project); // Set it up, or may already be set, so it will do nothing in that case. - return rootIndex; - } - - /* - * Create an archive root with the given root number and root. - */ - private RootIndex createArchiveRootIndex(IPackageFragmentRoot rootArchive, String rootName, Index index) { - long modStamp = IResource.NULL_STAMP; - if (rootArchive.isExternal()) { - modStamp = rootArchive.getPath().toFile().lastModified(); - } else { - try { - modStamp = rootArchive.getUnderlyingResource().getModificationStamp(); - } catch (JavaModelException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - } - return new ArchiveRootIndex(rootName, modStamp, index); - } - - private static final String INDEXFILENAME = ".index"; //$NON-NLS-1$ - - private static final String CACHEDIR = ".cache"; // Cache directory (so as not to conflict with any future BeanInfo Plugin specific data files. //$NON-NLS-1$ - - /* - * Get the cache directory for the project (or if project is null, the main plugin cache directory). - */ - // TODO: make this one private - public static IPath getCacheDir(IProject project) { - if (project != null) - return project.getWorkingLocation(BeaninfoPlugin.getPlugin().getBundle().getSymbolicName()).append(CACHEDIR); - else - return BeaninfoPlugin.getPlugin().getStateLocation().append(CACHEDIR); - } - - /* - * Get the project index. Synchronized so that we can create it if necessary and not get race conditions. - */ - private synchronized Index getProjectIndex(IProject project) { - try { - Index index = (Index) project.getSessionProperty(PROJECT_INDEX_KEY); - if (index == null) { - // Read the index in. - File indexDirFile = getCacheDir(project).append(INDEXFILENAME).toFile(); - if (indexDirFile.canRead()) { - ObjectInputStream ois = null; - try { - ois = new ObjectInputStream(new BufferedInputStream(new FileInputStream(indexDirFile))); - index = (Index) ois.readObject(); - } catch (InvalidClassException e) { - // This is ok. It simply means the cache index is at a downlevel format and needs to be reconstructed. - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassNotFoundException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } finally { - if (ois != null) - try { - ois.close(); - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - } - } - - if (index == null) { - // Doesn't yet exist or it couldn't be read for some reason, or it was downlevel cache in which case we just throw it away and create - // new). - index = new Index(); - index.highRootNumber = 0; - index.rootToRootIndex = new HashMap(); - } - - project.setSessionProperty(PROJECT_INDEX_KEY, index); // We either created a new one, or we were able to load it. - } - return index; - } catch (CoreException e) { - // Shouldn't occur, - return null; - } - } - - /* - * Get the main index. Synchronized so that we can create it if necessary and not get race conditions. - */ - private synchronized Index getMainIndex() { - if (MAIN_INDEX == null) { - // Read the index in. - File indexDirFile = getCacheDir(null).append(INDEXFILENAME).toFile(); - if (indexDirFile.canRead()) { - ObjectInputStream ois = null; - try { - ois = new ObjectInputStream(new BufferedInputStream(new FileInputStream(indexDirFile))); - MAIN_INDEX = (Index) ois.readObject(); - } catch (InvalidClassException e) { - // This is ok. It just means that the cache index is at a downlevel format and needs to be reconstructed. - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } catch (ClassNotFoundException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } finally { - if (ois != null) - try { - ois.close(); - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - } - } - - if (MAIN_INDEX == null) { - // Doesn't yet exist or it couldn't be read for some reason, or it was downlevel cache in which case we just throw it away and create - // new). - MAIN_INDEX = new Index(); - MAIN_INDEX.highRootNumber = 0; - MAIN_INDEX.rootToRootIndex = new HashMap(); - } - - } - return MAIN_INDEX; - } - - // -------------- Save Participant code ----------------- - - protected class SaveParticipant implements ISaveParticipant { - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext) - */ - public void doneSaving(ISaveContext context) { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext) - */ - public void prepareToSave(ISaveContext context) throws CoreException { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext) - */ - public void rollback(ISaveContext context) { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext) - */ - public void saving(ISaveContext context) throws CoreException { - boolean fullsave = false; - switch (context.getKind()) { - case ISaveContext.PROJECT_SAVE: - IProject project = context.getProject(); - synchronized (BeanInfoCacheController.INSTANCE) { - // Write the index. The cache save job will eventually run and at that point write out the pending cache files too. - // They don't need to be written before the project save is complete. - Index projectIndex = (Index) project.getSessionProperty(PROJECT_INDEX_KEY); - if (projectIndex != null && projectIndex.isDirty()) - if (reconcileIndexDirectory(project, projectIndex)) - writeIndex(project, projectIndex); - else { - // It was empty, just get rid of the index. The directories have already been cleared. - projectIndex.markDead(); - project.setSessionProperty(PROJECT_INDEX_KEY, null); - } - } - break; - case ISaveContext.FULL_SAVE: - fullsave = true; - waitForCacheSaveJob(); - // Now flow into the snapshot save to complete the fullsave. - case ISaveContext.SNAPSHOT: - // For a snapshot, just the dirty indexes, no clean up. If fullsave, cleanup the indexes, but only save the dirty. - synchronized (BeanInfoCacheController.INSTANCE) { - if (MAIN_INDEX != null) { - if (fullsave) { - if (reconcileIndexDirectory(null, MAIN_INDEX)) { - if (MAIN_INDEX.isDirty()) - writeIndex(null, MAIN_INDEX); - } else { - // It was empty, just get rid of the index. The directories have already been cleared. - MAIN_INDEX.markDead(); - MAIN_INDEX = null; - } - } else if (MAIN_INDEX.isDirty()) - writeIndex(null, MAIN_INDEX); - } - // Now do the project indexes. We have to walk all open projects to see which have an index. Since we are - // doing a major save, the hit will ok - IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); - for (int i=0; i<projects.length; i++) { - project = projects[i]; - if (project.isOpen()) { - Index index = (Index) project.getSessionProperty(PROJECT_INDEX_KEY); - if (index != null) { - if (fullsave) { - if (reconcileIndexDirectory(project, index)) { - if (index.isDirty()) - writeIndex(project, index); - } else { - // It was empty, just get rid of the index from memory. It has already been deleted from disk. - index.markDead(); - project.setSessionProperty(PROJECT_INDEX_KEY, null); - } - } else if (index.isDirty()) - writeIndex(project, index); - } - } - } - } - } - } - - /* - * Write an index. Project if not null indicates a project index. - */ - private void writeIndex(IProject project, Index index) { - ObjectOutputStream oos = null; - try { - File indexDirFile = getCacheDir(project).toFile(); - indexDirFile.mkdirs(); - File indexFile = new File(indexDirFile, INDEXFILENAME); - oos = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(indexFile))); - oos.writeObject(index); - index.setDirty(false); - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } finally { - if (oos != null) - try { - oos.close(); - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } - } - } - - /* - * Reconcile the index directory of unused (empty) root directories. If after reconciling the index is empty, then it will delete the index file too. @return - * true if index not empty, false if index was empty and was erased too. - */ - private boolean reconcileIndexDirectory(IProject project, Index index) { - // clean out unused rootIndexes - File indexDir = getCacheDir(project).toFile(); - if (indexDir.canWrite()) { - // Create a set of all root names for quick look up. - if (index.rootToRootIndex.isEmpty()) { - // It is empty, clear everything, including index file. - cleanDirectory(indexDir, false); - return false; - } else { - // Need a set of the valid rootnames for quick lookup of names in the directory list. - // And while accumulating this list, clean out the root indexes cache too (i.e. the class cache files). - final Set validFiles = new HashSet(index.rootToRootIndex.size()); - validFiles.add(INDEXFILENAME); - for (Iterator itr = index.rootToRootIndex.values().iterator(); itr.hasNext();) { - RootIndex rootIndex = (RootIndex) itr.next(); - if (reconcileClassCacheDirectory(rootIndex, project)) { - // The class cache has been reconciled, and there are still some classes left, so keep the root index. - validFiles.add(rootIndex.getRootName()); - } else { - itr.remove(); // The root index is empty, so get rid of it. Since not a valid name, it will be deleted in next step. - index.setDirty(true); // Also set it dirty in case it wasn't because we need to write out the container Index since it was - // changed. - } - } - // Get list of files and delete those that are not a valid name (used root name, or index file) - String[] fileNames = indexDir.list(); - for (int i = 0; i < fileNames.length; i++) { - if (!validFiles.contains(fileNames[i])) { - File file = new File(indexDir, fileNames[i]); - if (file.isDirectory()) - cleanDirectory(file, true); - else - file.delete(); - } - } - return true; - } - } else - return true; // Can't write, so treat as leave alone. - } - - /* - * Reconcile the class cache directory for the root index. Return true if reconciled good but not empty. Return false if the class cache - * directory is now empty. In this case we should actually get rid of the entire root index. This makes sure that the directory matches - * the contents of the index by removing any file not found in the index. - */ - private boolean reconcileClassCacheDirectory(RootIndex rootIndex, IProject project) { - if (rootIndex.classNameToClassEntry.isEmpty()) - return false; // There are no classes, so get rid the entire root index. - else { - final Set validFiles = rootIndex.classNameToClassEntry.keySet(); // The keys (classnames) are the filenames (without extension) - // that - // should be kept. - File indexDir = getCacheDir(project).append(rootIndex.getRootName()).toFile(); - // Get list of files that are not a valid name (used classname) - String[] fileNames = indexDir.list(); - if (fileNames != null) { - for (int i = 0; i < fileNames.length; i++) { - String fileName = fileNames[i]; - if (fileName.endsWith(OVERRIDE_CACHE_SUFFIX)) { - // Ends with out class cache extension, see if valid classname. - String classname = fileName.substring(0, fileName.length() - OVERRIDE_CACHE_SUFFIX.length()); - ClassEntry ce = (ClassEntry) rootIndex.classNameToClassEntry.get(classname); - if (ce != null && ce.overrideCacheExists()) - continue; // It is one of ours. Keep it. - } else if (fileName.endsWith(CLASS_CACHE_SUFFIX)) { - // Ends with out class cache extension, see if valid classname. - if (validFiles.contains(fileName.substring(0, fileName.length() - CLASS_CACHE_SUFFIX.length()))) // Strip down to just - // class and see if - // one of ours. - continue; // It is one of ours. Keep it. - } - // Not valid, get rid of it. - File file = new File(indexDir, fileName); - if (file.isDirectory()) - cleanDirectory(file, true); - else - file.delete(); - - } - } - return true; - } - } - } - - private static void cleanDirectory(File dir, boolean eraseDir) { - if (dir.canWrite()) { - File[] files = dir.listFiles(); - for (int i = 0; i < files.length; i++) { - if (files[i].isDirectory()) - cleanDirectory(files[i], true); - else - files[i].delete(); - } - if (eraseDir) - dir.delete(); - } - } - - //-------------- Save Class Cache Entry Job ------------------- - // This is write queue for class caches. It is a FIFO queue. It is sychronized so that adds/removes are controlled. - // Entries are ClassEntry's. The class entry has the resource that needs to be written out. It will be set to null - // by the job when it is written. The job will have a ClassEntry locked while it is retrieving and resetting the resource - // field in the entry. - // - // The process is the new cache will lock, create resource, set resource into the CE and release lock. Then add the CE to the queue - // and schedule the job (in case job is not running). - // - // The job will lock the CE, get resource from the CE, write it out, set it back to null, release the CE). If the resource is null, - // then it was already processed (this could happen if the job didn't get a chance to save it before another entry was posted - // and this is the second request and it was actually processed by the first request). - // IE: - // 1) resource created, queue entry added - // 2) 2nd req, job not processed yet, resource recreated and put back into CE, new queue entry. - // 3) job pulls from queue, locks ce, grabs resource, writes out the resource, sets back to null, release ce. - // 4) job pulls from queue. This time the resoure is null so it skips it. - // - // Need to lock Ce during entire create and write because the resource set is not reentrant so can't be writing it while creating it. - - private List cacheWriteQueue = null; - - void waitForCacheSaveJob() { - // For a full save we want to get the class cache files written too, so we need to manipulate the job to get it to finish ASAP. - if (cacheWriteJob != null) { - if (BeaninfoPlugin.getPlugin().getLogger().isLoggingLevel(Level.FINER)) - BeaninfoPlugin.getPlugin().getLogger().log("Forcing a cache save job to start early.", Level.FINER); //$NON-NLS-1$ - switch (cacheWriteJob.getState()) { - case Job.SLEEPING: - // It could be waiting a long time, so we need to wake it up at a high priority to get it running ASAP. - cacheWriteJob.setPriority(Job.INTERACTIVE); // Need to get it going right away - cacheWriteJob.wakeUp(); - // Now drop into the wait. - default: - // Now wait for it (if not running this will return right away). - try { - cacheWriteJob.join(); - } catch (InterruptedException e) { - } - } - } - } - - static final Map SAVE_CACHE_OPTIONS; - static { - SAVE_CACHE_OPTIONS = new HashMap(3); - SAVE_CACHE_OPTIONS.put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, Boolean.TRUE); - SAVE_CACHE_OPTIONS.put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - SAVE_CACHE_OPTIONS.put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$ - } - - protected Job cacheWriteJob = null; - protected Adapter projectReleaseAdapter = new AdapterImpl() { - - /* (non-Javadoc) - * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(java.lang.Object) - */ - public boolean isAdapterForType(Object type) { - return type == BeanInfoCacheController.this; // We're making the BeanInfoCacheController.this be the adapter type. - } - - - /* (non-Javadoc) - * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification) - */ - public void notifyChanged(Notification msg) { - if (msg.getEventType() == ProjectResourceSet.SPECIAL_NOTIFICATION_TYPE && msg.getFeatureID(BeanInfoCacheController.class) == ProjectResourceSet.PROJECTRESOURCESET_ABOUT_TO_RELEASE_ID) { - // This is an about to be closed. If we have an active write job, bring it up to top priority and wait for it to finish. - // This will make sure any resources in the project are written. There may not be any waiting, but this is doing a close - // project, which is slow already relatively speaking, that waiting for the cache write job to finish is not bad. - waitForCacheSaveJob(); - } - } - }; - - private void queueClassEntry(ClassEntry ce, ResourceSet rset) { - if (cacheWriteQueue == null) { - cacheWriteQueue = Collections.synchronizedList(new LinkedList()); - cacheWriteJob = new Job(BeaninfoCoreMessages.BeanInfoCacheController_Job_WriteBeaninfoCache_Title) { - - protected IStatus run(IProgressMonitor monitor) { - monitor.beginTask("", cacheWriteQueue.size() + 10); // This is actually can change during the run, so we add 10 for the heck of it. //$NON-NLS-1$ - if (BeaninfoPlugin.getPlugin().getLogger().isLoggingLevel(Level.FINER)) - BeaninfoPlugin.getPlugin().getLogger().log("Starting write BeanInfo Cache files.", Level.FINER); //$NON-NLS-1$ - while (!monitor.isCanceled() && !cacheWriteQueue.isEmpty()) { - ClassEntry ce = (ClassEntry) cacheWriteQueue.remove(0); // Get first one. - boolean dead = false; - synchronized (BeanInfoCacheController.this) { - if (ce.getRootIndex().getIndex().isDead()) { - dead = true; // The index is dead, so don't write it. We still need to go through and get the pending resource out of its resource set so that it goes away. - } - } - synchronized (ce) { - Resource cres = ce.getPendingResource(); - if (cres != null) { - try { - if (!dead) - cres.save(SAVE_CACHE_OPTIONS); - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } finally { - // Remove the resource from resource set, clear out the pending. - cres.getResourceSet().getResources().remove(cres); - ce.setPendingResource(null); - } - } - cres = ce.getPendingOverrideResource(); - if (cres != null) { - try { - if (!dead) - cres.save(SAVE_CACHE_OPTIONS); - } catch (IOException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e); - } finally { - // Remove the resource from resource set, clear out the pending. - cres.getResourceSet().getResources().remove(cres); - ce.setPendingOverrideResource(null); - } - } - - monitor.worked(1); - } - } - monitor.done(); - if (BeaninfoPlugin.getPlugin().getLogger().isLoggingLevel(Level.FINER)) - BeaninfoPlugin.getPlugin().getLogger().log("Finished write BeanInfo Cache files.", Level.FINER); //$NON-NLS-1$ - return Status.OK_STATUS; - } - }; - cacheWriteJob.setPriority(Job.SHORT); - cacheWriteJob.setSystem(true); - } - if (rset != null && EcoreUtil.getExistingAdapter(rset, this) == null) { - // If it is a project resource set, then add ourselves as listeners so we know when released. - if (rset instanceof ProjectResourceSet) - rset.eAdapters().add(projectReleaseAdapter); - } - cacheWriteQueue.add(ce); - cacheWriteJob.schedule(60 * 1000L); // Put off for 1 minute to let other stuff go on. Not important that it happens immediately. - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoContributorAdapter.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoContributorAdapter.java deleted file mode 100644 index 8fa415b5f..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoContributorAdapter.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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 - *******************************************************************************/ -/* - * $RCSfile: BeanInfoContributorAdapter.java,v $ - * $Revision: 1.7 $ $Date: 2005/08/24 20:31:28 $ - */ -package org.eclipse.jem.internal.beaninfo.core; - -import java.io.FileNotFoundException; - -import org.eclipse.core.resources.IResourceStatus; -import org.eclipse.core.runtime.*; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.common.util.WrappedException; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.osgi.framework.Bundle; - -import org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IContributorOverrideRunnable; -import org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.util.plugin.JEMUtilPlugin; - - -/** - * A default implementation of IBeanInfoContributor for users to subclass. Default does nothing. - * <p> - * But this does supply several very useful utility methods. - * - * @since 1.0.0 - */ -public class BeanInfoContributorAdapter implements IBeanInfoContributor { - - /** - * An empty array of BeaninfoEntry. Available for subclasses to return if they - * decide there is nothing to return. - */ - public static final BeaninfoEntry[] EMPTY_BEANINFO_ENTRIES = new BeaninfoEntry[0]; - - /** - * Return true if the given fragment is part of the package. Used by subclasses to determine - * if a override associated with a given fragment should be used for the package. - * <p> - * In other words, <code>org.eclipse</code> as a fragment and and <code>org.eclipse.core</code> as - * a packagePath will answer true, but if you swapped them it will answer false. - * - * @param fragment - * @param packagePath - * @return <code>true</code> if the given fragment is a leading part of the package. - * - * @since 1.0.0 - */ - protected boolean isFragment(IPath fragment, IPath packagePath) { - return fragment.isPrefixOf(packagePath); - } - - /** - * Return the unmatched portion of the package path from a fragment. Used by subclasses - * to get the part of the package path that is after the fragment. This is then used to - * append to the path from the override to get the full path to override files for this - * package. - * <p> - * This will return the part of the packagePath that is not matched by the fragment. - * <p> - * Note: It is important that the fragment and packagePath have first been tested through - * isFragment. Otherwise an invalid result will be returned. - * - * @param fragment - * @param packagePath - * @return the part of the package path not matched. - * - * @see BeanInfoContributorAdapter#isFragment(IPath, IPath) - * @since 1.0.0 - */ - protected String getUnmatchedPath(IPath fragment, IPath packagePath) { - return fragment.removeFirstSegments(packagePath.segmentCount()).toString(); - } - - /** - * Subclasses can use this helper method to get the override resource from the given (plugin) bundle. - * - * @param bundle the bundle to use. - * @param relativePath path of file relative to the plugin. - * @param resource set to load into. - * @param runnable the runnable that is being used for the override. It is used to determine if resource already used once. - * @return the resource or <code>null</code> if couldn't be loaded or if it was already used once. - * - * @since 1.0.0 - */ - protected Resource loadOverrideResource(Bundle bundle, String relativePath, ResourceSet rset, BeaninfoPlugin.IContributorOverrideRunnable runnable) { - URI uri = URI.createURI(JEMUtilPlugin.PLATFORM_PROTOCOL+":/"+JEMUtilPlugin.PLATFORM_PLUGIN+'/'+bundle.getSymbolicName()+'/'+relativePath); //$NON-NLS-1$ - if (runnable.resourceContributed(uri)) - return null; // Already contributed once. - Resource result = null; - try { - result = rset.getResource(uri, true); - } catch (WrappedException e) { - // FileNotFoundException is ok - if (!(e.exception() instanceof FileNotFoundException)) { - if (e.exception() instanceof CoreException - && ((CoreException) e.exception()).getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) { - // This is ok. Means uri_mapping not set so couldn't find in Workspace, also ok. - } else { - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + uri + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - // In case it happened after creating resource but during load. Need to get rid of it in the finally. - result = null; - Resource res = rset.getResource(uri, false); - if (res != null) - rset.getResources().remove(res); - } catch (Exception e) { - // Couldn't load it for some reason. - BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + uri + "\"", e)); //$NON-NLS-1$ //$NON-NLS-2$ - // In case it happened after creating resource but during load. Need to get rid of it in the finally. - result = null; - Resource res = rset.getResource(uri, false); - if (res != null) - rset.getResources().remove(res); - }; - return result; - } - - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor#getBeanInfoEntryContributions(org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo) - */ - public BeaninfoEntry[] getBeanInfoEntryContributions(IConfigurationContributionInfo info) { - return EMPTY_BEANINFO_ENTRIES; - } - - /* - * (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor#runOverrides(org.eclipse.core.runtime.IPath, java.lang.String, org.eclipse.jem.java.JavaClass, org.eclipse.emf.ecore.resource.ResourceSet, org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IContributorOverrideRunnable) - */ - public void runOverrides(IPath packagePath, String className, JavaClass javaClass, ResourceSet rset, IContributorOverrideRunnable runnable) { - // Default is do nothing - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoCoreMessages.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoCoreMessages.java deleted file mode 100644 index 2dd5656a6..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoCoreMessages.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 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.jem.internal.beaninfo.core; - -import org.eclipse.osgi.util.NLS; - -public final class BeaninfoCoreMessages extends NLS { - - private static final String BUNDLE_NAME = "org.eclipse.jem.internal.beaninfo.core.messages";//$NON-NLS-1$ - - private BeaninfoCoreMessages() { - // Do not instantiate - } - - public static String BeanInfoCacheController_Job_WriteBeaninfoCache_Title; - - static { - NLS.initializeMessages(BUNDLE_NAME, BeaninfoCoreMessages.class); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoEntry.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoEntry.java deleted file mode 100644 index 2a91c7d36..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoEntry.java +++ /dev/null @@ -1,373 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.internal.beaninfo.core; -/* - * $RCSfile: BeaninfoEntry.java,v $ - * $Revision: 1.8 $ $Date: 2006/05/17 20:13:00 $ - */ - -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; - -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.*; -import org.eclipse.jdt.core.*; -import org.w3c.dom.*; - -import org.eclipse.jem.internal.beaninfo.adapters.*; - -/** - * Beaninfo entry. Location of the beaninfos. Much like a standard classpath entry. - * The BeanInfos are either in a jar or another project. They can be supplied as - * a local file in the project, or as an external jar, or as external jar through a - * variable, or an external jar through a plugin. - * <p> - * An external jar through containers is not valid because container are attached to - * projects. they aren't standalone. - * - * @version 1.0 - * @author - */ -public class BeaninfoEntry implements IBeaninfosDocEntry { - - final static String sBeaninfo = "beaninfo"; // Beaninfo entry, shared with BeaninfosDoc. //$NON-NLS-1$ - - public static final int BIE_PLUGIN = 100; // Beaninfo jar can be found in a plugin. - - static int kindFromString(String kindStr) { - if (kindStr == null || kindStr.length() == 0) - return BIE_PLUGIN; // Default to plugin. If coming from beaninfoconfig, there should always be kind. But if coming from plugin.xml there shouldn't be one. - if (kindStr.equalsIgnoreCase("con")) //$NON-NLS-1$ - return IClasspathEntry.CPE_CONTAINER; - if (kindStr.equalsIgnoreCase("var")) //$NON-NLS-1$ - return IClasspathEntry.CPE_VARIABLE; - if (kindStr.equalsIgnoreCase("src")) //$NON-NLS-1$ - return IClasspathEntry.CPE_SOURCE; - if (kindStr.equalsIgnoreCase("lib")) //$NON-NLS-1$ - return IClasspathEntry.CPE_LIBRARY; - if (kindStr.equalsIgnoreCase("plugin")) //$NON-NLS-1$ - return BIE_PLUGIN; - return -1; - } - - static String kindToString(int kind) { - - switch (kind) { - case IClasspathEntry.CPE_PROJECT : - return "src"; // backward compatibility //$NON-NLS-1$ - case IClasspathEntry.CPE_SOURCE : - return "src"; //$NON-NLS-1$ - case IClasspathEntry.CPE_LIBRARY : - return "lib"; //$NON-NLS-1$ - case IClasspathEntry.CPE_VARIABLE : - return "var"; //$NON-NLS-1$ - case IClasspathEntry.CPE_CONTAINER: - return "con"; //$NON-NLS-1$ - case BIE_PLUGIN: - return "plugin"; //$NON-NLS-1$ - default : - return "unknown"; //$NON-NLS-1$ - } - } - - /** - * Return the appropriate kind of entry when we know it is a classpath entry. - */ - public static IClasspathEntry createEntry(int kind, IPath path, IProject project, boolean isExported) { - switch (kind) { - - case IClasspathEntry.CPE_LIBRARY : - if (path.isAbsolute()) - return JavaCore.newLibraryEntry(path, null, null, isExported); - break; - - case IClasspathEntry.CPE_SOURCE : - if (path.isAbsolute()) { - // must be an entry in this project or specify another project - String projSegment = path.segment(0); - if (project != null && projSegment != null && projSegment.equals(project.getName())) { - // this project - return JavaCore.newSourceEntry(path); - } else { - // another project - return JavaCore.newProjectEntry(path, isExported); - } - } - break; - - case IClasspathEntry.CPE_VARIABLE : - return JavaCore.newVariableEntry(path, null, null, isExported); - - case IClasspathEntry.CPE_CONTAINER: - return JavaCore.newContainerEntry(path, isExported); - - } - - return null; - } - /** - * Read the entry in from the element. - */ - public static BeaninfoEntry readEntry(IReader reader, Object element, IProject project) { - String elementKind = reader.getAttribute(element, BeaninfosDoc.sKind); - String pathStr = reader.getAttribute(element, BeaninfosDoc.sPath); - // ensure path is absolute - IPath path = new Path(pathStr); - int kind = kindFromString(elementKind); - if (kind != IClasspathEntry.CPE_VARIABLE && kind != IClasspathEntry.CPE_CONTAINER && kind != BIE_PLUGIN && !path.isAbsolute()) { - path = project != null ? project.getFullPath().append(path) : path.makeAbsolute(); // Some folder/jar within this project - } - - // exported flag - String exportedString = reader.getAttribute(element, BeaninfosDoc.sExported); - boolean isExported = "true".equalsIgnoreCase(exportedString); //$NON-NLS-1$ - //$NON-NLS-1$ - - // recreate the entry - IClasspathEntry cpEntry = null; - IPath pluginPath = null; - if (kind != BIE_PLUGIN) { - cpEntry = createEntry(kind, path, project, isExported); - } else { - if (path.isAbsolute()) - pluginPath = path; - else { - // Kludge This should only be a plugin type if from configuration element. So we will cast to that - // and get the plugin id to create an absolute plugin path. - if (element instanceof IConfigurationElement) { - pluginPath = new Path('/'+((IConfigurationElement) element).getDeclaringExtension().getContributor().getName()).append(path); - } else - return null; // Not valid because can't have plugin from .beaninfoconfig file. - } - } - - ArrayList searchpaths = new ArrayList(); - Object children = reader.getChildren(element); - int childrenLength = reader.getLength(children); - for (int i = 0; i < childrenLength; i++) { - Object child = reader.getItem(children, i); - if (reader.isNodeTypeElement(child)) { - Object entry = null; - if (reader.getNodeName(child).equalsIgnoreCase(SearchpathEntry.sSearchpath)) { - entry = SearchpathEntry.readEntry(reader, child, project, true); - } - if (entry != null) - searchpaths.add(entry); - } - } - - if (cpEntry != null) - return new BeaninfoEntry( - cpEntry, - (SearchpathEntry[]) searchpaths.toArray(new SearchpathEntry[searchpaths.size()]), - isExported); - else return new BeaninfoEntry( - pluginPath, - (SearchpathEntry[]) searchpaths.toArray(new SearchpathEntry[searchpaths.size()]), - isExported); - } - - protected IClasspathEntry entry; // Store it as a classpath entry for convienence. It is the RAW classpath entry. This is only used when pointing to something other than a plugin. - protected IPath pluginPath; // When stored in a plugin, this will be set instead. - protected boolean isExported; - protected SearchpathEntry[] searchpaths; - - /** - * Used when the beaninfo jar is within a plugin. In that case, the first segment - * of the path is the plugin descriptor, and the rest is the path from the plugin - * directory to the jar. - */ - public BeaninfoEntry(IPath pluginPath, SearchpathEntry[] searchpaths, boolean isExported) { - this(searchpaths, isExported); - this.pluginPath = pluginPath; - } - - /** - * Used when the beaninfo jar/folder is either an external jar/folder or is somewhere else - * in the workspace. In that case the entry is the RAW classpath entry to that code. - */ - public BeaninfoEntry(IClasspathEntry entry, SearchpathEntry[] searchpaths, boolean isExported) { - this(searchpaths, isExported); - this.entry = entry; - } - - protected BeaninfoEntry(SearchpathEntry[] searchpaths, boolean isExported) { - this.isExported = isExported; - this.searchpaths = searchpaths != null ? searchpaths : new SearchpathEntry[0]; - } - - public SearchpathEntry[] getSearchPaths() { - return searchpaths; - } - - public void setSearchPaths(SearchpathEntry[] searchpaths) { - this.searchpaths = searchpaths; - } - - public boolean isExported() { - return isExported; - } - - public void setIsExported(boolean isExported) { - this.isExported = isExported; - } - - public Node writeEntry(Document doc, IProject project) { - - Element element = doc.createElement(sBeaninfo); - IPath path = null; - if (entry != null) { - element.setAttribute(BeaninfosDoc.sKind, kindToString(entry.getEntryKind())); - path = entry.getPath(); - if (entry.getEntryKind() != IClasspathEntry.CPE_VARIABLE && entry.getEntryKind() != IClasspathEntry.CPE_CONTAINER) { - // translate to project relative from absolute (unless a device path) - if (path.isAbsolute()) { - if (path.segment(0).equals(project.getFullPath().segment(0))) { - path = path.removeFirstSegments(1); - path = path.makeRelative(); - } else { - path = path.makeAbsolute(); - } - } - } - } else { - element.setAttribute(BeaninfosDoc.sKind, kindToString(BIE_PLUGIN)); - path = pluginPath; - } - - element.setAttribute(BeaninfosDoc.sPath, path.toString()); //$NON-NLS-1$ - if (isExported()) { - element.setAttribute(BeaninfosDoc.sExported, "true"); //$NON-NLS-1$ - } - - for (int i = 0; i < searchpaths.length; i++) { - SearchpathEntry spe = searchpaths[i]; - element.appendChild(spe.writeEntry(doc, project)); - } - - return element; - } - - /** - * If this is not a plugin info, then return the classpath entry. - */ - public IClasspathEntry getClasspathEntry() { - return entry; - } - - /** - * Return the resolved classpaths. Each entry in the array will be either: - * 1) IProject - If it is a project type entry. Want the whole project - * 2) String - an absolute external path to a jar - * 3) IPath - a path to a plugin jar. The first segment is the plugin id, the rest is the path relative to that plugin. - * - * - * @param javaProject - * @return The array of paths, or <code>null</code> if no paths. - * - * @since 1.0.0 - */ - public Object[] getClasspath(IJavaProject javaProject) { - if (entry != null) { - // It is a standard CPE Entry. - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - List paths = new ArrayList(1); - IClasspathEntry resolvedEntry = JavaCore.getResolvedClasspathEntry(entry); - resolveEntry(root, paths, resolvedEntry, javaProject); - return paths.toArray(); - } else if (pluginPath != null) - return new Object[] {pluginPath}; - - return null; - - } - - private void resolveEntry(IWorkspaceRoot root, List paths, IClasspathEntry entry, IJavaProject javaProject) { - switch (entry.getEntryKind()) { - case IClasspathEntry.CPE_PROJECT : - IProject reqProject = (IProject) root.findMember(entry.getPath().lastSegment()); - // Project entries only have one segment. - if (reqProject != null && reqProject.isOpen()) - paths.add(reqProject); - break; - - case IClasspathEntry.CPE_SOURCE : - reqProject = (IProject) root.findMember(entry.getPath().segment(0)); - // Find project from the first segment. - IJavaProject jProject = JavaCore.create(reqProject); - if (jProject != null) { - try { - IPath outputLocation = jProject.getOutputLocation(); - IResource resource = root.findMember(outputLocation); - if (resource != null) { - paths.add(resource.getLocation().toString()); - } - } catch(JavaModelException e) { - } - } - break; - - case IClasspathEntry.CPE_LIBRARY : - IResource library = root.findMember(entry.getPath()); - // can be external or in workspace - paths.add((library != null) ? library.getLocation().toString() : entry.getPath().toString()); - break; - - case IClasspathEntry.CPE_CONTAINER: - try { - IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), javaProject); - if (container != null) { - IClasspathEntry[] entries = container.getClasspathEntries(); - for (int i = 0; i < entries.length; i++) { - resolveEntry(root, paths, entries[i], javaProject); - } - } - } catch (JavaModelException e) { - BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING); - } - } - } - - public int getKind() { - return entry != null ? entry.getEntryKind() : BIE_PLUGIN; - } - - public IPath getPath() { - return entry != null ? entry.getPath() : pluginPath; - } - - public boolean equals(Object other) { - if (this == other) - return true; - - if (!(other instanceof BeaninfoEntry)) - return false; - - // Return equal if the classpath entry is the same classpath entry or plugin path entry. - // The search path doesn't have any affect on the semantic equality. - BeaninfoEntry otherEntry = (BeaninfoEntry) other; - if (isExported != otherEntry.isExported) - return false; - if (entry != null) - return entry.equals(otherEntry.entry); - - return pluginPath.equals(otherEntry.pluginPath); - } - - public int hashCode() { - if (entry != null) - return entry.hashCode() ^ (isExported ? Boolean.TRUE : Boolean.FALSE).hashCode(); - else - return pluginPath.hashCode() ^ (isExported ? Boolean.TRUE : Boolean.FALSE).hashCode(); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoPlugin.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoPlugin.java deleted file mode 100644 index 0584d07cf..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoPlugin.java +++ /dev/null @@ -1,752 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.internal.beaninfo.core; -/* - * $RCSfile: BeaninfoPlugin.java,v $ - * $Revision: 1.22 $ $Date: 2006/05/17 20:13:00 $ - */ - - -import java.util.*; -import java.util.Map.Entry; -import java.util.logging.Level; -import java.util.regex.Pattern; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.*; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.jdt.core.IClasspathContainer; -import org.eclipse.jdt.core.JavaCore; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoNature; -import org.eclipse.jem.internal.proxy.core.*; -import org.eclipse.jem.internal.proxy.core.ContainerPathContributionMapping.ContainerContributionEntry; -import org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo.ContainerPaths; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.util.logger.proxy.Logger; -import org.eclipse.jem.util.logger.proxyrender.EclipseLogger; -import org.eclipse.jem.util.plugin.JEMUtilPlugin; - - -/** - * The plugin class for the org.eclipse.jem.internal.proxy.core plugin. - */ - -public class BeaninfoPlugin extends Plugin { - public static final String PI_BEANINFO_PLUGINID = "org.eclipse.jem.beaninfo"; // Plugin ID, used for QualifiedName. //$NON-NLS-1$ - public static final String PI_BEANINFO_OVERRIDES = "overrides"; // ID of the overrides extension point. //$NON-NLS-1$ - - private static BeaninfoPlugin BEANINFO_PLUGIN = null; - - public BeaninfoPlugin() { - BEANINFO_PLUGIN = this; - } - - /** - * Accessor method to get the singleton plugin. - */ - public static BeaninfoPlugin getPlugin() { - return BEANINFO_PLUGIN; - } - - /** - * Special Override file name used when need to apply an override to a class that is at the root. - * A root is one that doesn't have a super type. These are <code>java.lang.Object</code>, interfaces, and any - * undefined classes (i.e. classes that don't actually exist). - */ - public static final String ROOT = "..ROOT.."; //$NON-NLS-1$ - - - /** - * Special override scheme to refer to the current java class. (As in "X:ROOT#//@root"). - * @since 1.2.0 - */ - public static final String ROOT_SCHEMA = "X"; //$NON-NLS-1$ - - /** - * Special override opaque part to refer to the current java class. (As in "X:ROOT#//@root"). - * @since 1.2.0 - */ - public static final String ROOT_OPAQUE = "ROOT"; //$NON-NLS-1$ - - /** - * The extension used on any override file when you pass in a path through the method that takes a string. - */ - public static final String OVERRIDE_EXTENSION = "override"; //$NON-NLS-1$ - - - /* - * Map of open natures. This map is needed because on shutdown of beaninfo plugin we need - * to shutdown the natures. If we don't do that there is a slight possibility of an error - * because proxy plugin will shutdown and this can cause a callback into beaninfo which has - * already been shutdown. It calls back through the registry listener that BeaninfoNature - * added to the registry to notify that the registry is being shutdown. - * - * Also BeanInfoCacheController needs to know so that it can tell it the project is closing or - * being deleted or that it needs to be cleared due to a clear request. - */ - private Map openNatures; - - private ContainerPathContributionMapping beaninfoEntryContributionsMapping; - private ContainerPathContributionMapping contributorContributionsMapping; - private Map pluginToBeaninfoEntryContributions; - private Map pluginToContributors; - - /* - * Override contributions from extension point. - * ocFragments: Array of fragments paths. When a match is found for a path, the index - * is the index into the ocContainerIds and ocPluginIds array for the contributions. - * ocContainerIds: The first dimension is the index of the fragment that the list of OverrideContributions is for. - * The second dimension is the array of contributions for that fragment, one per container id. - * ocPluginIds: The first dimension is the index of the fragment that the list of OverrideContributions is for. - * The second dimension is the array of contributions for that fragment, one per plugin id. - * - * If a particular fragment doesn't have any entries of container and/or plugin, then EMPTY_OC is used for that - * entry so that we don't need to check for null. - * - * How this is used is for a particular path requested, the ocFragments will be searched for the fragments that - * are appropriate, then the index of the entry is used to walk through the OC[] array returned from the ocContainerIds - * or ocPluginIds. Each contribution would be checked to see if the container id/plugin id is in the visible classpath (through - * the info data stored in the persistent property). If it is, then the overrides from that contribution will be used. - */ - private IPath ocFragments[]; - private OverrideContribution[][] ocContainerIds; - private OverrideContribution[][] ocPluginIds; - - private static final OverrideContribution[] EMPTY_OC = new OverrideContribution[0]; // Used for an empty contribution list for a fragment. - - public synchronized BeaninfoEntry[] getContainerIdBeanInfos(String containerID, String[] containerPaths) { - if (beaninfoEntryContributionsMapping == null) - processBeanInfoContributionExtensionPoint(); - return (BeaninfoEntry[]) beaninfoEntryContributionsMapping.getContributors(containerID, containerPaths); - } - - public synchronized BeaninfoEntry[] getPluginBeanInfos(String pluginid) { - if (pluginToBeaninfoEntryContributions == null) - processBeanInfoContributionExtensionPoint(); - return (BeaninfoEntry[]) pluginToBeaninfoEntryContributions.get(pluginid); - } - - public synchronized IConfigurationElement[] getPluginContributors(String pluginid) { - if (pluginToContributors == null) - processBeanInfoContributionExtensionPoint(); - return (IConfigurationElement[]) pluginToContributors.get(pluginid); - } - - public synchronized IConfigurationElement[] getContainerIdContributors(String containerID, String[] containerPaths) { - if (contributorContributionsMapping == null) - processBeanInfoContributionExtensionPoint(); - return (IConfigurationElement[]) contributorContributionsMapping.getContributors(containerID, containerPaths); - } - - public static final String PI_BEANINFO_CONTRIBUTION_EXTENSION_POINT = PI_BEANINFO_PLUGINID+".registrations"; //$NON-NLS-1$ - public static final String PI_REGISTRATION = "registration"; //$NON-NLS-1$ - public static final String PI_BEANINFO = "beaninfo"; //$NON-NLS-1$ - public static final String PI_OVERRIDE = "override"; //$NON-NLS-1$ - public static final String PI_CONTRIBUTOR = "contributor"; //$NON-NLS-1$ - public static final String PI_PACKAGE = "package"; //$NON-NLS-1$ - public static final String PI_PATH = "path"; //$NON-NLS-1$ - - protected synchronized void processBeanInfoContributionExtensionPoint() { - ContributorExtensionPointInfo info = ProxyPlugin.processContributionExtensionPoint(PI_BEANINFO_CONTRIBUTION_EXTENSION_POINT); - ConfigurationElementReader reader = new ConfigurationElementReader(); - // Process the container IDs first. We can't use the info directly because the actual configuration elements of interest are - // sub-elements of the info. The info contains the container path that we need. - beaninfoEntryContributionsMapping = new ContainerPathContributionMapping(BeaninfoEntry.class); - contributorContributionsMapping = new ContainerPathContributionMapping(IConfigurationElement.class); - - Map fragmentsToIds = new HashMap(); - for (Iterator iter = info.containerPathContributions.containerIdToContributions.entrySet().iterator(); iter.hasNext();) { - Map.Entry entry= (Map.Entry) iter.next(); - String containerid = (String) entry.getKey(); - ContainerContributionEntry[] contribElements = (ContainerContributionEntry[]) entry.getValue(); - for (int i = 0; i < contribElements.length; i++) { - ContainerContributionEntry contribElement = contribElements[i]; - IConfigurationElement element = (IConfigurationElement) contribElement.getContribution(); - if (PI_REGISTRATION.equals(element.getName())) { - IConfigurationElement[] children = element.getChildren(); - for (int j = 0; j < children.length; j++) { - IConfigurationElement child = children[j]; - if (PI_BEANINFO.equals(child.getName())) { - // This is a beaninfo entry - BeaninfoEntry be = BeaninfoEntry.readEntry(reader, child, null); - if (be != null) - beaninfoEntryContributionsMapping.addContribution(containerid, contribElement.getContainerPathPattern(), be); - } else if (PI_OVERRIDE.equals(child.getName())) { - addOverrideEntry(fragmentsToIds, true, containerid, contribElement.getContainerPathPattern(), child); - } - } - } else if (PI_CONTRIBUTOR.equals(element.getName())) { - contributorContributionsMapping.addContribution(containerid, contribElement.getContainerPathPattern(), element); - } - } - } - - beaninfoEntryContributionsMapping.finalizeMapping(); - contributorContributionsMapping.finalizeMapping(); - - // Now process the plugin IDs. - pluginToBeaninfoEntryContributions = new HashMap(info.pluginToContributions.size()); - for (Iterator iter = info.pluginToContributions.entrySet().iterator(); iter.hasNext();) { - Map.Entry entry= (Map.Entry) iter.next(); - String pluginId = (String) entry.getKey(); - IConfigurationElement[] configElements = (IConfigurationElement[]) entry.getValue(); - for (int i = 0; i < configElements.length; i++) { - IConfigurationElement element = configElements[i]; - if (PI_REGISTRATION.equals(element.getName())) { - IConfigurationElement[] children = element.getChildren(); - for (int j = 0; j < children.length; j++) { - IConfigurationElement child = children[j]; - if (PI_BEANINFO.equals(child.getName())) { - // This is a beaninfo entry - BeaninfoEntry be = BeaninfoEntry.readEntry(reader, child, null); - if (be != null) - addEntry(pluginToBeaninfoEntryContributions, pluginId, be); - } else if (PI_OVERRIDE.equals(child.getName())) { - addOverrideEntry(fragmentsToIds, false, pluginId, null, child); - } - } - } else if (PI_CONTRIBUTOR.equals(element.getName())) { - if (pluginToContributors == null) - pluginToContributors = new HashMap(5); // These are rare, don't create until necessary. - addEntry(pluginToContributors, pluginId, element); - } - } - } - - // Now go through and turn all of the contribution lists into arrays. - for (Iterator iter = pluginToBeaninfoEntryContributions.entrySet().iterator(); iter.hasNext();) { - Map.Entry entry = (Map.Entry) iter.next(); - entry.setValue(((List) entry.getValue()).toArray(new BeaninfoEntry[((List) entry.getValue()).size()])); - } - - if (pluginToContributors == null) - pluginToContributors = Collections.EMPTY_MAP; // Since we don't have any. - else { - for (Iterator iter = pluginToContributors.entrySet().iterator(); iter.hasNext();) { - Map.Entry entry = (Map.Entry) iter.next(); - entry.setValue(((List) entry.getValue()).toArray(new IConfigurationElement[((List) entry.getValue()).size()])); - } - } - - // Now handle the entire list of fragments. - ocFragments = new IPath[fragmentsToIds.size()]; - ocContainerIds = new OverrideContribution[ocFragments.length][]; - ocPluginIds = new OverrideContribution[ocFragments.length][]; - Iterator iter; - int fragIndex; - for (iter = fragmentsToIds.entrySet().iterator(), fragIndex=0; iter.hasNext(); fragIndex++) { - Map.Entry mapEntry = (Map.Entry) iter.next(); - ocFragments[fragIndex] = (IPath) mapEntry.getKey(); - Map[] mapValue = (Map[]) mapEntry.getValue(); - if (mapValue[0] == null) - ocContainerIds[fragIndex] = EMPTY_OC; - else { - Map containers = mapValue[0]; - List ocContributions = new ArrayList(); - for (Iterator ocIterator = containers.entrySet().iterator(); ocIterator.hasNext();) { - Map.Entry containerEntry = (Map.Entry) ocIterator.next(); - String containerID = (String) containerEntry.getKey(); - for (Iterator patternIterator = ((Map) containerEntry.getValue()).entrySet().iterator(); patternIterator.hasNext();) { - Map.Entry patternEntry = (Entry) patternIterator.next(); - OverrideContribution oc = new OverrideContribution(); - oc.id = containerID; - oc.pattern = (Pattern) patternEntry.getKey(); - List[] ocLists = (List[]) patternEntry.getValue(); - oc.pluginIds = (String[]) ocLists[0].toArray(new String[ocLists[0].size()]); - oc.paths = (String[]) ocLists[1].toArray(new String[ocLists[1].size()]); - ocContributions.add(oc); - } - } - ocContainerIds[fragIndex] = (OverrideContribution[]) ocContributions.toArray(new OverrideContribution[ocContributions.size()]); - } - if (mapValue[1] == null) - ocPluginIds[fragIndex] = EMPTY_OC; - else { - Map plugins = mapValue[1]; - OverrideContribution[] ocContribution = ocPluginIds[fragIndex] = new OverrideContribution[plugins.size()]; - int ocIndex; - Iterator ocIterator; - for (ocIterator = plugins.entrySet().iterator(), ocIndex=0; ocIterator.hasNext(); ocIndex++) { - Map.Entry pluginEntry = (Map.Entry) ocIterator.next(); - OverrideContribution oc = ocContribution[ocIndex] = new OverrideContribution(); - oc.id = (String) pluginEntry.getKey(); - List[] ocLists = (List[]) pluginEntry.getValue(); - oc.pluginIds = (String[]) ocLists[0].toArray(new String[ocLists[0].size()]); - oc.paths = (String[]) ocLists[1].toArray(new String[ocLists[1].size()]); - } - } - } - } - - /* - * Add an entry to the map. If the key doesn't exist, create an entry as an array. Then add the entry to array. - */ - private void addEntry(Map map, Object key, Object entry) { - List mapEntry = (List) map.get(key); - if (mapEntry == null) { - mapEntry = new ArrayList(1); - map.put(key, mapEntry); - } - mapEntry.add(entry); - } - - /* - * Add an entry to the map. - * id is the container path pattern/plugin id. - * - * The structure of the map is: - * key: fragment name - * value: Map[2], where [0] is for container id, and [1] is for plugin ids. - * Map[x]: - * key: container/plugin id - * value: Map(pattern->List(FinalOverride)) for container, of FinalOverride for plugin. - * - * FinalOverride: List[2], where [0] is list of plugin ids for the override, and [1] is list of paths for the override files relative to that plugin id. - * - * After all done these maps/list will be boiled down to the arrays that will be used for lookup. - */ - private void addOverrideEntry(Map map, boolean container, Object id, Pattern pattern, IConfigurationElement entry) { - - String packageName = entry.getAttributeAsIs(PI_PACKAGE); - String plugin = null; - String pathString = entry.getAttributeAsIs(PI_PATH); - IPath fragment = null; - if (packageName != null && packageName.length() > 0 && pathString != null && pathString.length() > 0) { - fragment = new Path(packageName.replace('.', '/')); - if (pathString.charAt(pathString.length()-1) != '/') - pathString += '/'; - if (pathString.charAt(0) != '/') - plugin = entry.getDeclaringExtension().getContributor().getName(); - else { - if (pathString.length() > 4) { - int pend = pathString.indexOf('/', 1); - if (pend == -1 || pend >= pathString.length()-1) - return; // invalid - plugin = pathString.substring(1, pend); - pathString = pathString.substring(pend+1); - } else - return; // invalid - } - } - if (pathString.length() < 2) - return; // invalid - - Map[] mapEntry = (Map[]) map.get(fragment); - if (mapEntry == null) { - mapEntry = new HashMap[2]; - map.put(fragment, mapEntry); - } - List[] idEntry; - if (container) { - if (mapEntry[0] == null) - mapEntry[0] = new HashMap(2); - - Map patternMap = (Map) mapEntry[0].get(id); - if (patternMap == null) - mapEntry[0].put(id, patternMap = new HashMap()); - - idEntry = (List[]) patternMap.get(pattern); - if (idEntry == null) { - patternMap.put(pattern, idEntry = new List[] { new ArrayList(1), new ArrayList(1)}); - } - } else { - if (mapEntry[1] == null) - mapEntry[1] = new HashMap(2); - - idEntry = (List[]) mapEntry[1].get(id); - if (idEntry == null) { - mapEntry[1].put(id, idEntry = new List[] { new ArrayList(1), new ArrayList(1)}); - } - } - idEntry[0].add(plugin); - idEntry[1].add(pathString); - - - } - - /* - * This is an list of overrides that are available as a contribution for a specific fragment. - * <ul> - * <li>The id of this contribution. Either container (Pattern) or plugin id depending on which list it was in.. - * <li>The plugins array lists the plugin ids for all of the paths in this contribution. - * <li>The paths array lists the folder path under that corresponding plugin from "pluginIds". - * </ul> - * <p> - * - * @since 1.0.0 - */ - private static class OverrideContribution { - public String id; - public Pattern pattern; // Used only for containers. - public String[] pluginIds; - public String[] paths; - } - - /** - * The runnable is to used to apply override. - * <p> - * This will be called in sequence for each override path found. It is send in on the apply overrides call. This - * interface implementation is private. - * <p> - * Clients (implementers of the IBeanInfoContributor) will be passed in the subinterface <code>IContributorOverrideRunnable</code> which - * inherits from this interface. - * <p> - * This interface is not intended to be implemented by clients. - * - * @since 1.0.0 - * @see BeaninfoPlugin#applyOverrides(IProject, String, String, ResourceSet, IOverrideRunnable) - */ - public interface IOverrideRunnable { - /** - * This will be called with the directory path to use. It will be called over and over for every - * override path found for a package. The path will be complete, including trailing '/'. - * It will be in a URI format for a directory. The overriderunnable implementation will then append the filename call (i.e. classbeingintrospected.override) to get a complete path. - * <p> - * Clients (IBeanInfoContributor implementers) can call this to apply a specific override file to the current - * class being processed. - * - * @param overridePath the path will be complete, including trailing '/'. It will be in a URI format for a directory. The override file name (classname.override) will be appended to this and retrieved and applied. - * - * @since 1.0.0 - */ - public void run(String overridePath); - - /** - * This will be called with the actual resource to use. This will be called by special contributors that want - * a special explicit override resource to be used. - * <p> - * Contributors should use the ResourceSet that was passed into them. This is so that anything java class that - * the override resource points to will be found. - * <p> - * This resource will be automatically removed by BeanInfo after being applied. It must not be left around because - * in the process of being applied it will be modified, so it could not be reused. - * - * @param overrideResource the resource to apply to the current class. NOTE: This resource WILL be removed from - * the resource set it is in automatically by this call. It won't be left around because the action of apply - * will actually modify the resource. - * - * @since 1.0.0 - */ - public void run(Resource overrideRes); - } - - /** - * IBeanInfoContributor runnable to use to apply overrides. - * <p> - * An implementation of this will be passed in to IBeanInfoContributor's so that they can call back to apply the overrides. They - * should call the appropriate run method once for each override to be applied. The run can be called more than once from each IBeanInfoContributor. - * <p> - * It inherits from <code>IOverrideRunnable</code>, so see that for more methods to call. - * <p> - * This interface is not intended to be implemented by clients. - * - * @see BeaninfoPlugin.IOverrideRunnable for more methods that can be called. - * @since 1.0.0 - */ - public interface IContributorOverrideRunnable extends IOverrideRunnable { - - /** - * Tests if path has already been contributed once for the current class. - * <p> - * This can be called by the IBeanInfoContributor for overrides to test if the path (same path as for the IOverrideRunnable.run(String) method) - * has already been contributed once for this class. It can be used to save time. However it is not necessary because - * BeanInfo will not permit it to be contributed more than once for a class. - * - * @param path - * @return <code>true</code> if used already. - * - * @see IOverrideRunnable#run(String) - * @since 1.0.0 - */ - public boolean pathContributed(String path); - - /** - * Tests if the URI has already been contributed once for the current class. - * <p> - * This can be called by an IBeanInfoContributor for overrides to see if the URI (same path as the URI from the IOverrideRunnable.run(Resource) method) - * has already been contributed once for this class. It can be used to save time. However, not necessary because - * BeanInfo will not permit the URI to be contributed more than once for a class. - * - * @param resourceURI - * @return <code>true</code> if used already. - * - * @see IOverrideRunnable#run(Resource) - * @since 1.0.0 - */ - public boolean resourceContributed(URI resourceURI); - } - - private static final String[] NO_PATHS = new String[0]; - - /** - * Return just the contributed override paths (through the BeanInfo registrations). Does not include any paths that are contributed from - * IBeanInfoContributor's. This is used by the BeanInfoClassAdapter to load the overrides files into one cache file so that it can - * be done at one time the next time it is needed. - * - * @param project - * @param packageName - * @return array of path strings to the override. The files may not exist, they is just possible overrides. - * - * @since 1.1.0 - */ - public String[] getOverridePaths(IProject project, String packageName) { - final IPath packagePath = new Path(packageName.replace('.', '/')+'/'); - List overridePaths = new ArrayList(); - try { - IConfigurationContributionInfo info = (IConfigurationContributionInfo) project.getSessionProperty(BeaninfoNature.CONFIG_INFO_SESSION_KEY); - if (info == null) { - // It hasn't been created yet, so we need to create our own internal version here. - info = ProxyLaunchSupport.createDefaultConfigurationContributionInfo(JavaCore.create(project)); - BeaninfoNature.computeBeanInfoConfigInfo(info); - } - synchronized (this) { - if (ocFragments == null) - processBeanInfoContributionExtensionPoint(); // We haven't processed them yet. - } - - // Cache of tested patterns. (Pattern->Boolean). If a pattern has been tested against all visible container paths we don't need to test the - // pattern again if it is found again. (Note: This works for efficiency because ProxyPlugin uses the same pattern instance for - // same pattern found while processing one extension point). The value is true if the pattern matches a visible container path. - Map testedPatterns = new HashMap(); - for (int fragmentIndex = 0; fragmentIndex < ocFragments.length; fragmentIndex++) { - if (ocFragments[fragmentIndex].isPrefixOf(packagePath)) { - String leftOver = null; // The left over portion of the package. This will be set first time needed. - OverrideContribution[] cntrContributions = ocContainerIds[fragmentIndex]; - for (int ocindex = 0; ocindex < cntrContributions.length; ocindex++) { - OverrideContribution contribution = cntrContributions[ocindex]; - Boolean tested = (Boolean) testedPatterns.get(contribution.pattern); - if (tested == null) { - tested = Boolean.FALSE; - ContainerPaths containerPaths = (ContainerPaths) info.getContainerIds().get(contribution.id); - if (containerPaths != null) { - String[] visible = containerPaths.getVisibleContainerPaths(); - for (int i = 0; i < visible.length; i++) { - if (contribution.pattern.matcher(visible[i]).matches()) { - tested = Boolean.TRUE; - break; - } - } - } - testedPatterns.put(contribution.pattern, tested); - } - - if (tested.booleanValue()) { - for (int cindex = 0; cindex < contribution.pluginIds.length; cindex++) { - // Because of URIConverters and normalization in org.eclipse.jem.util stuff, we - // need to have plugin uri's in the form "platform:/plugin/pluginname". - // Bundle's don't return this format. They return bundle:/stuff - // So we will simple create it of the platform:/plugin format. - // To save time, we will first see if we have the bundle. - Bundle bundle = Platform.getBundle(contribution.pluginIds[cindex]); - if (bundle != null) { - if (leftOver == null) - leftOver = getLeftOver(ocFragments[fragmentIndex], packagePath); - overridePaths.add(JEMUtilPlugin.PLATFORM_PROTOCOL+":/"+JEMUtilPlugin.PLATFORM_PLUGIN+'/'+bundle.getSymbolicName()+'/'+contribution.paths[cindex]+leftOver); //$NON-NLS-1$ - } - } - } - } - - OverrideContribution[] pluginContributions = ocPluginIds[fragmentIndex]; - for (int ocindex = 0; ocindex < pluginContributions.length; ocindex++) { - OverrideContribution contribution = pluginContributions[ocindex]; - Boolean visible = (Boolean) info.getPluginIds().get(contribution.id); - if (visible != null && visible.booleanValue()) { - for (int cindex = 0; cindex < contribution.pluginIds.length; cindex++) { - Bundle bundle = Platform.getBundle(contribution.pluginIds[cindex]); - if (bundle != null) { - if (leftOver == null) - leftOver = getLeftOver(ocFragments[fragmentIndex], packagePath); - overridePaths.add(JEMUtilPlugin.PLATFORM_PROTOCOL+":/"+JEMUtilPlugin.PLATFORM_PLUGIN+'/'+bundle.getSymbolicName()+'/'+contribution.paths[cindex]+leftOver); //$NON-NLS-1$ - } - } - } - } - } - } - } catch (CoreException e) { - getLogger().log(e, Level.INFO); - } - return overridePaths.isEmpty() ? NO_PATHS : (String[]) overridePaths.toArray(new String[overridePaths.size()]); - } - - /** - * Apply the runnable to all of the override paths that are applicable to the - * given package name. It will run through the explicit contributors and the IContainers that implement IBeanInfoContributor. - * <p> - * The package name uses '.' to delineate the fragments of the name, - * i.e. use "<code>java.lang</code>" as a package name. - * <p> - * Note: This is not meant to be called by clients. It is public only because an internal class in another package needs to call it. - * TODO This should be package-protected. Later the other class will be moved into this package. - * - * @param project the project to run against. - * @param packageName - * @param className class name of the class that is being overridden. - * @param javaClass the java class the overrides will be applied to. - * @param resource set that contributors can use to temporarily load dynamic override files. - * @param runnable use this runnable to actually apply overrides. - * - * @since 1.0.0 - */ - public void applyOverrides(final IProject project, String packageName, final String className, final JavaClass javaClass, final ResourceSet rset, final IOverrideRunnable runnable) { - final IPath packagePath = new Path(packageName.replace('.', '/')+'/'); - try { - IConfigurationContributionInfo info = (IConfigurationContributionInfo) project.getSessionProperty(BeaninfoNature.CONFIG_INFO_SESSION_KEY); - if (info == null) { - // It hasn't been created yet, so we need to create our own internal version here. - info = ProxyLaunchSupport.createDefaultConfigurationContributionInfo(JavaCore.create(project)); - BeaninfoNature.computeBeanInfoConfigInfo(info); - } - final IBeanInfoContributor[] explicitContributors = (IBeanInfoContributor[]) project.getSessionProperty(BeaninfoNature.BEANINFO_CONTRIBUTORS_SESSION_KEY); - synchronized (this) { - if (ocFragments == null) - processBeanInfoContributionExtensionPoint(); // We haven't processed them yet. - } - - final Set usedPaths = new HashSet(10); // Set of used paths. So that the contributors don't supply a path already used. This could cause problems if they did. - final IContributorOverrideRunnable contribRunnable = new IContributorOverrideRunnable() { - public void run(String overridePath) { - if (!usedPaths.contains(overridePath)) { - usedPaths.add(overridePath); - runnable.run(overridePath); - } - } - - public void run(Resource overrideRes) { - if (!usedPaths.contains(overrideRes.getURI())) { - usedPaths.add(overrideRes.getURI()); - try { - runnable.run(overrideRes); - } finally { - overrideRes.getResourceSet().getResources().remove(overrideRes); - } - } - } - - public boolean pathContributed(String path) { - return usedPaths.contains(path); - } - - public boolean resourceContributed(URI resourceURI) { - return usedPaths.contains(resourceURI); - } - }; - - // Run through the containers that implement IBeanInfoContributor. - for (Iterator iter = info.getContainers().entrySet().iterator(); iter.hasNext();) { - Map.Entry mapEntry = (Map.Entry) iter.next(); - final IClasspathContainer container = (IClasspathContainer) mapEntry.getKey(); - if (container instanceof IBeanInfoContributor && ((Boolean) mapEntry.getValue()).booleanValue()) { - SafeRunner.run(new ISafeRunnable() { - public void handleException(Throwable exception) { - // Standard run logs to .log - } - public void run() throws Exception { - ((IBeanInfoContributor) container).runOverrides(packagePath, className, javaClass, rset, contribRunnable); - } - }); - } - } - - // Run through the explicit contributors. - for (int i=0; i<explicitContributors.length; i++) { - final int ii = i; - SafeRunner.run(new ISafeRunnable() { - public void handleException(Throwable exception) { - // Standard run logs to .log - } - public void run() throws Exception { - explicitContributors[ii].runOverrides(packagePath, className, javaClass, rset, contribRunnable); - } - }); - } - } catch (CoreException e) { - getLogger().log(e, Level.INFO); - } - } - - private String getLeftOver(IPath fragment, IPath packagePath) { - return packagePath.removeFirstSegments(fragment.segmentCount()).toString(); - } - - private Logger logger; - public Logger getLogger() { - if (logger == null) - logger = EclipseLogger.getEclipseLogger(this); - return logger; - } - - /** - * Add that a BeanInfo nature is active. This is used to tell it to shutdown when beaninfo shuts down. - * TODO <package-protected> because only BeanInfoNature should call it. (public for now but when we make - * BeanInfoNature an API it will be moved into the same package as BeanInfoPlugin). - * - * @param nature - * - * @since 1.0.0 - */ - public void addBeanInfoNature(BeaninfoNature nature) { - if (openNatures == null) - openNatures = new HashMap(); - openNatures.put(nature.getProject(), nature); - } - - /** - * Mark that a BeanInfo nature is not active. This is used to tell it to shutdown when beaninfo shuts down. - * TODO <package-protected> because only BeanInfoNature should call it. (public for now but when we make - * BeanInfoNature an API it will be moved into the same package as BeanInfoPlugin). - * - * @param nature - * - * @since 1.0.0 - */ - public void removeBeanInfoNature(BeaninfoNature nature) { - if (openNatures != null) - openNatures.remove(nature.getProject()); - } - - /** - * Return the registered nature, if any, for the project. This will not cause the - * nature to be created. - * <p> - * <package-protected> because only BeanInfoCacheController should access it. - * @param project - * @return nature for project or <code>null</code> if not registered. - * - * @since 1.1.0 - */ - BeaninfoNature getNature(IProject project) { - return (BeaninfoNature) openNatures.get(project); - } - - - /* (non-Javadoc) - * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - if (openNatures != null && !openNatures.isEmpty()) { - for (Iterator natureItr = openNatures.values().iterator(); natureItr.hasNext();) { - BeaninfoNature nature = (BeaninfoNature) natureItr.next(); - nature.shutdown(); - } - } - - super.stop(context); - } -} - - diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoRegistration.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoRegistration.java deleted file mode 100644 index ca350c98e..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoRegistration.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.core; -/* - * $RCSfile: BeaninfoRegistration.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:29 $ - */ - -import org.eclipse.core.runtime.IConfigurationElement; - -/** - * This is the registration information for registered beaninfos in the BeaninfoPlugin. - * @version 1.0 - * @author - */ -public class BeaninfoRegistration { - - protected BeaninfosDoc doc; - protected IConfigurationElement variableElement; // This is used to get contributor element. If null, then no contributor. - - public BeaninfoRegistration() { - } - - /** - * Construct with a BeaninfosDoc - */ - public BeaninfoRegistration(BeaninfosDoc doc) { - this.doc = doc; - } - - /** - * Construct with a BeaninfosDoc and variable element. - */ - public BeaninfoRegistration(BeaninfosDoc doc, IConfigurationElement variableElement) { - this.doc = doc; - this.variableElement = variableElement; - } - - /** - * Gets the doc. - * @return Returns a BeaninfosDoc - */ - public BeaninfosDoc getDoc() { - return doc; - } - - /** - * Sets the doc. - * @param doc The doc to set - */ - public void setDoc(BeaninfosDoc doc) { - this.doc = doc; - } - - /** - * Gets the variableElement. - * @return Returns a IConfigurationElement - */ - public IConfigurationElement getVariableElement() { - return variableElement; - } - - /** - * Sets the variableElement. - * @param variableElement The variableElement to set - */ - public void setVariableElement(IConfigurationElement variableElement) { - this.variableElement = variableElement; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfosDoc.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfosDoc.java deleted file mode 100644 index ad2299a95..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfosDoc.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.core; -/* - * $RCSfile: BeaninfosDoc.java,v $ - * $Revision: 1.5 $ $Date: 2005/08/24 20:31:29 $ - */ -import java.util.ArrayList; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.IPath; -import org.w3c.dom.*; - -import org.eclipse.jem.internal.beaninfo.adapters.*; -/** - * Beaninfos document in-memory format. - */ - -public class BeaninfosDoc implements IBeaninfosDocEntry { - - protected IBeaninfosDocEntry[] searchpath; - - static final String sExported = "exported"; //$NON-NLS-1$ - - static final String sKind = "kind"; //$NON-NLS-1$ - - static final String sPath = "path"; //$NON-NLS-1$ - - public BeaninfosDoc() { - } - - public BeaninfosDoc(IBeaninfosDocEntry[] searchpath) { - this.searchpath = searchpath; - } - - public int getKind() { - return -1; // N.A. - } - - public IPath getPath() { - return null; // N.A. - } - - public static BeaninfosDoc readEntry(IReader reader, Object root, IProject project) { - ArrayList paths = new ArrayList(); - Object children = reader.getChildren(root); - int childrenLength = reader.getLength(children); - for (int i = 0; i < childrenLength; i++) { - Object child = reader.getItem(children, i); - if (reader.isNodeTypeElement(child)) { - Object entry = null; - if (reader.getNodeName(child).equalsIgnoreCase(BeaninfoEntry.sBeaninfo)) { - entry = BeaninfoEntry.readEntry(reader, child, project); - } else if (reader.getNodeName(child).equalsIgnoreCase(SearchpathEntry.sSearchpath)) { - entry = SearchpathEntry.readEntry(reader, child, project, false); - } - if (entry != null) - paths.add(entry); - } - } - return new BeaninfosDoc((IBeaninfosDocEntry[]) paths.toArray(new IBeaninfosDocEntry[paths.size()])); - } - - public IBeaninfosDocEntry[] getSearchpath() { - return searchpath; - } - - public void setSearchpath(IBeaninfosDocEntry[] searchpath) { - this.searchpath = searchpath; - } - - public Node writeEntry(Document doc, IProject project) { - Element root = doc.createElement(SearchpathEntry.sSearchpath); // Create Root Element - for (int i = 0; i < searchpath.length; i++) { - root.appendChild(searchpath[i].writeEntry(doc, project)); // Add to the document - } - return root; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/ConfigurationElementReader.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/ConfigurationElementReader.java deleted file mode 100644 index 71d0bdb0e..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/ConfigurationElementReader.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.core; -/* - * $RCSfile: ConfigurationElementReader.java,v $ - * $Revision: 1.5 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.lang.reflect.Array; - -import org.eclipse.core.runtime.IConfigurationElement; - -import org.eclipse.jem.internal.beaninfo.adapters.*; - - -/** - * For reading from IConfigurationElements - * @version 1.0 - * @author - */ -class ConfigurationElementReader implements IReader { - - /* - * @see IReader#getChildren(Object) - */ - public Object getChildren(Object node) { - return (node instanceof IConfigurationElement) ? ((IConfigurationElement) node).getChildren() : new IConfigurationElement[0]; - } - - /* - * @see IReader#getLength(Object) - */ - public int getLength(Object nodeList) { - return (nodeList instanceof IConfigurationElement[]) ? Array.getLength(nodeList) : 0; - } - - /* - * @see IReader#getItem(Object, int) - */ - public Object getItem(Object nodeList, int index) { - return (nodeList instanceof IConfigurationElement[]) ? Array.get(nodeList, index) : null; - } - - /* - * @see IReader#isNodeTypeElement(Object) - */ - public boolean isNodeTypeElement(Object node) { - return node instanceof IConfigurationElement; - } - - /* - * @see IReader#getNodeName(Object) - */ - public String getNodeName(Object node) { - return (node instanceof IConfigurationElement) ? ((IConfigurationElement) node).getName() : ""; //$NON-NLS-1$ - } - - /* - * @see IReader#getAttribute(Object, String) - */ - public String getAttribute(Object element, String attributeName) { - return (element instanceof IConfigurationElement) ? ((IConfigurationElement) element).getAttributeAsIs(attributeName) : null; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeanInfoContributor.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeanInfoContributor.java deleted file mode 100644 index f1f9966da..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeanInfoContributor.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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 - *******************************************************************************/ -/* - * $RCSfile: IBeanInfoContributor.java,v $ - * $Revision: 1.6 $ $Date: 2005/08/24 20:31:28 $ - */ -package org.eclipse.jem.internal.beaninfo.core; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.emf.ecore.resource.ResourceSet; - -import org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo; -import org.eclipse.jem.java.JavaClass; - -/** - * Interface for BeanInfo contributors. Supplied either as additional interface on a IClasspathContainer, or as - * an explicit contributor for BeanInfos from the manifest files. - * <p> - * Implementations of this interface allows a dynamic supply of BeanInfo contributions (beaninfo jars and search paths) - * and override files. This is used when the default plugin extension mechanism is too static for the requirements. - * <p> - * There is a very useful default implementation (<code>BeanInfoContributorAdapter</code>) that can be subclassed. The - * default doesn't do anything on its own. But it does have a very useful utility method for loading resources. - * - * @see org.eclipse.jem.internal.beaninfo.core.BeanInfoContributorAdapter - * @since 1.0.0 - */ -public interface IBeanInfoContributor { - - /** - * Return the BeanInfoEntry contributions that are needed. - * <p> - * This will be called by BeanInfo when it determines that this contributor is applicable - * for the current project being processed. BeaninfoEntry's define the BeanInfo jars and search paths to use. - * - * @param info - * @return BeanInfo contributions or <code>null</code> if none to contribute. - * - * @since 1.0.0 - */ - public BeaninfoEntry[] getBeanInfoEntryContributions(IConfigurationContributionInfo info); - - /** - * For the given package path run the override contributions through the runnable. - * <p> - * This will be called by BeanInfo when it determines that this - * contributor is applicable for the current project being processed. - * <p> - * Implementations must call the runnable (the argument <code>runnable</code>) for each override file that is to be applied to the incoming class. - * You can either call the run method that passes in a string pointing to a directory where your override file is - * located (i.e. <code>overrideFileName.override</code> where "overrideFileName" is the name passed. Or you can call the run method that - * takes a Resource that is already loaded (and maybe modified or created locally). - * - * @param packagePath - * @param overrideFileName the overrideFileName that the overrides is for. This can be used in very special cases to provide - * exact override files instead of letting the path be searched. An example would be for providing a file that isn't the same name as the class. - * A very special case is <code>ROOT</code>. This is used when asking to apply root overrides to classes that have no - * super type. - * @param javaClass the java class that the overrides will be applied to. Note: Do not call any property, features, events, or operations calls - * or any property, events, or operations Utilities against this class. That is because this class is being introspected at this time - * and those calls will return invalid values if called at this point since introspection is not yet complete. - * @param resource set that contributors can use to temporarily load dynamic override files. - * @param runnable the runnable that you call to actually apply the override files. - * - * @see BeaninfoPlugin#ROOT - * @see BeaninfoPlugin#OVERRIDE_EXTENSION - * @since 1.0.0 - */ - public void runOverrides(IPath packagePath, String overrideFileName, JavaClass javaClass, ResourceSet rset, BeaninfoPlugin.IContributorOverrideRunnable runnable); -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfoSupplier.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfoSupplier.java deleted file mode 100644 index 0bd69e76c..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfoSupplier.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.core; -/* - * $RCSfile: IBeaninfoSupplier.java,v $ - * $Revision: 1.5 $ $Date: 2005/09/13 20:30:46 $ - */ - - -import org.eclipse.core.resources.IProject; -import org.eclipse.emf.ecore.resource.ResourceSet; - -import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry; -import org.eclipse.jem.util.emf.workbench.ProjectResourceSet; -/** - * Interface to supply information for beaninfo to decouple - * the introspection from the desktop. - */ - -public interface IBeaninfoSupplier { - - /** - * @return Return the registry to use. Initialize it if not already initialized. - */ - public ProxyFactoryRegistry getRegistry(); - - /** - * Used to know if we currently have a registry created in the supplier. - * - * @return true if there is a registry currently in the supplier. - */ - public boolean isRegistryCreated(); - - /** - * Close the registry. This tells the registry to close. This is necessary - * at times because of changes to classes require the registry to be - * reconstructed. - */ - public void closeRegistry(); - - /** - * Return the project that this supplier is for. - * @return - * - * @since 1.0.0 - */ - public IProject getProject(); - - /** - * Create a new resource set based upon the current project. This resource set is hooked into the - * project's resource set so that any searches for java classes. - * - * @return a new resource set that is hooked into the project's java resource set. - * - * @since 1.2.0 - */ - public ProjectResourceSet getNewResourceSet(); - - /** - * The project resource set for this supplier. - * @return - * - * @since 1.2.0 - */ - public ResourceSet getProjectResourceSet(); - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfosDocEntry.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfosDocEntry.java deleted file mode 100644 index f81dadee5..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfosDocEntry.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.core; -/* - * $RCSfile: IBeaninfosDocEntry.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:28 $ - */ - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.IPath; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -/** - * Interface for DOM Doc writable entries. - * - * @version 1.0 - * @author - */ -public interface IBeaninfosDocEntry { - public Node writeEntry(Document doc, IProject project); - - public int getKind(); - public IPath getPath(); -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Init.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Init.java deleted file mode 100644 index 4ac93b596..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Init.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2005 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.jem.internal.beaninfo.core; -/* - * $RCSfile: Init.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:28 $ - */ -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; - -import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoAdapterFactory; -import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter; -import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry; - -/** - * Static initializer class to initialize the beaninfo stuff. - * It is disconnected from the desktop and so doesn't require it. - */ - -public class Init { - - // So it can't be instantiated. - private Init() { - }; - - /** - * Initialize the context with an IBeaninfoSupplier, used to set up the - * introspection process. - * - * The beaninfo supplier is responsible for setting up the bean info search path, - * including removing the sun beaninfos, if desired. - */ - public static void initialize(ResourceSet rset, final IBeaninfoSupplier supplier) { - rset.getAdapterFactories().add(new BeaninfoAdapterFactory(supplier)); - } - - /** - * Initialize the registry now that it is available. - */ - public static void initialize(ProxyFactoryRegistry registry) { - // Remove the "sun.beans.info" from the beaninfo search path because - // we completely override the sun bean infos. - Utilities.removeBeanInfoPath(registry, "sun.beans.infos"); //$NON-NLS-1$ - } - - /** - * Cleanup from the context because we are being removed. - * If clearResults is true, then the factory should clear the results of introspection - * from the everything because the context will still be around. - */ - public static void cleanup(ResourceSet rset, boolean clearResults) { - BeaninfoAdapterFactory factory = - (BeaninfoAdapterFactory) EcoreUtil.getAdapterFactory(rset.getAdapterFactories(), IIntrospectionAdapter.ADAPTER_KEY); - rset.getAdapterFactories().remove(factory); - if (factory != null) - factory.closeAll(clearResults); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SearchpathEntry.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SearchpathEntry.java deleted file mode 100644 index ff80e01a8..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SearchpathEntry.java +++ /dev/null @@ -1,189 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.core; -/* - * $RCSfile: SearchpathEntry.java,v $ - * $Revision: 1.5 $ $Date: 2005/08/24 20:31:29 $ - */ - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jdt.core.IClasspathEntry; -import org.w3c.dom.*; - -import org.eclipse.jem.internal.beaninfo.adapters.*; - -/** - * Searchpath entry. Beaninfo searchpath entry (i.e. package name). Can include - * kind/path/exported if not a child of the BeaninfoEntry. - * - * Note: if not a child of a BeanInfoEntry, then the path refers to a package - * in the classpath, so container is supported here. - * - * @version 1.0 - * @author - */ -public class SearchpathEntry implements IBeaninfosDocEntry { - - final static String sSearchpath = "searchpath"; // Searchpath entry, shared with BeaninfosDoc. //$NON-NLS-1$ - final static String sPackage = "package"; // Package name. //$NON-NLS-1$ - - /** - * Read the entry in from the element. - */ - public static SearchpathEntry readEntry(IReader reader, Object element, IProject project, boolean beaninfoChild) { - String packageName = reader.getAttribute(element, sPackage); - if (beaninfoChild) - return new SearchpathEntry(packageName); // Kind/path aren't valid on beaninfo children. - - String elementKind = reader.getAttribute(element, BeaninfosDoc.sKind); - String pathStr = reader.getAttribute(element, BeaninfosDoc.sPath); - int kind = BeaninfoEntry.kindFromString(elementKind); - IPath path = null; - if (pathStr != null) { - // ensure path is absolute - path = new Path(pathStr); - if (kind != IClasspathEntry.CPE_VARIABLE && kind != IClasspathEntry.CPE_CONTAINER && !path.isAbsolute()) { - path = project != null ? project.getFullPath().append(path) : path.makeAbsolute(); // Some folder/jar within this project - } - } - - // create the appropriate entry - boolean valid = true; - switch (kind) { - - case IClasspathEntry.CPE_LIBRARY : - valid = path != null && path.isAbsolute(); - break; - - case IClasspathEntry.CPE_SOURCE : - if (path == null) - valid = false; - else if (path.isAbsolute()) { - // must be an entry in this project or specify another project - String projSegment = path.segment(0); - if (project == null || projSegment == null || !projSegment.equals(project.getName())) { - // another project - kind = IClasspathEntry.CPE_PROJECT; - } - } - break; - - case IClasspathEntry.CPE_VARIABLE : - case IClasspathEntry.CPE_CONTAINER: - break; - - default : - valid = false; - break; - } - - if (valid) - return new SearchpathEntry(kind, path, packageName); - else - return null; - - } - - protected int kind = -1; // Under Beaninfo entry, these don't have kind/path's. - protected IPath path; // Path can be null if under beaninfo entry - protected String packageName; // Packagename can be null if kind/path refer to a project or registered variable. - protected boolean isExported; - - public SearchpathEntry(int kind, IPath path, String packageName) { - this.kind = kind; - this.path = path; - this.packageName = packageName; - } - - public SearchpathEntry(String packageName) { - this.packageName = packageName; - } - - public int getKind() { - return kind; - } - - public IPath getPath() { - return path; - } - - public String getPackage() { - return packageName; - } - - public Node writeEntry(Document doc, IProject project) { - - Element element = doc.createElement(sSearchpath); - if (kind != -1) { - // A non-beaninfo child - element.setAttribute(BeaninfosDoc.sKind, BeaninfoEntry.kindToString(kind)); - IPath tPath = path; - if (kind != IClasspathEntry.CPE_VARIABLE && kind != IClasspathEntry.CPE_CONTAINER) { - // translate to project relative from absolute (unless a device path) - if (tPath.isAbsolute()) { - if (tPath.segment(0).equals(project.getFullPath().segment(0))) { - tPath = tPath.removeFirstSegments(1); - tPath = tPath.makeRelative(); - } else { - tPath = tPath.makeAbsolute(); - } - } - } - - element.setAttribute(BeaninfosDoc.sPath, tPath.toString()); - } - if (packageName != null) - element.setAttribute(sPackage, packageName); - return element; - } - - public boolean equals(Object other) { - if (this == other) - return true; - - if (!(other instanceof SearchpathEntry)) - return false; - - SearchpathEntry otherEntry = (SearchpathEntry) other; - if (kind != otherEntry.kind) - return false; - - if (path == null) - if (otherEntry.path != null) - return false; - else - ; - else if (!path.equals(otherEntry.path)) - return false; - - if (packageName == null) - if (otherEntry.packageName != null) - return false; - else - ; - else if (!packageName.equals(otherEntry.packageName)) - return false; - - return true; - } - - public int hashCode() { - int hashCode = kind; - if (path != null) - hashCode ^= path.hashCode(); - if (packageName != null) - hashCode ^= packageName.hashCode(); - return hashCode; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Utilities.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Utilities.java deleted file mode 100644 index 1a35a1085..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Utilities.java +++ /dev/null @@ -1,501 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.jem.internal.beaninfo.core; -/* - * $RCSfile: Utilities.java,v $ - * $Revision: 1.10 $ $Date: 2006/05/23 15:43:06 $ - */ -import java.util.Iterator; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.*; -import org.eclipse.emf.ecore.resource.ResourceSet; - -import org.eclipse.jem.internal.beaninfo.*; -import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoNature; -import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoProxyConstants; -import org.eclipse.jem.internal.java.adapters.ReflectionAdaptor; -import org.eclipse.jem.internal.proxy.core.*; -import org.eclipse.jem.java.*; - -/** - * Beaninfo (introspection) utilities methods - */ - -public final class Utilities { - - private Utilities() { - } - - /** - * Utility to return the class as a JavaClass. If it actually is a JavaType this will - * fail with a ClassCastException. - * @param className - * @param rset - * @return java class - * - * @throws ClassCastException if not a java class, but instead a java primitive. - * @since 1.1.0 - */ - public static JavaClass getJavaClass(String className, ResourceSet rset) { - return (JavaClass) getJavaType(className, rset); - } - - /** - * Utility to return the class as a JavaHelpers. - * - * @param className - * @param rset - * @return java helpers. - * - * @since 1.1.0 - */ - public static JavaHelpers getJavaType(String className, ResourceSet rset) { - return (JavaHelpers) rset.getEObject(getJavaClassURI(className), true); - } - - /** - * Create a URI to the given classname. - * <p> - * Note: It must be in normal form, i.e. fully-qualified, if primitive spelled out (e.g. "int" not I), and if - * arrays it must readable form (e.g. "java.lang.String[]" and not "[Ljava.lang.String;"). - * - * @param className - * @return - * - * @since 1.1.0 - */ - public static URI getJavaClassURI(String className) { - return JavaRefFactory.eINSTANCE.createTypeURI(className); - } - - /** - * Utility to return the EClassifier from the given IBeanTypeProxy. - */ - public static EClassifier getJavaClass(IBeanTypeProxy type, ResourceSet rset) { - if (type != null) { - return getJavaType(type.getFormalTypeName(), rset); - } else - return null; - } - - /** - * Utility to return the Method from the given IMethodProxy. - */ - public static Method getMethod(IMethodProxy method, ResourceSet rset) { - return method != null ? (Method) rset.getEObject(URI.createURI(getMethodURL(method)), true) : null; - } - - /** - * Answer the URL String for Method from the given IMethodProxy - */ - public static String getMethodURL(IMethodProxy method) { - String className = method.getClassType().getTypeName(); - IBeanTypeProxy[] parms = method.getParameterTypes(); - String[] parmTypes = parms.length > 0 ? new String[parms.length] : null; - for (int i = 0; i < parms.length; i++) { - parmTypes[i] = parms[i].getFormalTypeName(); - } - return computeMethodURL(className, method.getName(), parmTypes); - } - - protected static String computeMethodURL(String fullyQualifiedClassName, String methodName, String[] parmTypes) { - int classStart = fullyQualifiedClassName.lastIndexOf('.'); - StringBuffer url = new StringBuffer(50); - url.append("java:/"); //$NON-NLS-1$ - if (classStart > -1) - url.append(fullyQualifiedClassName.substring(0, classStart)); - url.append('#'); - url.append(computeMethodID(fullyQualifiedClassName.substring(classStart + 1), methodName, parmTypes)); - return url.toString(); - } - - protected static String computeFieldURL(String fullyQualifiedClassName, String fieldName) { - int classStart = fullyQualifiedClassName.lastIndexOf('.'); - StringBuffer url = new StringBuffer(50); - url.append("java:/"); //$NON-NLS-1$ - if (classStart > -1) - url.append(fullyQualifiedClassName.substring(0, classStart)); - url.append('#'); - url.append(fullyQualifiedClassName.substring(classStart + 1)); - url.append(ReflectionAdaptor.C_CLASS_MEMBER_DELIMITER); - url.append(fieldName); - return url.toString(); - } - - /** - * Return the field uri for the given classname, fieldname. - * @param fullyQualifiedClassName - * @param fieldName - * @return - * - * @since 1.1.0 - */ - public static URI getFieldURI(String fullyQualifiedClassName, String fieldName) { - return URI.createURI(computeFieldURL(fullyQualifiedClassName, fieldName)); - } - /** - * Return the method uri for the given classname, methodname, parm types. - * @param fullyQualifiedClassName - * @param methodName - * @param parmTypes <code>null</code> if there are no parms. - * @return - * - * @since 1.1.0 - */ - public static URI getMethodURI(String fullyQualifiedClassName, String methodName, String[] parmTypes) { - return URI.createURI(computeMethodURL(fullyQualifiedClassName, methodName, parmTypes)); - } - - /** - * Turn it into an URI. - */ - public static URI getMethodURI(IMethodProxy method) { - return URI.createURI(getMethodURL(method)); - } - - /** - * Utility to compute the Java Modeling METHODID from method declaring class name, - * method name, and parameter class names. - */ - public static String computeMethodID(String className, String methodName, String[] parameterTypes) { - StringBuffer out = new StringBuffer(50); - out.append(className); - out.append(ReflectionAdaptor.C_CLASS_MEMBER_DELIMITER); - out.append(methodName); - out.append(ReflectionAdaptor.C_METHOD_PARM_DELIMITER); - if (parameterTypes != null) - for (int i = 0; i < parameterTypes.length; i++) { - out.append(parameterTypes[i]); - if (i < parameterTypes.length - 1) - out.append(ReflectionAdaptor.C_PARM_PARM_DELIMITER); - } - if (className.equals(methodName)) - out.append(ReflectionAdaptor.S_CONSTRUCTOR_TOKEN); //It's a constructor - return out.toString(); - } - - /** - * Utility to retrieve the BeanDecorator. - */ - public static BeanDecorator getBeanDecorator(EModelElement model) { - return (BeanDecorator) getDecorator(model, BeanDecorator.class); - } - /** - * Utility to retrieve a decorator of the specified class. - */ - public static EAnnotation getDecorator(EModelElement model, Class decoratorClass) { - Iterator itr = model.getEAnnotations().iterator(); - while (itr.hasNext()) { - EAnnotation decr = (EAnnotation) itr.next(); - if (decoratorClass.isInstance(decr)) - return decr; - } - return null; - } - - /** - * Utility to retrieve the EventSetDecorator. - */ - public static EventSetDecorator getEventSetDecorator(EModelElement model) { - return (EventSetDecorator) getDecorator(model, EventSetDecorator.class); - } - - /** - * Utility to retrieve the MethodDecorator. - */ - public static MethodDecorator getMethodDecorator(EModelElement model) { - return (MethodDecorator) getDecorator(model, MethodDecorator.class); - } - - /** - * Utility to retrieve the PropertyDecorator. - */ - public static PropertyDecorator getPropertyDecorator(EModelElement model) { - return (PropertyDecorator) getDecorator(model, PropertyDecorator.class); - } - - /** - * Utility to return an iterator on the list which will return the property decorators - * of only the properties in the EList passed in. If the property does not have a - * property decorator, then it is not a beaninfo property. - */ - public static Iterator getPropertiesIterator(final EList properties) { - return new Iterator() { - private Iterator itr = properties.iterator(); - private boolean hasNext = true; - private PropertyDecorator next; - { - findNext(); - } - public boolean hasNext() { - return hasNext; - } - - public Object next() { - PropertyDecorator temp = next; - findNext(); - return temp; - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - private void findNext() { - while (itr.hasNext()) { - EModelElement nextOne = (EModelElement) itr.next(); - next = getPropertyDecorator(nextOne); - if (next != null) { - return; - } - } - hasNext = false; - } - }; - } - - /** - * Utility to return an iterator on the list which will return the EventSet decorators - * of only the BeanEvents in the EList passed in. - */ - public static Iterator getEventSetsIterator(final EList events) { - return new Iterator() { - private Iterator itr = events.iterator(); - private boolean hasNext = true; - private EventSetDecorator next; - { - findNext(); - } - public boolean hasNext() { - return hasNext; - } - - public Object next() { - EventSetDecorator temp = next; - findNext(); - return temp; - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - private void findNext() { - while (itr.hasNext()) { - EModelElement nextOne = (EModelElement) itr.next(); - next = getEventSetDecorator(nextOne); - if (next != null) { - return; - } - } - hasNext = false; - } - }; - } - - /** - * Utility to return an iterator on the list which will return the Method decorators - * of only the Methods in the EList passed in. - */ - public static Iterator getMethodsIterator(final EList methods) { - return new Iterator() { - private Iterator itr = methods.iterator(); - private boolean hasNext = true; - private MethodDecorator next; - { - findNext(); - } - public boolean hasNext() { - return hasNext; - } - - public Object next() { - MethodDecorator temp = next; - findNext(); - return temp; - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - private void findNext() { - while (itr.hasNext()) { - EModelElement nextOne = (EModelElement) itr.next(); - next = getMethodDecorator(nextOne); - if (next != null) { - return; - } - } - hasNext = false; - } - }; - } - - /** - * Get the search path from the remote vm. - * - * Note: This shouldn't be used when working with a BeaninfoNature. Use the - * accessors taking the nature instead. Otherwise there will be inconsistencies since the search path won't be - * saved across invocations of the workspace if it is not updated through the nature). - */ - public static IArrayBeanProxy getBeanInfoSearchPath(ProxyFactoryRegistry registry) { - BeaninfoProxyConstants biconstants = BeaninfoProxyConstants.getConstants(registry); - if (biconstants != null) - return (IArrayBeanProxy) biconstants - .getGetBeanInfoSearchPathProxy() - .invokeCatchThrowableExceptions( - null); - else - return null; - } - - /** - * Set the search path to the array of strings passed in on the remote vm. - * - * Note: This shouldn't be used when working with a BeaninfoNature. Use the - * accessors taking the nature instead. Otherwise there will be inconsistencies since the search path won't be - * saved across invocations of the workspace if it is not updated through the nature). - */ - public static void setBeanInfoSearchPath(ProxyFactoryRegistry registry, String[] paths) { - - try { - BeaninfoProxyConstants biConstants = BeaninfoProxyConstants.getConstants(registry); - if (biConstants != null) { - JavaStandardBeanProxyConstants jConstants = JavaStandardBeanProxyConstants.getConstants(registry); - IStandardBeanProxyFactory proxyFactory = registry.getBeanProxyFactory(); - IArrayBeanProxy newPath = proxyFactory.createBeanProxyWith(jConstants.getStringType(), paths != null ? paths.length : 0); - if (paths != null) - for (int i = 0; i < paths.length; i++) - newPath.set(proxyFactory.createBeanProxyWith(paths[i]), i); - biConstants.getSetBeanInfoSearchPathProxy().invoke(null, newPath); - } - } catch (ThrowableProxy e) { - } - } - - /** - * From the Beaninfo Nature, insert a path to the beaninfo path at the given index, -1 means at the end. - * If index is larger than the current path, it will also add at the end. - */ - public static void insertBeanInfoSearchPath(BeaninfoNature nature, IBeaninfosDocEntry path, int index) throws CoreException { - BeaninfosDoc infoPath = nature.getSearchPath(); - IBeaninfosDocEntry[] oldPath = infoPath.getSearchpath(); - - IBeaninfosDocEntry[] newPath = new IBeaninfosDocEntry[oldPath.length + 1]; - - if (index == -1 || index >= oldPath.length) { - // At the end or past end - System.arraycopy(oldPath, 0, newPath, 0, oldPath.length); - newPath[oldPath.length] = path; - } else { - // In the middle - System.arraycopy(oldPath, 0, newPath, 0, index); - newPath[index] = path; - System.arraycopy(oldPath, index, newPath, index + 1, oldPath.length - index); - } - - infoPath.setSearchpath(newPath); - nature.setSearchPath(infoPath); - } - - /** - * Insert a path to the beaninfo path at the given index, -1 means at the end. - * If index is larger than the current path, it will also add at the end. - * - * Note: This shouldn't be used when working with a BeaninfoNature. Use the - * accessors taking the nature instead. Otherwise there will be inconsistencies since the search path won't be - * saved across invocations of the workspace if it is not updated through the nature). - */ - public static void insertBeanInfoSearchPath(ProxyFactoryRegistry registry, String path, int index) { - try { - BeaninfoProxyConstants biConstants = BeaninfoProxyConstants.getConstants(registry); - if (biConstants != null) { - IArrayBeanProxy infoPath = (IArrayBeanProxy) biConstants.getGetBeanInfoSearchPathProxy().invoke(null); - int pathLength = infoPath.getLength(); - IStandardBeanProxyFactory proxyFactory = registry.getBeanProxyFactory(); - IArrayBeanProxy newPath = proxyFactory.createBeanProxyWith(infoPath.getTypeProxy(), pathLength + 1); - IBeanProxy stringProxy = proxyFactory.createBeanProxyWith(path); - JavaStandardBeanProxyConstants constants = JavaStandardBeanProxyConstants.getConstants(registry); - if (index == -1 || index >= pathLength) { - // At the end or past end - constants.arraycopy(infoPath, 0, newPath, 0, infoPath.getLength()); - newPath.set(stringProxy, pathLength); - } else { - // In the middle - constants.arraycopy(infoPath, 0, newPath, 0, index); - newPath.set(stringProxy, index); - constants.arraycopy(infoPath, index, newPath, index + 1, pathLength - index); - } - biConstants.getSetBeanInfoSearchPathProxy().invoke(null, newPath); - } - } catch (ThrowableProxy e) { - } - } - - /** - * From the Beaninfo Nature, remove the specified path from the beaninfo search path. - * Not an error if not found. - */ - public static void removeBeanInfoPath(BeaninfoNature nature, IBeaninfosDocEntry path) throws CoreException { - BeaninfosDoc infoPath = nature.getSearchPath(); - IBeaninfosDocEntry[] oldPath = infoPath.getSearchpath(); - - for (int i = 0; i < oldPath.length; i++) { - if (path.equals(oldPath[i])) { - // We found it, so remove it. - IBeaninfosDocEntry[] newPath = new IBeaninfosDocEntry[oldPath.length - 1]; - System.arraycopy(oldPath, 0, newPath, 0, i); - if (i < oldPath.length - 1) - System.arraycopy(oldPath, i + 1, newPath, i, oldPath.length - i - 1); - infoPath.setSearchpath(newPath); - nature.setSearchPath(infoPath); - return; - } - } - } - - /** - * Remove the specified path from the beaninfo search path. - * Not an error if not found. - * - * Note: This shouldn't be used when working with a BeaninfoNature. Use the - * accessors taking the nature instead. Otherwise there will be inconsistencies since the search path won't be - * saved across invocations of the workspace if it is not updated through the nature). - */ - public static void removeBeanInfoPath(ProxyFactoryRegistry registry, String path) { - try { - BeaninfoProxyConstants biConstants = BeaninfoProxyConstants.getConstants(registry); - if (biConstants != null) { - IArrayBeanProxy infoPath = (IArrayBeanProxy) biConstants.getGetBeanInfoSearchPathProxy().invoke(null); - int pathLength = infoPath.getLength(); - for (int i = 0; i < pathLength; i++) { - IStringBeanProxy aPath = (IStringBeanProxy) infoPath.get(i); - if (path.equals(aPath.stringValue())) { - // We found it, so remove it. - IArrayBeanProxy newPath = registry.getBeanProxyFactory().createBeanProxyWith(infoPath.getTypeProxy(), pathLength - 1); - JavaStandardBeanProxyConstants constants = JavaStandardBeanProxyConstants.getConstants(registry); - constants.arraycopy(infoPath, 0, newPath, 0, i); - if (i < pathLength - 1) - constants.arraycopy(infoPath, i + 1, newPath, i, pathLength - i - 1); - biConstants.getSetBeanInfoSearchPathProxy().invoke(null, newPath); - return; - } - } - } - } catch (ThrowableProxy e) { - } - }; - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/messages.properties b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/messages.properties deleted file mode 100644 index a6341164c..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/messages.properties +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################### -# Copyright (c) 2004, 2005 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 -############################################################################### -# -BeanInfoCacheController_Job_WriteBeaninfoCache_Title=Write BeanInfo cache files diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanDecoratorImpl.java deleted file mode 100644 index e4ef73ebc..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanDecoratorImpl.java +++ /dev/null @@ -1,1072 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: BeanDecoratorImpl.java,v $ - * $Revision: 1.22 $ $Date: 2005/10/18 15:32:19 $ - */ - - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collection; -import java.util.logging.Level; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.beaninfo.common.IBaseBeanInfoConstants; -import org.eclipse.jem.internal.beaninfo.BeanDecorator; -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; - -import org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue; -import org.eclipse.jem.internal.beaninfo.core.*; -import org.eclipse.jem.java.JavaClass; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Bean Decorator</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#isMergeSuperProperties <em>Merge Super Properties</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#isMergeSuperMethods <em>Merge Super Methods</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#isMergeSuperEvents <em>Merge Super Events</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#isIntrospectProperties <em>Introspect Properties</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#isIntrospectMethods <em>Introspect Methods</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#isIntrospectEvents <em>Introspect Events</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#isDoBeaninfo <em>Do Beaninfo</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#getNotInheritedPropertyNames <em>Not Inherited Property Names</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#getNotInheritedMethodNames <em>Not Inherited Method Names</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#getNotInheritedEventNames <em>Not Inherited Event Names</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.BeanDecoratorImpl#getCustomizerClass <em>Customizer Class</em>}</li> - * </ul> - * </p> - * - * @generated - */ - - -public class BeanDecoratorImpl extends FeatureDecoratorImpl implements BeanDecorator{ - - /** - * Bits for implicitly set features. This is internal, not meant for clients. - */ - public static final long BEAN_CUSTOMIZER_IMPLICIT = 0x1L; - public static final long BEAN_MERGE_INHERITED_PROPERTIES_IMPLICIT = 0x2L; - public static final long BEAN_MERGE_INHERITED_OPERATIONS_IMPLICIT = 0x4L; - public static final long BEAN_MERGE_INHERITED_EVENTS_IMPLICIT = 0x8L; - - /** - * The default value of the '{@link #isMergeSuperProperties() <em>Merge Super Properties</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeSuperProperties() - * @generated - * @ordered - */ - protected static final boolean MERGE_SUPER_PROPERTIES_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isMergeSuperProperties() <em>Merge Super Properties</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeSuperProperties() - * @generated - * @ordered - */ - protected static final int MERGE_SUPER_PROPERTIES_EFLAG = 1 << 18; - - /** - * The flag representing whether the Merge Super Properties attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int MERGE_SUPER_PROPERTIES_ESETFLAG = 1 << 19; - - /** - * The default value of the '{@link #isMergeSuperMethods() <em>Merge Super Methods</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeSuperMethods() - * @generated - * @ordered - */ - protected static final boolean MERGE_SUPER_METHODS_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isMergeSuperMethods() <em>Merge Super Methods</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeSuperMethods() - * @generated - * @ordered - */ - protected static final int MERGE_SUPER_METHODS_EFLAG = 1 << 20; - - /** - * The flag representing whether the Merge Super Methods attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int MERGE_SUPER_METHODS_ESETFLAG = 1 << 21; - - /** - * The default value of the '{@link #isMergeSuperEvents() <em>Merge Super Events</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeSuperEvents() - * @generated - * @ordered - */ - protected static final boolean MERGE_SUPER_EVENTS_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isMergeSuperEvents() <em>Merge Super Events</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeSuperEvents() - * @generated - * @ordered - */ - protected static final int MERGE_SUPER_EVENTS_EFLAG = 1 << 22; - - /** - * The flag representing whether the Merge Super Events attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int MERGE_SUPER_EVENTS_ESETFLAG = 1 << 23; - - /** - * The default value of the '{@link #isIntrospectProperties() <em>Introspect Properties</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntrospectProperties() - * @generated - * @ordered - */ - protected static final boolean INTROSPECT_PROPERTIES_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isIntrospectProperties() <em>Introspect Properties</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntrospectProperties() - * @generated - * @ordered - */ - protected static final int INTROSPECT_PROPERTIES_EFLAG = 1 << 24; - - /** - * The default value of the '{@link #isIntrospectMethods() <em>Introspect Methods</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntrospectMethods() - * @generated - * @ordered - */ - protected static final boolean INTROSPECT_METHODS_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isIntrospectMethods() <em>Introspect Methods</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntrospectMethods() - * @generated - * @ordered - */ - protected static final int INTROSPECT_METHODS_EFLAG = 1 << 25; - - /** - * The default value of the '{@link #isIntrospectEvents() <em>Introspect Events</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntrospectEvents() - * @generated - * @ordered - */ - protected static final boolean INTROSPECT_EVENTS_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isIntrospectEvents() <em>Introspect Events</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntrospectEvents() - * @generated - * @ordered - */ - protected static final int INTROSPECT_EVENTS_EFLAG = 1 << 26; - - /** - * The default value of the '{@link #isDoBeaninfo() <em>Do Beaninfo</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isDoBeaninfo() - * @generated - * @ordered - */ - protected static final boolean DO_BEANINFO_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isDoBeaninfo() <em>Do Beaninfo</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isDoBeaninfo() - * @generated - * @ordered - */ - protected static final int DO_BEANINFO_EFLAG = 1 << 27; - - /** - * The cached value of the '{@link #getNotInheritedPropertyNames() <em>Not Inherited Property Names</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getNotInheritedPropertyNames() - * @generated - * @ordered - */ - protected EList notInheritedPropertyNames = null; - - /** - * The cached value of the '{@link #getNotInheritedMethodNames() <em>Not Inherited Method Names</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getNotInheritedMethodNames() - * @generated - * @ordered - */ - protected EList notInheritedMethodNames = null; - - /** - * The cached value of the '{@link #getNotInheritedEventNames() <em>Not Inherited Event Names</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getNotInheritedEventNames() - * @generated - * @ordered - */ - protected EList notInheritedEventNames = null; - - /** - * The cached value of the '{@link #getCustomizerClass() <em>Customizer Class</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCustomizerClass() - * @generated - * @ordered - */ - protected JavaClass customizerClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected BeanDecoratorImpl() { - super(); - eFlags |= MERGE_SUPER_PROPERTIES_EFLAG; - eFlags |= MERGE_SUPER_METHODS_EFLAG; - eFlags |= MERGE_SUPER_EVENTS_EFLAG; - eFlags |= INTROSPECT_PROPERTIES_EFLAG; - eFlags |= INTROSPECT_METHODS_EFLAG; - eFlags |= INTROSPECT_EVENTS_EFLAG; - eFlags |= DO_BEANINFO_EFLAG; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getBeanDecorator(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isMergeSuperProperties() { - return (eFlags & MERGE_SUPER_PROPERTIES_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMergeSuperProperties(boolean newMergeSuperProperties) { - boolean oldMergeSuperProperties = (eFlags & MERGE_SUPER_PROPERTIES_EFLAG) != 0; - if (newMergeSuperProperties) eFlags |= MERGE_SUPER_PROPERTIES_EFLAG; else eFlags &= ~MERGE_SUPER_PROPERTIES_EFLAG; - boolean oldMergeSuperPropertiesESet = (eFlags & MERGE_SUPER_PROPERTIES_ESETFLAG) != 0; - eFlags |= MERGE_SUPER_PROPERTIES_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_PROPERTIES, oldMergeSuperProperties, newMergeSuperProperties, !oldMergeSuperPropertiesESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetMergeSuperProperties() { - boolean oldMergeSuperProperties = (eFlags & MERGE_SUPER_PROPERTIES_EFLAG) != 0; - boolean oldMergeSuperPropertiesESet = (eFlags & MERGE_SUPER_PROPERTIES_ESETFLAG) != 0; - if (MERGE_SUPER_PROPERTIES_EDEFAULT) eFlags |= MERGE_SUPER_PROPERTIES_EFLAG; else eFlags &= ~MERGE_SUPER_PROPERTIES_EFLAG; - eFlags &= ~MERGE_SUPER_PROPERTIES_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_PROPERTIES, oldMergeSuperProperties, MERGE_SUPER_PROPERTIES_EDEFAULT, oldMergeSuperPropertiesESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetMergeSuperProperties() { - return (eFlags & MERGE_SUPER_PROPERTIES_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isMergeSuperMethods() { - return (eFlags & MERGE_SUPER_METHODS_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMergeSuperMethods(boolean newMergeSuperMethods) { - boolean oldMergeSuperMethods = (eFlags & MERGE_SUPER_METHODS_EFLAG) != 0; - if (newMergeSuperMethods) eFlags |= MERGE_SUPER_METHODS_EFLAG; else eFlags &= ~MERGE_SUPER_METHODS_EFLAG; - boolean oldMergeSuperMethodsESet = (eFlags & MERGE_SUPER_METHODS_ESETFLAG) != 0; - eFlags |= MERGE_SUPER_METHODS_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_METHODS, oldMergeSuperMethods, newMergeSuperMethods, !oldMergeSuperMethodsESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetMergeSuperMethods() { - boolean oldMergeSuperMethods = (eFlags & MERGE_SUPER_METHODS_EFLAG) != 0; - boolean oldMergeSuperMethodsESet = (eFlags & MERGE_SUPER_METHODS_ESETFLAG) != 0; - if (MERGE_SUPER_METHODS_EDEFAULT) eFlags |= MERGE_SUPER_METHODS_EFLAG; else eFlags &= ~MERGE_SUPER_METHODS_EFLAG; - eFlags &= ~MERGE_SUPER_METHODS_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_METHODS, oldMergeSuperMethods, MERGE_SUPER_METHODS_EDEFAULT, oldMergeSuperMethodsESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetMergeSuperMethods() { - return (eFlags & MERGE_SUPER_METHODS_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isMergeSuperEvents() { - return (eFlags & MERGE_SUPER_EVENTS_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMergeSuperEvents(boolean newMergeSuperEvents) { - boolean oldMergeSuperEvents = (eFlags & MERGE_SUPER_EVENTS_EFLAG) != 0; - if (newMergeSuperEvents) eFlags |= MERGE_SUPER_EVENTS_EFLAG; else eFlags &= ~MERGE_SUPER_EVENTS_EFLAG; - boolean oldMergeSuperEventsESet = (eFlags & MERGE_SUPER_EVENTS_ESETFLAG) != 0; - eFlags |= MERGE_SUPER_EVENTS_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_EVENTS, oldMergeSuperEvents, newMergeSuperEvents, !oldMergeSuperEventsESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetMergeSuperEvents() { - boolean oldMergeSuperEvents = (eFlags & MERGE_SUPER_EVENTS_EFLAG) != 0; - boolean oldMergeSuperEventsESet = (eFlags & MERGE_SUPER_EVENTS_ESETFLAG) != 0; - if (MERGE_SUPER_EVENTS_EDEFAULT) eFlags |= MERGE_SUPER_EVENTS_EFLAG; else eFlags &= ~MERGE_SUPER_EVENTS_EFLAG; - eFlags &= ~MERGE_SUPER_EVENTS_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_EVENTS, oldMergeSuperEvents, MERGE_SUPER_EVENTS_EDEFAULT, oldMergeSuperEventsESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetMergeSuperEvents() { - return (eFlags & MERGE_SUPER_EVENTS_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isIntrospectProperties() { - return (eFlags & INTROSPECT_PROPERTIES_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setIntrospectProperties(boolean newIntrospectProperties) { - boolean oldIntrospectProperties = (eFlags & INTROSPECT_PROPERTIES_EFLAG) != 0; - if (newIntrospectProperties) eFlags |= INTROSPECT_PROPERTIES_EFLAG; else eFlags &= ~INTROSPECT_PROPERTIES_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_PROPERTIES, oldIntrospectProperties, newIntrospectProperties)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isIntrospectMethods() { - return (eFlags & INTROSPECT_METHODS_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setIntrospectMethods(boolean newIntrospectMethods) { - boolean oldIntrospectMethods = (eFlags & INTROSPECT_METHODS_EFLAG) != 0; - if (newIntrospectMethods) eFlags |= INTROSPECT_METHODS_EFLAG; else eFlags &= ~INTROSPECT_METHODS_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_METHODS, oldIntrospectMethods, newIntrospectMethods)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isIntrospectEvents() { - return (eFlags & INTROSPECT_EVENTS_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setIntrospectEvents(boolean newIntrospectEvents) { - boolean oldIntrospectEvents = (eFlags & INTROSPECT_EVENTS_EFLAG) != 0; - if (newIntrospectEvents) eFlags |= INTROSPECT_EVENTS_EFLAG; else eFlags &= ~INTROSPECT_EVENTS_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_EVENTS, oldIntrospectEvents, newIntrospectEvents)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setCustomizerClass(JavaClass newCustomizerClass) { - JavaClass oldCustomizerClass = customizerClass; - customizerClass = newCustomizerClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__CUSTOMIZER_CLASS, oldCustomizerClass, customizerClass)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.BEAN_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.BEAN_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.BEAN_DECORATOR__DETAILS: - return ((InternalEList)getDetails()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT: - return eBasicSetContainer(null, BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT, msgs); - case BeaninfoPackage.BEAN_DECORATOR__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT: - return eContainer.eInverseRemove(this, EcorePackage.EMODEL_ELEMENT__EANNOTATIONS, EModelElement.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_DECORATOR__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.BEAN_DECORATOR__SOURCE: - return getSource(); - case BeaninfoPackage.BEAN_DECORATOR__DETAILS: - return getDetails(); - case BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT: - return getEModelElement(); - case BeaninfoPackage.BEAN_DECORATOR__CONTENTS: - return getContents(); - case BeaninfoPackage.BEAN_DECORATOR__REFERENCES: - return getReferences(); - case BeaninfoPackage.BEAN_DECORATOR__DISPLAY_NAME: - return getDisplayName(); - case BeaninfoPackage.BEAN_DECORATOR__SHORT_DESCRIPTION: - return getShortDescription(); - case BeaninfoPackage.BEAN_DECORATOR__CATEGORY: - return getCategory(); - case BeaninfoPackage.BEAN_DECORATOR__EXPERT: - return isExpert() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__HIDDEN: - return isHidden() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__PREFERRED: - return isPreferred() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_INTROSPECTION: - return isMergeIntrospection() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return isAttributesExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__IMPLICITLY_SET_BITS: - return new Long(getImplicitlySetBits()); - case BeaninfoPackage.BEAN_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return getImplicitDecoratorFlag(); - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES: - return getAttributes(); - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_PROPERTIES: - return isMergeSuperProperties() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_METHODS: - return isMergeSuperMethods() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_EVENTS: - return isMergeSuperEvents() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_PROPERTIES: - return isIntrospectProperties() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_METHODS: - return isIntrospectMethods() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_EVENTS: - return isIntrospectEvents() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__DO_BEANINFO: - return isDoBeaninfo() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_PROPERTY_NAMES: - return getNotInheritedPropertyNames(); - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_METHOD_NAMES: - return getNotInheritedMethodNames(); - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_EVENT_NAMES: - return getNotInheritedEventNames(); - case BeaninfoPackage.BEAN_DECORATOR__CUSTOMIZER_CLASS: - if (resolve) return getCustomizerClass(); - return basicGetCustomizerClass(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__SOURCE: - setSource((String)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__DETAILS: - getDetails().clear(); - getDetails().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__REFERENCES: - getReferences().clear(); - getReferences().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__SHORT_DESCRIPTION: - setShortDescription((String)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__CATEGORY: - setCategory((String)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__EXPERT: - setExpert(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__HIDDEN: - setHidden(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__PREFERRED: - setPreferred(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(((Long)newValue).longValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag((ImplicitItem)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_PROPERTIES: - setMergeSuperProperties(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_METHODS: - setMergeSuperMethods(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_EVENTS: - setMergeSuperEvents(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_PROPERTIES: - setIntrospectProperties(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_METHODS: - setIntrospectMethods(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_EVENTS: - setIntrospectEvents(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__DO_BEANINFO: - setDoBeaninfo(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_PROPERTY_NAMES: - getNotInheritedPropertyNames().clear(); - getNotInheritedPropertyNames().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_METHOD_NAMES: - getNotInheritedMethodNames().clear(); - getNotInheritedMethodNames().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_EVENT_NAMES: - getNotInheritedEventNames().clear(); - getNotInheritedEventNames().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_DECORATOR__CUSTOMIZER_CLASS: - setCustomizerClass((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__DETAILS: - getDetails().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)null); - return; - case BeaninfoPackage.BEAN_DECORATOR__CONTENTS: - getContents().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__REFERENCES: - getReferences().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__DISPLAY_NAME: - unsetDisplayName(); - return; - case BeaninfoPackage.BEAN_DECORATOR__SHORT_DESCRIPTION: - unsetShortDescription(); - return; - case BeaninfoPackage.BEAN_DECORATOR__CATEGORY: - setCategory(CATEGORY_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__EXPERT: - unsetExpert(); - return; - case BeaninfoPackage.BEAN_DECORATOR__HIDDEN: - unsetHidden(); - return; - case BeaninfoPackage.BEAN_DECORATOR__PREFERRED: - unsetPreferred(); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(MERGE_INTROSPECTION_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(IMPLICITLY_SET_BITS_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag(IMPLICIT_DECORATOR_FLAG_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_PROPERTIES: - unsetMergeSuperProperties(); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_METHODS: - unsetMergeSuperMethods(); - return; - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_EVENTS: - unsetMergeSuperEvents(); - return; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_PROPERTIES: - setIntrospectProperties(INTROSPECT_PROPERTIES_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_METHODS: - setIntrospectMethods(INTROSPECT_METHODS_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_EVENTS: - setIntrospectEvents(INTROSPECT_EVENTS_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__DO_BEANINFO: - setDoBeaninfo(DO_BEANINFO_EDEFAULT); - return; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_PROPERTY_NAMES: - getNotInheritedPropertyNames().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_METHOD_NAMES: - getNotInheritedMethodNames().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_EVENT_NAMES: - getNotInheritedEventNames().clear(); - return; - case BeaninfoPackage.BEAN_DECORATOR__CUSTOMIZER_CLASS: - setCustomizerClass((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /* (non-Javadoc) - * @see org.eclipse.emf.ecore.EObject#eIsSet(org.eclipse.emf.ecore.EStructuralFeature) - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_DECORATOR__SOURCE: - return isSourceSet(); // Override so that if set to the same as classname, then it is considered not set. - default: - return eIsSetGen(eFeature); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSetGen(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_DECORATOR__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case BeaninfoPackage.BEAN_DECORATOR__DETAILS: - return details != null && !details.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__EMODEL_ELEMENT: - return getEModelElement() != null; - case BeaninfoPackage.BEAN_DECORATOR__CONTENTS: - return contents != null && !contents.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__REFERENCES: - return references != null && !references.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__DISPLAY_NAME: - return isSetDisplayName(); - case BeaninfoPackage.BEAN_DECORATOR__SHORT_DESCRIPTION: - return isSetShortDescription(); - case BeaninfoPackage.BEAN_DECORATOR__CATEGORY: - return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); - case BeaninfoPackage.BEAN_DECORATOR__EXPERT: - return isSetExpert(); - case BeaninfoPackage.BEAN_DECORATOR__HIDDEN: - return isSetHidden(); - case BeaninfoPackage.BEAN_DECORATOR__PREFERRED: - return isSetPreferred(); - case BeaninfoPackage.BEAN_DECORATOR__MERGE_INTROSPECTION: - return ((eFlags & MERGE_INTROSPECTION_EFLAG) != 0) != MERGE_INTROSPECTION_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return ((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0) != ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__IMPLICITLY_SET_BITS: - return implicitlySetBits != IMPLICITLY_SET_BITS_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return implicitDecoratorFlag != IMPLICIT_DECORATOR_FLAG_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_PROPERTIES: - return isSetMergeSuperProperties(); - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_METHODS: - return isSetMergeSuperMethods(); - case BeaninfoPackage.BEAN_DECORATOR__MERGE_SUPER_EVENTS: - return isSetMergeSuperEvents(); - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_PROPERTIES: - return ((eFlags & INTROSPECT_PROPERTIES_EFLAG) != 0) != INTROSPECT_PROPERTIES_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_METHODS: - return ((eFlags & INTROSPECT_METHODS_EFLAG) != 0) != INTROSPECT_METHODS_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__INTROSPECT_EVENTS: - return ((eFlags & INTROSPECT_EVENTS_EFLAG) != 0) != INTROSPECT_EVENTS_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__DO_BEANINFO: - return ((eFlags & DO_BEANINFO_EFLAG) != 0) != DO_BEANINFO_EDEFAULT; - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_PROPERTY_NAMES: - return notInheritedPropertyNames != null && !notInheritedPropertyNames.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_METHOD_NAMES: - return notInheritedMethodNames != null && !notInheritedMethodNames.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_EVENT_NAMES: - return notInheritedEventNames != null && !notInheritedEventNames.isEmpty(); - case BeaninfoPackage.BEAN_DECORATOR__CUSTOMIZER_CLASS: - return customizerClass != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mergeSuperProperties: "); - if ((eFlags & MERGE_SUPER_PROPERTIES_ESETFLAG) != 0) result.append((eFlags & MERGE_SUPER_PROPERTIES_EFLAG) != 0); else result.append("<unset>"); - result.append(", mergeSuperMethods: "); - if ((eFlags & MERGE_SUPER_METHODS_ESETFLAG) != 0) result.append((eFlags & MERGE_SUPER_METHODS_EFLAG) != 0); else result.append("<unset>"); - result.append(", mergeSuperEvents: "); - if ((eFlags & MERGE_SUPER_EVENTS_ESETFLAG) != 0) result.append((eFlags & MERGE_SUPER_EVENTS_EFLAG) != 0); else result.append("<unset>"); - result.append(", introspectProperties: "); - result.append((eFlags & INTROSPECT_PROPERTIES_EFLAG) != 0); - result.append(", introspectMethods: "); - result.append((eFlags & INTROSPECT_METHODS_EFLAG) != 0); - result.append(", introspectEvents: "); - result.append((eFlags & INTROSPECT_EVENTS_EFLAG) != 0); - result.append(", doBeaninfo: "); - result.append((eFlags & DO_BEANINFO_EFLAG) != 0); - result.append(", notInheritedPropertyNames: "); - result.append(notInheritedPropertyNames); - result.append(", notInheritedMethodNames: "); - result.append(notInheritedMethodNames); - result.append(", notInheritedEventNames: "); - result.append(notInheritedEventNames); - result.append(')'); - return result.toString(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass basicGetCustomizerClass() { - return customizerClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isDoBeaninfo() { - return (eFlags & DO_BEANINFO_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setDoBeaninfo(boolean newDoBeaninfo) { - boolean oldDoBeaninfo = (eFlags & DO_BEANINFO_EFLAG) != 0; - if (newDoBeaninfo) eFlags |= DO_BEANINFO_EFLAG; else eFlags &= ~DO_BEANINFO_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.BEAN_DECORATOR__DO_BEANINFO, oldDoBeaninfo, newDoBeaninfo)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getNotInheritedPropertyNames() { - if (notInheritedPropertyNames == null) { - notInheritedPropertyNames = new EDataTypeUniqueEList(String.class, this, BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_PROPERTY_NAMES); - } - return notInheritedPropertyNames; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getNotInheritedMethodNames() { - if (notInheritedMethodNames == null) { - notInheritedMethodNames = new EDataTypeUniqueEList(String.class, this, BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_METHOD_NAMES); - } - return notInheritedMethodNames; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getNotInheritedEventNames() { - if (notInheritedEventNames == null) { - notInheritedEventNames = new EDataTypeUniqueEList(String.class, this, BeaninfoPackage.BEAN_DECORATOR__NOT_INHERITED_EVENT_NAMES); - } - return notInheritedEventNames; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass getCustomizerClass() { - if (customizerClass != null && customizerClass.eIsProxy()) { - JavaClass oldCustomizerClass = customizerClass; - customizerClass = (JavaClass)eResolveProxy((InternalEObject)customizerClass); - if (customizerClass != oldCustomizerClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.BEAN_DECORATOR__CUSTOMIZER_CLASS, oldCustomizerClass, customizerClass)); - } - } - return customizerClass; - } - - private URL iconURL; - private boolean hasQueriedIconURL; - - public URL getIconURL(){ - if (!hasQueriedIconURL){ - FeatureAttributeValue value = (FeatureAttributeValue) getAttributes().get(IBaseBeanInfoConstants.ICONCOLOR16X16URL); - if (value != null) { - // Get the value - Object attr = value.getValue(); - if (attr instanceof String) { - try { - hasQueriedIconURL = true; - iconURL = new URL((String) attr); - } catch ( MalformedURLException exc ) { - BeaninfoPlugin.getPlugin().getLogger().log(exc, Level.INFO); - } - } - } - } - return iconURL; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanEventImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanEventImpl.java deleted file mode 100644 index 7e74c4dd6..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanEventImpl.java +++ /dev/null @@ -1,314 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: BeanEventImpl.java,v $ - * $Revision: 1.8 $ $Date: 2005/09/14 23:30:38 $ - */ - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeanEvent; -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.java.internal.impl.JavaEventImpl; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Bean Event</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ - -public class BeanEventImpl extends JavaEventImpl implements BeanEvent{ - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected BeanEventImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getBeanEvent(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.BEAN_EVENT__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.BEAN_EVENT__ECONTAINING_CLASS: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.BEAN_EVENT__ECONTAINING_CLASS, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.BEAN_EVENT__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.BEAN_EVENT__ECONTAINING_CLASS: - return eBasicSetContainer(null, BeaninfoPackage.BEAN_EVENT__ECONTAINING_CLASS, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.BEAN_EVENT__ECONTAINING_CLASS: - return eContainer.eInverseRemove(this, EcorePackage.ECLASS__ESTRUCTURAL_FEATURES, EClass.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_EVENT__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.BEAN_EVENT__NAME: - return getName(); - case BeaninfoPackage.BEAN_EVENT__ORDERED: - return isOrdered() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__UNIQUE: - return isUnique() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__LOWER_BOUND: - return new Integer(getLowerBound()); - case BeaninfoPackage.BEAN_EVENT__UPPER_BOUND: - return new Integer(getUpperBound()); - case BeaninfoPackage.BEAN_EVENT__MANY: - return isMany() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__REQUIRED: - return isRequired() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__ETYPE: - if (resolve) return getEType(); - return basicGetEType(); - case BeaninfoPackage.BEAN_EVENT__CHANGEABLE: - return isChangeable() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__VOLATILE: - return isVolatile() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__TRANSIENT: - return isTransient() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__DEFAULT_VALUE_LITERAL: - return getDefaultValueLiteral(); - case BeaninfoPackage.BEAN_EVENT__DEFAULT_VALUE: - return getDefaultValue(); - case BeaninfoPackage.BEAN_EVENT__UNSETTABLE: - return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__DERIVED: - return isDerived() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.BEAN_EVENT__ECONTAINING_CLASS: - return getEContainingClass(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_EVENT__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.BEAN_EVENT__NAME: - setName((String)newValue); - return; - case BeaninfoPackage.BEAN_EVENT__ORDERED: - setOrdered(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_EVENT__UNIQUE: - setUnique(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_EVENT__LOWER_BOUND: - setLowerBound(((Integer)newValue).intValue()); - return; - case BeaninfoPackage.BEAN_EVENT__UPPER_BOUND: - setUpperBound(((Integer)newValue).intValue()); - return; - case BeaninfoPackage.BEAN_EVENT__ETYPE: - setEType((EClassifier)newValue); - return; - case BeaninfoPackage.BEAN_EVENT__CHANGEABLE: - setChangeable(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_EVENT__VOLATILE: - setVolatile(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_EVENT__TRANSIENT: - setTransient(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_EVENT__DEFAULT_VALUE_LITERAL: - setDefaultValueLiteral((String)newValue); - return; - case BeaninfoPackage.BEAN_EVENT__UNSETTABLE: - setUnsettable(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.BEAN_EVENT__DERIVED: - setDerived(((Boolean)newValue).booleanValue()); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_EVENT__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.BEAN_EVENT__NAME: - setName(NAME_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__ORDERED: - setOrdered(ORDERED_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__UNIQUE: - setUnique(UNIQUE_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__LOWER_BOUND: - setLowerBound(LOWER_BOUND_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__UPPER_BOUND: - setUpperBound(UPPER_BOUND_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__ETYPE: - setEType((EClassifier)null); - return; - case BeaninfoPackage.BEAN_EVENT__CHANGEABLE: - setChangeable(CHANGEABLE_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__VOLATILE: - setVolatile(VOLATILE_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__TRANSIENT: - setTransient(TRANSIENT_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__DEFAULT_VALUE_LITERAL: - setDefaultValueLiteral(DEFAULT_VALUE_LITERAL_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__UNSETTABLE: - setUnsettable(UNSETTABLE_EDEFAULT); - return; - case BeaninfoPackage.BEAN_EVENT__DERIVED: - setDerived(DERIVED_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.BEAN_EVENT__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.BEAN_EVENT__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case BeaninfoPackage.BEAN_EVENT__ORDERED: - return ((eFlags & ORDERED_EFLAG) != 0) != ORDERED_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__UNIQUE: - return ((eFlags & UNIQUE_EFLAG) != 0) != UNIQUE_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__LOWER_BOUND: - return lowerBound != LOWER_BOUND_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__UPPER_BOUND: - return upperBound != UPPER_BOUND_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__MANY: - return isMany() != MANY_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__REQUIRED: - return isRequired() != REQUIRED_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__ETYPE: - return eType != null; - case BeaninfoPackage.BEAN_EVENT__CHANGEABLE: - return ((eFlags & CHANGEABLE_EFLAG) != 0) != CHANGEABLE_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__VOLATILE: - return ((eFlags & VOLATILE_EFLAG) != 0) != VOLATILE_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__TRANSIENT: - return ((eFlags & TRANSIENT_EFLAG) != 0) != TRANSIENT_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__DEFAULT_VALUE_LITERAL: - return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral); - case BeaninfoPackage.BEAN_EVENT__DEFAULT_VALUE: - return DEFAULT_VALUE_EDEFAULT == null ? getDefaultValue() != null : !DEFAULT_VALUE_EDEFAULT.equals(getDefaultValue()); - case BeaninfoPackage.BEAN_EVENT__UNSETTABLE: - return ((eFlags & UNSETTABLE_EFLAG) != 0) != UNSETTABLE_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__DERIVED: - return ((eFlags & DERIVED_EFLAG) != 0) != DERIVED_EDEFAULT; - case BeaninfoPackage.BEAN_EVENT__ECONTAINING_CLASS: - return getEContainingClass() != null; - } - return eDynamicIsSet(eFeature); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeaninfoFactoryImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeaninfoFactoryImpl.java deleted file mode 100644 index 91274c240..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeaninfoFactoryImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: BeaninfoFactoryImpl.java,v $ - * $Revision: 1.10 $ $Date: 2005/10/11 21:26:28 $ - */ - -import java.util.Map; - -import org.eclipse.jem.internal.beaninfo.*; -import org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Factory</b>. - * <!-- end-user-doc --> - * @generated - */ - - -public class BeaninfoFactoryImpl extends EFactoryImpl implements BeaninfoFactory{ - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BeaninfoFactoryImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case BeaninfoPackage.FEATURE_DECORATOR: return createFeatureDecorator(); - case BeaninfoPackage.BEAN_DECORATOR: return createBeanDecorator(); - case BeaninfoPackage.EVENT_SET_DECORATOR: return createEventSetDecorator(); - case BeaninfoPackage.METHOD_DECORATOR: return createMethodDecorator(); - case BeaninfoPackage.PARAMETER_DECORATOR: return createParameterDecorator(); - case BeaninfoPackage.PROPERTY_DECORATOR: return createPropertyDecorator(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR: return createIndexedPropertyDecorator(); - case BeaninfoPackage.METHOD_PROXY: return createMethodProxy(); - case BeaninfoPackage.BEAN_EVENT: return createBeanEvent(); - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY: return (EObject)createFeatureAttributeMapEntry(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case BeaninfoPackage.IMPLICIT_ITEM: { - ImplicitItem result = ImplicitItem.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); - return result; - } - case BeaninfoPackage.FEATURE_ATTRIBUTE_VALUE: - return createFeatureAttributeValueFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case BeaninfoPackage.IMPLICIT_ITEM: - return instanceValue == null ? null : instanceValue.toString(); - case BeaninfoPackage.FEATURE_ATTRIBUTE_VALUE: - return convertFeatureAttributeValueToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public FeatureDecorator createFeatureDecorator() { - FeatureDecoratorImpl featureDecorator = new FeatureDecoratorImpl(); - featureDecorator.setSource(FeatureDecorator.class.getName()); - return featureDecorator; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public EventSetDecorator createEventSetDecorator() { - EventSetDecoratorImpl eventSetDecorator = new EventSetDecoratorImpl(); - eventSetDecorator.setSource(EventSetDecorator.class.getName()); - return eventSetDecorator; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public MethodProxy createMethodProxy() { - MethodProxyImpl methodProxy = new MethodProxyImpl(); - return methodProxy; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public PropertyDecorator createPropertyDecorator() { - PropertyDecoratorImpl propertyDecorator = new PropertyDecoratorImpl(); - propertyDecorator.setSource(PropertyDecorator.class.getName()); - return propertyDecorator; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public IndexedPropertyDecorator createIndexedPropertyDecorator() { - IndexedPropertyDecoratorImpl indexedPropertyDecorator = new IndexedPropertyDecoratorImpl(); - indexedPropertyDecorator.setSource(IndexedPropertyDecorator.class.getName()); - return indexedPropertyDecorator; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public BeanDecorator createBeanDecorator() { - BeanDecoratorImpl beanDecorator = new BeanDecoratorImpl(); - beanDecorator.setSource(BeanDecorator.class.getName()); - return beanDecorator; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public MethodDecorator createMethodDecorator() { - MethodDecoratorImpl methodDecorator = new MethodDecoratorImpl(); - methodDecorator.setSource(MethodDecorator.class.getName()); - return methodDecorator; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public ParameterDecorator createParameterDecorator() { - ParameterDecoratorImpl parameterDecorator = new ParameterDecoratorImpl(); - parameterDecorator.setSource(ParameterDecorator.class.getName()); - return parameterDecorator; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BeaninfoPackage getBeaninfoPackage() { - return (BeaninfoPackage)getEPackage(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @deprecated - * @generated - */ - public static BeaninfoPackage getPackage() { - return BeaninfoPackage.eINSTANCE; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BeanEvent createBeanEvent() { - BeanEventImpl beanEvent = new BeanEventImpl(); - return beanEvent; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Map.Entry createFeatureAttributeMapEntry() { - FeatureAttributeMapEntryImpl featureAttributeMapEntry = new FeatureAttributeMapEntryImpl(); - return featureAttributeMapEntry; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public FeatureAttributeValue createFeatureAttributeValueFromString(EDataType eDataType, String initialValue) { - return new FeatureAttributeValue(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - */ - public String convertFeatureAttributeValueToString(EDataType eDataType, Object instanceValue) { - return instanceValue.toString(); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeaninfoPackageImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeaninfoPackageImpl.java deleted file mode 100644 index c1ebf36b6..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeaninfoPackageImpl.java +++ /dev/null @@ -1,1012 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: BeaninfoPackageImpl.java,v $ - * $Revision: 1.10 $ $Date: 2005/09/15 20:09:51 $ - */ - -import java.util.Map; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; - -import org.eclipse.jem.internal.beaninfo.BeanDecorator; -import org.eclipse.jem.internal.beaninfo.BeanEvent; -import org.eclipse.jem.internal.beaninfo.BeaninfoFactory; -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.EventSetDecorator; -import org.eclipse.jem.internal.beaninfo.FeatureDecorator; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; -import org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator; -import org.eclipse.jem.internal.beaninfo.MethodDecorator; -import org.eclipse.jem.internal.beaninfo.MethodProxy; -import org.eclipse.jem.internal.beaninfo.ParameterDecorator; -import org.eclipse.jem.internal.beaninfo.PropertyDecorator; -import org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.internal.impl.JavaRefPackageImpl; -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Package</b>. - * <!-- end-user-doc --> - * @generated - */ - -public class BeaninfoPackageImpl extends EPackageImpl implements BeaninfoPackage{ - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass featureDecoratorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass beanDecoratorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass eventSetDecoratorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass methodDecoratorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass parameterDecoratorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass propertyDecoratorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass indexedPropertyDecoratorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass methodProxyEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass beanEventEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass featureAttributeMapEntryEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EEnum implicitItemEEnum = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EDataType featureAttributeValueEDataType = null; - - /** - * Creates an instance of the model <b>Package</b>, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - * <p>Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.jem.internal.beaninfo.BeaninfoPackage#eNS_URI - * @see #init() - * @generated - */ - private BeaninfoPackageImpl() { - super(eNS_URI, BeaninfoFactory.eINSTANCE); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the <b>Package</b> for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - * <p>Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - * <p>Invocation of this method will not affect any packages that have - * already been initialized. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static BeaninfoPackage init() { - if (isInited) return (BeaninfoPackage)EPackage.Registry.INSTANCE.getEPackage(BeaninfoPackage.eNS_URI); - - // Obtain or create and register package - BeaninfoPackageImpl theBeaninfoPackage = (BeaninfoPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof BeaninfoPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new BeaninfoPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Create package meta-data objects - theBeaninfoPackage.createPackageContents(); - - // Initialize created meta-data - theBeaninfoPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theBeaninfoPackage.freeze(); - - return theBeaninfoPackage; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getFeatureDecorator() { - return featureDecoratorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_DisplayName() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_ShortDescription() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_Category() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_Expert() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_Hidden() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_Preferred() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(5); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_MergeIntrospection() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(6); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_AttributesExplicitEmpty() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(7); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_ImplicitlySetBits() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(8); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureDecorator_ImplicitDecoratorFlag() { - return (EAttribute)featureDecoratorEClass.getEStructuralFeatures().get(9); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getFeatureDecorator_Attributes() { - return (EReference)featureDecoratorEClass.getEStructuralFeatures().get(10); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getEventSetDecorator() { - return eventSetDecoratorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getEventSetDecorator_InDefaultEventSet() { - return (EAttribute)eventSetDecoratorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getEventSetDecorator_Unicast() { - return (EAttribute)eventSetDecoratorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getEventSetDecorator_ListenerMethodsExplicitEmpty() { - return (EAttribute)eventSetDecoratorEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getEventSetDecorator_AddListenerMethod() { - return (EReference)eventSetDecoratorEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getEventSetDecorator_ListenerMethods() { - return (EReference)eventSetDecoratorEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getEventSetDecorator_ListenerType() { - return (EReference)eventSetDecoratorEClass.getEStructuralFeatures().get(5); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getEventSetDecorator_RemoveListenerMethod() { - return (EReference)eventSetDecoratorEClass.getEStructuralFeatures().get(6); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getEventSetDecorator_EventAdapterClass() { - return (EReference)eventSetDecoratorEClass.getEStructuralFeatures().get(7); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getEventSetDecorator_SerListMthd() { - return (EReference)eventSetDecoratorEClass.getEStructuralFeatures().get(8); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getMethodProxy() { - return methodProxyEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getMethodProxy_Method() { - return (EReference)methodProxyEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getPropertyDecorator() { - return propertyDecoratorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPropertyDecorator_Bound() { - return (EAttribute)propertyDecoratorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPropertyDecorator_Constrained() { - return (EAttribute)propertyDecoratorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPropertyDecorator_DesignTime() { - return (EAttribute)propertyDecoratorEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPropertyDecorator_AlwaysIncompatible() { - return (EAttribute)propertyDecoratorEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPropertyDecorator_FilterFlags() { - return (EAttribute)propertyDecoratorEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPropertyDecorator_FieldReadOnly() { - return (EAttribute)propertyDecoratorEClass.getEStructuralFeatures().get(5); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getPropertyDecorator_PropertyEditorClass() { - return (EReference)propertyDecoratorEClass.getEStructuralFeatures().get(6); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getPropertyDecorator_ReadMethod() { - return (EReference)propertyDecoratorEClass.getEStructuralFeatures().get(7); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getPropertyDecorator_WriteMethod() { - return (EReference)propertyDecoratorEClass.getEStructuralFeatures().get(8); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getPropertyDecorator_Field() { - return (EReference)propertyDecoratorEClass.getEStructuralFeatures().get(9); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIndexedPropertyDecorator() { - return indexedPropertyDecoratorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIndexedPropertyDecorator_IndexedReadMethod() { - return (EReference)indexedPropertyDecoratorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIndexedPropertyDecorator_IndexedWriteMethod() { - return (EReference)indexedPropertyDecoratorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getBeanDecorator() { - return beanDecoratorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_MergeSuperProperties() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_MergeSuperMethods() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_MergeSuperEvents() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_IntrospectProperties() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_IntrospectMethods() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_IntrospectEvents() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(5); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getBeanDecorator_CustomizerClass() { - return (EReference)beanDecoratorEClass.getEStructuralFeatures().get(10); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getMethodDecorator() { - return methodDecoratorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getMethodDecorator_ParmsExplicitEmpty() { - return (EAttribute)methodDecoratorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getMethodDecorator_ParameterDescriptors() { - return (EReference)methodDecoratorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getMethodDecorator_SerParmDesc() { - return (EReference)methodDecoratorEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getParameterDecorator() { - return parameterDecoratorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getParameterDecorator_Name() { - return (EAttribute)parameterDecoratorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EDataType getFeatureAttributeValue() { - return featureAttributeValueEDataType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BeaninfoFactory getBeaninfoFactory() { - return (BeaninfoFactory)getEFactoryInstance(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - featureDecoratorEClass = createEClass(FEATURE_DECORATOR); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__DISPLAY_NAME); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__SHORT_DESCRIPTION); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__CATEGORY); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__EXPERT); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__HIDDEN); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__PREFERRED); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__MERGE_INTROSPECTION); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__IMPLICITLY_SET_BITS); - createEAttribute(featureDecoratorEClass, FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG); - createEReference(featureDecoratorEClass, FEATURE_DECORATOR__ATTRIBUTES); - - beanDecoratorEClass = createEClass(BEAN_DECORATOR); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__MERGE_SUPER_PROPERTIES); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__MERGE_SUPER_METHODS); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__MERGE_SUPER_EVENTS); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__INTROSPECT_PROPERTIES); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__INTROSPECT_METHODS); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__INTROSPECT_EVENTS); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__DO_BEANINFO); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__NOT_INHERITED_PROPERTY_NAMES); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__NOT_INHERITED_METHOD_NAMES); - createEAttribute(beanDecoratorEClass, BEAN_DECORATOR__NOT_INHERITED_EVENT_NAMES); - createEReference(beanDecoratorEClass, BEAN_DECORATOR__CUSTOMIZER_CLASS); - - eventSetDecoratorEClass = createEClass(EVENT_SET_DECORATOR); - createEAttribute(eventSetDecoratorEClass, EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET); - createEAttribute(eventSetDecoratorEClass, EVENT_SET_DECORATOR__UNICAST); - createEAttribute(eventSetDecoratorEClass, EVENT_SET_DECORATOR__LISTENER_METHODS_EXPLICIT_EMPTY); - createEReference(eventSetDecoratorEClass, EVENT_SET_DECORATOR__ADD_LISTENER_METHOD); - createEReference(eventSetDecoratorEClass, EVENT_SET_DECORATOR__LISTENER_METHODS); - createEReference(eventSetDecoratorEClass, EVENT_SET_DECORATOR__LISTENER_TYPE); - createEReference(eventSetDecoratorEClass, EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD); - createEReference(eventSetDecoratorEClass, EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS); - createEReference(eventSetDecoratorEClass, EVENT_SET_DECORATOR__SER_LIST_MTHD); - - methodDecoratorEClass = createEClass(METHOD_DECORATOR); - createEAttribute(methodDecoratorEClass, METHOD_DECORATOR__PARMS_EXPLICIT_EMPTY); - createEReference(methodDecoratorEClass, METHOD_DECORATOR__PARAMETER_DESCRIPTORS); - createEReference(methodDecoratorEClass, METHOD_DECORATOR__SER_PARM_DESC); - - parameterDecoratorEClass = createEClass(PARAMETER_DECORATOR); - createEAttribute(parameterDecoratorEClass, PARAMETER_DECORATOR__NAME); - createEReference(parameterDecoratorEClass, PARAMETER_DECORATOR__PARAMETER); - - propertyDecoratorEClass = createEClass(PROPERTY_DECORATOR); - createEAttribute(propertyDecoratorEClass, PROPERTY_DECORATOR__BOUND); - createEAttribute(propertyDecoratorEClass, PROPERTY_DECORATOR__CONSTRAINED); - createEAttribute(propertyDecoratorEClass, PROPERTY_DECORATOR__DESIGN_TIME); - createEAttribute(propertyDecoratorEClass, PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE); - createEAttribute(propertyDecoratorEClass, PROPERTY_DECORATOR__FILTER_FLAGS); - createEAttribute(propertyDecoratorEClass, PROPERTY_DECORATOR__FIELD_READ_ONLY); - createEReference(propertyDecoratorEClass, PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS); - createEReference(propertyDecoratorEClass, PROPERTY_DECORATOR__READ_METHOD); - createEReference(propertyDecoratorEClass, PROPERTY_DECORATOR__WRITE_METHOD); - createEReference(propertyDecoratorEClass, PROPERTY_DECORATOR__FIELD); - - indexedPropertyDecoratorEClass = createEClass(INDEXED_PROPERTY_DECORATOR); - createEReference(indexedPropertyDecoratorEClass, INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD); - createEReference(indexedPropertyDecoratorEClass, INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD); - - methodProxyEClass = createEClass(METHOD_PROXY); - createEReference(methodProxyEClass, METHOD_PROXY__METHOD); - - beanEventEClass = createEClass(BEAN_EVENT); - - featureAttributeMapEntryEClass = createEClass(FEATURE_ATTRIBUTE_MAP_ENTRY); - createEAttribute(featureAttributeMapEntryEClass, FEATURE_ATTRIBUTE_MAP_ENTRY__KEY); - createEAttribute(featureAttributeMapEntryEClass, FEATURE_ATTRIBUTE_MAP_ENTRY__VALUE); - - // Create enums - implicitItemEEnum = createEEnum(IMPLICIT_ITEM); - - // Create data types - featureAttributeValueEDataType = createEDataType(FEATURE_ATTRIBUTE_VALUE); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - EcorePackageImpl theEcorePackage = (EcorePackageImpl)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); - - // Add supertypes to classes - featureDecoratorEClass.getESuperTypes().add(theEcorePackage.getEAnnotation()); - beanDecoratorEClass.getESuperTypes().add(this.getFeatureDecorator()); - eventSetDecoratorEClass.getESuperTypes().add(this.getFeatureDecorator()); - methodDecoratorEClass.getESuperTypes().add(this.getFeatureDecorator()); - parameterDecoratorEClass.getESuperTypes().add(this.getFeatureDecorator()); - propertyDecoratorEClass.getESuperTypes().add(this.getFeatureDecorator()); - indexedPropertyDecoratorEClass.getESuperTypes().add(this.getPropertyDecorator()); - methodProxyEClass.getESuperTypes().add(theEcorePackage.getEOperation()); - beanEventEClass.getESuperTypes().add(theJavaRefPackage.getJavaEvent()); - - // Initialize classes and features; add operations and parameters - initEClass(featureDecoratorEClass, FeatureDecorator.class, "FeatureDecorator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getFeatureDecorator_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_ShortDescription(), ecorePackage.getEString(), "shortDescription", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_Category(), ecorePackage.getEString(), "category", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_Expert(), ecorePackage.getEBoolean(), "expert", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_Hidden(), ecorePackage.getEBoolean(), "hidden", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_Preferred(), ecorePackage.getEBoolean(), "preferred", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_MergeIntrospection(), ecorePackage.getEBoolean(), "mergeIntrospection", "true", 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_AttributesExplicitEmpty(), ecorePackage.getEBoolean(), "attributesExplicitEmpty", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_ImplicitlySetBits(), ecorePackage.getELong(), "implicitlySetBits", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureDecorator_ImplicitDecoratorFlag(), this.getImplicitItem(), "implicitDecoratorFlag", null, 0, 1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getFeatureDecorator_Attributes(), this.getFeatureAttributeMapEntry(), null, "attributes", null, 0, -1, FeatureDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - addEOperation(featureDecoratorEClass, ecorePackage.getEString(), "getName"); - - initEClass(beanDecoratorEClass, BeanDecorator.class, "BeanDecorator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getBeanDecorator_MergeSuperProperties(), ecorePackage.getEBoolean(), "mergeSuperProperties", "true", 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_MergeSuperMethods(), ecorePackage.getEBoolean(), "mergeSuperMethods", "true", 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_MergeSuperEvents(), ecorePackage.getEBoolean(), "mergeSuperEvents", "true", 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_IntrospectProperties(), ecorePackage.getEBoolean(), "introspectProperties", "true", 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_IntrospectMethods(), ecorePackage.getEBoolean(), "introspectMethods", "true", 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_IntrospectEvents(), ecorePackage.getEBoolean(), "introspectEvents", "true", 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_DoBeaninfo(), ecorePackage.getEBoolean(), "doBeaninfo", "true", 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_NotInheritedPropertyNames(), ecorePackage.getEString(), "notInheritedPropertyNames", null, 0, -1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_NotInheritedMethodNames(), ecorePackage.getEString(), "notInheritedMethodNames", null, 0, -1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBeanDecorator_NotInheritedEventNames(), ecorePackage.getEString(), "notInheritedEventNames", null, 0, -1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getBeanDecorator_CustomizerClass(), theJavaRefPackage.getJavaClass(), null, "customizerClass", null, 0, 1, BeanDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(eventSetDecoratorEClass, EventSetDecorator.class, "EventSetDecorator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getEventSetDecorator_InDefaultEventSet(), ecorePackage.getEBoolean(), "inDefaultEventSet", null, 0, 1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEventSetDecorator_Unicast(), ecorePackage.getEBoolean(), "unicast", null, 0, 1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEventSetDecorator_ListenerMethodsExplicitEmpty(), ecorePackage.getEBoolean(), "listenerMethodsExplicitEmpty", null, 0, 1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getEventSetDecorator_AddListenerMethod(), theJavaRefPackage.getMethod(), null, "addListenerMethod", null, 1, 1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getEventSetDecorator_ListenerMethods(), this.getMethodProxy(), null, "listenerMethods", null, 1, -1, EventSetDecorator.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getEventSetDecorator_ListenerType(), theJavaRefPackage.getJavaClass(), null, "listenerType", null, 1, 1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getEventSetDecorator_RemoveListenerMethod(), theJavaRefPackage.getMethod(), null, "removeListenerMethod", null, 1, 1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getEventSetDecorator_EventAdapterClass(), theJavaRefPackage.getJavaClass(), null, "eventAdapterClass", null, 0, 1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getEventSetDecorator_SerListMthd(), this.getMethodProxy(), null, "serListMthd", null, 1, -1, EventSetDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(methodDecoratorEClass, MethodDecorator.class, "MethodDecorator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getMethodDecorator_ParmsExplicitEmpty(), ecorePackage.getEBoolean(), "parmsExplicitEmpty", null, 0, 1, MethodDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getMethodDecorator_ParameterDescriptors(), this.getParameterDecorator(), null, "parameterDescriptors", null, 0, -1, MethodDecorator.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getMethodDecorator_SerParmDesc(), this.getParameterDecorator(), null, "serParmDesc", null, 0, -1, MethodDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(parameterDecoratorEClass, ParameterDecorator.class, "ParameterDecorator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getParameterDecorator_Name(), ecorePackage.getEString(), "name", null, 0, 1, ParameterDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getParameterDecorator_Parameter(), theJavaRefPackage.getJavaParameter(), null, "parameter", null, 0, 1, ParameterDecorator.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(propertyDecoratorEClass, PropertyDecorator.class, "PropertyDecorator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPropertyDecorator_Bound(), ecorePackage.getEBoolean(), "bound", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPropertyDecorator_Constrained(), ecorePackage.getEBoolean(), "constrained", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPropertyDecorator_DesignTime(), ecorePackage.getEBoolean(), "designTime", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPropertyDecorator_AlwaysIncompatible(), ecorePackage.getEBoolean(), "alwaysIncompatible", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPropertyDecorator_FilterFlags(), ecorePackage.getEString(), "filterFlags", null, 0, -1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPropertyDecorator_FieldReadOnly(), ecorePackage.getEBoolean(), "fieldReadOnly", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPropertyDecorator_PropertyEditorClass(), theJavaRefPackage.getJavaClass(), null, "propertyEditorClass", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPropertyDecorator_ReadMethod(), theJavaRefPackage.getMethod(), null, "readMethod", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPropertyDecorator_WriteMethod(), theJavaRefPackage.getMethod(), null, "writeMethod", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPropertyDecorator_Field(), theJavaRefPackage.getField(), null, "field", null, 0, 1, PropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - addEOperation(propertyDecoratorEClass, theEcorePackage.getEClassifier(), "getPropertyType"); - - EOperation op = addEOperation(propertyDecoratorEClass, null, "setPropertyType"); - addEParameter(op, theEcorePackage.getEClassifier(), "propertyType"); - - initEClass(indexedPropertyDecoratorEClass, IndexedPropertyDecorator.class, "IndexedPropertyDecorator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getIndexedPropertyDecorator_IndexedReadMethod(), theJavaRefPackage.getMethod(), null, "indexedReadMethod", null, 0, 1, IndexedPropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getIndexedPropertyDecorator_IndexedWriteMethod(), theJavaRefPackage.getMethod(), null, "indexedWriteMethod", null, 0, 1, IndexedPropertyDecorator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(methodProxyEClass, MethodProxy.class, "MethodProxy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getMethodProxy_Method(), theJavaRefPackage.getMethod(), null, "method", null, 1, 1, MethodProxy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(beanEventEClass, BeanEvent.class, "BeanEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(featureAttributeMapEntryEClass, Map.Entry.class, "FeatureAttributeMapEntry", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getFeatureAttributeMapEntry_Key(), ecorePackage.getEString(), "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFeatureAttributeMapEntry_Value(), this.getFeatureAttributeValue(), "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(implicitItemEEnum, ImplicitItem.class, "ImplicitItem"); - addEEnumLiteral(implicitItemEEnum, ImplicitItem.NOT_IMPLICIT_LITERAL); - addEEnumLiteral(implicitItemEEnum, ImplicitItem.IMPLICIT_DECORATOR_LITERAL); - addEEnumLiteral(implicitItemEEnum, ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL); - - // Initialize data types - initEDataType(featureAttributeValueEDataType, FeatureAttributeValue.class, "FeatureAttributeValue", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - - // Create resource - createResource(eNS_URI); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_DoBeaninfo() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(6); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_NotInheritedPropertyNames() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(7); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_NotInheritedMethodNames() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(8); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getBeanDecorator_NotInheritedEventNames() { - return (EAttribute)beanDecoratorEClass.getEStructuralFeatures().get(9); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getParameterDecorator_Parameter() { - return (EReference)parameterDecoratorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getBeanEvent() { - return beanEventEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getFeatureAttributeMapEntry() { - return featureAttributeMapEntryEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureAttributeMapEntry_Key() { - return (EAttribute)featureAttributeMapEntryEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getFeatureAttributeMapEntry_Value() { - return (EAttribute)featureAttributeMapEntryEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EEnum getImplicitItem() { - return implicitItemEEnum; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/EventSetDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/EventSetDecoratorImpl.java deleted file mode 100644 index 83f342630..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/EventSetDecoratorImpl.java +++ /dev/null @@ -1,991 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: EventSetDecoratorImpl.java,v $ - * $Revision: 1.15 $ $Date: 2005/09/19 15:43:02 $ - */ - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.EventSetDecorator; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; -import org.eclipse.jem.internal.beaninfo.MethodProxy; - -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.Method; - -import org.eclipse.jem.internal.beaninfo.*; -import org.eclipse.jem.java.*; -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Event Set Decorator</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#isInDefaultEventSet <em>In Default Event Set</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#isUnicast <em>Unicast</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#isListenerMethodsExplicitEmpty <em>Listener Methods Explicit Empty</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#getAddListenerMethod <em>Add Listener Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#getListenerMethods <em>Listener Methods</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#getListenerType <em>Listener Type</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#getRemoveListenerMethod <em>Remove Listener Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#getEventAdapterClass <em>Event Adapter Class</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.EventSetDecoratorImpl#getSerListMthd <em>Ser List Mthd</em>}</li> - * </ul> - * </p> - * - * @generated - */ - - -public class EventSetDecoratorImpl extends FeatureDecoratorImpl implements EventSetDecorator{ - - /** - * Bits for implicitly set features. This is internal, not meant for clients. - */ - public static final long EVENT_ADDLISTENERMETHOD_IMPLICIT = 0x1L; - public static final long EVENT_ADAPTERCLASS_IMPLICIT = 0x2L; - public static final long EVENT_LISTENERMETHODS_IMPLICIT = 0x4L; - public static final long EVENT_LISTENERTYPE_IMPLICIT = 0x8L; - public static final long EVENT_REMOVELISTENERMETHOD_IMPLICIT = 0x10L; - public static final long EVENT_DEFAULTEVENTSET_IMPLICIT = 0x20L; - public static final long EVENT_UNICAST_IMPLICIT = 0x40L; - public static final long EVENT_LISTENERMETHODS_DEFAULT = 0x80L; - - - /** - * The default value of the '{@link #isInDefaultEventSet() <em>In Default Event Set</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isInDefaultEventSet() - * @generated - * @ordered - */ - protected static final boolean IN_DEFAULT_EVENT_SET_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isInDefaultEventSet() <em>In Default Event Set</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isInDefaultEventSet() - * @generated - * @ordered - */ - protected static final int IN_DEFAULT_EVENT_SET_EFLAG = 1 << 18; - - /** - * The flag representing whether the In Default Event Set attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int IN_DEFAULT_EVENT_SET_ESETFLAG = 1 << 19; - - /** - * The default value of the '{@link #isUnicast() <em>Unicast</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isUnicast() - * @generated - * @ordered - */ - protected static final boolean UNICAST_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isUnicast() <em>Unicast</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isUnicast() - * @generated - * @ordered - */ - protected static final int UNICAST_EFLAG = 1 << 20; - - /** - * The flag representing whether the Unicast attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int UNICAST_ESETFLAG = 1 << 21; - - /** - * The default value of the '{@link #isListenerMethodsExplicitEmpty() <em>Listener Methods Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isListenerMethodsExplicitEmpty() - * @generated - * @ordered - */ - protected static final boolean LISTENER_METHODS_EXPLICIT_EMPTY_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isListenerMethodsExplicitEmpty() <em>Listener Methods Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isListenerMethodsExplicitEmpty() - * @generated - * @ordered - */ - protected static final int LISTENER_METHODS_EXPLICIT_EMPTY_EFLAG = 1 << 22; - - /** - * The cached value of the '{@link #getAddListenerMethod() <em>Add Listener Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAddListenerMethod() - * @generated - * @ordered - */ - protected Method addListenerMethod = null; - - /** - * The cached value of the '{@link #getListenerType() <em>Listener Type</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getListenerType() - * @generated - * @ordered - */ - protected JavaClass listenerType = null; - /** - * The cached value of the '{@link #getRemoveListenerMethod() <em>Remove Listener Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getRemoveListenerMethod() - * @generated - * @ordered - */ - protected Method removeListenerMethod = null; - - /** - * The cached value of the '{@link #getEventAdapterClass() <em>Event Adapter Class</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getEventAdapterClass() - * @generated - * @ordered - */ - protected JavaClass eventAdapterClass = null; - - /** - * The cached value of the '{@link #getSerListMthd() <em>Ser List Mthd</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSerListMthd() - * @generated - * @ordered - */ - protected EList serListMthd = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EventSetDecoratorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getEventSetDecorator(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isInDefaultEventSet() { - return (eFlags & IN_DEFAULT_EVENT_SET_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setInDefaultEventSet(boolean newInDefaultEventSet) { - boolean oldInDefaultEventSet = (eFlags & IN_DEFAULT_EVENT_SET_EFLAG) != 0; - if (newInDefaultEventSet) eFlags |= IN_DEFAULT_EVENT_SET_EFLAG; else eFlags &= ~IN_DEFAULT_EVENT_SET_EFLAG; - boolean oldInDefaultEventSetESet = (eFlags & IN_DEFAULT_EVENT_SET_ESETFLAG) != 0; - eFlags |= IN_DEFAULT_EVENT_SET_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET, oldInDefaultEventSet, newInDefaultEventSet, !oldInDefaultEventSetESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetInDefaultEventSet() { - boolean oldInDefaultEventSet = (eFlags & IN_DEFAULT_EVENT_SET_EFLAG) != 0; - boolean oldInDefaultEventSetESet = (eFlags & IN_DEFAULT_EVENT_SET_ESETFLAG) != 0; - if (IN_DEFAULT_EVENT_SET_EDEFAULT) eFlags |= IN_DEFAULT_EVENT_SET_EFLAG; else eFlags &= ~IN_DEFAULT_EVENT_SET_EFLAG; - eFlags &= ~IN_DEFAULT_EVENT_SET_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET, oldInDefaultEventSet, IN_DEFAULT_EVENT_SET_EDEFAULT, oldInDefaultEventSetESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetInDefaultEventSet() { - return (eFlags & IN_DEFAULT_EVENT_SET_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isUnicast() { - return (eFlags & UNICAST_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setUnicast(boolean newUnicast) { - boolean oldUnicast = (eFlags & UNICAST_EFLAG) != 0; - if (newUnicast) eFlags |= UNICAST_EFLAG; else eFlags &= ~UNICAST_EFLAG; - boolean oldUnicastESet = (eFlags & UNICAST_ESETFLAG) != 0; - eFlags |= UNICAST_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.EVENT_SET_DECORATOR__UNICAST, oldUnicast, newUnicast, !oldUnicastESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetUnicast() { - boolean oldUnicast = (eFlags & UNICAST_EFLAG) != 0; - boolean oldUnicastESet = (eFlags & UNICAST_ESETFLAG) != 0; - if (UNICAST_EDEFAULT) eFlags |= UNICAST_EFLAG; else eFlags &= ~UNICAST_EFLAG; - eFlags &= ~UNICAST_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.EVENT_SET_DECORATOR__UNICAST, oldUnicast, UNICAST_EDEFAULT, oldUnicastESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetUnicast() { - return (eFlags & UNICAST_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isListenerMethodsExplicitEmpty() { - return (eFlags & LISTENER_METHODS_EXPLICIT_EMPTY_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setListenerMethodsExplicitEmpty(boolean newListenerMethodsExplicitEmpty) { - boolean oldListenerMethodsExplicitEmpty = (eFlags & LISTENER_METHODS_EXPLICIT_EMPTY_EFLAG) != 0; - if (newListenerMethodsExplicitEmpty) eFlags |= LISTENER_METHODS_EXPLICIT_EMPTY_EFLAG; else eFlags &= ~LISTENER_METHODS_EXPLICIT_EMPTY_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS_EXPLICIT_EMPTY, oldListenerMethodsExplicitEmpty, newListenerMethodsExplicitEmpty)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method getAddListenerMethod() { - if (addListenerMethod != null && addListenerMethod.eIsProxy()) { - Method oldAddListenerMethod = addListenerMethod; - addListenerMethod = (Method)eResolveProxy((InternalEObject)addListenerMethod); - if (addListenerMethod != oldAddListenerMethod) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.EVENT_SET_DECORATOR__ADD_LISTENER_METHOD, oldAddListenerMethod, addListenerMethod)); - } - } - return addListenerMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method basicGetAddListenerMethod() { - return addListenerMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setAddListenerMethod(Method newAddListenerMethod) { - Method oldAddListenerMethod = addListenerMethod; - addListenerMethod = newAddListenerMethod; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.EVENT_SET_DECORATOR__ADD_LISTENER_METHOD, oldAddListenerMethod, addListenerMethod)); - } - - public EList getListenerMethods() { - if (!isListenerMethodsExplicitEmpty() && getSerListMthd().isEmpty() && (getImplicitlySetBits()&(EVENT_LISTENERMETHODS_IMPLICIT | EVENT_LISTENERMETHODS_DEFAULT)) == 0) { - // Not explicitly empty, it is empty, and we have not implicitly or by defaults made it empty, then create the defaults. - createDefaultListenerMethodsList(); - } - return getSerListMthd(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getListenerMethodsGen() { - // TODO: implement this method to return the 'Listener Methods' reference list - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass getListenerType() { - if (listenerType != null && listenerType.eIsProxy()) { - JavaClass oldListenerType = listenerType; - listenerType = (JavaClass)eResolveProxy((InternalEObject)listenerType); - if (listenerType != oldListenerType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_TYPE, oldListenerType, listenerType)); - } - } - return listenerType; - } - - /** - * This is called if method listeners list not explicitly set and there is no feature proxy or - * there is a feature proxy and the proxy has nothing defined. - * <p> - * This is an internal method used by BeanInfo classes. It is not to be used by clients. - */ - public EList createDefaultListenerMethodsList() { - if (!eIsSet(EcorePackage.eINSTANCE.getEAnnotation_EModelElement())) - return this.getSerListMthd(); // We are not attached, can't determine the list yet. - EList mthdsList = this.getSerListMthd(); - - JavaClass eventObjectClass = (JavaClass) JavaRefFactory.eINSTANCE.reflectType("java.util.EventObject", getEModelElement().eResource().getResourceSet()); //$NON-NLS-1$ - - mthdsList.clear(); - - // This is a little tricky. Need to get the methods for the listener type, and - // then go through the methods and filter out the non-event ones. - JavaClass lt = getListenerType(); - if (lt == null) - return mthdsList; // Couldn't get the listener type for some reason, so leave as is. - setImplicitlySetBits(getImplicitlySetBits()|EVENT_LISTENERMETHODS_DEFAULT); // Mark as we implicitly filled it in. - - BeaninfoFactory bfact = BeaninfoFactory.eINSTANCE; - List ms = lt.getPublicMethodsExtended(); - int msize = ms.size(); - for (int i=0; i<msize; i++) { - Method method = (Method) ms.get(i); - List parms = method.getParameters(); - if (parms.size() != 1) - continue; // Must have only one parm. - if (!eventObjectClass.isAssignableFrom(((JavaParameter) parms.get(0)).getEType())) - continue; // Parm does not inherit from java.util.EventObject - - // We need a method proxy, and a method decorator. - MethodProxy mproxy = bfact.createMethodProxy(); - mproxy.setMethod(method); - mproxy.setName(method.getName()); - MethodDecorator md = bfact.createMethodDecorator(); - md.setImplicitDecoratorFlag(ImplicitItem.IMPLICIT_DECORATOR_AND_FEATURE_LITERAL); - md.setEModelElement(mproxy); - mthdsList.add(mproxy); - } - return mthdsList; - } - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass basicGetListenerType() { - return listenerType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setListenerType(JavaClass newListenerType) { - JavaClass oldListenerType = listenerType; - listenerType = newListenerType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_TYPE, oldListenerType, listenerType)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method getRemoveListenerMethod() { - if (removeListenerMethod != null && removeListenerMethod.eIsProxy()) { - Method oldRemoveListenerMethod = removeListenerMethod; - removeListenerMethod = (Method)eResolveProxy((InternalEObject)removeListenerMethod); - if (removeListenerMethod != oldRemoveListenerMethod) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD, oldRemoveListenerMethod, removeListenerMethod)); - } - } - return removeListenerMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method basicGetRemoveListenerMethod() { - return removeListenerMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setRemoveListenerMethod(Method newRemoveListenerMethod) { - Method oldRemoveListenerMethod = removeListenerMethod; - removeListenerMethod = newRemoveListenerMethod; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD, oldRemoveListenerMethod, removeListenerMethod)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass getEventAdapterClass() { - if (eventAdapterClass != null && eventAdapterClass.eIsProxy()) { - JavaClass oldEventAdapterClass = eventAdapterClass; - eventAdapterClass = (JavaClass)eResolveProxy((InternalEObject)eventAdapterClass); - if (eventAdapterClass != oldEventAdapterClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS, oldEventAdapterClass, eventAdapterClass)); - } - } - return eventAdapterClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass basicGetEventAdapterClass() { - return eventAdapterClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setEventAdapterClass(JavaClass newEventAdapterClass) { - JavaClass oldEventAdapterClass = eventAdapterClass; - eventAdapterClass = newEventAdapterClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS, oldEventAdapterClass, eventAdapterClass)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getSerListMthd() { - if (serListMthd == null) { - serListMthd = new EObjectContainmentEList(MethodProxy.class, this, BeaninfoPackage.EVENT_SET_DECORATOR__SER_LIST_MTHD); - } - return serListMthd; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.EVENT_SET_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.EVENT_SET_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.EVENT_SET_DECORATOR__DETAILS: - return ((InternalEList)getDetails()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT: - return eBasicSetContainer(null, BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT, msgs); - case BeaninfoPackage.EVENT_SET_DECORATOR__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.EVENT_SET_DECORATOR__SER_LIST_MTHD: - return ((InternalEList)getSerListMthd()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT: - return eContainer.eInverseRemove(this, EcorePackage.EMODEL_ELEMENT__EANNOTATIONS, EModelElement.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.EVENT_SET_DECORATOR__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.EVENT_SET_DECORATOR__SOURCE: - return getSource(); - case BeaninfoPackage.EVENT_SET_DECORATOR__DETAILS: - return getDetails(); - case BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT: - return getEModelElement(); - case BeaninfoPackage.EVENT_SET_DECORATOR__CONTENTS: - return getContents(); - case BeaninfoPackage.EVENT_SET_DECORATOR__REFERENCES: - return getReferences(); - case BeaninfoPackage.EVENT_SET_DECORATOR__DISPLAY_NAME: - return getDisplayName(); - case BeaninfoPackage.EVENT_SET_DECORATOR__SHORT_DESCRIPTION: - return getShortDescription(); - case BeaninfoPackage.EVENT_SET_DECORATOR__CATEGORY: - return getCategory(); - case BeaninfoPackage.EVENT_SET_DECORATOR__EXPERT: - return isExpert() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__HIDDEN: - return isHidden() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__PREFERRED: - return isPreferred() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__MERGE_INTROSPECTION: - return isMergeIntrospection() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return isAttributesExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICITLY_SET_BITS: - return new Long(getImplicitlySetBits()); - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return getImplicitDecoratorFlag(); - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES: - return getAttributes(); - case BeaninfoPackage.EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET: - return isInDefaultEventSet() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__UNICAST: - return isUnicast() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS_EXPLICIT_EMPTY: - return isListenerMethodsExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.EVENT_SET_DECORATOR__ADD_LISTENER_METHOD: - if (resolve) return getAddListenerMethod(); - return basicGetAddListenerMethod(); - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS: - return getListenerMethods(); - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_TYPE: - if (resolve) return getListenerType(); - return basicGetListenerType(); - case BeaninfoPackage.EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD: - if (resolve) return getRemoveListenerMethod(); - return basicGetRemoveListenerMethod(); - case BeaninfoPackage.EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS: - if (resolve) return getEventAdapterClass(); - return basicGetEventAdapterClass(); - case BeaninfoPackage.EVENT_SET_DECORATOR__SER_LIST_MTHD: - return getSerListMthd(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.EVENT_SET_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__SOURCE: - setSource((String)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__DETAILS: - getDetails().clear(); - getDetails().addAll((Collection)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__REFERENCES: - getReferences().clear(); - getReferences().addAll((Collection)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__SHORT_DESCRIPTION: - setShortDescription((String)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__CATEGORY: - setCategory((String)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__EXPERT: - setExpert(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__HIDDEN: - setHidden(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__PREFERRED: - setPreferred(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(((Long)newValue).longValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag((ImplicitItem)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET: - setInDefaultEventSet(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__UNICAST: - setUnicast(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS_EXPLICIT_EMPTY: - setListenerMethodsExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__ADD_LISTENER_METHOD: - setAddListenerMethod((Method)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS: - getListenerMethods().clear(); - getListenerMethods().addAll((Collection)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_TYPE: - setListenerType((JavaClass)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD: - setRemoveListenerMethod((Method)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS: - setEventAdapterClass((JavaClass)newValue); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__SER_LIST_MTHD: - getSerListMthd().clear(); - getSerListMthd().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.EVENT_SET_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__DETAILS: - getDetails().clear(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)null); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__CONTENTS: - getContents().clear(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__REFERENCES: - getReferences().clear(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__DISPLAY_NAME: - unsetDisplayName(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__SHORT_DESCRIPTION: - unsetShortDescription(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__CATEGORY: - setCategory(CATEGORY_EDEFAULT); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__EXPERT: - unsetExpert(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__HIDDEN: - unsetHidden(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__PREFERRED: - unsetPreferred(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(MERGE_INTROSPECTION_EDEFAULT); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(IMPLICITLY_SET_BITS_EDEFAULT); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag(IMPLICIT_DECORATOR_FLAG_EDEFAULT); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET: - unsetInDefaultEventSet(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__UNICAST: - unsetUnicast(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS_EXPLICIT_EMPTY: - setListenerMethodsExplicitEmpty(LISTENER_METHODS_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__ADD_LISTENER_METHOD: - setAddListenerMethod((Method)null); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS: - getListenerMethods().clear(); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_TYPE: - setListenerType((JavaClass)null); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD: - setRemoveListenerMethod((Method)null); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS: - setEventAdapterClass((JavaClass)null); - return; - case BeaninfoPackage.EVENT_SET_DECORATOR__SER_LIST_MTHD: - getSerListMthd().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /* - * This is overridden so that we can do special is set tests: - * 1) parameter descriptors: check if serParmDesc exists and not empty, since parameter descriptors is derived. - * 2) serParmDesc: if flag set to default parm desc, then answer not set, else do normal isSet test. That way if set by default it won't serialize - * out the unneeded default parms. They can be reconstructed quickly when needed. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.EVENT_SET_DECORATOR__SOURCE: - return isSourceSet(); // Override so that if set to the same as classname, then it is considered not set. - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS: - return eIsSetGen(BeaninfoPackage.eINSTANCE.getEventSetDecorator_SerListMthd()); // Let default serListMthd is set work. - case BeaninfoPackage.EVENT_SET_DECORATOR__SER_LIST_MTHD: - if ((getImplicitlySetBits() & EVENT_LISTENERMETHODS_DEFAULT) != 0) - return false; // Not considered set if initialized by default. - else - return eIsSetGen(eFeature); // Not set by default, so check true setting. - default: - return eIsSetGen(eFeature); // Everything else use the gen method. - } - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSetGen(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.EVENT_SET_DECORATOR__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.EVENT_SET_DECORATOR__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case BeaninfoPackage.EVENT_SET_DECORATOR__DETAILS: - return details != null && !details.isEmpty(); - case BeaninfoPackage.EVENT_SET_DECORATOR__EMODEL_ELEMENT: - return getEModelElement() != null; - case BeaninfoPackage.EVENT_SET_DECORATOR__CONTENTS: - return contents != null && !contents.isEmpty(); - case BeaninfoPackage.EVENT_SET_DECORATOR__REFERENCES: - return references != null && !references.isEmpty(); - case BeaninfoPackage.EVENT_SET_DECORATOR__DISPLAY_NAME: - return isSetDisplayName(); - case BeaninfoPackage.EVENT_SET_DECORATOR__SHORT_DESCRIPTION: - return isSetShortDescription(); - case BeaninfoPackage.EVENT_SET_DECORATOR__CATEGORY: - return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); - case BeaninfoPackage.EVENT_SET_DECORATOR__EXPERT: - return isSetExpert(); - case BeaninfoPackage.EVENT_SET_DECORATOR__HIDDEN: - return isSetHidden(); - case BeaninfoPackage.EVENT_SET_DECORATOR__PREFERRED: - return isSetPreferred(); - case BeaninfoPackage.EVENT_SET_DECORATOR__MERGE_INTROSPECTION: - return ((eFlags & MERGE_INTROSPECTION_EFLAG) != 0) != MERGE_INTROSPECTION_EDEFAULT; - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return ((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0) != ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICITLY_SET_BITS: - return implicitlySetBits != IMPLICITLY_SET_BITS_EDEFAULT; - case BeaninfoPackage.EVENT_SET_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return implicitDecoratorFlag != IMPLICIT_DECORATOR_FLAG_EDEFAULT; - case BeaninfoPackage.EVENT_SET_DECORATOR__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case BeaninfoPackage.EVENT_SET_DECORATOR__IN_DEFAULT_EVENT_SET: - return isSetInDefaultEventSet(); - case BeaninfoPackage.EVENT_SET_DECORATOR__UNICAST: - return isSetUnicast(); - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS_EXPLICIT_EMPTY: - return ((eFlags & LISTENER_METHODS_EXPLICIT_EMPTY_EFLAG) != 0) != LISTENER_METHODS_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.EVENT_SET_DECORATOR__ADD_LISTENER_METHOD: - return addListenerMethod != null; - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_METHODS: - return !getListenerMethods().isEmpty(); - case BeaninfoPackage.EVENT_SET_DECORATOR__LISTENER_TYPE: - return listenerType != null; - case BeaninfoPackage.EVENT_SET_DECORATOR__REMOVE_LISTENER_METHOD: - return removeListenerMethod != null; - case BeaninfoPackage.EVENT_SET_DECORATOR__EVENT_ADAPTER_CLASS: - return eventAdapterClass != null; - case BeaninfoPackage.EVENT_SET_DECORATOR__SER_LIST_MTHD: - return serListMthd != null && !serListMthd.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (inDefaultEventSet: "); - if ((eFlags & IN_DEFAULT_EVENT_SET_ESETFLAG) != 0) result.append((eFlags & IN_DEFAULT_EVENT_SET_EFLAG) != 0); else result.append("<unset>"); - result.append(", unicast: "); - if ((eFlags & UNICAST_ESETFLAG) != 0) result.append((eFlags & UNICAST_EFLAG) != 0); else result.append("<unset>"); - result.append(", listenerMethodsExplicitEmpty: "); - result.append((eFlags & LISTENER_METHODS_EXPLICIT_EMPTY_EFLAG) != 0); - result.append(')'); - return result.toString(); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/FeatureAttributeMapEntryImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/FeatureAttributeMapEntryImpl.java deleted file mode 100644 index 610dfa116..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/FeatureAttributeMapEntryImpl.java +++ /dev/null @@ -1,308 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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 - *******************************************************************************/ -/* - * $RCSfile: FeatureAttributeMapEntryImpl.java,v $ - * $Revision: 1.8 $ $Date: 2006/05/17 20:13:00 $ - */ - -package org.eclipse.jem.internal.beaninfo.impl; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.BasicEMap; -import org.eclipse.emf.common.util.EMap; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; - -import org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Feature Attribute Map Entry</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureAttributeMapEntryImpl#getTypedKey <em>Key</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureAttributeMapEntryImpl#getTypedValue <em>Value</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class FeatureAttributeMapEntryImpl extends EObjectImpl implements BasicEMap.Entry { - - /** - * The default value of the '{@link #getTypedKey() <em>Key</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypedKey() - * @generated - * @ordered - */ - protected static final String KEY_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTypedKey() <em>Key</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypedKey() - * @generated - * @ordered - */ - protected String key = KEY_EDEFAULT; - - /** - * The default value of the '{@link #getTypedValue() <em>Value</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypedValue() - * @generated - * @ordered - */ - protected static final FeatureAttributeValue VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTypedValue() <em>Value</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypedValue() - * @generated - * @ordered - */ - protected FeatureAttributeValue value = VALUE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected FeatureAttributeMapEntryImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getFeatureAttributeMapEntry(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getTypedKey() { - return key; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setTypedKey(String newKey) { - String oldKey = key; - key = newKey; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__KEY, oldKey, key)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public FeatureAttributeValue getTypedValue() { - return value; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setTypedValue(FeatureAttributeValue newValue) { - FeatureAttributeValue oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__VALUE, oldValue, value)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__KEY: - return getTypedKey(); - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__VALUE: - return getTypedValue(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__KEY: - setTypedKey((String)newValue); - return; - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__VALUE: - setTypedValue((FeatureAttributeValue)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__KEY: - setTypedKey(KEY_EDEFAULT); - return; - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__VALUE: - setTypedValue(VALUE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__KEY: - return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key); - case BeaninfoPackage.FEATURE_ATTRIBUTE_MAP_ENTRY__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (key: "); - result.append(key); - result.append(", value: "); - result.append(value); - result.append(')'); - return result.toString(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected int hash = -1; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public int getHash() { - if (hash == -1) { - Object theKey = getKey(); - hash = (theKey == null ? 0 : theKey.hashCode()); - } - return hash; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setHash(int hash) { - this.hash = hash; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object getKey() { - return getTypedKey(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setKey(Object key) { - setTypedKey((String)key); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object getValue() { - return getTypedValue(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object setValue(Object value) { - Object oldValue = getValue(); - setTypedValue((FeatureAttributeValue)value); - return oldValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EMap getEMap() { - EObject container = eContainer(); - return container == null ? null : (EMap)container.eGet(eContainmentFeature()); - } - -} //FeatureAttributeMapEntryImpl diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/FeatureDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/FeatureDecoratorImpl.java deleted file mode 100644 index 8f2463b9c..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/FeatureDecoratorImpl.java +++ /dev/null @@ -1,1058 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: FeatureDecoratorImpl.java,v $ - * $Revision: 1.13 $ $Date: 2006/05/17 20:13:00 $ - */ - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EMap; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EAnnotationImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreEMap; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.FeatureDecorator; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Feature Decorator</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#getDisplayName <em>Display Name</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#getShortDescription <em>Short Description</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#getCategory <em>Category</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#isExpert <em>Expert</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#isHidden <em>Hidden</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#isPreferred <em>Preferred</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#isMergeIntrospection <em>Merge Introspection</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#isAttributesExplicitEmpty <em>Attributes Explicit Empty</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#getImplicitlySetBits <em>Implicitly Set Bits</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#getImplicitDecoratorFlag <em>Implicit Decorator Flag</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.FeatureDecoratorImpl#getAttributes <em>Attributes</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class FeatureDecoratorImpl extends EAnnotationImpl implements FeatureDecorator{ - - /** - * Bits for implicitly set features. This is internal, not meant for clients. - * Note: To make it easier to make changes Feature goes from high bits down, while the - * subclasses go from low-bits up. That way if a change is made to add something of - * interest to Feature, all of the subclasses don't need to have their bits re-ordered. - * Since these are bits, it doesn't matter which ones to use. - */ - public static final long FEATURE_DISPLAYNAME_IMPLICIT = 0x8000000000000000L; - public static final long FEATURE_SHORTDESC_IMPLICIT = 0x4000000000000000L; - public static final long FEATURE_CATEGORY_IMPLICIT = 0x2000000000000000L; - public static final long FEATURE_EXPERT_IMPLICIT = 0x1000000000000000L; - public static final long FEATURE_HIDDEN_IMPLICIT = 0x800000000000000L; - public static final long FEATURE_PREFERRED_IMPLICIT = 0x400000000000000L; - public static final long FEATURE_ATTRIBUTES_IMPLICIT = 0x200000000000000L; - - /** - * The default value of the '{@link #getDisplayName() <em>Display Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getDisplayName() - * @generated - * @ordered - */ - protected static final String DISPLAY_NAME_EDEFAULT = null; - - - /** - * The cached value of the '{@link #getDisplayName() <em>Display Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getDisplayName() - * @generated - * @ordered - */ - protected String displayName = DISPLAY_NAME_EDEFAULT; - /** - * The flag representing whether the Display Name attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int DISPLAY_NAME_ESETFLAG = 1 << 8; - - /** - * The default value of the '{@link #getShortDescription() <em>Short Description</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getShortDescription() - * @generated - * @ordered - */ - protected static final String SHORT_DESCRIPTION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getShortDescription() <em>Short Description</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getShortDescription() - * @generated - * @ordered - */ - protected String shortDescription = SHORT_DESCRIPTION_EDEFAULT; - /** - * The flag representing whether the Short Description attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int SHORT_DESCRIPTION_ESETFLAG = 1 << 9; - - /** - * The default value of the '{@link #getCategory() <em>Category</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCategory() - * @generated - * @ordered - */ - protected static final String CATEGORY_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCategory() - * @generated - * @ordered - */ - protected String category = CATEGORY_EDEFAULT; - /** - * The default value of the '{@link #isExpert() <em>Expert</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isExpert() - * @generated - * @ordered - */ - protected static final boolean EXPERT_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isExpert() <em>Expert</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isExpert() - * @generated - * @ordered - */ - protected static final int EXPERT_EFLAG = 1 << 10; - - /** - * The flag representing whether the Expert attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int EXPERT_ESETFLAG = 1 << 11; - - /** - * The default value of the '{@link #isHidden() <em>Hidden</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isHidden() - * @generated - * @ordered - */ - protected static final boolean HIDDEN_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isHidden() <em>Hidden</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isHidden() - * @generated - * @ordered - */ - protected static final int HIDDEN_EFLAG = 1 << 12; - - /** - * The flag representing whether the Hidden attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int HIDDEN_ESETFLAG = 1 << 13; - - /** - * The default value of the '{@link #isPreferred() <em>Preferred</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isPreferred() - * @generated - * @ordered - */ - protected static final boolean PREFERRED_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isPreferred() <em>Preferred</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isPreferred() - * @generated - * @ordered - */ - protected static final int PREFERRED_EFLAG = 1 << 14; - - /** - * The flag representing whether the Preferred attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int PREFERRED_ESETFLAG = 1 << 15; - - /** - * The default value of the '{@link #isMergeIntrospection() <em>Merge Introspection</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeIntrospection() - * @generated - * @ordered - */ - protected static final boolean MERGE_INTROSPECTION_EDEFAULT = true; - - /** - * The flag representing the value of the '{@link #isMergeIntrospection() <em>Merge Introspection</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMergeIntrospection() - * @generated - * @ordered - */ - protected static final int MERGE_INTROSPECTION_EFLAG = 1 << 16; - - /** - * The default value of the '{@link #isAttributesExplicitEmpty() <em>Attributes Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isAttributesExplicitEmpty() - * @generated - * @ordered - */ - protected static final boolean ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isAttributesExplicitEmpty() <em>Attributes Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isAttributesExplicitEmpty() - * @generated - * @ordered - */ - protected static final int ATTRIBUTES_EXPLICIT_EMPTY_EFLAG = 1 << 17; - - /** - * The default value of the '{@link #getImplicitlySetBits() <em>Implicitly Set Bits</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getImplicitlySetBits() - * @generated - * @ordered - */ - protected static final long IMPLICITLY_SET_BITS_EDEFAULT = 0L; - - /** - * The cached value of the '{@link #getImplicitlySetBits() <em>Implicitly Set Bits</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getImplicitlySetBits() - * @generated - * @ordered - */ - protected long implicitlySetBits = IMPLICITLY_SET_BITS_EDEFAULT; - - /** - * The default value of the '{@link #getImplicitDecoratorFlag() <em>Implicit Decorator Flag</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getImplicitDecoratorFlag() - * @generated - * @ordered - */ - protected static final ImplicitItem IMPLICIT_DECORATOR_FLAG_EDEFAULT = ImplicitItem.NOT_IMPLICIT_LITERAL; - - /** - * The cached value of the '{@link #getImplicitDecoratorFlag() <em>Implicit Decorator Flag</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getImplicitDecoratorFlag() - * @generated - * @ordered - */ - protected ImplicitItem implicitDecoratorFlag = IMPLICIT_DECORATOR_FLAG_EDEFAULT; - - /** - * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' map. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAttributes() - * @generated - * @ordered - */ - protected EMap attributes = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected FeatureDecoratorImpl() { - super(); - eFlags |= MERGE_INTROSPECTION_EFLAG; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getFeatureDecorator(); - } - - public String getDisplayName() { - return isSetDisplayName() ? getDisplayNameGen() : getName(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getDisplayNameGen() { - return displayName; - } - - public String getName() { - ENamedElement ne = (ENamedElement) getEModelElement(); - if (ne != null) - return ne.getName(); // The name from the owner of the feature has to be the name of feature. - else - return "?"; // Don't know what it is. //$NON-NLS-1$ - } - - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setDisplayName(String newDisplayName) { - String oldDisplayName = displayName; - displayName = newDisplayName; - boolean oldDisplayNameESet = (eFlags & DISPLAY_NAME_ESETFLAG) != 0; - eFlags |= DISPLAY_NAME_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__DISPLAY_NAME, oldDisplayName, displayName, !oldDisplayNameESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetDisplayName() { - String oldDisplayName = displayName; - boolean oldDisplayNameESet = (eFlags & DISPLAY_NAME_ESETFLAG) != 0; - displayName = DISPLAY_NAME_EDEFAULT; - eFlags &= ~DISPLAY_NAME_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.FEATURE_DECORATOR__DISPLAY_NAME, oldDisplayName, DISPLAY_NAME_EDEFAULT, oldDisplayNameESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetDisplayName() { - return (eFlags & DISPLAY_NAME_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getShortDescription() { - return shortDescription; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setShortDescription(String newShortDescription) { - String oldShortDescription = shortDescription; - shortDescription = newShortDescription; - boolean oldShortDescriptionESet = (eFlags & SHORT_DESCRIPTION_ESETFLAG) != 0; - eFlags |= SHORT_DESCRIPTION_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__SHORT_DESCRIPTION, oldShortDescription, shortDescription, !oldShortDescriptionESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetShortDescription() { - String oldShortDescription = shortDescription; - boolean oldShortDescriptionESet = (eFlags & SHORT_DESCRIPTION_ESETFLAG) != 0; - shortDescription = SHORT_DESCRIPTION_EDEFAULT; - eFlags &= ~SHORT_DESCRIPTION_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.FEATURE_DECORATOR__SHORT_DESCRIPTION, oldShortDescription, SHORT_DESCRIPTION_EDEFAULT, oldShortDescriptionESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetShortDescription() { - return (eFlags & SHORT_DESCRIPTION_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getCategory() { - return category; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setCategory(String newCategory) { - String oldCategory = category; - category = newCategory; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__CATEGORY, oldCategory, category)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isExpert() { - return (eFlags & EXPERT_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setExpert(boolean newExpert) { - boolean oldExpert = (eFlags & EXPERT_EFLAG) != 0; - if (newExpert) eFlags |= EXPERT_EFLAG; else eFlags &= ~EXPERT_EFLAG; - boolean oldExpertESet = (eFlags & EXPERT_ESETFLAG) != 0; - eFlags |= EXPERT_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__EXPERT, oldExpert, newExpert, !oldExpertESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetExpert() { - boolean oldExpert = (eFlags & EXPERT_EFLAG) != 0; - boolean oldExpertESet = (eFlags & EXPERT_ESETFLAG) != 0; - if (EXPERT_EDEFAULT) eFlags |= EXPERT_EFLAG; else eFlags &= ~EXPERT_EFLAG; - eFlags &= ~EXPERT_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.FEATURE_DECORATOR__EXPERT, oldExpert, EXPERT_EDEFAULT, oldExpertESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetExpert() { - return (eFlags & EXPERT_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isHidden() { - return (eFlags & HIDDEN_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setHidden(boolean newHidden) { - boolean oldHidden = (eFlags & HIDDEN_EFLAG) != 0; - if (newHidden) eFlags |= HIDDEN_EFLAG; else eFlags &= ~HIDDEN_EFLAG; - boolean oldHiddenESet = (eFlags & HIDDEN_ESETFLAG) != 0; - eFlags |= HIDDEN_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__HIDDEN, oldHidden, newHidden, !oldHiddenESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetHidden() { - boolean oldHidden = (eFlags & HIDDEN_EFLAG) != 0; - boolean oldHiddenESet = (eFlags & HIDDEN_ESETFLAG) != 0; - if (HIDDEN_EDEFAULT) eFlags |= HIDDEN_EFLAG; else eFlags &= ~HIDDEN_EFLAG; - eFlags &= ~HIDDEN_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.FEATURE_DECORATOR__HIDDEN, oldHidden, HIDDEN_EDEFAULT, oldHiddenESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetHidden() { - return (eFlags & HIDDEN_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isPreferred() { - return (eFlags & PREFERRED_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setPreferred(boolean newPreferred) { - boolean oldPreferred = (eFlags & PREFERRED_EFLAG) != 0; - if (newPreferred) eFlags |= PREFERRED_EFLAG; else eFlags &= ~PREFERRED_EFLAG; - boolean oldPreferredESet = (eFlags & PREFERRED_ESETFLAG) != 0; - eFlags |= PREFERRED_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__PREFERRED, oldPreferred, newPreferred, !oldPreferredESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetPreferred() { - boolean oldPreferred = (eFlags & PREFERRED_EFLAG) != 0; - boolean oldPreferredESet = (eFlags & PREFERRED_ESETFLAG) != 0; - if (PREFERRED_EDEFAULT) eFlags |= PREFERRED_EFLAG; else eFlags &= ~PREFERRED_EFLAG; - eFlags &= ~PREFERRED_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.FEATURE_DECORATOR__PREFERRED, oldPreferred, PREFERRED_EDEFAULT, oldPreferredESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetPreferred() { - return (eFlags & PREFERRED_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isMergeIntrospection() { - return (eFlags & MERGE_INTROSPECTION_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMergeIntrospection(boolean newMergeIntrospection) { - boolean oldMergeIntrospection = (eFlags & MERGE_INTROSPECTION_EFLAG) != 0; - if (newMergeIntrospection) eFlags |= MERGE_INTROSPECTION_EFLAG; else eFlags &= ~MERGE_INTROSPECTION_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__MERGE_INTROSPECTION, oldMergeIntrospection, newMergeIntrospection)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isAttributesExplicitEmpty() { - return (eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setAttributesExplicitEmpty(boolean newAttributesExplicitEmpty) { - boolean oldAttributesExplicitEmpty = (eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0; - if (newAttributesExplicitEmpty) eFlags |= ATTRIBUTES_EXPLICIT_EMPTY_EFLAG; else eFlags &= ~ATTRIBUTES_EXPLICIT_EMPTY_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY, oldAttributesExplicitEmpty, newAttributesExplicitEmpty)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public long getImplicitlySetBits() { - return implicitlySetBits; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setImplicitlySetBits(long newImplicitlySetBits) { - long oldImplicitlySetBits = implicitlySetBits; - implicitlySetBits = newImplicitlySetBits; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__IMPLICITLY_SET_BITS, oldImplicitlySetBits, implicitlySetBits)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ImplicitItem getImplicitDecoratorFlag() { - return implicitDecoratorFlag; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setImplicitDecoratorFlag(ImplicitItem newImplicitDecoratorFlag) { - ImplicitItem oldImplicitDecoratorFlag = implicitDecoratorFlag; - implicitDecoratorFlag = newImplicitDecoratorFlag == null ? IMPLICIT_DECORATOR_FLAG_EDEFAULT : newImplicitDecoratorFlag; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG, oldImplicitDecoratorFlag, implicitDecoratorFlag)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EMap getAttributes() { - if (attributes == null) { - attributes = new EcoreEMap(BeaninfoPackage.eINSTANCE.getFeatureAttributeMapEntry(), FeatureAttributeMapEntryImpl.class, this, BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES); - } - return attributes; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (displayName: "); - if ((eFlags & DISPLAY_NAME_ESETFLAG) != 0) result.append(displayName); else result.append("<unset>"); - result.append(", shortDescription: "); - if ((eFlags & SHORT_DESCRIPTION_ESETFLAG) != 0) result.append(shortDescription); else result.append("<unset>"); - result.append(", category: "); - result.append(category); - result.append(", expert: "); - if ((eFlags & EXPERT_ESETFLAG) != 0) result.append((eFlags & EXPERT_EFLAG) != 0); else result.append("<unset>"); - result.append(", hidden: "); - if ((eFlags & HIDDEN_ESETFLAG) != 0) result.append((eFlags & HIDDEN_EFLAG) != 0); else result.append("<unset>"); - result.append(", preferred: "); - if ((eFlags & PREFERRED_ESETFLAG) != 0) result.append((eFlags & PREFERRED_EFLAG) != 0); else result.append("<unset>"); - result.append(", mergeIntrospection: "); - result.append((eFlags & MERGE_INTROSPECTION_EFLAG) != 0); - result.append(", attributesExplicitEmpty: "); - result.append((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0); - result.append(", implicitlySetBits: "); - result.append(implicitlySetBits); - result.append(", implicitDecoratorFlag: "); - result.append(implicitDecoratorFlag); - result.append(')'); - return result.toString(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.FEATURE_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.FEATURE_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.FEATURE_DECORATOR__DETAILS: - return ((InternalEList)getDetails()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT: - return eBasicSetContainer(null, BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT, msgs); - case BeaninfoPackage.FEATURE_DECORATOR__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT: - return eContainer.eInverseRemove(this, EcorePackage.EMODEL_ELEMENT__EANNOTATIONS, EModelElement.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_DECORATOR__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.FEATURE_DECORATOR__SOURCE: - return getSource(); - case BeaninfoPackage.FEATURE_DECORATOR__DETAILS: - return getDetails(); - case BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT: - return getEModelElement(); - case BeaninfoPackage.FEATURE_DECORATOR__CONTENTS: - return getContents(); - case BeaninfoPackage.FEATURE_DECORATOR__REFERENCES: - return getReferences(); - case BeaninfoPackage.FEATURE_DECORATOR__DISPLAY_NAME: - return getDisplayName(); - case BeaninfoPackage.FEATURE_DECORATOR__SHORT_DESCRIPTION: - return getShortDescription(); - case BeaninfoPackage.FEATURE_DECORATOR__CATEGORY: - return getCategory(); - case BeaninfoPackage.FEATURE_DECORATOR__EXPERT: - return isExpert() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.FEATURE_DECORATOR__HIDDEN: - return isHidden() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.FEATURE_DECORATOR__PREFERRED: - return isPreferred() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.FEATURE_DECORATOR__MERGE_INTROSPECTION: - return isMergeIntrospection() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return isAttributesExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICITLY_SET_BITS: - return new Long(getImplicitlySetBits()); - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return getImplicitDecoratorFlag(); - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES: - return getAttributes(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__SOURCE: - setSource((String)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__DETAILS: - getDetails().clear(); - getDetails().addAll((Collection)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__REFERENCES: - getReferences().clear(); - getReferences().addAll((Collection)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__SHORT_DESCRIPTION: - setShortDescription((String)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__CATEGORY: - setCategory((String)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__EXPERT: - setExpert(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.FEATURE_DECORATOR__HIDDEN: - setHidden(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.FEATURE_DECORATOR__PREFERRED: - setPreferred(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.FEATURE_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(((Long)newValue).longValue()); - return; - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag((ImplicitItem)newValue); - return; - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case BeaninfoPackage.FEATURE_DECORATOR__DETAILS: - getDetails().clear(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)null); - return; - case BeaninfoPackage.FEATURE_DECORATOR__CONTENTS: - getContents().clear(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__REFERENCES: - getReferences().clear(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__DISPLAY_NAME: - unsetDisplayName(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__SHORT_DESCRIPTION: - unsetShortDescription(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__CATEGORY: - setCategory(CATEGORY_EDEFAULT); - return; - case BeaninfoPackage.FEATURE_DECORATOR__EXPERT: - unsetExpert(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__HIDDEN: - unsetHidden(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__PREFERRED: - unsetPreferred(); - return; - case BeaninfoPackage.FEATURE_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(MERGE_INTROSPECTION_EDEFAULT); - return; - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(IMPLICITLY_SET_BITS_EDEFAULT); - return; - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag(IMPLICIT_DECORATOR_FLAG_EDEFAULT); - return; - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * Called by overrides to eIsSet to test if source is set. This is because for the - * FeatureDecorator and subclasses, setting source to the classname is considered - * to be not set since that is the new default for each class level. By doing this - * when serializing it won't waste space and time adding a copy of the source string - * to the serialized output and then creating a NEW copy on each decorator loaded - * from an XMI file. - * - * @return <code>true</code> if source is not null and not equal to class name (less the "Impl" at the end). - * - * @since 1.1.0 - */ - protected boolean isSourceSet() { - return source != null && !eClass().getInstanceClassName().equals(source); - } - - /* (non-Javadoc) - * @see org.eclipse.emf.ecore.EObject#eIsSet(org.eclipse.emf.ecore.EStructuralFeature) - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_DECORATOR__SOURCE: - return isSourceSet(); // Override so that if set to the same as classname, then it is considered not set. - default: - return eIsSetGen(eFeature); - } - } - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSetGen(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.FEATURE_DECORATOR__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.FEATURE_DECORATOR__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case BeaninfoPackage.FEATURE_DECORATOR__DETAILS: - return details != null && !details.isEmpty(); - case BeaninfoPackage.FEATURE_DECORATOR__EMODEL_ELEMENT: - return getEModelElement() != null; - case BeaninfoPackage.FEATURE_DECORATOR__CONTENTS: - return contents != null && !contents.isEmpty(); - case BeaninfoPackage.FEATURE_DECORATOR__REFERENCES: - return references != null && !references.isEmpty(); - case BeaninfoPackage.FEATURE_DECORATOR__DISPLAY_NAME: - return isSetDisplayName(); - case BeaninfoPackage.FEATURE_DECORATOR__SHORT_DESCRIPTION: - return isSetShortDescription(); - case BeaninfoPackage.FEATURE_DECORATOR__CATEGORY: - return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); - case BeaninfoPackage.FEATURE_DECORATOR__EXPERT: - return isSetExpert(); - case BeaninfoPackage.FEATURE_DECORATOR__HIDDEN: - return isSetHidden(); - case BeaninfoPackage.FEATURE_DECORATOR__PREFERRED: - return isSetPreferred(); - case BeaninfoPackage.FEATURE_DECORATOR__MERGE_INTROSPECTION: - return ((eFlags & MERGE_INTROSPECTION_EFLAG) != 0) != MERGE_INTROSPECTION_EDEFAULT; - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return ((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0) != ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICITLY_SET_BITS: - return implicitlySetBits != IMPLICITLY_SET_BITS_EDEFAULT; - case BeaninfoPackage.FEATURE_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return implicitDecoratorFlag != IMPLICIT_DECORATOR_FLAG_EDEFAULT; - case BeaninfoPackage.FEATURE_DECORATOR__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/IndexedPropertyDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/IndexedPropertyDecoratorImpl.java deleted file mode 100644 index bcd72a943..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/IndexedPropertyDecoratorImpl.java +++ /dev/null @@ -1,664 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: IndexedPropertyDecoratorImpl.java,v $ - * $Revision: 1.12 $ $Date: 2005/09/19 15:43:02 $ - */ - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; -import org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator; -import org.eclipse.jem.java.Field; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.Method; -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Indexed Property Decorator</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.IndexedPropertyDecoratorImpl#getIndexedReadMethod <em>Indexed Read Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.IndexedPropertyDecoratorImpl#getIndexedWriteMethod <em>Indexed Write Method</em>}</li> - * </ul> - * </p> - * - * @generated - */ - - -public class IndexedPropertyDecoratorImpl extends PropertyDecoratorImpl implements IndexedPropertyDecorator{ - - /** - * Bits for implicitly set features. This is internal, not meant for clients. - */ - public static final long INDEXED_READMETHOD_IMPLICIT = 0x100000L; // Start kind of high so as to allow PropertyDecorator to increase without conflig. - public static final long INDEXED_WRITEMETHOD_IMPLICIT = 0x200000L; - - /** - * The cached value of the '{@link #getIndexedReadMethod() <em>Indexed Read Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getIndexedReadMethod() - * @generated - * @ordered - */ - protected Method indexedReadMethod = null; - /** - * The flag representing whether the Indexed Read Method reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int INDEXED_READ_METHOD_ESETFLAG = 1 << 29; - - /** - * The cached value of the '{@link #getIndexedWriteMethod() <em>Indexed Write Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getIndexedWriteMethod() - * @generated - * @ordered - */ - protected Method indexedWriteMethod = null; - - /** - * The flag representing whether the Indexed Write Method reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int INDEXED_WRITE_METHOD_ESETFLAG = 1 << 30; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IndexedPropertyDecoratorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getIndexedPropertyDecorator(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method getIndexedReadMethod() { - if (indexedReadMethod != null && indexedReadMethod.eIsProxy()) { - Method oldIndexedReadMethod = indexedReadMethod; - indexedReadMethod = (Method)eResolveProxy((InternalEObject)indexedReadMethod); - if (indexedReadMethod != oldIndexedReadMethod) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD, oldIndexedReadMethod, indexedReadMethod)); - } - } - return indexedReadMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setIndexedReadMethod(Method newIndexedReadMethod) { - Method oldIndexedReadMethod = indexedReadMethod; - indexedReadMethod = newIndexedReadMethod; - boolean oldIndexedReadMethodESet = (eFlags & INDEXED_READ_METHOD_ESETFLAG) != 0; - eFlags |= INDEXED_READ_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD, oldIndexedReadMethod, indexedReadMethod, !oldIndexedReadMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetIndexedReadMethod() { - Method oldIndexedReadMethod = indexedReadMethod; - boolean oldIndexedReadMethodESet = (eFlags & INDEXED_READ_METHOD_ESETFLAG) != 0; - indexedReadMethod = null; - eFlags &= ~INDEXED_READ_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD, oldIndexedReadMethod, null, oldIndexedReadMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetIndexedReadMethod() { - return (eFlags & INDEXED_READ_METHOD_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method getIndexedWriteMethod() { - if (indexedWriteMethod != null && indexedWriteMethod.eIsProxy()) { - Method oldIndexedWriteMethod = indexedWriteMethod; - indexedWriteMethod = (Method)eResolveProxy((InternalEObject)indexedWriteMethod); - if (indexedWriteMethod != oldIndexedWriteMethod) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD, oldIndexedWriteMethod, indexedWriteMethod)); - } - } - return indexedWriteMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setIndexedWriteMethod(Method newIndexedWriteMethod) { - Method oldIndexedWriteMethod = indexedWriteMethod; - indexedWriteMethod = newIndexedWriteMethod; - boolean oldIndexedWriteMethodESet = (eFlags & INDEXED_WRITE_METHOD_ESETFLAG) != 0; - eFlags |= INDEXED_WRITE_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD, oldIndexedWriteMethod, indexedWriteMethod, !oldIndexedWriteMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetIndexedWriteMethod() { - Method oldIndexedWriteMethod = indexedWriteMethod; - boolean oldIndexedWriteMethodESet = (eFlags & INDEXED_WRITE_METHOD_ESETFLAG) != 0; - indexedWriteMethod = null; - eFlags &= ~INDEXED_WRITE_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD, oldIndexedWriteMethod, null, oldIndexedWriteMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetIndexedWriteMethod() { - return (eFlags & INDEXED_WRITE_METHOD_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DETAILS: - return ((InternalEList)getDetails()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT: - return eBasicSetContainer(null, BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT, msgs); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT: - return eContainer.eInverseRemove(this, EcorePackage.EMODEL_ELEMENT__EANNOTATIONS, EModelElement.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SOURCE: - return getSource(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DETAILS: - return getDetails(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT: - return getEModelElement(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONTENTS: - return getContents(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__REFERENCES: - return getReferences(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DISPLAY_NAME: - return getDisplayName(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SHORT_DESCRIPTION: - return getShortDescription(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CATEGORY: - return getCategory(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EXPERT: - return isExpert() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__HIDDEN: - return isHidden() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PREFERRED: - return isPreferred() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__MERGE_INTROSPECTION: - return isMergeIntrospection() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return isAttributesExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - return new Long(getImplicitlySetBits()); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return getImplicitDecoratorFlag(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES: - return getAttributes(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__BOUND: - return isBound() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONSTRAINED: - return isConstrained() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DESIGN_TIME: - return isDesignTime() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - return isAlwaysIncompatible() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FILTER_FLAGS: - return getFilterFlags(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD_READ_ONLY: - return isFieldReadOnly() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - if (resolve) return getPropertyEditorClass(); - return basicGetPropertyEditorClass(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__READ_METHOD: - if (resolve) return getReadMethod(); - return basicGetReadMethod(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__WRITE_METHOD: - if (resolve) return getWriteMethod(); - return basicGetWriteMethod(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD: - if (resolve) return getField(); - return basicGetField(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD: - if (resolve) return getIndexedReadMethod(); - return basicGetIndexedReadMethod(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD: - if (resolve) return getIndexedWriteMethod(); - return basicGetIndexedWriteMethod(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SOURCE: - setSource((String)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DETAILS: - getDetails().clear(); - getDetails().addAll((Collection)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__REFERENCES: - getReferences().clear(); - getReferences().addAll((Collection)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SHORT_DESCRIPTION: - setShortDescription((String)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CATEGORY: - setCategory((String)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EXPERT: - setExpert(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__HIDDEN: - setHidden(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PREFERRED: - setPreferred(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(((Long)newValue).longValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag((ImplicitItem)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__BOUND: - setBound(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONSTRAINED: - setConstrained(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DESIGN_TIME: - setDesignTime(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - setAlwaysIncompatible(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FILTER_FLAGS: - getFilterFlags().clear(); - getFilterFlags().addAll((Collection)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD_READ_ONLY: - setFieldReadOnly(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - setPropertyEditorClass((JavaClass)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__READ_METHOD: - setReadMethod((Method)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__WRITE_METHOD: - setWriteMethod((Method)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD: - setField((Field)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD: - setIndexedReadMethod((Method)newValue); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD: - setIndexedWriteMethod((Method)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DETAILS: - getDetails().clear(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)null); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONTENTS: - getContents().clear(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__REFERENCES: - getReferences().clear(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DISPLAY_NAME: - unsetDisplayName(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SHORT_DESCRIPTION: - unsetShortDescription(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CATEGORY: - setCategory(CATEGORY_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EXPERT: - unsetExpert(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__HIDDEN: - unsetHidden(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PREFERRED: - unsetPreferred(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(MERGE_INTROSPECTION_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(IMPLICITLY_SET_BITS_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag(IMPLICIT_DECORATOR_FLAG_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__BOUND: - unsetBound(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONSTRAINED: - unsetConstrained(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DESIGN_TIME: - unsetDesignTime(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - setAlwaysIncompatible(ALWAYS_INCOMPATIBLE_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FILTER_FLAGS: - getFilterFlags().clear(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD_READ_ONLY: - setFieldReadOnly(FIELD_READ_ONLY_EDEFAULT); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - setPropertyEditorClass((JavaClass)null); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__READ_METHOD: - unsetReadMethod(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__WRITE_METHOD: - unsetWriteMethod(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD: - unsetField(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD: - unsetIndexedReadMethod(); - return; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD: - unsetIndexedWriteMethod(); - return; - } - eDynamicUnset(eFeature); - } - - /* (non-Javadoc) - * @see org.eclipse.emf.ecore.EObject#eIsSet(org.eclipse.emf.ecore.EStructuralFeature) - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SOURCE: - return isSourceSet(); // Override so that if set to the same as classname, then it is considered not set. - default: - return eIsSetGen(eFeature); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSetGen(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DETAILS: - return details != null && !details.isEmpty(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EMODEL_ELEMENT: - return getEModelElement() != null; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONTENTS: - return contents != null && !contents.isEmpty(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__REFERENCES: - return references != null && !references.isEmpty(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DISPLAY_NAME: - return isSetDisplayName(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__SHORT_DESCRIPTION: - return isSetShortDescription(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CATEGORY: - return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__EXPERT: - return isSetExpert(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__HIDDEN: - return isSetHidden(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PREFERRED: - return isSetPreferred(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__MERGE_INTROSPECTION: - return ((eFlags & MERGE_INTROSPECTION_EFLAG) != 0) != MERGE_INTROSPECTION_EDEFAULT; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return ((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0) != ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - return implicitlySetBits != IMPLICITLY_SET_BITS_EDEFAULT; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return implicitDecoratorFlag != IMPLICIT_DECORATOR_FLAG_EDEFAULT; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__BOUND: - return isSetBound(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__CONSTRAINED: - return isSetConstrained(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__DESIGN_TIME: - return isSetDesignTime(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - return ((eFlags & ALWAYS_INCOMPATIBLE_EFLAG) != 0) != ALWAYS_INCOMPATIBLE_EDEFAULT; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FILTER_FLAGS: - return filterFlags != null && !filterFlags.isEmpty(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD_READ_ONLY: - return ((eFlags & FIELD_READ_ONLY_EFLAG) != 0) != FIELD_READ_ONLY_EDEFAULT; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - return propertyEditorClass != null; - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__READ_METHOD: - return isSetReadMethod(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__WRITE_METHOD: - return isSetWriteMethod(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__FIELD: - return isSetField(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_READ_METHOD: - return isSetIndexedReadMethod(); - case BeaninfoPackage.INDEXED_PROPERTY_DECORATOR__INDEXED_WRITE_METHOD: - return isSetIndexedWriteMethod(); - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method basicGetIndexedReadMethod() { - return indexedReadMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method basicGetIndexedWriteMethod() { - return indexedWriteMethod; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/MethodDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/MethodDecoratorImpl.java deleted file mode 100644 index 80a2aeb71..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/MethodDecoratorImpl.java +++ /dev/null @@ -1,592 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: MethodDecoratorImpl.java,v $ - * $Revision: 1.11 $ $Date: 2005/09/19 15:43:02 $ - */ - - -import java.util.Collection; - -import java.util.*; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeaninfoFactory; -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; -import org.eclipse.jem.internal.beaninfo.MethodDecorator; -import org.eclipse.jem.internal.beaninfo.MethodProxy; -import org.eclipse.jem.internal.beaninfo.ParameterDecorator; -import org.eclipse.jem.java.JavaParameter; -import org.eclipse.jem.java.Method; -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Method Decorator</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.MethodDecoratorImpl#isParmsExplicitEmpty <em>Parms Explicit Empty</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.MethodDecoratorImpl#getParameterDescriptors <em>Parameter Descriptors</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.MethodDecoratorImpl#getSerParmDesc <em>Ser Parm Desc</em>}</li> - * </ul> - * </p> - * - * @generated - */ - - -public class MethodDecoratorImpl extends FeatureDecoratorImpl implements MethodDecorator{ - - /** - * Bits for implicitly set features. This is internal, not meant for clients. - */ - public static final long METHOD_PARAMETERS_IMPLICIT = 0x1L; - public static final long METHOD_PARAMETERS_DEFAULT = 02L; // Special, means were created by default and not by implicit (from beaninfo). - - /** - * The default value of the '{@link #isParmsExplicitEmpty() <em>Parms Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isParmsExplicitEmpty() - * @generated - * @ordered - */ - protected static final boolean PARMS_EXPLICIT_EMPTY_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isParmsExplicitEmpty() <em>Parms Explicit Empty</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isParmsExplicitEmpty() - * @generated - * @ordered - */ - protected static final int PARMS_EXPLICIT_EMPTY_EFLAG = 1 << 18; - - /** - * The cached value of the '{@link #getSerParmDesc() <em>Ser Parm Desc</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSerParmDesc() - * @generated - * @ordered - */ - protected EList serParmDesc = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected MethodDecoratorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getMethodDecorator(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isParmsExplicitEmpty() { - return (eFlags & PARMS_EXPLICIT_EMPTY_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setParmsExplicitEmpty(boolean newParmsExplicitEmpty) { - boolean oldParmsExplicitEmpty = (eFlags & PARMS_EXPLICIT_EMPTY_EFLAG) != 0; - if (newParmsExplicitEmpty) eFlags |= PARMS_EXPLICIT_EMPTY_EFLAG; else eFlags &= ~PARMS_EXPLICIT_EMPTY_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.METHOD_DECORATOR__PARMS_EXPLICIT_EMPTY, oldParmsExplicitEmpty, newParmsExplicitEmpty)); - } - - /* - * This is called if parms list not explicitly set and it was empty from BeanInfo or - * this is from reflection. This becomes the default list based upon the method - * we are attached to. - */ - private EList createDefaultParmsList() { - EList parmsList = this.getSerParmDesc(); - parmsList.clear(); - - setImplicitlySetBits(getImplicitlySetBits()|METHOD_PARAMETERS_DEFAULT); // Mark as we implicitly filled it in. - List p = getMethodParameters(); - if (p == null) - return parmsList; // Couldn't get the list for some reason, so leave as is. - int psize = p.size(); - for (int i=0; i<psize; i++) { - ParameterDecorator pd = BeaninfoFactory.eINSTANCE.createParameterDecorator(); - JavaParameter jp = (JavaParameter) p.get(i); - pd.setName(jp.getName()); - pd.setImplicitlySetBits(ParameterDecoratorImpl.PARAMETER_NAME_IMPLICIT); - pd.setParameter(jp); - parmsList.add(pd); - } - return parmsList; - } - - /* - * Initialize the ParameterDecorators to hook up the JavaParameter they are describing. - * This is called from ParameterDecorator when it finds that its JavaParameter has not been set. - * This means that it was explicitly added and we need to setup the parms. - * <p> - * Note this an internal method for BeanInfo. It is not meant to be called by clients. - */ - void initializeParameters() { - if (this.serParmDesc == null) - return; - List mp = getMethodParameters(); - if (mp.isEmpty()) - return; // Nothing that can be described. - int psize = Math.min(this.serParmDesc.size(), mp.size()); - for (int i=0; i < psize; i++) - ((ParameterDecorator) this.serParmDesc.get(i)).setParameter((JavaParameter) mp.get(i)); - } - - - /* - * Get the jem parameters from the method (jem method) - */ - private List getMethodParameters() { - // Get the method - Method m = null; - Object d = getEModelElement(); - if (d instanceof Method) - m = (Method) d; - else - if (d instanceof MethodProxy) - m = ((MethodProxy) d).getMethod(); - else - return Collections.EMPTY_LIST; // Not decorating correct object. - if (m == null) - return Collections.EMPTY_LIST; // Couldn't find the method. - List p = m.getParameters(); - return p; - } - - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (parmsExplicitEmpty: "); - result.append((eFlags & PARMS_EXPLICIT_EMPTY_EFLAG) != 0); - result.append(')'); - return result.toString(); - } - - /* - * (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.MethodDecorator#getParameterDescriptors() - */ - public EList getParameterDescriptors() { - if (!isParmsExplicitEmpty() && getSerParmDesc().isEmpty() && (getImplicitlySetBits()&(METHOD_PARAMETERS_IMPLICIT | METHOD_PARAMETERS_DEFAULT)) == 0) { - // Not explicitly empty, it is empty, and we have not implicitly or by defaults made it empty, then create the defaults. - createDefaultParmsList(); - } - return getSerParmDesc(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getParameterDescriptorsGen() { - // TODO: implement this method to return the 'Parameter Descriptors' reference list - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getSerParmDesc() { - if (serParmDesc == null) { - serParmDesc = new EObjectContainmentEList(ParameterDecorator.class, this, BeaninfoPackage.METHOD_DECORATOR__SER_PARM_DESC); - } - return serParmDesc; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.METHOD_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.METHOD_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.METHOD_DECORATOR__DETAILS: - return ((InternalEList)getDetails()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT: - return eBasicSetContainer(null, BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT, msgs); - case BeaninfoPackage.METHOD_DECORATOR__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.METHOD_DECORATOR__SER_PARM_DESC: - return ((InternalEList)getSerParmDesc()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT: - return eContainer.eInverseRemove(this, EcorePackage.EMODEL_ELEMENT__EANNOTATIONS, EModelElement.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_DECORATOR__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.METHOD_DECORATOR__SOURCE: - return getSource(); - case BeaninfoPackage.METHOD_DECORATOR__DETAILS: - return getDetails(); - case BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT: - return getEModelElement(); - case BeaninfoPackage.METHOD_DECORATOR__CONTENTS: - return getContents(); - case BeaninfoPackage.METHOD_DECORATOR__REFERENCES: - return getReferences(); - case BeaninfoPackage.METHOD_DECORATOR__DISPLAY_NAME: - return getDisplayName(); - case BeaninfoPackage.METHOD_DECORATOR__SHORT_DESCRIPTION: - return getShortDescription(); - case BeaninfoPackage.METHOD_DECORATOR__CATEGORY: - return getCategory(); - case BeaninfoPackage.METHOD_DECORATOR__EXPERT: - return isExpert() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_DECORATOR__HIDDEN: - return isHidden() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_DECORATOR__PREFERRED: - return isPreferred() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_DECORATOR__MERGE_INTROSPECTION: - return isMergeIntrospection() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return isAttributesExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_DECORATOR__IMPLICITLY_SET_BITS: - return new Long(getImplicitlySetBits()); - case BeaninfoPackage.METHOD_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return getImplicitDecoratorFlag(); - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES: - return getAttributes(); - case BeaninfoPackage.METHOD_DECORATOR__PARMS_EXPLICIT_EMPTY: - return isParmsExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_DECORATOR__PARAMETER_DESCRIPTORS: - return getParameterDescriptors(); - case BeaninfoPackage.METHOD_DECORATOR__SER_PARM_DESC: - return getSerParmDesc(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__SOURCE: - setSource((String)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__DETAILS: - getDetails().clear(); - getDetails().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__REFERENCES: - getReferences().clear(); - getReferences().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__SHORT_DESCRIPTION: - setShortDescription((String)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__CATEGORY: - setCategory((String)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__EXPERT: - setExpert(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_DECORATOR__HIDDEN: - setHidden(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_DECORATOR__PREFERRED: - setPreferred(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(((Long)newValue).longValue()); - return; - case BeaninfoPackage.METHOD_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag((ImplicitItem)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__PARMS_EXPLICIT_EMPTY: - setParmsExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_DECORATOR__PARAMETER_DESCRIPTORS: - getParameterDescriptors().clear(); - getParameterDescriptors().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_DECORATOR__SER_PARM_DESC: - getSerParmDesc().clear(); - getSerParmDesc().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.METHOD_DECORATOR__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case BeaninfoPackage.METHOD_DECORATOR__DETAILS: - getDetails().clear(); - return; - case BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)null); - return; - case BeaninfoPackage.METHOD_DECORATOR__CONTENTS: - getContents().clear(); - return; - case BeaninfoPackage.METHOD_DECORATOR__REFERENCES: - getReferences().clear(); - return; - case BeaninfoPackage.METHOD_DECORATOR__DISPLAY_NAME: - unsetDisplayName(); - return; - case BeaninfoPackage.METHOD_DECORATOR__SHORT_DESCRIPTION: - unsetShortDescription(); - return; - case BeaninfoPackage.METHOD_DECORATOR__CATEGORY: - setCategory(CATEGORY_EDEFAULT); - return; - case BeaninfoPackage.METHOD_DECORATOR__EXPERT: - unsetExpert(); - return; - case BeaninfoPackage.METHOD_DECORATOR__HIDDEN: - unsetHidden(); - return; - case BeaninfoPackage.METHOD_DECORATOR__PREFERRED: - unsetPreferred(); - return; - case BeaninfoPackage.METHOD_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(MERGE_INTROSPECTION_EDEFAULT); - return; - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.METHOD_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(IMPLICITLY_SET_BITS_EDEFAULT); - return; - case BeaninfoPackage.METHOD_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag(IMPLICIT_DECORATOR_FLAG_EDEFAULT); - return; - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - return; - case BeaninfoPackage.METHOD_DECORATOR__PARMS_EXPLICIT_EMPTY: - setParmsExplicitEmpty(PARMS_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.METHOD_DECORATOR__PARAMETER_DESCRIPTORS: - getParameterDescriptors().clear(); - return; - case BeaninfoPackage.METHOD_DECORATOR__SER_PARM_DESC: - getSerParmDesc().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /* - * This is overridden so that we can do special is set tests: - * 1) parameter descriptors: check if serParmDesc exists and not empty, since parameter descriptors is derived. - * 2) serParmDesc: if flag set to default parm desc, then answer not set, else do normal isSet test. That way if set by default it won't serialize - * out the unneeded default parms. They can be reconstructed quickly when needed. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_DECORATOR__SOURCE: - return isSourceSet(); // Override so that if set to the same as classname, then it is considered not set. - case BeaninfoPackage.METHOD_DECORATOR__PARAMETER_DESCRIPTORS: - return eIsSetGen(BeaninfoPackage.eINSTANCE.getMethodDecorator_SerParmDesc()); // Let default serParmDesc is set work. - case BeaninfoPackage.METHOD_DECORATOR__SER_PARM_DESC: - if ((getImplicitlySetBits() & METHOD_PARAMETERS_DEFAULT) != 0) - return false; // Not considered set if initialized by default. - else - return eIsSetGen(eFeature); // Not set by default, so check true setting. - default: - return eIsSetGen(eFeature); // Everything else use the gen method. - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSetGen(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_DECORATOR__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.METHOD_DECORATOR__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case BeaninfoPackage.METHOD_DECORATOR__DETAILS: - return details != null && !details.isEmpty(); - case BeaninfoPackage.METHOD_DECORATOR__EMODEL_ELEMENT: - return getEModelElement() != null; - case BeaninfoPackage.METHOD_DECORATOR__CONTENTS: - return contents != null && !contents.isEmpty(); - case BeaninfoPackage.METHOD_DECORATOR__REFERENCES: - return references != null && !references.isEmpty(); - case BeaninfoPackage.METHOD_DECORATOR__DISPLAY_NAME: - return isSetDisplayName(); - case BeaninfoPackage.METHOD_DECORATOR__SHORT_DESCRIPTION: - return isSetShortDescription(); - case BeaninfoPackage.METHOD_DECORATOR__CATEGORY: - return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); - case BeaninfoPackage.METHOD_DECORATOR__EXPERT: - return isSetExpert(); - case BeaninfoPackage.METHOD_DECORATOR__HIDDEN: - return isSetHidden(); - case BeaninfoPackage.METHOD_DECORATOR__PREFERRED: - return isSetPreferred(); - case BeaninfoPackage.METHOD_DECORATOR__MERGE_INTROSPECTION: - return ((eFlags & MERGE_INTROSPECTION_EFLAG) != 0) != MERGE_INTROSPECTION_EDEFAULT; - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return ((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0) != ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.METHOD_DECORATOR__IMPLICITLY_SET_BITS: - return implicitlySetBits != IMPLICITLY_SET_BITS_EDEFAULT; - case BeaninfoPackage.METHOD_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return implicitDecoratorFlag != IMPLICIT_DECORATOR_FLAG_EDEFAULT; - case BeaninfoPackage.METHOD_DECORATOR__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case BeaninfoPackage.METHOD_DECORATOR__PARMS_EXPLICIT_EMPTY: - return ((eFlags & PARMS_EXPLICIT_EMPTY_EFLAG) != 0) != PARMS_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.METHOD_DECORATOR__PARAMETER_DESCRIPTORS: - return !getParameterDescriptors().isEmpty(); - case BeaninfoPackage.METHOD_DECORATOR__SER_PARM_DESC: - return serParmDesc != null && !serParmDesc.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/MethodProxyImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/MethodProxyImpl.java deleted file mode 100644 index 48de7828f..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/MethodProxyImpl.java +++ /dev/null @@ -1,342 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: MethodProxyImpl.java,v $ - * $Revision: 1.7 $ $Date: 2005/08/24 20:31:29 $ - */ - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EOperationImpl; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.MethodProxy; -import org.eclipse.jem.java.Method; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Method Proxy</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.MethodProxyImpl#getMethod <em>Method</em>}</li> - * </ul> - * </p> - * - * @generated - */ - - -public class MethodProxyImpl extends EOperationImpl implements MethodProxy { - /** - * The cached value of the '{@link #getMethod() <em>Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getMethod() - * @generated - * @ordered - */ - protected Method method = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected MethodProxyImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getMethodProxy(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method getMethod() { - if (method != null && method.eIsProxy()) { - Method oldMethod = method; - method = (Method)eResolveProxy((InternalEObject)method); - if (method != oldMethod) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.METHOD_PROXY__METHOD, oldMethod, method)); - } - } - return method; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method basicGetMethod() { - return method; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMethod(Method newMethod) { - Method oldMethod = method; - method = newMethod; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.METHOD_PROXY__METHOD, oldMethod, method)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.METHOD_PROXY__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.METHOD_PROXY__ECONTAINING_CLASS: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.METHOD_PROXY__ECONTAINING_CLASS, msgs); - case BeaninfoPackage.METHOD_PROXY__EPARAMETERS: - return ((InternalEList)getEParameters()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.METHOD_PROXY__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.METHOD_PROXY__ECONTAINING_CLASS: - return eBasicSetContainer(null, BeaninfoPackage.METHOD_PROXY__ECONTAINING_CLASS, msgs); - case BeaninfoPackage.METHOD_PROXY__EPARAMETERS: - return ((InternalEList)getEParameters()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.METHOD_PROXY__ECONTAINING_CLASS: - return eContainer.eInverseRemove(this, EcorePackage.ECLASS__EOPERATIONS, EClass.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_PROXY__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.METHOD_PROXY__NAME: - return getName(); - case BeaninfoPackage.METHOD_PROXY__ORDERED: - return isOrdered() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_PROXY__UNIQUE: - return isUnique() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_PROXY__LOWER_BOUND: - return new Integer(getLowerBound()); - case BeaninfoPackage.METHOD_PROXY__UPPER_BOUND: - return new Integer(getUpperBound()); - case BeaninfoPackage.METHOD_PROXY__MANY: - return isMany() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_PROXY__REQUIRED: - return isRequired() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.METHOD_PROXY__ETYPE: - if (resolve) return getEType(); - return basicGetEType(); - case BeaninfoPackage.METHOD_PROXY__ECONTAINING_CLASS: - return getEContainingClass(); - case BeaninfoPackage.METHOD_PROXY__EPARAMETERS: - return getEParameters(); - case BeaninfoPackage.METHOD_PROXY__EEXCEPTIONS: - return getEExceptions(); - case BeaninfoPackage.METHOD_PROXY__METHOD: - if (resolve) return getMethod(); - return basicGetMethod(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_PROXY__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_PROXY__NAME: - setName((String)newValue); - return; - case BeaninfoPackage.METHOD_PROXY__ORDERED: - setOrdered(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_PROXY__UNIQUE: - setUnique(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.METHOD_PROXY__LOWER_BOUND: - setLowerBound(((Integer)newValue).intValue()); - return; - case BeaninfoPackage.METHOD_PROXY__UPPER_BOUND: - setUpperBound(((Integer)newValue).intValue()); - return; - case BeaninfoPackage.METHOD_PROXY__ETYPE: - setEType((EClassifier)newValue); - return; - case BeaninfoPackage.METHOD_PROXY__EPARAMETERS: - getEParameters().clear(); - getEParameters().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_PROXY__EEXCEPTIONS: - getEExceptions().clear(); - getEExceptions().addAll((Collection)newValue); - return; - case BeaninfoPackage.METHOD_PROXY__METHOD: - setMethod((Method)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_PROXY__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.METHOD_PROXY__NAME: - setName(NAME_EDEFAULT); - return; - case BeaninfoPackage.METHOD_PROXY__ORDERED: - setOrdered(ORDERED_EDEFAULT); - return; - case BeaninfoPackage.METHOD_PROXY__UNIQUE: - setUnique(UNIQUE_EDEFAULT); - return; - case BeaninfoPackage.METHOD_PROXY__LOWER_BOUND: - setLowerBound(LOWER_BOUND_EDEFAULT); - return; - case BeaninfoPackage.METHOD_PROXY__UPPER_BOUND: - setUpperBound(UPPER_BOUND_EDEFAULT); - return; - case BeaninfoPackage.METHOD_PROXY__ETYPE: - setEType((EClassifier)null); - return; - case BeaninfoPackage.METHOD_PROXY__EPARAMETERS: - getEParameters().clear(); - return; - case BeaninfoPackage.METHOD_PROXY__EEXCEPTIONS: - getEExceptions().clear(); - return; - case BeaninfoPackage.METHOD_PROXY__METHOD: - setMethod((Method)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.METHOD_PROXY__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.METHOD_PROXY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case BeaninfoPackage.METHOD_PROXY__ORDERED: - return ((eFlags & ORDERED_EFLAG) != 0) != ORDERED_EDEFAULT; - case BeaninfoPackage.METHOD_PROXY__UNIQUE: - return ((eFlags & UNIQUE_EFLAG) != 0) != UNIQUE_EDEFAULT; - case BeaninfoPackage.METHOD_PROXY__LOWER_BOUND: - return lowerBound != LOWER_BOUND_EDEFAULT; - case BeaninfoPackage.METHOD_PROXY__UPPER_BOUND: - return upperBound != UPPER_BOUND_EDEFAULT; - case BeaninfoPackage.METHOD_PROXY__MANY: - return isMany() != MANY_EDEFAULT; - case BeaninfoPackage.METHOD_PROXY__REQUIRED: - return isRequired() != REQUIRED_EDEFAULT; - case BeaninfoPackage.METHOD_PROXY__ETYPE: - return eType != null; - case BeaninfoPackage.METHOD_PROXY__ECONTAINING_CLASS: - return getEContainingClass() != null; - case BeaninfoPackage.METHOD_PROXY__EPARAMETERS: - return eParameters != null && !eParameters.isEmpty(); - case BeaninfoPackage.METHOD_PROXY__EEXCEPTIONS: - return eExceptions != null && !eExceptions.isEmpty(); - case BeaninfoPackage.METHOD_PROXY__METHOD: - return method != null; - } - return eDynamicIsSet(eFeature); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/ParameterDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/ParameterDecoratorImpl.java deleted file mode 100644 index 1033716e9..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/ParameterDecoratorImpl.java +++ /dev/null @@ -1,522 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 - *******************************************************************************/ -/* - * $RCSfile: ParameterDecoratorImpl.java,v $ - * $Revision: 1.11 $ $Date: 2005/09/19 15:43:02 $ - */ -package org.eclipse.jem.internal.beaninfo.impl; - - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; -import org.eclipse.jem.internal.beaninfo.ParameterDecorator; -import org.eclipse.jem.java.JavaParameter; -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Method Decorator</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.ParameterDecoratorImpl#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.ParameterDecoratorImpl#getParameter <em>Parameter</em>}</li> - * </ul> - * </p> - * - * @generated - */ - -public class ParameterDecoratorImpl extends FeatureDecoratorImpl implements ParameterDecorator{ - - /** - * Bits for implicitly set features. This is internal, not meant for clients. - */ - public static final long PARAMETER_NAME_IMPLICIT = 0x1L; - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected ParameterDecoratorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getParameterDecorator(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getName() { - return name; - } - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - /** - * The cached value of the '{@link #getParameter() <em>Parameter</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getParameter() - * @generated - * @ordered - */ - protected JavaParameter parameter = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PARAMETER_DECORATOR__NAME, oldName, name)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - - /* - * Flag for if we tried to link up this parameter to java parm. - */ - private boolean triedOnce; - - /** - * The JavaParameter that this ParameterDecorator is decorating. - */ - public JavaParameter getParameter() { - if (!eIsSet(BeaninfoPackage.eINSTANCE.getParameterDecorator_Parameter()) && !triedOnce) { - // Need to try to fill in the parameter setting. - triedOnce = true; - EObject container = eContainer(); // See if we are in a MethodDecorator. - if (container instanceof MethodDecoratorImpl) - ((MethodDecoratorImpl) container).initializeParameters(); - } - - return getParameterGen(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaParameter getParameterGen() { - if (parameter != null && parameter.eIsProxy()) { - JavaParameter oldParameter = parameter; - parameter = (JavaParameter)eResolveProxy((InternalEObject)parameter); - if (parameter != oldParameter) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.PARAMETER_DECORATOR__PARAMETER, oldParameter, parameter)); - } - } - return parameter; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaParameter basicGetParameter() { - return parameter; - } - - public void setParameter(JavaParameter newParameter) { - if (newParameter == null) - triedOnce = false; - setParameterGen(newParameter); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setParameterGen(JavaParameter newParameter) { - JavaParameter oldParameter = parameter; - parameter = newParameter; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PARAMETER_DECORATOR__PARAMETER, oldParameter, parameter)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.PARAMETER_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.PARAMETER_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.PARAMETER_DECORATOR__DETAILS: - return ((InternalEList)getDetails()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT: - return eBasicSetContainer(null, BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT, msgs); - case BeaninfoPackage.PARAMETER_DECORATOR__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT: - return eContainer.eInverseRemove(this, EcorePackage.EMODEL_ELEMENT__EANNOTATIONS, EModelElement.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PARAMETER_DECORATOR__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.PARAMETER_DECORATOR__SOURCE: - return getSource(); - case BeaninfoPackage.PARAMETER_DECORATOR__DETAILS: - return getDetails(); - case BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT: - return getEModelElement(); - case BeaninfoPackage.PARAMETER_DECORATOR__CONTENTS: - return getContents(); - case BeaninfoPackage.PARAMETER_DECORATOR__REFERENCES: - return getReferences(); - case BeaninfoPackage.PARAMETER_DECORATOR__DISPLAY_NAME: - return getDisplayName(); - case BeaninfoPackage.PARAMETER_DECORATOR__SHORT_DESCRIPTION: - return getShortDescription(); - case BeaninfoPackage.PARAMETER_DECORATOR__CATEGORY: - return getCategory(); - case BeaninfoPackage.PARAMETER_DECORATOR__EXPERT: - return isExpert() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PARAMETER_DECORATOR__HIDDEN: - return isHidden() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PARAMETER_DECORATOR__PREFERRED: - return isPreferred() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PARAMETER_DECORATOR__MERGE_INTROSPECTION: - return isMergeIntrospection() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return isAttributesExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICITLY_SET_BITS: - return new Long(getImplicitlySetBits()); - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return getImplicitDecoratorFlag(); - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES: - return getAttributes(); - case BeaninfoPackage.PARAMETER_DECORATOR__NAME: - return getName(); - case BeaninfoPackage.PARAMETER_DECORATOR__PARAMETER: - if (resolve) return getParameter(); - return basicGetParameter(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PARAMETER_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__SOURCE: - setSource((String)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__DETAILS: - getDetails().clear(); - getDetails().addAll((Collection)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__REFERENCES: - getReferences().clear(); - getReferences().addAll((Collection)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__SHORT_DESCRIPTION: - setShortDescription((String)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__CATEGORY: - setCategory((String)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__EXPERT: - setExpert(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__HIDDEN: - setHidden(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__PREFERRED: - setPreferred(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(((Long)newValue).longValue()); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag((ImplicitItem)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__NAME: - setName((String)newValue); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__PARAMETER: - setParameter((JavaParameter)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PARAMETER_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__DETAILS: - getDetails().clear(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)null); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__CONTENTS: - getContents().clear(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__REFERENCES: - getReferences().clear(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__DISPLAY_NAME: - unsetDisplayName(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__SHORT_DESCRIPTION: - unsetShortDescription(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__CATEGORY: - setCategory(CATEGORY_EDEFAULT); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__EXPERT: - unsetExpert(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__HIDDEN: - unsetHidden(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__PREFERRED: - unsetPreferred(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(MERGE_INTROSPECTION_EDEFAULT); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(IMPLICITLY_SET_BITS_EDEFAULT); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag(IMPLICIT_DECORATOR_FLAG_EDEFAULT); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__NAME: - setName(NAME_EDEFAULT); - return; - case BeaninfoPackage.PARAMETER_DECORATOR__PARAMETER: - setParameter((JavaParameter)null); - return; - } - eDynamicUnset(eFeature); - } - - /* (non-Javadoc) - * @see org.eclipse.emf.ecore.EObject#eIsSet(org.eclipse.emf.ecore.EStructuralFeature) - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PARAMETER_DECORATOR__SOURCE: - return isSourceSet(); // Override so that if set to the same as classname, then it is considered not set. - default: - return eIsSetGen(eFeature); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSetGen(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PARAMETER_DECORATOR__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.PARAMETER_DECORATOR__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case BeaninfoPackage.PARAMETER_DECORATOR__DETAILS: - return details != null && !details.isEmpty(); - case BeaninfoPackage.PARAMETER_DECORATOR__EMODEL_ELEMENT: - return getEModelElement() != null; - case BeaninfoPackage.PARAMETER_DECORATOR__CONTENTS: - return contents != null && !contents.isEmpty(); - case BeaninfoPackage.PARAMETER_DECORATOR__REFERENCES: - return references != null && !references.isEmpty(); - case BeaninfoPackage.PARAMETER_DECORATOR__DISPLAY_NAME: - return isSetDisplayName(); - case BeaninfoPackage.PARAMETER_DECORATOR__SHORT_DESCRIPTION: - return isSetShortDescription(); - case BeaninfoPackage.PARAMETER_DECORATOR__CATEGORY: - return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); - case BeaninfoPackage.PARAMETER_DECORATOR__EXPERT: - return isSetExpert(); - case BeaninfoPackage.PARAMETER_DECORATOR__HIDDEN: - return isSetHidden(); - case BeaninfoPackage.PARAMETER_DECORATOR__PREFERRED: - return isSetPreferred(); - case BeaninfoPackage.PARAMETER_DECORATOR__MERGE_INTROSPECTION: - return ((eFlags & MERGE_INTROSPECTION_EFLAG) != 0) != MERGE_INTROSPECTION_EDEFAULT; - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return ((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0) != ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICITLY_SET_BITS: - return implicitlySetBits != IMPLICITLY_SET_BITS_EDEFAULT; - case BeaninfoPackage.PARAMETER_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return implicitDecoratorFlag != IMPLICIT_DECORATOR_FLAG_EDEFAULT; - case BeaninfoPackage.PARAMETER_DECORATOR__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case BeaninfoPackage.PARAMETER_DECORATOR__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case BeaninfoPackage.PARAMETER_DECORATOR__PARAMETER: - return parameter != null; - } - return eDynamicIsSet(eFeature); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/PropertyDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/PropertyDecoratorImpl.java deleted file mode 100644 index 28bd6c7d7..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/PropertyDecoratorImpl.java +++ /dev/null @@ -1,1177 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.internal.beaninfo.impl; -/* - * $RCSfile: PropertyDecoratorImpl.java,v $ - * $Revision: 1.20 $ $Date: 2006/05/17 20:13:00 $ - */ - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.internal.beaninfo.BeaninfoPackage; -import org.eclipse.jem.internal.beaninfo.ImplicitItem; -import org.eclipse.jem.internal.beaninfo.PropertyDecorator; -import org.eclipse.jem.java.Field; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.Method; -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Property Decorator</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#isBound <em>Bound</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#isConstrained <em>Constrained</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#isDesignTime <em>Design Time</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#isAlwaysIncompatible <em>Always Incompatible</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#getFilterFlags <em>Filter Flags</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#isFieldReadOnly <em>Field Read Only</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#getPropertyEditorClass <em>Property Editor Class</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#getReadMethod <em>Read Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#getWriteMethod <em>Write Method</em>}</li> - * <li>{@link org.eclipse.jem.internal.beaninfo.impl.PropertyDecoratorImpl#getField <em>Field</em>}</li> - * </ul> - * </p> - * - * @generated - */ - - -public class PropertyDecoratorImpl extends FeatureDecoratorImpl implements PropertyDecorator{ - - /** - * Bits for implicitly set features. This is internal, not meant for clients. - */ - public static final long PROPERTY_EDITOR_CLASS_IMPLICIT = 0x1L; - public static final long PROPERTY_TYPE_IMPLICIT = 0x2L; - public static final long PROPERTY_READMETHOD_IMPLICIT = 0x4L; - public static final long PROPERTY_WRITEMETHOD_IMPLICIT = 0x8L; - public static final long PROPERTY_BOUND_IMPLICIT = 0x10L; - public static final long PROPERTY_CONSTRAINED_IMPLICIT = 0x20L; - public static final long PROPERTY_DESIGNTIME_IMPLICIT = 0x40L; - public static final long PROPERTY_FIELD_IMPLICIT = 0x80L; - - - /** - * The default value of the '{@link #isBound() <em>Bound</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isBound() - * @generated - * @ordered - */ - protected static final boolean BOUND_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isBound() <em>Bound</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isBound() - * @generated - * @ordered - */ - protected static final int BOUND_EFLAG = 1 << 18; - - /** - * The flag representing whether the Bound attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int BOUND_ESETFLAG = 1 << 19; - - /** - * The default value of the '{@link #isConstrained() <em>Constrained</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isConstrained() - * @generated - * @ordered - */ - protected static final boolean CONSTRAINED_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isConstrained() <em>Constrained</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isConstrained() - * @generated - * @ordered - */ - protected static final int CONSTRAINED_EFLAG = 1 << 20; - - /** - * The flag representing whether the Constrained attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int CONSTRAINED_ESETFLAG = 1 << 21; - - /** - * The default value of the '{@link #isDesignTime() <em>Design Time</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isDesignTime() - * @generated - * @ordered - */ - protected static final boolean DESIGN_TIME_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isDesignTime() <em>Design Time</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isDesignTime() - * @generated - * @ordered - */ - protected static final int DESIGN_TIME_EFLAG = 1 << 22; - - /** - * The flag representing whether the Design Time attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int DESIGN_TIME_ESETFLAG = 1 << 23; - - /** - * The default value of the '{@link #isAlwaysIncompatible() <em>Always Incompatible</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isAlwaysIncompatible() - * @generated - * @ordered - */ - protected static final boolean ALWAYS_INCOMPATIBLE_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isAlwaysIncompatible() <em>Always Incompatible</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isAlwaysIncompatible() - * @generated - * @ordered - */ - protected static final int ALWAYS_INCOMPATIBLE_EFLAG = 1 << 24; - - /** - * The cached value of the '{@link #getFilterFlags() <em>Filter Flags</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getFilterFlags() - * @generated - * @ordered - */ - protected EList filterFlags = null; - /** - * The default value of the '{@link #isFieldReadOnly() <em>Field Read Only</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isFieldReadOnly() - * @generated - * @ordered - */ - protected static final boolean FIELD_READ_ONLY_EDEFAULT = false; - - /** - * The flag representing the value of the '{@link #isFieldReadOnly() <em>Field Read Only</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isFieldReadOnly() - * @generated - * @ordered - */ - protected static final int FIELD_READ_ONLY_EFLAG = 1 << 25; - - /** - * The cached value of the '{@link #getPropertyEditorClass() <em>Property Editor Class</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getPropertyEditorClass() - * @generated - * @ordered - */ - protected JavaClass propertyEditorClass = null; - /** - * The cached value of the '{@link #getReadMethod() <em>Read Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getReadMethod() - * @generated - * @ordered - */ - protected Method readMethod = null; - /** - * The flag representing whether the Read Method reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int READ_METHOD_ESETFLAG = 1 << 26; - - /** - * The cached value of the '{@link #getWriteMethod() <em>Write Method</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getWriteMethod() - * @generated - * @ordered - */ - protected Method writeMethod = null; - - /** - * The flag representing whether the Write Method reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int WRITE_METHOD_ESETFLAG = 1 << 27; - - /** - * The cached value of the '{@link #getField() <em>Field</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getField() - * @generated - * @ordered - */ - protected Field field = null; - - /** - * The flag representing whether the Field reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected static final int FIELD_ESETFLAG = 1 << 28; - - /** - * This it the property type. If null, then it will - * query against model element owner. - * - * @since 1.2.0 - */ - protected EClassifier propertyType; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected PropertyDecoratorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return BeaninfoPackage.eINSTANCE.getPropertyDecorator(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isBound() { - return (eFlags & BOUND_EFLAG) != 0; - } - - public EClassifier getPropertyType() { - if (propertyType == null) { - EStructuralFeature feature = (EStructuralFeature) getEModelElement(); - return (feature != null) ? feature.getEType() : null; - } else - return propertyType; - } - - public void setPropertyType(EClassifier propertyType) { - this.propertyType = propertyType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setBound(boolean newBound) { - boolean oldBound = (eFlags & BOUND_EFLAG) != 0; - if (newBound) eFlags |= BOUND_EFLAG; else eFlags &= ~BOUND_EFLAG; - boolean oldBoundESet = (eFlags & BOUND_ESETFLAG) != 0; - eFlags |= BOUND_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__BOUND, oldBound, newBound, !oldBoundESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetBound() { - boolean oldBound = (eFlags & BOUND_EFLAG) != 0; - boolean oldBoundESet = (eFlags & BOUND_ESETFLAG) != 0; - if (BOUND_EDEFAULT) eFlags |= BOUND_EFLAG; else eFlags &= ~BOUND_EFLAG; - eFlags &= ~BOUND_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.PROPERTY_DECORATOR__BOUND, oldBound, BOUND_EDEFAULT, oldBoundESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetBound() { - return (eFlags & BOUND_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isConstrained() { - return (eFlags & CONSTRAINED_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setConstrained(boolean newConstrained) { - boolean oldConstrained = (eFlags & CONSTRAINED_EFLAG) != 0; - if (newConstrained) eFlags |= CONSTRAINED_EFLAG; else eFlags &= ~CONSTRAINED_EFLAG; - boolean oldConstrainedESet = (eFlags & CONSTRAINED_ESETFLAG) != 0; - eFlags |= CONSTRAINED_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__CONSTRAINED, oldConstrained, newConstrained, !oldConstrainedESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetConstrained() { - boolean oldConstrained = (eFlags & CONSTRAINED_EFLAG) != 0; - boolean oldConstrainedESet = (eFlags & CONSTRAINED_ESETFLAG) != 0; - if (CONSTRAINED_EDEFAULT) eFlags |= CONSTRAINED_EFLAG; else eFlags &= ~CONSTRAINED_EFLAG; - eFlags &= ~CONSTRAINED_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.PROPERTY_DECORATOR__CONSTRAINED, oldConstrained, CONSTRAINED_EDEFAULT, oldConstrainedESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetConstrained() { - return (eFlags & CONSTRAINED_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isDesignTime() { - return (eFlags & DESIGN_TIME_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setDesignTime(boolean newDesignTime) { - boolean oldDesignTime = (eFlags & DESIGN_TIME_EFLAG) != 0; - if (newDesignTime) eFlags |= DESIGN_TIME_EFLAG; else eFlags &= ~DESIGN_TIME_EFLAG; - boolean oldDesignTimeESet = (eFlags & DESIGN_TIME_ESETFLAG) != 0; - eFlags |= DESIGN_TIME_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__DESIGN_TIME, oldDesignTime, newDesignTime, !oldDesignTimeESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetDesignTime() { - boolean oldDesignTime = (eFlags & DESIGN_TIME_EFLAG) != 0; - boolean oldDesignTimeESet = (eFlags & DESIGN_TIME_ESETFLAG) != 0; - if (DESIGN_TIME_EDEFAULT) eFlags |= DESIGN_TIME_EFLAG; else eFlags &= ~DESIGN_TIME_EFLAG; - eFlags &= ~DESIGN_TIME_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.PROPERTY_DECORATOR__DESIGN_TIME, oldDesignTime, DESIGN_TIME_EDEFAULT, oldDesignTimeESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetDesignTime() { - return (eFlags & DESIGN_TIME_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isAlwaysIncompatible() { - return (eFlags & ALWAYS_INCOMPATIBLE_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setAlwaysIncompatible(boolean newAlwaysIncompatible) { - boolean oldAlwaysIncompatible = (eFlags & ALWAYS_INCOMPATIBLE_EFLAG) != 0; - if (newAlwaysIncompatible) eFlags |= ALWAYS_INCOMPATIBLE_EFLAG; else eFlags &= ~ALWAYS_INCOMPATIBLE_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE, oldAlwaysIncompatible, newAlwaysIncompatible)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getFilterFlags() { - if (filterFlags == null) { - filterFlags = new EDataTypeUniqueEList(String.class, this, BeaninfoPackage.PROPERTY_DECORATOR__FILTER_FLAGS); - } - return filterFlags; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isFieldReadOnly() { - return (eFlags & FIELD_READ_ONLY_EFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setFieldReadOnly(boolean newFieldReadOnly) { - boolean oldFieldReadOnly = (eFlags & FIELD_READ_ONLY_EFLAG) != 0; - if (newFieldReadOnly) eFlags |= FIELD_READ_ONLY_EFLAG; else eFlags &= ~FIELD_READ_ONLY_EFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__FIELD_READ_ONLY, oldFieldReadOnly, newFieldReadOnly)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass getPropertyEditorClass() { - if (propertyEditorClass != null && propertyEditorClass.eIsProxy()) { - JavaClass oldPropertyEditorClass = propertyEditorClass; - propertyEditorClass = (JavaClass)eResolveProxy((InternalEObject)propertyEditorClass); - if (propertyEditorClass != oldPropertyEditorClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS, oldPropertyEditorClass, propertyEditorClass)); - } - } - return propertyEditorClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setPropertyEditorClass(JavaClass newPropertyEditorClass) { - JavaClass oldPropertyEditorClass = propertyEditorClass; - propertyEditorClass = newPropertyEditorClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS, oldPropertyEditorClass, propertyEditorClass)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method getReadMethod() { - if (readMethod != null && readMethod.eIsProxy()) { - Method oldReadMethod = readMethod; - readMethod = (Method)eResolveProxy((InternalEObject)readMethod); - if (readMethod != oldReadMethod) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.PROPERTY_DECORATOR__READ_METHOD, oldReadMethod, readMethod)); - } - } - return readMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setReadMethod(Method newReadMethod) { - Method oldReadMethod = readMethod; - readMethod = newReadMethod; - boolean oldReadMethodESet = (eFlags & READ_METHOD_ESETFLAG) != 0; - eFlags |= READ_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__READ_METHOD, oldReadMethod, readMethod, !oldReadMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetReadMethod() { - Method oldReadMethod = readMethod; - boolean oldReadMethodESet = (eFlags & READ_METHOD_ESETFLAG) != 0; - readMethod = null; - eFlags &= ~READ_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.PROPERTY_DECORATOR__READ_METHOD, oldReadMethod, null, oldReadMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetReadMethod() { - return (eFlags & READ_METHOD_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method getWriteMethod() { - if (writeMethod != null && writeMethod.eIsProxy()) { - Method oldWriteMethod = writeMethod; - writeMethod = (Method)eResolveProxy((InternalEObject)writeMethod); - if (writeMethod != oldWriteMethod) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.PROPERTY_DECORATOR__WRITE_METHOD, oldWriteMethod, writeMethod)); - } - } - return writeMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setWriteMethod(Method newWriteMethod) { - Method oldWriteMethod = writeMethod; - writeMethod = newWriteMethod; - boolean oldWriteMethodESet = (eFlags & WRITE_METHOD_ESETFLAG) != 0; - eFlags |= WRITE_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__WRITE_METHOD, oldWriteMethod, writeMethod, !oldWriteMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetWriteMethod() { - Method oldWriteMethod = writeMethod; - boolean oldWriteMethodESet = (eFlags & WRITE_METHOD_ESETFLAG) != 0; - writeMethod = null; - eFlags &= ~WRITE_METHOD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.PROPERTY_DECORATOR__WRITE_METHOD, oldWriteMethod, null, oldWriteMethodESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetWriteMethod() { - return (eFlags & WRITE_METHOD_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Field getField() { - if (field != null && field.eIsProxy()) { - Field oldField = field; - field = (Field)eResolveProxy((InternalEObject)field); - if (field != oldField) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, BeaninfoPackage.PROPERTY_DECORATOR__FIELD, oldField, field)); - } - } - return field; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Field basicGetField() { - return field; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setField(Field newField) { - Field oldField = field; - field = newField; - boolean oldFieldESet = (eFlags & FIELD_ESETFLAG) != 0; - eFlags |= FIELD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, BeaninfoPackage.PROPERTY_DECORATOR__FIELD, oldField, field, !oldFieldESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetField() { - Field oldField = field; - boolean oldFieldESet = (eFlags & FIELD_ESETFLAG) != 0; - field = null; - eFlags &= ~FIELD_ESETFLAG; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, BeaninfoPackage.PROPERTY_DECORATOR__FIELD, oldField, null, oldFieldESet)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetField() { - return (eFlags & FIELD_ESETFLAG) != 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (bound: "); - if ((eFlags & BOUND_ESETFLAG) != 0) result.append((eFlags & BOUND_EFLAG) != 0); else result.append("<unset>"); - result.append(", constrained: "); - if ((eFlags & CONSTRAINED_ESETFLAG) != 0) result.append((eFlags & CONSTRAINED_EFLAG) != 0); else result.append("<unset>"); - result.append(", designTime: "); - if ((eFlags & DESIGN_TIME_ESETFLAG) != 0) result.append((eFlags & DESIGN_TIME_EFLAG) != 0); else result.append("<unset>"); - result.append(", alwaysIncompatible: "); - result.append((eFlags & ALWAYS_INCOMPATIBLE_EFLAG) != 0); - result.append(", filterFlags: "); - result.append(filterFlags); - result.append(", fieldReadOnly: "); - result.append((eFlags & FIELD_READ_ONLY_EFLAG) != 0); - result.append(')'); - return result.toString(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaClass basicGetPropertyEditorClass() { - return propertyEditorClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method basicGetReadMethod() { - return readMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Method basicGetWriteMethod() { - return writeMethod; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.PROPERTY_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case BeaninfoPackage.PROPERTY_DECORATOR__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.PROPERTY_DECORATOR__DETAILS: - return ((InternalEList)getDetails()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT: - return eBasicSetContainer(null, BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT, msgs); - case BeaninfoPackage.PROPERTY_DECORATOR__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT: - return eContainer.eInverseRemove(this, EcorePackage.EMODEL_ELEMENT__EANNOTATIONS, EModelElement.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PROPERTY_DECORATOR__EANNOTATIONS: - return getEAnnotations(); - case BeaninfoPackage.PROPERTY_DECORATOR__SOURCE: - return getSource(); - case BeaninfoPackage.PROPERTY_DECORATOR__DETAILS: - return getDetails(); - case BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT: - return getEModelElement(); - case BeaninfoPackage.PROPERTY_DECORATOR__CONTENTS: - return getContents(); - case BeaninfoPackage.PROPERTY_DECORATOR__REFERENCES: - return getReferences(); - case BeaninfoPackage.PROPERTY_DECORATOR__DISPLAY_NAME: - return getDisplayName(); - case BeaninfoPackage.PROPERTY_DECORATOR__SHORT_DESCRIPTION: - return getShortDescription(); - case BeaninfoPackage.PROPERTY_DECORATOR__CATEGORY: - return getCategory(); - case BeaninfoPackage.PROPERTY_DECORATOR__EXPERT: - return isExpert() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__HIDDEN: - return isHidden() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__PREFERRED: - return isPreferred() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__MERGE_INTROSPECTION: - return isMergeIntrospection() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return isAttributesExplicitEmpty() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - return new Long(getImplicitlySetBits()); - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return getImplicitDecoratorFlag(); - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES: - return getAttributes(); - case BeaninfoPackage.PROPERTY_DECORATOR__BOUND: - return isBound() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__CONSTRAINED: - return isConstrained() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__DESIGN_TIME: - return isDesignTime() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - return isAlwaysIncompatible() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__FILTER_FLAGS: - return getFilterFlags(); - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD_READ_ONLY: - return isFieldReadOnly() ? Boolean.TRUE : Boolean.FALSE; - case BeaninfoPackage.PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - if (resolve) return getPropertyEditorClass(); - return basicGetPropertyEditorClass(); - case BeaninfoPackage.PROPERTY_DECORATOR__READ_METHOD: - if (resolve) return getReadMethod(); - return basicGetReadMethod(); - case BeaninfoPackage.PROPERTY_DECORATOR__WRITE_METHOD: - if (resolve) return getWriteMethod(); - return basicGetWriteMethod(); - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD: - if (resolve) return getField(); - return basicGetField(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PROPERTY_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__SOURCE: - setSource((String)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__DETAILS: - getDetails().clear(); - getDetails().addAll((Collection)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__REFERENCES: - getReferences().clear(); - getReferences().addAll((Collection)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__SHORT_DESCRIPTION: - setShortDescription((String)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__CATEGORY: - setCategory((String)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__EXPERT: - setExpert(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__HIDDEN: - setHidden(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__PREFERRED: - setPreferred(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(((Long)newValue).longValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag((ImplicitItem)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__BOUND: - setBound(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__CONSTRAINED: - setConstrained(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__DESIGN_TIME: - setDesignTime(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - setAlwaysIncompatible(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__FILTER_FLAGS: - getFilterFlags().clear(); - getFilterFlags().addAll((Collection)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD_READ_ONLY: - setFieldReadOnly(((Boolean)newValue).booleanValue()); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - setPropertyEditorClass((JavaClass)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__READ_METHOD: - setReadMethod((Method)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__WRITE_METHOD: - setWriteMethod((Method)newValue); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD: - setField((Field)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PROPERTY_DECORATOR__EANNOTATIONS: - getEAnnotations().clear(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__DETAILS: - getDetails().clear(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT: - setEModelElement((EModelElement)null); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__CONTENTS: - getContents().clear(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__REFERENCES: - getReferences().clear(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__DISPLAY_NAME: - unsetDisplayName(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__SHORT_DESCRIPTION: - unsetShortDescription(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__CATEGORY: - setCategory(CATEGORY_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__EXPERT: - unsetExpert(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__HIDDEN: - unsetHidden(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__PREFERRED: - unsetPreferred(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__MERGE_INTROSPECTION: - setMergeIntrospection(MERGE_INTROSPECTION_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - setAttributesExplicitEmpty(ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - setImplicitlySetBits(IMPLICITLY_SET_BITS_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - setImplicitDecoratorFlag(IMPLICIT_DECORATOR_FLAG_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES: - getAttributes().clear(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__BOUND: - unsetBound(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__CONSTRAINED: - unsetConstrained(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__DESIGN_TIME: - unsetDesignTime(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - setAlwaysIncompatible(ALWAYS_INCOMPATIBLE_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__FILTER_FLAGS: - getFilterFlags().clear(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD_READ_ONLY: - setFieldReadOnly(FIELD_READ_ONLY_EDEFAULT); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - setPropertyEditorClass((JavaClass)null); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__READ_METHOD: - unsetReadMethod(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__WRITE_METHOD: - unsetWriteMethod(); - return; - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD: - unsetField(); - return; - } - eDynamicUnset(eFeature); - } - - /* (non-Javadoc) - * @see org.eclipse.emf.ecore.EObject#eIsSet(org.eclipse.emf.ecore.EStructuralFeature) - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PROPERTY_DECORATOR__SOURCE: - return isSourceSet(); // Override so that if set to the same as classname, then it is considered not set. - default: - return eIsSetGen(eFeature); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSetGen(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case BeaninfoPackage.PROPERTY_DECORATOR__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case BeaninfoPackage.PROPERTY_DECORATOR__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case BeaninfoPackage.PROPERTY_DECORATOR__DETAILS: - return details != null && !details.isEmpty(); - case BeaninfoPackage.PROPERTY_DECORATOR__EMODEL_ELEMENT: - return getEModelElement() != null; - case BeaninfoPackage.PROPERTY_DECORATOR__CONTENTS: - return contents != null && !contents.isEmpty(); - case BeaninfoPackage.PROPERTY_DECORATOR__REFERENCES: - return references != null && !references.isEmpty(); - case BeaninfoPackage.PROPERTY_DECORATOR__DISPLAY_NAME: - return isSetDisplayName(); - case BeaninfoPackage.PROPERTY_DECORATOR__SHORT_DESCRIPTION: - return isSetShortDescription(); - case BeaninfoPackage.PROPERTY_DECORATOR__CATEGORY: - return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); - case BeaninfoPackage.PROPERTY_DECORATOR__EXPERT: - return isSetExpert(); - case BeaninfoPackage.PROPERTY_DECORATOR__HIDDEN: - return isSetHidden(); - case BeaninfoPackage.PROPERTY_DECORATOR__PREFERRED: - return isSetPreferred(); - case BeaninfoPackage.PROPERTY_DECORATOR__MERGE_INTROSPECTION: - return ((eFlags & MERGE_INTROSPECTION_EFLAG) != 0) != MERGE_INTROSPECTION_EDEFAULT; - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES_EXPLICIT_EMPTY: - return ((eFlags & ATTRIBUTES_EXPLICIT_EMPTY_EFLAG) != 0) != ATTRIBUTES_EXPLICIT_EMPTY_EDEFAULT; - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICITLY_SET_BITS: - return implicitlySetBits != IMPLICITLY_SET_BITS_EDEFAULT; - case BeaninfoPackage.PROPERTY_DECORATOR__IMPLICIT_DECORATOR_FLAG: - return implicitDecoratorFlag != IMPLICIT_DECORATOR_FLAG_EDEFAULT; - case BeaninfoPackage.PROPERTY_DECORATOR__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case BeaninfoPackage.PROPERTY_DECORATOR__BOUND: - return isSetBound(); - case BeaninfoPackage.PROPERTY_DECORATOR__CONSTRAINED: - return isSetConstrained(); - case BeaninfoPackage.PROPERTY_DECORATOR__DESIGN_TIME: - return isSetDesignTime(); - case BeaninfoPackage.PROPERTY_DECORATOR__ALWAYS_INCOMPATIBLE: - return ((eFlags & ALWAYS_INCOMPATIBLE_EFLAG) != 0) != ALWAYS_INCOMPATIBLE_EDEFAULT; - case BeaninfoPackage.PROPERTY_DECORATOR__FILTER_FLAGS: - return filterFlags != null && !filterFlags.isEmpty(); - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD_READ_ONLY: - return ((eFlags & FIELD_READ_ONLY_EFLAG) != 0) != FIELD_READ_ONLY_EDEFAULT; - case BeaninfoPackage.PROPERTY_DECORATOR__PROPERTY_EDITOR_CLASS: - return propertyEditorClass != null; - case BeaninfoPackage.PROPERTY_DECORATOR__READ_METHOD: - return isSetReadMethod(); - case BeaninfoPackage.PROPERTY_DECORATOR__WRITE_METHOD: - return isSetWriteMethod(); - case BeaninfoPackage.PROPERTY_DECORATOR__FIELD: - return isSetField(); - } - return eDynamicIsSet(eFeature); - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#isWriteable() - */ - public boolean isWriteable() { - return getWriteMethod() != null || (getField() != null && !isFieldReadOnly()); - } - - /* (non-Javadoc) - * @see org.eclipse.jem.internal.beaninfo.PropertyDecorator#isReadable() - */ - public boolean isReadable() { - return getReadMethod() != null || getField() != null; - } - - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/beaninfo/common/IBaseBeanInfoConstants.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/beaninfo/common/IBaseBeanInfoConstants.java deleted file mode 100644 index 6e137e40c..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/beaninfo/common/IBaseBeanInfoConstants.java +++ /dev/null @@ -1,155 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 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 - *******************************************************************************/ -/* - * $RCSfile: IBaseBeanInfoConstants.java,v $ - * $Revision: 1.5 $ $Date: 2006/05/17 20:13:00 $ - */ -package org.eclipse.jem.beaninfo.common; - - - -/** - * Constants for the BaseBeanInfo for arguments. This class is common between - * the IDE and the remote vm so that these constants can be used on both sides. - * <p> - * These are constants used in FeatureAttributes as keys. The other special - * constants that are not keys in FeatureAttributes are left in BaseBeanInfo - * since they are not needed on both sides. - * - * @since 1.2.0 - */ -public interface IBaseBeanInfoConstants { - - /** - * Indicator used to describe a factory instantiation pattern. - * <p> - * This will be on the attributes of the BeanDescriptor for the factory class. It will be complete, in that if this - * factory is inherited from another factory, it must copy in the superclass's factory attribute. They won't be - * automatically merged. - * <p> - * The format is an Object[][]. The first dimension at index zero is for toolkit wide information and then indexes one and beyond are one for each creation method name. The second dimension is for one entry - * of classwide data and the rest are the data for - * each creation method. - * <p> - * The first entry at Object[0] will be <code>{initString, isShared, onFreeform}</code> where: - * <dl> - * <dt>initString - * <dd>The init string that should be used to create an instance of the toolkit if it needs one, or <code>null</code> if it doesn't - * need one (i.e. all static) or if the default constructor should be used. - * This is used when a component is dropped from the palette that is for a toolkit component. - * <dt>isShared - * <dd><code>false</code> if each call to the creation method should have a new instance of the toolkit. This means that the toolkit manages only - * one instance. This is more like a controller than a toolkit in this case. <code>true</code> if it should - * try to reuse the toolkit of the parent if it has one, or any other found toolkit of the same type, (i.e. a subtype will be acceptable). - * This is used when a component is dropped from the palette that is for a toolkit component. - * <dt>onFreeform - * <dd><code>true</code> if the toolkit is created that it should appear on the freeform surface to be selectable. This would be of use - * if the toolkit had properties that need to be set. If the toolkit had no properties then it doesn't need to be selectable and should - * not be on the freeform. Use <code>false</code> in that case. - * </dl> - * <p> - * The second and other entries of the array are of the format: - * <code>{methodName, returnedClassname, isStatic, Object[], ...}</code> where: - * <dl> - * <dt>methodName - * <dd>The name of the creation method this entry is for (String). - * <dt>returnedClassname - * <dd>The name of the class that is created and returned from the method (String). - * <dt>isStatic - * <dd><code>Boolean.TRUE</code> if the method is a static method, <code>Boolean.FALSE</code> if not. - * This is used when a component is dropped from the palette that is for a toolkit component. - * <dt>Object[] - * <dd>Zero or more arrays. The array contains the name of the properties for each method signature that each - * respective argument is for, or <code>null</code> if that arg is not a property. There can be more than one array if there - * is more than one factory method of the same name, and returns the same type, but what is different is only the number of arguments. - * If there is a - * factory method that has no properties as arguments or has no arguments, don't include an array for it. For example if there was only one factory method and it had no - * arguments then there would not be any arrays. - * Currently cannot handle where more than one method has the same number of arguments but different types for the arguments. - * </dl> - * <p> - * A example is: - * <pre><code> - * new Object[][] { - * {"new a.b.c.Toolkit(\"ABC\")", Boolean.TRUE, Boolean.FALSE}, - * {"createButton", "a.b.c.Button", Boolean.FALSE, new Object[] {"parent", "text"}, new Object[] {"parent"}} - * } - * </code> - * </pre> - * <p> - * This example says that this class is toolkit (factory). To construct an instead use <code>"new a.b.c.Toolkit(\"ABC\")"</code> and it is shared - * with other objects created from this factory instance. Also, the factory method is "createButton", returns an "a.b.c.Button", and it is - * not a static call (i.e. use a toolkit instance to create it). It has two forms of factory methods. One is two arguments where the first - * arg is the parent property and the second arg is the text property. The other form has only one argument, the parent property. - * <p> - * The way this is used in a palette entry to drop a new object that a toolkit can create is to have an expression of the form - * <code>{toolkit:classname}.factorymethod(args)</code>. So for the above example it would be <code>{toolkit:a.b.c.Toolkit}.createButton(parent)</code>. - * The classname <b>must</b> be fully-qualified and if an inner class it must use the "$" instead of "." for the name, i.e. a.b.c.Toolkit.InnerFactory - * would be a.b.c.Toolkit$InnerFactory. - * <p> - * <b>NOTE:</b> This is an EXPERIMENTAL API and can change in the future until committed. - * - * @since 1.2.0 - */ - public static final String FACTORY_CREATION = "FACTORY_CREATION";//$NON-NLS-1$ - - /** - * Category indicator for apply property arguments. Category is a pre-defined attribute name too. That is where the category is stored in a - * descriptor. - * - * @since 1.1.0 - */ - public static final String CATEGORY = "category"; //$NON-NLS-1$ - - /** - * Enumeration values indicator for apply property arguments. Enumeration values is a pre-defined attribute name too. That is where the - * enumeration values are stored. - * - * @since 1.1.0 - */ - public static final String ENUMERATIONVALUES = "enumerationValues";//$NON-NLS-1$ - - // The keys for icon file names, NOT THE java.awt.icon key. - public static final String ICONCOLOR16X16URL = "ICON_COLOR_16x16_URL"; //$NON-NLS-1$ - public static final String ICONCOLOR32X32URL = "ICON_COLOR_32x32_URL"; //$NON-NLS-1$ // Not used - public static final String ICONMONO16X16URL = "ICON_MONO_16x16_URL"; //$NON-NLS-1$ // Not used - public static final String ICONMONO32X32URL = "ICON_MONO_32x32_URL"; //$NON-NLS-1$ // Not used - - - /** - * FeatureAttribute key for explicit property changes. The value is a Boolean. <code>true</code> - * indicates that the Customize Bean customizer supplied by the BeanInfo will indicate which - * properties it has changed through firing {@link java.beans.PropertyChangeEvent} instead of the - * Visual Editor automatically trying to determine the set of changed properties. - * <p> - * The default if not set is <code>false</code>. - * - * @since 1.1.0.1 - */ - public static final String EXPLICIT_PROPERTY_CHANGE = "EXPLICIT_PROPERTY_CHANGE"; //$NON-NLS-1$ - - /** - * Used by Visual Editor as feature attribute key/value to indicate that it must create an implicit setting of a property(s). - * For example {@link javax.swing.JFrame#getContentPane()}. There must be a content pane - * set in the VE model so that users can drop the components on it. Setting this here - * means that the default content pane from the JFrame will show up in the editor to use. - * <p> - * This should be used with care in that not all properties are required to always show up. - * They can be queried when needed. - * <p> - * The value can be either a {@link String} for one property. Or it can be a {@link String[]} for more - * than one property. - * - * @since 1.2.0 - */ - public static final String REQUIRED_IMPLICIT_PROPERTIES = "requiredImplicitProperties"; //$NON-NLS-1$ - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/BeanRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/BeanRecord.java deleted file mode 100644 index d2eb5c2a1..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/BeanRecord.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: BeanRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - - -/** - * This is the data structure for sending the BeanDescriptor info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the BeanDescriptor. - * @since 1.1.0 - */ -public class BeanRecord extends FeatureRecord { - - private static final long serialVersionUID = 1105979920664L; - - public String customizerClassName; - public boolean mergeInheritedProperties; - public boolean mergeInheritedOperations; - public boolean mergeInheritedEvents; - /** - * Names of properties that are to not be inherited in getAllProperties(). It is set only - * if the list is not the full list of inherited properties. - * If all inherited or mergeInheritedProperties is false, then the field will be <code>null</code>. Save space that way. - */ - public String[] notInheritedPropertyNames; - /** - * Names of operations that are to not be inherited in getEAllOperations(). It is set only - * if the list is not the full list of inherited operations. - * If all are inherited or if mergeInheritedOperations is false, then the field will be <code>null</code>. Save space that way. - */ - public String[] notInheritedOperationNames; - /** - * Names of events that are to not be inherited in getAllEvents(). It is set only - * if the list is not the full list of inherited events. - * If all are inherited or if mergeInheritedEvents is false, then the field will be <code>null</code>. Save space that way. - */ - public String[] notInheritedEventNames; - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/EventSetRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/EventSetRecord.java deleted file mode 100644 index e0f47e7df..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/EventSetRecord.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: EventSetRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - - -/** - * This is the data structure for sending the EventSetDescriptor info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the EventSetDescriptor. - * @since 1.1.0 - */ -public class EventSetRecord extends FeatureRecord { - - private static final long serialVersionUID = 1105980773420L; - - public ReflectMethodRecord addListenerMethod; - public String eventAdapterClassName; - public MethodRecord[] listenerMethodDescriptors; - public String listenerTypeName; - public ReflectMethodRecord removeListenerMethod; - public boolean inDefaultEventSet; - public boolean unicast; -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/FeatureAttributeValue.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/FeatureAttributeValue.java deleted file mode 100644 index 3e45deca8..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/FeatureAttributeValue.java +++ /dev/null @@ -1,785 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 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 - *******************************************************************************/ -/* - * $RCSfile: FeatureAttributeValue.java,v $ - * $Revision: 1.11 $ $Date: 2006/05/17 20:13:00 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - -import java.io.*; -import java.lang.reflect.*; -import java.util.Arrays; -import java.util.logging.Level; -import java.util.regex.Pattern; - -import org.eclipse.jem.internal.proxy.common.MapTypes; - - - -/** - * This is the value for a FeatureAttribute. It wrappers the true java object. - * Use the getObject method to get the java value. - * <p> - * We can only represent Strings, primitives, and arrays. (Primitives will converted - * to their wrapper class (e.g. Long), and byte, short, and int will move up to Long, - * and float will move up to Double). And any kind of valid array on the java BeanInfo side - * will be converted to an Object array on the IDE side. We don't have the capability to allow more complex objects - * because the IDE may not have the necessary classes available to it that - * the BeanInfo may of had available to it. Invalid objects will be represented - * by the singleton instance of {@link org.eclipse.jem.internal.beaninfo.common.InvalidObject}. - * <p> - * <b>Note:</b> - * Class objects that are values of Feature attributes on the java BeanInfo side will be - * converted to simple strings containing the classname when moved to the client (IDE) side. - * That is because the classes probably will not be available on the IDE side, but can be - * used to reconstruct the class when used back on the java vm side. - * @since 1.1.0 - */ -public class FeatureAttributeValue implements Serializable { - - private transient Object value; - private transient Object internalValue; - private boolean implicitValue; - private static final long serialVersionUID = 1105717634844L; - - /** - * Create the value with the given init string. - * <p> - * This is not meant to be used by clients. - * @param initString - * - * @since 1.1.0 - */ - public FeatureAttributeValue(String initString) { - // Use the init string to create the value. This is our - // own short-hand for this. - if (initString.startsWith(IMPLICIT)) { - setImplicitValue(true); - initString = initString.substring(IMPLICIT.length()); - } - value = parseString(initString); - } - - /** - * This is used when customer wants to fluff one up. - * - * - * @since 1.1.0 - */ - public FeatureAttributeValue() { - - } - - /** - * @return Returns the value. - * - * @since 1.1.0 - */ - public Object getValue() { - return value; - } - - /** - * Set a value. - * @param value The value to set. - * @since 1.1.0 - */ - public void setValue(Object value) { - this.value = value; - this.setInternalValue(null); - } - - /** - * Set the internal value. - * @param internalValue The internalValue to set. - * - * @since 1.1.0 - */ - public void setInternalValue(Object internalValue) { - this.internalValue = internalValue; - } - - /** - * This is the internal value. It is the <code>value</code> massaged into an easier to use form - * in the IDE. It will not be serialized out. It will not be reconstructed from an init string. - * <p> - * It does not need to be used. It will be cleared if - * a new value is set. For example, if the value is a complicated array (because you can't have - * special classes in the attribute value on the BeanInfo side) the first usage of this value can - * be translated into an easier form to use, such as a map. - * - * @return Returns the internalValue. - * - * @since 1.1.0 - */ - public Object getInternalValue() { - return internalValue; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() { - if (value == null) - return super.toString(); - StringBuffer out = new StringBuffer(100); - if (isImplicitValue()) - out.append(IMPLICIT); - makeString(value, out); - return out.toString(); - } - - - /** - * Helper method to take the object and turn it into the - * string form that is required for EMF serialization. - * <p> - * This is used internally. It can be used for development - * purposes by clients, but they would not have any real - * runtime need for this. - * <p> - * Output format would be (there won't be any newlines in the actual string) - * <pre> - * String: "zxvzxv" - * Number: number - * Boolean: true or false - * Character: 'c' - * null: null - * - * Array: (all arrays will be turned into Object[]) - * [dim]{e1, e2} - * [dim1][dim2]{[dim1a]{e1, e2}, [dim2a]{e3, e4}} - * where en are objects that follow the pattern for single output above. - * - * Any invalid object (i.e. not one of the ones we handle) will be: - * INV - * - * Arrays of invalid types (not Object, String, Number, Boolean, Character, - * or primitives) will be marked as INV. - * </pre> - * @param value - * @return serialized form as a string. - * - * @since 1.1.0 - */ - public static String makeString(Object value) { - StringBuffer out = new StringBuffer(100); - makeString(value, out); - return out.toString(); - } - - private static final Pattern QUOTE = Pattern.compile("\""); // Pattern for searching for double-quote. Make it static so don't waste time compiling each time. //$NON-NLS-1$ - private static final String NULL = "null"; // Output string for null //$NON-NLS-1$ - private static final String INVALID = "INV"; // Invalid object flag. //$NON-NLS-1$ - private static final String IMPLICIT = "implicit,"; // Implicit flag. //$NON-NLS-1$ - - /* - * Used for recursive building of the string. - */ - private static void makeString(Object value, StringBuffer out) { - if (value == null) - out.append(NULL); - else if (value instanceof String || value instanceof Class) { - // String: "string" or "string\"stringend" if str included a double-quote. - out.append('"'); - // If class, turn value into the classname. - String str = value instanceof String ? (String) value : ((Class) value).getName(); - if (str.indexOf('"') != -1) { - // Replace double-quote with escape double-quote so we can distinquish it from the terminating double-quote. - out.append(QUOTE.matcher(str).replaceAll("\\\\\"")); // Don't know why we need the back-slash to be doubled for replaceall, but it doesn't work otherwise. //$NON-NLS-1$ - } else - out.append(str); - out.append('\"'); - } else if (value instanceof Number) { - // Will go out as either a integer number or a floating point number. - // When read back in it will be either a Long or a Double. - out.append(value); - } else if (value instanceof Boolean) { - // It will go out as either true or false. - out.append(value); - } else if (value instanceof Character) { - // Character: 'c' or '\'' if char was a quote. - out.append('\''); - Character c = (Character) value; - if (c.charValue() != '\'') - out.append(c.charValue()); - else - out.append("\\'"); //$NON-NLS-1$ - out.append('\''); - } else if (value.getClass().isArray()) { - // Handle array format. - Class type = value.getClass(); - // See if final type is a valid type. - Class ft = type.getComponentType(); - int dims = 1; - while (ft.isArray()) { - dims++; - ft = ft.getComponentType(); - } - if (ft == Object.class || ft == String.class || ft == Boolean.class || ft == Character.class || ft.isPrimitive() || Number.class.isAssignableFrom(ft)) { - // [length][][] {....} - out.append('['); - int length = Array.getLength(value); - out.append(length); - out.append(']'); - while(--dims > 0) { - out.append("[]"); //$NON-NLS-1$ - } - out.append('{'); - for (int i=0; i < length; i++) { - if (i != 0) - out.append(','); - makeString(Array.get(value, i), out); - } - out.append('}'); - } else - out.append(INVALID); // Any other kind of array is invalid. - } else { - out.append(INVALID); - } - } - - - /** - * Helper method to take the string input from EMF serialization and turn it - * into an Object. - * <p> - * This is used internally. It can be used for development - * purposes by clients, but they would not have any real - * runtime need for this. - * <p> - * The object will be an object, null, or an Object array. Any value - * that is invalid will be set to the {@link InvalidObject#INSTANCE} static - * instance. - * - * @param input - * @return object decoded from the input. - * - * @see #makeString(Object) - * @since 1.1.0 - */ - public static Object parseString(String input) { - return parseString(new StringParser(input)); - } - - private static class StringParser { - private int next=0; - private int length; - private String input; - - public StringParser(String input) { - this.input = input; - this.length = input.length(); - } - - public String toString() { - return "StringParser: \""+input+'"'; //$NON-NLS-1$ - } - - public void skipWhitespace() { - while(next < length) { - if (!Character.isWhitespace(input.charAt(next++))) { - next--; // Put it back as not yet read since it is not whitespace. - break; - } - } - } - - /** - * Return the next index - * @return - * - * @since 1.1.0 - */ - public int nextIndex() { - return next; - } - - /** - * Get the length of the input - * @return input length - * - * @since 1.1.0 - */ - public int getLength() { - return length; - } - - - /** - * Read the current character and go to next. - * @return current character - * - * @since 1.1.0 - */ - public char read() { - return next<length ? input.charAt(next++) : 0; - } - - /** - * Backup the parser one character. - * - * - * @since 1.1.0 - */ - public void backup() { - if (--next < 0) - next = 0; - } - - /** - * Peek at the char at the next index, but don't increment afterwards. - * @return - * - * @since 1.1.0 - */ - public char peek() { - return next<length ? input.charAt(next) : 0; - } - - /** - * Have we read the last char. - * @return <code>true</code> if read last char. - * - * @since 1.1.0 - */ - public boolean atEnd() { - return next>=length; - } - - /** - * Reset to the given next index. - * @param nextIndex the next index to do a read at. - * - * @since 1.1.0 - */ - public void reset(int nextIndex) { - if (nextIndex<=length) - next = nextIndex; - else - next = length; - } - - /** - * Skip the next number of chars. - * @param skip number of chars to skip. - * - * @since 1.1.0 - */ - public void skip(int skip) { - if ((next+=skip) > length) - next = length; - } - - /** - * Return the string input. - * @return the string input - * - * @since 1.1.0 - */ - public String getInput() { - return input; - } - - } - - /* - * Starting a parse for an object at the given index. - * Return the parsed object or InvalidObject if no - * object or if there was an error parsing. - */ - private static Object parseString(StringParser parser) { - parser.skipWhitespace(); - if (!parser.atEnd()) { - char c = parser.read(); - switch (c) { - case '"': - // Start of a quoted string. Scan for closing quote, ignoring escaped quotes. - int start = parser.nextIndex(); // Index of first char after '"' - char[] dequoted = null; // Used if there is an escaped quote. That is the only thing we support escape on, quotes. - int dequoteIndex = 0; - while (!parser.atEnd()) { - char cc = parser.read(); - if (cc == '"') { - // If we didn't dequote, then just do substring. - if (dequoted == null) - return parser.getInput().substring(start, parser.nextIndex()-1); // next is char after '"', so end of string index is index of '"' - else { - // We have a dequoted string. So turn into a string. - // Gather the last group - int endNdx = parser.nextIndex()-1; - parser.getInput().getChars(start, endNdx, dequoted, dequoteIndex); - dequoteIndex+= (endNdx-start); - return new String(dequoted, 0, dequoteIndex); - } - } else if (cc == '\\') { - // We had an escape, see if next is a quote. If it is we need to strip out the '\'. - if (parser.peek() == '"') { - if (dequoted == null) { - dequoted = new char[parser.getLength()]; - } - int endNdx = parser.nextIndex()-1; - parser.getInput().getChars(start, endNdx, dequoted, dequoteIndex); // Get up to, but not including '\' - dequoteIndex+= (endNdx-start); - // Now also add in the escaped quote. - dequoted[dequoteIndex++] = parser.read(); - start = parser.nextIndex(); // Next group is from next index. - } - } - } - break; // If we got here, it is invalid. - - case '-': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - // Possible number. - // Scan to next non-digit, or not part of valid number. - boolean numberComplete = false; - boolean floatType = false; - boolean foundE = false; - boolean foundESign = false; - start = parser.nextIndex()-1; // We want to include the sign or first digit in the number. - while (!parser.atEnd() && !numberComplete) { - char cc = parser.read(); - switch (cc) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - break; // This is good, go on. - case '.': - if (floatType) - return InvalidObject.INSTANCE; // We already found a '.', two are invalid. - floatType = true; - break; - case 'e': - case 'E': - if (foundE) - return InvalidObject.INSTANCE; // We already found a 'e', two are invalid. - foundE = true; - floatType = true; // An 'e' makes it a float, if not already. - break; - case '+': - case '-': - if (!foundE || foundESign) - return InvalidObject.INSTANCE; // A +/- with no 'e' first is invalid. Or more than one sign. - foundESign = true; - break; - default: - // Anything else is end of number. - parser.backup(); // Back it up so that next parse will start with this char. - numberComplete = true; // So we stop scanning - break; - } - } - try { - if (!floatType) - return Long.valueOf(parser.getInput().substring(start, parser.nextIndex())); - else - return Double.valueOf(parser.getInput().substring(start, parser.nextIndex())); - } catch (NumberFormatException e) { - } - break; // If we got here, it is invalid. - - case 't': - case 'T': - case 'f': - case 'F': - // Possible boolean. - if (parser.getInput().regionMatches(true, parser.nextIndex()-1, "true", 0, 4)) { //$NON-NLS-1$ - parser.skip(3); // Skip over rest of string. - return Boolean.TRUE; - } else if (parser.getInput().regionMatches(true, parser.nextIndex()-1, "false", 0, 5)) { //$NON-NLS-1$ - parser.skip(4); // Skip over rest of string. - return Boolean.FALSE; - } - break; // If we got here, it is invalid. - - case '\'': - // Possible character - char cc = parser.read(); - // We really only support '\\' and '\'' anything else will be treated as ignore '\' because we don't know handle full escapes. - if (cc == '\\') - cc = parser.read(); // Get what's after it. - else if (cc == '\'') - break; // '' is invalid. - if (parser.peek() == '\'') { - // So next char after "character" is is a quote. This is good. - parser.read(); // Now consume the quote - return new Character(cc); - } - break; // If we got here, it is invalid. - - case 'n': - // Possible null. - if (parser.getInput().regionMatches(parser.nextIndex()-1, "null", 0, 4)) { //$NON-NLS-1$ - parser.skip(3); // Skip over rest of string. - return null; - } - break; // If we got here, it is invalid. - - case 'I': - // Possible invalid value. - if (parser.getInput().regionMatches(parser.nextIndex()-1, INVALID, 0, INVALID.length())) { - parser.skip(INVALID.length()-1); // Skip over rest of string. - return InvalidObject.INSTANCE; - } - break; // If we got here, it is invalid. - - case '[': - // Possible array. - // The next field should be a number, so we'll use parseString to get the number. - Object size = parseString(parser); - if (size instanceof Long) { - parser.skipWhitespace(); - cc = parser.read(); // Se if next is ']' - if (cc == ']') { - // Good, well-formed first dimension - int dim = 1; - boolean valid = true; - // See if there are more of just "[]". the number of them is the dim. - while (true) { - parser.skipWhitespace(); - cc = parser.read(); - if (cc == '[') { - parser.skipWhitespace(); - cc = parser.read(); - if (cc == ']') - dim++; - else { - // This is invalid. - valid = false; - parser.backup(); - break; // No more dims. - } - } else { - parser.backup(); - break; // No more dims. - } - } - if (valid) { - parser.skipWhitespace(); - cc = parser.read(); - if (cc == '{') { - // Good, we're at the start of the initialization code. - int[] dims = new int[dim]; - int len = ((Long) size).intValue(); - dims[0] = len; - Object array = Array.newInstance(Object.class, dims); - Arrays.fill((Object[]) array, null); // Because newInstance used above fills the array created with empty arrays when a dim>1. - - // Now we start filling it in. - Object invSetting = null; // What we will use for the invalid setting. If this is a multidim, this needs to be an array. Will not create it until needed. - Object entry = parseString(parser); // Get the first entry - Class compType = array.getClass().getComponentType(); - int i = -1; - while (true) { - if (++i < len) { - if (compType.isInstance(entry)) { - // Good, it can be assigned. - Array.set(array, i, entry); - } else { - // Bad. Need to set invalid. - if (invSetting == null) { - // We haven't created it yet. - if (dim == 1) - invSetting = InvalidObject.INSTANCE; // Great, one dimensional, we can use invalid directly - else { - // Multi-dim. Need to create a valid array that we can set. - int[] invDims = new int[dim - 1]; - Arrays.fill(invDims, 1); // Length one all of the way so that the final component can be invalid object - invSetting = Array.newInstance(Object.class, invDims); - Object finalEntry = invSetting; // Final array (with component type of just Object). Start with the full array and work down. - for (int j = invDims.length - 1; j > 0; j--) { - finalEntry = Array.get(finalEntry, 0); - } - Array.set(finalEntry, 0, InvalidObject.INSTANCE); - } - } - Array.set(array, i, invSetting); - } - } - - parser.skipWhitespace(); - cc = parser.read(); - if (cc == ',') { - // Good, get next - entry = parseString(parser); - } else if (cc == '}') { - // Good, reached the end. - break; - } else { - if (!parser.atEnd()) { - parser.backup(); - entry = parseString(parser); // Technically this should be invalid, but we'll let a whitespace also denote next entry. - } else { - // It's really screwed up. The string just ended. Log it. - Exception e = new IllegalStateException(parser.toString()); - try { - // See if Beaninfo plugin is available (we are running under eclipse). If so, use it, else just print to error. - // We may be in the remote vm and so it won't be available. - Class biPluginClass = Class.forName("org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin"); //$NON-NLS-1$ - Method getPlugin = biPluginClass.getMethod("getPlugin", null); //$NON-NLS-1$ - Method getLogger = biPluginClass.getMethod("getLogger", null); //$NON-NLS-1$ - Method log = getLogger.getReturnType().getMethod("log", new Class[] {Throwable.class, Level.class}); //$NON-NLS-1$ - Object biPlugin = getPlugin.invoke(null, null); - Object logger = getLogger.invoke(biPlugin, null); - log.invoke(logger, new Object[] {e, Level.WARNING}); - return InvalidObject.INSTANCE; - } catch (SecurityException e1) { - } catch (IllegalArgumentException e1) { - } catch (ClassNotFoundException e1) { - } catch (NoSuchMethodException e1) { - } catch (IllegalAccessException e1) { - } catch (InvocationTargetException e1) { - } catch (NullPointerException e1) { - } - e.printStackTrace(); // Not in eclipse, so just print stack trace. - return InvalidObject.INSTANCE; - } - } - } - - return array; - } - } - } - } - break; // If we got here, it is invalid. - } - } - return InvalidObject.INSTANCE; - } - - private void writeObject(ObjectOutputStream out) throws IOException { - // Write out any hidden stuff - out.defaultWriteObject(); - writeObject(value, out); - } - - private void writeObject(Object value, ObjectOutputStream out) throws IOException { - if (value == null) - out.writeObject(value); - else { - if (value instanceof Class) - out.writeObject(((Class) value).getName()); - else if (!value.getClass().isArray()) { - if (value instanceof String || value instanceof Number || value instanceof Boolean || value instanceof Character) - out.writeObject(value); - else - out.writeObject(InvalidObject.INSTANCE); - } else { - // Array is tricky. See if it is one we can handle, if not then invalid. - // To indicate array, we will first write out the Class of the Component type of the array (it will - // be converted to be Object or Object[]...). - // This will be the clue that an array is coming. Class values will never - // be returned, so that is how we can tell it is an array. - // Note: The reason we are using the component type (converted to Object) is because to reconstruct on the other side we need - // to use the component type plus length of the array's first dimension. - // - // We can not just serialize the array in the normal way because it may contain invalid values, and we need to - // handle that. Also, if it wasn't an Object array, we need to turn it into an object array. We need consistency - // in that it should always be an Object array. - // So output format will be: - // Class(component type) - // int(size of first dimension) - // Object(value of first entry) - Actually use out writeObject() format to allow nesting of arrays. - // Object(value of second entry) - // ... up to size of dimension. - Class type = value.getClass(); - // See if final type is a valid type. - Class ft = type.getComponentType(); - int dims = 1; - while (ft.isArray()) { - dims++; - ft = ft.getComponentType(); - } - if (ft == Object.class || ft == String.class || ft == Boolean.class || ft == Character.class || ft.isPrimitive() || ft == Class.class || Number.class.isAssignableFrom(ft)) { - String jniType = dims == 1 ? "java.lang.Object" : MapTypes.getJNITypeName("java.lang.Object", dims-1); //$NON-NLS-1$ //$NON-NLS-2$ - try { - Class componentType = Class.forName(jniType); - out.writeObject(componentType); - int length = Array.getLength(value); - out.writeInt(length); - for (int i = 0; i < length; i++) { - writeObject(Array.get(value, i), out); - } - } catch (ClassNotFoundException e) { - // This should never happen. Object arrays are always available. - } - } else - out.writeObject(InvalidObject.INSTANCE); - } - } - } - - - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - // Read in any hidden stuff - in.defaultReadObject(); - - value = readActualObject(in); - } - - private Object readActualObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - Object val = in.readObject(); - if (val instanceof Class) { - // It must be an array. Only Class objects that come in are Arrays of Object. - int length = in.readInt(); - Object array = Array.newInstance((Class) val, length); - for (int i = 0; i < length; i++) { - Array.set(array, i, readActualObject(in)); - } - return array; - } else - return val; // It is the value itself. - } - - - /** - * Is this FeatureAttributeValue an implicit value, i.e. one that came from - * BeanInfo Introspection and not from an override file. - * - * @return Returns the implicitValue. - * - * @since 1.2.0 - */ - public boolean isImplicitValue() { - return implicitValue; - } - - - /** - * Set the implicit value flag. - * @param implicitValue The implicitValue to set. - * - * @see #isImplicitValue() - * @since 1.2.0 - */ - public void setImplicitValue(boolean implicitValue) { - this.implicitValue = implicitValue; - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/FeatureRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/FeatureRecord.java deleted file mode 100644 index f973f29db..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/FeatureRecord.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: FeatureRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - -import java.io.Serializable; - - -/** - * This is the data structure for sending the FeatureDescriptor info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the FeatureDescriptor. - * @since 1.1.0 - */ -public class FeatureRecord implements Serializable { - - private static final long serialVersionUID = 1105979276648L; - - public String name; // Some decorators use this and others don't. Each decorator type will decide whether this is of importance. - public String displayName; - public String shortDescription; - public String category; - public boolean expert; - public boolean hidden; - public boolean preferred; - public String[] attributeNames; - public FeatureAttributeValue[] attributeValues; -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/IBeanInfoIntrospectionConstants.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/IBeanInfoIntrospectionConstants.java deleted file mode 100644 index 209873e41..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/IBeanInfoIntrospectionConstants.java +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: IBeanInfoIntrospectionConstants.java,v $ - * $Revision: 1.3 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - - -/** - * These are constants needed for transferring BeanInfo results from the BeanInfo VM. - * @since 1.1.0 - */ -public interface IBeanInfoIntrospectionConstants { - - /** - * Introspection bit flag indicating do the BeanDecorator. Sent to ModelingBeanInfo.introspect method. - * @since 1.1.0 - */ - public static final int DO_BEAN_DECOR = 0x1; - - /** - * Introspection bit flag indicating do the Properties. Sent to ModelingBeanInfo.introspect method. - * @since 1.1.0 - */ - public static final int DO_PROPERTIES = 0x2; - - /** - * Introspection bit flag indicating do the Methods. Sent to ModelingBeanInfo.introspect method. - * @since 1.1.0 - */ - public static final int DO_METHODS = 0x4; - - /** - * Introspection bit flag indicating do the Events. Sent to ModelingBeanInfo.introspect method. - * @since 1.1.0 - */ - public static final int DO_EVENTS = 0x8; - - /** - * BeanDecorator was sent command id. - * <p> - * This will be sent to callBack(int id, InputStream is). The InputStream will be Objects (use ObjectInputStream). - * The stream will be broken into sections. - * Each section will be headed by the command id of that section (e.g. BEAN_DECORATOR_SENT or PROPERTY_DECORATORS_SENT). - * Following the command id will be the type of input specific data. - * <p> - * The data following the command id will be a BeanRecord from the ObjectInputStream. - * - * @see BeanRecord - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBackStream(int, InputStream) - * @since 1.1.0 - */ - public static final int BEAN_DECORATOR_SENT = 1; - - /** - * PropertyDecorators send command id. - * <p> - * This will be sent to callBack(int id, InputStream is). The InputStream will be Objects (use ObjectInputStream). - * The stream will be broken into sections. - * Each section will be headed by the command id of that section (e.g. BEAN_DECORATOR_SENT or PROPERTY_DECORATORS_SENT). - * Following the command id will be the type of input specific data. - * <p> - * The first object will be an int and will be the number of properties and each object after that - * will be a PropertyRecord/IndexedPropertyRecord. - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBackStream(int, InputStream) - * @see PropertyRecord - * @see IndexedPropertyRecord - */ - public static final int PROPERTY_DECORATORS_SENT = 2; - - /** - * MethodDecorators send command id. - * <p> - * This will be sent to callBack(int id, InputStream is). The InputStream will be Objects (use ObjectInputStream). - * The stream will be broken into sections. - * Each section will be headed by the command id of that section (e.g. BEAN_DECORATOR_SENT or PROPERTY_DECORATORS_SENT). - * Following the command id will be the type of input specific data. - * <p> - * The InputStream will be Objects (use ObjectInputStream). - * The first object will be an int and will be the number of methods and each object after that - * will be a MethodRecord. - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBackStream(int, InputStream) - * @see MethodRecord - */ - public static final int METHOD_DECORATORS_SENT = 3; - - /** - * EventSetDecorators send command id. - * <p> - * This will be sent to callBack(int id, InputStream is). The InputStream will be Objects (use ObjectInputStream). - * The stream will be broken into sections. - * Each section will be headed by the command id of that section (e.g. BEAN_DECORATOR_SENT or PROPERTY_DECORATORS_SENT). - * Following the command id will be the type of input specific data. - * <p> - * The first object will be an int and will be the number of events and each object after that - * will be a EventSetRecord. - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBackStream(int, InputStream) - * @see MethodRecord - */ - public static final int EVENT_DECORATORS_SENT = 4; - - /** - * Done send command id. - * <p> - * This will be sent to callBack(int id, InputStream is). The InputStream will be Objects (use ObjectInputStream). - * The stream will be broken into sections. - * Each section will be headed by the command id of that section (e.g. BEAN_DECORATOR_SENT or PROPERTY_DECORATORS_SENT). - * Following the command id will be the type of input specific data. - * <p> - * This command id means there is no more data and it should return. - * - * @see org.eclipse.jem.internal.proxy.core.ICallback#calledBackStream(int, InputStream) - * @see MethodRecord - */ - public static final int DONE = 5; - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/IndexedPropertyRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/IndexedPropertyRecord.java deleted file mode 100644 index 5da6399d0..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/IndexedPropertyRecord.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: IndexedPropertyRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - - -/** - * This is the data structure for sending the IndexedPropertyDescriptor info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the IndexedPropertyDescriptor. - * @since 1.1.0 - */ -public class IndexedPropertyRecord extends PropertyRecord { - private static final long serialVersionUID = 1105983227990L; - - public ReflectMethodRecord indexedReadMethod; - public ReflectMethodRecord indexedWriteMethod; - public String indexedPropertyTypeName; -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/InvalidObject.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/InvalidObject.java deleted file mode 100644 index 989c7ea08..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/InvalidObject.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: InvalidObject.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - -import java.io.ObjectStreamException; -import java.io.Serializable; - - -/** - * An indicator object for invalid object type. This is used with feature attribute - * values from the BeanInfo classes. We can only handle certain types when we - * bring them over from the BeanInfo VM. That is because the classes instantiated - * in the BeanInfo class may not be available in the IDE. So any invalid value - * will be replaced by this class instance. - * <p> - * This is a singleton class. - * There will be one instance (InvalidObject.INSTANCE) in the system. That way - * "==" can be used to test for it. - * - * @since 1.1.0 - */ -public class InvalidObject implements Serializable { - - /** - * Singleton instance of InvalidObject. - * @since 1.1.0 - */ - public static final InvalidObject INSTANCE = new InvalidObject(); - - private static final long serialVersionUID = 1105643804370L; - - /* - * Nobody else should create one of these. - */ - private InvalidObject() { - } - - private Object readResolve() throws ObjectStreamException { - return INSTANCE; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/MethodRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/MethodRecord.java deleted file mode 100644 index 375a69e6b..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/MethodRecord.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: MethodRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - - -/** - * This is the data structure for sending the MethodDescriptor info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the MethodDescriptor. - * @since 1.1.0 - */ -public class MethodRecord extends FeatureRecord { - - private static final long serialVersionUID = 1105982213110L; - - /** - * Method signature for the method this record describes. - */ - public ReflectMethodRecord methodForDescriptor; - /** - * Parameter records array. It may be <code>null</code> if there aren't any. - */ - public ParameterRecord[] parameters; -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ParameterRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ParameterRecord.java deleted file mode 100644 index 4aac601ac..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ParameterRecord.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: ParameterRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - - -/** - * This is the data structure for sending the ParameterDescriptor info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the ParameterDescriptor. - * <p> - * The only field of importance is the name, and that comes from FeatureRecord. - * @since 1.1.0 - */ -public class ParameterRecord extends FeatureRecord { - - private static final long serialVersionUID = 1105982438955L; - -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/PropertyRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/PropertyRecord.java deleted file mode 100644 index cb564dd3a..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/PropertyRecord.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: PropertyRecord.java,v $ - * $Revision: 1.3 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - - -/** - * This is the data structure for sending the PropertyDescriptor info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the PropertyDescriptor. - * @since 1.1.0 - */ -public class PropertyRecord extends FeatureRecord { - private static final long serialVersionUID = 1105979276648L; - - public String propertyEditorClassName; - public String propertyTypeName; - public ReflectMethodRecord readMethod; - public ReflectMethodRecord writeMethod; - public ReflectFieldRecord field; - public boolean bound; - public boolean constrained; - public Boolean designTime; -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ReflectFieldRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ReflectFieldRecord.java deleted file mode 100644 index a495709a0..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ReflectFieldRecord.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: ReflectFieldRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - -import java.io.Serializable; - - -/** - * This is the data structure for sending the java.lang.reflect.Field info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the java.lang.reflect.Field. - * @since 1.1.0 - */ -public class ReflectFieldRecord implements Serializable { - - private static final long serialVersionUID = 1105981512453L; - - public String className; - public String fieldName; - public boolean readOnly; -} diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ReflectMethodRecord.java b/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ReflectMethodRecord.java deleted file mode 100644 index 01ff2be42..000000000 --- a/plugins/org.eclipse.jem.beaninfo/beaninfoCommon/org/eclipse/jem/internal/beaninfo/common/ReflectMethodRecord.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - *******************************************************************************/ -/* - * $RCSfile: ReflectMethodRecord.java,v $ - * $Revision: 1.2 $ $Date: 2005/02/15 22:44:52 $ - */ -package org.eclipse.jem.internal.beaninfo.common; - -import java.io.Serializable; - - -/** - * This is the data structure for sending the java.lang.reflect.Method info from - * the BeanInfo vm to the IDE vm. It is serializable so that it can - * be serialized for transmission. - * <p> - * It contains the properties of the java.lang.reflect.Method. - * @since 1.1.0 - */ -public class ReflectMethodRecord implements Serializable { - - private static final long serialVersionUID = 1105981512773L; - - public String className; - public String methodName; - public String[] parameterTypeNames; // Maybe null if no parameters. -} diff --git a/plugins/org.eclipse.jem.beaninfo/build.properties b/plugins/org.eclipse.jem.beaninfo/build.properties deleted file mode 100644 index 9aeb843e2..000000000 --- a/plugins/org.eclipse.jem.beaninfo/build.properties +++ /dev/null @@ -1,30 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2006 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 -############################################################################### -src.excludes = **/.cvsignore -bin.includes = plugin.xml,\ - plugin.properties,\ - about.html,\ - .options,\ - META-INF/,\ - vm/beaninfovm.jar,\ - . -jars.compile.order = .,\ - vm/beaninfovm.jar -src.includes = about.html,\ - model/,\ - rose/,\ - proxy.jars,\ - schema/ -source.. = beaninfoCommon/,beaninfo/ -source.vm/beaninfovm.jar = vm_beaninfovm/ -output.vm/beaninfovm.jar = bin_vm_beaninfovm/ -output.. = bin/ - diff --git a/plugins/org.eclipse.jem.beaninfo/model/beaninfo.ecore b/plugins/org.eclipse.jem.beaninfo/model/beaninfo.ecore deleted file mode 100644 index cc925768c..000000000 --- a/plugins/org.eclipse.jem.beaninfo/model/beaninfo.ecore +++ /dev/null @@ -1,290 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ecore:EPackage xmi:version="2.0" - xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="beaninfo" - nsURI="http:///org/eclipse/jem/internal/beaninfo/beaninfo.ecore" nsPrefix="org.eclipse.jem.internal.beaninfo.beaninfo"> - <eClassifiers xsi:type="ecore:EClass" name="FeatureDecorator" eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EAnnotation"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Equivalent to FeatureDescriptor in java.
<p>
Note: If any attribute is explicitly set then the BeanInfo/Reflection will not be merged into the decorator. This provides a way of overriding the BeanInfos. Also for any many-valued attribute, if it is desired to have it explicitly empty and not have BeanInfo fill it in, there will be another attribute named of the form "attibutueExplicitEmpty" If this is true then the BeanInfo will not merge in and will leave it empty.
<p>
These comments about merging apply to all subclasses of this decorator too. "/> - </eAnnotations> - <eOperations name="getName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="displayName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="shortDescription" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="expert" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="hidden" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="preferred" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="mergeIntrospection" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Should the introspection results be merged into this decorator. If this is set to false, then the introspection results are ignored for this particular decorator. This is an internal feature simply to allow desired override capabilities. Customers would use it to prevent ANY introspection/reflection from occurring."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="attributesExplicitEmpty" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="The attributes are explicitly set as empty and not retrieved from the beaninfo/reflection. Customers should set this if they want the list of attributes to be empty and not merged with the BeanInfo results. "/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="implicitlySetBits" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="A bitflag for which attributes have been set by BeanInfo/Reflection.
<p>
This is an internal attribute that is used by the BeanInfo maintanance. It is not meant to be used by customers."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="implicitDecoratorFlag" - eType="#//ImplicitItem"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Is this decorator/feature implicit. This means created by Introspection/Reflection and not by customer.
<p>
This is an internal attribute that is used by the BeanInfo maintanance. It is not meant to be used by customers."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" upperBound="-1" - eType="#//FeatureAttributeMapEntry" containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Feature attributes. Key/value pairs. If it is desired that the feature attributes is explicitly empty and not have BeanInfo/reflection set it, set attributesExplicitEmpty to true."/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="BeanDecorator" eSuperTypes="#//FeatureDecorator"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Equivalent to BeanDecorator in java."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="mergeSuperProperties" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true" unsettable="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Should the properties of super types be merged when asking for eAllAttributes/eAllReferences."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="mergeSuperMethods" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true" unsettable="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Should the methods of super types be merged when asking for eAllBehaviors."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="mergeSuperEvents" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true" unsettable="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Should the events of super types be merged when asking for eAllEvents."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="introspectProperties" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Should the properties from the introspection be added to the class. This allows properties to not be introspected and to use only what is defined explicitly in the JavaClass xmi file."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="introspectMethods" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Should the methods from the introspection be added to the class. This allows methods to not be introspected and to use only what is defined explicitly in the JavaClass xmi file."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="introspectEvents" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Should the events from the introspection be added to the class. This allows events to not be introspected and to use only what is defined explicitly in the JavaClass xmi file."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="doBeaninfo" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This means do we go and get the beaninfo from the remote vm. If false, then it will not try to get the beaninfo. This doesn't prevent introspection through reflection. That is controled by the separate introspect... attributes."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="notInheritedPropertyNames" - upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is the list of inherited property names to not use in getAllProperties(). These names are properties that should not be inherited and should not show through. If the inherited property is not on the list then it will show in getAllProperties().
<p>
This list will be empty if all properties are inherited or if the mergeSuperProperties flag is false.
<p>
Note: This attribute is not meant to be changed by clients. It is an internal attribute."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="notInheritedMethodNames" - upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is the list of inherited method names to not use in eAllOperations(). These names are operations that should not be inherited and should not show through. If the inherited operation is not on the list then it will show in getAllOperations().
<p>
This list will be empty if all operations are inherited or if the mergeSuperBehaviors flag is false."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="notInheritedEventNames" - upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is the list of inherited event names to not use in getAllEvents(). These names are events that should not be inherited and should not show through. If the inherited event is not on the list then it will show in getAllEvents().
<p>
This list will be empty if all events are inherited or if the mergeSuperEvents flag is false."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="customizerClass" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//JavaClass"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="EventSetDecorator" eSuperTypes="#//FeatureDecorator"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Equivalent to EventSetDecorator in java."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="inDefaultEventSet" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="unicast" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="listenerMethodsExplicitEmpty" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Set true if the listenerMethods feature is explicitly set as empty and is not to have listener methods merged in from BeanInfo or reflection."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="addListenerMethod" lowerBound="1" - eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Method"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="listenerMethods" lowerBound="1" - upperBound="-1" eType="#//MethodProxy" volatile="true" transient="true" derived="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="listener methods. If it is desired that the list be explicitly empty and not have BeanInfo set it, then set listenerMethodsExplicitEmpty to true.
<p>
ListenerMethods will be decorated with MethodDecorators.
<p>
Note: This is a derived setting, which means it will not notify out changes to it. To here changes to it, listen on "serListMthd" notifications instead."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="listenerType" lowerBound="1" - eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//JavaClass"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="removeListenerMethod" lowerBound="1" - eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Method"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="eventAdapterClass" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//JavaClass"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="For some listener interfaces an adapter class is provided that implements default no-op methods, e.g. java.awt.event.FocusEvent which has java.awt.event.FocusAdapter. The Adapter class is provided in a key/value pair on the java.beans.EventSetDescriptor with a key defined in a static final constants EVENTADAPTERCLASS = "eventAdapterClass"."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="serListMthd" lowerBound="1" - upperBound="-1" eType="#//MethodProxy" containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is a private feature. It is used internally only. "/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="MethodDecorator" eSuperTypes="#//FeatureDecorator"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Equivalent to MethodDecorator in java."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="parmsExplicitEmpty" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Set true if the parms feature is explicitly set as empty and is not to have parameters merged in from BeanInfo or reflection."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="parameterDescriptors" upperBound="-1" - eType="#//ParameterDecorator" volatile="true" transient="true" derived="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is the parameter descriptors list.
<p>
Note: This is a derived setting, which means it will not notify out changes to it. To here changes to it, listen on "serParmDesc" notifications instead."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="serParmDesc" upperBound="-1" - eType="#//ParameterDecorator" containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is a private feature. It is used internally only. "/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ParameterDecorator" eSuperTypes="#//FeatureDecorator"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="The name is explicit here because unlike the other feature decorators, the name does not come from the object being decorated."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="parameter" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//JavaParameter" - transient="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="The JavaParameter that this ParameterDecorator is decorating. Can't use eDecorates in this."/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="PropertyDecorator" eSuperTypes="#//FeatureDecorator"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Equivalent to PropertyDecorator in java."/> - </eAnnotations> - <eOperations name="getPropertyType" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClassifier"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Get the property type."/> - </eAnnotations> - </eOperations> - <eOperations name="setPropertyType"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Set the property type."/> - </eAnnotations> - <eParameters name="propertyType" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClassifier"/> - </eOperations> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="bound" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="constrained" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="designTime" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - unsettable="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="If not set, then normal default processing.

If set true, then this property is a design time property. This means it will show up in the property sheet, but it won't be able to be connected to at runtime. It may not even be a true bean property but instead the builder will know how to handle it.

If set false, then this property will not show up on the property sheet, but will be able to be connected to for runtime."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="alwaysIncompatible" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="If set true, then when multiple objects are selected, this property is always incompatible with each other. So in this case the property will not show up on the property sheet if more than one object has been selected."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="filterFlags" upperBound="-1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="fieldReadOnly" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Is this field read-only (i.e. is a "final" field). This is only referenced if the field reference is set."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="propertyEditorClass" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//JavaClass"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="readMethod" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Method" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="writeMethod" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Method" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="field" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Field" - unsettable="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="If this is set, then this property is a field and not a getter/setter property. This is an extension that the Visual Editor uses to the BeanInfo model."/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="IndexedPropertyDecorator" eSuperTypes="#//PropertyDecorator"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Equivalent to IndexedPropertyDecorator"/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EReference" name="indexedReadMethod" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Method" - unsettable="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="indexedWriteMethod" eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Method" - unsettable="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="MethodProxy" eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EOperation"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is just a wrapper of a java Method. It allows access to the method but doesn't duplicate the interface for it.
<p>
MethodProxies will be in the eBehaviors setting for any methods that are in the JavaClass methods setting so that they are not duplicated.
<p>
MethodProxies would also have MethodDecorators."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EReference" name="method" lowerBound="1" - eType="ecore:EClass ../../org.eclipse.jem/model/java.ecore#//Method"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="BeanEvent" eSuperTypes="../../org.eclipse.jem/model/java.ecore#//JavaEvent"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Event from Introspection/Reflection.
<p>
The BeanEvent will be under the JavaClass' events and allEvents feature. Each BeanEvent will be decorated by an EventSetDecorator."/> - </eAnnotations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="FeatureAttributeMapEntry" instanceClassName="java.util.Map$Entry"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//FeatureAttributeValue"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EDataType" name="FeatureAttributeValue" instanceClassName="org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This is the attribute value for feature attribute. It can only represent the following:

- String
- primitives
- array (type Object) containing mixture of Strings and primitives (as the object types)
- array (type String)
- array (type primitive)

Anything else cannot be represented."/> - </eAnnotations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EEnum" name="ImplicitItem"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This enum is an internal enum. It is used by BeanInfo for cache maintenance.
<p>
This enum is not meant to be used by clients."/> - </eAnnotations> - <eLiterals name="NOT_IMPLICIT"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Means this decorator is not implicit. That is it was created by customer."/> - </eAnnotations> - </eLiterals> - <eLiterals name="IMPLICIT_DECORATOR" value="1"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This means that the decorator is implicit. That is it was not created by the customer."/> - </eAnnotations> - </eLiterals> - <eLiterals name="IMPLICIT_DECORATOR_AND_FEATURE" value="2"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="This means the decorator and the feature where implicit. That is they were not created by the customer."/> - </eAnnotations> - </eLiterals> - </eClassifiers> -</ecore:EPackage> diff --git a/plugins/org.eclipse.jem.beaninfo/model/introspect.genmodel b/plugins/org.eclipse.jem.beaninfo/model/introspect.genmodel deleted file mode 100644 index 52616c491..000000000 --- a/plugins/org.eclipse.jem.beaninfo/model/introspect.genmodel +++ /dev/null @@ -1,97 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<genmodel:GenModel xmi:version="2.0" - xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" - xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.jem.beaninfo/beaninfo" - editDirectory="/org.eclipse.jem.beaninfo.edit/src" editorDirectory="/org.eclipse.jem.beaninfo.editor/src" - modelPluginID="" modelName="Beaninfo" editPluginClass="org.eclipse.jem.internal.beaninfo.provider.BeaninfoEditPlugin" - editorPluginClass="org.eclipse.jem.internal.beaninfo.presentation.BeaninfoEditorPlugin" - updateClasspath="false" booleanFlagsField="eFlags" booleanFlagsReservedBits="8" - importerID="org.eclipse.emf.importer.rose" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.jem/model/javaModel.genmodel#//java"> - <foreignModel>..\rose\introspect.mdl</foreignModel> - <foreignModel>WorkspaceRoot</foreignModel> - <foreignModel>../..</foreignModel> - <genPackages prefix="Beaninfo" basePackage="org.eclipse.jem.internal" adapterFactory="false" - ecorePackage="beaninfo.ecore#/"> - <genEnums ecoreEnum="beaninfo.ecore#//ImplicitItem"> - <genEnumLiterals ecoreEnumLiteral="beaninfo.ecore#//ImplicitItem/NOT_IMPLICIT"/> - <genEnumLiterals ecoreEnumLiteral="beaninfo.ecore#//ImplicitItem/IMPLICIT_DECORATOR"/> - <genEnumLiterals ecoreEnumLiteral="beaninfo.ecore#//ImplicitItem/IMPLICIT_DECORATOR_AND_FEATURE"/> - </genEnums> - <genDataTypes ecoreDataType="beaninfo.ecore#//FeatureAttributeValue"/> - <genClasses ecoreClass="beaninfo.ecore#//FeatureDecorator"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/displayName"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/shortDescription"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/category"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/expert"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/hidden"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/preferred"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/mergeIntrospection"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/attributesExplicitEmpty"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/implicitlySetBits"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureDecorator/implicitDecoratorFlag"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference beaninfo.ecore#//FeatureDecorator/attributes"/> - <genOperations ecoreOperation="beaninfo.ecore#//FeatureDecorator/getName"/> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//BeanDecorator"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/mergeSuperProperties"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/mergeSuperMethods"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/mergeSuperEvents"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/introspectProperties"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/introspectMethods"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/introspectEvents"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/doBeaninfo"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/notInheritedPropertyNames"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/notInheritedMethodNames"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//BeanDecorator/notInheritedEventNames"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//BeanDecorator/customizerClass"/> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//EventSetDecorator"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//EventSetDecorator/inDefaultEventSet"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//EventSetDecorator/unicast"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//EventSetDecorator/listenerMethodsExplicitEmpty"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//EventSetDecorator/addListenerMethod"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference beaninfo.ecore#//EventSetDecorator/listenerMethods"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//EventSetDecorator/listenerType"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//EventSetDecorator/removeListenerMethod"/> - <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//EventSetDecorator/eventAdapterClass"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference beaninfo.ecore#//EventSetDecorator/serListMthd"/> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//MethodDecorator"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//MethodDecorator/parmsExplicitEmpty"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference beaninfo.ecore#//MethodDecorator/parameterDescriptors"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference beaninfo.ecore#//MethodDecorator/serParmDesc"/> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//ParameterDecorator"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//ParameterDecorator/name"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//ParameterDecorator/parameter"/> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//PropertyDecorator"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//PropertyDecorator/bound"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//PropertyDecorator/constrained"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//PropertyDecorator/designTime"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//PropertyDecorator/alwaysIncompatible"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//PropertyDecorator/filterFlags"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//PropertyDecorator/fieldReadOnly"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//PropertyDecorator/propertyEditorClass"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//PropertyDecorator/readMethod"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//PropertyDecorator/writeMethod"/> - <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//PropertyDecorator/field"/> - <genOperations ecoreOperation="beaninfo.ecore#//PropertyDecorator/getPropertyType"/> - <genOperations ecoreOperation="beaninfo.ecore#//PropertyDecorator/setPropertyType"> - <genParameters ecoreParameter="beaninfo.ecore#//PropertyDecorator/setPropertyType/propertyType"/> - </genOperations> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//IndexedPropertyDecorator"> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//IndexedPropertyDecorator/indexedReadMethod"/> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//IndexedPropertyDecorator/indexedWriteMethod"/> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//MethodProxy"> - <genFeatures createChild="false" ecoreFeature="ecore:EReference beaninfo.ecore#//MethodProxy/method"/> - </genClasses> - <genClasses ecoreClass="beaninfo.ecore#//BeanEvent"/> - <genClasses ecoreClass="beaninfo.ecore#//FeatureAttributeMapEntry"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureAttributeMapEntry/key"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute beaninfo.ecore#//FeatureAttributeMapEntry/value"/> - </genClasses> - </genPackages> -</genmodel:GenModel> diff --git a/plugins/org.eclipse.jem.beaninfo/plugin.properties b/plugins/org.eclipse.jem.beaninfo/plugin.properties deleted file mode 100644 index f7f55ad18..000000000 --- a/plugins/org.eclipse.jem.beaninfo/plugin.properties +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2005 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 -############################################################################### -# -# $Source: /cvsroot/webtools/jeetools.move/webtools.javaee.git/plugins/org.eclipse.jem.beaninfo/plugin.properties,v $ -# $Revision: 1.7 $ $Date: 2005/08/24 20:31:29 $ -# - - -pluginName=Java EMF Model BeanInfo (Introspection) Support -providerName = Eclipse.org -beaninfoNatureName=Java Model BeanInfo Nature -registrations.extensionpoint.name=BeanInfo extension registrations diff --git a/plugins/org.eclipse.jem.beaninfo/plugin.xml b/plugins/org.eclipse.jem.beaninfo/plugin.xml deleted file mode 100644 index a8f1f1d0c..000000000 --- a/plugins/org.eclipse.jem.beaninfo/plugin.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<plugin> - - <extension-point id="registrations" name="%registrations.extensionpoint.name" schema="schema/registrations.exsd"/> - - <extension - id="BeanInfoNature" - name="%beaninfoNatureName" - point="org.eclipse.core.resources.natures"> - <runtime> - <run - class="org.eclipse.jem.internal.beaninfo.adapters.BeaninfoNature"> - </run> - </runtime> - </extension> - <extension - point="org.eclipse.emf.ecore.generated_package"> - <package - uri="http:///org/eclipse/jem/internal/beaninfo/beaninfo.ecore" - class="org.eclipse.jem.internal.beaninfo.BeaninfoPackage"> - </package> - </extension> - <extension - point="org.eclipse.team.core.fileTypes"> - <fileTypes - type="text" - extension="beaninfoConfig"> - </fileTypes> - <fileTypes - type="text" - extension="override"> - </fileTypes> - </extension> - -</plugin> diff --git a/plugins/org.eclipse.jem.beaninfo/proxy.jars b/plugins/org.eclipse.jem.beaninfo/proxy.jars deleted file mode 100644 index 176820a6f..000000000 --- a/plugins/org.eclipse.jem.beaninfo/proxy.jars +++ /dev/null @@ -1,2 +0,0 @@ -vm/beaninfovm.jar=/org.eclipse.jem.beaninfo/bin_vm_beaninfovm/ -beaninfocommon.jar=/org.eclipse.jem.beaninfo/bin_beaninfocommon/
\ No newline at end of file diff --git a/plugins/org.eclipse.jem.beaninfo/rose/.cvsignore b/plugins/org.eclipse.jem.beaninfo/rose/.cvsignore deleted file mode 100644 index 1be3a373d..000000000 --- a/plugins/org.eclipse.jem.beaninfo/rose/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.md~ -*.ca~
\ No newline at end of file diff --git a/plugins/org.eclipse.jem.beaninfo/rose/beaninfo.cat b/plugins/org.eclipse.jem.beaninfo/rose/beaninfo.cat deleted file mode 100644 index dd227ce40..000000000 --- a/plugins/org.eclipse.jem.beaninfo/rose/beaninfo.cat +++ /dev/null @@ -1,3301 +0,0 @@ - -(object Petal - version 47 - _written "Rose 8.0.0303.1400" - charSet 0) - -(object Class_Category "beaninfo" - is_unit TRUE - is_loaded TRUE - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "basePackage" - value (value Text "org.eclipse.jem.internal.beaninfo"))) - quid "3A799ABB0353" - exportControl "Public" - logical_models (list unit_reference_list - (object Class "FeatureDecorator" - quid "3A799B3E01E9" - documentation -|Equivalent to FeatureDescriptor in java. -|<p> -|Note: If any attribute is explicitly set then the BeanInfo/Reflection will not be merged into the decorator. This provides a way of overriding the BeanInfos. Also for any many-valued attribute, if it is desired to have it explicitly empty and not have BeanInfo fill it in, there will be another attribute named of the form "attibutueExplicitEmpty" If this is true then the BeanInfo will not merge in and will leave it empty. -|<p> -|These comments about merging apply to all subclasses of this decorator too. - - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3DFA185900DC" - supplier "Logical View::ecore::EAnnotation" - quidu "3D98A1C701AB")) - operations (list Operations - (object Operation "getName" - quid "3B867D0D0184" - result "String" - concurrency "Sequential" - opExportControl "Public" - uid 0)) - class_attributes (list class_attribute_list - (object ClassAttribute "displayName" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79CFCC0131" - type "String" - exportControl "Public") - (object ClassAttribute "shortDescription" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79CFD501E8" - type "String" - exportControl "Public") - (object ClassAttribute "category" - attributes (list Attribute_Set) - quid "3BA2797102DC" - type "String" - exportControl "Public") - (object ClassAttribute "expert" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79CFE700FE" - type "boolean" - exportControl "Public") - (object ClassAttribute "hidden" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79D0050328" - type "boolean" - exportControl "Public") - (object ClassAttribute "preferred" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79D0240318" - type "boolean" - exportControl "Public") - (object ClassAttribute "mergeIntrospection" - quid "3A82C0A60389" - documentation "Should the introspection results be merged into this decorator. If this is set to false, then the introspection results are ignored for this particular decorator. This is an internal feature simply to allow desired override capabilities. Customers would use it to prevent ANY introspection/reflection from occurring." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "attributesExplicitEmpty" - quid "3C9B49320265" - documentation "The attributes are explicitly set as empty and not retrieved from the beaninfo/reflection. Customers should set this if they want the list of attributes to be empty and not merged with the BeanInfo results. " - type "boolean" - exportControl "Implementation") - (object ClassAttribute "implicitlySetBits" - quid "41E5815D02B9" - documentation -|A bitflag for which attributes have been set by BeanInfo/Reflection. -|<p> -|This is an internal attribute that is used by the BeanInfo maintanance. It is not meant to be used by customers. - - type "long") - (object ClassAttribute "implicitDecoratorFlag" - quid "41E5A05D021A" - documentation -|Is this decorator/feature implicit. This means created by Introspection/Reflection and not by customer. -|<p> -|This is an internal attribute that is used by the BeanInfo maintanance. It is not meant to be used by customers. - - type "ImplicitItem" - quidu "41E59E5D0296"))) - (object Class "BeanDecorator" - quid "3A79D0DF02D1" - documentation "Equivalent to BeanDecorator in java." - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3A79DE8E007F" - supplier "Logical View::beaninfo::FeatureDecorator" - quidu "3A799B3E01E9")) - class_attributes (list class_attribute_list - (object ClassAttribute "mergeSuperProperties" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A82B73E0200" - documentation "Should the properties of super types be merged when asking for eAllAttributes/eAllReferences." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "mergeSuperMethods" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A82B9940015" - documentation "Should the methods of super types be merged when asking for eAllBehaviors." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "mergeSuperEvents" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A82B99F0165" - documentation "Should the events of super types be merged when asking for eAllEvents." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "introspectProperties" - quid "3A8427EC00A6" - documentation "Should the properties from the introspection be added to the class. This allows properties to not be introspected and to use only what is defined explicitly in the JavaClass xmi file." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "introspectMethods" - quid "3A84287501B1" - documentation "Should the methods from the introspection be added to the class. This allows methods to not be introspected and to use only what is defined explicitly in the JavaClass xmi file." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "introspectEvents" - quid "3A842877000F" - documentation "Should the events from the introspection be added to the class. This allows events to not be introspected and to use only what is defined explicitly in the JavaClass xmi file." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "doBeaninfo" - quid "3C9A46FC027C" - documentation "This means do we go and get the beaninfo from the remote vm. If false, then it will not try to get the beaninfo. This doesn't prevent introspection through reflection. That is controled by the separate introspect... attributes." - type "boolean" - initv "true" - exportControl "Implementation") - (object ClassAttribute "notInheritedPropertyNames" - quid "41EED50B0185" - documentation -|This is the list of inherited property names to not use in getAllProperties(). These names are properties that should not be inherited and should not show through. If the inherited property is not on the list then it will show in getAllProperties(). -|<p> -|This list will be empty if all properties are inherited or if the mergeSuperProperties flag is false. -|<p> -|Note: This attribute is not meant to be changed by clients. It is an internal attribute. - - stereotype "0..*" - type "String") - (object ClassAttribute "notInheritedMethodNames" - quid "41F02C5F0399" - documentation -|This is the list of inherited method names to not use in eAllOperations(). These names are operations that should not be inherited and should not show through. If the inherited operation is not on the list then it will show in getAllOperations(). -|<p> -|This list will be empty if all operations are inherited or if the mergeSuperBehaviors flag is false. - - stereotype "0..*" - type "String") - (object ClassAttribute "notInheritedEventNames" - quid "41F02D0A0312" - documentation -|This is the list of inherited event names to not use in getAllEvents(). These names are events that should not be inherited and should not show through. If the inherited event is not on the list then it will show in getAllEvents(). -|<p> -|This list will be empty if all events are inherited or if the mergeSuperEvents flag is false. - - stereotype "0..*" - type "String"))) - (object Class "EventSetDecorator" - quid "3A79D1D2004F" - documentation "Equivalent to EventSetDecorator in java." - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3A79DEA200EC" - supplier "Logical View::beaninfo::FeatureDecorator" - quidu "3A799B3E01E9")) - class_attributes (list class_attribute_list - (object ClassAttribute "inDefaultEventSet" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79D94F004C" - type "boolean" - exportControl "Public") - (object ClassAttribute "unicast" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79D9580167" - type "boolean" - exportControl "Public") - (object ClassAttribute "listenerMethodsExplicitEmpty" - quid "3CB1AF7D0286" - documentation "Set true if the listenerMethods feature is explicitly set as empty and is not to have listener methods merged in from BeanInfo or reflection." - type "boolean" - exportControl "Implementation"))) - (object Class "MethodDecorator" - quid "3A79D35E0027" - documentation "Equivalent to MethodDecorator in java." - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3A79DEA603E1" - supplier "Logical View::beaninfo::FeatureDecorator" - quidu "3A799B3E01E9")) - class_attributes (list class_attribute_list - (object ClassAttribute "parmsExplicitEmpty" - quid "3B86ABE80092" - documentation "Set true if the parms feature is explicitly set as empty and is not to have parameters merged in from BeanInfo or reflection." - type "boolean" - exportControl "Implementation"))) - (object Class "ParameterDecorator" - quid "3A79D9C20304" - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3A79DEBB01C4" - supplier "Logical View::beaninfo::FeatureDecorator" - quidu "3A799B3E01E9")) - class_attributes (list class_attribute_list - (object ClassAttribute "name" - quid "3B86A6700099" - documentation "The name is explicit here because unlike the other feature decorators, the name does not come from the object being decorated." - type "String" - exportControl "Public"))) - (object Class "PropertyDecorator" - quid "3A79DA68010E" - documentation "Equivalent to PropertyDecorator in java." - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3A79DE9702BD" - supplier "Logical View::beaninfo::FeatureDecorator" - quidu "3A799B3E01E9")) - operations (list Operations - (object Operation "getPropertyType" - quid "3B8CF526039D" - documentation "Get the property type." - result "EClassifier" - concurrency "Sequential" - opExportControl "Public" - uid 0 - quidu "3ACE4FEE0371") - (object Operation "setPropertyType" - quid "4329D1CE030E" - documentation "Set the property type." - parameters (list Parameters - (object Parameter "propertyType" - quid "4329D1E20168" - type "EClassifier" - quidu "3ACE4FEE0371")) - concurrency "Sequential" - opExportControl "Public" - uid 0)) - class_attributes (list class_attribute_list - (object ClassAttribute "bound" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79DC250303" - type "boolean" - exportControl "Public") - (object ClassAttribute "constrained" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79DC2C00A0" - type "boolean" - exportControl "Public") - (object ClassAttribute "designTime" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3BA27455019B" - documentation -|If not set, then normal default processing. -| -|If set true, then this property is a design time property. This means it will show up in the property sheet, but it won't be able to be connected to at runtime. It may not even be a true bean property but instead the builder will know how to handle it. -| -|If set false, then this property will not show up on the property sheet, but will be able to be connected to for runtime. - - type "boolean" - exportControl "Public") - (object ClassAttribute "alwaysIncompatible" - quid "3BA27A1700BE" - documentation "If set true, then when multiple objects are selected, this property is always incompatible with each other. So in this case the property will not show up on the property sheet if more than one object has been selected." - type "boolean" - exportControl "Public") - (object ClassAttribute "filterFlags" - quid "3BA3B18F0036" - stereotype "0..*" - type "String" - exportControl "Public") - (object ClassAttribute "fieldReadOnly" - quid "4207E101018E" - documentation -|Is this field read-only (i.e. is a "final" field). This is only referenced if the field reference is set. - - type "boolean" - exportControl "Public"))) - (object Class "IndexedPropertyDecorator" - quid "3A79DC450309" - documentation "Equivalent to IndexedPropertyDecorator" - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3A79DE840388" - supplier "Logical View::beaninfo::PropertyDecorator" - quidu "3A79DA68010E"))) - (object Class "MethodProxy" - quid "3A8984C901C3" - documentation -|This is just a wrapper of a java Method. It allows access to the method but doesn't duplicate the interface for it. -|<p> -|MethodProxies will be in the eBehaviors setting for any methods that are in the JavaClass methods setting so that they are not duplicated. -|<p> -|MethodProxies would also have MethodDecorators. - - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3DFA19B600DE" - supplier "Logical View::ecore::EOperation" - quidu "3904DAA200A0"))) - (object Class "BeanEvent" - quid "3CB09CA90212" - documentation -|Event from Introspection/Reflection. -|<p> -|The BeanEvent will be under the JavaClass' events and allEvents feature. Each BeanEvent will be decorated by an EventSetDecorator. - - superclasses (list inheritance_relationship_list - (object Inheritance_Relationship - quid "3CB09CB6038D" - supplier "Logical View::java::JavaEvent" - quidu "3C62FAF103C8"))) - (object Class "FeatureAttributeMapEntry" - quid "404CC85501F5" - stereotype "MapEntry" - class_attributes (list class_attribute_list - (object ClassAttribute "key" - quid "404CC8B70304" - type "String" - exportControl "Public") - (object ClassAttribute "value" - attributes (list Attribute_Set) - quid "41E58414010A" - type "FeatureAttributeValue" - quidu "41E582F800BB" - exportControl "Public"))) - (object Class "FeatureAttributeValue" - quid "41E582F800BB" - documentation -|This is the attribute value for feature attribute. It can only represent the following: -| -|- String -|- primitives -|- array (type Object) containing mixture of Strings and primitives (as the object types) -|- array (type String) -|- array (type primitive) -| -|Anything else cannot be represented. - - stereotype "datatype" - class_attributes (list class_attribute_list - (object ClassAttribute "org.eclipse.jem.internal.beaninfo.common.FeatureAttributeValue" - quid "41E583B503CA" - stereotype "javaclass"))) - (object Class "ImplicitItem" - quid "41E59E5D0296" - documentation -|This enum is an internal enum. It is used by BeanInfo for cache maintenance. -|<p> -|This enum is not meant to be used by clients. - - stereotype "enumeration" - exportControl "Protected" - class_attributes (list class_attribute_list - (object ClassAttribute "NOT_IMPLICIT" - quid "41E59F2A00EC" - documentation "Means this decorator is not implicit. That is it was created by customer.") - (object ClassAttribute "IMPLICIT_DECORATOR" - quid "41E59F7200B4" - documentation "This means that the decorator is implicit. That is it was not created by the customer.") - (object ClassAttribute "IMPLICIT_DECORATOR_AND_FEATURE" - quid "41E59FA303B7" - documentation "This means the decorator and the feature where implicit. That is they were not created by the customer."))) - (object Association "$UNNAMED$0" - quid "3A79CF6C0378" - roles (list role_list - (object Role "attributes" - attributes (list Attribute_Set) - quid "3A79CF6E00BE" - documentation "Feature attributes. Key/value pairs. If it is desired that the feature attributes is explicitly empty and not have BeanInfo/reflection set it, set attributesExplicitEmpty to true." - label "attributes" - supplier "Logical View::beaninfo::FeatureAttributeMapEntry" - quidu "404CC85501F5" - client_cardinality (value cardinality "0..n") - Containment "By Value" - is_navigable TRUE) - (object Role "$UNNAMED$1" - quid "3A79CF6E00C8" - supplier "Logical View::beaninfo::FeatureDecorator" - quidu "3A799B3E01E9" - is_aggregate TRUE))) - (object Association "$UNNAMED$2" - quid "3A79D1350248" - roles (list role_list - (object Role "customizerClass" - attributes (list Attribute_Set) - quid "3A79D13601D2" - label "customizerClass" - supplier "Logical View::java::JavaClass" - quidu "36549FCC00FA" - client_cardinality (value cardinality "0..1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$3" - quid "3A79D13601E6" - supplier "Logical View::beaninfo::BeanDecorator" - quidu "3A79D0DF02D1"))) - (object Association "$UNNAMED$4" - quid "3A79D3080128" - roles (list role_list - (object Role "addListenerMethod" - quid "3A79D3090346" - label "addListenerMethod" - supplier "Logical View::java::Method" - quidu "3654AE910271" - client_cardinality (value cardinality "1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$5" - quid "3A79D309035A" - supplier "Logical View::beaninfo::EventSetDecorator" - quidu "3A79D1D2004F"))) - (object Association "$UNNAMED$6" - quid "3A79D3E10364" - roles (list role_list - (object Role "listenerMethods" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isTransient" - value TRUE) - (object Attribute - tool "Ecore" - name "isVolatile" - value TRUE)) - quid "3A79D3E6007D" - documentation -|listener methods. If it is desired that the list be explicitly empty and not have BeanInfo set it, then set listenerMethodsExplicitEmpty to true. -|<p> -|ListenerMethods will be decorated with MethodDecorators. -|<p> -|Note: This is a derived setting, which means it will not notify out changes to it. To here changes to it, listen on "serListMthd" notifications instead. - - label "listenerMethods" - supplier "Logical View::beaninfo::MethodProxy" - quidu "3A8984C901C3" - client_cardinality (value cardinality "1..n") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$7" - quid "3A79D3E60091" - supplier "Logical View::beaninfo::EventSetDecorator" - quidu "3A79D1D2004F")) - derived TRUE) - (object Association "$UNNAMED$8" - quid "3A79D4A80158" - roles (list role_list - (object Role "listenerType" - quid "3A79D4AA038B" - label "listenerType" - supplier "Logical View::java::JavaClass" - quidu "36549FCC00FA" - client_cardinality (value cardinality "1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$9" - quid "3A79D4AA03B4" - supplier "Logical View::beaninfo::EventSetDecorator" - quidu "3A79D1D2004F"))) - (object Association "$UNNAMED$10" - quid "3A79D4DF020B" - roles (list role_list - (object Role "removeListenerMethod" - quid "3A79D4E10395" - label "removeListenerMethod" - supplier "Logical View::java::Method" - quidu "3654AE910271" - client_cardinality (value cardinality "1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$11" - quid "3A79D4E103A9" - supplier "Logical View::beaninfo::EventSetDecorator" - quidu "3A79D1D2004F"))) - (object Association "$UNNAMED$12" - quid "3A79DA1A02F7" - roles (list role_list - (object Role "parameterDescriptors" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isTransient" - value TRUE) - (object Attribute - tool "Ecore" - name "isVolatile" - value TRUE)) - quid "3A79DA1C0231" - documentation -|This is the parameter descriptors list. -|<p> -|Note: This is a derived setting, which means it will not notify out changes to it. To here changes to it, listen on "serParmDesc" notifications instead. - - label "parameterDescriptors" - supplier "Logical View::beaninfo::ParameterDecorator" - quidu "3A79D9C20304" - client_cardinality (value cardinality "0..n") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$13" - quid "3A79DA1C0232" - supplier "Logical View::beaninfo::MethodDecorator" - quidu "3A79D35E0027")) - derived TRUE) - (object Association "$UNNAMED$14" - quid "3A79DB0B0339" - roles (list role_list - (object Role "propertyEditorClass" - quid "3A79DB0E013F" - label "propertyEditorClass" - supplier "Logical View::java::JavaClass" - quidu "36549FCC00FA" - client_cardinality (value cardinality "0..1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$15" - quid "3A79DB0E0171" - supplier "Logical View::beaninfo::PropertyDecorator" - quidu "3A79DA68010E"))) - (object Association "$UNNAMED$16" - quid "3A79DBBD0000" - roles (list role_list - (object Role "readMethod" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79DBBF0071" - label "readMethod" - supplier "Logical View::java::Method" - quidu "3654AE910271" - client_cardinality (value cardinality "0..1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$17" - quid "3A79DBBF0085" - supplier "Logical View::beaninfo::PropertyDecorator" - quidu "3A79DA68010E"))) - (object Association "$UNNAMED$18" - quid "3A79DBDF02D0" - roles (list role_list - (object Role "writeMethod" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79DBE101F7" - label "writeMethod" - supplier "Logical View::java::Method" - quidu "3654AE910271" - client_cardinality (value cardinality "0..1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$19" - quid "3A79DBE1020B" - supplier "Logical View::beaninfo::PropertyDecorator" - quidu "3A79DA68010E"))) - (object Association "$UNNAMED$20" - quid "3A79DE34036F" - roles (list role_list - (object Role "indexedReadMethod" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79DE3503CA" - label "indexedReadMethod" - supplier "Logical View::java::Method" - quidu "3654AE910271" - client_cardinality (value cardinality "0..1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$21" - quid "3A79DE3503DE" - supplier "Logical View::beaninfo::IndexedPropertyDecorator" - quidu "3A79DC450309"))) - (object Association "$UNNAMED$22" - quid "3A79DE540180" - roles (list role_list - (object Role "indexedWriteMethod" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "3A79DE5503D0" - label "indexedWriteMethod" - supplier "Logical View::java::Method" - quidu "3654AE910271" - client_cardinality (value cardinality "0..1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$23" - quid "3A79DE5503E4" - supplier "Logical View::beaninfo::IndexedPropertyDecorator" - quidu "3A79DC450309"))) - (object Association "$UNNAMED$24" - quid "3A89865B01D5" - roles (list role_list - (object Role "method" - quid "3A89865C01AE" - label "method" - supplier "Logical View::java::Method" - quidu "3654AE910271" - client_cardinality (value cardinality "1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$25" - quid "3A89865C01CC" - supplier "Logical View::beaninfo::MethodProxy" - quidu "3A8984C901C3"))) - (object Association "$UNNAMED$26" - quid "3C9A6EDD02C2" - roles (list role_list - (object Role "parameter" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isTransient" - value TRUE)) - quid "3C9A6EDE01FB" - documentation "The JavaParameter that this ParameterDecorator is decorating. Can't use eDecorates in this." - label "parameter" - supplier "Logical View::java::JavaParameter" - quidu "3654AD780280" - client_cardinality (value cardinality "0..1") - is_navigable TRUE) - (object Role "$UNNAMED$27" - quid "3C9A6EDE0205" - supplier "Logical View::beaninfo::ParameterDecorator" - quidu "3A79D9C20304"))) - (object Association "$UNNAMED$28" - quid "41F016E7002E" - roles (list role_list - (object Role "serParmDesc" - quid "41F016E802A7" - documentation "This is a private feature. It is used internally only. " - label "serParmDesc" - supplier "Logical View::beaninfo::ParameterDecorator" - quidu "3A79D9C20304" - client_cardinality (value cardinality "0..n") - Containment "By Value" - exportControl "Private" - is_navigable TRUE) - (object Role "$UNNAMED$29" - quid "41F016E802B1" - supplier "Logical View::beaninfo::MethodDecorator" - quidu "3A79D35E0027" - is_aggregate TRUE))) - (object Association "$UNNAMED$30" - quid "41F11E710387" - roles (list role_list - (object Role "eventAdapterClass" - quid "41F11E730249" - documentation -|For some listener interfaces an adapter class is provided that implements default no-op methods, e.g. java.awt.event.FocusEvent which has java.awt.event.FocusAdapter. The Adapter class is provided in a key/value pair on the java.beans.EventSetDescriptor with a key defined in a static final constants EVENTADAPTERCLASS = "eventAdapterClass". - - label "eventAdapterClass" - supplier "Logical View::java::JavaClass" - quidu "36549FCC00FA" - client_cardinality (value cardinality "0..1") - Containment "By Reference" - is_navigable TRUE) - (object Role "$UNNAMED$31" - quid "41F11E73025D" - supplier "Logical View::beaninfo::EventSetDecorator" - quidu "3A79D1D2004F"))) - (object Association "$UNNAMED$32" - quid "41F1278A01A5" - roles (list role_list - (object Role "serListMthd" - quid "41F1278B021F" - documentation "This is a private feature. It is used internally only. " - label "serListMthd" - supplier "Logical View::beaninfo::MethodProxy" - quidu "3A8984C901C3" - client_cardinality (value cardinality "1..n") - Containment "By Value" - exportControl "Private" - is_navigable TRUE) - (object Role "$UNNAMED$33" - quid "41F1278B0229" - supplier "Logical View::beaninfo::EventSetDecorator" - quidu "3A79D1D2004F" - is_aggregate TRUE))) - (object Association "$UNNAMED$34" - quid "4207D83F01DA" - roles (list role_list - (object Role "field" - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "isUnsettable" - value TRUE)) - quid "4207D8400290" - documentation "If this is set, then this property is a field and not a getter/setter property. This is an extension that the Visual Editor uses to the BeanInfo model." - label "field" - supplier "Logical View::java::Field" - quidu "3654AF8F0280" - client_cardinality (value cardinality "0..1") - is_navigable TRUE) - (object Role "$UNNAMED$35" - quid "4207D8400292" - supplier "Logical View::beaninfo::PropertyDecorator" - quidu "3A79DA68010E")))) - logical_presentations (list unit_reference_list - (object ClassDiagram "Main" - quid "3A799AC8038E" - title "Main" - zoom 100 - max_height 28350 - max_width 21600 - origin_x 0 - origin_y 94 - items (list diagram_item_list - (object NoteView @1 - location (3232, 1712) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @1 - location (2950, 1624) - fill_color 13434879 - nlines 3 - max_width 528 - label "ListenerMethods will be decorated with MethodDecorators.") - line_color 3342489 - fill_color 13434879 - width 588 - height 188) - (object NoteView @2 - location (3392, 2784) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @2 - location (3076, 2568) - fill_color 13434879 - nlines 8 - max_width 596 - label -|MethodProxies will be in the eBehaviors setting for any methods that are in the JavaClass methods setting so that they are not duplicated. -| -|MethodProxies would also have MethodDecorators. - ) - line_color 3342489 - fill_color 13434879 - width 656 - height 444) - (object ClassView "Class" "Logical View::java::JavaEvent" @3 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (1248, 2688) - font (object Font - size 10 - face "Arial" - bold FALSE - italics TRUE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @3 - location (1114, 2614) - fill_color 13434879 - nlines 1 - max_width 268 - justify 0 - label "JavaEvent") - icon_style "Icon" - line_color 3342489 - fill_color 16777088 - quidu "3C62FAF103C8" - width 286 - height 172 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::BeanEvent" @4 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (1232, 2992) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @4 - location (1096, 2941) - fill_color 13434879 - nlines 1 - max_width 272 - justify 0 - label "BeanEvent") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3CB09CA90212" - width 290 - height 126 - annotation 8 - autoResize TRUE) - (object InheritView "" @5 - stereotype TRUE - line_color 3342489 - quidu "3CB09CB6038D" - client @4 - supplier @3 - line_style 0) - (object NoteView @6 - location (1856, 2944) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @6 - location (1561, 2815) - fill_color 13434879 - nlines 5 - max_width 555 - label "The BeanEvent will be under the JavaClass' events and allEvents feature. Each BeanEvent will be decorated by an EventSetDecorator.") - line_color 3342489 - fill_color 13434879 - width 615 - height 270) - (object ClassView "Class" "Logical View::ecore::EAnnotation" @7 - ShowCompartmentStereotypes TRUE - location (1056, 128) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @7 - location (906, 54) - fill_color 13434879 - nlines 1 - max_width 300 - justify 0 - label "EAnnotation") - icon_style "Icon" - line_color 3342489 - fill_color 16776960 - quidu "3D98A1C701AB" - width 318 - height 172 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::ecore::EOperation" @8 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (2848, 2272) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @8 - location (2702, 2198) - fill_color 13434879 - nlines 1 - max_width 292 - justify 0 - label "EOperation") - icon_style "Icon" - line_color 3342489 - fill_color 16776960 - quidu "3904DAA200A0" - width 310 - height 172 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::FeatureAttributeMapEntry" @9 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (2224, 176) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @9 - location (1887, 92) - fill_color 13434879 - nlines 1 - max_width 674 - justify 0 - label "FeatureAttributeMapEntry") - stereotype (object ItemLabel - Parent_View @9 - location (1887, 42) - fill_color 13434879 - anchor 10 - nlines 1 - max_width 674 - justify 0 - label "<<MapEntry>>") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "404CC85501F5" - compartment (object Compartment - Parent_View @9 - location (1887, 153) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 3 - max_width 581) - width 692 - height 292 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::FeatureDecorator" @10 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - ShowOperationSignature TRUE - location (1072, 656) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @10 - location (665, 325) - fill_color 13434879 - nlines 1 - max_width 814 - justify 0 - label "FeatureDecorator") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A799B3E01E9" - compartment (object Compartment - Parent_View @10 - location (665, 386) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 12 - max_width 700) - width 832 - height 686 - annotation 8 - autoResize TRUE) - (object InheritTreeView "" @11 - location (1072, 1105) - line_color 3342489 - fill_color 13434879 - supplier @10 - vertices (list Points - (1072, 1105) - (1072, 999))) - (object InheritView "" @12 - stereotype TRUE - line_color 3342489 - quidu "3DFA185900DC" - client @10 - supplier @7 - line_style 0) - (object AssociationViewNew "$UNNAMED$0" @13 - location (1682, 401) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79CF6C0378" - roleview_list (list RoleViews - (object RoleView "attributes" @14 - Parent_View @13 - location (626, -63) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @15 - Parent_View @14 - location (1747, 309) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 207 - justify 0 - label "+attributes" - pctDist 0.457012 - height 62 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79CF6E00BE" - client @13 - supplier @9 - line_style 0 - label (object SegLabel @16 - Parent_View @14 - location (1812, 396) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..n" - pctDist 0.584653 - height 45 - orientation 1)) - (object RoleView "$UNNAMED$1" @17 - Parent_View @13 - location (626, -63) - stereotype TRUE - line_color 3342489 - quidu "3A79CF6E00C8" - client @13 - supplier @10 - line_style 0))) - (object ClassView "Class" "Logical View::beaninfo::FeatureAttributeValue" @18 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (3456, 176) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @18 - location (2683, 117) - fill_color 13434879 - nlines 1 - max_width 1546 - justify 0 - label "FeatureAttributeValue") - stereotype (object ItemLabel - Parent_View @18 - location (2683, 67) - fill_color 13434879 - anchor 10 - nlines 1 - max_width 1546 - justify 0 - label "<<datatype>>") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "41E582F800BB" - compartment (object Compartment - Parent_View @18 - location (2683, 178) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 2 - max_width 1493) - width 1564 - height 242 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::ImplicitItem" @19 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (2288, 656) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @19 - location (1815, 547) - fill_color 13434879 - nlines 1 - max_width 946 - justify 0 - label "ImplicitItem") - stereotype (object ItemLabel - Parent_View @19 - location (1815, 497) - fill_color 13434879 - anchor 10 - nlines 1 - max_width 946 - justify 0 - label "<<enumeration>>") - icon_style "Icon" - line_color 3342489 - fill_color 12615935 - quidu "41E59E5D0296" - compartment (object Compartment - Parent_View @19 - location (1815, 608) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 4 - max_width 812) - width 964 - height 342 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::java::JavaParameter" @20 - ShowCompartmentStereotypes TRUE - location (4304, 1792) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @20 - location (4125, 1718) - fill_color 13434879 - nlines 1 - max_width 358 - justify 0 - label "JavaParameter") - icon_style "Icon" - line_color 3342489 - fill_color 16777088 - quidu "3654AD780280" - width 376 - height 172 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::ParameterDecorator" @21 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (4864, 1360) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @21 - location (4631, 1279) - fill_color 13434879 - nlines 1 - max_width 466 - justify 0 - label "ParameterDecorator") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A79D9C20304" - compartment (object Compartment - Parent_View @21 - location (4631, 1340) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 2 - max_width 294) - width 484 - height 186 - annotation 8 - autoResize TRUE) - (object AssociationViewNew "$UNNAMED$26" @22 - location (4578, 1579) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3C9A6EDD02C2" - roleview_list (list RoleViews - (object RoleView "parameter" @23 - Parent_View @22 - location (1666, -21) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @24 - Parent_View @23 - location (4540, 1659) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 215 - justify 0 - label "+parameter" - pctDist 0.386598 - height 41 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3C9A6EDE01FB" - client @22 - supplier @20 - line_style 0 - label (object SegLabel @25 - Parent_View @23 - location (4480, 1588) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist 0.412371 - height 54 - orientation 1)) - (object RoleView "$UNNAMED$27" @26 - Parent_View @22 - location (1666, -21) - stereotype TRUE - line_color 3342489 - quidu "3C9A6EDE0205" - client @22 - supplier @21 - line_style 0))) - (object InheritView "" @27 - stereotype TRUE - line_color 3342489 - quidu "3A79DEBB01C4" - client @21 - supplier @10 - line_style 3 - origin_attachment (4658, 1267) - terminal_attachment (4658, 1105) - drawSupplier @11) - (object ClassView "Class" "Logical View::beaninfo::MethodDecorator" @28 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (3712, 1360) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @28 - location (3362, 1279) - fill_color 13434879 - nlines 1 - max_width 700 - justify 0 - label "MethodDecorator") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A79D35E0027" - compartment (object Compartment - Parent_View @28 - location (3362, 1340) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 2 - max_width 594) - width 718 - height 186 - annotation 8 - autoResize TRUE) - (object InheritView "" @29 - stereotype TRUE - line_color 3342489 - quidu "3A79DEA603E1" - client @28 - supplier @10 - line_style 3 - origin_attachment (3694, 1267) - terminal_attachment (3694, 1105) - drawSupplier @11) - (object AssociationViewNew "$UNNAMED$12" @30 - location (4314, 1490) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79DA1A02F7" - roleview_list (list RoleViews - (object RoleView "parameterDescriptors" @31 - Parent_View @30 - location (2842, 594) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @32 - Parent_View @31 - location (4389, 1427) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 427 - justify 0 - label "+parameterDescriptors" - pctDist 0.308262 - height 69 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79DA1C0231" - client @30 - supplier @21 - vertices (list Points - (4314, 1490) - (4373, 1503) - (4621, 1429)) - line_style 0 - label (object SegLabel @33 - Parent_View @31 - location (4555, 1491) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..n" - pctDist 0.745977 - height 41 - orientation 1)) - (object RoleView "$UNNAMED$13" @34 - Parent_View @30 - location (2842, 594) - stereotype TRUE - line_color 3342489 - quidu "3A79DA1C0232" - client @30 - supplier @28 - line_style 0))) - (object AssociationViewNew "$UNNAMED$28" @35 - location (4385, 1273) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "41F016E7002E" - roleview_list (list RoleViews - (object RoleView "serParmDesc" @36 - Parent_View @35 - location (1265, -71) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @37 - Parent_View @36 - location (4534, 1252) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 285 - justify 0 - label "-serParmDesc" - pctDist 0.595893 - height 48 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "41F016E802A7" - client @35 - supplier @21 - line_style 0 - label (object SegLabel @38 - Parent_View @36 - location (4590, 1364) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..n" - pctDist 0.904386 - height 54 - orientation 1)) - (object RoleView "$UNNAMED$29" @39 - Parent_View @35 - location (1265, -71) - stereotype TRUE - line_color 3342489 - quidu "41F016E802B1" - client @35 - supplier @28 - vertices (list Points - (4385, 1273) - (4326, 1263) - (4071, 1302)) - line_style 0))) - (object ClassView "Class" "Logical View::java::Method" @40 - ShowCompartmentStereotypes TRUE - SuppressAttribute TRUE - IncludeAttribute TRUE - location (2592, 3264) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @40 - location (2492, 3190) - fill_color 13434879 - nlines 1 - max_width 200 - justify 0 - label "Method") - icon_style "Icon" - line_color 3342489 - fill_color 16776960 - quidu "3654AE910271" - width 218 - height 172 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::MethodProxy" @41 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (2560, 2768) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @41 - location (2398, 2717) - fill_color 13434879 - nlines 1 - max_width 324 - justify 0 - label "MethodProxy") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A8984C901C3" - width 342 - height 126 - annotation 8 - autoResize TRUE) - (object AttachView "" @42 - stereotype TRUE - line_color 3342489 - client @2 - supplier @41 - line_style 0) - (object AssociationViewNew "$UNNAMED$24" @43 - location (2575, 3004) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A89865B01D5" - roleview_list (list RoleViews - (object RoleView "method" @44 - Parent_View @43 - location (271, 1084) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @45 - Parent_View @44 - location (2539, 3072) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 162 - justify 0 - label "+method" - pctDist 0.376068 - height 41 - orientation 1) - stereotype TRUE - line_color 3342489 - quidu "3A89865C01AE" - client @43 - supplier @40 - line_style 0 - label (object SegLabel @46 - Parent_View @44 - location (2639, 3158) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "1" - pctDist 0.900000 - height 54 - orientation 0)) - (object RoleView "$UNNAMED$25" @47 - Parent_View @43 - location (271, 1084) - stereotype TRUE - line_color 3342489 - quidu "3A89865C01CC" - client @43 - supplier @41 - line_style 0))) - (object InheritView "" @48 - stereotype TRUE - line_color 3342489 - quidu "3DFA19B600DE" - client @41 - supplier @8 - line_style 0) - (object AttachView "" @49 - stereotype TRUE - line_color 3342489 - client @6 - supplier @4 - line_style 0) - (object ClassView "Class" "Logical View::beaninfo::IndexedPropertyDecorator" @50 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (752, 2288) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @50 - location (460, 2237) - fill_color 13434879 - nlines 1 - max_width 584 - justify 0 - label "IndexedPropertyDecorator") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A79DC450309" - width 602 - height 126 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::BeanDecorator" @51 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (512, 1456) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @51 - location (7, 1150) - fill_color 13434879 - nlines 1 - max_width 1010 - justify 0 - label "BeanDecorator") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A79D0DF02D1" - compartment (object Compartment - Parent_View @51 - location (7, 1211) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 11 - max_width 868) - width 1028 - height 636 - annotation 8 - autoResize TRUE) - (object InheritView "" @52 - stereotype TRUE - line_color 3342489 - quidu "3A79DE8E007F" - client @51 - supplier @10 - line_style 3 - origin_attachment (381, 1137) - terminal_attachment (381, 1105) - drawSupplier @11) - (object ClassView "Class" "Logical View::beaninfo::EventSetDecorator" @53 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - location (2848, 1424) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @53 - location (2395, 1268) - fill_color 13434879 - nlines 2 - max_width 906 - justify 0 - label "EventSetDecorator") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A79D1D2004F" - compartment (object Compartment - Parent_View @53 - location (2395, 1329) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 4 - max_width 778) - width 924 - height 336 - annotation 8 - autoResize TRUE) - (object InheritView "" @54 - stereotype TRUE - line_color 3342489 - quidu "3A79DEA200EC" - client @53 - supplier @10 - line_style 3 - origin_attachment (2831, 1255) - terminal_attachment (2831, 1105) - drawSupplier @11) - (object AssociationViewNew "$UNNAMED$6" @55 - location (2692, 2148) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79D3E10364" - roleview_list (list RoleViews - (object RoleView "listenerMethods" @56 - Parent_View @55 - location (1828, 1252) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @57 - Parent_View @56 - location (2580, 2585) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 324 - justify 0 - label "+listenerMethods" - pctDist 0.790503 - height 19 - orientation 1) - stereotype TRUE - line_color 3342489 - quidu "3A79D3E6007D" - client @55 - supplier @41 - line_style 0 - label (object SegLabel @58 - Parent_View @56 - location (2598, 2522) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "1..n" - pctDist 0.676961 - height 14 - orientation 1)) - (object RoleView "$UNNAMED$7" @59 - Parent_View @55 - location (1828, 1252) - stereotype TRUE - line_color 3342489 - quidu "3A79D3E60091" - client @55 - supplier @53 - line_style 0))) - (object AttachView "" @60 - stereotype TRUE - line_color 3342489 - client @1 - supplier @55 - line_style 0) - (object AssociationViewNew "$UNNAMED$32" @61 - location (2525, 2221) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "41F1278A01A5" - roleview_list (list RoleViews - (object RoleView "serListMthd" @62 - Parent_View @61 - location (269, 813) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @63 - Parent_View @62 - location (2296, 2688) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 229 - justify 0 - label "-serListMthd" - pctDist 0.765012 - height 39 - orientation 1) - stereotype TRUE - line_color 3342489 - quidu "41F1278B021F" - client @61 - supplier @41 - vertices (list Points - (2525, 2221) - (2303, 2771) - (2388, 2769)) - line_style 0 - label (object SegLabel @64 - Parent_View @62 - location (2239, 2587) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "1..n" - pctDist 0.657692 - height 129 - orientation 1)) - (object RoleView "$UNNAMED$33" @65 - Parent_View @61 - location (269, 813) - stereotype TRUE - line_color 3342489 - quidu "41F1278B0229" - client @61 - supplier @53 - line_style 0))) - (object AttachView "" @66 - stereotype TRUE - line_color 3342489 - client @6 - supplier @53 - vertices (list Points - (1878, 2808) - (2016, 2021) - (2612, 1592)) - line_style 0) - (object ClassView "Class" "Logical View::java::Method" @67 - ShowCompartmentStereotypes TRUE - SuppressAttribute TRUE - location (1664, 2096) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @67 - location (1564, 2022) - fill_color 13434879 - nlines 1 - max_width 200 - justify 0 - label "Method") - icon_style "Icon" - line_color 3342489 - fill_color 16776960 - quidu "3654AE910271" - width 218 - height 172 - annotation 8 - autoResize TRUE) - (object AssociationViewNew "$UNNAMED$20" @68 - location (1315, 2289) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79DE34036F" - roleview_list (list RoleViews - (object RoleView "indexedReadMethod" @69 - Parent_View @68 - location (563, 401) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @70 - Parent_View @69 - location (1421, 2275) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 404 - justify 0 - label "+indexedReadMethod" - pctDist 0.385248 - height 14 - orientation 1) - stereotype TRUE - line_color 3342489 - quidu "3A79DE3503CA" - client @68 - supplier @67 - vertices (list Points - (1315, 2289) - (1375, 2289) - (1554, 2168)) - line_style 0 - label (object SegLabel @71 - Parent_View @69 - location (1249, 2238) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist -0.240775 - height 52 - orientation 0)) - (object RoleView "$UNNAMED$21" @72 - Parent_View @68 - location (563, 401) - stereotype TRUE - line_color 3342489 - quidu "3A79DE3503DE" - client @68 - supplier @50 - line_style 0))) - (object AssociationViewNew "$UNNAMED$22" @73 - location (1442, 2361) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79DE540180" - roleview_list (list RoleViews - (object RoleView "indexedWriteMethod" @74 - Parent_View @73 - location (690, 473) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @75 - Parent_View @74 - location (1597, 2374) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 409 - justify 0 - label "+indexedWriteMethod" - pctDist 0.501177 - height 37 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79DE5503D0" - client @73 - supplier @67 - vertices (list Points - (1442, 2361) - (1632, 2382) - (1654, 2182)) - line_style 0 - label (object SegLabel @76 - Parent_View @74 - location (1639, 2306) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist 0.681972 - height 2 - orientation 0)) - (object RoleView "$UNNAMED$23" @77 - Parent_View @73 - location (690, 473) - stereotype TRUE - line_color 3342489 - quidu "3A79DE5503E4" - client @73 - supplier @50 - line_style 0))) - (object AssociationViewNew "$UNNAMED$4" @78 - location (1898, 1691) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79D3080128" - roleview_list (list RoleViews - (object RoleView "addListenerMethod" @79 - Parent_View @78 - location (1034, 795) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @80 - Parent_View @79 - location (1561, 1824) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 385 - justify 0 - label "+addListenerMethod" - pctDist 0.627386 - height 90 - orientation 1) - stereotype TRUE - line_color 3342489 - quidu "3A79D3090346" - client @78 - supplier @67 - vertices (list Points - (1898, 1691) - (1647, 1763) - (1658, 2009)) - line_style 0 - label (object SegLabel @81 - Parent_View @79 - location (1699, 1853) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "1" - pctDist 0.694068 - height 48 - orientation 0)) - (object RoleView "$UNNAMED$5" @82 - Parent_View @78 - location (1034, 795) - stereotype TRUE - line_color 3342489 - quidu "3A79D309035A" - client @78 - supplier @53 - line_style 0))) - (object AssociationViewNew "$UNNAMED$10" @83 - location (2162, 1812) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79D4DF020B" - roleview_list (list RoleViews - (object RoleView "removeListenerMethod" @84 - Parent_View @83 - location (1298, 916) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @85 - Parent_View @84 - location (2115, 1846) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 448 - justify 0 - label "+removeListenerMethod" - pctDist 0.129058 - height 6 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79D4E10395" - client @83 - supplier @67 - line_style 0 - label (object SegLabel @86 - Parent_View @84 - location (1839, 2058) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "1" - pctDist 0.900000 - height 54 - orientation 0)) - (object RoleView "$UNNAMED$11" @87 - Parent_View @83 - location (1298, 916) - stereotype TRUE - line_color 3342489 - quidu "3A79D4E103A9" - client @83 - supplier @53 - line_style 0))) - (object ClassView "Class" "Logical View::java::JavaClass" @88 - ShowCompartmentStereotypes TRUE - SuppressAttribute TRUE - location (240, 2192) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @88 - location (106, 2118) - fill_color 13434879 - nlines 1 - max_width 268 - justify 0 - label "JavaClass") - icon_style "Icon" - line_color 3342489 - fill_color 16776960 - quidu "36549FCC00FA" - width 286 - height 172 - annotation 8 - autoResize TRUE) - (object AssociationViewNew "$UNNAMED$2" @89 - location (332, 1939) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79D1350248" - roleview_list (list RoleViews - (object RoleView "customizerClass" @90 - Parent_View @89 - location (92, 1043) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @91 - Parent_View @90 - location (298, 2044) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 328 - justify 0 - label "+customizerClass" - pctDist 0.631674 - height 4 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79D13601D2" - client @89 - supplier @88 - line_style 0 - label (object SegLabel @92 - Parent_View @90 - location (326, 1989) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist 0.284188 - height 12 - orientation 0)) - (object RoleView "$UNNAMED$3" @93 - Parent_View @89 - location (92, 1043) - stereotype TRUE - line_color 3342489 - quidu "3A79D13601E6" - client @89 - supplier @51 - line_style 0))) - (object AssociationViewNew "$UNNAMED$8" @94 - location (1384, 1854) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79D4A80158" - roleview_list (list RoleViews - (object RoleView "listenerType" @95 - Parent_View @94 - location (520, 958) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @96 - Parent_View @95 - location (782, 2066) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 259 - justify 0 - label "+listenerType" - pctDist 0.610677 - height 33 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79D4AA038B" - client @94 - supplier @88 - line_style 0 - label (object SegLabel @97 - Parent_View @95 - location (977, 2061) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "1" - pctDist 0.429590 - height 83 - orientation 0)) - (object RoleView "$UNNAMED$9" @98 - Parent_View @94 - location (520, 958) - stereotype TRUE - line_color 3342489 - quidu "3A79D4AA03B4" - client @94 - supplier @53 - line_style 0))) - (object AssociationViewNew "$UNNAMED$30" @99 - location (1392, 1913) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "41F11E710387" - roleview_list (list RoleViews - (object RoleView "eventAdapterClass" @100 - Parent_View @99 - location (-864, 505) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @101 - Parent_View @100 - location (771, 2132) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 367 - justify 0 - label "+eventAdapterClass" - pctDist 0.629702 - height 10 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "41F11E730249" - client @99 - supplier @88 - vertices (list Points - (1392, 1913) - (766, 2124) - (383, 2172)) - line_style 0 - label (object SegLabel @102 - Parent_View @100 - location (494, 2197) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist 0.898257 - height 38 - orientation 0)) - (object RoleView "$UNNAMED$31" @103 - Parent_View @99 - location (-864, 505) - stereotype TRUE - line_color 3342489 - quidu "41F11E73025D" - client @99 - supplier @53 - line_style 0))) - (object ClassView "Class" "Logical View::java::Field" @104 - ShowCompartmentStereotypes TRUE - location (816, 2672) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @104 - location (720, 2597) - fill_color 13434879 - nlines 1 - max_width 192 - justify 0 - label "Field") - icon_style "Icon" - line_color 3342489 - fill_color 16777088 - quidu "3654AF8F0280" - width 210 - height 174 - annotation 8 - autoResize TRUE) - (object ClassView "Class" "Logical View::beaninfo::PropertyDecorator" @105 - ShowCompartmentStereotypes TRUE - IncludeAttribute TRUE - IncludeOperation TRUE - ShowOperationSignature TRUE - location (1808, 1456) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @105 - location (1316, 1200) - fill_color 13434879 - nlines 1 - max_width 984 - justify 0 - label "PropertyDecorator") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A79DA68010E" - compartment (object Compartment - Parent_View @105 - location (1316, 1261) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - icon_style "Icon" - fill_color 16777215 - anchor 2 - nlines 9 - max_width 838) - width 1002 - height 536 - annotation 8 - autoResize TRUE) - (object InheritView "" @106 - stereotype TRUE - line_color 3342489 - quidu "3A79DE840388" - client @50 - supplier @105 - line_style 0) - (object InheritView "" @107 - stereotype TRUE - line_color 3342489 - quidu "3A79DE9702BD" - client @105 - supplier @10 - line_style 3 - origin_attachment (1772, 1188) - terminal_attachment (1772, 1105) - drawSupplier @11) - (object AssociationViewNew "$UNNAMED$16" @108 - location (1003, 1968) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79DBBD0000" - roleview_list (list RoleViews - (object RoleView "readMethod" @109 - Parent_View @108 - location (235, 1072) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @110 - Parent_View @109 - location (1308, 2033) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 254 - justify 0 - label "+readMethod" - pctDist 0.553714 - height 7 - orientation 1) - stereotype TRUE - line_color 3342489 - quidu "3A79DBBF0071" - client @108 - supplier @67 - line_style 0 - label (object SegLabel @111 - Parent_View @109 - location (1471, 2131) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist 0.873365 - height 72 - orientation 1)) - (object RoleView "$UNNAMED$17" @112 - Parent_View @108 - location (235, 1072) - stereotype TRUE - line_color 3342489 - quidu "3A79DBBF0085" - client @108 - supplier @105 - vertices (list Points - (1003, 1968) - (909, 1950) - (1316, 1724)) - line_style 0))) - (object AssociationViewNew "$UNNAMED$18" @113 - location (1035, 2106) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79DBDF02D0" - roleview_list (list RoleViews - (object RoleView "writeMethod" @114 - Parent_View @113 - location (267, 1210) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @115 - Parent_View @114 - location (1325, 2090) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 254 - justify 0 - label "+writeMethod" - pctDist 0.560930 - height 12 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79DBE101F7" - client @113 - supplier @67 - line_style 0 - label (object SegLabel @116 - Parent_View @114 - location (1503, 2056) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist 0.901632 - height 43 - orientation 0)) - (object RoleView "$UNNAMED$19" @117 - Parent_View @113 - location (267, 1210) - stereotype TRUE - line_color 3342489 - quidu "3A79DBE1020B" - client @113 - supplier @105 - vertices (list Points - (1035, 2106) - (975, 2107) - (1462, 1724)) - line_style 0))) - (object AssociationViewNew "$UNNAMED$14" @118 - location (844, 1907) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "3A79DB0B0339" - roleview_list (list RoleViews - (object RoleView "propertyEditorClass" @119 - Parent_View @118 - location (76, 1011) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @120 - Parent_View @119 - location (778, 1967) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 392 - justify 0 - label "+propertyEditorClass" - pctDist 0.166430 - height 26 - orientation 0) - stereotype TRUE - line_color 3342489 - quidu "3A79DB0E013F" - client @118 - supplier @88 - line_style 0 - label (object SegLabel @121 - Parent_View @119 - location (1123, 1915) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist -0.490182 - height 126 - orientation 0)) - (object RoleView "$UNNAMED$15" @122 - Parent_View @118 - location (76, 1011) - stereotype TRUE - line_color 3342489 - quidu "3A79DB0E0171" - client @118 - supplier @105 - line_style 0))) - (object AssociationViewNew "$UNNAMED$34" @123 - location (1296, 2186) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - stereotype TRUE - line_color 3342489 - quidu "4207D83F01DA" - roleview_list (list RoleViews - (object RoleView "field" @124 - Parent_View @123 - location (-112, 778) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object SegLabel @125 - Parent_View @124 - location (938, 2513) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 1 - anchor_loc 1 - nlines 1 - max_width 112 - justify 0 - label "+field" - pctDist 0.892515 - height 57 - orientation 1) - stereotype TRUE - line_color 3342489 - quidu "4207D8400290" - client @123 - supplier @104 - vertices (list Points - (1296, 2186) - (1103, 2463) - (921, 2593)) - line_style 0 - label (object SegLabel @126 - Parent_View @124 - location (1046, 2557) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - anchor 2 - anchor_loc 1 - nlines 1 - max_width 15 - justify 0 - label "0..1" - pctDist 0.780986 - height 43 - orientation 0)) - (object RoleView "$UNNAMED$35" @127 - Parent_View @123 - location (-112, 778) - stereotype TRUE - line_color 3342489 - quidu "4207D8400292" - client @123 - supplier @105 - line_style 0))))))) diff --git a/plugins/org.eclipse.jem.beaninfo/rose/introspect.mdl b/plugins/org.eclipse.jem.beaninfo/rose/introspect.mdl deleted file mode 100644 index c7ca9efff..000000000 --- a/plugins/org.eclipse.jem.beaninfo/rose/introspect.mdl +++ /dev/null @@ -1,556 +0,0 @@ - -(object Petal - version 47 - _written "Rose 8.0.0303.1400" - charSet 0) - -(object Design "Logical View" - is_unit TRUE - is_loaded TRUE - attributes (list Attribute_Set - (object Attribute - tool "Java" - name "IDE" - value "Internal Editor") - (object Attribute - tool "Java" - name "UserDefineTagName1" - value "") - (object Attribute - tool "Java" - name "UserDefineTagText1" - value "") - (object Attribute - tool "Java" - name "UserDefineTagApply1" - value "") - (object Attribute - tool "Java" - name "UserDefineTagName2" - value "") - (object Attribute - tool "Java" - name "UserDefineTagText2" - value "") - (object Attribute - tool "Java" - name "UserDefineTagApply2" - value "") - (object Attribute - tool "Java" - name "UserDefineTagName3" - value "") - (object Attribute - tool "Java" - name "UserDefineTagText3" - value "") - (object Attribute - tool "Java" - name "UserDefineTagApply3" - value "")) - quid "3A79EBA50331" - defaults (object defaults - rightMargin 0.250000 - leftMargin 0.250000 - topMargin 0.250000 - bottomMargin 0.500000 - pageOverlap 0.250000 - clipIconLabels TRUE - autoResize TRUE - snapToGrid TRUE - gridX 16 - gridY 16 - defaultFont (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - showMessageNum 1 - showClassOfObject TRUE - notation "Unified") - root_usecase_package (object Class_Category "Use Case View" - quid "3A7999AD0297" - exportControl "Public" - global TRUE - logical_models (list unit_reference_list) - logical_presentations (list unit_reference_list - (object UseCaseDiagram "Main" - quid "3A7999B702F6" - title "Main" - zoom 100 - max_height 28350 - max_width 21600 - origin_x 0 - origin_y 0 - items (list diagram_item_list)))) - root_category (object Class_Category "Logical View" - quid "3A7999AD028E" - exportControl "Public" - global TRUE - subsystem "Component View" - quidu "3A7999AD02A1" - logical_models (list unit_reference_list - (object Class_Category "ecore" - is_unit TRUE - is_loaded FALSE - file_name "$WorkspaceRoot\\org.eclipse.emf.ecore\\model\\org.eclipse.emf.Ecore.cat" - quid "39A5ED04004E") - (object Class_Category "java" - is_unit TRUE - is_loaded FALSE - file_name "$WorkspaceRoot\\org.eclipse.jem\\rose\\edocjava2.cat" - quid "36549F2C004E") - (object Class_Category "beaninfo" - is_unit TRUE - is_loaded FALSE - file_name "$WorkspaceRoot\\org.eclipse.jem.beaninfo\\rose\\beaninfo.cat" - quid "3A799ABB0353")) - logical_presentations (list unit_reference_list - (object ClassDiagram "Main" - quid "3A7999B70309" - title "Main" - zoom 100 - max_height 28350 - max_width 21600 - origin_x 0 - origin_y 0 - items (list diagram_item_list - (object CategoryView "Logical View::beaninfo" @1 - location (272, 224) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @1 - location (128, 140) - fill_color 13434879 - nlines 2 - max_width 288 - justify 0 - label "beaninfo") - icon_style "Icon" - line_color 3342489 - fill_color 13434879 - quidu "3A799ABB0353" - width 300 - height 180))) - (object ClassDiagram "Dependencies (Don't edit)" - quid "3B869C9102E4" - title "Dependencies (Don't edit)" - zoom 100 - max_height 28350 - max_width 21600 - origin_x 0 - origin_y 0 - items (list diagram_item_list - (object CategoryView "Logical View::ecore" @2 - location (256, 240) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @2 - location (112, 156) - fill_color 13434879 - nlines 2 - max_width 288 - justify 0 - label "ecore") - icon_style "Icon" - line_color 3342489 - fill_color 16776960 - quidu "39A5ED04004E" - width 300 - height 180) - (object CategoryView "Logical View::java" @3 - location (896, 256) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @3 - location (749, 222) - fill_color 13434879 - nlines 2 - max_width 294 - justify 0 - label "java") - stereotype (object ItemLabel - Parent_View @3 - location (749, 172) - fill_color 13434879 - anchor 10 - nlines 1 - max_width 294 - justify 0 - label "<<metamodel>>") - icon_style "Icon" - line_color 3342489 - fill_color 16776960 - quidu "36549F2C004E" - width 306 - height 180) - (object NoteView @4 - location (688, 688) - font (object Font - size 10 - face "Arial" - bold FALSE - italics FALSE - underline FALSE - strike FALSE - color 0 - default_color TRUE) - label (object ItemLabel - Parent_View @4 - location (280, 532) - fill_color 13434879 - nlines 7 - max_width 780 - label "These are packages (cat files) that this model depends on. They must not be edited in here. They are only be edited by the model that owns them.") - line_color 3342489 - fill_color 16744703 - width 840 - height 325))))) - root_subsystem (object SubSystem "Component View" - quid "3A7999AD02A1" - physical_models (list unit_reference_list) - physical_presentations (list unit_reference_list - (object Module_Diagram "Main" - quid "3A7999B702F5" - title "Main" - zoom 100 - max_height 28350 - max_width 21600 - origin_x 0 - origin_y 0 - items (list diagram_item_list)))) - process_structure (object Processes - quid "3A7999AD02A2" - ProcsNDevs (list - (object Process_Diagram "Deployment View" - quid "3A7999AD02A4" - title "Deployment View" - zoom 100 - max_height 28350 - max_width 21600 - origin_x 0 - origin_y 0 - items (list diagram_item_list)))) - properties (object Properties - attributes (list Attribute_Set - (object Attribute - tool "Ecore" - name "propertyId" - value "809135969") - (object Attribute - tool "Ecore" - name "default__Category" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "packageName" - value "") - (object Attribute - tool "Ecore" - name "nsPrefix" - value "") - (object Attribute - tool "Ecore" - name "nsURI" - value "") - (object Attribute - tool "Ecore" - name "basePackage" - value "") - (object Attribute - tool "Ecore" - name "prefix" - value "") - (object Attribute - tool "Ecore" - name "annotation" - value ""))) - (object Attribute - tool "Ecore" - name "default__Class" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "classifierName" - value "") - (object Attribute - tool "Ecore" - name "constraints" - value "") - (object Attribute - tool "Ecore" - name "xmlName" - value "") - (object Attribute - tool "Ecore" - name "xmlContentKind" - value ("ContentKind" 0)) - (object Attribute - tool "Ecore" - name "ContentKind" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "Unspecified" - value 0) - (object Attribute - tool "Ecore" - name "Empty" - value 1) - (object Attribute - tool "Ecore" - name "Simple" - value 2) - (object Attribute - tool "Ecore" - name "Mixed" - value 3) - (object Attribute - tool "Ecore" - name "ElementOnly" - value 4))) - (object Attribute - tool "Ecore" - name "annotation" - value ""))) - (object Attribute - tool "Ecore" - name "default__Operation" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "operationName" - value "") - (object Attribute - tool "Ecore" - name "isUnique" - value TRUE) - (object Attribute - tool "Ecore" - name "annotation" - value ""))) - (object Attribute - tool "Ecore" - name "default__Attribute" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "attributeName" - value "") - (object Attribute - tool "Ecore" - name "isTransient" - value FALSE) - (object Attribute - tool "Ecore" - name "isVolatile" - value FALSE) - (object Attribute - tool "Ecore" - name "isChangeable" - value TRUE) - (object Attribute - tool "Ecore" - name "isUnsettable" - value FALSE) - (object Attribute - tool "Ecore" - name "isUnique" - value TRUE) - (object Attribute - tool "Ecore" - name "isID" - value FALSE) - (object Attribute - tool "Ecore" - name "visibility" - value ("VisibilityKind" 0)) - (object Attribute - tool "Ecore" - name "VisibilityKind" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "Unspecified" - value 0) - (object Attribute - tool "Ecore" - name "None" - value 1) - (object Attribute - tool "Ecore" - name "Read-only" - value 2) - (object Attribute - tool "Ecore" - name "Read-write" - value 3) - (object Attribute - tool "Ecore" - name "Read-only unsettable" - value 4) - (object Attribute - tool "Ecore" - name "Read-write unsettable" - value 5))) - (object Attribute - tool "Ecore" - name "xmlName" - value "") - (object Attribute - tool "Ecore" - name "xmlNamespace" - value "") - (object Attribute - tool "Ecore" - name "xmlFeatureKind" - value ("FeatureKind" 0)) - (object Attribute - tool "Ecore" - name "FeatureKind" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "Unspecified" - value 0) - (object Attribute - tool "Ecore" - name "Simple" - value 1) - (object Attribute - tool "Ecore" - name "Attribute" - value 2) - (object Attribute - tool "Ecore" - name "Element" - value 4))) - (object Attribute - tool "Ecore" - name "annotation" - value ""))) - (object Attribute - tool "Ecore" - name "default__Role" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "referenceName" - value "") - (object Attribute - tool "Ecore" - name "isTransient" - value FALSE) - (object Attribute - tool "Ecore" - name "isVolatile" - value FALSE) - (object Attribute - tool "Ecore" - name "isChangeable" - value TRUE) - (object Attribute - tool "Ecore" - name "isUnsettable" - value FALSE) - (object Attribute - tool "Ecore" - name "isResolveProxies" - value TRUE) - (object Attribute - tool "Ecore" - name "visibility" - value ("VisibilityKind" 0)) - (object Attribute - tool "Ecore" - name "VisibilityKind" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "Unspecified" - value 0) - (object Attribute - tool "Ecore" - name "None" - value 1) - (object Attribute - tool "Ecore" - name "Read-only" - value 2) - (object Attribute - tool "Ecore" - name "Read-write" - value 3) - (object Attribute - tool "Ecore" - name "Read-only unsettable" - value 4) - (object Attribute - tool "Ecore" - name "Read-write unsettable" - value 5))) - (object Attribute - tool "Ecore" - name "xmlName" - value "") - (object Attribute - tool "Ecore" - name "xmlNamespace" - value "") - (object Attribute - tool "Ecore" - name "xmlFeatureKind" - value ("FeatureKind" 0)) - (object Attribute - tool "Ecore" - name "FeatureKind" - value (list Attribute_Set - (object Attribute - tool "Ecore" - name "Unspecified" - value 0) - (object Attribute - tool "Ecore" - name "Simple" - value 1) - (object Attribute - tool "Ecore" - name "Attribute" - value 2) - (object Attribute - tool "Ecore" - name "Element" - value 4))) - (object Attribute - tool "Ecore" - name "annotation" - value "")))) - quid "3A7999AD02A3")) diff --git a/plugins/org.eclipse.jem.beaninfo/schema/registrations.exsd b/plugins/org.eclipse.jem.beaninfo/schema/registrations.exsd deleted file mode 100644 index 6a90380d5..000000000 --- a/plugins/org.eclipse.jem.beaninfo/schema/registrations.exsd +++ /dev/null @@ -1,258 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<!-- Schema file written by PDE --> -<schema targetNamespace="org.eclipse.jem.beaninfo"> -<annotation> - <appInfo> - <meta.schema plugin="org.eclipse.jem.beaninfo" id="registrations" name="BeanInfo Extension Registrations"/> - </appInfo> - <documentation> - This extension point is used to register contributors, beaninfo, and overrides for BeanInfo contributions. -<p>An important concept is visibility of a container, plugin, or project to the top-level project. The top-level project is the project being introspected. For a container, plugin, or project to be visible to that project, the container, plugin, or project must be in the classpath of the top-level project, or it must be exported from a visible project or plugin. Once a non-visible project/plugin is reached, any projects, containers, or plugins that it may contain are not considered to be visible. -<p>The registrations are identified with the container id and/or plugin id. If that container or plugin is visible, then that registration will be processed for the top-level project. If the container/plugin is found more than once in the build path of the top-level project, it will only be processed once. -<p>There are three forms of registrations. -<ul> -<li>BeanInfo registrations. These supply standard BeanInfo and overrides. -<li><samp>IClasspathContainer</samp> that implements <samp>IBeanInfoContributor</samp>. -<li>An explicit contributor that implements <samp>IBeanInfoContributor</samp>. -</ul> -<p>It runs through the visible BeanInfo registrations. -<p> -The IClasspathContainer registration isn't specified as part of this extension point. For all visible containers, if the classpath container (from JDT) also implements IBeanInfoContributor, then it will be called to contribute to the BeanInfo. -<p>Then it runs through the visible explicit contributors. Note that if the explicit contributor also implements <samp>org.eclipse.jem.internal.proxy.core.IConfigurationContributor</samp> it will also be called for proxy contributions. This allows for special setup required by any contributed BeanInfo for the launched proxy registry. This shouldn't normally be necessary because normal classpath updates to include the BeanInfo jar will be done by the IBeanInfoContributor itself through the BeanInfo registration callback. -<p>The order of processing for the overrides will be to first run through the specified overrides (through Beaninfo registrations). Then it runs through the visible containers that implement IBeanInfoContributor, and then finally it runs through the explicit IBeanInfoContributors. This order is chosen because the overrides files are not dynamic so they need to be applied in a consistent way. The contributors are dynamic and can handle change. -<p>The only order guarantee is that contributions from this extension point will be processed in plugin order of where the extension was declared. For example if there was an extension declared in plugin A and in plugin B, and plugin B requires plugin A, then the extensions declarations in plugin A will be processed before the extension declarations in plugin B. - </documentation> - </annotation> - - <element name="extension"> - <complexType> - <sequence> - <element ref="registration" minOccurs="0" maxOccurs="unbounded"/> - <element ref="contributor" minOccurs="0" maxOccurs="unbounded"/> - </sequence> - <attribute name="point" type="string" use="required"> - <annotation> - <documentation> - a fully qualified identifier of the target extension point - </documentation> - </annotation> - </attribute> - <attribute name="id" type="string"> - <annotation> - <documentation> - an optional identifier of the extension instance - </documentation> - </annotation> - </attribute> - <attribute name="name" type="string"> - <annotation> - <documentation> - an optional name of the extension instance - </documentation> - </annotation> - </attribute> - </complexType> - </element> - - <element name="registration"> - <annotation> - <documentation> - This is a registration for a container or plugin. It supplies the BeanInfo and the overrides. - </documentation> - </annotation> - <complexType> - <sequence> - <element ref="beaninfo" minOccurs="0" maxOccurs="unbounded"/> - <element ref="override" minOccurs="0" maxOccurs="unbounded"/> - </sequence> - <attribute name="container" type="string"> - <annotation> - <documentation> - contributor is for a container. The value is the container id (e.g. <b>"JRE_CONTAINER"</b>). This will match "/JRE_CONTAINER" or "/JRE_CONTAINER/...". Or <b>"JRE_CONTAINER/XYZ"</b> would match "/JRE_CONTAINER/XYZ/...". -<p> -You can also use a regular expression. An expression such as <b>"SWT_CONTAINER/.*/JFACE"</b> will match "/SWT_CONTAINER/PDE/JFACE" but will not match "/SWT_CONTAINER". - </documentation> - </annotation> - </attribute> - <attribute name="plugin" type="string"> - <annotation> - <documentation> - contributor is for a plugin. The value is the plugin id (e.g. "org.eclipse.swt"). - </documentation> - </annotation> - </attribute> - </complexType> - </element> - - <element name="contributor"> - <annotation> - <documentation> - This is a contributor for the visible container/plugin defined by container and plugin attributes. - </documentation> - </annotation> - <complexType> - <attribute name="container" type="string"> - <annotation> - <documentation> - contributor is for a container. The value is the container id (e.g. <b>"JRE_CONTAINER"</b>). This will match "/JRE_CONTAINER" or "/JRE_CONTAINER/...". Or <b>"JRE_CONTAINER/XYZ"</b> would match "/JRE_CONTAINER/XYZ/...". -<p> -You can also use a regular expression. An expression such as <b>"SWT_CONTAINER/.*/JFACE"</b> will match "/SWT_CONTAINER/PDE/JFACE" but will not match "/SWT_CONTAINER". - </documentation> - </annotation> - </attribute> - <attribute name="plugin" type="string"> - <annotation> - <documentation> - contributor is for a plugin. The value is the plugin id (e.g. "org.eclipse.swt"). - </documentation> - </annotation> - </attribute> - <attribute name="class" type="string" use="required"> - <annotation> - <documentation> - the class that implements this contributor. The class must implement IBeanInfoContributor. - </documentation> - <appInfo> - <meta.attribute kind="java" basedOn="org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor"/> - </appInfo> - </annotation> - </attribute> - </complexType> - </element> - - <element name="beaninfo"> - <annotation> - <documentation> - Provide a BeanInfo jar from this or some other plugin, and provide search path packages. - </documentation> - </annotation> - <complexType> - <sequence> - <element ref="searchpath" minOccurs="0" maxOccurs="unbounded"/> - </sequence> - <attribute name="path" type="string" use="required"> - <annotation> - <documentation> - This is the path to the BeanInfo jar from within this or some other plugin. If it is within this plugin, there should be no leading '/'. There can be subfolders though, e.g. <samp>xyz/qxr.jar</samp>. If it is within another plugin, then it must be fully-qualified with leading '/' followed by plugin id, followed by a '/' and then the path to the jar relative to that plugin, e.g. <samp>/org.xyz/qxr/ddd.jar</samp>. - </documentation> - </annotation> - </attribute> - </complexType> - </element> - - <element name="searchpath"> - <annotation> - <documentation> - This is a search path. It gives the package to add to the search path for BeanInfo. -It refers to packages within the BeanInfo jar contributed by the <samp>beaninfo</samp> element that it is found within. -There really should be at least one search path. The only way this jar could contribute BeanInfo and not need something added to the search path is if the BeanInfos are in the same package as the bean itself. This is not a recommended way of supplying BeanInfo. - </documentation> - </annotation> - <complexType> - <attribute name="package" type="string" use="required"> - <annotation> - <documentation> - This is the java package to search into for BeanInfo. If there are more than one search paths in this <samp>beaninfo</samp> element, then they will be searched in the order found in the element. - </documentation> - </annotation> - </attribute> - </complexType> - </element> - - <element name="override"> - <annotation> - <appInfo> - <meta.element labelAttribute="package"/> - </appInfo> - <documentation> - This describes an override file for BeanInfo. An override file is an XMI file that is read when a class is first introspected. It happens before the actual introspection. It allows overrides to the Java EMF model class (<samp>JavaClass</samp>) that can be done through standard BeanInfo. These are annotations that are specific to the Visual Editor implementation in Eclipse. The annotations have no meaning to the standard BeanInfo specification so they are supplied here instead. They provide a much enriched experience in the Visual Editor by providing classes that run in the editor. - </documentation> - </annotation> - <complexType> - <attribute name="package" type="string" use="required"> - <annotation> - <documentation> - This is the name of a package or a package fragment. When this package or package fragment matches the package or fragment of a class being introspected, the specified override file from the given path will be applied. For example if the package was <samp>javax.swing</samp> and the path was "xyz", then for class "javax.swing.Container" it will look for file "xyz/Container.override", and if found, it will apply it. If it was <samp>javax.swing.text.JTextComponent</samp> it will look for file "xyz/text/JTextComponent.override". - </documentation> - </annotation> - </attribute> - <attribute name="path" type="string" use="required"> - <annotation> - <documentation> - This is the path relative to the plugin where this extension is declared for the folder to search for the override files. See the package attribute description above for how this works. - </documentation> - </annotation> - </attribute> - </complexType> - </element> - - <annotation> - <appInfo> - <meta.section type="since"/> - </appInfo> - <documentation> - 1.0.0 - </documentation> - </annotation> - - <annotation> - <appInfo> - <meta.section type="examples"/> - </appInfo> - <documentation> - The following is an example of a registration: -<p> -<pre> - <extension point="org.eclipse.jem.beaninfo.registration"> - <registration container="VE_CONTAINER"> - <beaninfo path="xyzbeaninfo.jar"> - <searchpath package="com.xyz.beaninfo"/> - <searchpath package="com.xyz.qxr.beaninfo"/> - </beaninfo> - <override package="com.xyz" path="overrides/e"/> - </registration> - <contributor plugin="org.eclipse.ve" class="com.xyz.myContributor"/> - </extension> -</pre> -</p> -<p> -This says that if container "VE_CONTAINER" is visible to the project being introspected, then then BeanInfo jar "xyzbeaninfo.jar" (found in the plugin that declared this extension) will be looked into for BeanInfos. The two packages listed will be added to the search path of packages. -<p> -The override says that, again for "VE_CONTAINER" visible, for any classes that start with "com.xyz", then the override file (classname.override) will be searched for in the directory "overrides/e". For example, if the class was <samp>com.xyz.ABC</samp> it will look for override file "overrides/e/ABC.override". If the class was <samp>com.xyz.qxr.ABC</samp> it will for file "overrides/e/qxr/ABC.override". -<p> -Finally if plugin "org.eclipse.ve" is visible to the project, then <samp>com.xyz.myContributor</samp> will be used to contribute to the BeanInfo. - </documentation> - </annotation> - - <annotation> - <appInfo> - <meta.section type="apiInfo"/> - </appInfo> - <documentation> - The <samp>class</samp> attribute must be a class that implements the <samp>org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor</samp> interface. - </documentation> - </annotation> - - <annotation> - <appInfo> - <meta.section type="implementation"/> - </appInfo> - <documentation> - [Enter information about supplied implementation of this extension point.] - </documentation> - </annotation> - - <annotation> - <appInfo> - <meta.section type="copyright"/> - </appInfo> - <documentation> - Copyright (c) 2004 IBM Corporation and others.<br> -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 -<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - </documentation> - </annotation> - -</schema> diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/BaseBeanInfo.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/BaseBeanInfo.java deleted file mode 100644 index 51b00ce39..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/BaseBeanInfo.java +++ /dev/null @@ -1,850 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.jem.beaninfo.vm; - -/* - * $RCSfile: BaseBeanInfo.java,v $ - * $Revision: 1.13 $ $Date: 2006/05/17 20:13:00 $ - */ - -import java.awt.Image; -import java.beans.*; -import java.lang.reflect.*; - -import org.eclipse.jem.beaninfo.common.IBaseBeanInfoConstants; - - -/** - * A BaseBeanInfo that provides common support for BeanInfos within the JEM environment. - * - * @since 1.1.0 - */ -public abstract class BaseBeanInfo extends SimpleBeanInfo implements IBaseBeanInfoConstants { - - // Constants to use to create all descriptors etc. - protected static java.util.ResourceBundle RESBUNDLE = java.util.ResourceBundle.getBundle("org.eclipse.jem.beaninfo.vm.beaninfo"); //$NON-NLS-1$ - - /** - * Bound indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String BOUND = "bound";//$NON-NLS-1$ - - /** - * Constrained indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String CONSTRAINED = "constrained";//$NON-NLS-1$ - - /** - * Property editor class indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String PROPERTYEDITORCLASS = "propertyEditorClass";//$NON-NLS-1$ - - /** - * Read Method indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String READMETHOD = "readMethod";//$NON-NLS-1$ - - /** - * Write method indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String WRITEMETHOD = "writeMethod";//$NON-NLS-1$ - - /** - * Displayname indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String DISPLAYNAME = "displayName";//$NON-NLS-1$ - - /** - * Expert indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String EXPERT = "expert";//$NON-NLS-1$ - - /** - * Hidden indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String HIDDEN = "hidden";//$NON-NLS-1$ - - /** - * Preferred indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String PREFERRED = "preferred";//$NON-NLS-1$ - - /** - * Short description indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String SHORTDESCRIPTION = "shortDescription";//$NON-NLS-1$ - - /** - * Customizer class indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String CUSTOMIZERCLASS = "customizerClass";//$NON-NLS-1$ - - /** - * In Default eventset indicator for apply property arguments. - * - * @since 1.1.0 - */ - public static final String INDEFAULTEVENTSET = "inDefaultEventSet";//$NON-NLS-1$ - - /** - * This is a Feature Attribute Key. When this key exists, the value is a java.lang.reflect.Field. It means this property - * is a field and not a getter/setter. The getter/setter will be ignored and the property type will be the type of the field. - * <p> - * At this time, do not use field on an indexed property. This is currently an undefined situation. - * - * @since 1.1.0 - */ - public static final String FIELDPROPERTY = "field"; //$NON-NLS-1$ - - /** - * Obscure indicator for apply property arguments. Obsure is a pre-defined attribute name too. That is where the obscure setting is stored. - * <p> - * Obsure means most users don't need it. In the future such features won't even be cached so as to reduce the in-memory costs. Currently this - * flag is ignored. - * - * @since 1.1.0 - */ - public static final String OBSCURE = "ivjObscure";//$NON-NLS-1$ - - /** - * Design time indicator for apply property arguments. Design time is a pre-defined attribute name too. That is where the design time setting is - * stored. - * <p> - * Design time means: - * <ul> - * <li>Not set: Will be a property that can be connected to, and shows on property sheet (if not hidden). - * <li><code>true</code>: Special property (it will show on property sheet if not hidden), but it can't be connected to. Usually this is a - * property that is fluffed up for the IDE purposes but doesn't have a get/set method. This means it is a property for design time and not for - * runtime. - * <li><code>false</code>: This property will not show up on property sheet but it can be connected to. - * </ul> - * - * @since 1.1.0 - */ - public static final String DESIGNTIMEPROPERTY = "ivjDesignTimeProperty"; //$NON-NLS-1$ - - /** - * EventAdapterClass indicator for apply property arguments. Event adapter class is a pre-defined attribute name too. That is where the event - * adapter is stored. - * <p> - * Adapter class for eventSetDescriptors that provide default no-op implementation of the interface methods. For example - * <code>java.awt.event.WindowListener</code> has an adapter of <code>java.awt.event.WindowAdapter</code>. What is stored is actually the - * class name, not the class itself. - * - * @since 1.1.0 - */ - public static final String EVENTADAPTERCLASS = "eventAdapterClass"; //$NON-NLS-1$ - - - public static final boolean JVM_1_3 = System.getProperty("java.version", "").startsWith("1.3"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - - /** - * Empty args list for those descriptors that don't have arguments. - * @since 1.1.0 - */ - public static final Object[] EMPTY_ARGS = new Object[0]; - - /** - * Capitalize the string. This uppercases only the first character. So if you have property name of "abc" it will become "Abc". - * - * @param s - * @return string with first letter capitalized. - * - * @since 1.1.0 - */ - public static String capitalize(String s) { - if (s.length() == 0) { return s; } - char chars[] = s.toCharArray(); - chars[0] = Character.toUpperCase(chars[0]); - return new String(chars); - } - - /** - * Create a BeanDescriptor object given an array of keyword/value arguments. Use the keywords defined in this class, e.g. BOUND, EXPERT, etc. - * - * @param cls - * bean for which the bean descriptor is being created. - * @param args - * arg pairs, [0] keyword, [1] value, [2] keyword, [3] value, etc. or null if no args - * @return new bean descriptor - * - * @since 1.1.0 - */ - public static BeanDescriptor createBeanDescriptor(Class cls, Object[] args) { - Class customizerClass = null; - - if (args != null) { - /* Find the specified customizerClass */ - for (int i = 0; i < args.length; i += 2) { - if (CUSTOMIZERCLASS.equals(args[i])) { - customizerClass = (Class) args[i + 1]; - break; - } - } - } - - BeanDescriptor bd = new BeanDescriptor(cls, customizerClass); - - if (args != null) { - for (int i = 0; i < args.length; i += 2) { - String key = (String) args[i]; - Object value = args[i + 1]; - setFeatureDescriptorValue(bd, key, value); - } - } - return bd; - } - - /** - * Create a beans EventSetDescriptor given the following: - * - * @param cls - * The bean class - * @param name - * Name of event set - * @param args - * arg pairs, [0] keyword, [1] value, [2] keyword, [3] value, etc. or null if no args. - * @param lmds - * array of MethodDescriptors defining the listener methods - * @param listenerType - * type of listener - * @param addListenerName - * add listener method name - * @param removeListenerNameremove - * listener method name - * @return new event set descriptor - * @since 1.1.0 - */ - public static EventSetDescriptor createEventSetDescriptor(Class cls, String name, Object[] args, MethodDescriptor[] lmds, Class listenerType, - String addListenerName, String removeListenerName) { - EventSetDescriptor esd = null; - Class[] paramTypes = { listenerType}; - try { - java.lang.reflect.Method addMethod = null; - java.lang.reflect.Method removeMethod = null; - try { - /* get addListenerMethod with parameter types. */ - addMethod = cls.getMethod(addListenerName, paramTypes); - } catch (Exception ie) { - throwError(ie, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_get_the_meth1_EXC_"), //$NON-NLS-1$ - new Object[] { addListenerName})); - } - ; - try { - /* get removeListenerMethod with parameter types. */ - removeMethod = cls.getMethod(removeListenerName, paramTypes); - } catch (Exception ie) { - throwError(ie, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_get_the_meth1_EXC_"), //$NON-NLS-1$ - new Object[] { removeListenerName})); - } - ; - - esd = new EventSetDescriptor(name, listenerType, lmds, addMethod, removeMethod); - } catch (Exception ie) { - throwError(ie, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_create_the_E1_EXC_"), //$NON-NLS-1$ - new Object[] { name})); - } - ; - if (args != null) { - // set the event set descriptor properties - for (int i = 0; i < args.length; i += 2) { - String key = (String) args[i]; - Object value = args[i + 1]; - if (INDEFAULTEVENTSET.equals(key)) { - esd.setInDefaultEventSet(((Boolean) value).booleanValue()); - } else - setFeatureDescriptorValue(esd, key, value); - } - } - return esd; - } - - /** - * Create a bean's MethodDescriptor. - * - * @param cls - * class of the method. - * @param name - * name of the method. - * @param args - * arg pairs, [0] keyword, [1] value, [2] keyword, [3] value, etc. or null if no args - * @param params - * parameter descriptors or <code>null</code> if no parameter descriptors. - * @param paramTypes - * parameter types - * @return new method descriptor - * - * @since 1.1.0 - */ - public static MethodDescriptor createMethodDescriptor(Class cls, String name, Object[] args, ParameterDescriptor[] params, Class[] paramTypes) { - MethodDescriptor md = null; - try { - java.lang.reflect.Method aMethod = null; - try { - /* getMethod with parameter types. */ - aMethod = cls.getMethod(name, paramTypes); - } catch (Exception ie) { - throwError(ie, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_get_the_meth1_EXC_"), //$NON-NLS-1$ - new Object[] { name})); - } - ; - if (params != null && params.length > 0) - md = new MethodDescriptor(aMethod, params); - else - md = new MethodDescriptor(aMethod); - } catch (Exception ie) { - throwError(ie, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_create_Method_EXC_"), //$NON-NLS-1$ - new Object[] { name})); - } - ; - if (args != null) { - // set the method properties - for (int i = 0; i < args.length; i += 2) { - String key = (String) args[i]; - Object value = args[i + 1]; - setFeatureDescriptorValue(md, key, value); - } - } - return md; - } - - private static PropertyDescriptor createOtherPropertyDescriptor(String name, Class cls) throws IntrospectionException { - Method readMethod = null; - Method writeMethod = null; - String base = capitalize(name); - Class[] parameters = new Class[0]; - - // First we try boolean accessor pattern - try { - readMethod = cls.getMethod("is" + base, parameters);//$NON-NLS-1$ - } catch (Exception ex1) { - } - if (readMethod == null) { - try { - // Else we try the get accessor pattern. - readMethod = cls.getMethod("get" + base, parameters);//$NON-NLS-1$ - } catch (Exception ex2) { - // Find by matching methods of the class - readMethod = findMethod(cls, "get" + base, 0);//$NON-NLS-1$ - } - } - - if (readMethod == null) { - // For write-only properties, find the write method - writeMethod = findMethod(cls, "set" + base, 1);//$NON-NLS-1$ - } else { - // In Sun's code, reflection fails if there are two - // setters with the same name and the first setter located - // does not have the same return type of the getter. - // This fixes that. - parameters = new Class[1]; - parameters[0] = readMethod.getReturnType(); - try { - writeMethod = cls.getMethod("set" + base, parameters);//$NON-NLS-1$ - } catch (Exception ex3) { - } - } - // create the property descriptor - if ((readMethod != null) || (writeMethod != null)) { - return new PropertyDescriptor(name, readMethod, writeMethod); - } else { - throw new IntrospectionException(java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_find_the_acc1_EXC_"), //$NON-NLS-1$ - new Object[] { name})); - } - } - - /** - * Create a beans parameter descriptor. - * - * @param name - * name of parameter - * @param args - * arg pairs, [0] keyword, [1] value, [2] keyword, [3] value, etc. or null if no args - * @return new parameter descriptor - * - * @since 1.1.0 - */ - public static ParameterDescriptor createParameterDescriptor(String name, Object[] args) { - ParameterDescriptor pd = null; - try { - pd = new ParameterDescriptor(); - } catch (Exception ie) { - throwError(ie, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_create_Param1_EXC_"), //$NON-NLS-1$ - new Object[] { name})); - } - ; - // set the name - pd.setName(name); - if (args != null) { - // set the method properties - for (int i = 0; i < args.length; i += 2) { - String key = (String) args[i]; - Object value = args[i + 1]; - setFeatureDescriptorValue(pd, key, value); - } - } - return pd; - } - - private static Method GETCLASS; - - static { - try { - GETCLASS = Object.class.getMethod("getClass", null); //$NON-NLS-1$ - } catch (SecurityException e) { - } catch (NoSuchMethodException e) { - } - } - /** - * Create a property descriptor describing a field property. - * <p> - * Note: This is non-standard. The VE knows how to handle this, but any one else using BeanInfo will see this as a property with - * no getter or setter. - * @param name - * @param field - * @param args arg pairs, [0] keyword, [1] value, [2] keyword, [3] value, etc. or null if no args - * @return - * - * @since 1.1.0 - */ - public static PropertyDescriptor createFieldPropertyDescriptor(String name, Field field, Object[] args) { - try { - PropertyDescriptor pd = new PropertyDescriptor(name, null, null); - pd.setValue(FIELDPROPERTY, field); // Set the field property so we know it is a field. - applyFieldArguments(pd, args); - // Need to set in a phony read method because Introspector will throw it away otherwise. We just use Object.getClass for this. - // We will ignore the property type for fields. If used outside of VE then it will look like a class property. - pd.setReadMethod(GETCLASS); - return pd; - } catch (IntrospectionException e) { - throwError(e, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_create_the_P1_EXC_"), //$NON-NLS-1$ - new Object[] { name})); - return null; - } - } - - /** - * Create a bean's property descriptor. - * - * @param cls - * class of who owns the property (usually the bean). It is used to look up get/set methods for the property. - * @param name - * name of the property. It will use get{Name} and set{Name} to find get/set methods. - * @param args - * arg pairs, [0] keyword, [1] value, [2] keyword, [3] value, etc. - * @return new property descriptor - * - * @since 1.1.0 - */ - public static PropertyDescriptor createPropertyDescriptor(Class cls, String name, Object[] args) { - PropertyDescriptor pd = null; - try { - // Create assuming that the getter/setter follows reflection patterns - pd = new PropertyDescriptor(name, cls); - } catch (IntrospectionException e) { - // Try creating a property descriptor for read-only, write-only - // or if Sun's reflection fails - try { - pd = createOtherPropertyDescriptor(name, cls); - } catch (IntrospectionException ie) { - throwError(ie, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_create_the_P1_EXC_"), //$NON-NLS-1$ - new Object[] { name})); - } - } - - applyPropertyArguments(pd, args, cls); - - return pd; - } - - - /** - * Create a new PropertyDescriptor based upon the PD sent in. It will clone the sent in one, and apply the args to override any specific setting. - * Class cls is used for finding read/write methods, if any. - * - * This is used when wanting to override only a few specific settings from a property descriptor from the super class. - * - * @param fromPDS - * The PropertyDescriptor array to find the entry to clone. It will be changed in place in the array. - * @param name - * The name of the property to find and clone and override. - * @param cls - * The class to use to find read/write methods in args. If no read/write methods specified, then this may be null. - * @param args - * The arguments to override from fromPD. arg pairs, [0] keyword, [1] value, [2] keyword, [3] value, etc. or null if none to override - */ - public void replacePropertyDescriptor(PropertyDescriptor[] pds, String name, Class cls, Object[] args) { - PropertyDescriptor pd = null; - int iPD = findPropertyDescriptor(pds, name); - if (iPD == -1) - return; - PropertyDescriptor fromPD = pds[iPD]; - try { - - pd = pds[iPD] = new PropertyDescriptor(fromPD.getName(), null, null); - } catch (IntrospectionException e) { - throwError(e, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_create_the_P1_EXC_"), //$NON-NLS-1$ - new Object[] { fromPD.getName()})); - } - - // Now copy over the contents of fromPD. - clonePropertySettings(fromPD, pd); - - // Now apply the overrides - applyPropertyArguments(pd, args, cls); - return; - } - - private void clonePropertySettings(PropertyDescriptor fromPD, PropertyDescriptor pd) { - try { - pd.setReadMethod(fromPD.getReadMethod()); - pd.setWriteMethod(fromPD.getWriteMethod()); - pd.setPropertyEditorClass(fromPD.getPropertyEditorClass()); - pd.setBound(fromPD.isBound()); - pd.setConstrained(fromPD.isConstrained()); - cloneFeatureSettings(fromPD, pd); - } catch (IntrospectionException e) { - throwError(e, java.text.MessageFormat.format(RESBUNDLE.getString("Cannot_create_the_P1_EXC_"), //$NON-NLS-1$ - new Object[] { fromPD.getName()})); - } - } - - private void cloneFeatureSettings(FeatureDescriptor fromFD, FeatureDescriptor fd) { - fd.setExpert(fromFD.isExpert()); - fd.setHidden(fromFD.isHidden()); - fd.setPreferred(fromFD.isPreferred()); - fd.setShortDescription(fromFD.getShortDescription()); - fd.setDisplayName(fromFD.getDisplayName()); - - java.util.Enumeration keys = fromFD.attributeNames(); - while (keys.hasMoreElements()) { - String key = (String) keys.nextElement(); - Object value = fromFD.getValue(key); - fd.setValue(key, value); - } - } - - /* - * The common property arguments between field and standard properties. - */ - private static boolean applyCommonPropertyArguments(PropertyDescriptor pd, String key, Object value) { - if (BOUND.equals(key)) { - pd.setBound(((Boolean) value).booleanValue()); - } else if (CONSTRAINED.equals(key)) { - pd.setConstrained(((Boolean) value).booleanValue()); - } else if (PROPERTYEDITORCLASS.equals(key)) { - pd.setPropertyEditorClass((Class) value); - } else if (FIELDPROPERTY.equals(key)) - return true; // This should not be applied except through createFieldProperty. - else - return false; - return true; - - } - - private static void applyPropertyArguments(PropertyDescriptor pd, Object[] args, Class cls) { - if (args != null) { - for (int i = 0; i < args.length; i += 2) { - String key = (String) args[i]; - Object value = args[i + 1]; - - if (!applyCommonPropertyArguments(pd, key, value)) { - if (READMETHOD.equals(key)) { - String methodName = (String) value; - Method method; - try { - method = cls.getMethod(methodName, new Class[0]); - pd.setReadMethod(method); - } catch (Exception e) { - throwError(e, java.text.MessageFormat.format(RESBUNDLE.getString("{0}_no_read_method_EXC_"), //$NON-NLS-1$ - new Object[] { cls, methodName})); - } - } else if (WRITEMETHOD.equals(key)) { - String methodName = (String) value; - try { - if (methodName == null) { - pd.setWriteMethod(null); - } else { - Method method; - Class type = pd.getPropertyType(); - method = cls.getMethod(methodName, new Class[] { type}); - pd.setWriteMethod(method); - } - } catch (Exception e) { - throwError(e, java.text.MessageFormat.format(RESBUNDLE.getString("{0}_no_write_method_EXC_"), //$NON-NLS-1$ - new Object[] { cls, methodName})); - } - } else { - // arbitrary value - setFeatureDescriptorValue(pd, key, value); - } - } - } - } - } - - private static void applyFieldArguments(PropertyDescriptor pd, Object[] args) { - if (args != null) { - for (int i = 0; i < args.length; i += 2) { - String key = (String) args[i]; - Object value = args[i + 1]; - - if (!applyCommonPropertyArguments(pd, key, value)) { - if (READMETHOD.equals(key)) { - // ignored for field. - } else if (WRITEMETHOD.equals(key)) { - // ignored for field. - } else { - // arbitrary value - setFeatureDescriptorValue(pd, key, value); - } - } - } - } - } - - /** - * Find the method by comparing (name & parameter size) against the methods in the class. This is an expensive call and should be used only if - * getMethod with specific parameter types can't find method. - * - * @return java.lang.reflect.Method - * @param aClass - * java.lang.Class - * @param methodName - * java.lang.String - * @param parameterCount - * int - */ - public static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String methodName, int parameterCount) { - try { - /* - * Since this method attempts to find a method by getting all methods from the class, this method should only be called if getMethod - * cannot find the method. - */ - java.lang.reflect.Method methods[] = aClass.getMethods(); - for (int index = 0; index < methods.length; index++) { - java.lang.reflect.Method method = methods[index]; - if ((method.getParameterTypes().length == parameterCount) && (method.getName().equals(methodName))) { return method; } - ; - } - ; - } catch (java.lang.Throwable exception) { - return null; - } - ; - return null; - } - - /** - * Find a property descriptor of a given name in the list. - * - * @param pds - * The array of property descriptors to search, may be null. - * @param name - * The name to search for. - * @return The found property descriptor index, or -1 if not found. - */ - public static int findPropertyDescriptor(PropertyDescriptor[] pds, String name) { - for (int i = 0; i < pds.length; i++) { - if (name.equals(pds[i].getName())) - return i; - } - return -1; - } - - /* - * (non-Javadoc) - * - * @see java.beans.BeanInfo#getDefaultEventIndex() - */ - public int getDefaultEventIndex() { - return -1; - } - - /* - * (non-Javadoc) - * - * @see java.beans.BeanInfo#getDefaultPropertyIndex() - */ - public int getDefaultPropertyIndex() { - return -1; - } - - - /* (non-Javadoc) - * @see java.beans.SimpleBeanInfo#getBeanDescriptor() - */ - public BeanDescriptor getBeanDescriptor() { - // Default is to create an empty one. - return createBeanDescriptor(getBeanClass(), EMPTY_ARGS); - } - - /** - * Implementation for BeanInfo. This implementation will return the BeanInfo of the superclass. - * - * @see BeanInfo#getAdditionalBeanInfo() - * @since 1.1.0 - */ - public BeanInfo[] getAdditionalBeanInfo() { - try { - BeanInfo[] result = new BeanInfo[] { Introspector.getBeanInfo(getBeanClass().getSuperclass())}; - PropertyDescriptor[] oPDs = result[0].getPropertyDescriptors(); - PropertyDescriptor[] nPDs = overridePropertyDescriptors(oPDs); - if (oPDs != nPDs) - result[0] = new OverridePDBeanInfo(result[0], nPDs); - return result; - } catch (IntrospectionException e) { - return new BeanInfo[0]; - } - } - - private static class OverridePDBeanInfo implements BeanInfo { - - private BeanInfo originalBeanInfo; - - private PropertyDescriptor[] overridePDs; - - public OverridePDBeanInfo(BeanInfo bi, PropertyDescriptor[] pds) { - originalBeanInfo = bi; - overridePDs = pds; - } - - public BeanInfo[] getAdditionalBeanInfo() { - return originalBeanInfo.getAdditionalBeanInfo(); - } - - public BeanDescriptor getBeanDescriptor() { - return originalBeanInfo.getBeanDescriptor(); - } - - public int getDefaultEventIndex() { - return originalBeanInfo.getDefaultEventIndex(); - } - - public int getDefaultPropertyIndex() { - return originalBeanInfo.getDefaultPropertyIndex(); - } - - public EventSetDescriptor[] getEventSetDescriptors() { - return originalBeanInfo.getEventSetDescriptors(); - } - - public Image getIcon(int iconKind) { - return originalBeanInfo.getIcon(iconKind); - } - - public MethodDescriptor[] getMethodDescriptors() { - return originalBeanInfo.getMethodDescriptors(); - } - - public PropertyDescriptor[] getPropertyDescriptors() { - return overridePDs; - } - } - - /** - * Allow overrides to parent beaninfo. Subclasses should override this method if they wish to override and change any inherited properties. This - * allows removal of inherited properties or changes of specific properties (such as change from hidden to not hidden). - * - * Note: If there any changes, this must return a DIFFERENT array. If it returns the same array, then the changes will not be accepted. If just - * overriding, should use pds.clone() to get the new array and then change the specific entries. - * - * @param pds - * @return The new changed array or the same array if no changes. - * @since 1.1.0 - */ - protected PropertyDescriptor[] overridePropertyDescriptors(PropertyDescriptor[] pds) { - return pds; - } - - /** - * Get the bean class this beaninfo is for. Used by subclasses to quickly get the bean class without having to code it over and over. - * - * @return bean class for this beaninfo. - * - * @since 1.1.0 - */ - public abstract Class getBeanClass(); - - /** - * Called whenever the bean information class throws an exception. By default it prints a message and then a stacktrace to sys err. - * - * @param exception - * java.lang.Throwable - * @since 1.1.0 - */ - public void handleException(Throwable exception) { - System.err.println(RESBUNDLE.getString("UNCAUGHT_EXC_")); //$NON-NLS-1$ - exception.printStackTrace(); - } - - private static void setFeatureDescriptorValue(FeatureDescriptor fd, String key, Object value) { - if (DISPLAYNAME.equals(key)) { - fd.setDisplayName((String) value); - } else if (EXPERT.equals(key)) { - fd.setExpert(((Boolean) value).booleanValue()); - } else if (HIDDEN.equals(key)) { - fd.setHidden(((Boolean) value).booleanValue()); - } else if (PREFERRED.equals(key)) { - fd.setPreferred(((Boolean) value).booleanValue()); - if (JVM_1_3) { - // Bug in 1.3 doesn't preserve the preferred flag, so we will put it into the attributes too. - fd.setValue(PREFERRED, value); - } - } else if (SHORTDESCRIPTION.equals(key)) { - fd.setShortDescription((String) value); - } - // Otherwise assume an arbitrary-named value - // Assume that the FeatureDescriptor private hashTable\ - // contains only arbitrary-named attributes - else { - fd.setValue(key, value); - } - } - - /** - * Fatal errors are handled by calling this method. By default it throws an Error exception. - * - * @param e - * exception exception message placed into the new Error thrown. - * @param s - * message added to exception message. <code>null</code> if nothing to add. - * - * @throws Error - * turns exception into an Error. - * @since 1.1.0 - */ - protected static void throwError(Exception e, String s) { - throw new Error(e.toString() + " " + s);//$NON-NLS-1$ - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/basebeaninfonls.properties b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/basebeaninfonls.properties deleted file mode 100644 index e78fb1181..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/basebeaninfonls.properties +++ /dev/null @@ -1,31 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2005 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 -############################################################################### -# -# $Source: /cvsroot/webtools/jeetools.move/webtools.javaee.git/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/Attic/basebeaninfonls.properties,v $ -# $Revision: 1.5 $ $Date: 2005/08/24 20:31:28 $ -# - - -# -# Properties for the IvjBeanInfo -# - -# -# IvjBeanInfo Strings -# -Cannot_get_the_meth1_EXC_ = IWAV0011E Cannot get the method {0}. -Cannot_create_the_E1_EXC_ = IWAV0012E Cannot create the EventSetDescriptor for {0}. -Cannot_create_Method_EXC_ = IWAV0013E Cannot create the MethodDescriptor for {0}. -Cannot_find_the_acc1_EXC_ = IWAV0014E Cannot find at least the write or read accessor for property {0}. -Cannot_create_Param1_EXC_ = IWAV0015E Cannot create the ParameterDescriptor for {0}. -Cannot_create_the_P1 = Cannot create the PropertyDescriptor for {0}. -{0}_no_read_method_EXC_ = IWAV0016E Class {0} doesn''t have the requested read accessor {1}. -{0}_no_write_method_EXC_ = IWAV0017E Class {0} doesn''t have the requested write accessor {1}. diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/beaninfo.properties b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/beaninfo.properties deleted file mode 100644 index 81fddc2d5..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/beaninfo.properties +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2005 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 -############################################################################### -# -# $Source: /cvsroot/webtools/jeetools.move/webtools.javaee.git/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/beaninfo/vm/Attic/beaninfo.properties,v $ -# $Revision: 1.4 $ $Date: 2005/08/24 20:31:28 $ -# - - -# -# Properties for the VCE Beaninfo -# - -# -# IvjBeanInfo Strings -# -Cannot_get_the_meth1_EXC_ = IWAV0007E Cannot get the method {0}. -Cannot_create_the_E1_EXC_ = IWAV0008E Cannot create the EventSetDescriptor for {0}. -Cannot_create_Method_EXC_ = IWAV0009E Cannot create the MethodDescriptor for {0}. -Cannot_find_the_acc1_EXC_ = IWAV0010E Cannot find at least the write or read accessor for property {0}. -Cannot_create_Param1_EXC_ = IWAV0146E Cannot create the ParameterDescriptor for {0}. -Cannot_create_the_P1_EXC_ = IWAV0147E Cannot create the PropertyDescriptor for {0}. -{0}_no_read_method_EXC_ = IWAV0148E Class {0} doesn''t have the requested read accessor {1}. -{0}_no_write_method_EXC_ = IWAV0149E Class {0} doesn''t have the requested write accessor {1}. -UNCAUGHT_EXC_ = IWAV0123E --------- UNCAUGHT EXCEPTION --------- diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/BeanDescriptorEquality.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/BeanDescriptorEquality.java deleted file mode 100644 index 01f0b2983..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/BeanDescriptorEquality.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: BeanDescriptorEquality.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.*; -/** - * Equality tester for BeanDescriptors - */ -public class BeanDescriptorEquality extends FeatureDescriptorEquality { - static void INIT() { - try { - MAP_EQUALITY.put(BeanDescriptor.class, (BeanDescriptorEquality.class).getConstructor(new Class[] {BeanDescriptor.class})); - } catch (NoSuchMethodException e) { - } - } - - /** - * Constructor for BeanDescriptorEquality. - */ - public BeanDescriptorEquality() { - super(); - } - - - public BeanDescriptorEquality(BeanDescriptor descr) { - super(descr); - } - - /** - * Calculate the hashcode for the current feature, add this - * to the hashcode received from super.calculateHashCode - * and return the new value. - * - * NOTE: for subclasses, it is MANDITORY that the first line be: - * int hashcode = super.calculateHashCode(); - * and the last line be: - * return hashcode*31 + (your calculated hashcode for just this subclass); - */ - protected int calculateHashCode() { - int hashcode = super.calculateHashCode(); - BeanDescriptor bd = (BeanDescriptor) fFeature; - int hc = bd.getBeanClass().hashCode(); - if (bd.getCustomizerClass() != null) - hc += bd.getCustomizerClass().hashCode(); - - return hashcode*31 + hc; - } - - public boolean equals(Object obj) { - if (identityTest(obj)) - return true; - if (!super.equals(obj)) - return false; - - BeanDescriptor ob = (BeanDescriptor) ((FeatureDescriptorEquality) obj).fFeature; - BeanDescriptor fb = (BeanDescriptor) fFeature; - - if (ob.getBeanClass() != fb.getBeanClass()) - return false; - if (ob.getCustomizerClass() != fb.getCustomizerClass()) - return false; - - return true; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/EventSetDescriptorEquality.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/EventSetDescriptorEquality.java deleted file mode 100644 index d7b1c2972..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/EventSetDescriptorEquality.java +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: EventSetDescriptorEquality.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.*; -import java.util.*; -import java.lang.reflect.Method; -/** - * Equality tester for EventSetDescriptors - */ -public class EventSetDescriptorEquality extends FeatureDescriptorEquality { - - static void INIT() { - try { - MAP_EQUALITY.put(EventSetDescriptor.class, (EventSetDescriptorEquality.class).getConstructor(new Class[] {EventSetDescriptor.class})); - } catch (NoSuchMethodException e) { - } - } - - private ArrayList fListenerMethodDescriptors; // Array of MethodDescriptorEquality's. - - /** - * Constructor for EventSetDescriptorEquality. - */ - public EventSetDescriptorEquality() { - super(); - } - - - public EventSetDescriptorEquality(EventSetDescriptor descr) { - super(descr); - } - - /** - * A new feature is being set into this object, - * clear any cache members so that they can be reconstructed. - * - * NOTE: Subclasses - remember to call super.clearFeature(); - */ - protected void clearFeature() { - super.clearFeature(); - fListenerMethodDescriptors = null; - } - - protected ArrayList listenerMethodDescriptors() { - if (fListenerMethodDescriptors == null) { - MethodDescriptor[] mds = ((EventSetDescriptor) fFeature).getListenerMethodDescriptors(); - fListenerMethodDescriptors = new ArrayList(mds.length); - for (int i=0; i<mds.length; i++) - fListenerMethodDescriptors.add(new MethodDescriptorEquality(mds[i])); - } - return fListenerMethodDescriptors; - } - - /** - * Calculate the hashcode for the current feature, add this - * to the hashcode received from super.calculateHashCode - * and return the new value. - * - * NOTE: for subclasses, it is MANDITORY that the first line be: - * int hashcode = super.calculateHashCode(); - * and the last line be: - * return hashcode*31 + (your calculated hashcode for just this subclass); - */ - protected int calculateHashCode() { - int hashcode = super.calculateHashCode(); - EventSetDescriptor bd = (EventSetDescriptor) fFeature; - int hc = bd.getAddListenerMethod().hashCode(); - Method[] methods = bd.getListenerMethods(); - int mhc = 0; - for (int i=0; i<methods.length; i++) - mhc = mhc*31 + methods[i].hashCode(); - hc += mhc; - hc += listenerMethodDescriptors().hashCode(); - hc += bd.getListenerType().hashCode(); - hc += bd.getRemoveListenerMethod().hashCode(); - hc += (bd.isInDefaultEventSet() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - hc += (bd.isUnicast() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - - return hashcode*31 + hc; - } - - - public boolean equals(Object obj) { - if (identityTest(obj)) - return true; - - if (!super.equals(obj)) - return false; - - EventSetDescriptor oe = (EventSetDescriptor) ((FeatureDescriptorEquality) obj).fFeature; - EventSetDescriptor fe = (EventSetDescriptor) fFeature; - - EventSetDescriptorEquality oee = (EventSetDescriptorEquality) obj; - - if (!oe.getAddListenerMethod().equals(fe.getAddListenerMethod())) - return false; - if (!java.util.Arrays.equals(oe.getListenerMethods(), fe.getListenerMethods())) - return false; - if (oe.getListenerType() != fe.getListenerType()) - return false; - if (oe.getRemoveListenerMethod() != fe.getRemoveListenerMethod()) - return false; - if (oe.isInDefaultEventSet() != fe.isInDefaultEventSet()) - return false; - if (oe.isUnicast() != oe.isUnicast()) - return false; - - if (fListenerMethodDescriptors != null || oee.fListenerMethodDescriptors != null) { - // We are in a Map lookup situation, so one side has listener method equalities, so we will compare that way. - if (!oee.listenerMethodDescriptors().equals(listenerMethodDescriptors())) - return false; - } else { - // We are in the building the list phases, don't waste space building entire list. - MethodDescriptor[] ours = fe.getListenerMethodDescriptors(); - MethodDescriptor[] theirs = oe.getListenerMethodDescriptors(); - if (ours.length != theirs.length) - return false; - if (ours.length > 0) { - MethodDescriptorEquality workingOurs = new MethodDescriptorEquality(); - MethodDescriptorEquality workingThiers = new MethodDescriptorEquality(); - for (int i = 0; i < ours.length; i++) { - workingOurs.setFeature(ours[i]); - workingThiers.setFeature(theirs[i]); - if (!workingOurs.equals(workingThiers)) - return false; - } - } - } - - return true; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/FeatureDescriptorEquality.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/FeatureDescriptorEquality.java deleted file mode 100644 index e06cc023a..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/FeatureDescriptorEquality.java +++ /dev/null @@ -1,201 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: FeatureDescriptorEquality.java,v $ - * $Revision: 1.5 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.*; -import java.util.*; -import java.lang.reflect.*; -/** - * This object is used to test for semantic equality (equals()) - * between feature objects. It is needed because Feature's don't - * provide a semantic equality, only an identity equality. Need - * semantic equality so that keys in map can be found equal - * semantically. - */ - -public class FeatureDescriptorEquality { - protected FeatureDescriptor fFeature; - - private HashMap fValues; // The key/values for this feature. We grab them out - // so that we don't have to keep re-getting them for equality - // compares. This is done the first time needed in the equals - // statement. - - private int fHashCode = 0; // Hashcode of this equality object. The hashcode for the feature is expensive - // so we will calculate it once (the assumption is that - // features once created aren't changed, which for our - // purposes here in beaninfo land is good). - - protected static HashMap MAP_EQUALITY = new HashMap(10); // Map from descriptor to equality type. - static { - try { - MAP_EQUALITY.put(FeatureDescriptor.class, (FeatureDescriptorEquality.class).getConstructor(new Class[] {FeatureDescriptor.class})); - } catch (NoSuchMethodException e) { - } - // Need to set up the others. - BeanDescriptorEquality.INIT(); - EventSetDescriptorEquality.INIT(); - IndexedPropertyDescriptorEquality.INIT(); - MethodDescriptorEquality.INIT(); - ParameterDescriptorEquality.INIT(); - } - - /** - * Create the appropriate descriptor equality for this object. - */ - public static FeatureDescriptorEquality createEquality(FeatureDescriptor descr) { - try { - return (FeatureDescriptorEquality) ((Constructor) MAP_EQUALITY.get(descr.getClass())).newInstance(new Object[] {descr}); - } catch (IllegalAccessException e) { - } catch (InstantiationException e) { - } catch (InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - public FeatureDescriptorEquality() { - } - - /** - * NOTE: Every subclass needs to implement an override for the methods: - * calculateHashCode - * equals - * clearFeature - if it has any cache values - */ - - public FeatureDescriptorEquality(FeatureDescriptor feature) { - setFeature(feature); - } - - public final void setFeature(FeatureDescriptor feature) { - clearFeature(); - fFeature = feature; - } - - /** - * A new feature is being set into this object, - * clear any cache members so that they can be reconstructed. - * - * NOTE: Subclasses - remember to call super.clearFeature(); - */ - protected void clearFeature() { - fValues = null; - fHashCode = 0; - } - - public final int hashCode() { - if (fHashCode == 0) - fHashCode = calculateHashCode(); - return fHashCode; - } - - protected final HashMap values() { - if (fValues == null) { - fValues = new HashMap(5); - - Enumeration keys = fFeature.attributeNames(); - while (keys.hasMoreElements()) { - String key = (String) keys.nextElement(); - fValues.put(key, fFeature.getValue(key)); - } - } - return fValues; - } - - /** - * Calculate the hashcode for the current feature, add this - * to the hashcode received from super.calculateHashCode - * and return the new value. - * - * NOTE: for subclasses, it is MANDITORY that the first line be: - * int hashcode = super.calculateHashCode(); - * and the last line be: - * return hashcode*31 + (your calculated hashcode for just this subclass); - */ - protected int calculateHashCode() { - int hashcode = 0; - if (fFeature.getName() != null) - hashcode += fFeature.getName().hashCode(); - - if (fFeature.getDisplayName() != fFeature.getName()) - hashcode += fFeature.getDisplayName().hashCode(); - if (fFeature.getShortDescription() != fFeature.getDisplayName()) - hashcode += fFeature.getShortDescription().hashCode(); - - hashcode += (fFeature.isExpert() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - hashcode += (fFeature.isHidden() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - hashcode += (fFeature.isPreferred() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - - hashcode += values().hashCode(); - return hashcode; - } - - /** - * equals: See if this is equal semantically. - * - * NOTE: Every subclass needs to implement this and - * the first few lines should be: - * if (identityTest()) - * return true; - * if (!super.equals(obj)) - * return false; - */ - - public boolean equals(Object obj) { - if (identityTest(obj)) - return true; - if (!(obj instanceof FeatureDescriptorEquality)) - return false; - - FeatureDescriptorEquality ofe = (FeatureDescriptorEquality) obj; - FeatureDescriptor of = ofe.fFeature; - - if (fFeature.getClass() != of.getClass()) - return false; - - if (!fFeature.getName().equals(of.getName())) - return false; - if (!fFeature.getDisplayName().equals(of.getDisplayName())) - return false; - if (!fFeature.getShortDescription().equals(of.getShortDescription())) - return false; - if (fFeature.isExpert() != of.isExpert() || - fFeature.isHidden() != of.isHidden() || - fFeature.isPreferred() != of.isPreferred()) - return false; - - if (!values().equals(ofe.values())) - return false; - return true; - } - - /* - * Identity test: Tests for quick identity of - * descriptors. If this returns true, then - * no other tests required. - */ - protected boolean identityTest(Object obj) { - if (!(obj instanceof FeatureDescriptorEquality)) - return false; - if (this == obj) - return true; - - if (((FeatureDescriptorEquality) obj).fFeature == fFeature) - return true; - - return false; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/IndexedPropertyDescriptorEquality.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/IndexedPropertyDescriptorEquality.java deleted file mode 100644 index 3e84939c5..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/IndexedPropertyDescriptorEquality.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: IndexedPropertyDescriptorEquality.java,v $ - * $Revision: 1.5 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.*; -/** - * IndexedPropertyDescriptor equality tester - */ -public class IndexedPropertyDescriptorEquality extends PropertyDescriptorEquality { - - static void INIT() { - try { - MAP_EQUALITY.put(IndexedPropertyDescriptor.class, (IndexedPropertyDescriptorEquality.class).getConstructor(new Class[] {PropertyDescriptor.class})); - MAP_EQUALITY.put(PropertyDescriptor.class, (IndexedPropertyDescriptorEquality.class).getConstructor(new Class[] {PropertyDescriptor.class})); - } catch (NoSuchMethodException e) { - } - } - - public IndexedPropertyDescriptorEquality() { - } - - public IndexedPropertyDescriptorEquality(PropertyDescriptor descr) { - super(descr); - } - /** - * Calculate the hashcode for the current feature, add this - * to the hashcode received from super.calculateHashCode - * and return the new value. - * - * NOTE: for subclasses, it is MANDITORY that the first line be: - * int hashcode = super.calculateHashCode(); - * and the last line be: - * return hashcode*31 + (your calculated hashcode for just this subclass); - */ - protected int calculateHashCode() { - int hashcode = super.calculateHashCode(); - if (fFeature instanceof IndexedPropertyDescriptor) { - IndexedPropertyDescriptor pd = (IndexedPropertyDescriptor) fFeature; - - int hc = pd.getIndexedPropertyType().hashCode(); - - if (pd.getIndexedReadMethod() != null) - hc += pd.getIndexedReadMethod().hashCode(); - if (pd.getIndexedWriteMethod() != null) - hc += pd.getIndexedWriteMethod().hashCode(); - return hashcode*31 + hc; - } else - return hashcode; - } - - public boolean equals(Object obj) { - if (!(obj instanceof FeatureDescriptorEquality)) - return false; - if (identityTest(obj)) - return true; - if (fFeature.getClass() != ((FeatureDescriptorEquality) obj).fFeature.getClass()) - return false; // If they aren't both PropertyDesciptors or IndexedPropertyDescriptors, then they don't match. - if (!super.equals(obj)) - return false; - - if (fFeature instanceof IndexedPropertyDescriptor) { - IndexedPropertyDescriptor op = (IndexedPropertyDescriptor) ((FeatureDescriptorEquality) obj).fFeature; - IndexedPropertyDescriptor fp = (IndexedPropertyDescriptor) fFeature; - - if (op.getIndexedPropertyType() != fp.getIndexedPropertyType()) - return false; - if (op.getIndexedReadMethod() != fp.getIndexedReadMethod()) - return false; - if (op.getIndexedWriteMethod() != fp.getIndexedWriteMethod()) - return false; - } - - return true; - } - - - - -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/MethodDescriptorEquality.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/MethodDescriptorEquality.java deleted file mode 100644 index 263319afb..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/MethodDescriptorEquality.java +++ /dev/null @@ -1,135 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: MethodDescriptorEquality.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.*; -import java.util.*; -/** - * Equality tester for MethodDescriptors - */ -public class MethodDescriptorEquality extends FeatureDescriptorEquality { - - static void INIT() { - try { - MAP_EQUALITY.put(MethodDescriptor.class, (MethodDescriptorEquality.class).getConstructor(new Class[] {MethodDescriptor.class})); - } catch (NoSuchMethodException e) { - } - } - - private ArrayList fParameterDescriptors; // Array of ParameterDescriptorEquality's. - - public MethodDescriptorEquality() { - } - - public MethodDescriptorEquality(MethodDescriptor descr) { - super(descr); - } - - /** - * A new feature is being set into this object, - * clear any cache members so that they can be reconstructed. - * - * NOTE: Subclasses - remember to call super.clearFeature(); - */ - protected void clearFeature() { - super.clearFeature(); - fParameterDescriptors = null; - } - - protected ArrayList parameterDescriptors() { - if (fParameterDescriptors == null) { - ParameterDescriptor[] pds = ((MethodDescriptor) fFeature).getParameterDescriptors(); - if (pds != null) { - fParameterDescriptors = new ArrayList(pds.length); - for (int i=0; i<pds.length; i++) - fParameterDescriptors.add(new ParameterDescriptorEquality(pds[i])); - } - } - return fParameterDescriptors; - } - /** - * Calculate the hashcode for the current feature, add this - * to the hashcode received from super.calculateHashCode - * and return the new value. - * - * NOTE: for subclasses, it is MANDITORY that the first line be: - * int hashcode = super.calculateHashCode(); - * and the last line be: - * return hashcode*31 + (your calculated hashcode for just this subclass); - */ - protected int calculateHashCode() { - int hashcode = super.calculateHashCode(); - MethodDescriptor bd = (MethodDescriptor) fFeature; - int hc = bd.getMethod().hashCode(); - if (parameterDescriptors() != null) - hc += parameterDescriptors().hashCode(); - - return hashcode*31 + hc; - } - - public boolean equals(Object obj) { - if (identityTest(obj)) - return true; - - if (!super.equals(obj)) - return false; - - MethodDescriptorEquality oem = (MethodDescriptorEquality) obj; - MethodDescriptor om = (MethodDescriptor) oem.fFeature; - MethodDescriptor fm = (MethodDescriptor) fFeature; - - if (fm.getMethod() != om.getMethod()) - return false; - - if (fParameterDescriptors != null || oem.fParameterDescriptors != null) { - // We are in a Map lookup situation, so one side has listener method equalities, so we will compare that way. - if (parameterDescriptors() == null) - if (((MethodDescriptorEquality) obj).parameterDescriptors() != null) - return false; - else ; - else - if (!parameterDescriptors().equals(((MethodDescriptorEquality) obj).parameterDescriptors())) - return false; - } else { - // We are in the building the list phases, don't waste space building entire list. - ParameterDescriptor[] ours = fm.getParameterDescriptors(); - ParameterDescriptor[] theirs = om.getParameterDescriptors(); - if (ours == theirs) - return true; - else if (ours == null) - if (theirs != null) - return false; - else - ; - else if (theirs == null) - return false; - else if (ours.length != theirs.length) - return false; - else if (ours.length > 0) { - ParameterDescriptorEquality workingOurs = new ParameterDescriptorEquality(); - ParameterDescriptorEquality workingThiers = new ParameterDescriptorEquality(); - for (int i = 0; i < ours.length; i++) { - workingOurs.setFeature(ours[i]); - workingThiers.setFeature(theirs[i]); - if (!workingOurs.equals(workingThiers)) - return false; - } - } - } - - - return true; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfo.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfo.java deleted file mode 100644 index 444943ba3..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfo.java +++ /dev/null @@ -1,863 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; - -/* - * $RCSfile: ModelingBeanInfo.java,v $ - * $Revision: 1.11 $ $Date: 2005/10/18 15:32:19 $ - */ - -import java.beans.*; -import java.io.IOException; -import java.io.ObjectOutputStream; -import java.lang.reflect.*; -import java.util.*; - -import org.eclipse.jem.beaninfo.common.IBaseBeanInfoConstants; -import org.eclipse.jem.beaninfo.vm.BaseBeanInfo; -import org.eclipse.jem.internal.beaninfo.common.*; -import org.eclipse.jem.internal.proxy.common.*; - -/** - * This class is the beaninfo class that is created when beaninfo modeling introspects a bean. Its purpose is to gather together and analyze the - * beaninfo. For example, it checks with the supertype beaninfo to see if all of the supertype's descriptors are included in this list. If they are, - * then it knows that it does a straight inheritance of the supertype's descriptors, and those descriptors can be removed from the list. This makes it - * easier on the model side so that there isn't a great proliferation of descriptors all describing the same properties. In that case they can be - * merged from the supertype model. If some are not found, then that means this beaninfo is trying to hide some of them, and in that case this is the - * definitive list and inheritance shouldn't be used on the model side. However, for those features which are essentially the inherited feature (i.e. - * the BeanInfo simply filtered out some inherited but not all), they will be returnable (by name). The IDE side will take these that are "inherited" - * and will return the actual structured feature from the inherited class. - * - * The test for seeing if the super feature is included in the beaninfo is first to see if the the feature is in the beaninfo by name, if it is then - * it is marked as included. Then a check is made on equality, if they are equal, then the feature is removed from the beaninfo list, but the merge - * flag is still left on, and removed inherited feature is added to the list of inherited features. If all inherited features are found, this list is - * cleared and flag is set which simply says merge all inherited. This allows merging to occur but it also allows overrides to occur. - * - * Note: Test for identity is different between JDK 1.5 and above and below. 1.5 and above, we can use actual equals() because the same descriptor is - * returned from inherited features. In 1.3, clones were always returned and equals() would answer false, so we need to create a special equality - * descriptor which turns the equals() into one that can test clones for semantic equality. See Java Bug ID#4996673 The problem was supposed to be - * fixed in 1.4 but it was not fixed. Originally a new clone was created each time a beaninfo was requested. That is no longer done in 1.4, but the - * processing to create the original beaninfo does a clone accidently under the covers. Looking at 1.5 it looks this was fixed, but it hasn't been - * tested here yet. - */ - -public abstract class ModelingBeanInfo implements ICallback { - - private static boolean PRE15; - static { - String version = System.getProperty("java.version", ""); //$NON-NLS-1$ //$NON-NLS-2$ - PRE15 = version.startsWith("1."); //$NON-NLS-1$ - if (PRE15) { - // Continue to check, get the revision. - int revision = 0; - if (version.length() > 2) { - int revEnd = version.indexOf('.', 2); - revision = version.length() > 2 ? Integer.parseInt(revEnd != -1 ? version.substring(2, revEnd) : version.substring(2)) : 0; - PRE15 = revision < 5; - } - } - } - - static class FeatureEqualitySet extends HashSet { - - /** - * Comment for <code>serialVersionUID</code> - * - * @since 1.1.0 - */ - private static final long serialVersionUID = -3744776740604328324L; - private FeatureDescriptorEquality workingKey; - - public FeatureEqualitySet(List features) { - super(features.size()); - // Get first feature to fiqure out type of working key. This will not be reentrant. - workingKey = FeatureDescriptorEquality.createEquality((FeatureDescriptor) features.get(0)); - this.addAll(features); - } - - /** - * @see java.util.Collection#add(Object) - */ - public boolean add(Object o) { - return super.add(FeatureDescriptorEquality.createEquality((FeatureDescriptor) o)); - } - - /** - * @see java.util.Collection#contains(Object) - */ - public boolean contains(Object o) { - workingKey.setFeature((FeatureDescriptor) o); - return super.contains(workingKey); - } - - } - - // The following fields indicate if the super info should be merged - // in on the model side. no merge means there were no inherited methods at all. So the - // beaninfo presented is definitive. If merge, then get...Descriptors will return just - // the ones for this level, and getSuper...Descriptors will return the inherited ones. - // Though in this case, if the returned super list is null, then that means use ALL of - // the inherited ones. - // The super list returns simply the names, don't need to have the full descriptors in that case. - protected boolean fMergeInheritedEvents = false, fMergeInheritedMethods = false, fMergeInheritedProperties = false; - - protected final BeanInfo fTargetBeanInfo; // The beaninfo being modeled. - - // Local descriptors - protected EventSetDescriptor[] fEventSets; - - protected MethodDescriptor[] fMethods; - - protected PropertyDescriptor[] fProperties; - - // Not inherited descriptor names, will be null if no merge or if merge all. This is list of names to NOT merge. It is usually shorter than the list to merge from super. - - // Methods are special. You can have duplicates, so name is not sufficient. - // So for methods, - // will use an array of Strings where: - // For each one the full signature - // will be in the list, e.g. "name:methodName(argtype,..." where argtype is the fullyqualified - // classname (using "." notation for inner classes), and using format "java.lang.String[]" for - // arrays. - // - // This is because even if there are no duplicates, it will take less time/space to simply create the entries - // then it would to create a set to see if there are duplicates and then create the final array. - protected String[] fNotInheritedEventSets; - - protected String[] fNotInheritedMethods; - - protected String[] fNotInheritedProperties; - - protected int doFlags; - - /** - * Method used to do introspection and create the appropriate ModelingBeanInfo - * - * This will always introspect. - */ - public static ModelingBeanInfo introspect(Class introspectClass, int doFlags) throws IntrospectionException { - return introspect(introspectClass, true, doFlags); - } - - /** - * Method used to do introspection and create the appropriate ModelingBeanInfo - * - * introspectIfNoBeanInfo: If this is true, then if no explicit beaninfo was found for this class, then introspection will be done anyway. The - * Introspector will use reflection for local methods/events/properties of this class and then add in the results of the superclass introspection. - * If this parameter is false, then if the explicit beaninfo is not found, then no introspection will be done and null will be returned. - */ - public static ModelingBeanInfo introspect(Class introspectClass, boolean introspectIfNoBeanInfo, int doFlags) throws IntrospectionException { - if (!Beans.isDesignTime()) - Beans.setDesignTime(true); // Since this a jem beaninfo specific vm, we should also be considered design time. - if (!introspectIfNoBeanInfo) { - // Need to check if the beaninfo is explicitly supplied. - // If not, then we return null. - // The checks will be the same that Introspector will use. - - boolean found = false; - // 1. Is there a BeanInfo class in the same package - if (!classExists(introspectClass.getName() + "BeanInfo", introspectClass)) { //$NON-NLS-1$ - // 2. Is this class a BeanInfo class for itself. - if (!(BeanInfo.class).isAssignableFrom(introspectClass)) { - // 3. Can this class be found in the Beaninfo searchpath. - String[] searchPath = Introspector.getBeanInfoSearchPath(); - int startClassname = introspectClass.getName().lastIndexOf(".") + 1; //$NON-NLS-1$ - String biName = "." + introspectClass.getName().substring(startClassname) + "BeanInfo"; //$NON-NLS-1$ //$NON-NLS-2$ - for (int i = 0; i < searchPath.length; i++) { - if (classExists(searchPath[i] + biName, introspectClass)) { - found = true; - break; - } - } - } else - found = true; - } else - found = true; - - if (!found) - return null; - } - - BeanInfo bInfo = Introspector.getBeanInfo(introspectClass); - Class superClass = introspectClass.getSuperclass(); - - if (superClass == null) - return PRE15 ? (ModelingBeanInfo) new ModelingBeanInfoPre15(bInfo, doFlags) : new ModelingBeanInfo15(bInfo, doFlags); - else - return PRE15 ? (ModelingBeanInfo) new ModelingBeanInfoPre15(bInfo, Introspector.getBeanInfo(superClass), doFlags) : new ModelingBeanInfo15(bInfo, - Introspector.getBeanInfo(superClass), doFlags); - } - - /** - * See if this class exists, first in the class loader of the sent class, then in the system loader, then the bootstrap loader, and finally the - * current thread context class loader. - */ - protected static boolean classExists(String className, Class fromClass) { - if (fromClass.getClassLoader() != null) - try { - fromClass.getClassLoader().loadClass(className); - return true; - } catch (ClassNotFoundException e) { - } - if (ClassLoader.getSystemClassLoader() != null) - try { - ClassLoader.getSystemClassLoader().loadClass(className); - return true; - } catch (ClassNotFoundException e) { - } - try { - Class.forName(className); - return true; - } catch (ClassNotFoundException e) { - } - - try { - // Use the classloader from the current Thread. - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - cl.loadClass(className); - return true; - } catch (ClassNotFoundException e) { - } - - return false; - - } - - /** - * Used only for Object since that is the only bean that doesn't have a superclass. Superclass beaninfo required for all other classes. If this is - * constructed then this means no merge and the list is definitive. - */ - protected ModelingBeanInfo(BeanInfo beanInfo, int doFlags) { - fTargetBeanInfo = beanInfo; - this.doFlags = doFlags; - } - - protected ModelingBeanInfo(BeanInfo beanInfo, BeanInfo superBeanInfo, int doFlags) { - this(beanInfo, doFlags); - - // Now go through the beaninfo to determine the merge state. - // The default is no merge. - - if ((doFlags & IBeanInfoIntrospectionConstants.DO_EVENTS) != 0) { - List full = addAll(beanInfo.getEventSetDescriptors()); - List inherited = addAll(superBeanInfo.getEventSetDescriptors()); - - fMergeInheritedEvents = stripList(full, inherited); - if (fMergeInheritedEvents) { - if (!full.isEmpty()) - fEventSets = (EventSetDescriptor[]) full.toArray(new EventSetDescriptor[full.size()]); - if (!inherited.isEmpty()) - createEventArray(inherited); // This is actually a list of those NOT inherited. - } - } - - if ((doFlags & IBeanInfoIntrospectionConstants.DO_METHODS) != 0) { - List full = addAll(beanInfo.getMethodDescriptors()); - List inherited = addAll(superBeanInfo.getMethodDescriptors()); - - fMergeInheritedMethods = stripList(full, inherited); - if (fMergeInheritedMethods) { - if (!full.isEmpty()) - fMethods = (MethodDescriptor[]) full.toArray(new MethodDescriptor[full.size()]); - if (!inherited.isEmpty()) - createMethodEntries(inherited); // This is actually a list of those NOT inherited. - } - } - - if ((doFlags & IBeanInfoIntrospectionConstants.DO_PROPERTIES) != 0) { - List full = addAll(beanInfo.getPropertyDescriptors()); - List inherited = addAll(superBeanInfo.getPropertyDescriptors()); - - fMergeInheritedProperties = stripList(full, inherited); - if (fMergeInheritedProperties) { - if (!full.isEmpty()) - fProperties = (PropertyDescriptor[]) full.toArray(new PropertyDescriptor[full.size()]); - if (!inherited.isEmpty()) - createPropertyArray(inherited); // This is actually a list of those NOT inherited. - } - } - } - - protected void createEventArray(List features) { - fNotInheritedEventSets = createDescriptorNames(features); - } - - protected void createMethodEntries(List features) { - int s = features.size(); - fNotInheritedMethods = new String[s]; - for (int i = 0; i < s; i++) { - fNotInheritedMethods[i] = longName((MethodDescriptor) features.get(i)); - } - } - - protected String longName(MethodDescriptor md) { - String n = md.getName(); - StringBuffer sb = new StringBuffer(n.length() + 20); - sb.append(n); - sb.append(':'); - Method m = md.getMethod(); - sb.append(m.getName()); - sb.append('('); - Class[] parms = m.getParameterTypes(); - for (int j = 0; j < parms.length; j++) { - if (j > 0) - sb.append(','); - if (!parms[j].isArray()) - sb.append(parms[j].getName().replace('$', '.')); - else { - Class finalType = parms[j].getComponentType(); - int insrt = sb.length(); - while (finalType.isArray()) { - sb.append("[]"); //$NON-NLS-1$ - finalType = finalType.getComponentType(); - } - sb.insert(insrt, finalType.getName().replace('$', '.')); - } - } - return sb.toString(); - } - - protected void createPropertyArray(List features) { - fNotInheritedProperties = createDescriptorNames(features); - } - - protected String[] createDescriptorNames(List features) { - String[] result = new String[features.size()]; - for (int i = 0; i < result.length; i++) { - result[i] = ((FeatureDescriptor) features.get(i)).getName(); - } - return result; - } - - protected List addAll(Object[] set) { - if (set != null) { - ArrayList l = new ArrayList(set.length); - for (int i = 0; i < set.length; i++) { - l.add(set[i]); - } - return l; - } else - return Collections.EMPTY_LIST; - } - - /** - * If this returns true, then all of the super class's events should be merged in. If it returns false, then the events returned are it, there are - * no others. - */ - public boolean isMergeInheritedEvents() { - return fMergeInheritedEvents; - } - - /** - * If this returns true, then all of the super class's methods should be merged in. If it returns false, then the methods returned are it, there - * are no others. - */ - public boolean isMergeInheritedMethods() { - return fMergeInheritedMethods; - } - - /** - * If this returns true, then all of the super class's properties should be merged in. If it returns false, then the properties returned are it, - * there are no others. - */ - public boolean isMergeInheritedProperties() { - return fMergeInheritedProperties; - } - - public BeanInfo[] getAdditionalBeanInfo() { - return fTargetBeanInfo.getAdditionalBeanInfo(); - } - - public BeanDescriptor getBeanDescriptor() { - return fTargetBeanInfo.getBeanDescriptor(); - } - - public EventSetDescriptor[] getEventSetDescriptors() { - return fMergeInheritedEvents ? fEventSets : fTargetBeanInfo.getEventSetDescriptors(); - } - - public java.awt.Image getIcon(int iconKind) { - return fTargetBeanInfo.getIcon(iconKind); - } - - public MethodDescriptor[] getMethodDescriptors() { - return fMergeInheritedMethods ? fMethods : fTargetBeanInfo.getMethodDescriptors(); - } - - public PropertyDescriptor[] getPropertyDescriptors() { - return fMergeInheritedProperties ? fProperties : fTargetBeanInfo.getPropertyDescriptors(); - } - - public String[] getNotInheritedEventSetDescriptors() { - return fNotInheritedEventSets; - } - - public String[] getNotInheritedMethodDescriptors() { - return fNotInheritedMethods; - } - - public String[] getNotInheritedPropertyDescriptors() { - return fNotInheritedProperties; - } - - protected String computeKey(FeatureDescriptor feature) { - return feature instanceof MethodDescriptor ? longName((MethodDescriptor) feature) : feature.getName(); - } - - /* - * Strip the list down using the Equality objects. - */ - protected boolean stripList(List fullList, List inheritedList) { - // The process is to create a boolean list mirroring the inheritedList. - // This boolean list indicates if the corresponding (by index) - // entry from the inheritedList is to be retained in the final computed - // list. - // - // A Hashmap is created where the key is the computedKey from the inheritedList - // and the value is the index into the inheritedList. This is so that we can quickly determine if the - // entry is matching. - // - // Then the fullList will be stepped through and see if there is - // an entry in the Hashmap for it. If there is an entry, then - // the entry is checked to see if it is semantically equal. - // If it is, then the boolean list entry is marked so that - // the inheritedList entry will be retained, the fullList entry removed and the counter - // of the number of entries in the inheritedList copy is incremented. - // If they aren't semantically equal, then we know that this is - // an override. In that case, the fullList entry is kept, the inheritedList - // entry is not retained, but we don't prevent merge later. - // - // If the fullList entry is not found in the HashMap, then we know it is not - // from the inheritedList, so it will be retained in the fullList. - // - // If we get all of the way through, then we know that what is left - // in fullList is just this level. - // - // When we return we know that - // a) fullList has only the features that are found at the local level - // b) inheritedList if not empty contains the ones from super that SHOULD NOT be inherited. - // If it is empty, then if this method returns true, then ALL should be inherited, - // or if this method returns false, then it doesn't matter because we aren't merging any. - // - // All of this is based upon the assumption that the list can - // get quite large (which it does for javax.swing) and that - // a simple n-squared order search would be too slow. - - if (fullList.isEmpty()) { - return false; // There are none in the full list, so there should be none, and don't merge. - } else if (inheritedList.isEmpty()) - return false; // There are no inheritedList features, so treat as no merge. - - // We have some features and some inheritedList features, so we need to go through the lists. - - // Create a working copy of the FeatureDescriptorEquality for fullList and stripList and just reuse them - FeatureDescriptorEquality workingStrip = FeatureDescriptorEquality.createEquality((FeatureDescriptor) inheritedList.get(0)); - FeatureDescriptorEquality workingFull = FeatureDescriptorEquality.createEquality((FeatureDescriptor) fullList.get(0)); - - int inheritedSize = inheritedList.size(); - boolean[] copy = new boolean[inheritedSize]; - - HashMap inheritedMap = new HashMap(inheritedSize); - for (int i = 0; i < inheritedSize; i++) { - FeatureDescriptor f = (FeatureDescriptor) inheritedList.get(i); - String key = computeKey(f); - Object value = inheritedMap.get(key); - if (value == null) - inheritedMap.put(key, new Integer(i)); - else { - // Shouldn't occur. - } - - } - - // When we are done with this processing, inheritedList will contain the super that should not be used, and full list will contain only the locals - // (those defined at this class level).; - int inheritedRetained = 0; - Iterator fullItr = fullList.iterator(); - // Continue while we've retained less than the full super amount. If we've retained all of the inheritedList, there is no - // need to continue processing the fullList because there can't possibly be any inheritedList entries left to find. - while (inheritedRetained < inheritedSize && fullItr.hasNext()) { - FeatureDescriptor f = (FeatureDescriptor) fullItr.next(); - boolean foundFull = false; - Object index = inheritedMap.get(computeKey(f)); - if (index != null) { - workingFull.setFeature(f); - int ndx = ((Integer) index).intValue(); - workingStrip.setFeature((FeatureDescriptor) inheritedList.get(ndx)); - if (workingFull.equals(workingStrip)) { - // They are semantically identical, so retain in the inheritedList. - copy[ndx] = true; - foundFull = true; - inheritedRetained++; - } - } - - if (foundFull) { - // We found the inheritedList entry semantically equal in the full list somewhere, so we need to remove the full entry. - fullItr.remove(); - } - } - - if (inheritedRetained == inheritedSize) { - inheritedList.clear(); // All were found in inheritedList, so just clear the inheritedList and return just what was left in the found. - // Those in full found in super had been removed from full during the processing. - return true; // We merge with all inherited. - } else if (inheritedRetained != 0) { - // Some were retained, take out of the list those that were retained. - // When done the list will contain those that should be dropped from the inherited list. - // We start from end because the actual number of bytes moved overall will be less than if we started from the front. - for (ListIterator itr = inheritedList.listIterator(inheritedList.size()); itr.hasPrevious();) { - int i = itr.previousIndex(); - itr.previous(); // To back up the itr so that remove can remove it. We actually don't care what the value is. - if (copy[i]) - itr.remove(); - } - return true; // We merge, and the list is not empty but it did have some removed, so we leave the list alone. Those are not inherited. - } else - return false; // All were removed (retained == 0). None were retained. So we just don't do a merge. The list will be ignored. - } - - // The modeling beaninfo is also used to send itself back in serialized mode as a callback. - - private IVMCallbackServer vmServer; - - private int callbackID; - - /* - * (non-Javadoc) - * - * @see org.eclipse.jem.internal.proxy.common.ICallback#initializeCallback(org.eclipse.jem.internal.proxy.common.IVMServer, int) - */ - public void initializeCallback(IVMCallbackServer vmServer, int callbackID) { - this.vmServer = vmServer; - this.callbackID = callbackID; - } - - public void send() throws IOException, CommandException { - if (doFlags != 0) { - ObjectOutputStream stream = new ObjectOutputStream(vmServer.requestStream(callbackID, 0)); - if ((doFlags & IBeanInfoIntrospectionConstants.DO_BEAN_DECOR) != 0) - sendBeanDecorator(stream); - if ((doFlags & IBeanInfoIntrospectionConstants.DO_PROPERTIES) != 0) - sendPropertyDecorators(stream); - if ((doFlags & IBeanInfoIntrospectionConstants.DO_METHODS) != 0) - sendMethodDecorators(stream); - if ((doFlags & IBeanInfoIntrospectionConstants.DO_EVENTS) != 0) - sendEventDecorators(stream); - stream.writeInt(IBeanInfoIntrospectionConstants.DONE); - stream.close(); - } - } - - /** - * Called by IDE to send the bean decorator information back through the callback. - * @throws CommandException - * @throws IOException - * - * @since 1.1.0 - */ - public void sendBeanDecorator(ObjectOutputStream stream) throws IOException, CommandException { - BeanRecord br = new BeanRecord(); - BeanDescriptor bd = getBeanDescriptor(); - - if (bd != null) { - br.customizerClassName = getClassName(bd.getCustomizerClass()); - br.mergeInheritedProperties = isMergeInheritedProperties(); - br.mergeInheritedOperations = isMergeInheritedMethods(); - br.mergeInheritedEvents = isMergeInheritedEvents(); - br.notInheritedPropertyNames = getNotInheritedPropertyDescriptors(); - br.notInheritedOperationNames = getNotInheritedMethodDescriptors(); - br.notInheritedEventNames = getNotInheritedEventSetDescriptors(); - fill(bd, br, BEAN_RECORD_TYPE); - } - stream.writeInt(IBeanInfoIntrospectionConstants.BEAN_DECORATOR_SENT); - stream.writeObject(br); - } - - /** - * Called by IDE to send the property decorators information back through the callback. - * - * @throws CommandException - * @throws IOException - * @since 1.1.0 - */ - public void sendPropertyDecorators(ObjectOutputStream stream) throws IOException, CommandException { - PropertyDescriptor[] properties = getPropertyDescriptors(); - if (properties != null && properties.length > 0) { - // Now start writing the records. - stream.writeInt(IBeanInfoIntrospectionConstants.PROPERTY_DECORATORS_SENT); - stream.writeInt(properties.length); - for (int i = 0; i < properties.length; i++) { - PropertyDescriptor pd = properties[i]; - // Much of the two types are common, so if indexed, fill in the index part and then pass on to property part. - PropertyRecord usepr = null; - int useType = 0; - if (pd.getClass() == IndexedPropertyDescriptor.class) { - IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd; - IndexedPropertyRecord ipr = new IndexedPropertyRecord(); - usepr = ipr; - useType = INDEXEDPROPERTY_RECORD_TYPE; - ipr.indexedReadMethod = getReflectedMethodRecord(ipd.getIndexedReadMethod()); - ipr.indexedWriteMethod = getReflectedMethodRecord(ipd.getIndexedWriteMethod()); - ipr.indexedPropertyTypeName = getClassName(ipd.getIndexedPropertyType()); - } else { - usepr = new PropertyRecord(); - useType = PROPERTY_RECORD_TYPE; - } - usepr.propertyEditorClassName = getClassName(pd.getPropertyEditorClass()); - usepr.propertyTypeName = getClassName(pd.getPropertyType()); - usepr.readMethod = getReflectedMethodRecord(pd.getReadMethod()); - usepr.writeMethod = getReflectedMethodRecord((pd.getWriteMethod())); - usepr.bound = pd.isBound(); - usepr.constrained = pd.isConstrained(); - usepr.designTime = null; - usepr.field = null; - fill(pd, usepr, useType); - stream.writeObject(usepr); - } - } - } - - /** - * Called by IDE to send the method decorators information back through the callback. - * - * @throws CommandException - * @throws IOException - * @since 1.1.0 - */ - public void sendMethodDecorators(ObjectOutputStream stream) throws IOException, CommandException { - MethodDescriptor[] methods = getMethodDescriptors(); - if (methods != null && methods.length > 0) { - // Now start writing the records. - stream.writeInt(IBeanInfoIntrospectionConstants.METHOD_DECORATORS_SENT); - stream.writeInt(methods.length); - for (int i = 0; i < methods.length; i++) { - MethodRecord mr = new MethodRecord(); - fill(mr, methods[i]); - stream.writeObject(mr); - } - } - } - - /** - * Fill in a MethodRecord from the MethodDescriptor. - * @param mr - * @param md - * - * @since 1.1.0 - */ - protected void fill(MethodRecord mr, MethodDescriptor md) { - mr.methodForDescriptor = getReflectedMethodRecord(md.getMethod()); - ParameterDescriptor[] parms = md.getParameterDescriptors(); - if (parms == null) - mr.parameters = null; - else { - mr.parameters = new ParameterRecord[parms.length]; - for (int j = 0; j < parms.length; j++) { - ParameterRecord pr = new ParameterRecord(); - fill(parms[j], pr, PARAMETER_RECORD_TYPE); - mr.parameters[j] = pr; - } - } - fill(md, mr, METHOD_RECORD_TYPE); - } - - /** - * Called by IDE to send the event set decorators information back through the callback. - * - * @throws CommandException - * @throws IOException - * @since 1.1.0 - */ - public void sendEventDecorators(ObjectOutputStream stream ) throws IOException, CommandException { - EventSetDescriptor[] events = getEventSetDescriptors(); - if (events != null && events.length > 0) { - // Now start writing the records. - stream.writeInt(IBeanInfoIntrospectionConstants.EVENT_DECORATORS_SENT); - stream.writeInt(events.length); - for (int i = 0; i < events.length; i++) { - EventSetDescriptor ed = events[i]; - EventSetRecord er = new EventSetRecord(); - er.addListenerMethod = getReflectedMethodRecord(ed.getAddListenerMethod()); - MethodDescriptor[] mds = ed.getListenerMethodDescriptors(); - if (mds == null) - er.listenerMethodDescriptors = null; - else { - er.listenerMethodDescriptors = new MethodRecord[mds.length]; - for (int j = 0; j < mds.length; j++) { - fill(er.listenerMethodDescriptors[j] = new MethodRecord(), mds[j]); - } - } - er.listenerTypeName = getClassName(ed.getListenerType()); - er.removeListenerMethod = getReflectedMethodRecord(ed.getRemoveListenerMethod()); - er.inDefaultEventSet = ed.isInDefaultEventSet(); - er.unicast = ed.isUnicast(); - er.eventAdapterClassName = null; - fill(ed, er, EVENTSET_RECORD_TYPE); - stream.writeObject(er); - } - } - } - - protected static final int BEAN_RECORD_TYPE = 0; - - protected static final int PROPERTY_RECORD_TYPE = 1; - - protected static final int INDEXEDPROPERTY_RECORD_TYPE = 2; - - protected static final int METHOD_RECORD_TYPE = 3; - - protected static final int PARAMETER_RECORD_TYPE = 4; - - protected static final int EVENTSET_RECORD_TYPE = 5; - - /** - * Fill in the special attr/values for the given record type. The default handles the standard ones. - * - * @param record - * @param descr - * @param attributeName - * @param recordType - * type of record ultimately being processed. - * @return <code>true</code> if this attribute is a special one and processed, <code>false</code> if not special and should be added to - * attributes list transferred to IDE. - * - * @see ModelingBeanInfo#PROPERTY_RECORD_TYPE - * @since 1.1.0 - */ - protected boolean fillFromAttributes(FeatureRecord record, FeatureDescriptor descr, String attributeName, int recordType) { - switch (recordType) { - case INDEXEDPROPERTY_RECORD_TYPE: - case PROPERTY_RECORD_TYPE: - if (BaseBeanInfo.DESIGNTIMEPROPERTY.equals(attributeName)) { - ((PropertyRecord) record).designTime = (Boolean) descr.getValue(attributeName); - return true; - } else if (BaseBeanInfo.FIELDPROPERTY.equals(attributeName)) { - Field f = (Field) descr.getValue(attributeName); - // We have a field, set the property type to this since we couldn't correctly create this otherwise. - PropertyRecord pr = (PropertyRecord) record; - pr.propertyTypeName = getClassName(f.getType()); - pr.field = getReflectedFieldRecord(f); - pr.readMethod = null; // Need to wipe out our dummy. - pr.writeMethod = null; // Or if it set, not valid for a field. - return true; - } - break; - case EVENTSET_RECORD_TYPE: - if (BaseBeanInfo.EVENTADAPTERCLASS.equals(attributeName)) { - ((EventSetRecord) record).eventAdapterClassName = (String) descr.getValue(attributeName); - return true; - } - break; - default: - break; // Didn't handle it. - } - return false; - } - - /** - * Fill in the feature portion of the Descriptor into the record. We can be reusing some records (so we don't keep allocating when not needed), so - * we will null out unset fields. - * - * @param descr - * @param record - * @param recordType - * type of record ultimately being processed. Used for fillFromAttributes. - * - * @see ModelingBeanInfo#PROPERTY_RECORD_TYPE - * @since 1.1.0 - */ - protected void fill(FeatureDescriptor descr, FeatureRecord record, int recordType) { - record.name = descr.getName(); - String dn = descr.getDisplayName(); - if (!record.name.equals(dn)) - record.displayName = dn; // display name returns name if display name not set. We don't want to send it if identical. (Note some Beaninfos are setting displayname the same text but not same string). - else - record.displayName = null; - String shd = descr.getShortDescription(); - if (!dn.equals(shd)) - record.shortDescription = shd; // short description returns displayname if short description not set. We don't want to send it if - // identical. - else - record.shortDescription = null; - record.expert = descr.isExpert(); - record.hidden = descr.isHidden(); - record.preferred = descr.isPreferred(); - record.category = null; // Clear out in case not set. - Enumeration attrs = descr.attributeNames(); - if (attrs.hasMoreElements()) { - // We don't have a way of knowing how many there are ahead of time, so we will build into lists and then turn into arrays at the end. - List names = new ArrayList(); - List values = new ArrayList(); - while (attrs.hasMoreElements()) { - String attrName = (String) attrs.nextElement(); - if (attrName.equals(IBaseBeanInfoConstants.CATEGORY)) - record.category = (String) descr.getValue(IBaseBeanInfoConstants.CATEGORY); - else if (attrName.equals(BaseBeanInfo.PREFERRED)) { - // A bug in Java 1.3, doing setPreferred was lost. So for those also stored it in attributes. So if set here, then use it. - record.preferred = ((Boolean) descr.getValue(BaseBeanInfo.PREFERRED)).booleanValue(); - } else if (!fillFromAttributes(record, descr, attrName, recordType)) { - // Just copy accross. FillfromAttributes didn't handle it. - FeatureAttributeValue fv = new FeatureAttributeValue(); - fv.setValue(descr.getValue(attrName)); - names.add(attrName); - values.add(fv); - } - } - if (!names.isEmpty()) { - record.attributeNames = (String[]) names.toArray(new String[names.size()]); - record.attributeValues = (FeatureAttributeValue[]) values.toArray(new FeatureAttributeValue[values.size()]); - } else { - record.attributeNames = null; - record.attributeValues = null; - } - } else { - record.attributeNames = null; - record.attributeValues = null; - } - - } - - /* - * Get the classname from the class. If classs is null, then this return null. - */ - private String getClassName(Class classs) { - return classs != null ? classs.getName() : null; - } - - private ReflectMethodRecord getReflectedMethodRecord(Method method) { - if (method != null) { - ReflectMethodRecord rmr = new ReflectMethodRecord(); - rmr.className = getClassName(method.getDeclaringClass()); - rmr.methodName = method.getName(); - Class[] parmTypes = method.getParameterTypes(); - if (parmTypes.length > 0) { - rmr.parameterTypeNames = new String[parmTypes.length]; - for (int i = 0; i < parmTypes.length; i++) { - rmr.parameterTypeNames[i] = getClassName(parmTypes[i]); - } - } - return rmr; - } else - return null; - } - - private ReflectFieldRecord getReflectedFieldRecord(Field field) { - if (field != null) { - ReflectFieldRecord rf = new ReflectFieldRecord(); - rf.className = getClassName(field.getDeclaringClass()); - rf.fieldName = field.getName(); - rf.readOnly = Modifier.isFinal(field.getModifiers()); - return rf; - } else - return null; - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfo15.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfo15.java deleted file mode 100644 index db5958910..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfo15.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: ModelingBeanInfo15.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.BeanInfo; - -/** - * This was supposed to for 1.4 or above where it can use identity - * to test for inherited features, but it still is not correct - * in 1.4. See the header comments in ModelingBeanInfo. - * @see org.eclipse.jem.internal.beaninfo.vm.ModelingBeanInfo - */ -public class ModelingBeanInfo15 extends ModelingBeanInfo { - - /** - * Constructor for ModelingBeanInfo15. - * @param beanInfo - */ - public ModelingBeanInfo15(BeanInfo beanInfo, int doFlags) { - super(beanInfo, doFlags); - } - - /** - * Constructor for ModelingBeanInfo15. - * @param beanInfo - * @param superBeanInfo - */ - public ModelingBeanInfo15(BeanInfo beanInfo, BeanInfo superBeanInfo, int doFlags) { - super(beanInfo, superBeanInfo, doFlags); - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfoPre15.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfoPre15.java deleted file mode 100644 index 50f553897..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ModelingBeanInfoPre15.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: ModelingBeanInfoPre15.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.BeanInfo; - -/** - * This is the modeling BeanInfo for Pre-JDK 1.4. - */ -public class ModelingBeanInfoPre15 extends ModelingBeanInfo { - - public ModelingBeanInfoPre15(BeanInfo beanInfo, int doFlags) { - super(beanInfo, doFlags); - } - - public ModelingBeanInfoPre15(BeanInfo beanInfo, BeanInfo superBeanInfo, int doFlags) { - super(beanInfo, superBeanInfo, doFlags); - } -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ParameterDescriptorEquality.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ParameterDescriptorEquality.java deleted file mode 100644 index 0b06da1fd..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/ParameterDescriptorEquality.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: ParameterDescriptorEquality.java,v $ - * $Revision: 1.4 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.*; -/** - * ParameterDescriptor equality tester - */ -public class ParameterDescriptorEquality extends FeatureDescriptorEquality { - - static void INIT() { - try { - MAP_EQUALITY.put(ParameterDescriptor.class, (ParameterDescriptorEquality.class).getConstructor(new Class[] {ParameterDescriptor.class})); - } catch (NoSuchMethodException e) { - } - } - - public ParameterDescriptorEquality() { - } - - public ParameterDescriptorEquality(ParameterDescriptor descr) { - super(descr); - } - -} diff --git a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/PropertyDescriptorEquality.java b/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/PropertyDescriptorEquality.java deleted file mode 100644 index db1c1dd88..000000000 --- a/plugins/org.eclipse.jem.beaninfo/vm_beaninfovm/org/eclipse/jem/internal/beaninfo/vm/PropertyDescriptorEquality.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.jem.internal.beaninfo.vm; -/* - * $RCSfile: PropertyDescriptorEquality.java,v $ - * $Revision: 1.5 $ $Date: 2005/08/24 20:31:29 $ - */ - -import java.beans.*; -/** - * PropertyDescriptor equality tester - */ -public abstract class PropertyDescriptorEquality extends FeatureDescriptorEquality { - - public PropertyDescriptorEquality() { - } - - public PropertyDescriptorEquality(PropertyDescriptor descr) { - super(descr); - } - /** - * Calculate the hashcode for the current feature, add this - * to the hashcode received from super.calculateHashCode - * and return the new value. - * - * NOTE: for subclasses, it is MANDITORY that the first line be: - * int hashcode = super.calculateHashCode(); - * and the last line be: - * return hashcode*31 + (your calculated hashcode for just this subclass); - */ - protected int calculateHashCode() { - int hashcode = super.calculateHashCode(); - PropertyDescriptor pd = (PropertyDescriptor) fFeature; - int hc = 0; - if (pd.getPropertyEditorClass() != null) - hc += pd.getPropertyEditorClass().hashCode(); - if (pd.getPropertyType() != null) - hc += pd.getPropertyType().hashCode(); - if (pd.getReadMethod() != null) - hc += pd.getReadMethod().hashCode(); - if (pd.getWriteMethod() != null) - hc += pd.getWriteMethod().hashCode(); - - hc += (pd.isBound() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - hc += (pd.isConstrained() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - - return hashcode*31 + hc; - } - - public boolean equals(Object obj) { - if (identityTest(obj)) - return true; - - if (!super.equals(obj)) - return false; - - PropertyDescriptor op = (PropertyDescriptor) ((FeatureDescriptorEquality) obj).fFeature; - PropertyDescriptor fp = (PropertyDescriptor) fFeature; - - if (op.getPropertyEditorClass() != fp.getPropertyEditorClass()) - return false; - if (op.getReadMethod() != fp.getReadMethod()) - return false; - if (op.getWriteMethod() != fp.getWriteMethod()) - return false; - if (op.isBound() != fp.isBound()) - return false; - if (op.isConstrained() != fp.isConstrained()) - return false; - - return true; - } - - -} |