Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/.settings/org.eclipse.jdt.ui.prefs240
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/about.properties62
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/build.properties2
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/copyright.txt14
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/model/DawnCodeGen.gmf.genmodel2
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.properties118
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.xml13
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGMFGenerator.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelFactory.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelPackage.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGMFGeneratorImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelFactoryImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelPackageImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelAdapterFactory.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/Activator.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/util/DawnGMFWorkflowUtil.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt2092
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/workflow/gmfFragmentGenerator.mwe200
19 files changed, 1391 insertions, 1388 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/.settings/org.eclipse.jdt.ui.prefs
index 1c6d0e8a2d..9720d04dde 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/.settings/org.eclipse.jdt.ui.prefs
@@ -1,120 +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
+#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 - 2012 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.codegen.dawngenmodel.gmf/about.properties b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/about.properties
index 35c03d7af5..80b6447bdd 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/about.properties
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/about.properties
@@ -1,31 +1,31 @@
-# 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
-
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-featureName = CDO Dawn Codegen GMF
-featureText = CDO Dawn Codegen GMF\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\
-\n\
-Visit http://www.eclipse.org/cdo
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
+# Copyright (c) 2004 - 2012 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
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+featureName = CDO Dawn Codegen GMF
+featureText = CDO Dawn Codegen GMF\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/cdo
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/build.properties b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/build.properties
index beceac9aeb..7beadf69b2 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/build.properties
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/build.properties
@@ -1,4 +1,4 @@
-# Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+# Copyright (c) 2004 - 2012 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
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/copyright.txt b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/copyright.txt
index a5ec07f141..9cbb3ba084 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/copyright.txt
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/copyright.txt
@@ -1,8 +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:
+Copyright (c) 2004 - 2012 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.codegen.dawngenmodel.gmf/model/DawnCodeGen.gmf.genmodel b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/model/DawnCodeGen.gmf.genmodel
index b5a790596b..03eafa7ea9 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/model/DawnCodeGen.gmf.genmodel
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/model/DawnCodeGen.gmf.genmodel
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Martin Fluegge - initial API and implementation"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
modelDirectory="/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen" editorDirectory="/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.ui/src-gen"
modelPluginID="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf" modelName="DawnCodeGen"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" editorPluginID="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.ui"
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.properties b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.properties
index 85e6db3c05..8934593744 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.properties
@@ -1,59 +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
-
-pluginName = CDO Dawn Codegen GenModel GMF
-providerName = Eclipse Modeling Project
-
-_UI_DawngenmodelEditor_menu = Dawn genmodel Editor
-
-_UI_CreateChild_menu_item = &New Child
-_UI_CreateSibling_menu_item = N&ew Sibling
-
-_UI_ShowPropertiesView_menu_item = Show &Properties View
-_UI_RefreshViewer_menu_item = &Refresh
-
-_UI_SelectionPage_label = Selection
-_UI_ParentPage_label = Parent
-_UI_ListPage_label = List
-_UI_TreePage_label = Tree
-_UI_TablePage_label = Table
-_UI_TreeWithColumnsPage_label = Tree with Columns
-_UI_ObjectColumn_label = Object
-_UI_SelfColumn_label = Self
-
-_UI_NoObjectSelected = Selected Nothing
-_UI_SingleObjectSelected = Selected Object: {0}
-_UI_MultiObjectSelected = Selected {0} Objects
-
-_UI_OpenEditorError_label = Open Editor
-
-_UI_Wizard_category = Example EMF Model Creation Wizards
-
-_UI_CreateModelError_message = Problems encountered in file "{0}"
-
-_UI_DawngenmodelModelWizard_label = Dawngenmodel Model
-_UI_DawngenmodelModelWizard_description = Create a new Dawngenmodel model
-
-_UI_DawngenmodelEditor_label = Dawngenmodel Model Editor
-
-_UI_DawngenmodelEditorFilenameDefaultBase = My
-_UI_DawngenmodelEditorFilenameExtensions = dawngenmodel
-
-_UI_Wizard_label = New
-
-_WARN_FilenameExtension = The file name must end in ''.{0}''
-_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
-
-_UI_ModelObject = &Model Object
-_UI_XMLEncoding = &XML Encoding
-_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
-_UI_Wizard_initial_object_description = Select a model object to create
-
-_UI_FileConflict_label = File Conflict
-_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+# Copyright (c) 2004 - 2012 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 Codegen GenModel GMF
+providerName = Eclipse Modeling Project
+
+_UI_DawngenmodelEditor_menu = Dawn genmodel Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_DawngenmodelModelWizard_label = Dawngenmodel Model
+_UI_DawngenmodelModelWizard_description = Create a new Dawngenmodel model
+
+_UI_DawngenmodelEditor_label = Dawngenmodel Model Editor
+
+_UI_DawngenmodelEditorFilenameDefaultBase = My
+_UI_DawngenmodelEditorFilenameExtensions = dawngenmodel
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.xml b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.xml
index e5e6f471b9..e6ec86d8cc 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/plugin.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
+<?eclipse version="3.4"?>
<!--
- <copyright>
- </copyright>
+ Copyright (c) 2004 - 2012 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
- $Id$
+ Contributors:
+ Eike Stepper - initial API and implementation
-->
<plugin>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGMFGenerator.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGMFGenerator.java
index f0e28f778a..bbe6d21ce0 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGMFGenerator.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGMFGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -62,7 +62,7 @@ public interface DawnGMFGenerator extends DawnFragmentGenerator
*
* @generated
*/
- String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* Returns the value of the '<em><b>Dawn Document Provider Class Name</b></em>' attribute. <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelFactory.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelFactory.java
index 1c569bdb78..651c406478 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelFactory.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -27,7 +27,7 @@ public interface DawnGmfGenmodelFactory extends EFactory
*
* @generated
*/
- String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelPackage.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelPackage.java
index 00279df302..191b4923ac 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelPackage.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/DawnGmfGenmodelPackage.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -39,7 +39,7 @@ public interface DawnGmfGenmodelPackage extends EPackage
*
* @generated
*/
- String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGMFGeneratorImpl.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGMFGeneratorImpl.java
index 75866d11da..4360a97639 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGMFGeneratorImpl.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGMFGeneratorImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -67,7 +67,7 @@ public class DawnGMFGeneratorImpl extends DawnFragmentGeneratorImpl implements D
*
* @generated
*/
- public static final String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* The default value of the '{@link #getDawnDocumentProviderClassName() <em>Dawn Document Provider Class Name</em>}'
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelFactoryImpl.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelFactoryImpl.java
index 2630186e1e..898d784ac0 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelFactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -33,7 +33,7 @@ public class DawnGmfGenmodelFactoryImpl extends EFactoryImpl implements DawnGmfG
*
* @generated
*/
- public static final String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelPackageImpl.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelPackageImpl.java
index 6962e165fd..6cd0ce4170 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/impl/DawnGmfGenmodelPackageImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -37,7 +37,7 @@ public class DawnGmfGenmodelPackageImpl extends EPackageImpl implements DawnGmfG
*
* @generated
*/
- public static final String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelAdapterFactory.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelAdapterFactory.java
index 09d2bd3988..116dada1ff 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelAdapterFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -34,7 +34,7 @@ public class DawnGmfGenmodelAdapterFactory extends AdapterFactoryImpl
*
* @generated
*/
- public static final String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java
index 223440f15a..14ac9bce1c 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
@@ -35,7 +35,7 @@ public class DawnGmfGenmodelSwitch<T>
*
* @generated
*/
- public static final String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
+ public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Martin Fluegge - initial API and implementation";
/**
* The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/Activator.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/Activator.java
index 57a9b3df2d..1267305c12 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/Activator.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/Activator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/util/DawnGMFWorkflowUtil.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/util/DawnGMFWorkflowUtil.java
index f00ec03838..e76738f5d3 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/util/DawnGMFWorkflowUtil.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/util/DawnGMFWorkflowUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2012 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
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt
index 0f37e4caa4..e26f678e54 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt
@@ -1,1046 +1,1046 @@
-«REM»
- 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
-
-«ENDREM»
-
-«IMPORT gmfgen»
-«IMPORT gmfgraph»
-«IMPORT emf»
-«IMPORT genmodel»
-«IMPORT ecore»
-«IMPORT dawngenmodel»
-«IMPORT dawnGmfGenmodel»
-
-«EXTENSION org::eclipse::emf::cdo::dawn::codegen::util::Utils»
-
-«DEFINE main FOR DawnGMFGenerator»
- «setDiagramPackage(this.GMFGenEditorGenerator.packageNamePrefix)»
-
- «EXPAND dawnEditor FOR this»
- «EXPAND dawnEditPart FOR this»
- «EXPAND dawnEditPartFactory FOR this»
- «EXPAND dawnCanonicalEditingPolicy FOR this»
- «EXPAND dawnCreationWizard FOR this»
- «EXPAND dawnEditorUtil FOR this»
- «EXPAND dawnDocumentProvider FOR this»
- «EXPAND dawnEditPartProvider FOR this»
- «EXPAND fragmentXML FOR this»
- «EXPAND dawnEditPolicyProvider FOR this»
- «EXPAND manifestMF FOR this»
- «EXPAND buildPROPERTIES FOR this.GMFGenEditorGenerator»
- «EXPAND classpath FOR this.GMFGenEditorGenerator»
-
-«ENDDEFINE»
-
-«REM»############################################ Extended Editor ##################################################################«ENDREM»
-«DEFINE dawnEditor FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorClassName+".java"»
-
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
-import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport;
-import org.eclipse.emf.cdo.dawn.gmf.editors.impl.DawnGMFEditorSupport;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.ui.CDOEditorInput;
-import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.net4j.util.transaction.TransactionException;
-
-import org.eclipse.emf.common.ui.URIEditorInput;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditorClassName» extends «GMFGenEditorGenerator.editor.className» implements IDawnEditor
-{
- public static String ID = "«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»";
-
- private IDawnEditorSupport dawnEditorSupport;
-
- «EXPAND generatedComment -»
- public «this.dawnEditorClassName» ()
- {
- super();
- setDocumentProvider(new «this.dawnDocumentProviderClassName»());
- setDawnEditorSupport(new DawnGMFEditorSupport(this));
- }
-
- «EXPAND generatedComment -»
- @Override
- public void setInput(IEditorInput input)
- {
- try
- {
- doSetInput(input, true);
- }
- catch (CoreException x)
- {
- x.printStackTrace(System.err);
- String title = x.getMessage();
- String msg = x.getMessage();
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
-
- dawnEditorSupport.setView(((DawnEditorInput)input).getView());
- }
-
- «EXPAND generatedComment -»
- @Override
- protected void initializeGraphicalViewer()
- {
- super.initializeGraphicalViewer();
- dawnEditorSupport.registerListeners();
- }
-
- «EXPAND generatedComment -»
- @Override
- public void doSave(IProgressMonitor monitor)
- {
- try
- {
- dawnEditorSupport.setDirty(false);
- updateState(getEditorInput());
- validateState(getEditorInput());
- performSave(false, monitor);
- }
- catch (TransactionException e)
- {
- if (e.getMessage().contains("conflict"))
- {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "conflict",
- "Your Resource is in conflict and cannot be committed");
- }
- else
- {
- throw e;
- }
- }
- }
-
- «EXPAND generatedComment -»
- @Override
- public boolean isDirty()
- {
- return dawnEditorSupport.isDirty();
- }
-
- «EXPAND generatedComment -»
- public String getContributorID()
- {
- return ID;
- }
-
- «EXPAND generatedComment -»
- @Override
- protected void setDocumentProvider(IEditorInput input)
- {
- if (input instanceof IFileEditorInput || input instanceof URIEditorInput || input instanceof CDOEditorInput)
- {
- setDocumentProvider(getDocumentProvider());
- }
- else
- {
- super.setDocumentProvider(input);
- }
- }
-
- «EXPAND generatedComment -»
- @Override
- public void dispose()
- {
- try
- {
- super.dispose();
- }
- finally
- {
- dawnEditorSupport.close();
- }
- }
-
- «EXPAND generatedComment -»
- public CDOView getView()
- {
- return dawnEditorSupport.getView();
- }
-
- «EXPAND generatedComment -»
- public void setDirty()
- {
- dawnEditorSupport.setDirty(true);
- ((AbstractDocumentProvider)getDocumentProvider()).changed(getEditorInput());
- }
-
- public void setDawnEditorSupport(IDawnEditorSupport dawnEditorSupport)
- {
- this.dawnEditorSupport = dawnEditorSupport;
- }
-
- public IDawnEditorSupport getDawnEditorSupport()
- {
- return dawnEditorSupport;
- }
-}
-
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXEditPart ##################################################################«ENDREM»
-«DEFINE dawnEditPart FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnDiagramEditPartClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»;
-
-import org.eclipse.emf.cdo.dawn.gmf.synchronize.DawnConflictHelper;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.notation.View;
-
-«EXPAND generatedComment -»
-public class «this.dawnDiagramEditPartClassName» extends «this.GMFGenEditorGenerator.diagram.editPartClassName»
-{
-
- «EXPAND generatedComment -»
- public «this.dawnDiagramEditPartClassName»(View view)
- {
- super(view);
- }
-
- «EXPAND generatedComment -»
- @Override
- protected void removeChild(EditPart child)
- {
- if (DawnConflictHelper.isConflicted((EObject)child.getModel()))
- {
- return;
- }
- super.removeChild(child);
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXEditPartFactory ##################################################################«ENDREM»
-«DEFINE dawnEditPartFactory FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnEditPartFactoryClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»;
-
-
-import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName»;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.notation.View;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditPartFactoryClassName» extends «this.GMFGenEditorGenerator.diagram.editPartFactoryClassName»
-{
- «EXPAND generatedComment -»
- public «this.dawnEditPartFactoryClassName»()
- {
- super();
- }
-
- «EXPAND generatedComment -»
- @Override
- public EditPart createEditPart(EditPart context, Object model)
- {
- if (model instanceof View)
- {
- View view = (View)model;
- switch («this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName».getVisualID(view))
- {
- case «this.dawnDiagramEditPartClassName».VISUAL_ID:
- return new «this.dawnDiagramEditPartClassName»(view);
- }
- }
-
- return super.createEditPart(context, model);
- }
-}
-
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXCanonicalEditingPolicy ##################################################################«ENDREM»
-«DEFINE dawnCanonicalEditingPolicy FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/edit/policies/"+this.dawnCanonicalEditingPolicyClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName»;
-
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
-import org.eclipse.gmf.runtime.notation.View;
-
-import java.util.ArrayList;
-import java.util.List;
-
-«EXPAND generatedComment -»
-public class «this.dawnCanonicalEditingPolicyClassName» extends «this.GMFGenEditorGenerator.diagram.canonicalEditPolicyClassName»
-{
- «EXPAND generatedComment -»
- public «this.dawnCanonicalEditingPolicyClassName»()
- {
- super();
- }
-
- @Override
- protected CreateViewRequest getCreateViewRequest(List<ViewDescriptor> descriptors)
- {
- List<View> viewChildren = getViewChildren();
-
- List<ViewDescriptor> tbr = new ArrayList<CreateViewRequest.ViewDescriptor>();
-
- for (ViewDescriptor desc : descriptors)
- {
- EObject obj = (EObject)((CanonicalElementAdapter)desc.getElementAdapter()).getRealObject();
-
- boolean found = false;
-
- for (View view : viewChildren)
- {
- if (view.getElement().equals(obj))
- {
- found = true;
- break;
- }
- }
- if (!found)
- {
- tbr.add(desc);
- }
- }
-
- descriptors.removeAll(tbr);
-
- return new CreateViewRequest(descriptors);
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXCreationWizard ##################################################################«ENDREM»
-«DEFINE dawnCreationWizard FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnCreationWizardClassName+".java"»
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
-import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewDiagramResourceWizardPage;
-import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewResourceWizardPage;
-import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import java.lang.reflect.InvocationTargetException;
-
-«EXPAND generatedComment -»
-public class «this.dawnCreationWizardClassName» extends «this.GMFGenEditorGenerator.diagram.creationWizardClassName»
-{
- private CDOView view;
-
- private DawnCreateNewDiagramResourceWizardPage dawnDiagramModelFilePage;
-
- private DawnCreateNewResourceWizardPage dawnDomainModelFilePage;
-
- «EXPAND generatedComment -»
- public «this.dawnCreationWizardClassName»()
- {
- super();
- CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
- PreferenceConstants.getServerName());
- CDOSession session = CDOConnectionUtil.instance.openSession();
- view = CDOConnectionUtil.instance.openView(session);
- }
-
- «EXPAND generatedComment -»
- @Override
- public boolean performFinish()
- {
- IRunnableWithProgress op = new WorkspaceModifyOperation(null)
- {
- @Override
- protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException
- {
- URI diagramResourceURI = dawnDiagramModelFilePage.getURI();
- URI domainModelResourceURI = dawnDomainModelFilePage.getURI();
-
- diagram = «this.dawnEditorUtilClassName».createDiagram(diagramResourceURI, domainModelResourceURI, monitor);
-
- if (isOpenNewlyCreatedDiagramEditor() && diagram != null)
- {
- try
- {
- «this.dawnEditorUtilClassName».openDiagram(diagram);
- }
- catch (PartInitException e)
- {
- ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»OpenEditorError, null,
- e.getStatus());
- }
- }
- }
- };
- try
- {
- getContainer().run(false, true, op);
- }
- catch (InterruptedException e)
- {
- return false;
- }
- catch (InvocationTargetException e)
- {
- if (e.getTargetException() instanceof CoreException)
- {
- ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»CreationError, null,
- ((CoreException)e.getTargetException()).getStatus());
- }
- else
- {
- «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
- }
- return false;
- }
- return diagram != null;
- }
-
- «EXPAND generatedComment -»
- @Override
- public void addPages()
- {
-
- dawnDiagramModelFilePage = new DawnCreateNewDiagramResourceWizardPage("«this.GMFGenEditorGenerator.diagramFileExtension»", false, view);
- dawnDiagramModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageTitle);
- dawnDiagramModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageDescription);
- dawnDiagramModelFilePage.setCreateAutomaticResourceName(true);
- addPage(dawnDiagramModelFilePage);
-
- dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("«this.GMFGenEditorGenerator.domainFileExtension»", true, view)
- {
- @Override
- public void setVisible(boolean visible)
- {
- if (visible)
- {
- URI uri = dawnDiagramModelFilePage.getURI();
- String fileName = uri.lastSegment();
- fileName = fileName.substring(0, fileName.length() - ".«this.GMFGenEditorGenerator.diagramFileExtension»".length()); //$NON-NLS-1$
- fileName += ".«this.GMFGenEditorGenerator.domainFileExtension»";
- dawnDomainModelFilePage.setResourceNamePrefix(fileName);
- dawnDomainModelFilePage.setResourcePath(dawnDiagramModelFilePage.getResourcePath());
- }
- super.setVisible(visible);
- }
- };
- dawnDomainModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageTitle);
- dawnDomainModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageDescription);
-
- dawnDomainModelFilePage.setResourceValidationType(DawnCreateNewResourceWizardPage.VALIDATION_WARN);
- addPage(dawnDomainModelFilePage);
- }
-
- «EXPAND generatedComment -»
- @Override
- public void dispose()
- {
- view.close();
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXEditorUtil ##################################################################«ENDREM»
-«DEFINE dawnEditorUtil FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorUtilClassName+".java"»
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.commands.CreateSemanticResourceRecordingCommand;
-import «this.GMFGenEditorGenerator.diagram.domainDiagramElement.genPackage.basePackage».«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.ePackage.name».«this.GMFGenEditorGenerator.domainGenModel.modelName»Factory;
-
-
-import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnDiagramEditPartClassName»;
-import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
-import org.eclipse.emf.cdo.dawn.transaction.DawnGMFEditingDomainFactory;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-import java.io.IOException;
-import java.util.Collections;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditorUtilClassName» extends «this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»
-{
-
- «EXPAND generatedComment -»
- public static boolean openDiagram(Resource diagram) throws PartInitException
- {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- return null != page.openEditor(new DawnEditorInput(diagram.getURI()), «this.dawnEditorClassName».ID);
- }
-
- «EXPAND generatedComment -»
- public static void runWizard(Shell shell, Wizard wizard, String settingsKey)
- {
- IDialogSettings pluginDialogSettings = «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().getDialogSettings();
- IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey);
- if (wizardDialogSettings == null)
- {
- wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
- }
- wizard.setDialogSettings(wizardDialogSettings);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
- dialog.open();
- }
-
- «EXPAND generatedComment -»
- public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor)
- {
- TransactionalEditingDomain editingDomain = DawnGMFEditingDomainFactory.getInstance().createEditingDomain();
-
- progressMonitor.beginTask(Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramProgressTask, 3);
-
- CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
- PreferenceConstants.getServerName());
- CDOConnectionUtil.instance.openSession();
- ResourceSet resourceSet = editingDomain.getResourceSet();
-
- CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, diagramURI.toString());
-
- final Resource diagramResource = resourceSet.createResource(diagramURI);
-
-
- CreateSemanticResourceRecordingCommand createSemanticResourceCommand = new CreateSemanticResourceRecordingCommand(
- editingDomain, transaction, modelURI.path());
-
- editingDomain.getCommandStack().execute(createSemanticResourceCommand);
- final Resource modelResource = createSemanticResourceCommand.getResource();
-
- final String diagramName = diagramURI.lastSegment();
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,
- Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramCommandLabel, Collections.EMPTY_LIST)
- {
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
- {
- EObject model = null;
- if (modelResource.getContents().size() > 0)
- {
- model = modelResource.getContents().get(0);
- }
- else
- {
- model = createInitialModel();
- attachModelToResource(model, modelResource);
- }
-
- Diagram diagram = ViewService.createDiagram(model, «this.dawnDiagramEditPartClassName».MODEL_ID,
- «this.GMFGenEditorGenerator.plugin.activatorClassName».DIAGRAM_PREFERENCES_HINT);
- if (diagram != null)
- {
- diagramResource.getContents().add(diagram);
- diagram.setName(diagramName);
- diagram.setElement(model);
- }
-
- try
- {
- modelResource.save(Collections.EMPTY_MAP);
- diagramResource.save(Collections.EMPTY_MAP);
- }
- catch (IOException e)
- {
- «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
- }
-
- return CommandResult.newOKCommandResult();
- }
- };
- try
- {
- OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
- }
- catch (ExecutionException e)
- {
- «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
- }
- setCharset(WorkspaceSynchronizer.getFile(modelResource));
- setCharset(WorkspaceSynchronizer.getFile(diagramResource));
- return diagramResource;
- }
-
- «EXPAND generatedComment -»
- private static EObject createInitialModel()
- {
- return «this.GMFGenEditorGenerator.domainGenModel.modelName»Factory.eINSTANCE.create«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.name»();
- }
-
- «EXPAND generatedComment -»
- private static void attachModelToResource(EObject model, Resource resource)
- {
- resource.getContents().add(model);
- }
-}
-
-
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXDocumentProvider ##################################################################«ENDREM»
-«DEFINE dawnDocumentProvider FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnDocumentProviderClassName+".java"»
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.transaction.DawnDiagramEditingDomainFactory;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
-import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-«EXPAND generatedComment -»
-public class «this.dawnDocumentProviderClassName» extends «this.GMFGenEditorGenerator.diagram.documentProviderClassName»
-{
-
- «EXPAND generatedComment -»
- public «this.dawnDocumentProviderClassName» ()
- {
- super();
- }
-
- «EXPAND generatedComment -»
- @Override
- protected IDocument createEmptyDocument()
- {
- DiagramDocument document = new DiagramDocument();
- document.setEditingDomain(createEditingDomain());
- return document;
- }
-
- «EXPAND generatedComment -»
- private TransactionalEditingDomain createEditingDomain()
- {
- TransactionalEditingDomain editingDomain = DawnDiagramEditingDomainFactory.getInstance().createEditingDomain();
-
- editingDomain.setID("«this.GMFGenEditorGenerator.diagram.editingDomainID»"); //$NON-NLS-1$
- final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter(
- editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD)).and(
- NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES));
- editingDomain.getResourceSet().eAdapters().add(new Adapter()
- {
- private Notifier myTarger;
-
- public Notifier getTarget()
- {
- return myTarger;
- }
-
- public boolean isAdapterForType(Object type)
- {
- return false;
- }
-
- public void notifyChanged(Notification notification)
- {
- if (diagramResourceModifiedFilter.matches(notification))
- {
- Object value = notification.getNewValue();
- if (value instanceof Resource)
- {
- ((Resource)value).setTrackingModification(true);
- }
- }
- }
-
- public void setTarget(Notifier newTarget)
- {
- myTarger = newTarget;
- }
- });
-
- return editingDomain;
- }
-
-
- «EXPAND generatedComment -»
- @Override
- protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException
- {
- IDiagramDocument diagramDocument = (IDiagramDocument)document;
- TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
- if (element instanceof FileEditorInput)
- {
- IStorage storage = ((FileEditorInput)element).getStorage();
- Diagram diagram = DiagramIOUtil.load(domain, storage, true, getProgressMonitor());
- document.setContent(diagram);
- }
- else if (element instanceof URIEditorInput)
- {
- URIEditorInput editorInput = (URIEditorInput)element;
-
- URI uri = editorInput.getURI();
- Resource resource = null;
- try
- {
- URI dawnURI = URI.createURI(uri.toString().replace("cdo", "dawn"));
- resource = domain.getResourceSet().getResource(dawnURI, false);
- if (resource == null)
- {
- resource = domain.getResourceSet().getResource(dawnURI, true);
- }
-
- if (editorInput instanceof DawnEditorInput)
- {
- ((DawnEditorInput)editorInput).setResource((CDOResource)resource);
- }
- if (!resource.isLoaded())
- {
- try
- {
- Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
- resource.load(options);
- }
- catch (IOException e)
- {
- resource.unload();
- throw e;
- }
- }
- if (uri.fragment() != null)
- {
- EObject rootElement = resource.getEObject(uri.fragment());
- if (rootElement instanceof Diagram)
- {
- Diagram diagram = (Diagram)rootElement;
- DawnDiagramUpdater.initializeElement(diagram);
- document.setContent(diagram);
-
- return;
- }
- }
- else
- {
- for (Iterator<?> it = resource.getContents().iterator(); it.hasNext();)
- {
- Object rootElement = it.next();
- if (rootElement instanceof Diagram)
- {
- Diagram diagram = (Diagram)rootElement;
- DawnDiagramUpdater.initializeElement(diagram);
- document.setContent(diagram);
-
- return;
- }
- }
- }
- throw new RuntimeException(Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_NoDiagramInResourceError);
- }
- catch (Exception e)
- {
- CoreException thrownExcp = null;
- if (e instanceof CoreException)
- {
- thrownExcp = (CoreException)e;
- }
- else
- {
- String msg = e.getLocalizedMessage();
- thrownExcp = new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0,
- msg != null ? msg : Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_DiagramLoadingError, e));
- }
- throw thrownExcp;
- }
- }
- else
- {
- throw new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0, NLS.bind(
- Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_IncorrectInputError, new Object[] { element,
- "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- }
-
- «EXPAND generatedComment -»
- @Override
- public void changed(Object element)
- {
- if (element instanceof IEditorInput)
- {
- fireElementDirtyStateChanged(element, true);
- }
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXEditPartProvider ##################################################################«ENDREM»
-«DEFINE dawnEditPartProvider FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/providers/"+this.dawnEditPartProviderClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.providersPackageName»;
-
-import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnEditPartFactoryClassName»;
-import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditPartProviderClassName» extends «this.GMFGenEditorGenerator.diagram.editPartProviderClassName»
-{
-
- «EXPAND generatedComment -»
- public «this.dawnEditPartProviderClassName»()
- {
- super();
- setFactory(new «this.dawnEditPartFactoryClassName»());
- }
-}
-
-
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXEditPolicyProvider ##################################################################«ENDREM»
-«DEFINE dawnEditPolicyProvider FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/providers/"+dawnEditPolicyProviderClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.providersPackageName»;
-
-import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.GMFGenEditorGenerator.diagram.editPartClassName»;
-import «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName».«this.dawnCanonicalEditingPolicyClassName»;
-import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-
-«EXPAND generatedComment -»
-public class «dawnEditPolicyProviderClassName» extends AbstractProvider implements IEditPolicyProvider
-{
- public static String ID = "«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»";
-
- «EXPAND generatedComment -»
- public boolean provides(IOperation operation)
- {
- if (operation instanceof CreateEditPoliciesOperation)
- {
- CreateEditPoliciesOperation editPoliciesOperation = (CreateEditPoliciesOperation)operation;
- if (editPoliciesOperation.getEditPart() instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName»)
- {
- return true;
- }
- }
- return false;
- }
-
- «EXPAND generatedComment -»
- public void createEditPolicies(EditPart editPart)
- {
- if (editPart instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName»)
- {
- editPart.installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new «this.dawnCanonicalEditingPolicyClassName»());
- }
- }
-}
-
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»########################################## fragment.xml ####################################################################«ENDREM»
-«DEFINE fragmentXML FOR DawnGMFGenerator»
-«FILE "fragment.xml"»<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<fragment>
-<extension
- point="org.eclipse.ui.editors">
- <editor
-
- class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»"
- contributorClass="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.editor.actionBarContributorClassName»"
- default="true"
- extensions="«this.GMFGenEditorGenerator.diagramFileExtension»"
- icon="«this.GMFGenEditorGenerator.editor.iconPath»"
- id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»"
- matchingStrategy="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.matchingStrategyClassName»"
- name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.newWizards">
- <wizard
- category="org.eclipse.ui.Examples"
- class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»"
- icon="«this.GMFGenEditorGenerator.editor.iconPath»"
- id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»"
- name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram">
- <description>
- description body text
- </description>
- </wizard>
-
- </extension>
- <extension
- point="org.eclipse.gmf.runtime.diagram.ui.resources.editor.documentProviders">
- <provider
- class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»"
- documentType="org.eclipse.gmf.runtime.diagram.ui.editor.IDocument"
- id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»"
- inputTypes="org.eclipse.emf.common.ui.URIEditorInput">
- </provider>
- </extension>
- <extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»">
- <Priority
- name="Low">
- </Priority>
- </editpolicyProvider>
- </extension>
- <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPartProviderClassName»">
- <Priority name="Medium"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="«this.GMFGenEditorGenerator.modelID»"/>
- </object>
- <context views="generated-diagram"/>
- </editpartProvider>
- </extension>
-</fragment>
-
-«ENDFILE»
-«ENDDEFINE»
-
-
-
-«REM»##############################################################################################################«ENDREM»
-«DEFINE manifestMF FOR DawnGMFGenerator»
-«FILE "META-INF/MANIFEST.MF"»Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Dawn «this.GMFGenEditorGenerator.plugin.name»
-Bundle-SymbolicName: «this.fragmentName»;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Fragment-Host: «this.GMFGenEditorGenerator.plugin.iD»;bundle-version="0.2.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.dawn.util;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.ui;bundle-version="[3.0.0,5.0.0)",
- org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.dawn.gmf;bundle-version="[2.0.0,3.0.0)"
-«ENDFILE»
-«ENDDEFINE»
-
-
-«DEFINE buildPROPERTIES FOR GenEditorGenerator»
-«FILE "build.properties"»source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- fragment.xml
-«ENDFILE»
-«ENDDEFINE»
-«REM»################################### . classpath ###########################################################################«ENDREM»
-
-«DEFINE classpath FOR GenEditorGenerator»
-«FILE ".classpath"»<?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>
-«ENDFILE»
-«ENDDEFINE»
-
-«DEFINE generatedComment FOR Object-»
-«REM»/**
- *@generated
- */«ENDREM»
- «ENDDEFINE»
-
+«REM»
+ Copyright (c) 2004 - 2012 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
+
+«ENDREM»
+
+«IMPORT gmfgen»
+«IMPORT gmfgraph»
+«IMPORT emf»
+«IMPORT genmodel»
+«IMPORT ecore»
+«IMPORT dawngenmodel»
+«IMPORT dawnGmfGenmodel»
+
+«EXTENSION org::eclipse::emf::cdo::dawn::codegen::util::Utils»
+
+«DEFINE main FOR DawnGMFGenerator»
+ «setDiagramPackage(this.GMFGenEditorGenerator.packageNamePrefix)»
+
+ «EXPAND dawnEditor FOR this»
+ «EXPAND dawnEditPart FOR this»
+ «EXPAND dawnEditPartFactory FOR this»
+ «EXPAND dawnCanonicalEditingPolicy FOR this»
+ «EXPAND dawnCreationWizard FOR this»
+ «EXPAND dawnEditorUtil FOR this»
+ «EXPAND dawnDocumentProvider FOR this»
+ «EXPAND dawnEditPartProvider FOR this»
+ «EXPAND fragmentXML FOR this»
+ «EXPAND dawnEditPolicyProvider FOR this»
+ «EXPAND manifestMF FOR this»
+ «EXPAND buildPROPERTIES FOR this.GMFGenEditorGenerator»
+ «EXPAND classpath FOR this.GMFGenEditorGenerator»
+
+«ENDDEFINE»
+
+«REM»############################################ Extended Editor ##################################################################«ENDREM»
+«DEFINE dawnEditor FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorClassName+".java"»
+
+package «this.GMFGenEditorGenerator.editor.packageName»;
+
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport;
+import org.eclipse.emf.cdo.dawn.gmf.editors.impl.DawnGMFEditorSupport;
+import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
+import org.eclipse.emf.cdo.ui.CDOEditorInput;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.net4j.util.transaction.TransactionException;
+
+import org.eclipse.emf.common.ui.URIEditorInput;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+
+«EXPAND generatedComment -»
+public class «this.dawnEditorClassName» extends «GMFGenEditorGenerator.editor.className» implements IDawnEditor
+{
+ public static String ID = "«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»";
+
+ private IDawnEditorSupport dawnEditorSupport;
+
+ «EXPAND generatedComment -»
+ public «this.dawnEditorClassName» ()
+ {
+ super();
+ setDocumentProvider(new «this.dawnDocumentProviderClassName»());
+ setDawnEditorSupport(new DawnGMFEditorSupport(this));
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public void setInput(IEditorInput input)
+ {
+ try
+ {
+ doSetInput(input, true);
+ }
+ catch (CoreException x)
+ {
+ x.printStackTrace(System.err);
+ String title = x.getMessage();
+ String msg = x.getMessage();
+ Shell shell = getSite().getShell();
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
+ }
+
+ dawnEditorSupport.setView(((DawnEditorInput)input).getView());
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ protected void initializeGraphicalViewer()
+ {
+ super.initializeGraphicalViewer();
+ dawnEditorSupport.registerListeners();
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public void doSave(IProgressMonitor monitor)
+ {
+ try
+ {
+ dawnEditorSupport.setDirty(false);
+ updateState(getEditorInput());
+ validateState(getEditorInput());
+ performSave(false, monitor);
+ }
+ catch (TransactionException e)
+ {
+ if (e.getMessage().contains("conflict"))
+ {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), "conflict",
+ "Your Resource is in conflict and cannot be committed");
+ }
+ else
+ {
+ throw e;
+ }
+ }
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public boolean isDirty()
+ {
+ return dawnEditorSupport.isDirty();
+ }
+
+ «EXPAND generatedComment -»
+ public String getContributorID()
+ {
+ return ID;
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ protected void setDocumentProvider(IEditorInput input)
+ {
+ if (input instanceof IFileEditorInput || input instanceof URIEditorInput || input instanceof CDOEditorInput)
+ {
+ setDocumentProvider(getDocumentProvider());
+ }
+ else
+ {
+ super.setDocumentProvider(input);
+ }
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public void dispose()
+ {
+ try
+ {
+ super.dispose();
+ }
+ finally
+ {
+ dawnEditorSupport.close();
+ }
+ }
+
+ «EXPAND generatedComment -»
+ public CDOView getView()
+ {
+ return dawnEditorSupport.getView();
+ }
+
+ «EXPAND generatedComment -»
+ public void setDirty()
+ {
+ dawnEditorSupport.setDirty(true);
+ ((AbstractDocumentProvider)getDocumentProvider()).changed(getEditorInput());
+ }
+
+ public void setDawnEditorSupport(IDawnEditorSupport dawnEditorSupport)
+ {
+ this.dawnEditorSupport = dawnEditorSupport;
+ }
+
+ public IDawnEditorSupport getDawnEditorSupport()
+ {
+ return dawnEditorSupport;
+ }
+}
+
+«ENDFILE»
+«ENDDEFINE»
+
+
+«REM»############################################ DawnXXXEditPart ##################################################################«ENDREM»
+«DEFINE dawnEditPart FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnDiagramEditPartClassName+".java"»
+package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»;
+
+import org.eclipse.emf.cdo.dawn.gmf.synchronize.DawnConflictHelper;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+
+«EXPAND generatedComment -»
+public class «this.dawnDiagramEditPartClassName» extends «this.GMFGenEditorGenerator.diagram.editPartClassName»
+{
+
+ «EXPAND generatedComment -»
+ public «this.dawnDiagramEditPartClassName»(View view)
+ {
+ super(view);
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ protected void removeChild(EditPart child)
+ {
+ if (DawnConflictHelper.isConflicted((EObject)child.getModel()))
+ {
+ return;
+ }
+ super.removeChild(child);
+ }
+}
+«ENDFILE»
+«ENDDEFINE»
+
+
+«REM»############################################ DawnXXXEditPartFactory ##################################################################«ENDREM»
+«DEFINE dawnEditPartFactory FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnEditPartFactoryClassName+".java"»
+package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»;
+
+
+import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName»;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+
+«EXPAND generatedComment -»
+public class «this.dawnEditPartFactoryClassName» extends «this.GMFGenEditorGenerator.diagram.editPartFactoryClassName»
+{
+ «EXPAND generatedComment -»
+ public «this.dawnEditPartFactoryClassName»()
+ {
+ super();
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public EditPart createEditPart(EditPart context, Object model)
+ {
+ if (model instanceof View)
+ {
+ View view = (View)model;
+ switch («this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName».getVisualID(view))
+ {
+ case «this.dawnDiagramEditPartClassName».VISUAL_ID:
+ return new «this.dawnDiagramEditPartClassName»(view);
+ }
+ }
+
+ return super.createEditPart(context, model);
+ }
+}
+
+«ENDFILE»
+«ENDDEFINE»
+
+
+«REM»############################################ DawnXXXCanonicalEditingPolicy ##################################################################«ENDREM»
+«DEFINE dawnCanonicalEditingPolicy FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/edit/policies/"+this.dawnCanonicalEditingPolicyClassName+".java"»
+package «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName»;
+
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.notation.View;
+
+import java.util.ArrayList;
+import java.util.List;
+
+«EXPAND generatedComment -»
+public class «this.dawnCanonicalEditingPolicyClassName» extends «this.GMFGenEditorGenerator.diagram.canonicalEditPolicyClassName»
+{
+ «EXPAND generatedComment -»
+ public «this.dawnCanonicalEditingPolicyClassName»()
+ {
+ super();
+ }
+
+ @Override
+ protected CreateViewRequest getCreateViewRequest(List<ViewDescriptor> descriptors)
+ {
+ List<View> viewChildren = getViewChildren();
+
+ List<ViewDescriptor> tbr = new ArrayList<CreateViewRequest.ViewDescriptor>();
+
+ for (ViewDescriptor desc : descriptors)
+ {
+ EObject obj = (EObject)((CanonicalElementAdapter)desc.getElementAdapter()).getRealObject();
+
+ boolean found = false;
+
+ for (View view : viewChildren)
+ {
+ if (view.getElement().equals(obj))
+ {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ tbr.add(desc);
+ }
+ }
+
+ descriptors.removeAll(tbr);
+
+ return new CreateViewRequest(descriptors);
+ }
+}
+«ENDFILE»
+«ENDDEFINE»
+
+«REM»############################################ DawnXXXCreationWizard ##################################################################«ENDREM»
+«DEFINE dawnCreationWizard FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnCreationWizardClassName+".java"»
+package «this.GMFGenEditorGenerator.editor.packageName»;
+
+import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
+import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewDiagramResourceWizardPage;
+import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewResourceWizardPage;
+import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import java.lang.reflect.InvocationTargetException;
+
+«EXPAND generatedComment -»
+public class «this.dawnCreationWizardClassName» extends «this.GMFGenEditorGenerator.diagram.creationWizardClassName»
+{
+ private CDOView view;
+
+ private DawnCreateNewDiagramResourceWizardPage dawnDiagramModelFilePage;
+
+ private DawnCreateNewResourceWizardPage dawnDomainModelFilePage;
+
+ «EXPAND generatedComment -»
+ public «this.dawnCreationWizardClassName»()
+ {
+ super();
+ CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
+ PreferenceConstants.getServerName());
+ CDOSession session = CDOConnectionUtil.instance.openSession();
+ view = CDOConnectionUtil.instance.openView(session);
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public boolean performFinish()
+ {
+ IRunnableWithProgress op = new WorkspaceModifyOperation(null)
+ {
+ @Override
+ protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException
+ {
+ URI diagramResourceURI = dawnDiagramModelFilePage.getURI();
+ URI domainModelResourceURI = dawnDomainModelFilePage.getURI();
+
+ diagram = «this.dawnEditorUtilClassName».createDiagram(diagramResourceURI, domainModelResourceURI, monitor);
+
+ if (isOpenNewlyCreatedDiagramEditor() && diagram != null)
+ {
+ try
+ {
+ «this.dawnEditorUtilClassName».openDiagram(diagram);
+ }
+ catch (PartInitException e)
+ {
+ ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»OpenEditorError, null,
+ e.getStatus());
+ }
+ }
+ }
+ };
+ try
+ {
+ getContainer().run(false, true, op);
+ }
+ catch (InterruptedException e)
+ {
+ return false;
+ }
+ catch (InvocationTargetException e)
+ {
+ if (e.getTargetException() instanceof CoreException)
+ {
+ ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»CreationError, null,
+ ((CoreException)e.getTargetException()).getStatus());
+ }
+ else
+ {
+ «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
+ }
+ return false;
+ }
+ return diagram != null;
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public void addPages()
+ {
+
+ dawnDiagramModelFilePage = new DawnCreateNewDiagramResourceWizardPage("«this.GMFGenEditorGenerator.diagramFileExtension»", false, view);
+ dawnDiagramModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageTitle);
+ dawnDiagramModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageDescription);
+ dawnDiagramModelFilePage.setCreateAutomaticResourceName(true);
+ addPage(dawnDiagramModelFilePage);
+
+ dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("«this.GMFGenEditorGenerator.domainFileExtension»", true, view)
+ {
+ @Override
+ public void setVisible(boolean visible)
+ {
+ if (visible)
+ {
+ URI uri = dawnDiagramModelFilePage.getURI();
+ String fileName = uri.lastSegment();
+ fileName = fileName.substring(0, fileName.length() - ".«this.GMFGenEditorGenerator.diagramFileExtension»".length()); //$NON-NLS-1$
+ fileName += ".«this.GMFGenEditorGenerator.domainFileExtension»";
+ dawnDomainModelFilePage.setResourceNamePrefix(fileName);
+ dawnDomainModelFilePage.setResourcePath(dawnDiagramModelFilePage.getResourcePath());
+ }
+ super.setVisible(visible);
+ }
+ };
+ dawnDomainModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageTitle);
+ dawnDomainModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageDescription);
+
+ dawnDomainModelFilePage.setResourceValidationType(DawnCreateNewResourceWizardPage.VALIDATION_WARN);
+ addPage(dawnDomainModelFilePage);
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public void dispose()
+ {
+ view.close();
+ }
+}
+«ENDFILE»
+«ENDDEFINE»
+
+«REM»############################################ DawnXXXEditorUtil ##################################################################«ENDREM»
+«DEFINE dawnEditorUtil FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorUtilClassName+".java"»
+package «this.GMFGenEditorGenerator.editor.packageName»;
+
+import org.eclipse.emf.cdo.dawn.commands.CreateSemanticResourceRecordingCommand;
+import «this.GMFGenEditorGenerator.diagram.domainDiagramElement.genPackage.basePackage».«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.ePackage.name».«this.GMFGenEditorGenerator.domainGenModel.modelName»Factory;
+
+
+import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnDiagramEditPartClassName»;
+import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
+import org.eclipse.emf.cdo.dawn.transaction.DawnGMFEditingDomainFactory;
+import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
+import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.OperationHistoryFactory;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+import java.io.IOException;
+import java.util.Collections;
+
+«EXPAND generatedComment -»
+public class «this.dawnEditorUtilClassName» extends «this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»
+{
+
+ «EXPAND generatedComment -»
+ public static boolean openDiagram(Resource diagram) throws PartInitException
+ {
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ return null != page.openEditor(new DawnEditorInput(diagram.getURI()), «this.dawnEditorClassName».ID);
+ }
+
+ «EXPAND generatedComment -»
+ public static void runWizard(Shell shell, Wizard wizard, String settingsKey)
+ {
+ IDialogSettings pluginDialogSettings = «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().getDialogSettings();
+ IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey);
+ if (wizardDialogSettings == null)
+ {
+ wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
+ }
+ wizard.setDialogSettings(wizardDialogSettings);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
+ dialog.open();
+ }
+
+ «EXPAND generatedComment -»
+ public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor)
+ {
+ TransactionalEditingDomain editingDomain = DawnGMFEditingDomainFactory.getInstance().createEditingDomain();
+
+ progressMonitor.beginTask(Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramProgressTask, 3);
+
+ CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
+ PreferenceConstants.getServerName());
+ CDOConnectionUtil.instance.openSession();
+ ResourceSet resourceSet = editingDomain.getResourceSet();
+
+ CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, diagramURI.toString());
+
+ final Resource diagramResource = resourceSet.createResource(diagramURI);
+
+
+ CreateSemanticResourceRecordingCommand createSemanticResourceCommand = new CreateSemanticResourceRecordingCommand(
+ editingDomain, transaction, modelURI.path());
+
+ editingDomain.getCommandStack().execute(createSemanticResourceCommand);
+ final Resource modelResource = createSemanticResourceCommand.getResource();
+
+ final String diagramName = diagramURI.lastSegment();
+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,
+ Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramCommandLabel, Collections.EMPTY_LIST)
+ {
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ EObject model = null;
+ if (modelResource.getContents().size() > 0)
+ {
+ model = modelResource.getContents().get(0);
+ }
+ else
+ {
+ model = createInitialModel();
+ attachModelToResource(model, modelResource);
+ }
+
+ Diagram diagram = ViewService.createDiagram(model, «this.dawnDiagramEditPartClassName».MODEL_ID,
+ «this.GMFGenEditorGenerator.plugin.activatorClassName».DIAGRAM_PREFERENCES_HINT);
+ if (diagram != null)
+ {
+ diagramResource.getContents().add(diagram);
+ diagram.setName(diagramName);
+ diagram.setElement(model);
+ }
+
+ try
+ {
+ modelResource.save(Collections.EMPTY_MAP);
+ diagramResource.save(Collections.EMPTY_MAP);
+ }
+ catch (IOException e)
+ {
+ «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
+ }
+
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ try
+ {
+ OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
+ }
+ catch (ExecutionException e)
+ {
+ «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
+ }
+ setCharset(WorkspaceSynchronizer.getFile(modelResource));
+ setCharset(WorkspaceSynchronizer.getFile(diagramResource));
+ return diagramResource;
+ }
+
+ «EXPAND generatedComment -»
+ private static EObject createInitialModel()
+ {
+ return «this.GMFGenEditorGenerator.domainGenModel.modelName»Factory.eINSTANCE.create«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.name»();
+ }
+
+ «EXPAND generatedComment -»
+ private static void attachModelToResource(EObject model, Resource resource)
+ {
+ resource.getContents().add(model);
+ }
+}
+
+
+«ENDFILE»
+«ENDDEFINE»
+
+«REM»############################################ DawnXXXDocumentProvider ##################################################################«ENDREM»
+«DEFINE dawnDocumentProvider FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnDocumentProviderClassName+".java"»
+package «this.GMFGenEditorGenerator.editor.packageName»;
+
+import org.eclipse.emf.cdo.dawn.transaction.DawnDiagramEditingDomainFactory;
+import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
+import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
+import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+«EXPAND generatedComment -»
+public class «this.dawnDocumentProviderClassName» extends «this.GMFGenEditorGenerator.diagram.documentProviderClassName»
+{
+
+ «EXPAND generatedComment -»
+ public «this.dawnDocumentProviderClassName» ()
+ {
+ super();
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ protected IDocument createEmptyDocument()
+ {
+ DiagramDocument document = new DiagramDocument();
+ document.setEditingDomain(createEditingDomain());
+ return document;
+ }
+
+ «EXPAND generatedComment -»
+ private TransactionalEditingDomain createEditingDomain()
+ {
+ TransactionalEditingDomain editingDomain = DawnDiagramEditingDomainFactory.getInstance().createEditingDomain();
+
+ editingDomain.setID("«this.GMFGenEditorGenerator.diagram.editingDomainID»"); //$NON-NLS-1$
+ final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter(
+ editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD)).and(
+ NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES));
+ editingDomain.getResourceSet().eAdapters().add(new Adapter()
+ {
+ private Notifier myTarger;
+
+ public Notifier getTarget()
+ {
+ return myTarger;
+ }
+
+ public boolean isAdapterForType(Object type)
+ {
+ return false;
+ }
+
+ public void notifyChanged(Notification notification)
+ {
+ if (diagramResourceModifiedFilter.matches(notification))
+ {
+ Object value = notification.getNewValue();
+ if (value instanceof Resource)
+ {
+ ((Resource)value).setTrackingModification(true);
+ }
+ }
+ }
+
+ public void setTarget(Notifier newTarget)
+ {
+ myTarger = newTarget;
+ }
+ });
+
+ return editingDomain;
+ }
+
+
+ «EXPAND generatedComment -»
+ @Override
+ protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException
+ {
+ IDiagramDocument diagramDocument = (IDiagramDocument)document;
+ TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
+ if (element instanceof FileEditorInput)
+ {
+ IStorage storage = ((FileEditorInput)element).getStorage();
+ Diagram diagram = DiagramIOUtil.load(domain, storage, true, getProgressMonitor());
+ document.setContent(diagram);
+ }
+ else if (element instanceof URIEditorInput)
+ {
+ URIEditorInput editorInput = (URIEditorInput)element;
+
+ URI uri = editorInput.getURI();
+ Resource resource = null;
+ try
+ {
+ URI dawnURI = URI.createURI(uri.toString().replace("cdo", "dawn"));
+ resource = domain.getResourceSet().getResource(dawnURI, false);
+ if (resource == null)
+ {
+ resource = domain.getResourceSet().getResource(dawnURI, true);
+ }
+
+ if (editorInput instanceof DawnEditorInput)
+ {
+ ((DawnEditorInput)editorInput).setResource((CDOResource)resource);
+ }
+ if (!resource.isLoaded())
+ {
+ try
+ {
+ Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
+ resource.load(options);
+ }
+ catch (IOException e)
+ {
+ resource.unload();
+ throw e;
+ }
+ }
+ if (uri.fragment() != null)
+ {
+ EObject rootElement = resource.getEObject(uri.fragment());
+ if (rootElement instanceof Diagram)
+ {
+ Diagram diagram = (Diagram)rootElement;
+ DawnDiagramUpdater.initializeElement(diagram);
+ document.setContent(diagram);
+
+ return;
+ }
+ }
+ else
+ {
+ for (Iterator<?> it = resource.getContents().iterator(); it.hasNext();)
+ {
+ Object rootElement = it.next();
+ if (rootElement instanceof Diagram)
+ {
+ Diagram diagram = (Diagram)rootElement;
+ DawnDiagramUpdater.initializeElement(diagram);
+ document.setContent(diagram);
+
+ return;
+ }
+ }
+ }
+ throw new RuntimeException(Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_NoDiagramInResourceError);
+ }
+ catch (Exception e)
+ {
+ CoreException thrownExcp = null;
+ if (e instanceof CoreException)
+ {
+ thrownExcp = (CoreException)e;
+ }
+ else
+ {
+ String msg = e.getLocalizedMessage();
+ thrownExcp = new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0,
+ msg != null ? msg : Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_DiagramLoadingError, e));
+ }
+ throw thrownExcp;
+ }
+ }
+ else
+ {
+ throw new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0, NLS.bind(
+ Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_IncorrectInputError, new Object[] { element,
+ "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ null));
+ }
+ }
+
+ «EXPAND generatedComment -»
+ @Override
+ public void changed(Object element)
+ {
+ if (element instanceof IEditorInput)
+ {
+ fireElementDirtyStateChanged(element, true);
+ }
+ }
+}
+«ENDFILE»
+«ENDDEFINE»
+
+
+«REM»############################################ DawnXXXEditPartProvider ##################################################################«ENDREM»
+«DEFINE dawnEditPartProvider FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/providers/"+this.dawnEditPartProviderClassName+".java"»
+package «this.GMFGenEditorGenerator.diagram.providersPackageName»;
+
+import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnEditPartFactoryClassName»;
+import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»;
+
+«EXPAND generatedComment -»
+public class «this.dawnEditPartProviderClassName» extends «this.GMFGenEditorGenerator.diagram.editPartProviderClassName»
+{
+
+ «EXPAND generatedComment -»
+ public «this.dawnEditPartProviderClassName»()
+ {
+ super();
+ setFactory(new «this.dawnEditPartFactoryClassName»());
+ }
+}
+
+
+«ENDFILE»
+«ENDDEFINE»
+
+«REM»############################################ DawnXXXEditPolicyProvider ##################################################################«ENDREM»
+«DEFINE dawnEditPolicyProvider FOR DawnGMFGenerator»
+«FILE "src/"+getDiagramPackagePath()+"/providers/"+dawnEditPolicyProviderClassName+".java"»
+package «this.GMFGenEditorGenerator.diagram.providersPackageName»;
+
+import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.GMFGenEditorGenerator.diagram.editPartClassName»;
+import «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName».«this.dawnCanonicalEditingPolicyClassName»;
+import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+
+«EXPAND generatedComment -»
+public class «dawnEditPolicyProviderClassName» extends AbstractProvider implements IEditPolicyProvider
+{
+ public static String ID = "«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»";
+
+ «EXPAND generatedComment -»
+ public boolean provides(IOperation operation)
+ {
+ if (operation instanceof CreateEditPoliciesOperation)
+ {
+ CreateEditPoliciesOperation editPoliciesOperation = (CreateEditPoliciesOperation)operation;
+ if (editPoliciesOperation.getEditPart() instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName»)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ «EXPAND generatedComment -»
+ public void createEditPolicies(EditPart editPart)
+ {
+ if (editPart instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName»)
+ {
+ editPart.installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new «this.dawnCanonicalEditingPolicyClassName»());
+ }
+ }
+}
+
+«ENDFILE»
+«ENDDEFINE»
+
+«REM»########################################## fragment.xml ####################################################################«ENDREM»
+«DEFINE fragmentXML FOR DawnGMFGenerator»
+«FILE "fragment.xml"»<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<fragment>
+<extension
+ point="org.eclipse.ui.editors">
+ <editor
+
+ class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»"
+ contributorClass="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.editor.actionBarContributorClassName»"
+ default="true"
+ extensions="«this.GMFGenEditorGenerator.diagramFileExtension»"
+ icon="«this.GMFGenEditorGenerator.editor.iconPath»"
+ id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»"
+ matchingStrategy="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.matchingStrategyClassName»"
+ name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ category="org.eclipse.ui.Examples"
+ class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»"
+ icon="«this.GMFGenEditorGenerator.editor.iconPath»"
+ id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»"
+ name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram">
+ <description>
+ description body text
+ </description>
+ </wizard>
+
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.resources.editor.documentProviders">
+ <provider
+ class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»"
+ documentType="org.eclipse.gmf.runtime.diagram.ui.editor.IDocument"
+ id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»"
+ inputTypes="org.eclipse.emf.common.ui.URIEditorInput">
+ </provider>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»">
+ <Priority
+ name="Low">
+ </Priority>
+ </editpolicyProvider>
+ </extension>
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ <?gmfgen generated="true"?>
+ <editpartProvider class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPartProviderClassName»">
+ <Priority name="Medium"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="«this.GMFGenEditorGenerator.modelID»"/>
+ </object>
+ <context views="generated-diagram"/>
+ </editpartProvider>
+ </extension>
+</fragment>
+
+«ENDFILE»
+«ENDDEFINE»
+
+
+
+«REM»##############################################################################################################«ENDREM»
+«DEFINE manifestMF FOR DawnGMFGenerator»
+«FILE "META-INF/MANIFEST.MF"»Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Dawn «this.GMFGenEditorGenerator.plugin.name»
+Bundle-SymbolicName: «this.fragmentName»;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Fragment-Host: «this.GMFGenEditorGenerator.plugin.iD»;bundle-version="0.2.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.cdo.dawn.util;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.cdo.ui;bundle-version="[3.0.0,5.0.0)",
+ org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.cdo.dawn.gmf;bundle-version="[2.0.0,3.0.0)"
+«ENDFILE»
+«ENDDEFINE»
+
+
+«DEFINE buildPROPERTIES FOR GenEditorGenerator»
+«FILE "build.properties"»source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ fragment.xml
+«ENDFILE»
+«ENDDEFINE»
+«REM»################################### . classpath ###########################################################################«ENDREM»
+
+«DEFINE classpath FOR GenEditorGenerator»
+«FILE ".classpath"»<?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>
+«ENDFILE»
+«ENDDEFINE»
+
+«DEFINE generatedComment FOR Object-»
+«REM»/**
+ *@generated
+ */«ENDREM»
+ «ENDDEFINE»
+
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/workflow/gmfFragmentGenerator.mwe b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/workflow/gmfFragmentGenerator.mwe
index e3c4037405..e98529def7 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/workflow/gmfFragmentGenerator.mwe
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/workflow/gmfFragmentGenerator.mwe
@@ -1,100 +1,100 @@
-<?xml version="1.0"?>
-<!--
- 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
--->
-
-<workflow>
-
- <property name="model" value="file:/D:/Development/CDO_Bugzillas/_instances/Dawn_Instance1/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.dawngenmodel.gmf" />
-
- <property name="src-gen" value="d:/temp/source" />
- <!--<property name="src-gen" /> --> <!--just declare it to make it accessable -->
-
- <!-- set up EMF for standalone execution -->
- <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
- <platformUri value=".."/>
- </bean>
-
- <!-- load model and store it in slot 'model' -->
- <component class="org.eclipse.emf.mwe.utils.Reader">
- <uri value="${model}" />
- <modelSlot value="model" />
- </component>
-
-
-
- <!-- check model -->
- <!--loads different metamodels-->
- <component class="org.eclipse.xtend.check.CheckComponent">
- <metaModel id="ecore" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.ecore.EcorePackage"/>
- </metaModel>
-
- <metaModel id="genmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage"/>
- </metaModel>
-
- <metaModel id="dawngenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawngenmodelPackage"/>
- </metaModel>
-
- <metaModel id="gmfgraph" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.gmf.gmfgraph.GMFGraphPackage"/>
- </metaModel>
-
- <metaModel id="gmfgen" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.gmf.codegen.gmfgen.GMFGenPackage"/>
- </metaModel>
-
- <metaModel id="dawnGmfGenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.dawnGmfGenmodel.DawnGmfGenmodelPackage"/>
- </metaModel>
-
- <checkFile value="metamodel::Checks" />
- <emfAllChildrenSlot value="model" />
- </component>
-
- <!-- generate code for the meta specified templates -->
- <component class="org.eclipse.xpand2.Generator">
-
- <metaModel id="ecore" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.ecore.EcorePackage"/>
- </metaModel>
-
- <metaModel id="genmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage"/>
- </metaModel>
-
- <metaModel id="dawngenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawngenmodelPackage"/>
- </metaModel>
-
- <metaModel id="gmfgraph" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.gmf.gmfgraph.GMFGraphPackage"/>
- </metaModel>
-
- <metaModel id="gmfgen" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.gmf.codegen.gmfgen.GMFGenPackage"/>
- </metaModel>
-
- <metaModel id="dawnGmfGenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
- <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.dawnGmfGenmodel.DawnGmfGenmodelPackage"/>
- </metaModel>
-
- <expand value="templates::GMFFragmentTemplate::main FOR model" />
-
- <outlet path="${src-gen}" >
- <postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
- </outlet>
-
- <!--<prSrcPaths value="${src-gen}"/>
- <prExcludes value=", *.xml, *.hbm"/>-->
- </component>
-</workflow>
+<?xml version="1.0"?>
+<!--
+ Copyright (c) 2004 - 2012 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
+-->
+
+<workflow>
+
+ <property name="model" value="file:/D:/Development/CDO_Bugzillas/_instances/Dawn_Instance1/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.dawngenmodel.gmf" />
+
+ <property name="src-gen" value="d:/temp/source" />
+ <!--<property name="src-gen" /> --> <!--just declare it to make it accessable -->
+
+ <!-- set up EMF for standalone execution -->
+ <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
+ <platformUri value=".."/>
+ </bean>
+
+ <!-- load model and store it in slot 'model' -->
+ <component class="org.eclipse.emf.mwe.utils.Reader">
+ <uri value="${model}" />
+ <modelSlot value="model" />
+ </component>
+
+
+
+ <!-- check model -->
+ <!--loads different metamodels-->
+ <component class="org.eclipse.xtend.check.CheckComponent">
+ <metaModel id="ecore" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.ecore.EcorePackage"/>
+ </metaModel>
+
+ <metaModel id="genmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage"/>
+ </metaModel>
+
+ <metaModel id="dawngenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawngenmodelPackage"/>
+ </metaModel>
+
+ <metaModel id="gmfgraph" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.gmf.gmfgraph.GMFGraphPackage"/>
+ </metaModel>
+
+ <metaModel id="gmfgen" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.gmf.codegen.gmfgen.GMFGenPackage"/>
+ </metaModel>
+
+ <metaModel id="dawnGmfGenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.dawnGmfGenmodel.DawnGmfGenmodelPackage"/>
+ </metaModel>
+
+ <checkFile value="metamodel::Checks" />
+ <emfAllChildrenSlot value="model" />
+ </component>
+
+ <!-- generate code for the meta specified templates -->
+ <component class="org.eclipse.xpand2.Generator">
+
+ <metaModel id="ecore" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.ecore.EcorePackage"/>
+ </metaModel>
+
+ <metaModel id="genmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage"/>
+ </metaModel>
+
+ <metaModel id="dawngenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawngenmodelPackage"/>
+ </metaModel>
+
+ <metaModel id="gmfgraph" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.gmf.gmfgraph.GMFGraphPackage"/>
+ </metaModel>
+
+ <metaModel id="gmfgen" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.gmf.codegen.gmfgen.GMFGenPackage"/>
+ </metaModel>
+
+ <metaModel id="dawnGmfGenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
+ <metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.dawnGmfGenmodel.DawnGmfGenmodelPackage"/>
+ </metaModel>
+
+ <expand value="templates::GMFFragmentTemplate::main FOR model" />
+
+ <outlet path="${src-gen}" >
+ <postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
+ </outlet>
+
+ <!--<prSrcPaths value="${src-gen}"/>
+ <prExcludes value=", *.xml, *.hbm"/>-->
+ </component>
+</workflow>

Back to the top