[382545] Use org.eclipse.emf.common.ui.examples extension point
diff --git a/examples/org.eclipse.ocl.examples/.classpath b/examples/org.eclipse.ocl.examples/.classpath
deleted file mode 100644
index 64c5e31..0000000
--- a/examples/org.eclipse.ocl.examples/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.ocl.examples/.project b/examples/org.eclipse.ocl.examples/.project
index cd499c4..29ddbf4 100644
--- a/examples/org.eclipse.ocl.examples/.project
+++ b/examples/org.eclipse.ocl.examples/.project
@@ -6,11 +6,6 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
@@ -20,15 +15,8 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
diff --git a/examples/org.eclipse.ocl.examples/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.ocl.examples/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 28a66b3..0000000
--- a/examples/org.eclipse.ocl.examples/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,326 +0,0 @@
-#Mon Jul 13 10:27:21 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=20
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=20
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=20
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=20
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=53
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=53
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=20
-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=20
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=33
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=17
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=33
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=17
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=33
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=0
-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_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=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_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not 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=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=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=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=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-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
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/examples/org.eclipse.ocl.examples/.settings/org.eclipse.jdt.ui.prefs b/examples/org.eclipse.ocl.examples/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 1d07430..0000000
--- a/examples/org.eclipse.ocl.examples/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-#Wed Nov 12 21:21:13 EST 2008
-eclipse.preferences.version=1
-formatter_profile=_OCLCodeFormatting
-formatter_settings_version=11
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=999
-org.eclipse.jdt.ui.staticondemandthreshold=999
diff --git a/examples/org.eclipse.ocl.examples/META-INF/MANIFEST.MF b/examples/org.eclipse.ocl.examples/META-INF/MANIFEST.MF
index e75b3f9..ce9c258 100644
--- a/examples/org.eclipse.ocl.examples/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.ocl.examples/META-INF/MANIFEST.MF
@@ -2,15 +2,10 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ocl.examples;singleton:=true
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)"
-Export-Package: org.eclipse.ocl.examples.internal.wizard;x-internal:=true
+Require-Bundle: org.eclipse.emf.common.ui,
+ org.eclipse.emf.ecore
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.ocl.examples.internal.OCLExamplesPlugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.ocl.examples/plugin.properties b/examples/org.eclipse.ocl.examples/plugin.properties
index 1857ff8..be27c4c 100644
--- a/examples/org.eclipse.ocl.examples/plugin.properties
+++ b/examples/org.eclipse.ocl.examples/plugin.properties
@@ -33,16 +33,19 @@
OCL_category=OCL (Object Constraint Language) Plug-ins
OCL_Interpreter_name=OCL Interpreter
-OCL_Interpreter_description=Create a plug-in project defining an interactive OCL interpreter console
+OCL_Interpreter_description=Example project defining an interactive OCL interpreter console
+_UI_LibraryModelProject_desc = This project contains the extended library model and the implementation generated from it.
+_UI_LibraryEditProject_desc = This project contains the item providers generated to support viewing and editing instances of the extended library model.
+_UI_LibraryEditorProjector_desc = This project contains the sample editor generated from the extended library model.
CompleteOCL_Tutorial_name=Complete OCL Tutorial
-CompleteOCL_Tutorial_description=Create a plug-in project for the Complete OCL Tutorial
+CompleteOCL_Tutorial_description=Tutorial example demonstrating use of independent OCL to complement Ecore or UML models or Xtext grammars
OCLinEcore_Tutorial_name=OCLinEcore Tutorial
-OCLinEcore_Tutorial_description=Create a plug-in project for the OCLinEcore Tutorial
+OCLinEcore_Tutorial_description=Tutorial example demonstrating use of embedded OCL to enrich an Ecore model
EmptyOCL_name=Empty OCL Project
-EmptyOCL_description=Create an Empty OCL project
+EmptyOCL_description=Empty OCL project
Royal_and_Loyal_name=Royal and Loyal Example
-Royal_and_Loyal_description=Create a project containing the Royal and Loyal Example
+Royal_and_Loyal_description=Example project containing the Royal and Loyal Example
diff --git a/examples/org.eclipse.ocl.examples/plugin.xml b/examples/org.eclipse.ocl.examples/plugin.xml
index 7366d5e..da4db93 100644
--- a/examples/org.eclipse.ocl.examples/plugin.xml
+++ b/examples/org.eclipse.ocl.examples/plugin.xml
@@ -26,54 +26,96 @@
name="%OCL_category"
parentCategory="org.eclipse.ui.Examples"/>
<wizard id="org.eclipse.ocl.examples.interpreter"
- canFinishEarly="true"
category="org.eclipse.ui.Examples/org.eclipse.ocl.examples.category"
- class="org.eclipse.ocl.examples.internal.wizard.InterpreterExampleWizard"
- hasPages="false"
+ class="org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard"
project="true"
name="%OCL_Interpreter_name"
icon="$nl$/icons/elcl16/oclconsole_co.gif">
<description>%OCL_Interpreter_description</description>
</wizard>
- <wizard id="org.eclipse.ocl.examples.ocl.completeocltutorial"
- canFinishEarly="true"
+ <wizard id="org.eclipse.ocl.examples.completeocltutorial"
category="org.eclipse.ui.Examples/org.eclipse.ocl.examples.category"
- class="org.eclipse.ocl.examples.internal.wizard.CompleteOCLTutorialWizard"
- hasPages="false"
+ class="org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard"
project="true"
name="%CompleteOCL_Tutorial_name"
icon="$nl$/icons/OCLModelFile.gif">
<description>%CompleteOCL_Tutorial_description</description>
</wizard>
- <wizard id="org.eclipse.ocl.examples.ocl.oclinecoretutorial"
- canFinishEarly="true"
+ <wizard id="org.eclipse.ocl.examples.oclinecoretutorial"
category="org.eclipse.ui.Examples/org.eclipse.ocl.examples.category"
- class="org.eclipse.ocl.examples.internal.wizard.OCLinEcoreTutorialWizard"
- hasPages="false"
+ class="org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard"
project="true"
name="%OCLinEcore_Tutorial_name"
icon="$nl$/icons/OCLModelFile.gif">
<description>%OCLinEcore_Tutorial_description</description>
</wizard>
- <wizard id="org.eclipse.ocl.examples.ocl.royalandloyal"
- canFinishEarly="true"
+ <wizard id="org.eclipse.ocl.examples.royalandloyal"
category="org.eclipse.ui.Examples/org.eclipse.ocl.examples.category"
- class="org.eclipse.ocl.examples.internal.wizard.RoyalAndLoyalExampleWizard"
- hasPages="false"
+ class="org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard"
project="true"
name="%Royal_and_Loyal_name"
icon="$nl$/icons/OCLModelFile.gif">
<description>%Royal_and_Loyal_description</description>
</wizard>
- <wizard id="org.eclipse.ocl.examples.ocl.empty"
- canFinishEarly="true"
+ <wizard id="org.eclipse.ocl.examples.empty"
category="org.eclipse.ui.Examples/org.eclipse.ocl.examples.category"
- class="org.eclipse.ocl.examples.internal.wizard.EmptyExampleWizard"
- hasPages="false"
+ class="org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard"
project="true"
name="%EmptyOCL_name"
icon="$nl$/icons/OCLModelFile.gif">
<description>%EmptyOCL_description</description>
</wizard>
</extension>
+ <extension point="org.eclipse.emf.common.ui.examples">
+ <example id="org.eclipse.ocl.examples.project.CompleteOCL"
+ wizardID="org.eclipse.ocl.examples.completeocltutorial"
+ pageImage="$nl$/icons/OCLModelFile.gif">
+ <projectDescriptor name="org.eclipse.ocl.examples.project.completeocltutorial"
+ contentURI="zips/completeocltutorial.zip"
+ description="%CompleteOCL_Tutorial_description"/>
+ <fileToOpen location="org.eclipse.ocl.examples.project.completeocltutorial/model/ExtraEcoreValidation.ocl"
+ editorID="org.eclipse.ocl.examples.xtext.completeocl.CompleteOCL"/>
+ </example>
+ <example id="org.eclipse.ocl.examples.project.Empty"
+ wizardID="org.eclipse.ocl.examples.empty"
+ pageImage="$nl$/icons/OCLModelFile.gif">
+ <projectDescriptor name="org.eclipse.ocl.examples.project.empty"
+ contentURI="zips/empty.zip"
+ description="%EmptyOCL_description"/>
+ </example>
+ <example id="org.eclipse.ocl.examples.project.Interpreter"
+ wizardID="org.eclipse.ocl.examples.interpreter"
+ pageImage="$nl$/icons/elcl16/oclconsole_co.gif">
+ <projectDescriptor name="org.eclipse.ocl.examples.project.interpreter"
+ contentURI="zips/interpreter.zip"
+ description="%OCL_Interpreter_description"/>
+ <projectDescriptor name="org.eclipse.emf.examples.library"
+ contentURI="zips/library.zip"
+ description="%_UI_LibraryModelProject_desc"/>
+ <projectDescriptor name="org.eclipse.emf.examples.library.edit"
+ contentURI="zips/libraryEdit.zip"
+ description="%_UI_LibraryEditProject_desc"/>
+ <projectDescriptor name="org.eclipse.emf.examples.library.editor"
+ contentURI="zips/libraryEditor.zip"
+ description="%_UI_LibraryEditorProjector_desc"/>
+ </example>
+ <example id="org.eclipse.ocl.examples.project.OCLinEcore"
+ wizardID="org.eclipse.ocl.examples.oclinecoretutorial"
+ pageImage="$nl$/icons/OCLModelFile.gif">
+ <projectDescriptor name="org.eclipse.ocl.examples.project.oclinecoretutorial"
+ contentURI="zips/oclinecoretutorial.zip"
+ description="%OCLinEcore_Tutorial_description"/>
+ <fileToOpen location="org.eclipse.ocl.examples.project.oclinecoretutorial/model/Tutorial.ecore"
+ editorID="org.eclipse.ocl.examples.xtext.oclinecore.OCLinEcore"/>
+ </example>
+ <example id="org.eclipse.ocl.examples.project.RoyalAndLoyal"
+ wizardID="org.eclipse.ocl.examples.royalandloyal"
+ pageImage="$nl$/icons/OCLModelFile.gif">
+ <projectDescriptor name="org.eclipse.ocl.examples.project.royalandloyal"
+ contentURI="zips/royalandloyal.zip"
+ description="%Royal_and_Loyal_description"/>
+ <fileToOpen location="org.eclipse.ocl.examples.project.royalandloyal/oclsrc/RoyalAndLoyal/RoyalAndLoyal.ocl"
+ editorID="org.eclipse.ocl.examples.xtext.completeocl.CompleteOCL"/>
+ </example>
+ </extension>
</plugin>
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/OCLExamplesPlugin.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/OCLExamplesPlugin.java
deleted file mode 100644
index 596dda3..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/OCLExamplesPlugin.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: OCLExamplesPlugin.java,v 1.1 2010/03/11 10:16:55 ewillink Exp $
- */
-
-package org.eclipse.ocl.examples.internal;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-public class OCLExamplesPlugin
- extends AbstractUIPlugin {
-
- // The shared instance.
- private static OCLExamplesPlugin plugin;
-
- public OCLExamplesPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static OCLExamplesPlugin getDefault() {
- return plugin;
- }
-}
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/l10n/Messages.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/l10n/Messages.java
deleted file mode 100644
index bf63795..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/l10n/Messages.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2008 Zeligsoft Inc. 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:
- * Zeligsoft - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: Messages.java,v 1.1 2010/03/11 10:16:54 ewillink Exp $
- */
-
-package org.eclipse.ocl.examples.internal.l10n;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Localized messages for the examples plug-in.
- *
- * @author Christian W. Damus (cdamus)
- */
-public class Messages
- extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.ocl.examples.internal.l10n.messages"; //$NON-NLS-1$
-
- public static String AbstractExampleWizard_unzipping;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- super();
- }
-}
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/l10n/messages.properties b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/l10n/messages.properties
deleted file mode 100644
index eb086fe..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/l10n/messages.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 Zeligsoft Inc. 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:
-# Zeligsoft - Initial API and implementation
-#
-# $Id: messages.properties,v 1.1 2010/03/11 10:16:54 ewillink Exp $
-#
-###############################################################################
-
-AbstractExampleWizard_unzipping=Unzipping Projects
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/AbstractExampleWizard.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/AbstractExampleWizard.java
deleted file mode 100644
index f0d9404..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/AbstractExampleWizard.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006,2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- * Zeligsoft - Bug 233486
- * E.D.Willink - Bug 289761
- *
- * </copyright>
- *
- * $Id: AbstractExampleWizard.java,v 1.1 2010/03/11 10:16:54 ewillink Exp $
- */
-
-package org.eclipse.ocl.examples.internal.wizard;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ocl.examples.internal.OCLExamplesPlugin;
-import org.eclipse.ocl.examples.internal.l10n.Messages;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-
-/**
- * <p>
- * This abstract example wizard simply unzips a number of zips
- * into the workspace as projects. It does not offer any
- * pages but can be added as a new wizard to the new wizards
- * dialog through the org.eclipse.ui.newWizards extension point.
- * </p>
- * <p>
- * Clients should subclass this class and override the <code>getProjectDescriptor()</code>
- * method to provide the location of the project zips that
- * should be unzipped into the workspace. Note that any projects
- * that are already in the workspace will <i>not</i> be overwritten
- * because the user could have made changes to them that would
- * be lost.
- * </p>
- * <p>
- * It is highly recommended when registering subclasses to the
- * new wizards extension point that the wizard declaration should
- * have canFinishEarly = true and hasPages = false. Any label
- * and icon can be freely given to the wizard to suit the needs
- * of the client.
- * </p>
- */
-public abstract class AbstractExampleWizard extends Wizard
- implements INewWizard {
-
- /**
- * A descriptor class that describes where to find the zipped
- * contents of a project and what that project should be named
- * when unzipped into the workspace.
- */
- public static class ProjectDescriptor {
- private String bundleName;
- private String zipLocation;
- private String projectName;
-
- /**
- * Construct a descriptor that points to a zip file located
- * in a particular bundle at the given location within that
- * bundle. Also provided is the project name for which the
- * zip is the contents. Note that this project name should
- * be the same as is in the contents not some alternative name.
- *
- * @param bundleName The bundle in the runtime that contains the
- * zipped up project contents.
- * @param zipLocation The location within the bundle where the
- * zip file is located.
- * @param projectName The project name in the workspace that
- * will be created to house the project contents.
- */
- public ProjectDescriptor(String bundleName, String zipLocation, String projectName) {
- super();
- this.bundleName = bundleName;
- this.zipLocation = zipLocation;
- this.projectName = projectName;
- }
-
- public String getBundleName() {
- return bundleName;
- }
-
- public String getProjectName() {
- return projectName;
- }
-
- public String getZipLocation() {
- return zipLocation;
- }
- }
-
- public boolean performFinish() {
- final Collection projectDescriptors = getProjectDescriptors();
-
- try {
- getContainer().run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
-
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor m)
-
- throws CoreException, InvocationTargetException, InterruptedException {
- m.beginTask(Messages.AbstractExampleWizard_unzipping, projectDescriptors.size());
-
- for (Iterator i = projectDescriptors.iterator(); i.hasNext();) {
- unzipProject((ProjectDescriptor)i.next(), m);
- m.worked(1);
- }
- }
- };
- op.run(monitor);
- }
- });
- } catch (InvocationTargetException e) {
- log(e);
- } catch (InterruptedException e) {
- // We cannot be interrupted, just proceed as normal.
- }
-
- return true;
- }
-
- protected void log(Exception e) {
- if (e instanceof CoreException) {
- OCLExamplesPlugin.getDefault().getLog().log(((CoreException)e).getStatus());
- } else {
- OCLExamplesPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, OCLExamplesPlugin.getDefault().getBundle().getSymbolicName(),IStatus.ERROR, e.getMessage(),e));
- }
- }
-
- /**
- * The subclass provides the specific project descriptors for the
- * projects that should be unzipped into the workspace. Note that
- * any projects that already exist in the workspace will not be
- * overwritten as they may contain changes made by the user.
- *
- * @return The collection of project descriptors that should be
- * unzipped into the workspace.
- */
- protected abstract Collection getProjectDescriptors();
-
- private void unzipProject(ProjectDescriptor descriptor, IProgressMonitor monitor) {
- String bundleName = descriptor.getBundleName();
- String zipLocation = descriptor.getZipLocation();
- String projectName = descriptor.getProjectName();
-
- URL interpreterZipUrl = FileLocator.find(Platform.getBundle(bundleName), new Path(zipLocation), null);
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
-
- if (project.exists()) {
- return;
- }
-
- try {
- // We make sure that the project is created from this point forward.
- project.create(monitor);
-
- ZipInputStream zipFileStream = new ZipInputStream(interpreterZipUrl.openStream());
- ZipEntry zipEntry = zipFileStream.getNextEntry();
-
- // We derive a regexedProjectName so that the dots don't end up being
- // interpreted as the dot operator in the regular expression language.
- String regexedProjectName = projectName.replaceAll("\\.", "\\."); //$NON-NLS-1$ //$NON-NLS-2$
-
- while (zipEntry != null) {
- // We will construct the new file but we will strip off the project
- // directory from the beginning of the path because we have already
- // created the destination project for this zip.
- File file = new File(project.getLocation().toString(), zipEntry.getName().replaceFirst("^"+regexedProjectName+"/", "")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
- if (false == zipEntry.isDirectory()) {
-
- /*
- * Copy files (and make sure parent directory exist)
- */
- File parentFile = file.getParentFile();
- if (null != parentFile && false == parentFile.exists()) {
- parentFile.mkdirs();
- }
-
- // TODO Figure out why it was necessary to try to convert the encoding in the zip file
- /*Path path = new Path(file.getPath());
- if (path.getFileExtension().equals("java")) { //$NON-NLS-1$
- InputStreamReader is = null;
- OutputStreamWriter os = null;
-
- try {
- is = new InputStreamReader(zipFileStream, "ISO-8859-1"); //$NON-NLS-1$
- os = new OutputStreamWriter(new FileOutputStream(file),
- ResourcesPlugin.getEncoding());
- char[] buffer = new char[102400];
- while (true) {
- int len = is.read(buffer);
- if (zipFileStream.available() == 0)
- break;
- os.write(buffer, 0, len);
- }
- } finally {
- if (null != os) {
- os.close();
- }
- }
- } else {*/
- OutputStream os = null;
-
- try {
- os = new FileOutputStream(file);
-
- byte[] buffer = new byte[102400];
- while (true) {
- int len = zipFileStream.read(buffer);
- if (zipFileStream.available() == 0) {
- break;
- }
- os.write(buffer, 0, len);
- }
- } finally {
- if (null != os) {
- os.close();
- }
- }
- //}
- }
-
- zipFileStream.closeEntry();
- zipEntry = zipFileStream.getNextEntry();
- }
-
- project.open(monitor);
- project.refreshLocal(IFile.DEPTH_INFINITE, monitor);
-
- // Close and re-open the project to force eclipse to re-evaluate
- // any natures that this project has.
- project.close(monitor);
- project.open(monitor);
- } catch (IOException e) {
- log(e);
- } catch (CoreException e) {
- log(e);
- }
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // No code is necessary.
- }
-}
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/CompleteOCLTutorialWizard.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/CompleteOCLTutorialWizard.java
deleted file mode 100644
index d548e4d..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/CompleteOCLTutorialWizard.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2011 E.D.Willink 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:
- * E.D.Willink - initial API and implementation
- *
- * </copyright>
- *
- * $Id: OCLinEcoreTutorialWizard.java,v 1.1 2011/05/31 15:02:08 asanchez Exp $
- */
-package org.eclipse.ocl.examples.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class CompleteOCLTutorialWizard extends AbstractExampleWizard
-{
- @Override
- protected Collection<ProjectDescriptor> getProjectDescriptors() {
- List<ProjectDescriptor> projects = new ArrayList<ProjectDescriptor>(4);
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/completeocltutorial.zip", "CompleteOCLTutorial")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- return projects;
- }
-}
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/EmptyExampleWizard.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/EmptyExampleWizard.java
deleted file mode 100644
index 2370819..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/EmptyExampleWizard.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009,2010 E.D.Willink 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:
- * E.D.Willink - initial API and implementation
- *
- * </copyright>
- *
- * $Id: EmptyExampleWizard.java,v 1.2 2010/04/08 06:24:43 ewillink Exp $
- */
-package org.eclipse.ocl.examples.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class EmptyExampleWizard extends AbstractExampleWizard
-{
- @Override
- protected Collection<ProjectDescriptor> getProjectDescriptors() {
- List<ProjectDescriptor> projects = new ArrayList<ProjectDescriptor>(4);
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/empty.zip", "EmptyOCLProject")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- return projects;
- }
-}
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/InterpreterExampleWizard.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/InterpreterExampleWizard.java
deleted file mode 100644
index e890c56..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/InterpreterExampleWizard.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: InterpreterExampleWizard.java,v 1.1 2010/03/11 10:16:54 ewillink Exp $
- */
-
-package org.eclipse.ocl.examples.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class InterpreterExampleWizard
- extends AbstractExampleWizard {
-
- protected Collection getProjectDescriptors() {
- // We need the interpreter example to be unzipped along with the
- // EMF library example model, edit and editor examples
- List projects = new ArrayList(4);
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/library.zip", "org.eclipse.emf.examples.library")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/libraryEdit.zip", "org.eclipse.emf.examples.library.edit")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/libraryEditor.zip", "org.eclipse.emf.examples.library.editor")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/interpreter.zip", "org.eclipse.ocl.examples.interpreter")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- return projects;
- }
-}
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/OCLinEcoreTutorialWizard.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/OCLinEcoreTutorialWizard.java
deleted file mode 100644
index a90e6d3..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/OCLinEcoreTutorialWizard.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2011 E.D.Willink 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:
- * E.D.Willink - initial API and implementation
- *
- * </copyright>
- *
- * $Id: OCLinEcoreTutorialWizard.java,v 1.1 2011/05/31 15:02:08 asanchez Exp $
- */
-package org.eclipse.ocl.examples.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class OCLinEcoreTutorialWizard extends AbstractExampleWizard
-{
- @Override
- protected Collection<ProjectDescriptor> getProjectDescriptors() {
- List<ProjectDescriptor> projects = new ArrayList<ProjectDescriptor>(4);
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/oclinecoretutorial.zip", "OCLinEcoreTutorial")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- return projects;
- }
-}
diff --git a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/RoyalAndLoyalExampleWizard.java b/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/RoyalAndLoyalExampleWizard.java
deleted file mode 100644
index 6e593c1..0000000
--- a/examples/org.eclipse.ocl.examples/src/org/eclipse/ocl/examples/internal/wizard/RoyalAndLoyalExampleWizard.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2008,2010 E.D.Willink 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:
- * E.D.Willink - initial API and implementation
- *
- * </copyright>
- *
- * $Id: RoyalAndLoyalExampleWizard.java,v 1.2 2010/04/08 06:24:43 ewillink Exp $
- */
-package org.eclipse.ocl.examples.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class RoyalAndLoyalExampleWizard extends AbstractExampleWizard
-{
- @Override
- protected Collection<ProjectDescriptor> getProjectDescriptors() {
- List<ProjectDescriptor> projects = new ArrayList<ProjectDescriptor>(4);
- projects.add(new ProjectDescriptor("org.eclipse.ocl.examples", "zips/royalandloyal.zip", "RoyalAndLoyal")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- return projects;
- }
-}