Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

This commit was manufactured by cvs2svn to create tag 'v20051006'.

  • Loading branch information...
commit 595b9b1782ece720ba7e5848cd8fbcbbc052fc8e 1 parent c426ae8
ndai authored
Showing with 0 additions and 28,898 deletions.
  1. +0 −7 plugins/org.eclipse.jst.server.generic.core/.classpath
  2. +0 −6 plugins/org.eclipse.jst.server.generic.core/.cvsignore
  3. +0 −4 plugins/org.eclipse.jst.server.generic.core/.options
  4. +0 −28 plugins/org.eclipse.jst.server.generic.core/.project
  5. +0 −32 plugins/org.eclipse.jst.server.generic.core/META-INF/MANIFEST.MF
  6. +0 −22 plugins/org.eclipse.jst.server.generic.core/about.html
  7. +0 −13 plugins/org.eclipse.jst.server.generic.core/build.properties
  8. +0 −10 plugins/org.eclipse.jst.server.generic.core/plugin.properties
  9. +0 −43 plugins/org.eclipse.jst.server.generic.core/plugin.xml
  10. +0 −109 plugins/org.eclipse.jst.server.generic.core/schema/genericpublisher.exsd
  11. +0 −114 plugins/org.eclipse.jst.server.generic.core/schema/serverdefinition.exsd
  12. +0 −318 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/AntPublisher.java
  13. +0 −102 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/CorePlugin.java
  14. +0 −197 ...rver.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java
  15. +0 −267 ...lipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalServerBehaviour.java
  16. +0 −61 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericPublisher.java
  17. +0 −355 ...ins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServer.java
  18. +0 −508 ...clipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerBehaviour.java
  19. +0 −36 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerCoreMessages.java
  20. +0 −18 ...t.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerCoreMessages.properties
  21. +0 −133 ...generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerLaunchConfigurationDelegate.java
  22. +0 −129 ...r.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerLaunchableAdapterDelegate.java
  23. +0 −187 ....eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerRuntime.java
  24. +0 −80 ...server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerRuntimeTargetHandler.java
  25. +0 −109 ....generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerSourcePathComputerDelegate.java
  26. +0 −135 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/PingThread.java
  27. +0 −35 ...ns/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/PublishManager.java
  28. +0 −78 ...e.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ServerTypeDefinitionManager.java
  29. +0 −89 ...ipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ServerTypeDefinitionUtil.java
  30. +0 −73 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/Trace.java
  31. +0 −45 ...lipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/util/ExtensionPointUtil.java
  32. +0 −89 ...ins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/util/FileUtil.java
  33. +0 −1,590 ...erver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/ServerTypePackage.java
  34. +0 −191 ...er.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ArchiveTypeImpl.java
  35. +0 −217 ...r.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ArgumentPairImpl.java
  36. +0 −273 ...rver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ClasspathImpl.java
  37. +0 −218 ...erver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ExternalImpl.java
  38. +0 −304 ...generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/JndiConnectionImpl.java
  39. +0 −660 ...ic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/LaunchConfigurationImpl.java
  40. +0 −299 ....server.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ModuleImpl.java
  41. +0 −299 ...st.server.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PortImpl.java
  42. +0 −191 ...server.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ProjectImpl.java
  43. +0 −417 ...erver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PropertyImpl.java
  44. +0 −219 ....generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PublisherDataImpl.java
  45. +0 −271 ...rver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PublisherImpl.java
  46. +0 −969 ....generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ServerRuntimeImpl.java
  47. +0 −234 ...eric.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ServerTypeFactoryImpl.java
  48. +0 −1,608 ...eric.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ServerTypePackageImpl.java
  49. +0 −351 ...c.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeAdapterFactory.java
  50. +0 −76 ...e/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeResourceFactoryImpl.java
  51. +0 −58 ...ric.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeResourceImpl.java
  52. +0 −409 ...r.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeSwitch.java
  53. +0 −176 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/Resolver.java
  54. +0 −157 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/XMLUtils.java
  55. +0 −93 ...g.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArchiveType.java
  56. +0 −83 ....eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArgumentPair.java
  57. +0 −156 ...org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Classpath.java
  58. +0 −83 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/External.java
  59. +0 −133 ...clipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/JndiConnection.java
  60. +0 −321 ...e.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/LaunchConfiguration.java
  61. +0 −139 ...ns/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Module.java
  62. +0 −139 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Port.java
  63. +0 −91 ...s/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Project.java
  64. +0 −195 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Property.java
  65. +0 −131 ...org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Publisher.java
  66. +0 −89 ...eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/PublisherData.java
  67. +0 −463 ...eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerRuntime.java
  68. +0 −181 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypeFactory.java
  69. +0 −153 plugins/org.eclipse.jst.server.generic.core/xsd/ServerTypeDefinitionSchema.xsd
  70. +0 −501 plugins/org.eclipse.jst.server.generic.core/xsd/org.eclipse.jst.server.generic.servertype.ecore
  71. +0 −97 plugins/org.eclipse.jst.server.generic.core/xsd/servertype.genmodel
  72. +0 −132 plugins/org.eclipse.jst.server.generic.core/xsd/servertype.xsd2ecore
  73. +0 −5 plugins/org.eclipse.jst.server.generic.modules/.cvsignore
  74. +0 −28 plugins/org.eclipse.jst.server.generic.modules/.project
  75. +0 −7 plugins/org.eclipse.jst.server.generic.ui/.classpath
  76. +0 −5 plugins/org.eclipse.jst.server.generic.ui/.cvsignore
  77. +0 −28 plugins/org.eclipse.jst.server.generic.ui/.project
  78. +0 −18 plugins/org.eclipse.jst.server.generic.ui/META-INF/MANIFEST.MF
  79. +0 −22 plugins/org.eclipse.jst.server.generic.ui/about.html
  80. +0 −9 plugins/org.eclipse.jst.server.generic.ui/build.properties
  81. BIN  plugins/org.eclipse.jst.server.generic.ui/icons/obj16/server.gif
  82. BIN  plugins/org.eclipse.jst.server.generic.ui/icons/wizban/new_server_wiz.gif
  83. +0 −4 plugins/org.eclipse.jst.server.generic.ui/plugin.properties
  84. +0 −30 plugins/org.eclipse.jst.server.generic.ui/plugin.xml
  85. +0 −94 ...st.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericLaunchConfigurationTabGroup.java
  86. +0 −25 ...rg.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerComposite.java
  87. +0 −22 ...e.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerCompositeDecorator.java
  88. +0 −171 ...st.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerRuntimeWizardFragment.java
  89. +0 −29 ...g.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerUIMessages.java
  90. +0 −11 ...pse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerUIMessages.properties
  91. +0 −163 ...lipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerWizardFragment.java
  92. +0 −114 plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericUiPlugin.java
  93. +0 −131 ...ns/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/JRESelectDecorator.java
  94. +0 −89 plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/SWTUtil.java
  95. +0 −74 ...rver.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerDefinitionTypeAwareWizardFragment.java
  96. +0 −295 ...pse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerTypeDefinitionDecorator.java
  97. +0 −44 ....server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerTypeDefinitionRuntimeDecorator.java
  98. +0 −70 ...t.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerTypeDefinitionServerDecorator.java
  99. +0 −7 plugins/org.eclipse.jst.server.pde/.classpath
  100. +0 −2  plugins/org.eclipse.jst.server.pde/.cvsignore
  101. +0 −28 plugins/org.eclipse.jst.server.pde/.project
  102. +0 −13 plugins/org.eclipse.jst.server.pde/META-INF/MANIFEST.MF
  103. +0 −22 plugins/org.eclipse.jst.server.pde/about.html
  104. +0 −10 plugins/org.eclipse.jst.server.pde/build.properties
  105. +0 −266 plugins/org.eclipse.jst.server.pde/build.xml
  106. BIN  plugins/org.eclipse.jst.server.pde/icons/obj16/wiz_new_server_plugin.gif
  107. +0 −15 plugins/org.eclipse.jst.server.pde/plugin.properties
  108. +0 −22 plugins/org.eclipse.jst.server.pde/plugin.xml
  109. +0 −54 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/ServerPdePlugin.java
  110. +0 −22 ...rg.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/GenericServerPluginNewWizard.java
  111. +0 −276 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/GenericServerTemplate.java
  112. +0 −35 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/Messages.java
  113. +0 −10 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/messages.properties
  114. +0 −41 plugins/org.eclipse.jst.server.pde/templates_3.0/genericserver/buildfiles/$server_name$.xml
  115. BIN  plugins/org.eclipse.jst.server.pde/templates_3.0/genericserver/icons/server.gif
  116. +0 −142 plugins/org.eclipse.jst.server.pde/templates_3.0/genericserver/servers/$server_name$.serverdef
  117. +0 −7 plugins/org.eclipse.jst.server.tomcat.ui/.classpath
  118. +0 −6 plugins/org.eclipse.jst.server.tomcat.ui/.cvsignore
  119. +0 −4 plugins/org.eclipse.jst.server.tomcat.ui/.options
  120. +0 −28 plugins/org.eclipse.jst.server.tomcat.ui/.project
  121. +0 −23 plugins/org.eclipse.jst.server.tomcat.ui/META-INF/MANIFEST.MF
  122. +0 −22 plugins/org.eclipse.jst.server.tomcat.ui/about.html
  123. +0 −20 plugins/org.eclipse.jst.server.tomcat.ui/build.properties
  124. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/mime_extension.gif
  125. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/mime_mapping.gif
  126. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/port.gif
  127. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/project_missing.gif
  128. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/tomcat.gif
  129. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/web_module.gif
  130. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/wizban/tomcat_wiz.gif
  131. +0 −14 plugins/org.eclipse.jst.server.tomcat.ui/plugin.properties
  132. +0 −140 plugins/org.eclipse.jst.server.tomcat.ui/plugin.xml
  133. +0 −35 ...se.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/ConfigurationPropertyTester.java
  134. +0 −48 plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/ContextIds.java
  135. +0 −69 plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/Messages.java
  136. +0 −78 ...ins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/Messages.properties
  137. +0 −62 plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/SWTUtil.java
  138. +0 −42 ....server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatLaunchConfigurationTabGroup.java
  139. +0 −285 ...eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeComposite.java
  140. +0 −66 ...se.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeWizardFragment.java
  141. +0 −134 ...ins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatUIPlugin.java
  142. +0 −54 plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/Trace.java
  143. +0 −426 ...ver.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSection.java
  144. +0 −248 ...ver.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSection.java
  145. +0 −396 ...r.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorPart.java
  146. +0 −155 ...lipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java
  147. +0 −203 ....server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java
  148. +0 −280 ...eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java
  149. +0 −7 plugins/org.eclipse.jst.server.ui/.classpath
  150. +0 −6 plugins/org.eclipse.jst.server.ui/.cvsignore
  151. +0 −4 plugins/org.eclipse.jst.server.ui/.options
  152. +0 −28 plugins/org.eclipse.jst.server.ui/.project
  153. +0 −25 plugins/org.eclipse.jst.server.ui/META-INF/MANIFEST.MF
  154. +0 −22 plugins/org.eclipse.jst.server.ui/about.html
  155. +0 −21 plugins/org.eclipse.jst.server.ui/build.properties
  156. BIN  plugins/org.eclipse.jst.server.ui/icons/obj16/appclient_module.gif
  157. BIN  plugins/org.eclipse.jst.server.ui/icons/obj16/ear.gif
  158. BIN  plugins/org.eclipse.jst.server.ui/icons/obj16/ejb_module.gif
  159. BIN  plugins/org.eclipse.jst.server.ui/icons/obj16/java_jar.gif
  160. BIN  plugins/org.eclipse.jst.server.ui/icons/obj16/new_testcase.gif
  161. BIN  plugins/org.eclipse.jst.server.ui/icons/obj16/web_module.gif
  162. BIN  plugins/org.eclipse.jst.server.ui/icons/wizban/new_runtime_wiz.gif
  163. BIN  plugins/org.eclipse.jst.server.ui/icons/wizban/new_test_wiz.gif
  164. +0 −15 plugins/org.eclipse.jst.server.ui/plugin.properties
  165. +0 −78 plugins/org.eclipse.jst.server.ui/plugin.xml
  166. +0 −17 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/ContextIds.java
  167. +0 −267 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/GenericRuntimeComposite.java
  168. +0 −68 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/GenericRuntimeWizardFragment.java
  169. +0 −124 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/ImageResource.java
  170. +0 −80 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/JavaServerUIPlugin.java
  171. +0 −44 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/Messages.java
  172. +0 −34 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/Messages.properties
  173. +0 −62 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/SWTUtil.java
  174. +0 −79 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/StandardJreLabelProvider.java
  175. +0 −55 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/TomcatLabelProvider.java
  176. +0 −53 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/Trace.java
  177. +0 −175 plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/cactus/JUnitClientDelegate.java
  178. +0 −208 ...s/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/internal/cactus/NewServletTestCaseWizard.java
  179. +0 −7 plugins/org.eclipse.jst.server.websphere.core/.classpath
  180. +0 −4 plugins/org.eclipse.jst.server.websphere.core/.cvsignore
  181. +0 −28 plugins/org.eclipse.jst.server.websphere.core/.project
  182. +0 −27 plugins/org.eclipse.jst.server.websphere.core/META-INF/MANIFEST.MF
  183. +0 −22 plugins/org.eclipse.jst.server.websphere.core/about.html
  184. +0 −10 plugins/org.eclipse.jst.server.websphere.core/build.properties
  185. BIN  plugins/org.eclipse.jst.server.websphere.core/icons/obj16/websphere.gif
  186. +0 −19 plugins/org.eclipse.jst.server.websphere.core/plugin.properties
  187. +0 −88 plugins/org.eclipse.jst.server.websphere.core/plugin.xml
  188. +0 −118 plugins/org.eclipse.jst.server.websphere.core/serverdef/scripts/websphere.6.x.xml
  189. +0 −123 plugins/org.eclipse.jst.server.websphere.core/serverdef/websphere.6.serverdef
  190. +0 −14 plugins/org.eclipse.jst.server.websphere.core/src/org/eclipse/jst/server/websphere/core/AntPublisher.java
  191. +0 −58 plugins/org.eclipse.jst.server.websphere.core/src/org/eclipse/jst/server/websphere/core/CorePlugin.java
  192. +0 −7 plugins/org.eclipse.wst.internet.monitor.core/.classpath
  193. +0 −6 plugins/org.eclipse.wst.internet.monitor.core/.cvsignore
  194. +0 −6 plugins/org.eclipse.wst.internet.monitor.core/.options
  195. +0 −28 plugins/org.eclipse.wst.internet.monitor.core/.project
  196. +0 −13 plugins/org.eclipse.wst.internet.monitor.core/META-INF/MANIFEST.MF
  197. +0 −22 plugins/org.eclipse.wst.internet.monitor.core/about.html
  198. +0 −23 plugins/org.eclipse.wst.internet.monitor.core/build.properties
  199. +0 −9 plugins/org.eclipse.wst.internet.monitor.core/component.xml
  200. +0 −157 ...ipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/AcceptThread.java
  201. +0 −50 ...clipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Connection.java
  202. +0 −79 ...pse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ContentFilter.java
  203. +0 −67 ...se.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/IContentFilter.java
  204. +0 −194 ....eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/IMemento.java
  205. +0 −57 ....wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/IProtocolAdapter.java
  206. +0 −25 ....eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/IStartup.java
  207. +0 −27 ....eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Messages.java
  208. +0 −18 ...se.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Messages.properties
  209. +0 −318 ...g.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Monitor.java
  210. +0 −299 ...se.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorManager.java
  211. +0 −181 ...pse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorPlugin.java
  212. +0 −118 ...st.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorWorkingCopy.java
  213. +0 −75 ...e.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ProtocolAdapter.java
  214. +0 −88 ...ternet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ProtocolAdapterDelegate.java
  215. +0 −351 ...pse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/SocketWrapper.java
  216. +0 −49 ....internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/TCPIPProtocolAdapter.java
  217. +0 −81 ...lipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/TCPIPThread.java
  218. +0 −73 ...org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Trace.java
  219. +0 −368 ...clipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/XMLMemento.java
  220. +0 −120 ...t.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPConnection.java
  221. +0 −52 ...ernet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPProtocolAdapter.java
  222. +0 −95 ....wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPRequest.java
  223. +0 −647 ...e.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPThread.java
  224. +0 −36 ...rnet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPConnection.java
  225. +0 −148 ...nternet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPRequest.java
  226. +0 −49 ...itor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/ContentFilterDelegate.java
  227. +0 −197 ....internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/IMonitor.java
  228. +0 −46 ...t.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/IMonitorListener.java
  229. +0 −100 ...onitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/IMonitorWorkingCopy.java
  230. +0 −55 ...t.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/IRequestListener.java
  231. +0 −111 ...ternet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/MonitorCore.java
  232. +0 −350 ...t.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/Request.java
  233. +0 −31 ...t.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/package.html
  234. +0 −27 ...st.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/provisional/package.xml
  235. +0 −19 plugins/org.eclipse.wst.internet.monitor.core/plugin.properties
  236. +0 −21 plugins/org.eclipse.wst.internet.monitor.core/plugin.xml
  237. +0 −131 plugins/org.eclipse.wst.internet.monitor.core/schema/internalContentFilters.exsd
  238. +0 −123 plugins/org.eclipse.wst.internet.monitor.core/schema/protocolAdapters.exsd
  239. +0 −114 plugins/org.eclipse.wst.internet.monitor.core/schema/startup.exsd
  240. +0 −7 plugins/org.eclipse.wst.internet.monitor.ui/.classpath
  241. +0 −6 plugins/org.eclipse.wst.internet.monitor.ui/.cvsignore
  242. +0 −4 plugins/org.eclipse.wst.internet.monitor.ui/.options
  243. +0 −28 plugins/org.eclipse.wst.internet.monitor.ui/.project
  244. +0 −17 plugins/org.eclipse.wst.internet.monitor.ui/META-INF/MANIFEST.MF
  245. +0 −22 plugins/org.eclipse.wst.internet.monitor.ui/about.html
  246. +0 −22 plugins/org.eclipse.wst.internet.monitor.ui/build.properties
  247. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/clcl16/clear.gif
  248. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/clcl16/httpHeader.gif
  249. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/clcl16/sortResponseTime.gif
  250. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/cview16/monitorView.gif
  251. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/dlcl16/clear.gif
  252. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/dlcl16/httpHeader.gif
  253. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/dlcl16/sortResponseTime.gif
  254. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/elcl16/clear.gif
  255. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/elcl16/httpHeader.gif
  256. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/elcl16/resendRequest.gif
  257. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/elcl16/sortResponseTime.gif
  258. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/etool16/editRequest.gif
  259. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/eview16/monitorView.gif
  260. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/obj16/host.gif
  261. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/obj16/monitorOff.gif
  262. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/obj16/monitorOn.gif
  263. BIN  plugins/org.eclipse.wst.internet.monitor.ui/icons/obj16/tcp.gif
  264. +0 −25 .../org.eclipse.wst.internet.monitor.ui/monitorui/org/eclipse/wst/internet/monitor/ui/internal/ContextIds.java
  265. +0 −61 ...ns/org.eclipse.wst.internet.monitor.ui/monitorui/org/eclipse/wst/internet/monitor/ui/internal/Messages.java
  266. +0 −71 ....eclipse.wst.internet.monitor.ui/monitorui/org/eclipse/wst/internet/monitor/ui/internal/Messages.properties
  267. +0 −49 ....wst.internet.monitor.ui/monitorui/org/eclipse/wst/internet/monitor/ui/internal/MonitorContentProvider.java
  268. +0 −238 ...g.eclipse.wst.internet.monitor.ui/monitorui/org/eclipse/wst/internet/monitor/ui/internal/MonitorDialog.java
Sorry, we could not display the entire diff because it was too big.
View
7 plugins/org.eclipse.jst.server.generic.core/.classpath
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
View
6 plugins/org.eclipse.jst.server.generic.core/.cvsignore
@@ -1,6 +0,0 @@
-bin
-build.xml
-genericserver.jar
-org.eclipse.jst.server.generic.core_1.0.0.jar
-temp.folder
-*.settings
View
4 plugins/org.eclipse.jst.server.generic.core/.options
@@ -1,4 +0,0 @@
-# Debugging options for the org.eclipse.jst.server.tomcat.core plugin
-
-# Turn on general debugging
-org.eclipse.jst.server.generic.core/debug=true
View
28 plugins/org.eclipse.jst.server.generic.core/.project
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.generic.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
32 plugins/org.eclipse.jst.server.generic.core/META-INF/MANIFEST.MF
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jst.server.generic.core; singleton:=true
-Bundle-Version: 0.7.0
-Bundle-ClassPath: genericserver.jar
-Bundle-Activator: org.eclipse.jst.server.generic.core.internal.CorePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.server.generic.core.internal,
- org.eclipse.jst.server.generic.internal.core.util,
- org.eclipse.jst.server.generic.internal.servertype.definition,
- org.eclipse.jst.server.generic.internal.servertype.definition.impl,
- org.eclipse.jst.server.generic.internal.servertype.definition.util,
- org.eclipse.jst.server.generic.internal.xml,
- org.eclipse.jst.server.generic.servertype.definition
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.debug.core,
- org.eclipse.jdt.core,
- org.eclipse.jdt.launching;visibility:=reexport,
- org.eclipse.wst.server.core,
- org.eclipse.jst.server.core,
- org.eclipse.debug.ui,
- org.eclipse.ant.ui,
- org.eclipse.emf.common;visibility:=reexport,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.ui.externaltools,
- org.apache.ant
-Eclipse-AutoStart: true
View
22 plugins/org.eclipse.jst.server.generic.core/about.html
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
-
-</body>
-</html>
View
13 plugins/org.eclipse.jst.server.generic.core/build.properties
@@ -1,13 +0,0 @@
-source.genericserver.jar = src/
-output.genericserver.jar = bin/
-bin.includes = genericserver.jar,\
- servers/,\
- xsd/ServerTypeDefinitionSchema.xsd,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- about.html
-src.includes = servers/,\
- xsd/,\
- schema/,\
- build.properties
View
10 plugins/org.eclipse.jst.server.generic.core/plugin.properties
@@ -1,10 +0,0 @@
-pluginName= Generic Server Plugin
-providerName=Eclipse.org
-pluginDescription=Provides generic server tools with easy to develop meta data configuration files
-
-externalLaunchConfigurationTypeName=Generic Server
-launchConfigurationTypeName=Generic Server
-extensionPointServerdefinition=Server definition
-extensionPointGenericpublisher=Generic Publisher
-# ====================================================================
-
View
43 plugins/org.eclipse.jst.server.generic.core/plugin.xml
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="serverdefinition" name="%extensionPointServerdefinition" schema="schema/serverdefinition.exsd"/>
- <extension-point id="genericpublisher" name="%extensionPointGenericpublisher" schema="schema/genericpublisher.exsd"/>
-
- <extension point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- id="org.eclipse.jst.server.generic.core.launchConfigurationType"
- name="%launchConfigurationTypeName"
- delegate="org.eclipse.jst.server.generic.core.internal.GenericServerLaunchConfigurationDelegate"
- modes="run, debug"
- sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
- sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
- <launchConfigurationType
- id="org.eclipse.jst.server.generic.core.ExternalLaunchConfigurationType"
- name="%externalLaunchConfigurationTypeName"
- delegate="org.eclipse.jst.server.generic.core.internal.ExternalLaunchConfigurationDelegate"
- modes="run, debug"
- sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
- sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
- </extension>
-
- <extension point="org.eclipse.debug.core.sourcePathComputers">
- <sourcePathComputer
- id="org.eclipse.jst.server.generic.core.sourcePathComputer"
- class="org.eclipse.jst.server.generic.core.internal.GenericServerSourcePathComputerDelegate"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.launchableAdapters">
- <launchableAdapter
- class="org.eclipse.jst.server.generic.core.internal.GenericServerLaunchableAdapterDelegate"
- id="org.eclipse.jst.server.generic.web"/>
- </extension>
-
- <extension point="org.eclipse.jst.server.generic.core.genericpublisher">
- <genericpublisher
- class="org.eclipse.jst.server.generic.core.internal.AntPublisher"
- id="org.eclipse.jst.server.generic.antpublisher"/>
- </extension>
-
-</plugin>
View
109 plugins/org.eclipse.jst.server.generic.core/schema/genericpublisher.exsd
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.server.generic.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.server.generic.core" id="genericpublisher" name="Generic Publisher"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="genericpublisher"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="genericpublisher">
- <complexType>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
View
114 plugins/org.eclipse.jst.server.generic.core/schema/serverdefinition.exsd
@@ -1,114 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.server.generic.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.server.generic.core" id="serverdefinition" name="Server Definition"/>
- </appInfo>
- <documentation>
- This extension point defines a new generic server plugin
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="serverdefinition" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="serverdefinition">
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- server id
- </documentation>
- </annotation>
- </attribute>
- <attribute name="definitionfile" type="string" use="required">
- <annotation>
- <documentation>
- location of the generic server definition file
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
View
318 ...s/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/AntPublisher.java
@@ -1,318 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.core.internal;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jst.server.generic.internal.core.util.FileUtil;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.PublisherData;
-import org.eclipse.jst.server.core.IEJBModule;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.jst.server.core.IWebModule;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.osgi.framework.Bundle;
-/**
- * Ant based publisher.
- * All the properties defined in the server definition file are
- * passed into the ANT build file as properties.
- * In addition to the properties defined in the server definition
- * <I>module.dir</I>, <I>module.name,</I> and <I>server.publish.dir</I> are computed and passed to the
- * definition file.
- * <ul>
- * <li>module.dir: includes the root of the module project file</li>
- * <li>module.name: the name of the module</li>
- * <li>server.publish.dir: the directory to put the deployment units</li>
- * <li>project.working.dir: the working dir of the project that deployed module is in</li>
- * </ul>
- *
- * @author Gorkem Ercan
- */
-
-public class AntPublisher extends GenericPublisher{
- private static final String JAR_PROTOCOL_PREFIX = "jar";
-
- /**
- * publisher id for ANT publisher.
- */
- public static final String PUBLISHER_ID="org.eclipse.jst.server.generic.antpublisher"; //$NON-NLS-1$
-
- private static final String PROP_SERVER_PUBLISH_DIR = "server.publish.dir";//$NON-NLS-1$
- private static final String PROP_PROJECT_WORKING_DIR= "project.working.dir";//$NON-NLS-1$
- private static final String PROP_MODULE_DIR = "module.dir";//$NON-NLS-1$
- private static final String PROP_MODULE_NAME = "module.name";//$NON-NLS-1$
- private static final String MODULE_PUBLISH_TARGET_PREFIX = "target.publish."; //$NON-NLS-1$
- private static final String MODULE_UNPUBLISH_TARGET_PREFIX = "target.unpublish.";//$NON-NLS-1$
- private static final String DATA_NAME_BUILD_FILE="build.file";//$NON-NLS-1$
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wtp.server.core.model.IPublisher#publish(org.eclipse.wtp.server.core.resources.IModuleResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus[] publish(IModuleArtifact[] resource, IProgressMonitor monitor){
- if(getModule().length>1)// only respond to root module calls.
- return null;
- try{
- File file = computeBuildFile();
- runAnt(file.toString(),getPublishTargetsForModule(),getPublishProperties(),monitor);
- }catch(CoreException e){
- IStatus s = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,GenericServerCoreMessages.errorPublishAntpublisher,e);
- CorePlugin.getDefault().getLog().log(s);
- return new IStatus[] {s};
- }
- return null;
- }
-
- /**
- *
- * @return
- * @throws CoreException
- */
- private File computeBuildFile() throws CoreException {
- Bundle bundle = Platform.getBundle(getServerRuntime().getServerTypeDefinition().getConfigurationElementNamespace());
- URL bundleUrl =bundle.getEntry(getBuildFile());
- URL fileURL = FileUtil.resolveURL(bundleUrl);
- if(fileURL.getProtocol().equals(JAR_PROTOCOL_PREFIX)){
- OutputStream os=null;
- InputStream is=null;
- try{
- String filename =fileURL.getPath();
- String jarname= fileURL.getFile().substring(0,filename.indexOf('!'));
-
- File jarFile = new File(new URL(jarname).getFile());
- JarFile jar = new JarFile(jarFile);
- File tmpFile = FileUtil.createTempFile(getBuildFile(),CorePlugin.getDefault().getStateLocation().toOSString());
- os = new FileOutputStream(tmpFile);
- String entryname= getBuildFile();
- if (entryname.startsWith("/"))//$NON-NLS-1$
- entryname= entryname.substring(1);
- JarEntry entry = jar.getJarEntry(entryname);
- is =jar.getInputStream(entry);
- FileUtil.copy(is,os);
- return tmpFile;
- }
- catch (IOException e) {
- IStatus s = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"error creating temporary build file",e);//$NON-NLS-1$
- CorePlugin.getDefault().getLog().log(s);
- throw new CoreException(s);
- }
- finally{
- try {
- if(is!=null)
- is.close();
- if(os!=null)
- os.close();
- } catch (IOException e) {
- //ignore
- }
- }
- }
- else{
- return FileUtil.resolveFile(fileURL);
- }
- }
-
- /**
- * @return
- */
- private String getPublishTargetsForModule() {
- return doGetTargets(MODULE_PUBLISH_TARGET_PREFIX+getModuleTypeId());
- }
-
- /**
- * @return
- */
- private String getUnpublishTargetsForModule() {
- return doGetTargets(MODULE_UNPUBLISH_TARGET_PREFIX+getModuleTypeId());
- }
-
- /**
- * @param dataname
- * @return
- */
- private String doGetTargets(String dataname) {
- StringBuffer buffer = new StringBuffer();
- Iterator iterator = getServerRuntime().getServerTypeDefinition().getPublisher(PUBLISHER_ID).getPublisherdata().iterator();
- while(iterator.hasNext()){
- PublisherData data = (PublisherData)iterator.next();
- if(dataname.equals(data.getDataname())) {
- if(buffer.length()>0)
- buffer.append(",");//$NON-NLS-1$
- buffer.append(data.getDatavalue());
- }
- }
- return buffer.toString();
- }
-
- private String getModuleTypeId(){
- return getModule()[0].getModuleType().getId();
- }
-
- private String getBuildFile()
- {
- Iterator iterator = getServerRuntime().getServerTypeDefinition().getPublisher(PUBLISHER_ID).getPublisherdata().iterator();
- while(iterator.hasNext())
- {
- PublisherData data = (PublisherData)iterator.next();
- if(DATA_NAME_BUILD_FILE.equals(data.getDataname()))
- return getServerRuntime().getServerTypeDefinition().getResolver().resolveProperties(data.getDatavalue());
- }
- return null;
- }
-
- private Map getPublishProperties()
- {
- Map props = new HashMap();
- // pass all properties to build file.
- Map serverProperties = getServer().getServerInstancePropertiesImpl();
- Map properties = getServerRuntime().getServerInstanceProperties();
- properties.putAll(serverProperties);
- Iterator propertyIterator = properties.keySet().iterator();
- while(propertyIterator.hasNext())
- {
- String property = (String)propertyIterator.next();
- String value = (String)properties.get(property);
- if(value!=null && value.trim().length()>0)
- props.put(property,properties.get(property));
- }
- Module module = getServerRuntime().getServerTypeDefinition().getModule(getModuleTypeId());
- String modDir = module.getPublishDir();
- modDir = getServerRuntime().getServerTypeDefinition().getResolver().resolveProperties(modDir);
-
- IWebModule webModule = (IWebModule)getModule()[0].loadAdapter(IWebModule.class,null);
- IEJBModule ejbModule = (IEJBModule)getModule()[0].loadAdapter(IEJBModule.class,null);
- IEnterpriseApplication earModule = (IEnterpriseApplication)getModule()[0].loadAdapter(IEnterpriseApplication.class,null);
-
- String moduleName="unknownmodule";//$NON-NLS-1$
- String moduleDir="";//$NON-NLS-1$
- if(webModule!=null){
- moduleName = this.guessModuleName(webModule);
- //moduleDir = webModule.getLocation().toString();
- }
- if(ejbModule!=null){
- moduleName = getModule()[0].getName();
- //moduleDir= ejbModule.getLocation().toString();
- }
- if(earModule!=null)
- {
- moduleName = getModule()[0].getName();
- //moduleDir = earModule.getLocation().toString();
- }
- String pluginId = getServerRuntime().getServerTypeDefinition().getConfigurationElementNamespace();
- props.put(PROP_PROJECT_WORKING_DIR,getModule()[0].getProject().getWorkingLocation(pluginId).toString());
- props.put(PROP_MODULE_NAME,moduleName);
- props.put(PROP_MODULE_DIR,moduleDir);
- props.put(PROP_SERVER_PUBLISH_DIR,modDir);
- return props;
- }
-
- private String guessModuleName(IWebModule webModule) {
- String moduleName = getModule()[0].getName();
- String contextRoot = webModule.getContextRoot();
- if(contextRoot.charAt(0) == '/')
- moduleName = contextRoot.substring(1);
- return moduleName;
- }
-
- private void runAnt(String buildFile,String targets,Map properties ,IProgressMonitor monitor)throws CoreException{
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
-
- ILaunchConfigurationWorkingCopy wc= type.newInstance(null,properties.get(PROP_MODULE_NAME)+" module publisher");
- wc.setContainer(null);
- wc.setAttribute(IExternalToolConstants.ATTR_LOCATION, buildFile);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,"org.eclipse.ant.ui.AntClasspathProvider");
- wc.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS,targets);
- wc.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES,properties);
- wc.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND,false);
- wc.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE,true);
- wc.setAttribute(IDebugUIConstants.ATTR_PRIVATE,true);
-
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider");
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,getServerRuntime().getVMInstall().getName());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE,getServerRuntime().getVMInstall().getVMInstallType().getId());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "org.eclipse.ant.internal.ui.antsupport.InternalAntRunner");
- wc.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID, IAntUIConstants.REMOTE_ANT_PROCESS_FACTORY_ID);
-
- setupAntLaunchConfiguration(wc);
-
-
- ILaunchConfiguration launchConfig = wc.doSave();
- launchConfig.launch("run",monitor);
- }
-
-
-
- /* (non-Javadoc)
- */
- protected void setupAntLaunchConfiguration(ILaunchConfigurationWorkingCopy wc) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.core.GenericPublisher#unpublish(org.eclipse.wst.server.core.IModule, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus[] unpublish(IProgressMonitor monitor) {
-
- if(getModule().length>1)// only respond to root module calls.
- return null;
- try {
- File file = computeBuildFile();
- runAnt(file.toString(),getUnpublishTargetsForModule(),getPublishProperties(),monitor);
- } catch (CoreException e) {
- IStatus s = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,GenericServerCoreMessages.errorRemoveModuleAntpublisher,e);
- return new IStatus[] {s};
- }
- return null;
- }
-}
View
102 ...ins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/CorePlugin.java
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.core.internal;
-
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.io.IOException;
-import java.net.URL;
-
-/**
- * The main plugin class to be used in the desktop.
- *
- * @author Gorkem Ercan
- */
-public class CorePlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.jst.server.generic.core";
-
- //The shared instance.
- private static CorePlugin plugin;
- private ServerTypeDefinitionManager fServerTypeDefinitionManager;
- /**
- * The constructor.
- */
- public CorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static CorePlugin getDefault() {
- return plugin;
- }
-
- /**
- *
- * @return
- */
- public ServerTypeDefinitionManager getServerTypeDefinitionManager()
- {
- if(fServerTypeDefinitionManager==null)
- fServerTypeDefinitionManager = new ServerTypeDefinitionManager(getInstallUrl());
- return fServerTypeDefinitionManager;
- }
-
- private URL getInstallUrl()
- {
- try {
- return Platform.resolve(this.getBundle().getEntry("/"));
- } catch (IOException e) {
- return null;
- }
- }
-
-
-}
View
197 ...r.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com
- * tyip@bea.com
- *
- * Based on GenericServerLaunchConfigurationDelegate by Gorkem Ercan
- *******************************************************************************/
-
-package org.eclipse.jst.server.generic.core.internal;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.tools.ant.taskdefs.Execute;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.RuntimeProcess;
-import org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate;
-import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-
-/**
- * <p>Extension of <code>AbstractJavaLaunchConfigurationDelegate</code> that supports
- * servers which are started/stopped via external executables (e.g. scripts).</p>
- *
- * <p>Note: <code>AbstractJavaLaunchConfigurationDelegate</code> is extended simply to take advantage
- * of a set of useful code that is not directly related to launching a JVM-based app.</p>
- */
-public class ExternalLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
-
- /**
- * Identifier for the executable server configuration type
- * (value <code>"org.eclipse.jst.server.generic.core.ExternalLaunchConfigurationType"</code>).
- */
- public static final String ID_EXTERNAL_LAUNCH_TYPE = CorePlugin.PLUGIN_ID + ".ExternalLaunchConfigurationType"; //$NON-NLS-1$
-
- /**
- * Name of the launch configuration attribute that holds the external executable commandline.
- */
- public static final String COMMANDLINE = CorePlugin.PLUGIN_ID + ".COMMANDLINE"; //$NON-NLS-1$
-
- /**
- * Name of the launch configuration attribute that holds a descriptive name for the external executable.
- */
- public static final String EXECUTABLE_NAME = CorePlugin.PLUGIN_ID + ".EXECUTABLE_NAME"; //$NON-NLS-1$
-
- /**
- * Name of the launch configuration attribute that holds the debug port.
- */
- public static final String DEBUG_PORT = CorePlugin.PLUGIN_ID + ".DEBUG_PORT"; //$NON-NLS-1$
-
- /**
- * Default value for the descriptive name for the external executable.
- */
- public static final String DEFAULT_EXECUTABLE_NAME = "External Generic Server";
-
- /**
- * Debugging launch configuration delegate.
- */
- private static JavaRemoteApplicationLaunchConfigurationDelegate debuggingDelegate =
- new JavaRemoteApplicationLaunchConfigurationDelegate();
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void launch(ILaunchConfiguration configuration,
- String mode,
- ILaunch launch,
- IProgressMonitor monitor) throws CoreException {
- IServer server = ServerUtil.getServer(configuration);
- if (server == null) {
- abort(GenericServerCoreMessages.missingServer, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- ExternalServerBehaviour serverBehavior = (ExternalServerBehaviour) server.loadAdapter(ServerBehaviourDelegate.class, null);
-
- // initialize the server, check the ports and start the PingThread that will check
- // server state
- serverBehavior.setupLaunch(launch, mode, monitor);
-
- // get the executable commandline
- String commandline = configuration.getAttribute(COMMANDLINE, (String) null);
- if (commandline == null || commandline.length() == 0) {
- abort(GenericServerCoreMessages.commandlineUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
- // specified commandline might be multiple args, need to parse
- List cmds = new ArrayList();
- StringTokenizer st = new StringTokenizer(commandline);
- while (st.hasMoreTokens()) {
- cmds.add(st.nextToken());
- }
-
- // get a descriptive name for the executable
- String executableName = configuration.getAttribute(EXECUTABLE_NAME, DEFAULT_EXECUTABLE_NAME);
-
- // get the executable environment
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- String[] env = manager.getEnvironment(configuration);
-
- // get the working directory
- File workingDir = verifyWorkingDirectory(configuration);
- if (workingDir == null) {
- abort(GenericServerCoreMessages.workingdirUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- // Launch the executable for the configuration using the Ant Execute class
- try {
- Process process = Execute.launch(null, (String[])cmds.toArray(new String[cmds.size()]), env, workingDir, true);
- IProcess runtimeProcess = new RuntimeProcess(launch, process, executableName, null);
- launch.addProcess(runtimeProcess);
- serverBehavior.setProcess(runtimeProcess);
- } catch (IOException ioe) {
- abort(GenericServerCoreMessages.errorLaunchingExecutable, ioe, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- if (mode.equals("debug")) {
- ILaunchConfigurationWorkingCopy wc = createDebuggingConfig(configuration);
- // if we're launching the debugging we need to wait for the config to start
- // before launching the debugging session
- serverBehavior.setDebuggingConfig(wc, mode, launch, monitor);
- }
- }
-
- private ILaunchConfigurationWorkingCopy createDebuggingConfig(ILaunchConfiguration configuration)
- throws CoreException {
- ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
- setDebugArgument(wc, IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, "hostname", "localhost");
- String port = configuration.getAttribute(DEBUG_PORT, (String) null);
- if (port==null || port.length()==0) {
- abort(GenericServerCoreMessages.debugPortUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
- setDebugArgument(wc, IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, "port", port);
- setDebugArgument(wc, ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, "debugFlag", "true");
- return wc;
- }
-
- /**
- * Starts the debugging session
- */
- protected static void startDebugging(ILaunchConfigurationWorkingCopy wc,
- String mode,
- ILaunch launch,
- IProgressMonitor monitor) throws CoreException {
- Trace.trace(Trace.FINEST, "Starting debugging");
- debuggingDelegate.launch(wc, mode, launch, monitor);
- }
-
- private void setDebugArgument(ILaunchConfigurationWorkingCopy config, String attribKey, String key, String arg) {
- try {
- Map args = config.getAttribute(attribKey, (Map)null);
- if (args!=null) {
- args = new HashMap(args);
- } else {
- args = new HashMap();
- }
- args.put(key, String.valueOf(arg));
- config.setAttribute(attribKey, args);
- } catch (CoreException ce) {
- // ignore
- }
- }
-
- /**
- * Throws a core exception with the given message and optional
- * exception. The exception's status code will indicate an error.
- *
- * @param message error message
- * @param exception cause of the error, or <code>null</code>
- * @exception CoreException with the given message and underlying
- * exception
- */
- protected void abort(String message, Throwable exception, int code) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, CorePlugin.getDefault().getBundle().getSymbolicName(), code, message, exception));
- }
-}
View
267 ...se.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalServerBehaviour.java
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com - initial API and implementation
- *
- * Based on GenericServerBehavior by Gorkem Ercan
- *******************************************************************************/
-package org.eclipse.jst.server.generic.core.internal;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jst.server.generic.internal.xml.Resolver;
-import org.eclipse.jst.server.generic.servertype.definition.External;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerPort;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.util.SocketUtil;
-
-/**
- * Subclass of <code>GenericServerBehavior</code> that supports
- * servers which are started/stopped via external executables (e.g. scripts).
- */
-public class ExternalServerBehaviour extends GenericServerBehaviour {
-
- // config for debugging session
- private ILaunchConfigurationWorkingCopy wc;
- private String mode;
- private ILaunch launch;
- private IProgressMonitor monitor;
-
- /**
- * Override to reset the status if the state was unknown
- */
- public void stop(boolean force) {
- resetStatus(getServer().getServerState());
- super.stop(force);
- }
-
- /**
- * Override to set status to unknown if the port was in use and to reset the status if the state was
- * unknown and an exception was not thrown. Will want to change logic once external generic server pings
- * server process to determine state instead of maintaining handle to process.
- */
- protected void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException {
- int state = getServer().getServerState();
- try {
- super.setupLaunch(launch, launchMode, monitor);
- } catch (CoreException ce) {
- ServerPort portInUse = portInUse();
- if (portInUse != null) {
- Trace.trace(Trace.WARNING, "Port " + portInUse.getPort() + " is currently in use");
- Status status = new Status(Status.WARNING, CorePlugin.PLUGIN_ID, Status.OK,
- GenericServerCoreMessages.bind(GenericServerCoreMessages.errorPortInUse,Integer.toString(portInUse.getPort()),portInUse.getName()), null);
- setServerStatus(status);
- setServerState(IServer.STATE_UNKNOWN);
- }
- throw ce;
- }
- resetStatus(state);
- }
-
- private ServerPort portInUse() {
- ServerPort[] ports = getServer().getServerPorts(null);
- ServerPort sp;
- for(int i=0;i<ports.length;i++){
- sp = ports[i];
- if (SocketUtil.isPortInUse(sp.getPort(), 5)) {
- return sp;
- }
- }
- return null;
- }
-
- /**
- * Override to trigger the launch of the debugging session (if appropriate).
- */
- protected synchronized void setServerStarted() {
- if (wc != null) {
- try {
- ExternalLaunchConfigurationDelegate.startDebugging(wc, mode, launch, monitor);
- } catch (CoreException ce) {
- // failed to start debugging, so set mode to run
- setMode(ILaunchManager.RUN_MODE);
- final Status status = new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 1,
- GenericServerCoreMessages.errorStartingExternalDebugging, ce);
- CorePlugin.getDefault().getLog().log(status);
- Trace.trace(Trace.SEVERE, GenericServerCoreMessages.errorStartingExternalDebugging, ce);
- // inform user via an error dialog
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(new Shell(PlatformUI.getWorkbench().getDisplay()), null, null, status);
- }
- });
- } finally {
- clearDebuggingConfig();
- }
- }
- setServerState(IServer.STATE_STARTED);
- }
-
- /*
- * If the server state is unknown, reset the status to OK
- */
- private void resetStatus(int state) {
- if (state == IServer.STATE_UNKNOWN) {
- setServerStatus(null);
- }
- }
-
- /**
- * Since terminate() is called during restart, need to override to
- * call shutdown instead of just killing the original process.
- */
- protected void terminate() {
- int state = getServer().getServerState();
- if (state == IServer.STATE_STOPPED)
- return;
-
- // cache a ref to the current process
- IProcess currentProcess = process;
- // set the process var to null so that GenericServerBehavior.setProcess()
- // will grab the stop executable (and declare the server stopped when it exits)
- process = null;
-
- // execute the standard shutdown
- shutdown(state);
-
- // if the shutdown did not terminate the process, forcibly terminate it
- try {
- if (currentProcess != null && !currentProcess.isTerminated()) {
- Trace.trace(Trace.FINER, "About to kill process: " + currentProcess);
- currentProcess.terminate();
- currentProcess = null;
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error killing the process", e);
- }
- }
-
- /**
- * Override superclass method to correctly setup the launch configuration for starting an external
- * server.
- */
- public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
- IProgressMonitor monitor) throws CoreException {
- clearDebuggingConfig();
- ServerRuntime serverDef = getServerDefinition();
- Resolver resolver = serverDef.getResolver();
- workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- resolver.resolveProperties(serverDef.getStart().getWorkingDirectory()));
- String external = resolver.resolveProperties(getExternalForOS(serverDef.getStart().getExternal()));
- workingCopy.setAttribute(ExternalLaunchConfigurationDelegate.COMMANDLINE, external);
- workingCopy.setAttribute(ExternalLaunchConfigurationDelegate.DEBUG_PORT,
- resolver.resolveProperties(serverDef.getStart().getDebugPort()));
- // just use the commandline for now
- workingCopy.setAttribute(ExternalLaunchConfigurationDelegate.EXECUTABLE_NAME, external);
- Map environVars = getEnvironmentVariables(getServerDefinition().getStart());
- if(!environVars.isEmpty()){
- workingCopy.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES,environVars);
- }
- }
-
- /*
- * Returns the first external whose "os" attribute matches (case insensitive) the beginning
- * of the name of the current OS (as determined by the System "os.name" property). If
- * no such match is found, returns the first external that does not have an OS attribute.
- */
- private String getExternalForOS(List externals) {
- String currentOS = System.getProperty("os.name").toLowerCase();
- External external;
- String matchingExternal = null;
- String externalOS;
- Iterator i = externals.iterator();
- while (i.hasNext()) {
- external= (External) i.next();
- externalOS = external.getOs();
- if (externalOS == null) {
- if (matchingExternal == null) {
- matchingExternal = external.getValue();
- }
- } else if (currentOS.startsWith(externalOS.toLowerCase())) {
- matchingExternal = external.getValue();
- break;
- }
- }
- return matchingExternal;
- }
-
- /**
- * Returns the String ID of the launch configuration type.
- * @return
- */
- protected String getConfigTypeID() {
- return ExternalLaunchConfigurationDelegate.ID_EXTERNAL_LAUNCH_TYPE;
- }
-
- /**
- * Returns the String name of the stop launch configuration.
- * @return
- */
- protected String getStopLaunchName() {
- return GenericServerCoreMessages.externalStopLauncher;
- }
-
- /**
- * Sets up the launch configuration for stopping the server.
- * @param workingCopy
- */
- protected void setupStopLaunchConfiguration(GenericServerRuntime runtime, ILaunchConfigurationWorkingCopy wc) {
- clearDebuggingConfig();
- ServerRuntime serverDef = getServerDefinition();
- Resolver resolver = serverDef.getResolver();
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- resolver.resolveProperties(serverDef.getStop().getWorkingDirectory()));
- String external = resolver.resolveProperties(getExternalForOS(serverDef.getStop().getExternal()));
- wc.setAttribute(ExternalLaunchConfigurationDelegate.COMMANDLINE, external);
- // just use commandline for now
- Map environVars = getEnvironmentVariables(getServerDefinition().getStop());
- if(!environVars.isEmpty()){
- wc.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES,environVars);
- }
- wc.setAttribute(ExternalLaunchConfigurationDelegate.EXECUTABLE_NAME, external);
- wc.setAttribute(Server.ATTR_SERVER_ID, getServer().getId());
- }
-
- /**
- * Sets the configuration to use for launching a debugging session
- */
- protected synchronized void setDebuggingConfig(ILaunchConfigurationWorkingCopy wc,
- String mode,
- ILaunch launch,
- IProgressMonitor monitor) {
- this.wc = wc;
- this.mode = mode;
- this.launch = launch;
- this.monitor = monitor;
- }
-
- private synchronized void clearDebuggingConfig() {
- this.wc = null;
- this.mode = null;
- this.launch = null;
- this.monitor = null;
- }
-
-
-}
View
61 ...g.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericPublisher.java
@@ -1,61 +0,0 @@
-package org.eclipse.jst.server.generic.core.internal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IServer;
-
-/**
- * The abstract publisher. This is intended to be subclassed by
- * clients implementing the genericpublisher extension point.
- *
- * @author Gorkem Ercan
- */
-public abstract class GenericPublisher
-{
-
- private IModule[] fModule;
- private GenericServerRuntime fServerRuntime;
- private GenericServer fServer;
-
- protected void initialize(IModule[] module, IServer server)
- {
- fModule = module;
- fServer = (GenericServer)server.loadAdapter(GenericServer.class,null);
- fServerRuntime = (GenericServerRuntime)server.getRuntime().loadAdapter(GenericServerRuntime.class,null);
- }
- /**
- * Called by the generic server implementation when a module is
- * removed form the server instance.
- * Subclasses may extend this method to perform their own module removal
- *
- * @param module
- * @param monitor
- * @return
- */
- public abstract IStatus[] unpublish(IProgressMonitor monitor);
-
- /**
- * Called by the generic server implementation when a publish module
- * event occurs.
- * Subclasses may extend this method to perform their own publishing
- *
- * @param resource
- * @param monitor
- * @return
- */
- public abstract IStatus[] publish(IModuleArtifact[] resource,
- IProgressMonitor monitor);
-
- public IModule[] getModule() {
- return fModule;
- }
-
- public GenericServer getServer(){
- return fServer;
- }
- public GenericServerRuntime getServerRuntime() {
- return fServerRuntime;
- }
-}
View
355 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServer.java
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.core.internal;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.core.IEJBModule;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.jst.server.core.IWebModule;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.Port;
-import org.eclipse.jst.server.generic.servertype.definition.Property;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.ServerPort;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.ServerMonitorManager;
-import org.eclipse.wst.server.core.model.IURLProvider;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-
-/**
- * Generic XML based server implementation.
- *
- * @author Gorkem Ercan
- */
-public class GenericServer extends ServerDelegate implements IURLProvider {
-
- private static final String ATTR_GENERIC_SERVER_MODULES = "Generic_Server_Modules_List";
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#publishStart(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus publishStart(IProgressMonitor monitor) {
- if(getModules().length<1)
- return new Status(IStatus.CANCEL,CorePlugin.PLUGIN_ID,0,GenericServerCoreMessages.cancelNoPublish,null);
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "PublishingStarted", null);
- }
-
-
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- Iterator iterator = getServerDefinition().getModule().iterator();
-
- while(iterator.hasNext()) {
- Module module = (Module)iterator.next();
- for (int i = 0; i < add.length; i++) {
- if(add[i].getModuleType().getId().equals(module.getType()))
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "CanModifyModules", null);
- }
- }
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.moduleNotCompatible, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerDelegate#modifyModules(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
-
- List modules = this.getAttribute(ATTR_GENERIC_SERVER_MODULES,(List)null);
-
- if(add!=null&& add.length>0)
- {
- if(modules==null) {
- modules=new ArrayList(add.length);
- }
- for (int i = 0; i < add.length; i++) {
-
- if(modules.contains(add[i].getId())==false)
- modules.add(add[i].getId());
- }
- }
- if(remove!=null && remove.length>0 && modules!=null)
- {
- for (int i = 0; i < remove.length; i++) {
- modules.remove(remove[i].getId());
- }
- }
- if(modules!=null)
- setAttribute(ATTR_GENERIC_SERVER_MODULES,modules);
-
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getModules()
- */
- public org.eclipse.wst.server.core.IModule[] getModules() {
- List modules = getAttribute(ATTR_GENERIC_SERVER_MODULES,(List)null);
- List imodules = new ArrayList();
- Iterator iterator = modules.iterator();
- while(iterator.hasNext())
- {
- String moduleId = (String)iterator.next();
- int sep = moduleId.indexOf(":");
- IProject project =ResourcesPlugin.getWorkspace().getRoot().getProject(moduleId.substring(0,sep));
- IModule[] ms = ServerUtil.getModules(project);
- for (int i = 0; i < ms.length; i++) {
- if(ms[i].getId().equals(moduleId.substring(sep+1)))
- imodules.add(ms[i]);
- }
-
- }
- if(modules!= null)
- return (IModule[])imodules.toArray(new IModule[imodules.size()]);
- return new IModule[0];
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getChildModules(org.eclipse.wst.server.core.model.IModule[])
- */
- public IModule[] getChildModules(IModule[] module) {
- if (module[0] != null && module[0].getModuleType() != null) {
- String type = module[0].getModuleType().getId();
- if (module.length == 1 && "j2ee.ear".equals(type)) {
- IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module[0]
- .loadAdapter(IEnterpriseApplication.class, null);
- if (enterpriseApplication.getModules() != null) {
- return enterpriseApplication.getModules();
- }
- }
- }
- return new IModule[0];
- }
-
- /**
- * @return
- */
- private Map getServerInstanceProperties() {
- Map runtimeProperties =getRuntimeDelegate().getServerInstanceProperties();
- Map serverProperties = getServerInstancePropertiesImpl();
- Map instanceProperties = new HashMap(runtimeProperties.size()+serverProperties.size());
- instanceProperties.putAll(runtimeProperties);
- instanceProperties.putAll(serverProperties);
- return instanceProperties;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IMonitorableServer#getServerPorts()
- */
- public org.eclipse.wst.server.core.ServerPort[] getServerPorts() {
- List ports = new ArrayList();
- Iterator pIter = this.getServerDefinition().getPort().iterator();
- while (pIter.hasNext()) {
- Port element = (Port) pIter.next();
- int port = Integer.parseInt(getServerDefinition().getResolver().resolveProperties(element.getNo()));
- ports.add(new ServerPort("server", element.getName(), port, element.getProtocol()));
- }
-
- return (org.eclipse.wst.server.core.ServerPort[])ports.toArray(new org.eclipse.wst.server.core.ServerPort[ports.size()]);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wtp.server.core.model.IURLProvider#getModuleRootURL(org.eclipse.wtp.server.core.model.IModule)
- */
- public URL getModuleRootURL(IModule module) {
-
- try {
- if (module == null || module.loadAdapter(IWebModule.class,null)==null )
- return null;
-
- String url = "http://localhost";
- int port = 0;
-
- port = getHttpPort();
- port =ServerMonitorManager.getInstance().getMonitoredPort(getServer(), port, "web");
- if (port != 80)
- url += ":" + port;
-
- url += "/"+module.getName();
-
- if (!url.endsWith("/"))
- url += "/";
-
- return new URL(url);
- } catch (Exception e) {
- Trace.trace("Could not get root URL", e);
- return null;
- }
-
- }
-
- /**
- * @return
- */
- protected int getHttpPort() {
- int port=-1;
- Iterator pIter = this.getServerDefinition().getPort().iterator();
- while (pIter.hasNext()) {
- Port aPort = (Port) pIter.next();
- if(port== -1)
- port = Integer.parseInt(getServerDefinition().getResolver().resolveProperties(aPort.getNo()));
- else if( "http".equals(aPort.getProtocol() ) )
- port = Integer.parseInt(aPort.getNo());
- }
- if( port == -1)
- port = 8080;
- return port;
- }
-
- /**
- * Returns the ServerRuntime that represents the .serverdef
- * file for this server.
- * @return server runtime
- */
- public ServerRuntime getServerDefinition(){
- String rtTypeId = getServer().getRuntime().getRuntimeType().getId();
- return CorePlugin.getDefault().getServerTypeDefinitionManager().getServerRuntimeDefinition(rtTypeId,getServerInstanceProperties());
- }
-
- private GenericServerRuntime getRuntimeDelegate(){
- return (GenericServerRuntime)getServer().getRuntime().loadAdapter(GenericServerRuntime.class,null);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.ServerDelegate#getRootModules(org.eclipse.wst.server.core.IModule)
- */
- public IModule[] getRootModules(IModule module) throws CoreException {
-
- String type = module.getModuleType().getId();
- if (type.equals("j2ee.ejb")) {
- IEJBModule ejbModule = (IEJBModule) module.loadAdapter(IEJBModule.class,null);
- if (ejbModule != null) {
- IStatus status = canModifyModules(new IModule[] { module }, null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- IModule[] childs = doGetChildModules(module);
- if(childs.length>0)
- return childs;
- return new IModule[] { module };
- }
- }
- if (type.equals("j2ee.ear")) {
- IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module.loadAdapter(IEnterpriseApplication.class,null);
- if (enterpriseApplication.getModules() != null) {
- IStatus status = canModifyModules(new IModule[] { module },null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- return new IModule[] { module };
- }
- }
- if (type.equals("j2ee.web")) {
- IWebModule webModule = (IWebModule) module.loadAdapter(IWebModule.class,null);
- if (webModule != null) {
- IStatus status = canModifyModules(new IModule[] { module },null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- IModule[] childs = doGetChildModules(module);
- if(childs.length>0)
- return childs;
- return new IModule[] { module };
- }
- }
- return null;
- }
-
-
- private IModule[] doGetChildModules(IModule module) {
- IModule[] ears = ServerUtil.getModules("j2ee.ear");
- ArrayList list = new ArrayList();
- for (int i = 0; i < ears.length; i++) {
- IEnterpriseApplication ear = (IEnterpriseApplication)ears[i].loadAdapter(IEnterpriseApplication.class,null);
- IModule[] childs = ear.getModules();
- for (int j = 0; j < childs.length; j++) {
- if(childs[j].equals(module))
- list.add(ears[i]);
- }
- }
- return (IModule[])list.toArray(new IModule[list.size()]);
- }
-
- public Map getServerInstancePropertiesImpl() {
- return getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, new HashMap());
- }
-
- public void setServerInstanceProperties(Map map) {
- setAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, map);
- }
- /**
- * Checks if the properties set for this server is valid.
- * @return
- */
- public IStatus validate() {
- List props = this.getServerDefinition().getProperty();
- for(int i=0;i<props.size();i++)
- {
- Property property =(Property)props.get(i);
- if(property.getType().equals(Property.TYPE_DIRECTORY) || property.getType().equals(Property.TYPE_FILE))
- {
- String path= (String)getServerInstanceProperties().get(property.getId());
- if(path!=null && !pathExist(path))
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.bind(GenericServerCoreMessages.invalidPath,path), null);
- }
- }
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "", null);
- }
- private boolean pathExist(String path){
- File f = new File(path);
- return f.exists();
- }
-
-
-}
View
508 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerBehaviour.java
@@ -1,508 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.core.internal;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.ArgumentPair;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerPort;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.util.SocketUtil;
-
-/**
- * Server behaviour delegate implementation for generic server.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerBehaviour extends ServerBehaviourDelegate {
-
- private static final String ATTR_STOP = "stop-server";
-
- // the thread used to ping the server to check for startup
- protected transient PingThread ping = null;
- protected transient IDebugEventSetListener processListener;
- protected transient IProcess process;
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#publishServer(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void publishServer(int kind, IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#publishModule(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void publishModule(int kind, int deltaKind, IModule[] module,
- IProgressMonitor monitor) throws CoreException {
-
- if(REMOVED == deltaKind){
- removeFromServer(module,monitor);
- }
- else{
- Module m = getServerDefinition().getModule(module[0].getModuleType().getId());
- String publisherId = m.getPublisherReference();
- GenericPublisher publisher = PublishManager.getPublisher(publisherId);
- if(publisher==null){
- IStatus status = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"Unable to create publisher",null);
- throw new CoreException(status);
- }
- publisher.initialize(module,getServer());
- IStatus[] status= publisher.publish(null,monitor);
- if(status==null){
- setModulePublishState(module, IServer.PUBLISH_STATE_NONE);
- }else {
- for (int i=0; i < status.length; i++) {
- if (IStatus.ERROR == status[i].getSeverity()){
- setModulePublishState(module, IServer.PUBLISH_STATE_UNKNOWN);
- throw new CoreException(status[i]);
- }
- }
- }
- }
- }
-
- private void removeFromServer(IModule[] module, IProgressMonitor monitor) throws CoreException
- {
- Module m = getServerDefinition().getModule(module[0].getModuleType().getId());
- String publisherId = m.getPublisherReference();
- GenericPublisher publisher = PublishManager.getPublisher(publisherId);
- if(publisher==null){
- IStatus status = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"Unable to create publisher to remove module",null);
- throw new CoreException(status);
- }
- publisher.initialize(module,getServer());
- publisher.unpublish(monitor);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#stop(boolean)
- */
- public void stop(boolean force) {
- if (force) {
- terminate();
- return;
- }
-
- int state = getServer().getServerState();
- if (state == IServer.STATE_STOPPED)
- return;
- else if (state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING) {
- terminate();
- return;
- }
-
- shutdown(state);
- }
-
- /**
- * Shuts down the server via the launch configuration.
- */
- protected void shutdown(int state) {
- GenericServerRuntime runtime = (GenericServerRuntime) getRuntimeDelegate();
- try {
- Trace.trace(Trace.FINEST, "Stopping Server");
- if (state != IServer.STATE_STOPPED)
- setServerState(IServer.STATE_STOPPING);
- String configTypeID = getConfigTypeID();
- ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType type = mgr.getLaunchConfigurationType(configTypeID);
- String launchName = getStopLaunchName();
- String uniqueLaunchName = mgr.generateUniqueLaunchConfigurationNameFrom(launchName);
- ILaunchConfiguration conf = null;
- ILaunchConfiguration[] lch = mgr.getLaunchConfigurations(type);
- for (int i = 0; i < lch.length; i++) {
- if (launchName.equals(lch[i].getName())) {
- conf = lch[i];
- break;
- }
- }
-
- ILaunchConfigurationWorkingCopy wc = null;
- if (conf != null) {
- wc = conf.getWorkingCopy();
- } else {
- wc = type.newInstance(null, uniqueLaunchName);
- }
-
- // To stop from appearing in history lists
- wc.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
- // Set the stop attribute so that we know we are stopping
- wc.setAttribute(ATTR_STOP, "true");
-
- // Setup the launch config for stopping the server
- setupStopLaunchConfiguration(runtime, wc);
-
- // Launch the stop launch config
- wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
-
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error stopping Server", e);
- }
- }
-
- /**
- * Returns the String ID of the launch configuration type.
- * @return
- */
- protected String getConfigTypeID() {
- return IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION;
- }
-
- /**
- * Returns the String name of the stop launch configuration.
- * @return
- */
- protected String getStopLaunchName() {
- return "GenericServerStopper";
- }
-
- /**
- * Sets up the launch configuration for stopping the server.
- * @param workingCopy
- */
- protected void setupStopLaunchConfiguration(GenericServerRuntime runtime, ILaunchConfigurationWorkingCopy wc) {
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
- getServerDefinition().getResolver().resolveProperties(this.getServerDefinition().getStop().getMainClass()));
-
- IVMInstall vmInstall = runtime.getVMInstall();
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, runtime
- .getVMInstallTypeId());
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,
- vmInstall.getName());
-
- setupLaunchClasspath(wc, vmInstall, getStopClasspath());
-
- Map environVars = getEnvironmentVariables(getServerDefinition().getStop());
- if(!environVars.isEmpty()){
- wc.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES,environVars);
- }
-
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getWorkingDirectory()));
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getProgramArgumentsAsString()));
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getVmParametersAsString()));
- }
-
- public String getStartClassName() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getMainClass());
- }
-
- public ServerRuntime getServerDefinition() {
- GenericServer server = (GenericServer)getServer().loadAdapter(ServerDelegate.class, null);
- return server.getServerDefinition();
- }
-
- protected GenericServerRuntime getRuntimeDelegate() {
- return (GenericServerRuntime)getServer().getRuntime().loadAdapter(GenericServerRuntime.class,null);
- }
-
- private List getStartClasspath() {
- String cpRef = getServerDefinition().getStart().getClasspathReference();
- return serverClasspath(cpRef);
- }
-
- /**
- * @param cpRef
- * @return
- */
- protected List serverClasspath(String cpRef) {
- Classpath classpath = getServerDefinition().getClasspath(cpRef);
-
- List cpEntryList = new ArrayList(classpath.getArchive().size());
- Iterator iterator= classpath.getArchive().iterator();
- while(iterator.hasNext())