Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2011-10-03 11:07:17 +0000
committerMartin Fluegge2011-10-03 11:07:17 +0000
commitdd7080c630d17aaf726741699b47102d7a6ddc7c (patch)
tree175699a996d7b5fc6d73ef32d9643c5f9174cd55 /plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti
parenta94e5b4370e43de153b70b8e9e17282751d8381b (diff)
downloadcdo-dd7080c630d17aaf726741699b47102d7a6ddc7c.tar.gz
cdo-dd7080c630d17aaf726741699b47102d7a6ddc7c.tar.xz
cdo-dd7080c630d17aaf726741699b47102d7a6ddc7c.zip
[359656] [Dawn] Provide collaborative extension for Graphiti editors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359656
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.project44
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.core.prefs364
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/META-INF/MANIFEST.MF23
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/about.html28
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/build.properties10
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/copyright.txt8
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/icons/ereference.gifbin0 -> 1611 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.properties11
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.xml50
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/Activator.java49
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreDiagramTypeProvider.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreFeatureProvider.java191
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreToolBehaviorProvider.java263
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAClassFeature.java65
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAInterfaceFeature.java65
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAggregationFeature.java59
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAssociationFeature.java49
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddCompositionFeature.java59
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddImplementationFeature.java56
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddSubClassesFeature.java59
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddConnectionFeature.java81
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddElementFeature.java166
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateConnectionFeature.java86
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateElementFeature.java62
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCollapseDummyFeature.java83
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCopyAClassFeature.java65
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAClassFeature.java53
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAInterfaceFeature.java53
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAggregationFeature.java100
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAssociationFeature.java97
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateCompositionsFeature.java100
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateImplementationFeature.java86
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateSubclassFeature.java100
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreDirectEditAClassFeature.java102
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcorePasteAClassFeature.java76
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreReconnectionFeature.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreRenameAClassFeature.java92
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreUpdateAClassFeature.java113
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreGraphitiContextUtil.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreImageProvider.java30
48 files changed, 3366 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.classpath b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.classpath
new file mode 100644
index 0000000000..2d1a4302f0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.classpath
@@ -0,0 +1,7 @@
+<?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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.project b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.project
new file mode 100644
index 0000000000..f271ee1051
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.project
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.dawn.examples.acore.graphiti</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.emf.cdo.releng/release.xml</value>
+ </dictionary>
+ </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>
+ <nature>org.eclipse.emf.cdo.releng.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..f8829d1f7c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 04 13:04:09 CEST 2011
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..94d4dd9ab9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,364 @@
+#Mon Oct 03 12:29:20 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=ignore
+org.eclipse.jdt.core.compiler.problem.deadCode=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=ignore
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+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=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=ignore
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=ignore
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=ignore
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=ignore
+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=ignore
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
+org.eclipse.jdt.core.compiler.problem.unusedLabel=ignore
+org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+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=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_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=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+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=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+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_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=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_annotation_on_type=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=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=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=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=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=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..1c6d0e8a2d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,120 @@
+#Thu Feb 04 09:44:24 CET 2010
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Martin Fluegge - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Martin Fluegge\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..f8d0a0660e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Thu Feb 04 09:44:24 CET 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Ignore
+automatically_removed_unused_problem_filters=Disabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c6b96bb45e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Thu Feb 04 09:44:24 CET 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..7f75ee07e8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.cdo.dawn.examples.acore.graphiti;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.emf.cdo.dawn.examples.acore.graphiti.Activator
+Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.graphiti;bundle-version="[0.9.0,1.0.0)",
+ org.eclipse.graphiti.ui;bundle-version="[0.9.0,1.0.0)",
+ org.eclipse.graphiti.examples.common;bundle-version="[0.9.0,1.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.emf.cdo.dawn.examples.acore;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.emf.cdo.dawn.examples.acore.edit;bundle-version="[1.0.100,2.0.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.emf.cdo.dawn.examples.acore.graphiti;version="1.0.0",
+ org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram;version="1.0.0",
+ org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;version="1.0.0",
+ org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util;version="1.0.0"
+Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/about.html b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). 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, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/build.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/build.properties
new file mode 100644
index 0000000000..e3e59ef4b0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ copyright.txt,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html,\
+ copyright.txt
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/copyright.txt b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/copyright.txt
new file mode 100644
index 0000000000..a5ec07f141
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ Martin Fluegge - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/icons/ereference.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/icons/ereference.gif
new file mode 100644
index 0000000000..5f42bf5ca3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/icons/ereference.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.properties
new file mode 100644
index 0000000000..1ae4b81546
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+# Martin Fluegge - initial API and implementation
+
+pluginName = CDO Dawn Examples Graphiti Acore Editor
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.xml b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.xml
new file mode 100644
index 0000000000..3039203cfd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/plugin.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ Martin Fluegge - initial API and implementation
+-->
+<plugin>
+<extension
+
+ point="org.eclipse.graphiti.ui.diagramTypes">
+ <diagramType
+ description="This is the diagram type for teh Dawn Acore Example Model"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram.AcoreDiagramType"
+ name="Acore Diagram Type"
+ type="acore">
+ </diagramType>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.graphiti.ui.diagramTypeProviders">
+ <diagramTypeProvider
+ class="org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram.AcoreDiagramTypeProvider"
+ description="This is my editor for the Graphiti tutorial"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram.AcoreDiagramTypeProvider"
+ name="My tutorial editor">
+ <diagramType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram.AcoreDiagramType">
+ </diagramType>
+ <imageProvider
+ id="org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.util.AcoreImageProvider">
+ </imageProvider>
+ </diagramTypeProvider>
+
+ </extension>
+<extension
+ point="org.eclipse.graphiti.ui.imageProviders">
+ <imageProvider
+ class="org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreImageProvider"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.util.AcoreImageProvider">
+ </imageProvider>
+</extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/Activator.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/Activator.java
new file mode 100644
index 0000000000..3739951d0d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/Activator.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Martin Fluegge
+ */
+public class Activator extends AbstractUIPlugin
+{
+ public static final String PLUGIN_ID = "org.eclipse.emf.cdo.dawn.examples.acore.graphiti"; //$NON-NLS-1$
+
+ private static Activator plugin;
+
+ public Activator()
+ {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception
+ {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception
+ {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static Activator getDefault()
+ {
+ return plugin;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreDiagramTypeProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreDiagramTypeProvider.java
new file mode 100644
index 0000000000..8c1427be1a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreDiagramTypeProvider.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram;
+
+import org.eclipse.graphiti.dt.AbstractDiagramTypeProvider;
+import org.eclipse.graphiti.tb.IToolBehaviorProvider;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreDiagramTypeProvider extends AbstractDiagramTypeProvider
+{
+ public AcoreDiagramTypeProvider()
+ {
+ super();
+ setFeatureProvider(new AcoreFeatureProvider(this));
+ }
+
+ @Override
+ public boolean isAutoUpdateAtStartup()
+ {
+ return super.isAutoUpdateAtStartup();
+ }
+
+ private IToolBehaviorProvider[] toolBehaviorProviders;
+
+ @Override
+ public IToolBehaviorProvider[] getAvailableToolBehaviorProviders()
+ {
+ if (toolBehaviorProviders == null)
+ {
+ toolBehaviorProviders = new IToolBehaviorProvider[] { new AcoreToolBehaviorProvider(this) };
+ }
+ return toolBehaviorProviders;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreFeatureProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreFeatureProvider.java
new file mode 100644
index 0000000000..753c2a7bdf
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreFeatureProvider.java
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreAddAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreAddAInterfaceFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreAddAggregationFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreAddAssociationFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreAddCompositionFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreAddImplementationFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreAddSubClassesFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCreateAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCreateAInterfaceFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCreateAggregationFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCreateAssociationFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCreateCompositionsFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCreateImplementationFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCreateSubclassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCopyAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreDirectEditAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcorePasteAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreReconnectionFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreRenameAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreUpdateAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil.ConnectionType;
+
+import org.eclipse.graphiti.dt.IDiagramTypeProvider;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICopyFeature;
+import org.eclipse.graphiti.features.ICreateConnectionFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IDirectEditingFeature;
+import org.eclipse.graphiti.features.IFeature;
+import org.eclipse.graphiti.features.IPasteFeature;
+import org.eclipse.graphiti.features.IReconnectionFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.ICopyContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.context.IDirectEditingContext;
+import org.eclipse.graphiti.features.context.IPasteContext;
+import org.eclipse.graphiti.features.context.IPictogramElementContext;
+import org.eclipse.graphiti.features.context.IReconnectionContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.ui.features.DefaultFeatureProvider;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreFeatureProvider extends DefaultFeatureProvider
+{
+ public AcoreFeatureProvider(IDiagramTypeProvider dtp)
+ {
+ super(dtp);
+ }
+
+ @Override
+ public ICreateFeature[] getCreateFeatures()
+ {
+ return new ICreateFeature[] { new AcoreCreateAClassFeature(this), new AcoreCreateAInterfaceFeature(this) };
+ }
+
+ @Override
+ public ICreateConnectionFeature[] getCreateConnectionFeatures()
+ {
+ return new ICreateConnectionFeature[] { new AcoreCreateSubclassFeature(this),
+ new AcoreCreateImplementationFeature(this), new AcoreCreateAssociationFeature(this),
+ new AcoreCreateAggregationFeature(this), new AcoreCreateCompositionsFeature(this) };
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IAddContext context)
+ {
+ if (context instanceof IAddConnectionContext)
+ {
+ ConnectionType connectionType = (ConnectionType)context.getProperty(AcoreGraphitiContextUtil.CONNECTTION_TYPE);
+ switch (connectionType)
+ {
+ case SUBCLASSES:
+ {
+ return new AcoreAddSubClassesFeature(this);
+ }
+ case IMPLEMENTATIONS:
+ {
+ return new AcoreAddImplementationFeature(this);
+ }
+ case AGGREGATIONS:
+ {
+ return new AcoreAddAggregationFeature(this);
+ }
+ case ASSOCIATIONS:
+ {
+ return new AcoreAddAssociationFeature(this);
+ }
+ case COMPOSITIONS:
+ {
+ return new AcoreAddCompositionFeature(this);
+ }
+ default:
+ break;
+ }
+ }
+ else
+ {
+ if (context.getNewObject() instanceof AClass)
+ {
+ return new AcoreAddAClassFeature(this);
+ }
+ else if (context.getNewObject() instanceof AInterface)
+ {
+ return new AcoreAddAInterfaceFeature(this);
+ }
+ }
+
+ return super.getAddFeature(context);
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IUpdateContext context)
+ {
+ PictogramElement pictogramElement = context.getPictogramElement();
+ if (pictogramElement instanceof ContainerShape)
+ {
+ Object bo = getBusinessObjectForPictogramElement(pictogramElement);
+ if (bo instanceof AClass)
+ {
+ return new AcoreUpdateAClassFeature(this);
+ }
+ }
+ return super.getUpdateFeature(context);
+ }
+
+ @Override
+ public IFeature[] getDragAndDropFeatures(IPictogramElementContext context)
+ {
+ // simply return all create connection features
+ return getCreateConnectionFeatures();
+ }
+
+ @Override
+ public IReconnectionFeature getReconnectionFeature(IReconnectionContext context)
+ {
+ return new AcoreReconnectionFeature(this);
+ }
+
+ @Override
+ public IDirectEditingFeature getDirectEditingFeature(IDirectEditingContext context)
+ {
+ PictogramElement pe = context.getPictogramElement();
+ Object bo = getBusinessObjectForPictogramElement(pe);
+ if (bo instanceof AClass)
+ {
+ return new AcoreDirectEditAClassFeature(this);
+ }
+ return super.getDirectEditingFeature(context);
+ }
+
+ @Override
+ public ICopyFeature getCopyFeature(ICopyContext context)
+ {
+ return new AcoreCopyAClassFeature(this);
+ }
+
+ @Override
+ public IPasteFeature getPasteFeature(IPasteContext context)
+ {
+ return new AcorePasteAClassFeature(this);
+ }
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(ICustomContext context)
+ {
+ return new ICustomFeature[] { new AcoreRenameAClassFeature(this) };
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreToolBehaviorProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreToolBehaviorProvider.java
new file mode 100644
index 0000000000..edb02d0818
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/diagram/AcoreToolBehaviorProvider.java
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.diagram;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreCollapseDummyFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features.AcoreRenameAClassFeature;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreImageProvider;
+
+import org.eclipse.graphiti.dt.IDiagramTypeProvider;
+import org.eclipse.graphiti.features.ICreateConnectionFeature;
+import org.eclipse.graphiti.features.context.IDoubleClickContext;
+import org.eclipse.graphiti.features.context.IPictogramElementContext;
+import org.eclipse.graphiti.features.context.impl.CreateConnectionContext;
+import org.eclipse.graphiti.features.context.impl.CustomContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.tb.ContextButtonEntry;
+import org.eclipse.graphiti.tb.ContextEntryHelper;
+import org.eclipse.graphiti.tb.DefaultToolBehaviorProvider;
+import org.eclipse.graphiti.tb.IContextButtonEntry;
+import org.eclipse.graphiti.tb.IContextButtonPadData;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreToolBehaviorProvider extends DefaultToolBehaviorProvider
+{
+ public AcoreToolBehaviorProvider(IDiagramTypeProvider dtp)
+ {
+ super(dtp);
+ }
+
+ @Override
+ public IContextButtonPadData getContextButtonPad(IPictogramElementContext context)
+ {
+ IContextButtonPadData data = super.getContextButtonPad(context);
+ PictogramElement pe = context.getPictogramElement();
+
+ // 1. set the generic context buttons
+ // note, that we do not add 'remove' (just as an example)
+ setGenericContextButtons(data, pe, CONTEXT_BUTTON_DELETE | CONTEXT_BUTTON_UPDATE);
+
+ // 2. set the collapse button
+ // simply use a dummy custom feature (senseless example)
+ CustomContext cc = new CustomContext(new PictogramElement[] { pe });
+ ICustomFeature[] cf = getFeatureProvider().getCustomFeatures(cc);
+ for (int i = 0; i < cf.length; i++)
+ {
+ ICustomFeature iCustomFeature = cf[i];
+ if (iCustomFeature instanceof AcoreCollapseDummyFeature)
+ {
+ IContextButtonEntry collapseButton = ContextEntryHelper.createCollapseContextButton(true, iCustomFeature, cc);
+ data.setCollapseContextButton(collapseButton);
+ break;
+ }
+ }
+
+ // 3. add one domain specific context-button, which offers all
+ // available connection-features as drag&drop features...
+
+ // 3.a. create new CreateConnectionContext
+ CreateConnectionContext ccc = new CreateConnectionContext();
+ ccc.setSourcePictogramElement(pe);
+ Anchor anchor = null;
+ if (pe instanceof Anchor)
+ {
+ anchor = (Anchor)pe;
+ }
+ else if (pe instanceof AnchorContainer)
+ {
+ // assume, that our shapes always have chopbox anchors
+ anchor = Graphiti.getPeService().getChopboxAnchor((AnchorContainer)pe);
+ }
+ ccc.setSourceAnchor(anchor);
+
+ // 3.b. create context button and add all applicable features
+ ContextButtonEntry button = new ContextButtonEntry(null, context);
+ button.setText("Create connection"); //$NON-NLS-1$
+ button.setIconId(AcoreImageProvider.IMG_EREFERENCE);
+ ICreateConnectionFeature[] features = getFeatureProvider().getCreateConnectionFeatures();
+ for (ICreateConnectionFeature feature : features)
+ {
+ if (feature.isAvailable(ccc) && feature.canStartConnection(ccc))
+ {
+ button.addDragAndDropFeature(feature);
+ }
+ }
+
+ // 3.c. add context button, if it contains at least one feature
+ if (button.getDragAndDropFeatures().size() > 0)
+ {
+ data.getDomainSpecificContextButtons().add(button);
+ }
+
+ return data;
+ }
+
+ //
+ // @Override
+ // public IContextMenuEntry[] getContextMenu(ICustomContext context)
+ // {
+ // // create a sub-menu for all custom features
+ // ContextMenuEntry subMenu = new ContextMenuEntry(null, context);
+ // subMenu.setText("Cu&stom"); //$NON-NLS-1$
+ // subMenu.setDescription("Custom features submenu"); //$NON-NLS-1$
+ // // display sub-menu hierarchical or flat
+ // subMenu.setSubmenu(true);
+ //
+ // // create a menu-entry in the sub-menu for each custom feature
+ // ICustomFeature[] customFeatures = getFeatureProvider().getCustomFeatures(context);
+ // for (int i = 0; i < customFeatures.length; i++)
+ // {
+ // ICustomFeature customFeature = customFeatures[i];
+ // if (customFeature.isAvailable(context))
+ // {
+ // ContextMenuEntry menuEntry = new ContextMenuEntry(customFeature, context);
+ // subMenu.add(menuEntry);
+ // }
+ // }
+ //
+ // IContextMenuEntry ret[] = new IContextMenuEntry[] { subMenu };
+ // return ret;
+ // }
+ //
+ // @Override
+ // public IPaletteCompartmentEntry[] getPalette()
+ // {
+ // List<IPaletteCompartmentEntry> ret = new ArrayList<IPaletteCompartmentEntry>();
+ //
+ // // add compartments from super class
+ // IPaletteCompartmentEntry[] superCompartments = super.getPalette();
+ // for (int i = 0; i < superCompartments.length; i++)
+ // {
+ // ret.add(superCompartments[i]);
+ // }
+ //
+ // // add new compartment at the end of the existing compartments
+ // PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry("Stacked", null); //$NON-NLS-1$
+ // ret.add(compartmentEntry);
+ //
+ // // add new stack entry to new compartment
+ // StackEntry stackEntry = new StackEntry("EObject", "EObject", null); //$NON-NLS-1$ //$NON-NLS-2$
+ // compartmentEntry.addToolEntry(stackEntry);
+ //
+ // // add all create-features to the new stack-entry
+ // IFeatureProvider featureProvider = getFeatureProvider();
+ // ICreateFeature[] createFeatures = featureProvider.getCreateFeatures();
+ // for (ICreateFeature cf : createFeatures)
+ // {
+ // ObjectCreationToolEntry objectCreationToolEntry = new ObjectCreationToolEntry(cf.getCreateName(),
+ // cf.getCreateDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId(), cf);
+ //
+ // stackEntry.addCreationToolEntry(objectCreationToolEntry);
+ // }
+ //
+ // // add all create-connection-features to the new stack-entry
+ // ICreateConnectionFeature[] createConnectionFeatures = featureProvider.getCreateConnectionFeatures();
+ // for (ICreateConnectionFeature cf : createConnectionFeatures)
+ // {
+ // ConnectionCreationToolEntry connectionCreationToolEntry = new ConnectionCreationToolEntry(cf.getCreateName(),
+ // cf.getCreateDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId());
+ // connectionCreationToolEntry.addCreateConnectionFeature(cf);
+ // stackEntry.addCreationToolEntry(connectionCreationToolEntry);
+ // }
+ //
+ // return ret.toArray(new IPaletteCompartmentEntry[ret.size()]);
+ // }
+ //
+
+ @Override
+ public ICustomFeature getDoubleClickFeature(IDoubleClickContext context)
+ {
+ ICustomFeature customFeature = new AcoreRenameAClassFeature(getFeatureProvider());
+ // canExecute() tests especially if the context contains a AClass
+ if (customFeature.canExecute(context))
+ {
+ return customFeature;
+ }
+
+ return super.getDoubleClickFeature(context);
+ }
+ //
+ // @Override
+ // public IDecorator[] getDecorators(PictogramElement pe)
+ // {
+ // IFeatureProvider featureProvider = getFeatureProvider();
+ // Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);
+ // if (bo instanceof AClass)
+ // {
+ // AClass AClass = (AClass)bo;
+ // String name = AClass.getName();
+ // if (name != null && name.length() > 0 && !(name.charAt(0) >= 'A' && name.charAt(0) <= 'Z'))
+ // {
+ // IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_WARNING_TSK);
+ // imageRenderingDecorator.setMessage("Name should start with upper case letter"); //$NON-NLS-1$
+ // return new IDecorator[] { imageRenderingDecorator };
+ // }
+ // }
+ //
+ // return super.getDecorators(pe);
+ // }
+ //
+ // @Override
+ // public GraphicsAlgorithm[] getClickArea(PictogramElement pe)
+ // {
+ // IFeatureProvider featureProvider = getFeatureProvider();
+ // Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);
+ // if (bo instanceof AClass)
+ // {
+ // GraphicsAlgorithm invisible = pe.getGraphicsAlgorithm();
+ // GraphicsAlgorithm rectangle = invisible.getGraphicsAlgorithmChildren().get(0);
+ // return new GraphicsAlgorithm[] { rectangle };
+ // }
+ // return super.getClickArea(pe);
+ // }
+ //
+ // @Override
+ // public GraphicsAlgorithm getSelectionBorder(PictogramElement pe)
+ // {
+ // if (pe instanceof ContainerShape)
+ // {
+ // GraphicsAlgorithm invisible = pe.getGraphicsAlgorithm();
+ // if (!invisible.getLineVisible())
+ // {
+ // EList<GraphicsAlgorithm> graphicsAlgorithmChildren = invisible.getGraphicsAlgorithmChildren();
+ // if (!graphicsAlgorithmChildren.isEmpty())
+ // {
+ // return graphicsAlgorithmChildren.get(0);
+ // }
+ // }
+ // }
+ // return super.getSelectionBorder(pe);
+ // }
+ //
+ // @Override
+ // public String getToolTip(GraphicsAlgorithm ga)
+ // {
+ // PictogramElement pe = ga.getPictogramElement();
+ // Object bo = getFeatureProvider().getBusinessObjectForPictogramElement(pe);
+ // if (bo instanceof AClass)
+ // {
+ // String name = ((AClass)bo).getName();
+ // if (name != null && !name.equals(""))
+ // {
+ // return name;
+ // }
+ // }
+ // return super.getToolTip(ga);
+ // }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAClassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAClassFeature.java
new file mode 100644
index 0000000000..c5c114281b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAClassFeature.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.styles.Color;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.util.ColorConstant;
+import org.eclipse.graphiti.util.IColorConstant;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreAddAClassFeature extends AcoreBasicAddElementFeature
+{
+ private static final IColorConstant CLASS_TEXT_FOREGROUND = new ColorConstant(51, 51, 153);
+
+ private static final IColorConstant CLASS_FOREGROUND = new ColorConstant(150, 150, 255);
+
+ private static final IColorConstant CLASS_BACKGROUND = new ColorConstant(230, 230, 255);
+
+ public AcoreAddAClassFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context)
+ {
+ // check if user wants to add a AClass
+ if (context.getNewObject() instanceof AClass)
+ {
+ // check if user wants to add to a diagram
+ if (context.getTargetContainer() instanceof Diagram)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected Color getBackgroundColor()
+ {
+ return manageColor(CLASS_BACKGROUND);
+ }
+
+ @Override
+ protected Color getForegroundColor()
+ {
+ return manageColor(CLASS_FOREGROUND);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAInterfaceFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAInterfaceFeature.java
new file mode 100644
index 0000000000..84c9e76e3d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAInterfaceFeature.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.styles.Color;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.util.ColorConstant;
+import org.eclipse.graphiti.util.IColorConstant;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreAddAInterfaceFeature extends AcoreBasicAddElementFeature
+{
+ private static final IColorConstant CLASS_TEXT_FOREGROUND = new ColorConstant(51, 51, 153);
+
+ private static final IColorConstant CLASS_FOREGROUND = new ColorConstant(150, 150, 255);
+
+ private static final IColorConstant CLASS_BACKGROUND = new ColorConstant(255, 255, 190);
+
+ public AcoreAddAInterfaceFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context)
+ {
+ // check if user wants to add a AClass
+ if (context.getNewObject() instanceof AInterface)
+ {
+ // check if user wants to add to a diagram
+ if (context.getTargetContainer() instanceof Diagram)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected Color getBackgroundColor()
+ {
+ return manageColor(CLASS_BACKGROUND);
+ }
+
+ @Override
+ protected Color getForegroundColor()
+ {
+ return manageColor(CLASS_FOREGROUND);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAggregationFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAggregationFeature.java
new file mode 100644
index 0000000000..20df7bc7c6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAggregationFeature.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.mm.algorithms.Polygon;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.util.IColorConstant;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreAddAggregationFeature extends AcoreBasicAddConnectionFeature
+{
+ public AcoreAddAggregationFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context)
+ {
+ return context instanceof IAddConnectionContext && context.getNewObject() instanceof AClass;
+ }
+
+ @Override
+ protected Polyline createTargetDecoration(GraphicsAlgorithmContainer gaContainer)
+ {
+ IGaService gaService = Graphiti.getGaService();
+ Polygon polygon = gaService.createPolygon(gaContainer, new int[] { -30, 0, -15, 10, 0, 0, -15, -10, -30, 0 });
+
+ polygon.setForeground(manageColor(IColorConstant.BLACK));
+ polygon.setBackground(manageColor(IColorConstant.WHITE));
+ polygon.setLineWidth(2);
+ return polygon;
+ }
+
+ @Override
+ protected String getConnectionLabel()
+ {
+ return "association";
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAssociationFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAssociationFeature.java
new file mode 100644
index 0000000000..0d2746a809
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddAssociationFeature.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreAddAssociationFeature extends AcoreBasicAddConnectionFeature
+{
+ public AcoreAddAssociationFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context)
+ {
+ return context instanceof IAddConnectionContext && context.getNewObject() instanceof AClass;
+ }
+
+ @Override
+ protected Polyline createTargetDecoration(GraphicsAlgorithmContainer gaContainer)
+ {
+ return null;
+ }
+
+ @Override
+ protected String getConnectionLabel()
+ {
+ return "association";
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddCompositionFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddCompositionFeature.java
new file mode 100644
index 0000000000..456f8c87e4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddCompositionFeature.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.mm.algorithms.Polygon;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.util.IColorConstant;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreAddCompositionFeature extends AcoreBasicAddConnectionFeature
+{
+ public AcoreAddCompositionFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context)
+ {
+ return context instanceof IAddConnectionContext && context.getNewObject() instanceof AClass;
+ }
+
+ @Override
+ protected Polyline createTargetDecoration(GraphicsAlgorithmContainer gaContainer)
+ {
+ IGaService gaService = Graphiti.getGaService();
+ Polygon polygon = gaService.createPolygon(gaContainer, new int[] { -30, 0, -15, 10, 0, 0, -15, -10, -30, 0 });
+
+ polygon.setForeground(manageColor(IColorConstant.BLACK));
+ polygon.setBackground(manageColor(IColorConstant.BLACK));
+ polygon.setLineWidth(2);
+ return polygon;
+ }
+
+ @Override
+ protected String getConnectionLabel()
+ {
+ return "composition";
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddImplementationFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddImplementationFeature.java
new file mode 100644
index 0000000000..72562da257
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddImplementationFeature.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.util.IColorConstant;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreAddImplementationFeature extends AcoreBasicAddConnectionFeature
+{
+ public AcoreAddImplementationFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context)
+ {
+ return context instanceof IAddConnectionContext && context.getNewObject() instanceof ABasicClass;
+ }
+
+ @Override
+ protected Polyline createTargetDecoration(GraphicsAlgorithmContainer gaContainer)
+ {
+ IGaService gaService = Graphiti.getGaService();
+ Polyline polyline = gaService.createPolyline(gaContainer, new int[] { -15, 10, 0, 0, -15, -10 });
+ polyline.setForeground(manageColor(IColorConstant.BLACK));
+ polyline.setLineWidth(2);
+ return polyline;
+ }
+
+ @Override
+ protected String getConnectionLabel()
+ {
+ return "implements";
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddSubClassesFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddSubClassesFeature.java
new file mode 100644
index 0000000000..f5ff0f5c11
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreAddSubClassesFeature.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.mm.algorithms.Polygon;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.util.IColorConstant;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreAddSubClassesFeature extends AcoreBasicAddConnectionFeature
+{
+ public AcoreAddSubClassesFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context)
+ {
+ return context instanceof IAddConnectionContext && context.getNewObject() instanceof AClass;
+ }
+
+ @Override
+ protected Polyline createTargetDecoration(GraphicsAlgorithmContainer gaContainer)
+ {
+ IGaService gaService = Graphiti.getGaService();
+ Polygon polygon = gaService.createPolygon(gaContainer, new int[] { -15, 10, 0, 0, -15, -10 });
+
+ polygon.setForeground(manageColor(IColorConstant.BLACK));
+ polygon.setBackground(manageColor(IColorConstant.WHITE));
+ polygon.setLineWidth(2);
+ return polygon;
+ }
+
+ @Override
+ protected String getConnectionLabel()
+ {
+ return "extends";
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddConnectionFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddConnectionFeature.java
new file mode 100644
index 0000000000..6ec167104f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddConnectionFeature.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.impl.AbstractAddFeature;
+import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Text;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeCreateService;
+import org.eclipse.graphiti.util.IColorConstant;
+
+/**
+ * @author Martin Fluegge
+ */
+public abstract class AcoreBasicAddConnectionFeature extends AbstractAddFeature
+{
+ public AcoreBasicAddConnectionFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ public PictogramElement add(IAddContext context)
+ {
+ IAddConnectionContext addConContext = (IAddConnectionContext)context;
+ // EReference addedEReference = (EReference)context.getNewObject();
+ EObject addedObject = (EObject)context.getNewObject();
+ IPeCreateService peCreateService = Graphiti.getPeCreateService();
+
+ // CONNECTION WITH POLYLINE
+ Connection connection = peCreateService.createFreeFormConnection(getDiagram());
+ connection.setStart(addConContext.getSourceAnchor());
+ connection.setEnd(addConContext.getTargetAnchor());
+
+ IGaService gaService = Graphiti.getGaService();
+ Polyline polyline = gaService.createPolyline(connection);
+ polyline.setLineWidth(2);
+ polyline.setForeground(manageColor(IColorConstant.BLACK));
+
+ // we need to put in an object, otherwise the line will be marked dotted
+ // link(connection, addedObject);
+
+ ConnectionDecorator textDecorator = peCreateService.createConnectionDecorator(connection, true, 0.5, true);
+
+ Text text = gaService.createDefaultText(getDiagram(), textDecorator);
+
+ text.setForeground(manageColor(IColorConstant.BLACK));
+ gaService.setLocation(text, 10, 0);
+
+ text.setValue(getConnectionLabel());
+
+ ConnectionDecorator cd;
+ cd = peCreateService.createConnectionDecorator(connection, false, 1.0, true);
+ createTargetDecoration(cd);
+ return connection;
+ }
+
+ protected abstract String getConnectionLabel();
+
+ public abstract boolean canAdd(IAddContext context);
+
+ protected abstract Polyline createTargetDecoration(GraphicsAlgorithmContainer gaContainer);
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddElementFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddElementFeature.java
new file mode 100644
index 0000000000..b355c8a837
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicAddElementFeature.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+
+import org.eclipse.graphiti.features.IDirectEditingInfo;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.impl.AbstractAddShapeFeature;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
+import org.eclipse.graphiti.mm.algorithms.Text;
+import org.eclipse.graphiti.mm.algorithms.styles.Color;
+import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
+import org.eclipse.graphiti.mm.pictograms.BoxRelativeAnchor;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeCreateService;
+
+/**
+ * @author Martin Fluegge
+ */
+public abstract class AcoreBasicAddElementFeature extends AbstractAddShapeFeature
+{
+ public AcoreBasicAddElementFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ public abstract boolean canAdd(IAddContext context);
+
+ protected abstract Color getBackgroundColor();
+
+ protected abstract Color getForegroundColor();
+
+ public PictogramElement add(IAddContext context)
+ {
+ ABasicClass addedClass = (ABasicClass)context.getNewObject();
+ Diagram targetDiagram = (Diagram)context.getTargetContainer();
+
+ // CONTAINER SHAPE WITH ROUNDED RECTANGLE
+ IPeCreateService peCreateService = Graphiti.getPeCreateService();
+ // define a default size for the shape
+ int width = 100;
+ int height = 50;
+ IGaService gaService = Graphiti.getGaService();
+
+ addToResourceIfNeeded(addedClass);
+
+ ContainerShape containerShape = createContainerShape(context, addedClass, targetDiagram, peCreateService, width,
+ height, gaService);
+
+ return containerShape;
+ }
+
+ private ContainerShape createContainerShape(IAddContext context, ABasicClass addedClass, Diagram targetDiagram,
+ IPeCreateService peCreateService, int width, int height, IGaService gaService)
+ {
+ ContainerShape containerShape = peCreateService.createContainerShape(targetDiagram, true);
+ // create and set graphics algorithm
+ RoundedRectangle roundedRectangle = gaService.createRoundedRectangle(containerShape, 5, 5);
+ roundedRectangle.setForeground(getForegroundColor());
+ roundedRectangle.setBackground(getBackgroundColor());
+ roundedRectangle.setLineWidth(2);
+ gaService.setLocationAndSize(roundedRectangle, context.getX(), context.getY(), width, height);
+
+ // create link and wire it
+ link(containerShape, addedClass);
+
+ // SHAPE WITH LINE
+ {
+ // create shape for line
+ Shape shape = peCreateService.createShape(containerShape, false);
+
+ // create and set graphics algorithm
+ Polyline polyline = gaService.createPolyline(shape, new int[] { 0, 20, width, 20 });
+ polyline.setForeground(getForegroundColor());
+ polyline.setLineWidth(2);
+ }
+
+ // SHAPE WITH TEXT
+ {
+ // create shape for text
+ final Shape shape = peCreateService.createShape(containerShape, false);
+
+ // create and set text graphics algorithm
+ final Text text = gaService.createText(shape, addedClass.getName());
+ // text.setStyle(StyleUtil.getStyleForAClassText(getDiagram()));
+ text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
+ text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
+ gaService.setLocationAndSize(text, 0, 0, width, 20);
+
+ // create link and wire it
+ link(shape, addedClass);
+
+ activateDirectEditing(containerShape, shape, text);
+ }
+
+ // add a chopbox anchor to the shape
+ peCreateService.createChopboxAnchor(containerShape);
+
+ // create an additional box relative anchor at middle-right
+ final BoxRelativeAnchor boxAnchor = peCreateService.createBoxRelativeAnchor(containerShape);
+
+ boxAnchor.setRelativeWidth(1.0);
+ boxAnchor.setRelativeHeight(0.5);
+
+ // anchor references visible rectangle instead of invisible rectangle
+ boxAnchor.setReferencedGraphicsAlgorithm(roundedRectangle);
+
+ // assign a graphics algorithm for the box relative anchor
+ Rectangle rectangle = gaService.createRectangle(boxAnchor);
+ rectangle.setFilled(true);
+
+ // anchor is located on the right border of the visible rectangle
+ // and touches the border of the invisible rectangle
+
+ int w = 6;
+ gaService.setLocationAndSize(rectangle, -2 * w, -w, 2 * w, 2 * w);
+ rectangle.setForeground(getForegroundColor());
+ rectangle.setBackground(getBackgroundColor());
+
+ // call the layout feature
+ layoutPictogramElement(containerShape);
+ return containerShape;
+ }
+
+ private void activateDirectEditing(ContainerShape containerShape, final Shape shape, final Text text)
+ {
+ // provide information to support direct-editing directly
+ // after object creation (must be activated additionally)
+ final IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
+ // set container shape for direct editing after object creation
+ directEditingInfo.setMainPictogramElement(containerShape);
+ // set shape and graphics algorithm where the editor for
+ // direct editing shall be opened after object creation
+ directEditingInfo.setPictogramElement(shape);
+ directEditingInfo.setGraphicsAlgorithm(text);
+ }
+
+ private void addToResourceIfNeeded(ABasicClass addedClass)
+ {
+ // if added Class has no resource we add it to the resource
+ // of the diagram
+ // in a real scenario the business model would have its own resource
+ if (addedClass.eResource() == null)
+ {
+ getDiagram().eResource().getContents().add(addedClass);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateConnectionFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateConnectionFeature.java
new file mode 100644
index 0000000000..9d5f85c7f3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateConnectionFeature.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil.ConnectionType;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
+import org.eclipse.graphiti.features.impl.AbstractCreateConnectionFeature;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+
+/**
+ * @author Martin Fluegge
+ */
+public abstract class AcoreBasicCreateConnectionFeature extends AbstractCreateConnectionFeature
+{
+ public AcoreBasicCreateConnectionFeature(IFeatureProvider fp, String name, String description)
+ {
+ super(fp, name, description);
+ }
+
+ public boolean canCreate(ICreateConnectionContext context)
+ {
+ EObject source = getSource(context.getSourceAnchor());
+ EObject target = getTarget(context.getTargetAnchor());
+ if (source != null && target != null && source != target)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public abstract boolean canStartConnection(ICreateConnectionContext context);
+
+ public Connection create(ICreateConnectionContext context)
+ {
+ Connection newConnection = null;
+
+ // get AClasses which should be connected
+ EObject source = getSource(context.getSourceAnchor());
+ EObject target = getTarget(context.getTargetAnchor());
+
+ if (source != null && target != null)
+ {
+ // create new business object
+ createConnection(source, target);
+ // add connection for business object
+ AddConnectionContext addContext = new AddConnectionContext(context.getSourceAnchor(), context.getTargetAnchor());
+
+ addContext.putProperty(AcoreGraphitiContextUtil.CONNECTTION_TYPE, getConnectionType());
+
+ addContext.setNewObject(source);
+ newConnection = (Connection)getFeatureProvider().addIfPossible(addContext);
+ }
+
+ return newConnection;
+ }
+
+ protected abstract ConnectionType getConnectionType();
+
+ protected abstract EObject getTarget(Anchor targetAnchor);
+
+ /**
+ * Returns the AClass belonging to the anchor, or null if not available.
+ */
+ protected abstract EObject getSource(Anchor anchor);
+
+ /**
+ * Creates a EReference between two AClasses.
+ */
+ protected abstract void createConnection(EObject source, EObject target);
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateElementFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateElementFeature.java
new file mode 100644
index 0000000000..5a9a290930
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreBasicCreateElementFeature.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.features.impl.AbstractCreateFeature;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+
+/**
+ * @author Martin Fluegge
+ */
+public abstract class AcoreBasicCreateElementFeature extends AbstractCreateFeature
+{
+ public AcoreBasicCreateElementFeature(IFeatureProvider fp, String name, String description)
+ {
+ super(fp, name, description);
+ }
+
+ public boolean canCreate(ICreateContext context)
+ {
+ return context.getTargetContainer() instanceof Diagram;
+ }
+
+ public Object[] create(ICreateContext context)
+ {
+ EObject newObject = createElement();
+
+ // Add model element to resource.
+ // We add the model element to the resource of the diagram for
+ // simplicity's sake. Normally, a customer would use its own
+ // model persistence layer for storing the business model separately.
+ getDiagram().eResource().getContents().add(newObject);
+
+ // do the add
+ addGraphicalRepresentation(context, newObject);
+
+ // activate direct editing after object creation
+ getFeatureProvider().getDirectEditingInfo().setActive(true);
+ // return newly created business object(s)
+ return new Object[] { newObject };
+ }
+
+ protected abstract EObject createElement();
+
+ @Override
+ public String getCreateImageId()
+ {
+ return "org.eclipse.graphiti.examples.tutorial.ereference";
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCollapseDummyFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCollapseDummyFeature.java
new file mode 100644
index 0000000000..9122bdf451
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCollapseDummyFeature.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.platform.IPlatformImageConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCollapseDummyFeature extends AbstractCustomFeature
+{
+
+ public AcoreCollapseDummyFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canExecute(ICustomContext context)
+ {
+ boolean ret = false;
+ PictogramElement[] pes = context.getPictogramElements();
+ if (pes != null && pes.length == 1)
+ {
+ Object bo = getBusinessObjectForPictogramElement(pes[0]);
+ if (bo instanceof AClass)
+ {
+ ret = true;
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public String getName()
+ {
+ return "Co&llapse"; //$NON-NLS-1$
+ }
+
+ @Override
+ public String getDescription()
+ {
+
+ return "Collapse Figure"; //$NON-NLS-1$
+ }
+
+ @Override
+ public String getImageId()
+ {
+ return IPlatformImageConstants.IMG_EDIT_COLLAPSE;
+ }
+
+ @Override
+ public boolean isAvailable(IContext context)
+ {
+ return true;
+ }
+
+ public void execute(ICustomContext context)
+ {
+ MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Information",//$NON-NLS-1$
+ "The 'Collapse Feature' is intentionally not implemented yet."); //$NON-NLS-1$
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCopyAClassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCopyAClassFeature.java
new file mode 100644
index 0000000000..c47107a60a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCopyAClassFeature.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICopyContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.ui.features.AbstractCopyFeature;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCopyAClassFeature extends AbstractCopyFeature
+{
+
+ public AcoreCopyAClassFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ public boolean canCopy(ICopyContext context)
+ {
+ final PictogramElement[] pes = context.getPictogramElements();
+ if (pes == null || pes.length == 0)
+ { // nothing selected
+ return false;
+ }
+
+ // return true, if all selected elements are a AClasses
+ for (PictogramElement pe : pes)
+ {
+ final Object bo = getBusinessObjectForPictogramElement(pe);
+ if (!(bo instanceof AClass))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public void copy(ICopyContext context)
+ {
+ // get the business-objects for all pictogram-elements
+ // we already verified, that all business-objets are AClasses
+ PictogramElement[] pes = context.getPictogramElements();
+ Object[] bos = new Object[pes.length];
+ for (int i = 0; i < pes.length; i++)
+ {
+ PictogramElement pe = pes[i];
+ bos[i] = getBusinessObjectForPictogramElement(pe);
+ }
+ // put all business objects to the clipboard
+ putToClipboard(bos);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAClassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAClassFeature.java
new file mode 100644
index 0000000000..cb5f229ae6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAClassFeature.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCreateAClassFeature extends AcoreBasicCreateElementFeature
+{
+ public AcoreCreateAClassFeature(IFeatureProvider fp)
+ {
+ // set name and description of the creation feature
+ super(fp, "AClass", "Create AClass");
+ }
+
+ @Override
+ public boolean canCreate(ICreateContext context)
+ {
+ return context.getTargetContainer() instanceof Diagram;
+ }
+
+ @Override
+ public String getCreateImageId()
+ {
+ return "org.eclipse.graphiti.examples.tutorial.ereference";
+ }
+
+ @Override
+ protected EObject createElement()
+ {
+ AClass aClass = AcoreFactory.eINSTANCE.createAClass();
+ aClass.setName("AClass");
+ return aClass;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAInterfaceFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAInterfaceFeature.java
new file mode 100644
index 0000000000..0bb2bd0401
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAInterfaceFeature.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCreateAInterfaceFeature extends AcoreBasicCreateElementFeature
+{
+ public AcoreCreateAInterfaceFeature(IFeatureProvider fp)
+ {
+ // set name and description of the creation feature
+ super(fp, "AInterface", "Create AInterface");
+ }
+
+ @Override
+ public boolean canCreate(ICreateContext context)
+ {
+ return context.getTargetContainer() instanceof Diagram;
+ }
+
+ @Override
+ public String getCreateImageId()
+ {
+ return "org.eclipse.graphiti.examples.tutorial.ereference";
+ }
+
+ @Override
+ protected EObject createElement()
+ {
+ AInterface aInterface = AcoreFactory.eINSTANCE.createAInterface();
+ aInterface.setName("AInterface");
+ return aInterface;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAggregationFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAggregationFeature.java
new file mode 100644
index 0000000000..de284401f5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAggregationFeature.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil.ConnectionType;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCreateAggregationFeature extends AcoreBasicCreateConnectionFeature
+{
+ public AcoreCreateAggregationFeature(IFeatureProvider fp)
+ {
+ // provide name and description for the UI, e.g. the palette
+ super(fp, "aggregation", "aggregation");
+ }
+
+ @Override
+ public boolean canCreate(ICreateConnectionContext context)
+ {
+ // return true if both anchors belong to an AClass
+ // and those AClasses are not identical
+ AClass source = getAClass(context.getSourceAnchor());
+ AClass target = getAClass(context.getTargetAnchor());
+ if (source != null && target != null && source != target)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canStartConnection(ICreateConnectionContext context)
+ {
+ if (getAClass(context.getSourceAnchor()) != null)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Creates a EReference between two AClasses.
+ */
+ @Override
+ protected void createConnection(EObject source, EObject target)
+ {
+ ((AClass)source).getAssociations().add((AClass)target);
+ }
+
+ @Override
+ protected EObject getTarget(Anchor targetAnchor)
+ {
+ return getAClass(targetAnchor);
+ }
+
+ @Override
+ protected EObject getSource(Anchor anchor)
+ {
+ return getAClass(anchor);
+ }
+
+ @Override
+ protected ConnectionType getConnectionType()
+ {
+ return ConnectionType.AGGREGATIONS;
+ }
+
+ /**
+ * Returns the AClass belonging to the anchor, or null if not available.
+ */
+ private AClass getAClass(Anchor anchor)
+ {
+ if (anchor != null)
+ {
+ Object object = getBusinessObjectForPictogramElement(anchor.getParent());
+ if (object instanceof AClass)
+ {
+ return (AClass)object;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAssociationFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAssociationFeature.java
new file mode 100644
index 0000000000..c8762b8e15
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateAssociationFeature.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil.ConnectionType;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCreateAssociationFeature extends AcoreBasicCreateConnectionFeature
+{
+ public AcoreCreateAssociationFeature(IFeatureProvider fp)
+ {
+ // provide name and description for the UI, e.g. the palette
+ super(fp, "assocation", "assocation");
+ }
+
+ @Override
+ public boolean canCreate(ICreateConnectionContext context)
+ {
+ // return true if both anchors belong to an AClass
+ // and those AClasses are not identical
+ AClass source = getAClass(context.getSourceAnchor());
+ AClass target = getAClass(context.getTargetAnchor());
+ if (source != null && target != null && source != target)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canStartConnection(ICreateConnectionContext context)
+ {
+ if (getAClass(context.getSourceAnchor()) != null)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected void createConnection(EObject source, EObject target)
+ {
+ ((AClass)source).getAggregations().add((AClass)target);
+ }
+
+ @Override
+ protected EObject getTarget(Anchor targetAnchor)
+ {
+ return getAClass(targetAnchor);
+ }
+
+ @Override
+ protected EObject getSource(Anchor anchor)
+ {
+ return getAClass(anchor);
+ }
+
+ @Override
+ protected ConnectionType getConnectionType()
+ {
+ return ConnectionType.ASSOCIATIONS;
+ }
+
+ /**
+ * Returns the AClass belonging to the anchor, or null if not available.
+ */
+ private AClass getAClass(Anchor anchor)
+ {
+ if (anchor != null)
+ {
+ Object object = getBusinessObjectForPictogramElement(anchor.getParent());
+ if (object instanceof AClass)
+ {
+ return (AClass)object;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateCompositionsFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateCompositionsFeature.java
new file mode 100644
index 0000000000..63da5df3a2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateCompositionsFeature.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil.ConnectionType;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCreateCompositionsFeature extends AcoreBasicCreateConnectionFeature
+{
+ public AcoreCreateCompositionsFeature(IFeatureProvider fp)
+ {
+ // provide name and description for the UI, e.g. the palette
+ super(fp, "composition", "composition");
+ }
+
+ @Override
+ public boolean canCreate(ICreateConnectionContext context)
+ {
+ // return true if both anchors belong to an AClass
+ // and those AClasses are not identical
+ AClass source = getAClass(context.getSourceAnchor());
+ AClass target = getAClass(context.getTargetAnchor());
+ if (source != null && target != null && source != target)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canStartConnection(ICreateConnectionContext context)
+ {
+ if (getAClass(context.getSourceAnchor()) != null)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Creates a EReference between two AClasses.
+ */
+ @Override
+ protected void createConnection(EObject source, EObject target)
+ {
+ ((AClass)source).getCompositions().add((AClass)target);
+ }
+
+ @Override
+ protected EObject getTarget(Anchor targetAnchor)
+ {
+ return getAClass(targetAnchor);
+ }
+
+ @Override
+ protected EObject getSource(Anchor anchor)
+ {
+ return getAClass(anchor);
+ }
+
+ @Override
+ protected ConnectionType getConnectionType()
+ {
+ return ConnectionType.COMPOSITIONS;
+ }
+
+ /**
+ * Returns the AClass belonging to the anchor, or null if not available.
+ */
+ private AClass getAClass(Anchor anchor)
+ {
+ if (anchor != null)
+ {
+ Object object = getBusinessObjectForPictogramElement(anchor.getParent());
+ if (object instanceof AClass)
+ {
+ return (AClass)object;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateImplementationFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateImplementationFeature.java
new file mode 100644
index 0000000000..f2c89cdb9d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateImplementationFeature.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil.ConnectionType;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCreateImplementationFeature extends AcoreBasicCreateConnectionFeature
+{
+ public AcoreCreateImplementationFeature(IFeatureProvider fp)
+ {
+ // provide name and description for the UI, e.g. the palette
+ super(fp, "implements", "implements");
+ }
+
+ @Override
+ public boolean canStartConnection(ICreateConnectionContext context)
+ {
+ ABasicClass aClass = getAClass(context.getSourceAnchor());
+ if (aClass != null)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Creates a EReference between two AClasses.
+ */
+ @Override
+ protected void createConnection(EObject source, EObject target)
+ {
+ ((AClass)source).getImplementedInterfaces().add((AInterface)target);
+ }
+
+ @Override
+ protected EObject getTarget(Anchor targetAnchor)
+ {
+ return getAClass(targetAnchor);
+ }
+
+ @Override
+ protected EObject getSource(Anchor anchor)
+ {
+ return getAClass(anchor);
+ }
+
+ @Override
+ protected ConnectionType getConnectionType()
+ {
+ return ConnectionType.IMPLEMENTATIONS;
+ }
+
+ private ABasicClass getAClass(Anchor anchor)
+ {
+ if (anchor != null)
+ {
+ Object object = getBusinessObjectForPictogramElement(anchor.getParent());
+ if (object instanceof ABasicClass)
+ {
+ return (ABasicClass)object;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateSubclassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateSubclassFeature.java
new file mode 100644
index 0000000000..0e408126ae
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreCreateSubclassFeature.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util.AcoreGraphitiContextUtil.ConnectionType;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreCreateSubclassFeature extends AcoreBasicCreateConnectionFeature
+{
+ public AcoreCreateSubclassFeature(IFeatureProvider fp)
+ {
+ // provide name and description for the UI, e.g. the palette
+ super(fp, "extends", "extends");
+ }
+
+ @Override
+ public boolean canCreate(ICreateConnectionContext context)
+ {
+ // return true if both anchors belong to an AClass
+ // and those AClasses are not identical
+ AClass source = getAClass(context.getSourceAnchor());
+ AClass target = getAClass(context.getTargetAnchor());
+ if (source != null && target != null && source != target)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canStartConnection(ICreateConnectionContext context)
+ {
+ if (getAClass(context.getSourceAnchor()) != null)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Creates a EReference between two AClasses.
+ */
+ @Override
+ protected void createConnection(EObject source, EObject target)
+ {
+ ((AClass)source).getSubClasses().add((AClass)target);
+ }
+
+ @Override
+ protected EObject getTarget(Anchor targetAnchor)
+ {
+ return getAClass(targetAnchor);
+ }
+
+ @Override
+ protected EObject getSource(Anchor anchor)
+ {
+ return getAClass(anchor);
+ }
+
+ @Override
+ protected ConnectionType getConnectionType()
+ {
+ return ConnectionType.SUBCLASSES;
+ }
+
+ /**
+ * Returns the AClass belonging to the anchor, or null if not available.
+ */
+ private AClass getAClass(Anchor anchor)
+ {
+ if (anchor != null)
+ {
+ Object object = getBusinessObjectForPictogramElement(anchor.getParent());
+ if (object instanceof AClass)
+ {
+ return (AClass)object;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreDirectEditAClassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreDirectEditAClassFeature.java
new file mode 100644
index 0000000000..1641b7f693
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreDirectEditAClassFeature.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IDirectEditingContext;
+import org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.Text;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreDirectEditAClassFeature extends AbstractDirectEditingFeature
+{
+
+ public AcoreDirectEditAClassFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ public int getEditingType()
+ {
+ // there are several possible editor-types supported:
+ // text-field, checkbox, color-chooser, combobox, ...
+ return TYPE_TEXT;
+ }
+
+ @Override
+ public boolean canDirectEdit(IDirectEditingContext context)
+ {
+ PictogramElement pe = context.getPictogramElement();
+ Object bo = getBusinessObjectForPictogramElement(pe);
+ GraphicsAlgorithm ga = context.getGraphicsAlgorithm();
+ // support direct editing, if it is a AClass, and the user clicked
+ // directly on the text and not somewhere else in the rectangle
+ if (bo instanceof AClass && ga instanceof Text)
+ {
+ return true;
+ }
+ // direct editing not supported in all other cases
+ return false;
+ }
+
+ public String getInitialValue(IDirectEditingContext context)
+ {
+ // return the current name of the AClass
+ PictogramElement pe = context.getPictogramElement();
+ AClass AClass = (AClass)getBusinessObjectForPictogramElement(pe);
+ return AClass.getName();
+ }
+
+ @Override
+ public String checkValueValid(String value, IDirectEditingContext context)
+ {
+ if (value.length() < 1)
+ {
+ return "Please enter any text as class name.";
+ }
+ if (value.contains(" "))
+ {
+ return "Spaces are not allowed in class names.";
+ }
+ if (value.contains("\n"))
+ {
+ return "Line breakes are not allowed in class names.";
+ }
+
+ // null means, that the value is valid
+ return null;
+ }
+
+ @Override
+ public void setValue(String value, IDirectEditingContext context)
+ {
+ // set the new name for the AClass
+ PictogramElement pe = context.getPictogramElement();
+ AClass AClass = (AClass)getBusinessObjectForPictogramElement(pe);
+ AClass.setName(value);
+
+ // Explicitly update the shape to display the new value in the diagram
+ // Note, that this might not be necessary in future versions of Graphiti
+ // (currently in discussion)
+
+ // we know, that pe is the Shape of the Text, so its container is the
+ // main shape of the AClass
+ updatePictogramElement(((Shape)pe).getContainer());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcorePasteAClassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcorePasteAClassFeature.java
new file mode 100644
index 0000000000..fd685a0aee
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcorePasteAClassFeature.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IPasteContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.ui.features.AbstractPasteFeature;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcorePasteAClassFeature extends AbstractPasteFeature
+{
+
+ public AcorePasteAClassFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ public boolean canPaste(IPasteContext context)
+ {
+ // only support pasting directly in the diagram (nothing else selected)
+ PictogramElement[] pes = context.getPictogramElements();
+ if (pes.length != 1 || !(pes[0] instanceof Diagram))
+ {
+ return false;
+ }
+
+ // can paste, if all objects on the clipboard are AClasses
+ Object[] fromClipboard = getFromClipboard();
+ if (fromClipboard == null || fromClipboard.length == 0)
+ {
+ return false;
+ }
+ for (Object object : fromClipboard)
+ {
+ if (!(object instanceof AClass))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public void paste(IPasteContext context)
+ {
+ // we already verified, that we paste directly in the diagram
+ PictogramElement[] pes = context.getPictogramElements();
+ Diagram diagram = (Diagram)pes[0];
+ // get the AClasses from the clipboard without copying them
+ // (only copy the pictogram element, not the business object)
+ // then create new pictogram elements using the add feature
+ Object[] objects = getFromClipboard();
+ for (Object object : objects)
+ {
+ AddContext ac = new AddContext();
+ ac.setLocation(0, 0); // for simplicity paste at (0, 0)
+ ac.setTargetContainer(diagram);
+ addGraphicalRepresentation(ac, object);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreReconnectionFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreReconnectionFeature.java
new file mode 100644
index 0000000000..bd47dd6453
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreReconnectionFeature.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IReconnectionContext;
+import org.eclipse.graphiti.features.impl.DefaultReconnectionFeature;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreReconnectionFeature extends DefaultReconnectionFeature
+{
+ public AcoreReconnectionFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public boolean canReconnect(IReconnectionContext context)
+ {
+ // do not allow to reconnect
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreRenameAClassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreRenameAClassFeature.java
new file mode 100644
index 0000000000..58bff474f5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreRenameAClassFeature.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.examples.common.ExampleUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreRenameAClassFeature extends AbstractCustomFeature
+{
+
+ private boolean hasDoneChanges = false;
+
+ public AcoreRenameAClassFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ @Override
+ public String getName()
+ {
+ return "Rename AClass";
+ }
+
+ @Override
+ public String getDescription()
+ {
+ return "Change the name of the AClass";
+ }
+
+ @Override
+ public boolean canExecute(ICustomContext context)
+ {
+ // allow rename if exactly one pictogram element
+ // representing a AClass is selected
+ boolean ret = false;
+ PictogramElement[] pes = context.getPictogramElements();
+ if (pes != null && pes.length == 1)
+ {
+ Object bo = getBusinessObjectForPictogramElement(pes[0]);
+ if (bo instanceof AClass)
+ {
+ ret = true;
+ }
+ }
+ return ret;
+ }
+
+ public void execute(ICustomContext context)
+ {
+ PictogramElement[] pes = context.getPictogramElements();
+ if (pes != null && pes.length == 1)
+ {
+ Object bo = getBusinessObjectForPictogramElement(pes[0]);
+ if (bo instanceof AClass)
+ {
+ AClass AClass = (AClass)bo;
+ String currentName = AClass.getName();
+ // ask user for a new class name
+ String newName = ExampleUtil.askString(getName(), getDescription(), currentName);
+ if (newName != null && !newName.equals(currentName))
+ {
+ hasDoneChanges = true;
+ AClass.setName(newName);
+ updatePictogramElement(pes[0]);
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean hasDoneChanges()
+ {
+ return hasDoneChanges;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreUpdateAClassFeature.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreUpdateAClassFeature.java
new file mode 100644
index 0000000000..47a14904c9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/features/AcoreUpdateAClassFeature.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.features;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.Text;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreUpdateAClassFeature extends AbstractUpdateFeature
+{
+
+ public AcoreUpdateAClassFeature(IFeatureProvider fp)
+ {
+ super(fp);
+ }
+
+ public boolean canUpdate(IUpdateContext context)
+ {
+ // return true, if linked business object is a AClass
+ Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
+ return bo instanceof AClass;
+ }
+
+ public IReason updateNeeded(IUpdateContext context)
+ {
+ // retrieve name from pictogram model
+ String pictogramName = null;
+ PictogramElement pictogramElement = context.getPictogramElement();
+ if (pictogramElement instanceof ContainerShape)
+ {
+ ContainerShape cs = (ContainerShape)pictogramElement;
+ for (Shape shape : cs.getChildren())
+ {
+ if (shape.getGraphicsAlgorithm() instanceof Text)
+ {
+ Text text = (Text)shape.getGraphicsAlgorithm();
+ pictogramName = text.getValue();
+ }
+ }
+ }
+
+ // retrieve name from business model
+ String businessName = null;
+ Object bo = getBusinessObjectForPictogramElement(pictogramElement);
+ if (bo instanceof AClass)
+ {
+ AClass AClass = (AClass)bo;
+ businessName = AClass.getName();
+ }
+
+ // update needed, if names are different
+ boolean updateNameNeeded = pictogramName == null && businessName != null || pictogramName != null
+ && !pictogramName.equals(businessName);
+ if (updateNameNeeded)
+ {
+ return Reason.createTrueReason("Name is out of date");
+ }
+ else
+ {
+ return Reason.createFalseReason();
+ }
+ }
+
+ public boolean update(IUpdateContext context)
+ {
+ // retrieve name from business model
+ String businessName = null;
+ PictogramElement pictogramElement = context.getPictogramElement();
+ Object bo = getBusinessObjectForPictogramElement(pictogramElement);
+ if (bo instanceof AClass)
+ {
+ AClass AClass = (AClass)bo;
+ businessName = AClass.getName();
+ }
+
+ // Set name in pictogram model
+ if (pictogramElement instanceof ContainerShape)
+ {
+ ContainerShape cs = (ContainerShape)pictogramElement;
+ for (Shape shape : cs.getChildren())
+ {
+ if (shape.getGraphicsAlgorithm() instanceof Text)
+ {
+ Text text = (Text)shape.getGraphicsAlgorithm();
+ text.setValue(businessName);
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreGraphitiContextUtil.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreGraphitiContextUtil.java
new file mode 100644
index 0000000000..8b5fbd7054
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreGraphitiContextUtil.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreGraphitiContextUtil
+{
+ public static String CONNECTTION_TYPE = "ConnectionType";
+
+ public enum ConnectionType
+ {
+ SUBCLASSES, IMPLEMENTATIONS, AGGREGATIONS, COMPOSITIONS, ASSOCIATIONS
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreImageProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreImageProvider.java
new file mode 100644
index 0000000000..56c8940a57
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.graphiti/src/org/eclipse/emf/cdo/dawn/examples/acore/graphiti/util/AcoreImageProvider.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.graphiti.util;
+
+import org.eclipse.graphiti.ui.platform.AbstractImageProvider;
+
+/**
+ * @author Martin Fluegge
+ */
+public class AcoreImageProvider extends AbstractImageProvider
+{
+ protected static final String PREFIX = "org.eclipse.graphiti.examples.tutorial."; //$NON-NLS-1$
+
+ public static final String IMG_EREFERENCE = PREFIX + "ereference"; //$NON-NLS-1$
+
+ @Override
+ protected void addAvailableImages()
+ {
+ addImageFilePath(IMG_EREFERENCE, "icons/ereference.gif"); //$NON-NLS-1$
+ }
+}

Back to the top