Permalink
Browse files

adjustments to the metablock and form models to support web submissio…

…ns, i.e. entering values

revisions to Form model

adjusted compile target to 1.6 for all modules except the main workbench_plugin.
this allows me to use crosswalk jars in the CDR code, which is 1.6.

Add text and date field specifics like text field preferred and max size.
Used generics to add new types of input fields

finally figured out the right ecore model for generic type parameters in method sigs
now the generated code does the things I was hacking into place earlier, yay.

logging fixes for slf4j over log4j
  • Loading branch information...
1 parent ae5e849 commit fa41b1afb7411d3eed624439a27fb59ea1ecf734 @gregjan gregjan committed Jun 5, 2012
Showing with 10,497 additions and 1,335 deletions.
  1. +2 −1 crosswalk-gmf.custom/.classpath
  2. +6 −0 crosswalk-gmf.custom/.project
  3. +3 −0 crosswalk-gmf.custom/.settings/org.eclipse.core.resources.prefs
  4. +5 −0 crosswalk-gmf.custom/.settings/org.eclipse.m2e.core.prefs
  5. +12 −0 crosswalk-gmf.custom/pom.xml
  6. +1 −1 crosswalk-gmf.diagram/META-INF/MANIFEST.MF
  7. +16 −0 crosswalk-gmf.diagram/messages.properties
  8. +4 −0 crosswalk-gmf.diagram/plugin.properties
  9. +42 −9 crosswalk-gmf.diagram/plugin.xml
  10. +7 −8 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/MappedModelUtil.java
  11. +2 −2 ...lk → crosswalk-gmf.diagram/src/crosswalk/diagram/custom}/ReplaceNewObjectWithTemplateCommand.java
  12. +81 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CurrentDateCreateCommand.java
  13. +81 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CurrentUsernameCreateCommand.java
  14. +81 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DateInputFieldCreateCommand.java
  15. +81 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TextInputFieldCreateCommand.java
  16. +7 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/helpers/CurrentDateEditHelper.java
  17. +7 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/helpers/CurrentUsernameEditHelper.java
  18. +7 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/helpers/DateInputFieldEditHelper.java
  19. +7 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/helpers/TextInputFieldEditHelper.java
  20. +6 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrossWalkEditPart.java
  21. +22 −4 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrosswalkEditPartFactory.java
  22. +329 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CurrentDateEditPart.java
  23. +329 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CurrentUsernameEditPart.java
  24. +420 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DateInputFieldEditPart.java
  25. +5 −5 ...rc/crosswalk/diagram/edit/parts/{InputFieldLabelEditPart.java → DateInputFieldLabelEditPart.java}
  26. +16 −3 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DateRecognizerEditPart.java
  27. +1 −1 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/FormEditPart.java
  28. +0 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/InputOutputEditPart.java
  29. +14 −3 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedAttributeEditPart.java
  30. +16 −3 ...-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedElementChildElementsCompartment2EditPart.java
  31. +16 −3 ...k-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedElementChildElementsCompartmentEditPart.java
  32. +5 −4 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlock2EditPart.java
  33. +5 −1 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlock3EditPart.java
  34. +5 −1 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlockEditPart.java
  35. +1 −2 ...am/src/crosswalk/diagram/edit/parts/MetadataBlockMetadataBlockInputFieldsCompartmentEditPart.java
  36. +14 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/OriginalNameRecordMatcherEditPart.java
  37. +2 −4 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/ParagraphEditPart.java
  38. +2 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TabbedDataFieldEditPart.java
  39. +2 −1 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TextEditPart.java
  40. +58 −63 ....diagram/src/crosswalk/diagram/edit/parts/{InputFieldEditPart.java → TextInputFieldEditPart.java}
  41. +532 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TextInputFieldLabelEditPart.java
  42. +16 −3 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TrimWhitespaceEditPart.java
  43. +532 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/WrappingLabel8EditPart.java
  44. +532 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/WrappingLabel9EditPart.java
  45. +166 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/CrossWalkCanonicalEditPolicy.java
  46. +50 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/CrossWalkItemSemanticEditPolicy.java
  47. +2 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/CrosswalkBaseItemSemanticEditPolicy.java
  48. +108 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/CurrentDateItemSemanticEditPolicy.java
  49. +108 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/CurrentUsernameItemSemanticEditPolicy.java
  50. +3 −3 ...edit/policies/{InputFieldItemSemanticEditPolicy.java → DateInputFieldItemSemanticEditPolicy.java}
  51. +33 −3 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/EditingContainerCanonicalEditPolicy.java
  52. +67 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/MetadataBlock2ItemSemanticEditPolicy.java
  53. +67 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/MetadataBlock3ItemSemanticEditPolicy.java
  54. +67 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/MetadataBlockItemSemanticEditPolicy.java
  55. +4 −2 ...k/diagram/edit/policies/MetadataBlockMetadataBlockInputFieldsCompartment2CanonicalEditPolicy.java
  56. +7 −3 ...iagram/edit/policies/MetadataBlockMetadataBlockInputFieldsCompartment2ItemSemanticEditPolicy.java
  57. +4 −2 ...k/diagram/edit/policies/MetadataBlockMetadataBlockInputFieldsCompartment3CanonicalEditPolicy.java
  58. +7 −3 ...iagram/edit/policies/MetadataBlockMetadataBlockInputFieldsCompartment3ItemSemanticEditPolicy.java
  59. +4 −2 ...lk/diagram/edit/policies/MetadataBlockMetadataBlockInputFieldsCompartmentCanonicalEditPolicy.java
  60. +7 −3 ...diagram/edit/policies/MetadataBlockMetadataBlockInputFieldsCompartmentItemSemanticEditPolicy.java
  61. +4 −0 ...swalk/diagram/edit/policies/MetadataBlockMetadataBlockMappingCompartment2CanonicalEditPolicy.java
  62. +8 −0 ...lk/diagram/edit/policies/MetadataBlockMetadataBlockMappingCompartment2ItemSemanticEditPolicy.java
  63. +4 −0 ...swalk/diagram/edit/policies/MetadataBlockMetadataBlockMappingCompartment3CanonicalEditPolicy.java
  64. +8 −0 ...lk/diagram/edit/policies/MetadataBlockMetadataBlockMappingCompartment3ItemSemanticEditPolicy.java
  65. +4 −0 ...sswalk/diagram/edit/policies/MetadataBlockMetadataBlockMappingCompartmentCanonicalEditPolicy.java
  66. +8 −0 ...alk/diagram/edit/policies/MetadataBlockMetadataBlockMappingCompartmentItemSemanticEditPolicy.java
  67. +118 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/policies/TextInputFieldItemSemanticEditPolicy.java
  68. +302 −177 crosswalk-gmf.diagram/src/crosswalk/diagram/navigator/CrosswalkNavigatorContentProvider.java
  69. +145 −69 crosswalk-gmf.diagram/src/crosswalk/diagram/navigator/CrosswalkNavigatorLabelProvider.java
  70. +109 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/parsers/CurrentDateLabelExpressionLabelParser.java
  71. +109 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/parsers/CurrentUsernameLabelExpressionLabelParser.java
  72. +5 −5 crosswalk-gmf.diagram/src/crosswalk/diagram/parsers/MappedAttributeLabelExpressionLabelParser.java
  73. +187 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/part/CrosswalkDiagramUpdater.java
  74. +56 −13 crosswalk-gmf.diagram/src/crosswalk/diagram/part/CrosswalkPaletteFactory.java
  75. +102 −13 crosswalk-gmf.diagram/src/crosswalk/diagram/part/CrosswalkVisualIDRegistry.java
  76. +56 −6 crosswalk-gmf.diagram/src/crosswalk/diagram/part/Messages.java
  77. +39 −6 crosswalk-gmf.diagram/src/crosswalk/diagram/providers/CrosswalkElementTypes.java
  78. +66 −20 crosswalk-gmf.diagram/src/crosswalk/diagram/providers/CrosswalkModelingAssistantProvider.java
  79. +67 −8 crosswalk-gmf.diagram/src/crosswalk/diagram/providers/CrosswalkParserProvider.java
  80. +135 −11 crosswalk-gmf.diagram/src/crosswalk/diagram/providers/CrosswalkViewProvider.java
  81. BIN crosswalk-gmf.edit/icons/full/ctool16/CreateMetadataBlock_ports_DateInputField.gif
  82. BIN crosswalk-gmf.edit/icons/full/ctool16/CreateMetadataBlock_ports_TextInputField.gif
  83. BIN crosswalk-gmf.edit/icons/full/obj16/CurrentDate.gif
  84. BIN crosswalk-gmf.edit/icons/full/obj16/CurrentUsername.gif
  85. BIN crosswalk-gmf.edit/icons/full/obj16/DateInputField.gif
  86. BIN crosswalk-gmf.edit/icons/full/obj16/FormInputValueMapper.gif
  87. BIN crosswalk-gmf.edit/icons/full/obj16/TextInputField.gif
  88. +20 −0 crosswalk-gmf.edit/plugin.properties
  89. +20 −8 ....edit/src/crosswalk/provider/{SchemaProviderItemProvider.java → ContextProviderItemProvider.java}
  90. +42 −2 crosswalk-gmf.edit/src/crosswalk/provider/CrossWalkItemProvider.java
  91. +92 −0 crosswalk-gmf.edit/src/crosswalk/provider/CrosswalkItemProviderAdapterFactory.java
  92. +109 −0 crosswalk-gmf.edit/src/crosswalk/provider/CurrentDateItemProvider.java
  93. +109 −0 crosswalk-gmf.edit/src/crosswalk/provider/CurrentUsernameItemProvider.java
  94. +114 −0 crosswalk-gmf.edit/src/crosswalk/provider/DateInputFieldItemProvider.java
  95. +0 −22 crosswalk-gmf.edit/src/crosswalk/provider/DateRecognizerItemProvider.java
  96. +1 −1 crosswalk-gmf.edit/src/crosswalk/provider/DictionaryItemProvider.java
  97. +78 −5 crosswalk-gmf.edit/src/crosswalk/provider/FormItemProvider.java
  98. +22 −20 crosswalk-gmf.edit/src/crosswalk/provider/InputFieldItemProvider.java
  99. +3 −1 crosswalk-gmf.edit/src/crosswalk/provider/MappedAttributeItemProvider.java
  100. +8 −1 crosswalk-gmf.edit/src/crosswalk/provider/MappedElementItemProvider.java
  101. +93 −0 crosswalk-gmf.edit/src/crosswalk/provider/MetadataBlockItemProvider.java
  102. +0 −23 crosswalk-gmf.edit/src/crosswalk/provider/OriginalNameRecordMatcherItemProvider.java
  103. +1 −1 crosswalk-gmf.edit/src/crosswalk/provider/TabbedDataFieldItemProvider.java
  104. +171 −0 crosswalk-gmf.edit/src/crosswalk/provider/TextInputFieldItemProvider.java
  105. +0 −23 crosswalk-gmf.edit/src/crosswalk/provider/TrimWhitespaceItemProvider.java
  106. +13 −0 crosswalk-gmf/.project
  107. +6 −0 crosswalk-gmf/.settings/org.eclipse.wst.common.component
  108. +5 −0 crosswalk-gmf/.settings/org.eclipse.wst.common.project.facet.core.xml
  109. +58 −18 crosswalk-gmf/model/crosswalk.ecore
  110. +29 −12 crosswalk-gmf/model/crosswalk.genmodel
  111. +14 −2 crosswalk-gmf/model/crosswalk.gmftool
  112. +298 −52 crosswalk-gmf/model/crosswalk2-2.gmfgen
  113. +85 −4 crosswalk-gmf/model/crosswalk2-2.gmfmap
  114. +28 −7 crosswalk-gmf/model/crosswalk2-2.trace
  115. +3 −0 crosswalk-gmf/src/META-INF/MANIFEST.MF
  116. +82 −0 crosswalk-gmf/src/crosswalk/ContextProvider.java
  117. +7 −7 crosswalk-gmf/src/crosswalk/ConversionStrategy.java
  118. +1 −17 crosswalk-gmf/src/crosswalk/CrossWalk.java
  119. +37 −1 crosswalk-gmf/src/crosswalk/CrosswalkFactory.java
  120. +821 −172 crosswalk-gmf/src/crosswalk/CrosswalkPackage.java
  121. +21 −0 crosswalk-gmf/src/crosswalk/CurrentDate.java
  122. +21 −0 crosswalk-gmf/src/crosswalk/CurrentUsername.java
  123. +22 −0 crosswalk-gmf/src/crosswalk/DateInputField.java
  124. +0 −3 crosswalk-gmf/src/crosswalk/DelimitedFile.java
  125. +1 −3 crosswalk-gmf/src/crosswalk/Dictionary.java
  126. +63 −1 crosswalk-gmf/src/crosswalk/Form.java
  127. +2 −2 crosswalk-gmf/src/crosswalk/Input.java
  128. +83 −1 crosswalk-gmf/src/crosswalk/InputField.java
  129. +0 −2 crosswalk-gmf/src/crosswalk/MappedAttribute.java
  130. +0 −2 crosswalk-gmf/src/crosswalk/MappedElement.java
  131. +21 −3 crosswalk-gmf/src/crosswalk/MappingContainer.java
  132. +30 −2 crosswalk-gmf/src/crosswalk/MetadataBlock.java
  133. +8 −8 crosswalk-gmf/src/crosswalk/OriginalNameRecordMatcher.java
  134. +2 −2 crosswalk-gmf/src/crosswalk/Output.java
  135. +37 −8 crosswalk-gmf/src/crosswalk/OutputElement.java
  136. +0 −55 crosswalk-gmf/src/crosswalk/SchemaProvider.java
  137. +82 −0 crosswalk-gmf/src/crosswalk/TextInputField.java
  138. +81 −13 crosswalk-gmf/src/crosswalk/impl/{SchemaProviderImpl.java → ContextProviderImpl.java}
  139. +57 −14 crosswalk-gmf/src/crosswalk/impl/CrossWalkImpl.java
  140. +86 −42 crosswalk-gmf/src/crosswalk/impl/CrosswalkFactoryImpl.java
  141. +269 −69 crosswalk-gmf/src/crosswalk/impl/CrosswalkPackageImpl.java
  142. +66 −0 crosswalk-gmf/src/crosswalk/impl/CurrentDateImpl.java
  143. +78 −0 crosswalk-gmf/src/crosswalk/impl/CurrentUsernameImpl.java
  144. +2 −2 crosswalk-gmf/src/crosswalk/impl/DataFieldImpl.java
  145. +45 −0 crosswalk-gmf/src/crosswalk/impl/DateInputFieldImpl.java
  146. +4 −4 crosswalk-gmf/src/crosswalk/impl/DateRecognizerImpl.java
  147. +19 −15 crosswalk-gmf/src/crosswalk/impl/DateToISO8601StringConversionImpl.java
  148. +0 −2 crosswalk-gmf/src/crosswalk/impl/DelimitedFileImpl.java
  149. +1 −1 crosswalk-gmf/src/crosswalk/impl/DictionaryImpl.java
  150. +194 −14 crosswalk-gmf/src/crosswalk/impl/FormImpl.java
  151. +153 −9 crosswalk-gmf/src/crosswalk/impl/InputFieldImpl.java
  152. +119 −31 crosswalk-gmf/src/crosswalk/impl/MappedAttributeImpl.java
  153. +92 −25 crosswalk-gmf/src/crosswalk/impl/MappedElementImpl.java
  154. +318 −29 crosswalk-gmf/src/crosswalk/impl/MetadataBlockImpl.java
  155. +11 −10 crosswalk-gmf/src/crosswalk/impl/OriginalNameRecordMatcherImpl.java
  156. +3 −5 crosswalk-gmf/src/crosswalk/impl/ParagraphImpl.java
  157. +5 −6 crosswalk-gmf/src/crosswalk/impl/TextImpl.java
  158. +220 −0 crosswalk-gmf/src/crosswalk/impl/TextInputFieldImpl.java
  159. +4 −4 crosswalk-gmf/src/crosswalk/impl/TrimWhitespaceImpl.java
  160. +1 −2 crosswalk-gmf/src/crosswalk/impl/WalkWidgetImpl.java
  161. +78 −6 crosswalk-gmf/src/crosswalk/util/CrosswalkAdapterFactory.java
  162. +107 −11 crosswalk-gmf/src/crosswalk/util/CrosswalkSwitch.java
  163. +7 −0 crosswalk-gmf/src/crosswalk/util/MappingException.java
  164. +13 −0 mods.model/.project
  165. +6 −0 mods.model/.settings/org.eclipse.wst.common.component
  166. +5 −0 mods.model/.settings/org.eclipse.wst.common.project.facet.core.xml
  167. +3 −0 mods.model/src/META-INF/MANIFEST.MF
  168. +37 −3 pom.xml
  169. +0 −1 workbench_plugin/.classpath
  170. +5 −7 workbench_plugin/META-INF/MANIFEST.MF
  171. +0 −1 workbench_plugin/build.properties
  172. BIN workbench_plugin/lib/slf4j-api-1.6.0.jar
  173. +22 −0 workbench_plugin/pom.xml
  174. +21 −14 workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/MetsProjectNature.java
  175. +1 −2 workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/ProjectEMFSession.java
  176. +1 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/CrosswalkMetaBlockTemplateAdvice.java
  177. +2 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/CrosswalksProjectBuilder.java
  178. +1 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/DictionaryMetaBlockTemplateAdvice.java
  179. +1 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/FormMetaBlockTemplateAdvice.java
  180. +13 −0 xlink.model/.project
  181. +6 −0 xlink.model/.settings/org.eclipse.wst.common.component
  182. +5 −0 xlink.model/.settings/org.eclipse.wst.common.project.facet.core.xml
  183. +1 −1 xlink.model/META-INF/MANIFEST.MF
  184. +3 −0 xlink.model/src/META-INF/MANIFEST.MF
@@ -2,5 +2,6 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
@@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
@@ -0,0 +1,3 @@
+#Thu May 31 14:19:14 EDT 2012
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
@@ -0,0 +1,5 @@
+#Thu May 31 14:19:14 EDT 2012
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>curators.workbench</groupId>
+ <artifactId>parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>crosswalk-gmf.custom</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: crosswalk-gmf.diagram; singleton:=true
-Bundle-Version: 0.0.1.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-ClassPath: .,juniversalchardet-1.0.3.jar
Bundle-Activator: crosswalk.diagram.part.CrosswalkDiagramEditorPlugin
Bundle-Vendor: %providerName
@@ -248,3 +248,19 @@ Paragraph3CreationTool_desc=A block of text with optional header used in forms.
FormModelBoxCompartmentEditPart_title=ModelBoxCompartment
MetadataBlockMetadataBlockInputFieldsCompartment3EditPart_title=inputs
MetadataBlockMetadataBlockMappingCompartment3EditPart_title=mapping
+CurrentUsername8CreationTool_title=Current Username
+CurrentUsername8CreationTool_desc=The login of the current user.
+CurrentDateTime9CreationTool_title=Current Date/Time
+CurrentDateTime9CreationTool_desc=The current system date and time.
+NavigatorGroupName_CurrentDate_3021_incominglinks=incoming links
+NavigatorGroupName_CurrentUsername_3022_incominglinks=incoming links
+TextField2CreationTool_title=Text Field
+TextField2CreationTool_desc=Add a text field to a metadata block
+DateField3CreationTool_title=Date Field
+DateField3CreationTool_desc=Add a date field to a metadata block.
+Paragraph4CreationTool_title=Paragraph
+Paragraph4CreationTool_desc=A block of text with optional header used in forms.
+NavigatorGroupName_TextInputField_3023_incominglinks=incoming links
+NavigatorGroupName_TextInputField_3023_outgoinglinks=outgoing links
+NavigatorGroupName_DateInputField_3024_incominglinks=incoming links
+NavigatorGroupName_DateInputField_3024_outgoinglinks=outgoing links
@@ -132,3 +132,7 @@ metatype.name.MetadataBlock_3018=MetadataBlock
metatype.name.Form_2003=Form
metatype.name.MetadataBlock_3019=MetadataBlock
metatype.name.Paragraph_3020=Paragraph
+metatype.name.CurrentDate_3021=CurrentDate
+metatype.name.CurrentUsername_3022=CurrentUsername
+metatype.name.TextInputField_3023=TextInputField
+metatype.name.DateInputField_3024=DateInputField
@@ -220,7 +220,7 @@ copyright 2010 University of North Carolina at Chapel Hill
<viewProvider class="crosswalk.diagram.providers.CrosswalkViewProvider">
<Priority name="Lowest"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Crosswalk"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2001,2002,2003,3001,3002,3003,3004,3005,3006,3007,3008,3009,3018,3017,3010,3019,3020"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2001,2002,2003,3001,3002,3003,3004,3005,3006,3007,3008,3009,3018,3023,3021,3022,3024,3010,3019,3020"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4001"/>
</viewProvider>
</extension>
@@ -233,13 +233,13 @@ copyright 2010 University of North Carolina at Chapel Hill
<method name="getType()" value="Crosswalk"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="2001,2002,2003,3001,3002,3003,3004,3005,3006,3007,3008,3009,3018,3017,3010,3019,3020"/>
+ <method name="getType()" value="2001,2002,2003,3001,3002,3003,3004,3005,3006,3007,3008,3009,3018,3023,3021,3022,3024,3010,3019,3020"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
<method name="getType()" value="4001"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="5025,5026,5023,5024,5003,5001,5002,5004,5005,5006,5007,5010,5009,5008,5019,5017,5018,5020,5021,5022"/>
+ <method name="getType()" value="5025,5026,5023,5024,5003,5001,5002,5004,5005,5006,5007,5010,5009,5008,5019,5029,5027,5028,5030,5018,5020,5021,5022"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
<method name="getType()" value="7001,7002,7003,7004,7009,7010,7005,7006,7007,7011,7012,7013"/>
@@ -417,12 +417,42 @@ copyright 2010 University of North Carolina at Chapel Hill
</metamodel>
<metamodel nsURI="http://lib.unc.edu/schemas/crosswalk">
<metamodelType
- id="crosswalk-gmf.diagram.InputField_3017"
- name="%metatype.name.InputField_3017"
+ id="crosswalk-gmf.diagram.TextInputField_3023"
+ name="%metatype.name.TextInputField_3023"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InputField"
- edithelper="crosswalk.diagram.edit.helpers.InputFieldEditHelper">
- <param name="semanticHint" value="3017"/>
+ eclass="TextInputField"
+ edithelper="crosswalk.diagram.edit.helpers.TextInputFieldEditHelper">
+ <param name="semanticHint" value="3023"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://lib.unc.edu/schemas/crosswalk">
+ <metamodelType
+ id="crosswalk-gmf.diagram.CurrentDate_3021"
+ name="%metatype.name.CurrentDate_3021"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="CurrentDate"
+ edithelper="crosswalk.diagram.edit.helpers.CurrentDateEditHelper">
+ <param name="semanticHint" value="3021"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://lib.unc.edu/schemas/crosswalk">
+ <metamodelType
+ id="crosswalk-gmf.diagram.CurrentUsername_3022"
+ name="%metatype.name.CurrentUsername_3022"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="CurrentUsername"
+ edithelper="crosswalk.diagram.edit.helpers.CurrentUsernameEditHelper">
+ <param name="semanticHint" value="3022"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://lib.unc.edu/schemas/crosswalk">
+ <metamodelType
+ id="crosswalk-gmf.diagram.DateInputField_3024"
+ name="%metatype.name.DateInputField_3024"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="DateInputField"
+ edithelper="crosswalk.diagram.edit.helpers.DateInputFieldEditHelper">
+ <param name="semanticHint" value="3024"/>
</metamodelType>
</metamodel>
<metamodel nsURI="http://lib.unc.edu/schemas/crosswalk">
@@ -488,7 +518,10 @@ copyright 2010 University of North Carolina at Chapel Hill
<elementType ref="crosswalk-gmf.diagram.MappedElement_3008"/>
<elementType ref="crosswalk-gmf.diagram.MappedAttribute_3009"/>
<elementType ref="crosswalk-gmf.diagram.MetadataBlock_3018"/>
- <elementType ref="crosswalk-gmf.diagram.InputField_3017"/>
+ <elementType ref="crosswalk-gmf.diagram.TextInputField_3023"/>
+ <elementType ref="crosswalk-gmf.diagram.CurrentDate_3021"/>
+ <elementType ref="crosswalk-gmf.diagram.CurrentUsername_3022"/>
+ <elementType ref="crosswalk-gmf.diagram.DateInputField_3024"/>
<elementType ref="crosswalk-gmf.diagram.MetadataBlock_3010"/>
<elementType ref="crosswalk-gmf.diagram.MetadataBlock_3019"/>
<elementType ref="crosswalk-gmf.diagram.Paragraph_3020"/>
@@ -19,7 +19,6 @@
import gov.loc.mods.mods.MODSPackage;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
@@ -28,13 +27,13 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import crosswalk.ContextProvider;
import crosswalk.CrossWalk;
import crosswalk.CrosswalkFactory;
import crosswalk.MappedAttribute;
import crosswalk.MappedElement;
import crosswalk.MappingContainer;
import crosswalk.OutputElement;
-import crosswalk.SchemaProvider;
import crosswalk.impl.MappedElementImpl;
/**
@@ -59,12 +58,12 @@
for(OutputElement e : mapContainer.getElements()) {
if(e instanceof MappedElement) elementsMappedAlready.add((MappedElement)e);
}
- if (parent instanceof SchemaProvider) {
- mappedParentType = ((SchemaProvider) parent).getOutputType();
- } else {
- for (EObject next = parent.eContainer(); next != null; next = next.eContainer()) {
- if (next instanceof SchemaProvider) {
- mappedParentType = ((SchemaProvider) next).getOutputType();
+ for (EObject next = parent.eContainer(); next != null; next = next.eContainer()) {
+ if (next instanceof ContextProvider) {
+ EClass aMappedParentType = ((ContextProvider) next).getOutputType();
+ if(aMappedParentType != null) {
+ mappedParentType = aMappedParentType;
+ break;
}
}
}
@@ -1,4 +1,4 @@
-package unc.lib.cdr.workbench.xwalk;
+package crosswalk.diagram.custom;
import java.util.Collections;
@@ -9,6 +9,7 @@
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
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.emf.type.core.requests.CreateElementRequest;
@@ -24,7 +25,6 @@ public ReplaceNewObjectWithTemplateCommand(TransactionalEditingDomain domain, Cr
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
EObject result = null;
- System.out.println("IN THE COMMAND");
EObject n = request.getNewElement();
EObject template = (EObject)request.getParameter("templateElement");
EcoreUtil.Copier copier = new EcoreUtil.Copier(false, true);
@@ -0,0 +1,81 @@
+package crosswalk.diagram.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+import crosswalk.CrosswalkFactory;
+import crosswalk.CurrentDate;
+import crosswalk.MappingContainer;
+
+/**
+ * @generated
+ */
+public class CurrentDateCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ public CurrentDateCreateCommand(CreateElementRequest req) {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CurrentDate newElement = CrosswalkFactory.eINSTANCE.createCurrentDate();
+
+ MappingContainer owner = (MappingContainer) getElementToEdit();
+ owner.getWidgets().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(CurrentDate newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
@@ -0,0 +1,81 @@
+package crosswalk.diagram.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+import crosswalk.CrosswalkFactory;
+import crosswalk.CurrentUsername;
+import crosswalk.MappingContainer;
+
+/**
+ * @generated
+ */
+public class CurrentUsernameCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ public CurrentUsernameCreateCommand(CreateElementRequest req) {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CurrentUsername newElement = CrosswalkFactory.eINSTANCE.createCurrentUsername();
+
+ MappingContainer owner = (MappingContainer) getElementToEdit();
+ owner.getWidgets().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(CurrentUsername newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
Oops, something went wrong.

0 comments on commit fa41b1a

Please sign in to comment.