Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial checkin of Fuse IDE

  • Loading branch information...
commit f3082cbf82339860c33add858ea1662e4b1e81e1 0 parents
@jstrachan jstrachan authored
Showing with 14,690 additions and 0 deletions.
  1. +14 −0 .gitignore
  2. +72 −0 addUpdateSiteVersion
  3. +337 −0 common.sh
  4. +158 −0 create-release-branch.sh
  5. +30 −0 delete-release-branch.sh
  6. +100 −0 etc/settings.xml
  7. +1 −0  ide-buildno.txt
  8. +4 −0 ide-buildtools/.gitignore
  9. +112 −0 ide-buildtools/pom.xml
  10. +134 −0 ide-buildtools/src/main/scala/org/fusesource/ide/buildtools/DownloadFuseArchetypes.scala
  11. +87 −0 ide-buildtools/src/main/scala/org/fusesource/ide/buildtools/DownloadLatestXsds.scala
  12. +74 −0 ide-buildtools/src/main/scala/org/fusesource/ide/buildtools/UpdateReleases.scala
  13. +37 −0 ide-buildtools/src/test/resources/logback-test.xml
  14. +4 −0 ide-codegen/.gitignore
  15. +112 −0 ide-codegen/pom.xml
  16. +21 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/ComplexProperties.txt.ssp
  17. +52 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/Messages.java.ssp
  18. +34 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/NodeFactory.java.ssp
  19. +56 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/Tooltips.java.ssp
  20. +48 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/editor/Messages.java.ssp
  21. +79 −0 ...ain/resources/org/fusesource/ide/generator/eclipse/editor/editor/palette/RiderEditorPaletteFactory.java.ssp
  22. +42 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/editor/l10n/messages.properties.ssp
  23. +97 −0 ...c/main/resources/org/fusesource/ide/generator/eclipse/editor/provider/generated/AddNodeMenuFactory.java.ssp
  24. +63 −0 ...n/src/main/resources/org/fusesource/ide/generator/eclipse/editor/provider/generated/ProviderHelper.java.ssp
  25. +19 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/messages.properties.ssp
  26. +229 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/modelBean.ssp
  27. +22 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/tooltips.properties.ssp
  28. +960 −0 ide-codegen/src/main/resources/org/fusesource/ide/generator/model.xml
  29. +44 −0 ide-codegen/src/main/scala/org/fusesource/ide/generator/ArchetypeCatalogConverter.scala
  30. +25 −0 ide-codegen/src/main/scala/org/fusesource/ide/generator/Dimensions.scala
  31. +803 −0 ide-codegen/src/main/scala/org/fusesource/ide/generator/Generator.scala
  32. +193 −0 ide-codegen/src/main/scala/org/fusesource/ide/generator/Main.scala
  33. +37 −0 ide-codegen/src/test/resources/logback-test.xml
  34. +1 −0  plugins/.gitignore
  35. BIN  plugins/.keystore
  36. +66 −0 plugins/Notices.txt
  37. +164 −0 plugins/ReadMe.md
  38. +7 −0 plugins/org.fusesource.ide.branding/.classpath
  39. +28 −0 plugins/org.fusesource.ide.branding/.project
  40. +33 −0 plugins/org.fusesource.ide.branding/META-INF/MANIFEST.MF
  41. +23 −0 plugins/org.fusesource.ide.branding/OSGI-INF/l10n/bundle.properties
  42. +2,488 −0 plugins/org.fusesource.ide.branding/archetype-catalog.xml
  43. +14 −0 plugins/org.fusesource.ide.branding/archetypes/archetypes.xml
  44. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-activemq-2.10.0.fuse-71-017.jar
  45. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-blueprint-2.10.0.fuse-71-017.jar
  46. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-component-2.10.0.fuse-71-017.jar
  47. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-component-scala-2.10.0.fuse-71-017.jar
  48. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-dataformat-2.10.0.fuse-71-017.jar
  49. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-java-2.10.0.fuse-71-017.jar
  50. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-scala-2.10.0.fuse-71-017.jar
  51. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-spring-2.10.0.fuse-71-017.jar
  52. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-spring-dm-2.10.0.fuse-71-017.jar
  53. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-web-2.10.0.fuse-71-017.jar
  54. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-archetype-webconsole-2.10.0.fuse-71-017.jar
  55. BIN  plugins/org.fusesource.ide.branding/archetypes/camel-drools-archetype-7.1.0.fuse-017.jar
  56. BIN  plugins/org.fusesource.ide.branding/archetypes/jaxb-impl-2.2.5.jar
  57. +11 −0 plugins/org.fusesource.ide.branding/build.properties
  58. BIN  plugins/org.fusesource.ide.branding/icons/fuse_icon_16c.png
  59. BIN  plugins/org.fusesource.ide.branding/icons/fuse_rs.jpg
  60. BIN  plugins/org.fusesource.ide.branding/icons/integration_perspective.png
  61. BIN  plugins/org.fusesource.ide.branding/icons/new_camel_context.png
  62. BIN  plugins/org.fusesource.ide.branding/icons/new_camel_context_wizard.png
  63. BIN  plugins/org.fusesource.ide.branding/icons/new_camel_test_case.png
  64. BIN  plugins/org.fusesource.ide.branding/icons/new_camel_test_case_wizard.png
  65. BIN  plugins/org.fusesource.ide.branding/icons/new_fuse_project.png
  66. BIN  plugins/org.fusesource.ide.branding/icons/new_fuse_project_wizard.png
  67. BIN  plugins/org.fusesource.ide.branding/icons/new_message.png
  68. BIN  plugins/org.fusesource.ide.branding/icons/new_message_wizard.png
  69. +8 −0 plugins/org.fusesource.ide.branding/intro/overview.css
  70. +18 −0 plugins/org.fusesource.ide.branding/intro/overview.xml
  71. +460 −0 plugins/org.fusesource.ide.branding/plugin.xml
  72. +16 −0 plugins/org.fusesource.ide.branding/pom.xml
  73. +61 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/Activator.java
  74. +11 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/RiderHelpContextIds.java
  75. +52 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/WorkbenchPreferencePage.java
  76. +234 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/l10n/WizardMessages.properties
  77. +59 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/menus/VisitSubscriptionCenterCommand.java
  78. +62 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/perspective/FusePerspective.java
  79. +522 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/NewCamelTestWizard.java
  80. +1,446 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/NewCamelTestWizardPageOne.java
  81. +441 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/NewCamelTestWizardPageTwo.java
  82. +243 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/NewCamelXmlWizard.java
  83. +246 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/NewCamelXmlWizardPage.java
  84. +175 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/NewMessageWizard.java
  85. +220 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/NewMessageWizardPage.java
  86. +210 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/WizardMessages.java
  87. +66 −0 ...s/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/AbstractCreateProjectJob.java
  88. +58 −0 .../org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/AbstractFuseProjectWizard.java
  89. +193 −0 ...ins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/AbstractFuseWizardPage.java
  90. +90 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/ArchetypeDetails.java
  91. +309 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/FuseProjectWizard.java
  92. +1,097 −0 ...fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/FuseProjectWizardArchetypePage.java
  93. +310 −0 ....fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/FuseProjectWizardLocationPage.java
  94. +317 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/SelectionUtil.java
  95. +259 −0 plugins/org.fusesource.ide.branding/src/org/fusesource/ide/branding/wizards/project/WorkingSetGroup.java
  96. +7 −0 plugins/org.fusesource.ide.camel.editor.tests/.classpath
  97. +28 −0 plugins/org.fusesource.ide.camel.editor.tests/.project
  98. +10 −0 plugins/org.fusesource.ide.camel.editor.tests/META-INF/MANIFEST.MF
  99. +6 −0 plugins/org.fusesource.ide.camel.editor.tests/build.properties
  100. BIN  plugins/org.fusesource.ide.camel.editor.tests/icons/route_editor_icon.png
  101. +148 −0 plugins/org.fusesource.ide.camel.editor.tests/plugin.xml
  102. +16 −0 plugins/org.fusesource.ide.camel.editor.tests/pom.xml
  103. +18 −0 plugins/org.fusesource.ide.camel.editor.tests/src/cbrSample.xml
  104. +24 −0 plugins/org.fusesource.ide.camel.editor.tests/src/filterSample.xml
  105. +24 −0 plugins/org.fusesource.ide.camel.editor.tests/src/filterSampleBlueprint.xml
  106. +143 −0 plugins/org.fusesource.ide.camel.editor.tests/src/org/fusesource/ide/camel/editor/XmlMarshalTest.java
  107. +24 −0 plugins/org.fusesource.ide.camel.editor.tests/src/sample.xml
  108. +7 −0 plugins/org.fusesource.ide.camel.editor/.classpath
  109. +28 −0 plugins/org.fusesource.ide.camel.editor/.project
  110. +60 −0 plugins/org.fusesource.ide.camel.editor/META-INF/MANIFEST.MF
  111. +10 −0 plugins/org.fusesource.ide.camel.editor/OSGI-INF/l10n/bundle.properties
  112. +7 −0 plugins/org.fusesource.ide.camel.editor/build.properties
  113. +12 −0 plugins/org.fusesource.ide.camel.editor/contexts.xml
  114. BIN  plugins/org.fusesource.ide.camel.editor/icons/add.png
  115. BIN  plugins/org.fusesource.ide.camel.editor/icons/aggregate.png
  116. BIN  plugins/org.fusesource.ide.camel.editor/icons/aggregate16.png
  117. BIN  plugins/org.fusesource.ide.camel.editor/icons/aggregate24.png
  118. BIN  plugins/org.fusesource.ide.camel.editor/icons/bean.png
  119. BIN  plugins/org.fusesource.ide.camel.editor/icons/bean16.png
  120. BIN  plugins/org.fusesource.ide.camel.editor/icons/bean24.png
  121. BIN  plugins/org.fusesource.ide.camel.editor/icons/camel_context_icon.png
  122. BIN  plugins/org.fusesource.ide.camel.editor/icons/channel.png
  123. BIN  plugins/org.fusesource.ide.camel.editor/icons/channel16.png
  124. BIN  plugins/org.fusesource.ide.camel.editor/icons/channel24.png
  125. BIN  plugins/org.fusesource.ide.camel.editor/icons/channelAdapter.png
  126. BIN  plugins/org.fusesource.ide.camel.editor/icons/channelAdapter16.png
  127. BIN  plugins/org.fusesource.ide.camel.editor/icons/channelAdapter24.png
  128. BIN  plugins/org.fusesource.ide.camel.editor/icons/channelPurger.png
  129. BIN  plugins/org.fusesource.ide.camel.editor/icons/channelPurger16.png
  130. BIN  plugins/org.fusesource.ide.camel.editor/icons/channelPurger24.png
  131. BIN  plugins/org.fusesource.ide.camel.editor/icons/choice.png
  132. BIN  plugins/org.fusesource.ide.camel.editor/icons/choice16.png
  133. BIN  plugins/org.fusesource.ide.camel.editor/icons/choice24.png
  134. BIN  plugins/org.fusesource.ide.camel.editor/icons/commandMessage.png
  135. BIN  plugins/org.fusesource.ide.camel.editor/icons/commandMessage16.png
  136. BIN  plugins/org.fusesource.ide.camel.editor/icons/commandMessage24.png
  137. BIN  plugins/org.fusesource.ide.camel.editor/icons/competingConsumers.png
  138. BIN  plugins/org.fusesource.ide.camel.editor/icons/competingConsumers16.png
  139. BIN  plugins/org.fusesource.ide.camel.editor/icons/competingConsumers24.png
  140. BIN  plugins/org.fusesource.ide.camel.editor/icons/contentBasedRouter.png
  141. BIN  plugins/org.fusesource.ide.camel.editor/icons/contentBasedRouter16.png
  142. BIN  plugins/org.fusesource.ide.camel.editor/icons/contentBasedRouter24.png
  143. BIN  plugins/org.fusesource.ide.camel.editor/icons/contentFilter.png
  144. BIN  plugins/org.fusesource.ide.camel.editor/icons/contentFilter16.png
  145. BIN  plugins/org.fusesource.ide.camel.editor/icons/contentFilter24.png
  146. BIN  plugins/org.fusesource.ide.camel.editor/icons/controlBus.png
  147. BIN  plugins/org.fusesource.ide.camel.editor/icons/controlBus16.png
  148. BIN  plugins/org.fusesource.ide.camel.editor/icons/controlBus24.png
  149. BIN  plugins/org.fusesource.ide.camel.editor/icons/convertBody.png
  150. BIN  plugins/org.fusesource.ide.camel.editor/icons/convertBody16.png
  151. BIN  plugins/org.fusesource.ide.camel.editor/icons/convertBody24.png
  152. BIN  plugins/org.fusesource.ide.camel.editor/icons/correlationIdentifier.png
  153. BIN  plugins/org.fusesource.ide.camel.editor/icons/correlationIdentifier16.png
  154. BIN  plugins/org.fusesource.ide.camel.editor/icons/correlationIdentifier24.png
  155. BIN  plugins/org.fusesource.ide.camel.editor/icons/datatypeChannel.png
  156. BIN  plugins/org.fusesource.ide.camel.editor/icons/datatypeChannel16.png
  157. BIN  plugins/org.fusesource.ide.camel.editor/icons/datatypeChannel24.png
  158. BIN  plugins/org.fusesource.ide.camel.editor/icons/deadLetterChannel.png
  159. BIN  plugins/org.fusesource.ide.camel.editor/icons/deadLetterChannel16.png
  160. BIN  plugins/org.fusesource.ide.camel.editor/icons/deadLetterChannel24.png
  161. BIN  plugins/org.fusesource.ide.camel.editor/icons/detour.png
  162. BIN  plugins/org.fusesource.ide.camel.editor/icons/detour16.png
  163. BIN  plugins/org.fusesource.ide.camel.editor/icons/detour24.png
  164. BIN  plugins/org.fusesource.ide.camel.editor/icons/diagram_view.gif
  165. BIN  plugins/org.fusesource.ide.camel.editor/icons/distributionAggregate.png
  166. BIN  plugins/org.fusesource.ide.camel.editor/icons/distributionAggregate16.png
  167. BIN  plugins/org.fusesource.ide.camel.editor/icons/distributionAggregate24.png
  168. BIN  plugins/org.fusesource.ide.camel.editor/icons/documentMessage.png
  169. BIN  plugins/org.fusesource.ide.camel.editor/icons/documentMessage16.png
  170. BIN  plugins/org.fusesource.ide.camel.editor/icons/documentMessage24.png
  171. BIN  plugins/org.fusesource.ide.camel.editor/icons/durableSubscription.png
  172. BIN  plugins/org.fusesource.ide.camel.editor/icons/durableSubscription16.png
  173. BIN  plugins/org.fusesource.ide.camel.editor/icons/durableSubscription24.png
  174. BIN  plugins/org.fusesource.ide.camel.editor/icons/dynamicRouter.png
  175. BIN  plugins/org.fusesource.ide.camel.editor/icons/dynamicRouter16.png
  176. BIN  plugins/org.fusesource.ide.camel.editor/icons/dynamicRouter24.png
  177. BIN  plugins/org.fusesource.ide.camel.editor/icons/editor/add.png
  178. BIN  plugins/org.fusesource.ide.camel.editor/icons/editor/delete.gif
  179. BIN  plugins/org.fusesource.ide.camel.editor/icons/editor/layout.png
  180. BIN  plugins/org.fusesource.ide.camel.editor/icons/editor/node.png
  181. BIN  plugins/org.fusesource.ide.camel.editor/icons/editor/route.png
  182. BIN  plugins/org.fusesource.ide.camel.editor/icons/encapsulatedSynchronous.png
  183. BIN  plugins/org.fusesource.ide.camel.editor/icons/encapsulatedSynchronous16.png
  184. BIN  plugins/org.fusesource.ide.camel.editor/icons/encapsulatedSynchronous24.png
  185. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpoint.png
  186. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpoint16.png
  187. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpoint24.png
  188. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointDrools.png
  189. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointDrools16.png
  190. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointDrools24.png
  191. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointFile.png
  192. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointFile16.png
  193. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointFile24.png
  194. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointFolder.png
  195. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointFolder16.png
  196. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointFolder24.png
  197. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointQueue.png
  198. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointQueue16.png
  199. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointQueue24.png
  200. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointRepository.png
  201. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointRepository16.png
  202. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointRepository24.png
  203. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointTimer.png
  204. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointTimer16.png
  205. BIN  plugins/org.fusesource.ide.camel.editor/icons/endpointTimer24.png
  206. BIN  plugins/org.fusesource.ide.camel.editor/icons/enrich.png
  207. BIN  plugins/org.fusesource.ide.camel.editor/icons/enrich16.png
  208. BIN  plugins/org.fusesource.ide.camel.editor/icons/enrich24.png
  209. BIN  plugins/org.fusesource.ide.camel.editor/icons/envelopeWrapper.png
  210. BIN  plugins/org.fusesource.ide.camel.editor/icons/envelopeWrapper16.png
  211. BIN  plugins/org.fusesource.ide.camel.editor/icons/envelopeWrapper24.png
  212. BIN  plugins/org.fusesource.ide.camel.editor/icons/eventDrivenConsumer.png
  213. BIN  plugins/org.fusesource.ide.camel.editor/icons/eventDrivenConsumer16.png
  214. BIN  plugins/org.fusesource.ide.camel.editor/icons/eventDrivenConsumer24.png
  215. BIN  plugins/org.fusesource.ide.camel.editor/icons/eventMessage.png
  216. BIN  plugins/org.fusesource.ide.camel.editor/icons/eventMessage16.png
  217. BIN  plugins/org.fusesource.ide.camel.editor/icons/eventMessage24.png
  218. BIN  plugins/org.fusesource.ide.camel.editor/icons/fileTransfer.png
  219. BIN  plugins/org.fusesource.ide.camel.editor/icons/fileTransfer16.png
  220. BIN  plugins/org.fusesource.ide.camel.editor/icons/fileTransfer24.png
  221. BIN  plugins/org.fusesource.ide.camel.editor/icons/filter.png
  222. BIN  plugins/org.fusesource.ide.camel.editor/icons/filter16.png
  223. BIN  plugins/org.fusesource.ide.camel.editor/icons/filter24.png
  224. BIN  plugins/org.fusesource.ide.camel.editor/icons/flow16.png
  225. BIN  plugins/org.fusesource.ide.camel.editor/icons/flow24.png
  226. BIN  plugins/org.fusesource.ide.camel.editor/icons/generic.png
  227. BIN  plugins/org.fusesource.ide.camel.editor/icons/generic16.png
  228. BIN  plugins/org.fusesource.ide.camel.editor/icons/generic24.png
  229. BIN  plugins/org.fusesource.ide.camel.editor/icons/guaranteedMessaging.png
  230. BIN  plugins/org.fusesource.ide.camel.editor/icons/guaranteedMessaging16.png
  231. BIN  plugins/org.fusesource.ide.camel.editor/icons/guaranteedMessaging24.png
  232. BIN  plugins/org.fusesource.ide.camel.editor/icons/idempotentConsumer.png
  233. BIN  plugins/org.fusesource.ide.camel.editor/icons/idempotentConsumer16.png
  234. BIN  plugins/org.fusesource.ide.camel.editor/icons/idempotentConsumer24.png
  235. BIN  plugins/org.fusesource.ide.camel.editor/icons/invalidMessageChannel.png
  236. BIN  plugins/org.fusesource.ide.camel.editor/icons/invalidMessageChannel16.png
  237. BIN  plugins/org.fusesource.ide.camel.editor/icons/invalidMessageChannel24.png
  238. BIN  plugins/org.fusesource.ide.camel.editor/icons/layout.png
  239. BIN  plugins/org.fusesource.ide.camel.editor/icons/loadBalance.png
  240. BIN  plugins/org.fusesource.ide.camel.editor/icons/loadBalance16.png
  241. BIN  plugins/org.fusesource.ide.camel.editor/icons/loadBalance24.png
  242. BIN  plugins/org.fusesource.ide.camel.editor/icons/log.png
  243. BIN  plugins/org.fusesource.ide.camel.editor/icons/log16.png
  244. BIN  plugins/org.fusesource.ide.camel.editor/icons/log24.png
  245. BIN  plugins/org.fusesource.ide.camel.editor/icons/marshal.png
  246. BIN  plugins/org.fusesource.ide.camel.editor/icons/marshal16.png
  247. BIN  plugins/org.fusesource.ide.camel.editor/icons/marshal24.png
  248. BIN  plugins/org.fusesource.ide.camel.editor/icons/message.png
  249. BIN  plugins/org.fusesource.ide.camel.editor/icons/message16.png
  250. BIN  plugins/org.fusesource.ide.camel.editor/icons/message24.png
  251. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageBroker.png
  252. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageBroker16.png
  253. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageBroker24.png
  254. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageBus.png
  255. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageBus16.png
  256. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageBus24.png
  257. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageDispatcher.png
  258. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageDispatcher16.png
  259. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageDispatcher24.png
  260. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageExpiration.png
  261. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageExpiration16.png
  262. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageExpiration24.png
  263. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageSelector.png
  264. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageSelector16.png
  265. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageSelector24.png
  266. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageSequence.png
  267. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageSequence16.png
  268. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageSequence24.png
  269. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageStore.png
  270. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageStore16.png
  271. BIN  plugins/org.fusesource.ide.camel.editor/icons/messageStore24.png
  272. BIN  plugins/org.fusesource.ide.camel.editor/icons/messaging.png
  273. BIN  plugins/org.fusesource.ide.camel.editor/icons/messaging16.png
  274. BIN  plugins/org.fusesource.ide.camel.editor/icons/messaging24.png
  275. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingAdapter.png
  276. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingAdapter16.png
  277. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingAdapter24.png
  278. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingBridge.png
  279. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingBridge16.png
  280. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingBridge24.png
  281. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingGateway.png
  282. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingGateway16.png
  283. BIN  plugins/org.fusesource.ide.camel.editor/icons/messagingGateway24.png
  284. BIN  plugins/org.fusesource.ide.camel.editor/icons/multicast.png
  285. BIN  plugins/org.fusesource.ide.camel.editor/icons/multicast16.png
  286. BIN  plugins/org.fusesource.ide.camel.editor/icons/multicast24.png
  287. BIN  plugins/org.fusesource.ide.camel.editor/icons/node.png
  288. BIN  plugins/org.fusesource.ide.camel.editor/icons/node16.png
  289. BIN  plugins/org.fusesource.ide.camel.editor/icons/node24.png
  290. BIN  plugins/org.fusesource.ide.camel.editor/icons/normalizer.png
  291. BIN  plugins/org.fusesource.ide.camel.editor/icons/normalizer16.png
  292. BIN  plugins/org.fusesource.ide.camel.editor/icons/normalizer24.png
  293. BIN  plugins/org.fusesource.ide.camel.editor/icons/pipeline.png
  294. BIN  plugins/org.fusesource.ide.camel.editor/icons/pipeline16.png
  295. BIN  plugins/org.fusesource.ide.camel.editor/icons/pipeline24.png
  296. BIN  plugins/org.fusesource.ide.camel.editor/icons/pointToPoint.png
  297. BIN  plugins/org.fusesource.ide.camel.editor/icons/pointToPoint16.png
  298. BIN  plugins/org.fusesource.ide.camel.editor/icons/pointToPoint24.png
  299. BIN  plugins/org.fusesource.ide.camel.editor/icons/pollEnrich.png
  300. BIN  plugins/org.fusesource.ide.camel.editor/icons/pollEnrich16.png
Sorry, we could not display the entire diff because too many files (2,943) changed.
14 .gitignore
@@ -0,0 +1,14 @@
+target
+*.iml
+*.ipr
+*.iws
+overlays
+.DS_Store
+.settings
+bin
+runtime-EclipseApplication-m2eclipse
+.metadata
+/runtime-*/
+./fabric
+./fuseenterprise
+.idea
72 addUpdateSiteVersion
@@ -0,0 +1,72 @@
+#!/usr/bin/env ruby
+
+require 'rexml/document'
+include REXML
+
+require 'fileutils'
+include FileUtils
+
+
+if ARGV.size < 1
+ puts "Usage: addUpdateSiteVersion versionNumber [directory] [test]"
+ puts "Use 'ide' to update production otherwise we default to 'beta/ide'"
+ puts "specifying 'test' does not actually perform the upload"
+ exit 0
+end
+
+def add_version(file_name, version, clear = true)
+ file = File.new(file_name)
+ doc = Document.new(file)
+ children = doc.root.elements["children"]
+ if children.to_s.include?(version)
+ puts "File #{file_name} already contains version #{version}"
+ exit 0
+ end
+
+ # always clear!
+ if clear
+ children.elements.delete_all("*")
+ end
+ children.add_text(" ")
+ ne = children.add_element("child").add_attribute("location", version)
+ children.add_text("\n")
+
+ formatter = REXML::Formatters::Pretty.new()
+ io = File.open(file_name, "w")
+ formatter.write(doc, io)
+ io.close
+
+ puts("Added version #{version} to #{file_name}")
+end
+
+version = ARGV[0]
+path = "beta/ide"
+if ARGV.size > 1
+ path = ARGV[1]
+end
+test = false
+if ARGV.size > 2
+ test = true
+end
+
+location = "repo.fusesource.com:/www/repo.fusesource.com/" + path
+
+puts "Adding version #{version} to Eclipse Update XML files at #{location}"
+
+tmpDir = "target"
+mkdir_p(tmpDir)
+
+system("scp #{location}/*.xml #{tmpDir}")
+
+add_version("#{tmpDir}/compositeArtifacts.xml", version)
+add_version("#{tmpDir}/compositeContent.xml", version)
+
+if not test
+ puts "Copying modified files to repo..."
+
+ system("scp #{tmpDir}/*.xml #{location}")
+end
+
+
+
+
337 common.sh
@@ -0,0 +1,337 @@
+#!/bin/bash
+
+basedir="$(cd $(/usr/bin/dirname "${BASH_SOURCE[0]}"); pwd -P)/$(/usr/bin/basename "${BASH_SOURCE[0]}")"
+[[ ! -f "$basedir" ]] && basedir="$(cd $(/usr/bin/dirname "$0"); pwd -P)/$(/usr/bin/basename "$0")"
+[[ ! -f "$basedir" ]] && basedir="" && echo 'No full path to running script found!' && exit 1
+
+basedir="${basedir%/*}"
+cd $basedir
+export basedir=`pwd`
+cd - > /dev/null
+
+# ============================================================================
+# Define the versions used by this run of the release train.
+# ============================================================================
+
+if [ -z "$JAVA_HOME" ] ; then
+ export JAVA_HOME="/usr/lib/jvm/java-6-sun"
+ export PATH="${JAVA_HOME}/bin:${PATH}"
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ export M2_HOME="/opt/apache-maven-3.0.2"
+fi
+export MVN=${M2_HOME}/bin/mvn
+
+if [ -f "$HOME/.m2/m3-release-settings.xml" ] ; then
+ # Use a maven 3 specific settings file if it exists.
+ export MVN="$MVN --settings $HOME/.m2/m3-release-settings.xml"
+fi
+
+export PERFECTUS_TARGET="${basedir}/target/${PERFECUT_ARTIFACT}"
+export MAVEN_OPTS="-Xmx800m -XX:MaxPermSize=192m -Dmaven.artifact.threads=5"
+export MVN="$MVN -Dmaven.repo.local=${PERFECTUS_TARGET}/repo -V -B"
+
+mkdir -p "${PERFECTUS_TARGET}"
+
+home=`cd ; pwd`
+settings=`sed -n '/<servers>/,/<\/servers>/p' ${home}/.m2/settings.xml | sed -n '/<id>fusesource-nexus-staging<\/id>/,/<\/server>/p'`
+NEXUS_USER=`echo $settings | sed -e '/<username>/!d;s/.*<username>\(.*\)<\/username>.*/\1/g'`
+NEXUS_PASSWORD=`echo $settings | sed -e '/<password>/!d;s/.*<password>\(.*\)<\/password>.*/\1/g'`
+NEXUS_URL="http://repo.fusesource.com/nexus"
+
+if [ "x${NEXUS_USER}" == "x" ]; then
+ echo "Variable NEXUS_USER not defined. Aborting."
+ exit 1
+fi
+if [ "x${NEXUS_PASSWORD}" == "x" ]; then
+ echo "Variable NEXUS_PASSWORD not defined. Aborting."
+ exit 1
+fi
+
+# ============================================================================
+# Common functions and setup.
+# ============================================================================
+
+function try {
+ echo "Running: $*"
+ $* 2> /dev/null | tee "${PERFECTUS_TARGET}/run.log"
+ return ${PIPESTATUS[0]}
+}
+
+function run {
+ echo "Running: $*"
+ $* | tee "${PERFECTUS_TARGET}/run.log"
+ rc=${PIPESTATUS[0]}
+ if [ ${rc} -ne 0 ]; then
+ echo "Got unexpected result code ${rc} from command:"
+ echo ""
+ echo " $*"
+ echo ""
+ exit ${rc}
+ fi
+}
+
+function update-version {
+ sed "s/<\($2\)>.*-fuse-.*<\/\1>/<\1>$3<\/\1>/g" "$1" > "$1".new
+ rm "$1"
+ mv "$1".new "$1"
+}
+
+function update-versions {
+ echo "Updating versions found in: $1"
+ update-version "$1" "felix.configadmin.version" "${FELIX_CONFIGADMIN_VERSION}"
+ update-version "$1" "felix.eventadmin.version" "${FELIX_EVENTADMIN_VERSION}"
+ update-version "$1" "felix.framework.version" "${FELIX_FRAMEWORK_VERSION}"
+ update-version "$1" "karaf.version" "${KARAF_VERSION}"
+ update-version "$1" "activemq.version" "${ACTIVEMQ_VERSION}"
+ update-version "$1" "camel.version" "${CAMEL_VERSION}"
+ update-version "$1" "cxf.version" "${CXF_VERSION}"
+ update-version "$1" "servicemix.nmr.version" "${NMR_VERSION}"
+ update-version "$1" "servicemix.components.version" "${COMPONENTS_VERSION}"
+ update-version "$1" "servicemix.utils.version" "${UTILS_VERSION}"
+}
+
+function close-nexus {
+ NEXUS_ARTIFACT="$1"
+
+ echo ============================================================================
+ echo " Closing Nexus Repository"
+ echo ============================================================================
+
+ cd ${basedir}
+ wget --http-user="${NEXUS_USER}" --http-password="${NEXUS_PASSWORD}" -O ${PERFECTUS_TARGET}/wget.tmp "${NEXUS_URL}/service/local/staging/profiles" >> ${PERFECTUS_TARGET}/wget.log 2>&1
+ profiles=`sed -e '/<id>/!d' -e 's|.*<id>\(.*\)</id>.*|\1|g' ${PERFECTUS_TARGET}/wget.tmp`
+ sed -n -e ":a" -e "$ s/\n//gp;N;b a" ${PERFECTUS_TARGET}/wget.tmp > ${PERFECTUS_TARGET}/wget2.tmp
+ for profile in $profiles
+ do
+ #echo "Checking profile $profile"
+ stages=`sed -n '/<id>'$profile'</,/stagingProfile>/p' ${PERFECTUS_TARGET}/wget.tmp | \
+ sed -n '/<stagingRepositoryIds>/,/<\/stagingRepositoryIds>/p' |
+ sed -e '/<string>/!d;s/.*<string>\(.*\)<\/string>.*/\1/g'`
+ for stage in $stages
+ do
+ echo "Check stage $stage in profile $profile"
+ wget --http-user="${NEXUS_USER}" --http-password="${NEXUS_PASSWORD}" -O ${PERFECTUS_TARGET}/wget3.tmp "${NEXUS_URL}/service/local/repositories/${stage}/content/${NEXUS_ARTIFACT}/?isLocal" >> ${PERFECTUS_TARGET}/wget.log 2>&1
+ nb=`cat ${PERFECTUS_TARGET}/wget3.tmp | grep resourceURI | wc -l`
+ if [ $nb -gt 0 ]; then
+ echo "Found matching repository $stage. Closing..."
+ wget -v -d --http-user="${NEXUS_USER}" --http-password="${NEXUS_PASSWORD}" -O ${PERFECTUS_TARGET}/wget4.tmp \
+ --header='Content-Type: application/xml' \
+ --header='Accept: application/xml' \
+ --post-data="<promoteRequest><data><stagedRepositoryId>${stage}</stagedRepositoryId></data></promoteRequest>" \
+ "${NEXUS_URL}/service/local/staging/profiles/${profile}/finish" >> ${PERFECTUS_TARGET}/wget.log 2>&1
+ fi
+ done
+ done
+
+}
+
+function release {
+
+ PROJECT="$1"
+ REPO="$2"
+ BRANCH="$3"
+ RELEASE_VERSION="$4"
+ NEXUS_ARTIFACT="$5"
+
+ WORK_BRANCH="perfectus-work-${PROJECT}-${RELEASE_VERSION}"
+ TAG="${PROJECT}-${RELEASE_VERSION}"
+
+ echo ============================================================================
+ echo " Loading ${PROJECT} SCM data"
+ echo ============================================================================
+
+ if [ ! -d "${PERFECTUS_TARGET}/${PROJECT}" ]; then
+ mkdir -p "${PERFECTUS_TARGET}/${PROJECT}"
+ cd "${PERFECTUS_TARGET}/${PROJECT}"
+ run git init
+ run git remote add origin "${REPO}"
+ fi
+
+ cd "${PERFECTUS_TARGET}/${PROJECT}"
+
+ try git tag -d "${TAG}"
+ run git fetch -q origin --force > /dev/null
+ run git fetch -q origin --force --tags > /dev/null
+
+ # only do the release if the tag does not exist
+ # to avoid steping over an existing release
+ try git show-ref "refs/tags/${TAG}" > /dev/null
+ if [ "$?" -eq 0 ]; then
+
+ echo ""
+ echo " Release already exists in SCM, if you really want me to rebuild the"
+ echo " project, delete the release tag in the git repo. For example:"
+ echo ""
+ echo " git clone ${REPO} ${PROJECT}"
+ echo " cd ${PROJECT}"
+ echo " git push origin :${TAG}"
+ echo ""
+
+ else
+
+ echo
+ echo ============================================================================
+ echo " Releasing ${PROJECT} version ${RELEASE_VERSION}"
+ echo ============================================================================
+
+ try git reset -q --hard
+ try git clean -q -f
+ run git checkout -q -f origin/${BRANCH} 2> /dev/null
+ run git branch -f "${WORK_BRANCH}" origin/${BRANCH}
+ run git checkout -q -f "${WORK_BRANCH}"
+
+ # If a submodule has been specified, this would be a good time to cd into that directory
+ if [ "x" != "x$6" ]; then
+ cd "${PERFECTUS_TARGET}/${PROJECT}/$6"
+ fi
+
+ echo
+ echo Updating pom version data...
+ # Update the versions of the dependencies used.
+ if [ -f parent/pom.xml ] ; then
+ update-versions parent/pom.xml
+ else
+ update-versions pom.xml
+ fi
+
+ # For FUSE ESB 4.4.0, we need to upgrade the parent POM instead of a property
+ # Also, for both features and nmr, the versions:set needs to be invoked on the parent/pom.xml instead
+ # TODO: refactor this to be less of a hack!
+ if [ $PERFECUT_ARTIFACT == "esb-4.4.0-fuse" -a $PROJECT == "smx4-features" ]; then
+ $basedir/update-parent.rb parent/pom.xml $NMR_VERSION
+ run ${MVN} -q \
+ org.codehaus.mojo:versions-maven-plugin:1.2:set \
+ org.codehaus.mojo:versions-maven-plugin:1.2:commit \
+ -DnewVersion="${RELEASE_VERSION}" \
+ --file parent/pom.xml
+ fi
+
+ if [ $PERFECUT_ARTIFACT == "esb-4.4.0-fuse" -a $PROJECT == "nmr" ]; then
+ run ${MVN} -q \
+ org.codehaus.mojo:versions-maven-plugin:1.2:set \
+ org.codehaus.mojo:versions-maven-plugin:1.2:commit \
+ -DnewVersion="${RELEASE_VERSION}" \
+ --file parent/pom.xml
+ fi
+
+ # Switch from the snapshot version to the release version.
+ run ${MVN} -q \
+ org.codehaus.mojo:versions-maven-plugin:1.2:set \
+ org.codehaus.mojo:versions-maven-plugin:1.2:commit \
+ -DnewVersion="${RELEASE_VERSION}"
+
+ # Push the version update in our work branch to the origin
+ git commit -q -am "[perfectus] Update to release version"
+ run git push --force origin "${WORK_BRANCH}"
+
+ # Try to load the resume args.
+ resume_args=`cat ${PERFECTUS_TARGET}/${PROJECT}.resume 2> /dev/null`
+ rm "${PERFECTUS_TARGET}/${PROJECT}.resume" 2> /dev/null
+
+ echo ""
+ if [ ! -z "${resume_args}" ] ; then
+ echo "Resuming maven reactor build from the module that previously failed."
+ else
+ echo "Building maven project"
+ fi
+
+ # Do the releae build and deployment.
+ try ${MVN} \
+ -P release -P enable-schemagen \
+ -Dtest=false \
+ -DfailIfNoTests=false \
+ clean deploy \
+ ${resume_args}
+
+ if [ $? -ne 0 ]; then
+
+ # try to store the resume args..
+ resume_args=`grep "\[ERROR\] mvn <goals> -rf :" "${PERFECTUS_TARGET}/run.log" | cut -c 23-1000`
+ if [ ! -z "${resume_args}" ] ; then
+ echo "${resume_args}" > "${PERFECTUS_TARGET}/${PROJECT}.resume"
+ fi
+
+ echo
+ echo ============================================================================
+ echo " Build Failed for ${PROJECT} on branch ${WORK_BRANCH}"
+ echo ============================================================================
+ echo
+ exit 1
+ fi
+
+ # tag it..
+ run git tag "${TAG}"
+ run git push origin "${TAG}" ":${WORK_BRANCH}"
+
+ #
+ # Close the nexus release repo... so the deployed deps can be loaded but subsequent builds.
+ close-nexus "${NEXUS_ARTIFACT}/${RELEASE_VERSION}"
+
+ echo
+ echo Triggering hudson to perform cross platform testing of the tag ${TAG}
+ echo
+ run curl -q -f -# "http://localhost:8080/hudson/job/${PROJECT}-perfectus-tests/buildWithParameters?token=a83dc6303ed1ddae7405a32f490522a6&TAG=${TAG}"
+
+ fi
+}
+
+function post-release {
+ PROJECT="$1"
+ RELEASE_VERSION="$2"
+ TAG="${PROJECT}-${RELEASE_VERSION}"
+
+ cd "${PERFECTUS_TARGET}/${PROJECT}"
+ try git reset -q --hard
+ try git clean -q -f
+ run git checkout -q -f ${TAG} 2> /dev/null
+
+ echo ============================================================================
+ echo " Downloading ${PROJECT}-${RELEASE_VERSION} dependency sources and javadoc"
+ echo ============================================================================
+ run ${MVN} -fae -T 4C org.apache.maven.plugins:maven-dependency-plugin:2.2:resolve -Dclassifier=sources
+ run ${MVN} -fae -T 4C org.apache.maven.plugins:maven-dependency-plugin:2.2:resolve -Dclassifier=javadoc
+ echo
+ echo ============================================================================
+ echo " Exporting ${PROJECT}-${RELEASE_VERSION} sources"
+ echo ============================================================================
+ try mkdir -p "${PERFECTUS_TARGET}/sources"
+
+ echo "Running: git archive --prefix=${TAG}/ ${TAG} | tar -x -C ../sources/"
+ git archive --prefix=${TAG}/ ${TAG} | tar -x -C ../sources/
+ if [ $? -ne 0 ]; then
+ echo ""
+ echo "git export failed."
+ echo ""
+ exit 1
+ fi
+}
+
+function download-optional-deps {
+ echo
+ echo ============================================================================
+ echo " Downloading optional features"
+ echo ============================================================================
+ run mkdir -p "${PERFECTUS_TARGET}/offline"
+ cd "${PERFECTUS_TARGET}/offline"
+ run tar -xzf ../repo/org/apache/servicemix/apache-servicemix/${FEATURES_VERSION}/apache-servicemix-${FEATURES_VERSION}.tar.gz
+
+ #
+ # Generate pom
+ #
+ echo "<project><modelVersion>4.0.0</modelVersion><groupId>perfectus</groupId><artifactId>optional</artifactId><version>features</version><dependencies>" > pom.xml
+ find . -name *features.xml -exec cat {} \; | \
+ sed -e '/<bundle>/!d;/mvn:/!d;s/^.*<bundle>//g;s/<\/bundle>.*$//g;s/^wrap://g;s/war:\(.*\)?.*/\1/g;s/mvn://g;s/^.*!//g;s/\//\:/g' | \
+ sort -u | \
+ grep -v "com.microsoft.sqlserver:sqljdbc" | \
+ grep -v "oracle:ojdbc5" | \
+ grep -v "org.apache.ode.examples" | \
+ grep -v "org.apache.woden:woden" | \
+ sed -e 's/\(.*\)\:\(.*\)\:\(.*\)\:\(.*\)/<dependency><groupId>\1<\/groupId><artifactId>\2<\/artifactId><version>\3<\/version><type>\4<\/type><\/dependency>/g;s/\(.*\)\:\(.*\)\:\(.*\)/<dependency><groupId>\1<\/groupId><artifactId>\2<\/artifactId><version>\3<\/version><\/dependency>/g' \
+ >> pom.xml
+ echo "</dependencies></project>" >> pom.xml
+
+ run ${MVN} -fae -T 4C org.apache.maven.plugins:maven-dependency-plugin:2.2:resolve -Dclassifier=sources
+ run ${MVN} -fae -T 4C org.apache.maven.plugins:maven-dependency-plugin:2.2:resolve -Dclassifier=javadoc
+}
158 create-release-branch.sh
@@ -0,0 +1,158 @@
+#!/bin/bash
+export PERFECUT_ARTIFACT=ide
+
+MVN_SETTINGS="--settings ${HOME}/.m2/m3-settings.xml"
+
+. `dirname $0 2> /dev/null`/common.sh
+
+ACTION=$1
+
+cd "${basedir}"
+
+git stash
+git checkout master
+git stash
+git pull
+
+BUILDNO=`cat ${PERFECUT_ARTIFACT}-buildno.txt`
+
+BUILDNO=$((${BUILDNO}+1))
+BUILD=`printf "%02d" "$((${BUILDNO}))"`
+
+echo ============================================================================
+echo " Incrementing build train to: ${PERFECUT_ARTIFACT}-${BUILD}"
+echo "Using MVN_SETTINGS: ${MVN_SETTINGS}"
+echo ============================================================================
+
+echo ${BUILDNO} > ${PERFECUT_ARTIFACT}-buildno.txt
+VERSION=3.0.${BUILDNO}
+git commit -a -m "getting ready for version ${VERSION}"
+git push origin master:master
+git stash clear
+
+echo "Creating release branch for ${VERSION}"
+
+git branch release-${VERSION}
+git checkout release-${VERSION}
+
+# root project uses regular maven versions
+find * -name 'pom.xml' | xargs perl -pi -e "s/<version>3.0.0-SNAPSHOT<\/version>/<version>${VERSION}<\/version>/g"
+
+# replace the OSGi version names in poms
+find plugins -name 'pom.xml' | xargs perl -pi -e "s/<version>3.0.0.qualifier<\/version>/<version>${VERSION}<\/version>/g"
+
+# replace manifest versions
+find plugins -name '*.xml' | xargs perl -pi -e "s/3.0.0.qualifier/${VERSION}/g"
+find plugins -name 'bundle.properties' | xargs perl -pi -e "s/3.0.0.qualifier/${VERSION}/g"
+find plugins -name 'MANIFEST.MF' | xargs perl -pi -e "s/3.0.0.qualifier/${VERSION}/g"
+find plugins -name 'fuse*.product' | xargs perl -pi -e "s/3.0.0.qualifier/${VERSION}/g"
+
+# replace IDE version
+perl -pi -e "s/<ide-version>.*<\/ide-version>/<ide-version>${VERSION}<\/ide-version>/g" plugins/pom.xml
+
+echo "Zapping P2 cache of fusesource and snapshot stuff"
+rm -rf /mnt/hudson/.m2/repository/p2/osgi/bundle/org.fusesource*
+rm -rf /mnt/hudson/.m2/repository/p2/osgi/bundle/com.fusesource*
+rm -rf /mnt/hudson/.m2/repository/p2/osgi/bundle/*/*SNAPSHOT
+
+rm -rf /mnt/hudson/.m2/repository/org/fusesource/
+rm -rf /mnt/hudson/.m2/repository/com/fusesource/
+
+echo "Building the update site..."
+cd plugins
+#mvn ${MVN_SETTINGS} -Psign -Dkeystore=$PWD/fusesource.ks -Dstorepass=sp33d0 -Dalias=fusesource.com clean install
+#mvn ${MVN_SETTINGS} clean install
+
+# lets not fail the build if tests fail
+mvn ${MVN_SETTINGS} -Dtest=false -DfailIfNoTests=false -Dmaven.test.skip=true clean install
+
+if [ $? -eq 0 ] # Test exit status of "mvn" command.
+then
+ echo "Build succeeded. Progress to update site deployment..."
+else
+ echo "Build failed. Exit now..."
+# exit $?
+fi
+
+cd org.fusesource.ide.updatesite
+mvn ${MVN_SETTINGS} updatesite:deploy
+
+if [ $? -eq 0 ] # Test exit status of "mvn" command.
+then
+ echo "Deployment succeeded. Progress to RCP build..."
+else
+ echo "Deployment failed. Exit now..."
+ exit $?
+fi
+
+echo ============================================================================
+echo "Update site complete now updating the update site versions"
+echo ============================================================================
+
+cd ../..
+
+# echo "Build deployed - press OK to continue to update the site with the updated version"
+# read dummy
+
+# update the update site versions
+./addUpdateSiteVersion ${VERSION} beta/3.0.x
+
+
+echo ============================================================================
+echo "Creating the RCP build"
+echo ============================================================================
+
+cd plugins/rcp_build
+#mvn ${MVN_SETTINGS} -Psign -Dkeystore=$PWD/fusesource.ks -Dstorepass=sp33d0 -Dalias=fusesource.com clean install
+mvn ${MVN_SETTINGS} clean install
+
+if [ $? -eq 0 ] # Test exit status of "mvn" command.
+then
+ echo "Build succeeded. Progress to integration testing..."
+else
+ echo "Build failed. Exit now..."
+ exit $?
+fi
+
+echo "Deploying the distribution archives"
+echo ============================================================================
+
+cd org.fusesource.ide.rcp.product
+mvn ${MVN_SETTINGS} updatesite:deploy
+
+if [ $? -eq 0 ] # Test exit status of "mvn" command.
+then
+ echo "RCP deployment succeeded. Clean up and exit..."
+else
+ echo "RCP deployment failed. Exit now..."
+ exit $?
+fi
+
+
+
+echo "Executing the integration tests"
+echo ============================================================================
+cd ../testing
+mvn ${MVN_SETTINGS} clean install -Djubula.home=/opt/jubula_5.2.00266 -Djubula.plugin.archive=/opt/jubula_5.2.00266/rcp-support.zip
+
+if [ $? -eq 0 ] # Test exit status of "mvn" command.
+then
+ echo "Integration testing succeeded. Progress to RCP deployment..."
+else
+ echo "Integration testing failed. Exit now..."
+ exit $?
+fi
+
+cd ../../..
+
+echo "Deployed update site for Release ${VERSION}"
+echo "Now committing branch"
+
+git commit -a -m "Release ${VERSION}"
+git push origin release-${VERSION}
+
+git checkout master
+
+echo "One it has been tested, move it to the production repo area"
+
+
30 delete-release-branch.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+export PERFECUT_ARTIFACT=ide
+
+. `dirname $0 2> /dev/null`/common.sh
+
+ACTION=$1
+cd "${basedir}"
+
+
+BUILDNO=`cat ${PERFECUT_ARTIFACT}-buildno.txt`
+VERSION=1.1.${BUILDNO}
+
+echo "Deleting release branch for ${VERSION}"
+
+read -p "Are you sure you want to continue? <y/N> " prompt
+if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
+then
+ git stash
+ git checkout master
+ git branch -D release-${VERSION}
+ echo "Branch release-${VERSION} deleted"
+else
+ exit 0
+fi
+
+
+
+
+
+
100 etc/settings.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<settings>
+ <servers>
+ <server>
+ <id>fusesource-proxy</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>fusesource-nexus-staging</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>fusesource-nexus-snapshots</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+
+ <server>
+ <id>fusesource.subscriber-snapshot</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>fusesource-nexus-staging</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>fusesource-nexus-snapshots</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>release.fusesource.org</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>snapshot.fusesource.org</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>website.fusesource.org</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>open.iona.m2-internal</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>open.iona.m2-internal-snapshot</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>fusesource.m2-internal</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+
+ <server>
+ <id>apache</id>
+ <username>USERNAME</username>
+ <directoryPermissions>775</directoryPermissions>
+ <filePermissions>664</filePermissions>
+ </server>
+ <server>
+ <id>apache.repo</id>
+ <username>USERNAME</username>
+ <directoryPermissions>775</directoryPermissions>
+ <filePermissions>664</filePermissions>
+ </server>
+ <server>
+ <id>apache.snapshots</id>
+ <username>USERNAME</username>
+ <directoryPermissions>775</directoryPermissions>
+ <filePermissions>664</filePermissions>
+ </server>
+ <server>
+ <id>apache.website</id>
+ <username>USERNAME</username>
+ <directoryPermissions>775</directoryPermissions>
+ <filePermissions>664</filePermissions>
+ </server>
+ </servers>
+
+ <mirrors>
+ <mirror>
+ <id>fusesource-proxy</id>
+ <mirrorOf>*</mirrorOf>
+ <url>http://repo.fusesource.com/nexus/content/groups/m2-proxy</url>
+ </mirror>
+ </mirrors>
+
+</settings>
1  ide-buildno.txt
@@ -0,0 +1 @@
+46
4 ide-buildtools/.gitignore
@@ -0,0 +1,4 @@
+overlays
+target
+fuse-ide-archetypes
+.idea
112 ide-buildtools/pom.xml
@@ -0,0 +1,112 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.fusesource.ide</groupId>
+ <artifactId>project</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>ide-buildtools</artifactId>
+
+ <name>${project.artifactId}</name>
+ <description>IDE build tools</description>
+
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.fusesource.insight</groupId>
+ <artifactId>insight-maven</artifactId>
+ <version>${fabric-version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.scala-tools</groupId>
+ <artifactId>maven-scala-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jvmArgs>
+ <jvmArg>-Xmx1024m</jvmArg>
+ </jvmArgs>
+ <args>
+ <!-- arg>-unchecked</arg -->
+ <arg>-deprecation</arg>
+ </args>
+ <scalaVersion>${scala-version}</scalaVersion>
+ </configuration>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <mainClass>org.fusesource.ide.buildtools.UpdateReleases</mainClass>
+ <cleanupDaemonThreads>false</cleanupDaemonThreads>
+<!--
+ <arguments>
+ <argument></argument>
+ </arguments>
+-->
+ <systemProperties>
+ <systemProperty>
+ <key>basedir</key>
+ <value>${basedir}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>fabric-version</key>
+ <value>${fabric-version}</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>jrebel</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-jrebel</artifactId>
+ <version>${jersey-version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+</project>
134 ide-buildtools/src/main/scala/org/fusesource/ide/buildtools/DownloadFuseArchetypes.scala
@@ -0,0 +1,134 @@
+package org.fusesource.ide.buildtools
+
+import xml.XML
+import collection.JavaConversions._
+import collection.mutable.{HashMap, HashSet, Set}
+import org.fusesource.scalate.util.IOUtil
+import java.io.{FileWriter, PrintWriter, File}
+import org.fusesource.insight.maven.aether.Aether
+import java.net.{HttpURLConnection, Authenticator, URL}
+
+case class GroupAndArtifact(groupId: String, artifactId: String) extends Ordered[GroupAndArtifact] {
+
+ def compare(that: GroupAndArtifact) = {
+ var answer = groupId.compareTo(that.groupId)
+ if (answer == 0) {
+ answer = artifactId.compareTo(that.artifactId)
+ }
+ answer
+ }
+}
+
+class DownloadFuseArchetypes(outputDir: File = new File("fuse-ide-archetypes"), delete: Boolean = false) extends Runnable {
+ val online = true
+ //val archetypeCatalog = "http://repo.fusesource.com/nexus/content/repositories/releases/archetype-catalog.xml"
+
+ // use direct port to avoid proxy server timing out on us :)
+ //val archetypeCatalog = "http://repo.fusesource.com:8082/" + UpdateReleases.releaseRepo + "/archetype-catalog.xml"
+ val archetypeCatalog = "http://repo.fusesource.com:8081/" + UpdateReleases.releaseRepo + "/archetype-catalog.xml"
+ //val archetypeCatalog = "http://repo.fusesource.com:8000/" + UpdateReleases.releaseRepo + "/archetype-catalog.xml"
+ //val archetypeCatalog = "http://repo.fusesource.com/" + UpdateReleases.releaseRepo + "/archetype-catalog.xml"
+
+ var aether = new Aether()
+
+
+ override def toString = "Download latest archetypes to: " + outputDir
+
+ def run(): Unit = {
+ if (!outputDir.exists()) {
+ throw new IllegalArgumentException("No outputDir exists! " + outputDir)
+ }
+ val xml = if (online) {
+ println("Loading archetype catalog from: " + archetypeCatalog)
+ val url = new URL(archetypeCatalog)
+ val huc = url.openConnection().asInstanceOf[HttpURLConnection]
+ huc.setConnectTimeout(30 * 1000)
+ huc.setReadTimeout(2 * 60 * 60 * 1000)
+ huc.setRequestMethod("GET")
+ huc.connect()
+ val input = huc.getInputStream()
+ XML.load(input)
+ } else {
+ val url = getClass.getClassLoader.getResource("archetype-catalog.xml")
+ assert(url != null, "Could not find archetype-catalog.xml")
+ XML.load(url)
+ }
+
+ val versions = HashMap[GroupAndArtifact, Set[String]]()
+ val descriptions = HashMap[GroupAndArtifact, String]()
+
+ val badVersions = Set("2.1.3.2-fuse", "1.4.1.0-fuse", "fuse-1.0.0.1", "3.3.1.9-fuse", "2.2.2-fuse-04-06")
+ val archetypes = xml \\ "archetype"
+
+ if (delete) {
+ IOUtil.recursiveDelete(outputDir)
+ outputDir.mkdirs()
+ }
+
+ for (a <- archetypes) {
+ val gid = (a \ "groupId").text
+ val aid = (a \ "artifactId").text
+ val version = (a \ "version").text
+ val desc = (a \ "description").text
+
+ def validArchetype = {
+ // lets ignore all old archetypes...
+ if (gid.contains("camel")) {
+ aid != "camel-archetype-war"
+ } else {
+ // lets ignore servicemix, karaf, cxf archetypes for now
+ !gid.startsWith("org.apache.servicemix") && !gid.startsWith("org.apache.cxf") && !gid.startsWith("org.apache.karaf")
+ }
+ }
+
+ if (gid.size > 0 && aid.size > 0 &&
+ (version.contains(UpdateReleases.fuseVersion) || version.contains(UpdateReleases.fuseArchetypeVersion))) {
+ if (validArchetype) {
+ val ga = GroupAndArtifact(gid, aid)
+ val set = versions.getOrElseUpdate(ga, new HashSet[String])
+ set += version
+ descriptions(ga) = desc
+ } else {
+ println("IGNORE: archetype " + a)
+ }
+ }
+ }
+
+ // now lets clear the authenticator
+ println("==== clearing the authenticator so we can download archetypes")
+ Authenticator.setDefault(null)
+
+ outputDir.mkdirs
+ val out = new PrintWriter(new FileWriter(new File(outputDir, "archetypes.xml")))
+ out.println("<archetypes>")
+ val gas = versions.keys.toList.sorted
+ for (ga <- gas) {
+ val version = versions(ga).max
+ val desc = descriptions(ga)
+ if (version.contains("fuse") && !badVersions.contains(version)) {
+ downloadArchetype(ga, version, desc)
+ out.println("<archetype groupId='" + ga.groupId + "' artifactId='" + ga.artifactId + "' version='" + version + "'>" + desc + "</archetype>")
+ }
+
+ }
+ out.println("</archetypes>")
+ out.close
+
+ println("Running git add...")
+ val pb = new ProcessBuilder("git", "add", "*")
+ pb.directory(outputDir)
+ pb.start()
+ }
+
+ def downloadArchetype(ga: GroupAndArtifact, version: String, desc: String) = {
+ println(ga.groupId + ":" + ga.artifactId + ":" + version)
+
+ val result = aether.resolve(ga.groupId, ga.artifactId, version)
+
+ val dir = outputDir
+ for (file <- result.resolvedFiles) {
+ val newFile = new File(dir, file.getName)
+ IOUtil.copy(file, newFile)
+ }
+ }
+}
87 ide-buildtools/src/main/scala/org/fusesource/ide/buildtools/DownloadLatestXsds.scala
@@ -0,0 +1,87 @@
+package org.fusesource.ide.buildtools
+
+import java.net.URL
+import org.fusesource.scalate.util.IOUtil
+import java.io.File
+
+case class Schema(val name: String, val postfix: String = "", val group: String = "camel")
+
+class DownloadLatestXsds(rootDir: File, delete: Boolean) extends Runnable {
+
+ override def toString = "Downloading latest XSDs to: " + rootDir
+
+ val xsdArchetypes = List(
+ Schema("activemq-core", "", "activemq"),
+ Schema("activemq-ra", "", "activemq"),
+ Schema("camel-blueprint"),
+ Schema("camel-cxf", "-blueprint"), Schema("camel-cxf", "-spring"),
+ Schema("camel-spring"), Schema("camel-spring-integration"), Schema("camel-spring-security"))
+
+ def run(): Unit = {
+ if (!rootDir.exists()) {
+ throw new IllegalArgumentException("XSD root dir " + rootDir + " does not exist!")
+ }
+ val outputDir = new File(rootDir, "xsd/fuse")
+ // lets delete all the XSDs to start with
+ if (delete && outputDir.exists()) {
+ IOUtil.recursiveDelete(outputDir)
+ }
+ outputDir.mkdirs()
+
+ val r = """<a href=\"(.*)\">(.*)</a>""".r
+
+ val pluginXmlBuffer = new StringBuilder("""<?xml version="1.0" encoding="UTF-8"?>
+ <?eclipse version="3.4"?>
+ <plugin>
+ <extension
+ point="org.eclipse.wst.xml.core.catalogContributions">
+ <catalogContribution id="org.fusesource.ide.catalogs">
+ """)
+
+ for (Schema(n, postfix, group) <- xsdArchetypes) {
+ println("Finding " + n + " group: " + group + " postfix '" + postfix + "'")
+ val u = "http://repo.fusesource.com/" + UpdateReleases.releaseRepo + "/org/apache/" + group + "/" + n + "/"
+ val text = IOUtil.loadText(new URL(u).openStream())
+ val seq = r.findAllIn(text)
+ val ms = seq.matchData
+ var href = ""
+ var version = ""
+ for (m <- ms) {
+ // TODO lets assume that things are in order!
+ val g1 = m.group(1)
+ val g2 = m.group(2)
+ if (g1.contains(n) && !g2.startsWith("fuse") && !g2.contains("iona") && (g2.contains(UpdateReleases.fuseVersion))) {
+ href = g1
+ version = g2
+ }
+ }
+ val fileName = n + "-" + version.stripSuffix("/") + postfix + ".xsd"
+ val xsd = href + fileName
+ val outFile = new File(outputDir, fileName)
+ println("Downloading xsd: " + xsd + " to " + outFile)
+ IOUtil.copy(new URL(xsd).openStream(), outFile)
+
+ pluginXmlBuffer.append(" <uri\n id=\"org.fusesource.xml.catalog.uri." + n
+ + "\"\n name=\"http://" + group + ".apache.org/schema/" + n.substring(n.indexOf('-') + 1) + "/" + n + ".xsd\"\n"
+ + " uri=\"xsd/fuse/" + fileName + "\"/>\n")
+ }
+
+ pluginXmlBuffer.append("""
+
+ </catalogContribution>
+ </extension>
+
+ </plugin>
+ """)
+
+ val pluginXml = new File(rootDir, "plugin.xml")
+ println("Regenerating " + pluginXml)
+ IOUtil.writeText(pluginXml, pluginXmlBuffer.toString())
+
+
+ println("Running git add...")
+ val pb = new ProcessBuilder("git", "add", "*")
+ pb.directory(outputDir)
+ pb.start()
+ }
+}
74 ide-buildtools/src/main/scala/org/fusesource/ide/buildtools/UpdateReleases.scala
@@ -0,0 +1,74 @@
+package org.fusesource.ide.buildtools
+
+import java.net.{PasswordAuthentication, Authenticator}
+import java.util.Properties
+import java.io.{FileInputStream, File}
+import org.sonatype.aether.repository.Authentication
+import org.fusesource.insight.maven.aether.Authentications
+
+/**
+ * Downloads the latest XSDs and archetypes into the IDE build
+ */
+object UpdateReleases {
+
+ val fuseArchetypeVersion = System.getProperty("fabric-version", "7.1.0-fuse-015")
+ val fuseVersion = "fuse-71-" + fuseArchetypeVersion.split("-").last
+
+ val releaseRepo = if (true)
+ "nexus/content/groups/m2-release-proxy"
+ else
+ "nexus/content/repositories/releases"
+
+ val fuseAuthenticator = new FuseRepoAuthenticator()
+
+
+ def main(args: Array[String]): Unit = {
+ println("Using fuseVersion " + fuseVersion + " and fuseArchetypeVersion " + fuseArchetypeVersion)
+ println("Adding new authenticator!!!")
+ Authenticator.setDefault(fuseAuthenticator)
+
+ // lets find the eclipse plugins directory
+ var rs = new File("../eclipse-tooling")
+ if (args.length > 1) {
+ rs = new File(args(0))
+ } else if (!rs.exists()) {
+ rs = new File("../../eclipse-tooling")
+ }
+
+ println("Using IDE directory: " + rs.getAbsolutePath)
+ if (!rs.exists()) {
+ fail("IDE directory does not exist!")
+ }
+ if (!rs.isDirectory()) {
+ fail("IDE directory is a file, not a directory!")
+ }
+
+ val archetypesDir = new File(rs, "org.fusesource.ide.branding/archetypes")
+ val xsdsDir = new File(rs, "org.fusesource.ide.catalogs")
+
+ val tasks = List(
+ new DownloadFuseArchetypes(archetypesDir, true),
+ new DownloadLatestXsds(xsdsDir, true)
+ )
+
+ for (task <- tasks) {
+ println("Starting: " + task)
+ task.run()
+ }
+ println("Done!")
+ }
+
+ protected def fail(message: String): Unit = {
+ println(message)
+ System.exit(1)
+ }
+}
+class FuseRepoAuthenticator extends Authenticator {
+ override def getPasswordAuthentication() : PasswordAuthentication = {
+ val authentication = Authentications.getFuseRepoAuthentication()
+ val username = authentication.getUsername
+ val password = authentication.getPassword()
+ return new PasswordAuthentication(username, password.toCharArray());
+ }
+}
+
37 ide-buildtools/src/test/resources/logback-test.xml
@@ -0,0 +1,37 @@
+<configuration scan="true" debug="false">
+ <!-- TODO in production mode disable the scan -->
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <File>target/application.log</File>
+ <Append>true</Append>
+
+ <encoder>
+ <pattern>%-4relative [%thread] %-5level %logger{40} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+<!--
+ uncomment any of these lines to enable debug logging
+
+ <logger name="org.fusesource.scalate.jersey" level="DEBUG" />
+ <logger name="org.fusesource.scalate" level="DEBUG" />
+-->
+
+ <logger name="org.fusesource.insight" level="DEBUG" />
+
+
+ <logger name="org.fusesource.scalate.servlet.ServletTemplateEngine.SourceMap" level="INFO" />
+
+ <root level="info">
+ <appender-ref ref="FILE" />
+ <appender-ref ref="STDOUT" />
+ </root>
+
+</configuration>
4 ide-codegen/.gitignore
@@ -0,0 +1,4 @@
+overlays
+target
+fuse-ide-archetypes
+.idea
112 ide-codegen/pom.xml
@@ -0,0 +1,112 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.fusesource.ide</groupId>
+ <artifactId>project</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>ide-codegen</artifactId>
+
+ <name>${project.artifactId}</name>
+ <description>IDE Code Generator</description>
+
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.fusesource.fabric</groupId>
+ <artifactId>camel-tooling-util</artifactId>
+ <version>${fabric-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.fusesource.scalate</groupId>
+ <artifactId>scalate-core</artifactId>
+ <version>${scalate-version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.scala-tools</groupId>
+ <artifactId>maven-scala-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jvmArgs>
+ <jvmArg>-Xmx1024m</jvmArg>
+ </jvmArgs>
+ <args>
+ <!-- arg>-unchecked</arg -->
+ <arg>-deprecation</arg>
+ </args>
+ <scalaVersion>${scala-version}</scalaVersion>
+ </configuration>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <mainClass>org.fusesource.ide.generator.Main</mainClass>
+ <cleanupDaemonThreads>false</cleanupDaemonThreads>
+<!--
+ <arguments>
+ <argument></argument>
+ </arguments>
+-->
+ <systemProperties>
+ <systemProperty>
+ <key>basedir</key>
+ <value>${basedir}</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>jrebel</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-jrebel</artifactId>
+ <version>${jersey-version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+</project>
21 ...codegen/src/main/resources/org/fusesource/ide/generator/eclipse/ComplexProperties.txt.ssp
@@ -0,0 +1,21 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+<%
+import org.apache.camel.model.{OtherwiseDefinition, WhenDefinition}
+%>
+#
+# NOTE - this file is auto-generated using Scalate.
+#
+# DO NOT EDIT!
+#
+
+
+#for (n <- nodeDefinitions)
+#for (p <- n.complexProperties)
+ <%
+ val valid = !classOf[WhenDefinition].isAssignableFrom(p.propertyType) && !classOf[OtherwiseDefinition].isAssignableFrom(p.propertyType) && !n.isBeanProperty(p)
+ %>
+ #if(valid)
+${n.definitionName.capitalize} ${p.name}
+ #end
+#end
+#end
52 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/Messages.java.ssp
@@ -0,0 +1,52 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.model.generated;
+
+import org.eclipse.osgi.util.NLS;
+import java.util.*;
+
+/**
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.fusesource.ide.camel.model.l10n.messages";
+ private static final Map<String,String> map = new HashMap<String,String>();
+
+ public static String invalidValidatorValueLabel;
+ public static String invalidValidatorUniqueValueLabel;
+
+ public static String propertyLabelId;
+ public static String propertyLabelDescription;
+ public static String propertyLabelEndpointUri;
+ public static String propertyLabelInheritErrorHandler;
+
+#for (n <- nodeDefinitions)
+#for (p <- n.beanProperties)
+ public static String propertyLabel${n.definitionName.capitalize}${p.name.capitalize};
+#end
+
+#end
+
+ /**
+ * Takes a key of the form Pattern.PropertyName and returns the label
+ */
+ public static String propertyLabel(String key) {
+ return map.get("propertyLabel" + key);
+ }
+
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+
+#for (n <- nodeDefinitions)
+#for (p <- n.beanProperties)
+ map.put("propertyLabel${n.definitionName.capitalize}.${p.name.capitalize}", propertyLabel${n.definitionName.capitalize}${p.name.capitalize});
+#end
+#end
+ }
+}
34 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/NodeFactory.java.ssp
@@ -0,0 +1,34 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.model.generated;
+
+import org.fusesource.ide.camel.model.AbstractNode;
+import org.fusesource.ide.camel.model.Endpoint;
+import org.fusesource.ide.camel.model.RouteContainer;
+
+import org.apache.camel.model.*;
+
+/**
+ * Provides a factory method to create the Eclipse model for a given Camel node
+ */
+public class NodeFactory {
+
+ public static AbstractNode createNode(ProcessorDefinition processor, RouteContainer parent) {
+ if (processor instanceof ToDefinition) {
+ return Endpoint.newInstance((ToDefinition) processor, parent);
+ }
+#for (n <- nodeDefinitions)
+ else if (processor instanceof ${n.name}) {
+ return new ${n.definitionName}((${n.name}) processor, parent);
+ }
+#end
+ else {
+ throw new IllegalArgumentException("Camel node not supported: " + processor);
+ }
+ }
+
+}
56 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/Tooltips.java.ssp
@@ -0,0 +1,56 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.model.generated;
+
+import org.eclipse.osgi.util.NLS;
+import java.util.*;
+
+public class Tooltips extends NLS {
+
+ private static final String BUNDLE_NAME = "org.fusesource.ide.camel.model.l10n.tooltips";
+ private static final Map<String,String> map = new HashMap<String,String>();
+
+ public static String tooltipAbstractNode;
+ public static String tooltipAbstractNodeId;
+ public static String tooltipAbstractNodeDescription;
+
+ public static String tooltipEndpoint;
+ public static String tooltipEndpointUrl;
+
+#for (n <- nodeDefinitions)
+ public static String tooltip${n.definitionName.capitalize};
+#for (p <- n.beanProperties)
+ public static String tooltip${n.definitionName.capitalize}${p.name.capitalize};
+#end
+
+#end
+
+ public static String tooltip(String key) {
+ return map.get("tooltip" + key);
+ }
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Tooltips.class);
+
+ map.put("AbstractNode", tooltipAbstractNode);
+ map.put("AbstractNode.Id", tooltipAbstractNodeId);
+ map.put("AbstractNode.Description", tooltipAbstractNodeDescription);
+
+ map.put("Endpoint", tooltipEndpoint);
+ map.put("Endpoint.Url", tooltipEndpointUrl);
+
+ map.put("Route", tooltipRoute);
+
+#for (n <- nodeDefinitions)
+ map.put("tooltip${n.definitionName.capitalize}", tooltip${n.definitionName.capitalize});
+#for (p <- n.beanProperties)
+ map.put("tooltip${n.definitionName.capitalize}.${p.name.capitalize}", tooltip${n.definitionName.capitalize}${p.name.capitalize});
+#end
+#end
+ }
+}
48 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/editor/Messages.java.ssp
@@ -0,0 +1,48 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author lhein
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.fusesource.ide.camel.editor.l10n.messages";
+
+ public static String editorSourcePageTitle;
+ public static String editorDesignPageTitle;
+ public static String endpointsDrawerTitle;
+ public static String routingDrawerTitle;
+ public static String controlFlowDrawerTitle;
+ public static String transformationDrawerTitle;
+ public static String miscellaneousDrawerTitle;
+
+ public static String addNodeCommandLabel;
+ public static String reOrderNodeCommandLabel;
+ public static String createNodeCommandLabel;
+ public static String deleteFlowCommandLabel;
+ public static String moveConnectionStartpointCommandLabel;
+ public static String moveConnectionEndpointCommandLabel;
+ public static String createFlowCommandLabel;
+
+ public static String paletteEndpointTitle;
+ public static String paletteEndpointDescription;
+
+
+#for (n <- nodeDefinitions)
+ public static String palette${n.definitionName.capitalize}Title;
+ public static String palette${n.definitionName.capitalize}Description;
+
+#end
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
79 ...fusesource/ide/generator/eclipse/editor/editor/palette/RiderEditorPaletteFactory.java.ssp
@@ -0,0 +1,79 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+#{
+ def fillPalette(group: String) = {
+ for (n <- nodeDefinitions if n.group == group) {
+ val smallIcon = findIconFileOrElse(eclipseIconDir, n.id + "16", n.defaultImageName + "16.png")
+ val bigIcon = findIconFileOrElse(eclipseIconDir, n.id + "24", n.defaultImageName + "24.png")
+}#
+ registerPaletteItem(drawer, Messages.palette${n.definitionName.capitalize}Title, Messages.palette${n.definitionName.capitalize}Description, ${n.definitionName.capitalize}.class,
+ getImageDescriptor("${smallIcon}"),
+ getImageDescriptor("${bigIcon}"));
+#{
+ }
+ }
+}#
+
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.editor.editor.palette;
+
+import org.eclipse.gef.palette.PaletteDrawer;
+
+import org.fusesource.ide.camel.editor.Messages;
+import org.fusesource.ide.camel.model.Endpoint;
+import org.fusesource.ide.camel.model.generated.*;
+import org.fusesource.ide.camel.model.generated.Process;
+
+/**
+ * @author lhein
+ */
+public class RiderEditorPaletteFactory extends
+ AbstractRiderEditorPaletteFactory {
+
+ /* (non-Javadoc)
+ * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillEndpointsDrawer(org.eclipse.gef.palette.PaletteDrawer)
+ */
+ @Override
+ protected void fillEndpointsDrawer(PaletteDrawer drawer) {
+ registerPaletteItem(drawer, Messages.paletteEndpointTitle, Messages.paletteEndpointDescription, Endpoint.class,
+ getImageDescriptor("endpoint16.png"),
+ getImageDescriptor("endpoint24.png"));
+
+ ${fillPalette("Endpoints")}
+ }
+
+ /* (non-Javadoc)
+ * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillRoutingDrawer(org.eclipse.gef.palette.PaletteDrawer)
+ */
+ @Override
+ protected void fillRoutingDrawer(PaletteDrawer drawer) {
+ ${fillPalette("Routing")}
+ }
+
+ /* (non-Javadoc)
+ * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillControlDrawer(org.eclipse.gef.palette.PaletteDrawer)
+ */
+ @Override
+ protected void fillControlDrawer(PaletteDrawer drawer) {
+ ${fillPalette("Control Flow")}
+ }
+
+ /* (non-Javadoc)
+ * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillTransformationDrawer(org.eclipse.gef.palette.PaletteDrawer)
+ */
+ @Override
+ protected void fillTransformationDrawer(PaletteDrawer drawer) {
+ ${fillPalette("Transformation")}
+ }
+
+ /* (non-Javadoc)
+ * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillMiscellaneousDrawer(org.eclipse.gef.palette.PaletteDrawer)
+ */
+ @Override
+ protected void fillMiscellaneousDrawer(PaletteDrawer drawer) {
+ ${fillPalette("Miscellaneous")}
+ }
+}
42 ...c/main/resources/org/fusesource/ide/generator/eclipse/editor/l10n/messages.properties.ssp
@@ -0,0 +1,42 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+#
+# NOTE - this file is auto-generated using Scalate.
+#
+# DO NOT EDIT!
+#
+editorSourcePageTitle=Source
+editorDesignPageTitle=Design
+endpointsDrawerTitle=Endpoints
+routingDrawerTitle=Routing
+controlFlowDrawerTitle=Control Flow
+transformationDrawerTitle=Transformation
+miscellaneousDrawerTitle=Miscellaneous
+addNodeCommandLabel=Add
+reOrderNodeCommandLabel=Reorder
+createNodeCommandLabel=Create
+deleteFlowCommandLabel=Disconnect
+moveConnectionStartpointCommandLabel=Move connection startpoint
+moveConnectionEndpointCommandLabel=Move connection endpoint
+createFlowCommandLabel=Create Flow
+
+paletteEndpointTitle=Endpoint
+paletteEndpointDescription=Creates an endpoint
+
+#for (n <- nodeDefinitions)
+palette${n.definitionName.capitalize}Title = ${n.definitionName.capitalize}
+palette${n.definitionName.capitalize}Description = Creates#if (n.definitionName.toLowerCase.matches("(a|e|i|o|u).*")) an #else a #end ${n.definitionName}
+
+#end
+
+<%--
+paletteBeanTitle=Bean
+paletteBeanDescription=Creates a bean
+paletteIdempotentConsumerTitle=Idempotent Consumer
+paletteIdempotentConsumerDescription=Creates an idempotent consumer
+paletteLogTitle=Log
+paletteLogDescription=Creates a log
+paletteProcessTitle=Process
+paletteProcessDescription=Creates a process
+paletteFlowTitle=Flow
+paletteFlowDescription=Creates a flow
+--%>
97 ...rg/fusesource/ide/generator/eclipse/editor/provider/generated/AddNodeMenuFactory.java.ssp
@@ -0,0 +1,97 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+#{
+ def fillPalette(group: String, params: String) = {
+ for (n <- nodeDefinitions if n.group == group) {
+ val smallIcon = findIconFileOrElse(eclipseIconDir, n.id + "16", n.defaultImageName + "16.png")
+ val bigIcon = findIconFileOrElse(eclipseIconDir, n.id + "24", n.defaultImageName + "24.png")
+}#
+#if (n.definitionName.capitalize != "Route")
+ addMenuItem(menu, Messages.palette${n.definitionName.capitalize}Title, Messages.palette${n.definitionName.capitalize}Description, ${n.definitionName.capitalize}.class${params});
+#end
+#{
+ }
+ }
+}#
+
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.editor.provider.generated;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.tb.ContextMenuEntry;
+
+import org.fusesource.ide.camel.editor.Messages;
+import org.fusesource.ide.camel.editor.provider.AbstractAddNodeMenuFactory;
+import org.fusesource.ide.camel.model.Endpoint;
+import org.fusesource.ide.camel.model.generated.*;
+import org.fusesource.ide.camel.model.generated.Process;
+
+/**
+ * A helper class for creating a popup menu to allow the addition of new nodes in a context menu.
+ */
+public class AddNodeMenuFactory extends AbstractAddNodeMenuFactory {
+
+ // Fill Graphiti context menus
+
+ @Override
+ protected void fillEndpointsContextMenu(ContextMenuEntry menu, ICustomContext context, IFeatureProvider fp) {
+ addMenuItem(menu, Messages.paletteEndpointTitle, Messages.paletteEndpointDescription, Endpoint.class, context, fp);
+
+ ${fillPalette("Endpoints", ", context, fp")}
+ }
+
+ @Override
+ protected void fillRoutingContextMenu(ContextMenuEntry menu, ICustomContext context, IFeatureProvider fp) {
+ ${fillPalette("Routing", ", context, fp")}
+ }
+
+ @Override
+ protected void fillControlFlowContextMenu(ContextMenuEntry menu, ICustomContext context, IFeatureProvider fp) {
+ ${fillPalette("Control Flow", ", context, fp")}
+ }
+
+ @Override
+ protected void fillTransformationContextMenu(ContextMenuEntry menu, ICustomContext context, IFeatureProvider fp) {
+ ${fillPalette("Transformation", ", context, fp")}
+ }
+
+ @Override
+ protected void fillMiscellaneousContextMenu(ContextMenuEntry menu, ICustomContext context, IFeatureProvider fp) {
+ ${fillPalette("Miscellaneous", ", context, fp")}
+ }
+
+
+ // Fill IMenuManager
+
+ @Override
+ protected void fillEndpointsMenu(IMenuManager menu) {
+ addMenuItem(menu, Messages.paletteEndpointTitle, Messages.paletteEndpointDescription, Endpoint.class);
+
+ ${fillPalette("Endpoints", "")}
+ }
+
+ @Override
+ protected void fillRoutingMenu(IMenuManager menu) {
+ ${fillPalette("Routing", "")}
+ }
+
+ @Override
+ protected void fillControlFlowMenu(IMenuManager menu) {
+ ${fillPalette("Control Flow", "")}
+ }
+
+ @Override
+ protected void fillTransformationMenu(IMenuManager menu) {
+ ${fillPalette("Transformation", "")}
+ }
+
+ @Override
+ protected void fillMiscellaneousMenu(IMenuManager menu) {
+ ${fillPalette("Miscellaneous", "")}
+ }
+}
63 ...es/org/fusesource/ide/generator/eclipse/editor/provider/generated/ProviderHelper.java.ssp
@@ -0,0 +1,63 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.editor.provider.generated;
+
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+import org.fusesource.ide.camel.editor.Messages;
+import org.fusesource.ide.camel.editor.features.create.CreateFigureFeature;
+import org.fusesource.ide.camel.editor.provider.ImageProvider;
+import org.fusesource.ide.camel.editor.provider.PaletteCategoryItemProvider;
+import org.fusesource.ide.camel.model.Endpoint;
+
+#for (n <- nodeDefinitions)
+import org.fusesource.ide.camel.model.generated.${n.definitionName.capitalize};
+#end
+
+
+/**
+* @author lhein
+*/
+public final class ProviderHelper{
+
+ private ProviderHelper() {
+ // private ddefault constructor
+ }
+
+ /**
+ * helper method to return all create features available for the palette
+ *
+ * @param fp the feature provider
+ * @return an array of create features for the palette
+ */
+ public static ICreateFeature[] getCreateFeatures(IFeatureProvider fp) {
+ return new ICreateFeature[] {
+ new CreateFigureFeature<Endpoint>(fp, Messages.paletteEndpointTitle, Messages.paletteEndpointDescription, Endpoint.class)
+#for (n <- nodeDefinitions)
+ #{ val name = n.definitionName.capitalize }#
+ #if( name!="Route" )
+ , new CreateFigureFeature<${name}>(fp, Messages.palette${name}Title, Messages.palette${name}Description, ${name}.class)
+ #end
+#end
+ };
+ }
+
+ /**
+ * helper method which provides all images for the figures in the palette
+ *
+ * @param imageProvider the image provider to use
+ */
+ public static void addFigureIcons(ImageProvider imageProvider) {
+ imageProvider.addIconsForClass(new Endpoint());
+#for (n <- nodeDefinitions)
+ #{ val name = n.definitionName.capitalize }#
+ imageProvider.addIconsForClass(new ${name}());
+#end
+ }
+
+}
19 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/messages.properties.ssp
@@ -0,0 +1,19 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+#
+# NOTE - this file is auto-generated using Scalate.
+#
+# DO NOT EDIT!
+#
+invalidValidatorValueLabel=A value has to be provided!
+invalidValidatorUniqueValueLabel=A unique value has to be provided!
+propertyLabelId=Id
+propertyLabelDescription=Description
+propertyLabelEndpointUri=Uri
+propertyLabelInheritErrorHandler=Inherit error handler
+
+#for (n <- nodeDefinitions)
+#for (p <- n.beanProperties)
+propertyLabel${n.definitionName.capitalize}${p.name.capitalize}=${n.propertyLabel(p.name)}
+#end
+
+#end
229 ide-codegen/src/main/resources/org/fusesource/ide/generator/eclipse/modelBean.ssp
@@ -0,0 +1,229 @@
+<%@ import val generator: org.fusesource.ide.generator.Generator %>
+<%@ import val node: org.fusesource.ide.generator.NodeDefinition[_] %>
+<%
+ import scala.collection.immutable.TreeSet
+
+ val isRoute = name == "RouteDefinition"
+ var baseClass = if (isRoute) {
+ "RouteSupport"
+ } else "AbstractNode"
+
+ val propertyTypes = beanProperties.map(p => p.propertyType.getCanonicalName).filter(n => !n.startsWith("java.lang") && n.contains('.')).toSet
+
+ var imports = TreeSet("org.apache.camel.model." + name,
+ "org.fusesource.ide.camel.model." + baseClass,
+ "java.util.Map",
+ "org.apache.camel.model.ProcessorDefinition",
+ "org.apache.camel.model.language.ExpressionDefinition",
+ "org.eclipse.ui.views.properties.PropertyDescriptor",
+ "org.eclipse.ui.views.properties.TextPropertyDescriptor",
+ "org.fusesource.ide.commons.properties.BooleanPropertyDescriptor",
+ "org.fusesource.ide.commons.properties.ComplexPropertyDescriptor",
+ "org.fusesource.ide.commons.properties.ComplexUnionPropertyDescriptor",
+ "org.fusesource.ide.commons.properties.EnumPropertyDescriptor",
+ "org.fusesource.ide.commons.properties.ListPropertyDescriptor",
+ "org.fusesource.ide.commons.properties.UnionTypeValue",
+ "org.fusesource.ide.camel.model.RouteContainer",
+ "org.fusesource.ide.camel.model.ExpressionPropertyDescriptor",
+ "org.fusesource.ide.camel.model.util.Objects") ++ propertyTypes
+
+%>
+
+/**
+ * NOTE - this file is auto-generated using Scalate.
+ *
+ * DO NOT EDIT!
+ */
+package org.fusesource.ide.camel.model.generated;
+
+#for(i <- imports)
+import ${i};
+#end
+
+/**
+ * The Node class for Camel's ${name}
+ */
+public class ${definitionName} extends ${baseClass} {
+
+#for (p <- beanProperties)
+ public static final String PROPERTY_${p.name.toUpperCase} = "${definitionName}.${p.name.capitalize}";
+#end
+
+#for (p <- beanProperties)
+ private ${propertyType(p)} ${p.name};
+#end
+
+ public ${definitionName}() {
+ }
+
+ public ${definitionName}(${name} definition, RouteContainer parent) {
+#if(isRoute)
+ super(definition, parent);
+#else
+ super(parent);
+ loadPropertiesFromCamelDefinition(definition);
+ loadChildrenFromCamelDefinition(definition);
+#end
+ }
+
+#if(!isRoute)
+ /* (non-Javadoc)
+ * @see org.fusesource.ide.camel.model.AbstractNode#getIconName()
+ */
+ @Override
+ public String getIconName() {
+ return "${findIconFileOrElse(eclipseIconDir, node.id, node.defaultImageName + ".png")}";
+ }
+
+ @Override
+ public String getDocumentationFileName() {
+ return "${documentationFile}";
+ }
+
+ @Override
+ public String getCategoryName() {
+ return "${node.group}";
+ }
+#end
+
+<%--
+ /* (non-Javadoc)
+ * @see org.fusesource.ide.camel.model.AbstractNode#getDisplayText()
+ */
+ @Override
+ public String getDisplayText() {
+ return getRef();
+ }
+
+--%>
+
+#for (p <- beanProperties)
+
+ /**
+ * @return the ${p.name}
+ */
+ public ${propertyType(p)} ${getOrIsMethodPrefix(p)}${p.name.capitalize}() {
+ return this.${p.name};
+ }
+
+ /**
+ * @param ${p.name} the ${p.name} to set
+ */
+ public void set${p.name.capitalize}(${propertyType(p)} ${p.name}) {
+ ${propertyType(p)} oldValue = this.${p.name};
+ this.${p.name} = ${p.name};
+ firePropertyChange(PROPERTY_${p.name.toUpperCase}, oldValue, ${p.name});
+ }
+#end
+
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.fusesource.ide.camel.model.AbstractNode#addCustomProperties(java.util.Map)
+ */
+ @Override
+ protected void addCustomProperties(Map<String, PropertyDescriptor> descriptors) {
+ super.addCustomProperties(descriptors);
+
+#for (p <- beanProperties)
+ #if (node.isExpression(p))
+ PropertyDescriptor desc${p.name.capitalize} = new ExpressionPropertyDescriptor(PROPERTY_${p.name.toUpperCase}, Messages.propertyLabel${definitionName}${p.name.capitalize});
+ #elif (node.isBooleanPropertyType(p))
+ PropertyDescriptor desc${p.name.capitalize} = new BooleanPropertyDescriptor(PROPERTY_${p.name.toUpperCase}, Messages.propertyLabel${definitionName}${p.name.capitalize});
+ #elif (node.isEnumPropertyType(p))
+ PropertyDescriptor desc${p.name.capitalize} = new EnumPropertyDescriptor(PROPERTY_${p.name.toUpperCase}, Messages.propertyLabel${definitionName}${p.name.capitalize}, ${p.propertyType.getSimpleName}.class);
+ #elif (node.isListPropertyType(p))
+ PropertyDescriptor desc${p.name.capitalize} = new ListPropertyDescriptor(PROPERTY_${p.name.toUpperCase}, Messages.propertyLabel${definitionName}${p.name.capitalize});
+ #elif (node.isSimplePropertyType(p))
+ PropertyDescriptor desc${p.name.capitalize} = new TextPropertyDescriptor(PROPERTY_${p.name.toUpperCase}, Messages.propertyLabel${definitionName}${p.name.capitalize});
+ #else
+ <% val xmlElements = node.xmlElements(p) %>
+ #if (xmlElements.isEmpty)
+ PropertyDescriptor desc${p.name.capitalize} = new ComplexPropertyDescriptor(PROPERTY_${p.name.toUpperCase}, Messages.propertyLabel${definitionName}${p.name.capitalize}, ${p.propertyType.getSimpleName}.class);
+ #else
+ PropertyDescriptor desc${p.name.capitalize} = new ComplexUnionPropertyDescriptor(PROPERTY_${p.name.toUpperCase}, Messages.propertyLabel${definitionName}${p.name.capitalize}, ${p.propertyType.getSimpleName}.class, new UnionTypeValue[]{
+ #for (xe <- xmlElements)
+ new UnionTypeValue("${xe.name()}", ${xe.`type`().getName}.class),
+ #end
+ });
+ #end
+ #end
+#end
+#for (p <- beanProperties)
+#end
+#for (p <- beanProperties)
+ descriptors.put(PROPERTY_${p.name.toUpperCase}, desc${p.name.capitalize});
+#end
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void setPropertyValue(Object id, Object value) {
+<%
+ var prefix = ""
+%>
+#for (p <- beanProperties)
+ ${prefix}if (PROPERTY_${p.name.toUpperCase}.equals(id)) {