Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Code formatting and code cleanup. No functional change.

  • Loading branch information...
commit 10741ae51f120dea2efca1e7e2eaf378a3e8ca4a 1 parent 91b3bef
Attila Király akiraly authored
Showing with 2,408 additions and 2,382 deletions.
  1. +12 −10 ...ent/console-examples/src/main/java/org/wicketstuff/console/examples/ClojureEngineWithTemplatesTestPage.java
  2. +231 −202 jdk-1.5-parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEnginePanel.java
  3. +87 −84 ...1.5-parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEnginePanelWithTemplates.java
  4. +48 −46 jdk-1.5-parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEngineWindow.java
  5. +42 −43 ....5-parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEngineWithTemplatesWindow.java
  6. +30 −30 jdk-1.5-parent/console-parent/console/src/test/java/org/wicketstuff/console/ComponentsRenderTest.java
  7. +0 −1  ...utocomplete-common/src/main/java/org/wicketstuff/datatable_autocomplete/trie/TrieNodeInspectingVisitor.java
  8. +1 −1  ....5-parent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaeObjectSerializer.java
  9. +1 −1  ...parent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaePageManagerProvider.java
  10. +1 −2  jdk-1.5-parent/gmap2-parent/gmap2/src/main/java/wicket/contrib/gmap/GMap2.java
  11. +45 −43 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/JSLib.java
  12. +22 −18 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/JSReference.java
  13. +9 −11 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/Provider.java
  14. +2 −1  jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/URLRenderer.java
  15. +84 −54 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/util/Assert.java
  16. +7 −5 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/util/WicketDeploymentState.java
  17. +38 −38 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/CDNTest.java
  18. +31 −25 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/LocalProviderTest.java
  19. +27 −12 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/VersionDescriptorTest.java
  20. +17 −14 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/VersionTest.java
  21. +15 −16 jdk-1.5-parent/mbeanview-parent/mbeanview/src/main/java/org/wicketstuff/mbeanview/MBeansPanel.java
  22. +2 −2 ...ools-meiomask-parent/mootools-meiomask/src/main/java/org/wicketstuff/mootools/meiomask/CustomMaskField.java
  23. +35 −40 ...nt/mootools-meiomask-parent/mootools-meiomask/src/main/java/org/wicketstuff/mootools/meiomask/MaskType.java
  24. +10 −8 ...otools-meiomask-parent/mootools-meiomask/src/main/java/org/wicketstuff/mootools/meiomask/MeioMaskField.java
  25. +1 −1  ...otools-meiomask-parent/mootools-meiomask/src/test/java/org/wicketstuff/mootools/meiomaks/test/TestPage.java
  26. +1 −2  ...t/multi-text-input-parent/multi-text-input/src/main/java/org/wicketstuff/multitextinput/MultiTextInput.java
  27. +4 −6 ...layers-parent/openlayers-proxy/src/main/java/org/wicketstuff/openlayers/api/control/GetSpecificFeature.java
  28. +1 −2  ....5-parent/openlayers-parent/openlayers/src/main/java/org/wicketstuff/openlayers/api/control/GetFeature.java
  29. +20 −11 jdk-1.5-parent/prototype/src/test/java/org/wicketstuff/prototype/PrototypeHeaderContributorTest.java
  30. +106 −95 jdk-1.5-parent/serializer-kryo/src/main/java/org/wicketstuff/pageserializer/kryo/KryoSerializer.java
  31. +31 −23 ...1.5-parent/serializer-kryo/src/main/java/org/wicketstuff/pageserializer/kryo/WicketChildListSerializer.java
  32. +19 −15 jdk-1.5-parent/serializer-kryo/src/test/java/org/wicketstuff/pageserializer/kryo/HomePage.java
  33. +17 −15 jdk-1.5-parent/serializer-kryo/src/test/java/org/wicketstuff/pageserializer/kryo/KryoSerializerTest.java
  34. +44 −39 jdk-1.5-parent/serializer-kryo/src/test/java/org/wicketstuff/pageserializer/kryo/Start.java
  35. +4 −4 jdk-1.5-parent/serializer-kryo/src/test/java/org/wicketstuff/pageserializer/kryo/WicketApplication.java
  36. +44 −39 jdk-1.5-parent/wicket-poi-parent/wicket-poi-examples/src/test/java/org/wicketstuff/poi/Start.java
  37. +7 −8 ...1.5-parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/GeneralPurposeExporter.java
  38. +2 −3 ...parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/TableComponentAsXlsHandler.java
  39. +14 −16 jdk-1.5-parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/TableParser.java
  40. +2 −2 jdk-1.5-parent/wicket-poi-parent/wicket-poi/src/test/java/org/wicketstuff/poi/excel/PoiTestUtil.java
  41. +15 −16 ...-parent/wicket-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/BasicHive.java
  42. +14 −15 jdk-1.5-parent/wicket-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/Hive.java
  43. +5 −5 ...5-parent/wicket-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/HiveMind.java
  44. +4 −5 ...wicket-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/SimpleCachingHive.java
  45. +4 −4 ...curity-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authentication/BaseSubject.java
  46. +45 −50 ...urity-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authentication/LoginContext.java
  47. +8 −9 ...t-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authentication/Subject.java
  48. +3 −4 ...-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authorization/EverybodyPrincipal.java
  49. +38 −40 ...security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authorization/Permission.java
  50. +11 −13 ...-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authorization/Principal.java
  51. +4 −5 ...ity-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authorization/SimplePrincipal.java
  52. +10 −12 ...arm-parent/hive/src/main/java/org/wicketstuff/security/hive/authorization/permissions/ActionPermission.java
  53. +16 −17 ...swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/authorization/permissions/AllPermissions.java
  54. +4 −6 ...icket-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/config/HiveFactory.java
  55. +146 −167 ...rity-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/hive/config/PolicyFileHiveFactory.java
  56. +23 −24 ...ent/wicket-security-parent/swarm-parent/hive/src/main/java/org/wicketstuff/security/util/ManyToManyMap.java
  57. +6 −6 ...ty-parent/swarm-parent/hive/src/test/java/org/wicketstuff/security/hive/authorization/FaultyPermission.java
  58. +4 −4 ...rity-parent/swarm-parent/hive/src/test/java/org/wicketstuff/security/hive/authorization/TestPermission.java
  59. +26 −28 ...wicket-security-parent/swarm-parent/hive/src/test/java/org/wicketstuff/security/hive/config/TestAction.java
  60. +8 −10 ...wicket-security-parent/swarm-parent/hive/src/test/java/org/wicketstuff/security/util/ManyToManyMapTest.java
  61. +5 −5 ...ty-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/hive/authentication/DefaultSubject.java
  62. +48 −55 ...ty-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/hive/authentication/LoginContainer.java
  63. +7 −8 ...ity-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/hive/authentication/WicketSubject.java
  64. +5 −5 ...parent/swarm/src/main/java/org/wicketstuff/security/hive/authorization/permissions/ComponentPermission.java
  65. +6 −6 ...warm/src/main/java/org/wicketstuff/security/hive/authorization/permissions/ComponentSubclassPermission.java
  66. +5 −6 ...warm-parent/swarm/src/main/java/org/wicketstuff/security/hive/authorization/permissions/DataPermission.java
  67. +3 −4 ...arent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/hive/config/SwarmPolicyFileHiveFactory.java
  68. +7 −8 ...et-security-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/SwarmWebApplication.java
  69. +25 −27 ...et-security-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/actions/SwarmAction.java
  70. +3 −3 ...curity-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/checks/DataSecurityCheck.java
  71. +7 −7 ...rent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/models/SwarmCompoundPropertyModel.java
  72. +8 −9 ...cket-security-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/models/SwarmModel.java
  73. +11 −13 ...arent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/strategies/AbstractSwarmStrategy.java
  74. +13 −13 ...curity-parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/strategies/SwarmStrategy.java
  75. +7 −7 ...parent/swarm-parent/swarm/src/main/java/org/wicketstuff/security/swarm/strategies/SwarmStrategyFactory.java
  76. +7 −5 ...-parent/wicket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/ContainerTest.java
  77. +11 −13 ....5-parent/wicket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/ExtendsTest.java
  78. +13 −9 ....5-parent/wicket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/GeneralTest.java
  79. +1 −1  ...icket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/components/L1Container.java
  80. +1 −2  ...arent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/hive/authentication/CustomLoginContext.java
  81. +13 −6 ...ecurity-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/hive/authentication/LoginTest.java
  82. +3 −4 ...rent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/hive/authentication/PrimaryLoginContext.java
  83. +6 −8 ...nt/swarm-parent/swarm/src/test/java/org/wicketstuff/security/hive/authentication/SecondaryLoginContext.java
  84. +9 −10 ...urity-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/license/ApacheLicenceHeaderTest.java
  85. +1 −1  ...cket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/pages/ContainerHomePage.java
  86. +1 −1  .../wicket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/pages/ContainerPage2.java
  87. +1 −1  ...nt/wicket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/pages/MockHomePage.java
  88. +1 −1  ...t/wicket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/pages/MockLoginPage.java
  89. +1 −1  ....5-parent/wicket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/pages/PageA.java
  90. +1 −1  ...ket-security-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/pages/SecondaryLoginPage.java
  91. +4 −6 ...ecurity-parent/swarm-parent/swarm/src/test/java/org/wicketstuff/security/swarm/actions/SwarmActionTest.java
  92. +11 −12 ...-parent/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/WaspApplication.java
  93. +7 −7 jdk-1.5-parent/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/WaspSession.java
  94. +11 −11 ...rent/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/WaspWebApplication.java
  95. +5 −5 ...cket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/actions/WaspActionFactory.java
  96. +8 −9 ...t-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/AbstractSecurityCheck.java
  97. +9 −9 ...cket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/ClassSecurityCheck.java
  98. +20 −25 ...-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/ComponentSecurityCheck.java
  99. +11 −13 ...-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/ContainerSecurityCheck.java
  100. +11 −13 ...t/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/ISecurityCheck.java
  101. +3 −5 ...et-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/InverseSecurityCheck.java
  102. +27 −28 ...icket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/LinkSecurityCheck.java
  103. +22 −24 ...t/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/SecurityChecks.java
  104. +3 −3 ...5-parent/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/checks/WaspKey.java
  105. +11 −11 ...et-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/ISecureComponent.java
  106. +2 −2 .../wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/ISecurePage.java
  107. +31 −35 ...curity-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/SecureComponentHelper.java
  108. +4 −4 ...t/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/SecurePage.java
  109. +4 −4 ...icket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/SecureWebPage.java
  110. +5 −6 ...-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/markup/html/form/SecureForm.java
  111. +3 −3 ...nt/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/markup/html/form/SecureTextField.java
  112. +2 −2 ...nt/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/markup/html/links/SecureAjaxLink.java
  113. +8 −8 ...nt/wasp/src/main/java/org/wicketstuff/security/components/markup/html/links/SecureBookmarkablePageLink.java
  114. +8 −9 ...nt/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/markup/html/links/SecurePageLink.java
  115. +3 −3 ...arent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/components/markup/html/panel/SecurePanel.java
  116. +3 −4 ...-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/extensions/markup/html/tabs/ISecureTab.java
  117. +7 −8 .../wasp-parent/wasp/src/main/java/org/wicketstuff/security/extensions/markup/html/tabs/SecureTabbedPanel.java
  118. +4 −5 ...cket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/log/AuthorizationErrorKey.java
  119. +9 −10 ...security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/log/AuthorizationMessageSource.java
  120. +4 −6 ...ecurity-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/log/IAuthorizationMessageSource.java
  121. +44 −45 ...-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/login/http/HttpAuthenticationLoginPage.java
  122. +6 −7 ...ent/wicket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/models/ISecureModel.java
  123. +20 −21 ...rity-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/models/SecureCompoundPropertyModel.java
  124. +33 −37 ...y-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/strategies/ClassAuthorizationStrategy.java
  125. +3 −3 ...ket-security-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/strategies/StrategyFactory.java
  126. +61 −65 ...ty-parent/wasp-parent/wasp/src/main/java/org/wicketstuff/security/strategies/WaspAuthorizationStrategy.java
  127. +13 −10 jdk-1.5-parent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/GeneralTest.java
  128. +7 −3 ...ecurity-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/SecureCompoundPropertyModelTest.java
  129. +8 −7 ...5-parent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/SecureFormTest.java
  130. +8 −6 ...5-parent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/SecureLinkTest.java
  131. +12 −13 ...wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/SessionInvalidationTest.java
  132. +3 −3 ...1.5-parent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/StringAction.java
  133. +11 −11 ...1.5-parent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/TestStrategy.java
  134. +24 −25 ...nt/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/WaspAbstractTestBase.java
  135. +20 −19 ...cket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/checks/SecurityChecksTest.java
  136. +43 −43 ...ty-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/components/SecureComponentHelperTest.java
  137. +9 −10 ...ecurity-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/license/ApacheLicenceHeaderTest.java
  138. +3 −3 ...5-parent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/BasePage.java
  139. +3 −3 ...nt/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/SecureTestPage.java
  140. +3 −4 ...rity-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/insecure/SecureComponentPage.java
  141. +22 −22 ...parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/login/UsernamePasswordSignInPanel.java
  142. +2 −2 ...t/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/secure/FormPage.java
  143. +3 −4 ...rent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/secure/PageB.java
  144. +3 −5 ...rent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/secure/PageC.java
  145. +1 −1  ...rent/wicket-security-parent/wasp-parent/wasp/src/test/java/org/wicketstuff/security/pages/secure/PageD.java
  146. +2 −2 ...security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/AbstractWaspAction.java
  147. +2 −3 ...rent/wicket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/Access.java
  148. +8 −9 ...cket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/ActionFactory.java
  149. +7 −10 ...ent/wicket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/Actions.java
  150. +3 −3 .../wicket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/AllActions.java
  151. +4 −4 ...rent/wicket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/Enable.java
  152. +6 −6 ...ent/wicket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/Inherit.java
  153. +2 −2 ...urity-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/RegistrationException.java
  154. +2 −2 ...rent/wicket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/Render.java
  155. +8 −9 .../wicket-security-parent/wasp-parent/wicomsec/src/main/java/org/wicketstuff/security/actions/WaspAction.java
  156. +1 −2  jdk-1.5-parent/wicket-security-parent/wasp-parent/wicomsec/src/test/java/ApacheLicenceHeaderTest.java
22 .../console-examples/src/main/java/org/wicketstuff/console/examples/ClojureEngineWithTemplatesTestPage.java
View
@@ -22,18 +22,20 @@
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.wicketstuff.console.ClojureScriptEngineWithTemplatesPanel;
-public class ClojureEngineWithTemplatesTestPage extends WebPage {
- private static final long serialVersionUID = 1L;
+public class ClojureEngineWithTemplatesTestPage extends WebPage
+{
+ private static final long serialVersionUID = 1L;
- public ClojureEngineWithTemplatesTestPage(final PageParameters params) {
- super(params);
- add(new Label("title", new ResourceModel("application.title")));
+ public ClojureEngineWithTemplatesTestPage(final PageParameters params)
+ {
+ super(params);
+ add(new Label("title", new ResourceModel("application.title")));
- final ClojureScriptEngineWithTemplatesPanel panel = new ClojureScriptEngineWithTemplatesPanel(
- "panel", null, null);
- add(panel);
+ final ClojureScriptEngineWithTemplatesPanel panel = new ClojureScriptEngineWithTemplatesPanel(
+ "panel", null, null);
+ add(panel);
- add(new TestPageLinksPanel("links"));
- }
+ add(new TestPageLinksPanel("links"));
+ }
}
433 jdk-1.5-parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEnginePanel.java
View
@@ -61,220 +61,249 @@
*
* @author cretzel
*/
-public class ScriptEnginePanel extends Panel {
+public class ScriptEnginePanel extends Panel
+{
- private final class ClearButton extends Button {
- private static final long serialVersionUID = 1L;
+ private final class ClearButton extends Button
+ {
+ private static final long serialVersionUID = 1L;
- private ClearButton(final String id) {
- super(id);
- }
+ private ClearButton(final String id)
+ {
+ super(id);
+ }
- @Override
- protected void onInitialize() {
- super.onInitialize();
- add(new AttributeAppender("onclick", Model.of("clearTextarea('"
- + inputTf.getMarkupId() + "')"), ";"));
+ @Override
+ protected void onInitialize()
+ {
+ super.onInitialize();
+ add(new AttributeAppender("onclick", Model.of("clearTextarea('" +
+ inputTf.getMarkupId() + "')"), ";"));
- }
+ }
- }
+ }
- final class SubmitButton extends AjaxButton implements IAjaxIndicatorAware {
- private static final long serialVersionUID = 1L;
+ final class SubmitButton extends AjaxButton implements IAjaxIndicatorAware
+ {
+ private static final long serialVersionUID = 1L;
- private SubmitButton(final String id, final Form<?> form) {
- super(id, form);
- }
+ private SubmitButton(final String id, final Form<?> form)
+ {
+ super(id, form);
+ }
- @Override
- protected void onSubmit(final AjaxRequestTarget target,
- final Form<?> form) {
- process(target);
- }
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form)
+ {
+ process(target);
+ }
- @Override
- protected void onError(final AjaxRequestTarget target,
- final Form<?> form) {
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form)
+ {
- }
+ }
- public String getAjaxIndicatorMarkupId() {
- return indicator.getMarkupId();
- }
- }
+ public String getAjaxIndicatorMarkupId()
+ {
+ return indicator.getMarkupId();
+ }
+ }
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- private static final ResourceReference CSS = new PackageResourceReference(
- ScriptEnginePanel.class, "ScriptEnginePanel.css");
+ private static final ResourceReference CSS = new PackageResourceReference(
+ ScriptEnginePanel.class, "ScriptEnginePanel.css");
- private static final ResourceReference JS = new PackageResourceReference(
- ScriptEnginePanel.class, "ScriptEnginePanel.js");
-
- private String input;
- private String output;
- private String returnValue;
-
- private Label title;
- private Form<Void> form;
- private TextArea<String> inputTf;
- private TextArea<String> outputTf;
- private TextField<String> returnValueTf;
-
- private Image indicator;
-
- private final IModel<String> titleModel;
-
- private final Lang lang;
-
- public ScriptEnginePanel(final String id, final Lang lang) {
- this(id, lang, null);
- }
-
- public ScriptEnginePanel(final String id, final Lang lang,
- final IModel<String> title) {
- super(id);
- this.lang = lang;
- titleModel = title != null ? title : Model.of("Wicket Console");
-
- init();
- }
-
- private void init() {
- setDefaultModel(new CompoundPropertyModel<ScriptEnginePanel>(this));
- initComponents();
- }
-
- protected void initComponents() {
- title = new Label("title", titleModel);
- add(title);
-
- form = new Form<Void>("form");
- add(form);
-
- inputTf = new TextArea<String>("input");
- inputTf.setOutputMarkupId(true);
- form.add(inputTf);
-
- add(new SubmitButton("submit", form));
- add(new ClearButton("clear"));
-
- indicator = new Image("indicator",
- AbstractDefaultAjaxBehavior.INDICATOR);
- indicator.setOutputMarkupId(true);
- add(indicator);
-
- returnValueTf = new TextField<String>("returnValue");
- returnValueTf.setOutputMarkupId(true);
- add(returnValueTf);
-
- outputTf = new TextArea<String>("output");
- outputTf.setOutputMarkupId(true);
- add(outputTf);
- }
-
- protected ResourceReference getCSS() {
- return CSS;
- }
-
- @Override
- public void renderHead(final IHeaderResponse response) {
- super.renderHead(response);
-
- final ResourceReference css = getCSS();
- if (css != null) {
- response.renderCSSReference(css);
- }
-
- response.renderJavaScriptReference(JS);
- }
-
- protected void process(final AjaxRequestTarget target) {
-
- final IScriptEngine engine = newEngine();
- final Map<String, Object> bindings = newBindings();
-
- final IScriptExecutionResult result = engine.execute(input, bindings);
-
- if (result.isSuccess()) {
- returnValue = String.valueOf(result.getReturnValue());
- output = result.getOutput();
- } else {
- returnValue = null;
- output = String.format("%s\n\n%s", result.getOutput(),
- result.getException());
- }
-
- target.add(returnValueTf, outputTf);
- }
-
- protected IScriptEngine newEngine() {
- return Engines.create(lang);
- }
-
- protected Map<String, Object> newBindings() {
- final Map<String, Object> bindings = new HashMap<String, Object>();
- bindings.put("application", Application.get());
- bindings.put("page", getPage());
- bindings.put("component", this);
- return bindings;
- }
-
- public String getInput() {
- return input;
- }
-
- public void setInput(final String input) {
- this.input = input;
- }
-
- public String getOutput() {
- return output;
- }
-
- public void setOutput(final String output) {
- this.output = output;
- }
-
- public String getReturnValue() {
- return returnValue;
- }
-
- public void setReturnValue(final String returnValue) {
- this.returnValue = returnValue;
- }
-
- public TextArea<String> getInputTf() {
- return inputTf;
- }
-
- public TextArea<String> getOutputTf() {
- return outputTf;
- }
-
- public TextField<String> getReturnValueTf() {
- return returnValueTf;
- }
-
- @Override
- public void detachModels() {
- super.detachModels();
- if (titleModel != null) {
- titleModel.detach();
- }
- }
-
- public static ScriptEnginePanel create(final String wicketId,
- final Lang lang, final IModel<String> title) {
- switch (lang) {
- case GROOVY:
- return new GroovyScriptEnginePanel(wicketId, title);
- case CLOJURE:
- return new ClojureScriptEnginePanel(wicketId, title);
- default:
- throw new UnsupportedOperationException("Unsupported language: "
- + lang);
- }
- }
+ private static final ResourceReference JS = new PackageResourceReference(
+ ScriptEnginePanel.class, "ScriptEnginePanel.js");
+
+ private String input;
+ private String output;
+ private String returnValue;
+
+ private Label title;
+ private Form<Void> form;
+ private TextArea<String> inputTf;
+ private TextArea<String> outputTf;
+ private TextField<String> returnValueTf;
+
+ private Image indicator;
+
+ private final IModel<String> titleModel;
+
+ private final Lang lang;
+
+ public ScriptEnginePanel(final String id, final Lang lang)
+ {
+ this(id, lang, null);
+ }
+
+ public ScriptEnginePanel(final String id, final Lang lang, final IModel<String> title)
+ {
+ super(id);
+ this.lang = lang;
+ titleModel = title != null ? title : Model.of("Wicket Console");
+
+ init();
+ }
+
+ private void init()
+ {
+ setDefaultModel(new CompoundPropertyModel<ScriptEnginePanel>(this));
+ initComponents();
+ }
+
+ protected void initComponents()
+ {
+ title = new Label("title", titleModel);
+ add(title);
+
+ form = new Form<Void>("form");
+ add(form);
+
+ inputTf = new TextArea<String>("input");
+ inputTf.setOutputMarkupId(true);
+ form.add(inputTf);
+
+ add(new SubmitButton("submit", form));
+ add(new ClearButton("clear"));
+
+ indicator = new Image("indicator", AbstractDefaultAjaxBehavior.INDICATOR);
+ indicator.setOutputMarkupId(true);
+ add(indicator);
+
+ returnValueTf = new TextField<String>("returnValue");
+ returnValueTf.setOutputMarkupId(true);
+ add(returnValueTf);
+
+ outputTf = new TextArea<String>("output");
+ outputTf.setOutputMarkupId(true);
+ add(outputTf);
+ }
+
+ protected ResourceReference getCSS()
+ {
+ return CSS;
+ }
+
+ @Override
+ public void renderHead(final IHeaderResponse response)
+ {
+ super.renderHead(response);
+
+ final ResourceReference css = getCSS();
+ if (css != null)
+ {
+ response.renderCSSReference(css);
+ }
+
+ response.renderJavaScriptReference(JS);
+ }
+
+ protected void process(final AjaxRequestTarget target)
+ {
+
+ final IScriptEngine engine = newEngine();
+ final Map<String, Object> bindings = newBindings();
+
+ final IScriptExecutionResult result = engine.execute(input, bindings);
+
+ if (result.isSuccess())
+ {
+ returnValue = String.valueOf(result.getReturnValue());
+ output = result.getOutput();
+ }
+ else
+ {
+ returnValue = null;
+ output = String.format("%s\n\n%s", result.getOutput(), result.getException());
+ }
+
+ target.add(returnValueTf, outputTf);
+ }
+
+ protected IScriptEngine newEngine()
+ {
+ return Engines.create(lang);
+ }
+
+ protected Map<String, Object> newBindings()
+ {
+ final Map<String, Object> bindings = new HashMap<String, Object>();
+ bindings.put("application", Application.get());
+ bindings.put("page", getPage());
+ bindings.put("component", this);
+ return bindings;
+ }
+
+ public String getInput()
+ {
+ return input;
+ }
+
+ public void setInput(final String input)
+ {
+ this.input = input;
+ }
+
+ public String getOutput()
+ {
+ return output;
+ }
+
+ public void setOutput(final String output)
+ {
+ this.output = output;
+ }
+
+ public String getReturnValue()
+ {
+ return returnValue;
+ }
+
+ public void setReturnValue(final String returnValue)
+ {
+ this.returnValue = returnValue;
+ }
+
+ public TextArea<String> getInputTf()
+ {
+ return inputTf;
+ }
+
+ public TextArea<String> getOutputTf()
+ {
+ return outputTf;
+ }
+
+ public TextField<String> getReturnValueTf()
+ {
+ return returnValueTf;
+ }
+
+ @Override
+ public void detachModels()
+ {
+ super.detachModels();
+ if (titleModel != null)
+ {
+ titleModel.detach();
+ }
+ }
+
+ public static ScriptEnginePanel create(final String wicketId, final Lang lang,
+ final IModel<String> title)
+ {
+ switch (lang)
+ {
+ case GROOVY :
+ return new GroovyScriptEnginePanel(wicketId, title);
+ case CLOJURE :
+ return new ClojureScriptEnginePanel(wicketId, title);
+ default :
+ throw new UnsupportedOperationException("Unsupported language: " + lang);
+ }
+ }
}
171 ...-parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEnginePanelWithTemplates.java
View
@@ -31,89 +31,92 @@
*
* @author cretzel
*/
-public class ScriptEnginePanelWithTemplates extends Panel {
-
- private static final long serialVersionUID = 1L;
- private final Lang lang;
- private final ScriptEnginePanel enginePanel;
- private final ScriptTemplateSelectionTablePanel selectionTable;
- private IDataProvider<ScriptTemplate> dataProvider;
- private final IModel<String> title;
-
- /**
- * Constructor.
- *
- * @param id
- * id
- * @param lang
- * source language
- * @param title
- * title, may be {@code null} for default
- * @param dataProvider
- * data provider for script templates, may be {@code null} for
- * default
- */
- public ScriptEnginePanelWithTemplates(final String id, final Lang lang,
- final IModel<String> title,
- final IDataProvider<ScriptTemplate> dataProvider) {
- super(id);
-
- this.lang = lang;
- this.title = title;
- this.dataProvider = dataProvider;
-
- if (dataProvider == null) {
- this.dataProvider = packagedScriptTemplatesDataProvider(lang);
- }
-
- enginePanel = newEnginePanel();
- enginePanel.setOutputMarkupId(true);
- add(enginePanel);
-
- selectionTable = newSelectionTable("selectionPanel", enginePanel,
- this.dataProvider);
- add(selectionTable);
-
- }
-
- private IDataProvider<ScriptTemplate> packagedScriptTemplatesDataProvider(
- final Lang lang) {
- return new ListDataProvider<ScriptTemplate>(
- PackagedScriptTemplates.getPackagedScriptTemplates(lang));
- }
-
- /**
- * Create the engine panel, override to customize.
- * <p>
- * Attention: This is called from the constructor.
- */
- protected ScriptEnginePanel newEnginePanel() {
- return ScriptEnginePanel.create("enginePanel", lang, title);
- }
-
- /**
- * Create the selection table, override to customize.
- * <p>
- * Attention: This is called from the constructor.
- */
- protected ScriptTemplateSelectionTablePanel newSelectionTable(
- final String wicketId, final ScriptEnginePanel enginePanel,
- final IDataProvider<ScriptTemplate> dataProvider) {
-
- return new ScriptTemplateSelectionTablePanel(wicketId, enginePanel,
- dataProvider, 100);
- }
-
- public ScriptEnginePanel getEnginePanel() {
- return enginePanel;
- }
-
- public ScriptTemplateSelectionTablePanel getSelectionTable() {
- return selectionTable;
- }
-
- public IDataProvider<ScriptTemplate> getDataProvider() {
- return dataProvider;
- }
+public class ScriptEnginePanelWithTemplates extends Panel
+{
+
+ private static final long serialVersionUID = 1L;
+ private final Lang lang;
+ private final ScriptEnginePanel enginePanel;
+ private final ScriptTemplateSelectionTablePanel selectionTable;
+ private IDataProvider<ScriptTemplate> dataProvider;
+ private final IModel<String> title;
+
+ /**
+ * Constructor.
+ *
+ * @param id
+ * id
+ * @param lang
+ * source language
+ * @param title
+ * title, may be {@code null} for default
+ * @param dataProvider
+ * data provider for script templates, may be {@code null} for default
+ */
+ public ScriptEnginePanelWithTemplates(final String id, final Lang lang,
+ final IModel<String> title, final IDataProvider<ScriptTemplate> dataProvider)
+ {
+ super(id);
+
+ this.lang = lang;
+ this.title = title;
+ this.dataProvider = dataProvider;
+
+ if (dataProvider == null)
+ {
+ this.dataProvider = packagedScriptTemplatesDataProvider(lang);
+ }
+
+ enginePanel = newEnginePanel();
+ enginePanel.setOutputMarkupId(true);
+ add(enginePanel);
+
+ selectionTable = newSelectionTable("selectionPanel", enginePanel, this.dataProvider);
+ add(selectionTable);
+
+ }
+
+ private IDataProvider<ScriptTemplate> packagedScriptTemplatesDataProvider(final Lang lang)
+ {
+ return new ListDataProvider<ScriptTemplate>(
+ PackagedScriptTemplates.getPackagedScriptTemplates(lang));
+ }
+
+ /**
+ * Create the engine panel, override to customize.
+ * <p>
+ * Attention: This is called from the constructor.
+ */
+ protected ScriptEnginePanel newEnginePanel()
+ {
+ return ScriptEnginePanel.create("enginePanel", lang, title);
+ }
+
+ /**
+ * Create the selection table, override to customize.
+ * <p>
+ * Attention: This is called from the constructor.
+ */
+ protected ScriptTemplateSelectionTablePanel newSelectionTable(final String wicketId,
+ final ScriptEnginePanel enginePanel, final IDataProvider<ScriptTemplate> dataProvider)
+ {
+
+ return new ScriptTemplateSelectionTablePanel(wicketId, enginePanel, dataProvider, 100);
+ }
+
+ public ScriptEnginePanel getEnginePanel()
+ {
+ return enginePanel;
+ }
+
+ public ScriptTemplateSelectionTablePanel getSelectionTable()
+ {
+ return selectionTable;
+ }
+
+ public IDataProvider<ScriptTemplate> getDataProvider()
+ {
+ return dataProvider;
+ }
}
94 jdk-1.5-parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEngineWindow.java
View
@@ -28,61 +28,63 @@
*
* @author cretzel
*/
-public abstract class ScriptEngineWindow extends ModalWindow {
+public abstract class ScriptEngineWindow extends ModalWindow
+{
- private static final long serialVersionUID = 1L;
- private final Lang lang;
- private final ScriptEnginePanel enginePanel;
+ private static final long serialVersionUID = 1L;
+ private final Lang lang;
+ private final ScriptEnginePanel enginePanel;
- /**
- * Constructor.
- *
- * @param id
- * id
- * @param lang
- * source language
- * @param windowTitle
- * window title, may be {@code null} for default
- */
- public ScriptEngineWindow(final String id, final Lang lang,
- final IModel<String> windowTitle) {
- super(id);
- this.lang = lang;
+ /**
+ * Constructor.
+ *
+ * @param id
+ * id
+ * @param lang
+ * source language
+ * @param windowTitle
+ * window title, may be {@code null} for default
+ */
+ public ScriptEngineWindow(final String id, final Lang lang, final IModel<String> windowTitle)
+ {
+ super(id);
+ this.lang = lang;
- setTitle(windowTitle != null ? windowTitle : Model.of("Wicket Console"));
- setAutoSize(true);
- setResizable(false);
+ setTitle(windowTitle != null ? windowTitle : Model.of("Wicket Console"));
+ setAutoSize(true);
+ setResizable(false);
- enginePanel = newEnginePanel(getContentId(), lang);
- setContent(enginePanel);
+ enginePanel = newEnginePanel(getContentId(), lang);
+ setContent(enginePanel);
- }
+ }
- /**
- * Creates a new engine panel, override to customize.
- * <p>
- * Attention: This is called from the constructor.
- *
- * @param wicketId
- * id
- * @return a script engine panel
- */
- protected ScriptEnginePanel newEnginePanel(final String wicketId,
- final Lang lang) {
+ /**
+ * Creates a new engine panel, override to customize.
+ * <p>
+ * Attention: This is called from the constructor.
+ *
+ * @param wicketId
+ * id
+ * @return a script engine panel
+ */
+ protected ScriptEnginePanel newEnginePanel(final String wicketId, final Lang lang)
+ {
- final ScriptEnginePanel panel = ScriptEnginePanel.create(wicketId,
- lang, Model.of(""));
- panel.add(new AttributeAppender("style", Model.of("width:500px"), ";"));
+ final ScriptEnginePanel panel = ScriptEnginePanel.create(wicketId, lang, Model.of(""));
+ panel.add(new AttributeAppender("style", Model.of("width:500px"), ";"));
- return panel;
- }
+ return panel;
+ }
- public ScriptEnginePanel getEnginePanel() {
- return enginePanel;
- }
+ public ScriptEnginePanel getEnginePanel()
+ {
+ return enginePanel;
+ }
- public Lang getLang() {
- return lang;
- }
+ public Lang getLang()
+ {
+ return lang;
+ }
}
85 ...parent/console-parent/console/src/main/java/org/wicketstuff/console/ScriptEngineWithTemplatesWindow.java
View
@@ -29,54 +29,53 @@
*
* @author cretzel
*/
-public abstract class ScriptEngineWithTemplatesWindow extends ModalWindow {
+public abstract class ScriptEngineWithTemplatesWindow extends ModalWindow
+{
- private static final long serialVersionUID = 1L;
- private final ScriptEnginePanelWithTemplates enginePanelWithTemplates;
- private final IDataProvider<ScriptTemplate> dataProvider;
+ private static final long serialVersionUID = 1L;
+ private final ScriptEnginePanelWithTemplates enginePanelWithTemplates;
+ private final IDataProvider<ScriptTemplate> dataProvider;
- /**
- * Constructor.
- *
- * @param id
- * id
- * @param lang
- * source language
- * @param windowTitle
- * window title, may be {@code null} for default
- * @param dataProvider
- * data provider for script templates, may be {@code null} for
- * default
- */
- public ScriptEngineWithTemplatesWindow(final String id, final Lang lang,
- final IModel<String> windowTitle,
- final IDataProvider<ScriptTemplate> dataProvider) {
- super(id);
- this.dataProvider = dataProvider;
+ /**
+ * Constructor.
+ *
+ * @param id
+ * id
+ * @param lang
+ * source language
+ * @param windowTitle
+ * window title, may be {@code null} for default
+ * @param dataProvider
+ * data provider for script templates, may be {@code null} for default
+ */
+ public ScriptEngineWithTemplatesWindow(final String id, final Lang lang,
+ final IModel<String> windowTitle, final IDataProvider<ScriptTemplate> dataProvider)
+ {
+ super(id);
+ this.dataProvider = dataProvider;
- setTitle(windowTitle != null ? windowTitle : Model.of("Wicket Console"));
- setAutoSize(true);
- setResizable(false);
+ setTitle(windowTitle != null ? windowTitle : Model.of("Wicket Console"));
+ setAutoSize(true);
+ setResizable(false);
- enginePanelWithTemplates = newEnginePanelWithTemplates(getContentId(),
- lang);
- setContent(enginePanelWithTemplates);
+ enginePanelWithTemplates = newEnginePanelWithTemplates(getContentId(), lang);
+ setContent(enginePanelWithTemplates);
- }
+ }
- /**
- * Creates a new engine panel with templates, override to customize.
- * <p>
- * Attention: This is called from the constructor.
- *
- * @param wicketId
- * id
- * @return a script engine panel
- */
- protected ScriptEnginePanelWithTemplates newEnginePanelWithTemplates(
- final String wicketId, final Lang lang) {
- return new ScriptEnginePanelWithTemplates(wicketId, lang, Model.of(""),
- dataProvider);
- }
+ /**
+ * Creates a new engine panel with templates, override to customize.
+ * <p>
+ * Attention: This is called from the constructor.
+ *
+ * @param wicketId
+ * id
+ * @return a script engine panel
+ */
+ protected ScriptEnginePanelWithTemplates newEnginePanelWithTemplates(final String wicketId,
+ final Lang lang)
+ {
+ return new ScriptEnginePanelWithTemplates(wicketId, lang, Model.of(""), dataProvider);
+ }
}
60 jdk-1.5-parent/console-parent/console/src/test/java/org/wicketstuff/console/ComponentsRenderTest.java
View
@@ -20,34 +20,34 @@
import org.junit.Before;
import org.junit.Test;
-public class ComponentsRenderTest {
-
- private WicketTester tester;
-
- @Before
- public void setUp() {
- tester = new WicketTester();
- }
-
- @Test
- public void test_rendersSuccessfully() {
- tester.startComponent(new GroovyScriptEnginePanel("foo"));
- tester.startComponent(new GroovyScriptEngineWithTemplatesPanel("foo",
- null, null));
- tester.startComponent(new GroovyScriptEngineWindow("foo"));
- tester.startComponent(new GroovyScriptEngineWithTemplatesWindow("foo",
- null, null));
-
- }
-
- @Test
- public void test_rendersSuccessfully1() {
-
- tester.startComponent(new ClojureScriptEnginePanel("foo"));
- tester.startComponent(new ClojureScriptEngineWindow("foo"));
- tester.startComponent(new ClojureScriptEngineWithTemplatesPanel("foo",
- null, null));
- tester.startComponent(new ClojureScriptEngineWithTemplatesWindow("foo",
- null, null));
- }
+public class ComponentsRenderTest
+{
+
+ private WicketTester tester;
+
+ @Before
+ public void setUp()
+ {
+ tester = new WicketTester();
+ }
+
+ @Test
+ public void test_rendersSuccessfully()
+ {
+ tester.startComponent(new GroovyScriptEnginePanel("foo"));
+ tester.startComponent(new GroovyScriptEngineWithTemplatesPanel("foo", null, null));
+ tester.startComponent(new GroovyScriptEngineWindow("foo"));
+ tester.startComponent(new GroovyScriptEngineWithTemplatesWindow("foo", null, null));
+
+ }
+
+ @Test
+ public void test_rendersSuccessfully1()
+ {
+
+ tester.startComponent(new ClojureScriptEnginePanel("foo"));
+ tester.startComponent(new ClojureScriptEngineWindow("foo"));
+ tester.startComponent(new ClojureScriptEngineWithTemplatesPanel("foo", null, null));
+ tester.startComponent(new ClojureScriptEngineWithTemplatesWindow("foo", null, null));
+ }
}
1  ...complete-common/src/main/java/org/wicketstuff/datatable_autocomplete/trie/TrieNodeInspectingVisitor.java
View
@@ -16,7 +16,6 @@
package org.wicketstuff.datatable_autocomplete.trie;
-
/**
* @author mocleiri
*
2  ...parent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaeObjectSerializer.java
View
@@ -46,7 +46,7 @@
catch (Exception e)
{
log.error("Error serializing object " + object.getClass() + " [object=" + object + "]",
- e);
+ e);
}
return null;
}
2  ...ent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaePageManagerProvider.java
View
@@ -20,7 +20,7 @@
private final DataStoreEvictionStrategy evictionStrategy;
public GaePageManagerProvider(Application application,
- DataStoreEvictionStrategy evictionStrategy)
+ DataStoreEvictionStrategy evictionStrategy)
{
super(application);
3  jdk-1.5-parent/gmap2-parent/gmap2/src/main/java/wicket/contrib/gmap/GMap2.java
View
@@ -848,8 +848,7 @@ protected void respond(AjaxRequestTarget target)
public Object getJSinit()
{
- return getJSinvoke("overlayListenerCallbackUrl = '" + getCallbackUrl() +
- "'");
+ return getJSinvoke("overlayListenerCallbackUrl = '" + getCallbackUrl() + "'");
}
}
}
88 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/JSLib.java
View
@@ -26,36 +26,34 @@
/**
* <p>
- * The reason for this is the common use-case of fetching 'standard'-libs from
- * Google or Yahoo instead of the local app if possible, for caching and
- * parallelization reasons.
+ * The reason for this is the common use-case of fetching 'standard'-libs from Google or Yahoo
+ * instead of the local app if possible, for caching and parallelization reasons.
* </p>
* Usage:
* <p>
* <code>
* JSLib.getHeaderContributor(VersionDescriptor.exactVersion(Library.JQUERY, 1,3,1))
- * </code> will serve the appropriate Script as bundled with this project, in
- * either readable or minimized (if Wicket is in
- * 'deployment'-configuration-type) form.
+ * </code> will serve the appropriate Script as bundled with this project, in either readable or
+ * minimized (if Wicket is in 'deployment'-configuration-type) form.
* </p>
* <p>
* <code>
* JSLib.getHeaderContributor(VersionDescriptor.exactVersion(Library.JQUERY, 1,3,1), CDN.ANY)
- * </code> will serve it from the any CDN where it is available, falling back to
- * the local version if necessary.
+ * </code> will serve it from the any CDN where it is available, falling back to the local version
+ * if necessary.
* </p>
* <p>
* <code>
* JSLib.getHeaderContributor(VersionDescriptor.exactVersion(Library.JQUERY, 1,3,1), true, CDN.GOOGLE)
- * </code> will serve it from Google (or the local Version as fallback) in
- * minimized form, no matter what Wicket´s configuration is.
+ * </code> will serve it from Google (or the local Version as fallback) in minimized form, no matter
+ * what Wicket´s configuration is.
* </p>
* <p>
* Component Developers should not select providers.
* </p>
* <p>
- * Application Developers can set the providers they want to use on a per
- * Application basis by using <br />
+ * Application Developers can set the providers they want to use on a per Application basis by using
+ * <br />
* <code>
* JSLib.setOverrideProviders(Application.get(), LocalProvider.DEFAULT);
* </code> for Local use only, or <br />
@@ -68,56 +66,56 @@
* </p>
*
*/
-public class JSLib {
- private JSLib() {
+public class JSLib
+{
+ private JSLib()
+ {
}
- private static final MetaDataKey<Provider[]> PROVIDER_KEY = new MetaDataKey<Provider[]>() {
+ private static final MetaDataKey<Provider[]> PROVIDER_KEY = new MetaDataKey<Provider[]>()
+ {
private static final long serialVersionUID = 1L;
};
/**
- * Not to be used by Component authors. This should be used as an
- * application-wide setting for which providers to use. If set, it will be
- * applied instead of the providers passed
+ * Not to be used by Component authors. This should be used as an application-wide setting for
+ * which providers to use. If set, it will be applied instead of the providers passed
*
* @param app
* @param providers
*/
- public static void setOverrideProviders(final Application app,
- final Provider... providers) {
+ public static void setOverrideProviders(final Application app, final Provider... providers)
+ {
Assert.parameterNotNull(app, "app");
Assert.parameterNotNull(providers, "providers");
app.setMetaData(PROVIDER_KEY, providers);
}
/**
- * Get a header contributor for the given {@link VersionDescriptor}. This
- * method should be used by component authors if they want to offer maximum
- * flexibility in reuse of their components.
+ * Get a header contributor for the given {@link VersionDescriptor}. This method should be used
+ * by component authors if they want to offer maximum flexibility in reuse of their components.
*
* @param versionDescriptor
* @return matching HeaderContributor from the first matching provider
*/
- public static IHeaderContributor getHeaderContribution(
- final VersionDescriptor versionDescriptor) {
- return getHeaderContribution(versionDescriptor, WicketDeploymentState
- .isProduction(), LocalProvider.DEFAULT);
+ public static IHeaderContributor getHeaderContribution(final VersionDescriptor versionDescriptor)
+ {
+ return getHeaderContribution(versionDescriptor, WicketDeploymentState.isProduction(),
+ LocalProvider.DEFAULT);
}
/**
* @param versionDescriptor
* @param providers
- * list of alternative providers (might be ignored if
- * setOverrideProviders was used)
+ * list of alternative providers (might be ignored if setOverrideProviders was used)
* @return matching HeaderContributor from the first matching provider
*/
public static IHeaderContributor getHeaderContribution(
- final VersionDescriptor versionDescriptor,
- final Provider... providers) {
- return getHeaderContribution(versionDescriptor, WicketDeploymentState
- .isProduction(), providers);
+ final VersionDescriptor versionDescriptor, final Provider... providers)
+ {
+ return getHeaderContribution(versionDescriptor, WicketDeploymentState.isProduction(),
+ providers);
}
/**
@@ -125,24 +123,28 @@ public static IHeaderContributor getHeaderContribution(
* @param production
* if true tried to serve minimized versions
* @param providers
- * list of alternative providers (might be ignored if
- * setOverrideProviders was used
+ * list of alternative providers (might be ignored if setOverrideProviders was used
* @return matching HeaderContributor from the first matching provider
*/
public static IHeaderContributor getHeaderContribution(
- final VersionDescriptor versionDescriptor,
- final boolean production, final Provider... providers) {
+ final VersionDescriptor versionDescriptor, final boolean production,
+ final Provider... providers)
+ {
Provider[] prov = Application.get().getMetaData(PROVIDER_KEY);
- if (prov == null) {
+ if (prov == null)
+ {
prov = providers;
}
- if (prov != null) {
- for (final Provider provider : prov) {
- final IHeaderContributor hc = provider.getHeaderContributor(
- versionDescriptor, production);
- if (hc != null) {
+ if (prov != null)
+ {
+ for (final Provider provider : prov)
+ {
+ final IHeaderContributor hc = provider.getHeaderContributor(versionDescriptor,
+ production);
+ if (hc != null)
+ {
return hc;
}
}
40 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/JSReference.java
View
@@ -23,23 +23,26 @@
import org.wicketstuff.jslibraries.util.Assert;
import org.wicketstuff.jslibraries.util.WicketDeploymentState;
-public class JSReference {
- private JSReference() {
+public class JSReference
+{
+ private JSReference()
+ {
}
- public static ResourceReference getReference(
- VersionDescriptor versionDescriptor) {
- return getReference(versionDescriptor, WicketDeploymentState
- .isProduction());
+ public static ResourceReference getReference(VersionDescriptor versionDescriptor)
+ {
+ return getReference(versionDescriptor, WicketDeploymentState.isProduction());
}
- public static ResourceReference getReference(
- VersionDescriptor versionDescriptor, boolean production) {
+ public static ResourceReference getReference(VersionDescriptor versionDescriptor,
+ boolean production)
+ {
Assert.parameterNotNull(versionDescriptor, "versionDescriptor");
Version version = versionDescriptor.getVersion(LocalProvider.DEFAULT);
- if (version == null) {
+ if (version == null)
+ {
// no matching version found for local provider
return null;
}
@@ -48,24 +51,25 @@ public static ResourceReference getReference(
return new PackageResourceReference(JSReference.class, sb.toString());
}
- public static StringBuffer createFileName(Library lib, Version version,
- boolean production) {
+ public static StringBuffer createFileName(Library lib, Version version, boolean production)
+ {
Assert.parameterNotNull(lib, "lib");
Assert.parameterNotNull(version, "version");
StringBuffer sb = new StringBuffer();
- sb.append("js/").append(LocalProvider.DEFAULT.getLocalFileName(lib))
- .append('-');
- for (int i = 0; i < version.getNumbers().length; i++) {
+ sb.append("js/").append(LocalProvider.DEFAULT.getLocalFileName(lib)).append('-');
+ for (int i = 0; i < version.getNumbers().length; i++)
+ {
sb.append(version.getNumbers()[i]);
- if (i < (version.getNumbers().length - 1)) {
+ if (i < (version.getNumbers().length - 1))
+ {
sb.append('.');
}
}
- if (production) {
- String productionSignifier = LocalProvider.DEFAULT
- .getProductionSignifier(lib);
+ if (production)
+ {
+ String productionSignifier = LocalProvider.DEFAULT.getProductionSignifier(lib);
if (productionSignifier != null)
sb.append(productionSignifier);
}
20 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/Provider.java
View
@@ -21,26 +21,24 @@
import org.apache.wicket.markup.html.IHeaderContributor;
/**
- * A Provider is an optional means of overriding the HeaderContributor created
- * by JSLib. <br/>
+ * A Provider is an optional means of overriding the HeaderContributor created by JSLib. <br/>
* If you use <code>
- * JSLib.getHeaderContributor(versionDescriptor, provider[])</code> ,
- * these providers get the opportunity to provide a HeaderContributor first. If
- * it returns null, the requested lib will be served from the application
- * instead (if defined).
+ * JSLib.getHeaderContributor(versionDescriptor, provider[])</code> , these providers get the
+ * opportunity to provide a HeaderContributor first. If it returns null, the requested lib will be
+ * served from the application instead (if defined).
*
* @author Uwe Schäfer, (uwe@codesmell.de)
*/
-public interface Provider {
+public interface Provider
+{
/**
* @param versionDescriptor
* @param productionHint
* if true, tries to use minimized version of script if available
- * @return HeaderContributor to be added to component, or null if
- * unavailable
+ * @return HeaderContributor to be added to component, or null if unavailable
*/
- public IHeaderContributor getHeaderContributor(
- VersionDescriptor versionDescriptor, boolean productionHint);
+ public IHeaderContributor getHeaderContributor(VersionDescriptor versionDescriptor,
+ boolean productionHint);
}
3  jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/URLRenderer.java
View
@@ -20,6 +20,7 @@
import java.net.URL;
-interface URLRenderer {
+interface URLRenderer
+{
URL render(Library lib, Version v, boolean production);
}
138 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/util/Assert.java
View
@@ -15,148 +15,178 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */package org.wicketstuff.jslibraries.util;
+ */
+package org.wicketstuff.jslibraries.util;
import java.util.EnumSet;
/**
* A bunch of common Assertions.
*/
-public class Assert {
- private Assert() {
+public class Assert
+{
+ private Assert()
+ {
// hide
}
- public static final void isNotNull(final Object reference) {
+ public static final void isNotNull(final Object reference)
+ {
Assert.isNotNull(reference, "Reference was null");
}
- public static final void isNotNull(final Object reference, final String msg) {
- if (reference == null) {
+ public static final void isNotNull(final Object reference, final String msg)
+ {
+ if (reference == null)
+ {
Assert.raiseError(msg);
}
}
- public static final void isNotNullAndNotEmpty(final String reference) {
+ public static final void isNotNullAndNotEmpty(final String reference)
+ {
Assert.isNotNullAndNotEmpty(reference, "Reference was null or empty");
}
- public static final void isNotNullAndNotEmpty(final String reference,
- final String msg) {
- if ((reference == null) || (reference.length() == 0)) {
+ public static final void isNotNullAndNotEmpty(final String reference, final String msg)
+ {
+ if ((reference == null) || (reference.length() == 0))
+ {
Assert.raiseError(msg);
}
}
- public static final void isFalse(final boolean value) {
+ public static final void isFalse(final boolean value)
+ {
Assert.isFalse(value, "Value was true");
}
- public static final void isFalse(final boolean value, final String msg) {
- if (value) {
+ public static final void isFalse(final boolean value, final String msg)
+ {
+ if (value)
+ {
Assert.raiseError(msg);
}
}
- public static final void isNotFalse(final boolean value) {
+ public static final void isNotFalse(final boolean value)
+ {
Assert.isNotFalse(value, "Value was false");
}
- public static final void isNotFalse(final boolean value, final String msg) {
- if (!value) {
+ public static final void isNotFalse(final boolean value, final String msg)
+ {
+ if (!value)
+ {
Assert.raiseError(msg);
}
}
- public static final void isTrue(final boolean value) {
+ public static final void isTrue(final boolean value)
+ {
Assert.isTrue(value, "Value was false");
}
- public static final void isTrue(final boolean value, final String msg) {
- if (!value) {
+ public static final void isTrue(final boolean value, final String msg)
+ {
+ if (!value)
+ {
Assert.raiseError(msg);
}
}
- public static final void isNotTrue(final boolean value) {
+ public static final void isNotTrue(final boolean value)
+ {
Assert.isNotTrue(value, "Value was true");
}
- public static final void isNotTrue(final boolean value, final String msg) {
- if (value) {
+ public static final void isNotTrue(final boolean value, final String msg)
+ {
+ if (value)
+ {
Assert.raiseError(msg);
}
}
- public static final void raiseError(final String error) {
+ public static final void raiseError(final String error)
+ {
throw new AssertionFailedException(error);
}
- public static final void raiseError(final String error, final Exception e) {
+ public static final void raiseError(final String error, final Exception e)
+ {
throw new AssertionFailedException(error, e);
}
- private static class AssertionFailedException extends RuntimeException {
+ private static class AssertionFailedException extends RuntimeException
+ {
private static final long serialVersionUID = 1L;
- public AssertionFailedException(final String detail) {
+ public AssertionFailedException(final String detail)
+ {
super(detail);
}
- public AssertionFailedException(final String detail, final Throwable e) {
+ public AssertionFailedException(final String detail, final Throwable e)
+ {
super(detail, e);
}
}
- public static void isEqual(final Object obj1, final Object obj2) {
- if ((obj1 == null) && (obj2 == null)) {
+ public static void isEqual(final Object obj1, final Object obj2)
+ {
+ if ((obj1 == null) && (obj2 == null))
+ {
return;
}
- if ((obj1 != null) && (!obj1.equals(obj2))) {
- Assert
- .raiseError("'" + obj1 + "' and '" + obj2
- + "' are not equal");
+ if ((obj1 != null) && (!obj1.equals(obj2)))
+ {
+ Assert.raiseError("'" + obj1 + "' and '" + obj2 + "' are not equal");
}
}
- public static void parameterNotNull(final Object reference,
- final String nameOfParameter) {
- if (reference == null) {
- Assert.raiseError("Parameter '" + nameOfParameter
- + "' is not expected to be null.");
+ public static void parameterNotNull(final Object reference, final String nameOfParameter)
+ {
+ if (reference == null)
+ {
+ Assert.raiseError("Parameter '" + nameOfParameter + "' is not expected to be null.");
}
}
- public static void isNull(final Object object, final String string) {
- if (object != null) {
+ public static void isNull(final Object object, final String string)
+ {
+ if (object != null)
+ {
Assert.raiseError(string);
}
}
- public static void parameterInRange(final int value, final int min,
- final int max, final String string) {
- Assert.isTrue((min <= value) && (value <= max), "Parameter '" + string
- + "' must be in range of " + min + " <= " + string + " <= "
- + max + ". Current value was " + value);
+ public static void parameterInRange(final int value, final int min, final int max,
+ final String string)
+ {
+ Assert.isTrue((min <= value) && (value <= max), "Parameter '" + string +
+ "' must be in range of " + min + " <= " + string + " <= " + max +
+ ". Current value was " + value);
}
- public static void parameterLegal(final boolean condition,
- final String parameter) {
+ public static void parameterLegal(final boolean condition, final String parameter)
+ {
Assert.isTrue(condition, "Parameter '" + parameter + "' is not legal.");
}
- public static void parameterNotEmpty(final String reference,
- final String nameOfParameter) {
+ public static void parameterNotEmpty(final String reference, final String nameOfParameter)
+ {
- if ("".equals(reference)) {
- Assert.raiseError("Parameter '" + nameOfParameter
- + "' is not expected to be empty.");
+ if ("".equals(reference))
+ {
+ Assert.raiseError("Parameter '" + nameOfParameter + "' is not expected to be empty.");
}
}
- public static <T extends Enum<T>> void enumContains(
- final EnumSet<T> supportedQueryMode, final T mode) {
+ public static <T extends Enum<T>> void enumContains(final EnumSet<T> supportedQueryMode,
+ final T mode)
+ {
Assert.isTrue(true, "");
}
}
12 jdk-1.5-parent/jslibraries/src/main/java/org/wicketstuff/jslibraries/util/WicketDeploymentState.java
View
@@ -21,12 +21,14 @@
import org.apache.wicket.Application;
import org.apache.wicket.RuntimeConfigurationType;
-public class WicketDeploymentState {
- private WicketDeploymentState() {
+public class WicketDeploymentState
+{
+ private WicketDeploymentState()
+ {
}
- public static boolean isProduction() {
- return RuntimeConfigurationType.DEPLOYMENT == Application.get()
- .getConfigurationType();
+ public static boolean isProduction()
+ {
+ return RuntimeConfigurationType.DEPLOYMENT == Application.get().getConfigurationType();
}
}
76 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/CDNTest.java
View
@@ -23,50 +23,50 @@
public class CDNTest extends TestCase
{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- }
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
- public void testCDNs() throws Exception
- {
+ public void testCDNs() throws Exception
+ {
- IterateAllRegistered(false);
- IterateAllRegistered(true);
+ IterateAllRegistered(false);
+ IterateAllRegistered(true);
- }
+ }
- private void IterateAllRegistered(final boolean production) throws IOException
- {
+ private void IterateAllRegistered(final boolean production) throws IOException
+ {
- final CDN[] cdns = CDN.values();
- for (int j = 0; j < cdns.length; j++)
- {
- final CDN cdn = cdns[j];
+ final CDN[] cdns = CDN.values();
+ for (int j = 0; j < cdns.length; j++)
+ {
+ final CDN cdn = cdns[j];
- final Library[] libs = Library.values();
- for (int i = 0; i < libs.length; i++)
- {
- final Library library = libs[i];
- final Set<Version> versions = library.getVersions(cdn);
- for (final Version v : versions)
- {
- final URL render = cdn.render(library, v, production);
- // test if something comes back
- final URLConnection c = render.openConnection();
- final String type = c.getContentType();
- System.out.println("checking URL: " + render.toExternalForm());
- assertTrue(type.contains("javascript"));
- }
- }
- }
- }
+ final Library[] libs = Library.values();
+ for (int i = 0; i < libs.length; i++)
+ {
+ final Library library = libs[i];
+ final Set<Version> versions = library.getVersions(cdn);
+ for (final Version v : versions)
+ {
+ final URL render = cdn.render(library, v, production);
+ // test if something comes back
+ final URLConnection c = render.openConnection();
+ final String type = c.getContentType();
+ System.out.println("checking URL: " + render.toExternalForm());
+ assertTrue(type.contains("javascript"));
+ }
+ }
+ }
+ }
}
56 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/LocalProviderTest.java
View
@@ -24,33 +24,39 @@
import junit.framework.TestCase;
-public class LocalProviderTest extends TestCase {
+public class LocalProviderTest extends TestCase
+{
+
+ public void testCDNs() throws Exception
+ {
+ IterateAllRegistered(false);
+ IterateAllRegistered(true);
+ }
+
+ private void IterateAllRegistered(boolean production) throws IOException
+ {
+
+
+ Library[] libs = Library.values();
+ for (int i = 0; i < libs.length; i++)
+ {
+ Library library = libs[i];
+ Set<Version> versions = library.getVersions(LocalProvider.DEFAULT);
+ for (Version v : versions)
+ {
+
+ VersionDescriptor vd = VersionDescriptor.exactVersion(library, v.getNumbers());
+ StringBuffer fn = JSReference.createFileName(library,
+ vd.getVersion(LocalProvider.DEFAULT), production);
+
+ URL resource = getClass().getResource(fn.toString());
+ System.out.println("checking file: " + fn);
+ assertNotNull(resource);
+ assertNotNull(resource.getContent());
+ }
- public void testCDNs() throws Exception {
- IterateAllRegistered(false);
- IterateAllRegistered(true);
}
+ }
- private void IterateAllRegistered(boolean production) throws IOException {
-
-
- Library[] libs = Library.values();
- for (int i = 0; i < libs.length; i++) {
- Library library = libs[i];
- Set<Version> versions = library.getVersions(LocalProvider.DEFAULT);
- for (Version v : versions) {
-
- VersionDescriptor vd = VersionDescriptor.exactVersion(library, v.getNumbers());
- StringBuffer fn = JSReference.createFileName(library, vd.getVersion(LocalProvider.DEFAULT), production);
-
- URL resource = getClass().getResource(fn.toString());
- System.out.println("checking file: "+fn);
- assertNotNull(resource);
- assertNotNull(resource.getContent());
- }
-
- }
- }
-
}
39 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/VersionDescriptorTest.java
View
@@ -20,33 +20,48 @@
import junit.framework.TestCase;
-public class VersionDescriptorTest extends TestCase {
+public class VersionDescriptorTest extends TestCase
+{
- public void testLatestOfVersionDescriptor() throws Exception {
+ public void testLatestOfVersionDescriptor() throws Exception
+ {
VersionDescriptor vd = VersionDescriptor.alwaysLatestOfVersion(Library.JQUERY, 1, 1);
assertEquals(new Version(1, 1, 4), vd.getVersion(LocalProvider.DEFAULT));
}
- public void testExactVersionDescriptor() throws Exception {
+ public void testExactVersionDescriptor() throws Exception
+ {
VersionDescriptor vd = VersionDescriptor.exactVersion(Library.JQUERY, 1, 2);
assertEquals(new Version(1, 2), vd.getVersion(LocalProvider.DEFAULT));
-
+
vd = VersionDescriptor.exactVersion(Library.JQUERY, 1, 2, 6);
assertEquals(new Version(1, 2, 6), vd.getVersion(LocalProvider.DEFAULT));
}
- public void testAlwaysLatestDescriptor() throws Exception {
+ public void testAlwaysLatestDescriptor() throws Exception
+ {
// this test will obviously fail every time we add a new JQUERY version
VersionDescriptor vd = VersionDescriptor.alwaysLatest(Library.JQUERY);
assertEquals(new Version(1, 4, 2), vd.getVersion(LocalProvider.DEFAULT));
}
-
- public void testLibraryWithManyVersionDepths() throws Exception {
- assertEquals(new Version(1, 5, 1, 2), VersionDescriptor.alwaysLatestOfVersion(Library.PROTOTYPE, 1, 5).getVersion(LocalProvider.DEFAULT));
- assertEquals(new Version(1, 5, 1, 2), VersionDescriptor.alwaysLatestOfVersion(Library.PROTOTYPE, 1, 5, 1).getVersion(LocalProvider.DEFAULT));
- assertEquals(new Version(1, 6, 0), VersionDescriptor.exactVersion(Library.PROTOTYPE, 1, 6, 0).getVersion(LocalProvider.DEFAULT));
+
+ public void testLibraryWithManyVersionDepths() throws Exception
+ {
+ assertEquals(
+ new Version(1, 5, 1, 2),
+ VersionDescriptor.alwaysLatestOfVersion(Library.PROTOTYPE, 1, 5).getVersion(
+ LocalProvider.DEFAULT));
+ assertEquals(
+ new Version(1, 5, 1, 2),
+ VersionDescriptor.alwaysLatestOfVersion(Library.PROTOTYPE, 1, 5, 1).getVersion(
+ LocalProvider.DEFAULT));
+ assertEquals(
+ new Version(1, 6, 0),
+ VersionDescriptor.exactVersion(Library.PROTOTYPE, 1, 6, 0).getVersion(
+ LocalProvider.DEFAULT));
// this test will obviously fail every time we add a new PROTOTYPE version
- assertEquals(new Version(1, 7), VersionDescriptor.alwaysLatest(Library.PROTOTYPE).getVersion(LocalProvider.DEFAULT));
-
+ assertEquals(new Version(1, 7), VersionDescriptor.alwaysLatest(Library.PROTOTYPE)
+ .getVersion(LocalProvider.DEFAULT));
+
}
}
31 jdk-1.5-parent/jslibraries/src/test/java/org/wicketstuff/jslibraries/VersionTest.java
View
@@ -20,23 +20,26 @@
import junit.framework.TestCase;
-public class VersionTest extends TestCase {
+public class VersionTest extends TestCase
+{
- public void testEquals() {
- assertTrue(new Version(1,1).equals(new Version(1,1)));
+ public void testEquals()
+ {
+ assertTrue(new Version(1, 1).equals(new Version(1, 1)));
assertTrue(new Version(2).equals(new Version(2)));
- assertFalse(new Version(1,1).equals(new Version(1)));
- assertFalse(new Version(1).equals(new Version(1,1)));
+ assertFalse(new Version(1, 1).equals(new Version(1)));
+ assertFalse(new Version(1).equals(new Version(1, 1)));
}
-
- public void testMatches() throws Exception {
+
+ public void testMatches() throws Exception
+ {
assertTrue(new Version(1).matches(new Version()));
- assertTrue(new Version(1,1).matches(new Version(1)));
- assertTrue(new Version(1,1).matches(new Version(1,1)));
- assertTrue(new Version(1,1,1).matches(new Version(1,1)));
- assertTrue(new Version(1,1,1,1).matches(new Version(1,1)));
- assertFalse(new Version(1,1).matches(new Version(1,1,1)));
- assertFalse(new Version(1,1).matches(new Version(2)));
- assertFalse(new Version(2).matches(new Version(1,1)));
+ assertTrue(new Version(1, 1).matches(new Version(1)));
+ assertTrue(new Version(1, 1).matches(new Version(1, 1)));
+ assertTrue(new Version(1, 1, 1).matches(new Version(1, 1)));
+ assertTrue(new Version(1, 1, 1, 1).matches(new Version(1, 1)));
+ assertFalse(new Version(1, 1).matches(new Version(1, 1, 1)));
+ assertFalse(new Version(1, 1).matches(new Version(2)));
+ assertFalse(new Version(2).matches(new Version(1, 1)));
}
}
31 jdk-1.5-parent/mbeanview-parent/mbeanview/src/main/java/org/wicketstuff/mbeanview/MBeansPanel.java
View
@@ -67,7 +67,7 @@
public static final String VIEW_PANEL_ID = "view";
private static final ResourceReference CSS = new PackageResourceReference(MBeansPanel.class,
- "css/MBeansPanel.css");
+ "css/MBeansPanel.css");
public MBeansPanel(String id)
{
@@ -127,10 +127,9 @@ protected Component newNodeIcon(MarkupContainer parent, String id, TreeNode node
if (node instanceof DefaultMutableTreeNode)
{
DefaultMutableTreeNode mutableNode = (DefaultMutableTreeNode)node;
- if (mutableNode.getChildCount() > 0
- && (mutableNode.getChildAt(0) instanceof AttributeNode
- || mutableNode.getChildAt(0) instanceof OperationNode || mutableNode
- .getChildAt(0) instanceof NotificationNode))
+ if (mutableNode.getChildCount() > 0 &&
+ (mutableNode.getChildAt(0) instanceof AttributeNode ||
+ mutableNode.getChildAt(0) instanceof OperationNode || mutableNode.getChildAt(0) instanceof NotificationNode))
{
return new EmptyPanel(id).add(new SimpleAttributeModifier("style", "width:0;"));
}
@@ -140,8 +139,8 @@ protected Component newNodeIcon(MarkupContainer parent, String id, TreeNode node
}
private TreeModel getTreeModel(MbeanServerLocator reachMbeanServer)
- throws MalformedObjectNameException, NullPointerException, InstanceNotFoundException,
- IntrospectionException, ReflectionException
+ throws MalformedObjectNameException, NullPointerException, InstanceNotFoundException,
+ IntrospectionException, ReflectionException
{
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("root");
TreeModel model = new DefaultTreeModel(rootNode);
@@ -153,7 +152,7 @@ private TreeModel getTreeModel(MbeanServerLocator reachMbeanServer)
// expand the domain by querying its names
Set<ObjectName> domainNames = reachMbeanServer.get().queryNames(null,
- new ObjectName(domain + ":*"));
+ new ObjectName(domain + ":*"));
addDomainsCildrens(domainNode, DataUtil.parseToPropsSet(domainNames));
// iterating domain names and to set their related objects instance
@@ -177,7 +176,7 @@ private TreeModel getTreeModel(MbeanServerLocator reachMbeanServer)
}
}
Set<ObjectInstance> mBeans = reachMbeanServer.get().queryMBeans(null,
- new ObjectName(query.toString()));
+ new ObjectName(query.toString()));
for (ObjectInstance objectInstance : mBeans)
{
((MbeanNode)node).setObjectInstance(objectInstance, reachMbeanServer);
@@ -273,8 +272,8 @@ public MbeanNode(MbeanNode parent)
}
public void setObjectInstance(ObjectInstance objectInstance,
- MbeanServerLocator reachMbeanServer) throws InstanceNotFoundException,
- IntrospectionException, ReflectionException
+ MbeanServerLocator reachMbeanServer) throws InstanceNotFoundException,
+ IntrospectionException, ReflectionException
{
this.objectInstance = objectInstance;
mBeanServerLocator = reachMbeanServer;
@@ -293,7 +292,7 @@ public void setObjectInstance(ObjectInstance objectInstance,
if (beanNotificationInfos.length > 0)
{
DefaultMutableTreeNode notificationsNode = new DefaultMutableTreeNode(
- "Notification");
+ "Notification");
add(notificationsNode);
for (MBeanNotificationInfo beanNotificationInfo : beanNotificationInfos)
{
@@ -338,7 +337,7 @@ public AttributesNode(MbeanNode parent, MBeanAttributeInfo[] beanAttributeInfos)
public Component getView(String id)
{
return new AttributeValuesPanel(id, objectInstance.getObjectName(), beanAttributeInfos,
- mBeanServerLocator);
+ mBeanServerLocator);
}
@Override
@@ -363,7 +362,7 @@ public AttributeNode(MbeanNode parent, MBeanAttributeInfo mBeanAttributeInfo)
public Component getView(String wicketId)
{
return new AttributeValuesPanel(wicketId, objectInstance.getObjectName(),
- new MBeanAttributeInfo[] { attributeInfo }, mBeanServerLocator);
+ new MBeanAttributeInfo[] { attributeInfo }, mBeanServerLocator);
}
@Override
@@ -392,7 +391,7 @@ public OperationsNode(MbeanNode parent, MBeanOperationInfo[] beanOperationInfos)
public Component getView(String id)
{
return new OperationsPanel(id, objectInstance.getObjectName(), beanOperationInfos,
- mBeanServerLocator);
+ mBeanServerLocator);
}
@Override
@@ -417,7 +416,7 @@ public OperationNode(OperationsNode parent, MBeanOperationInfo mBeanOperationInf
public Component getView(String wicketId)
{
return new OperationsPanel(wicketId, objectInstance.getObjectName(),
- new MBeanOperationInfo[] { beanOperationInfo }, mBeanServerLocator);
+ new MBeanOperationInfo[] { beanOperationInfo }, mBeanServerLocator);
}
@Override
4 ...s-meiomask-parent/mootools-meiomask/src/main/java/org/wicketstuff/mootools/meiomask/CustomMaskField.java
View
@@ -34,13 +34,13 @@ public CustomMaskField(String id, String mask, String options, IModel<T> model)
}
public CustomMaskField(String id, String mask, String options, IModel<T> model,
- boolean valueContainsLiteralCharacters)
+ boolean valueContainsLiteralCharacters)
{
this(id, mask, options, model, valueContainsLiteralCharacters, null);
}
public CustomMaskField(String id, String mask, String options, IModel<T> model,
- boolean valueContainsLiteralCharacters, Class<T> type)
+ boolean valueContainsLiteralCharacters, Class<T> type)
{
super(id, MaskType.Fixed, options, model, valueContainsLiteralCharacters, type, mask);
}
75 ...mootools-meiomask-parent/mootools-meiomask/src/main/java/org/wicketstuff/mootools/meiomask/MaskType.java
View
@@ -22,48 +22,43 @@
*
* @author inaiat
*/
-public enum MaskType {
+public enum MaskType
+{
- Fixed("fixed"),
- FixedPhone("fixed.phone", "(##) ####-####"),
- FixedPhoneUs("fixed.phone-us", "(###) ###-####"),
- FixedCpf("fixed.cpf", "###.###.###-##"),
- FixedCnpj("fixed.cnpj", "##.###.###/####-##"),
- FixedDate("fixed.date", "##/##/####"),
- FixedDateUs("fixed.date-us", "##/##/####"),
- FixedCep("fixed.cep", "#####-###"),
- FixedTime("fixed.time", "##:##"),
- FixedCc("fixed.cc", "#### #### #### ####"),
- ReverseInteger("reverse.integer"),
- ReverseDecimal("reverse.decimal"),
- ReverseDecimalUs("reverse.decimal-us"),
- ReverseReais("reverse.reais"),
- ReverseDollar("reverse.dollar"),
- RegexpIp("regexp.ip"),
- RegexpEmail("regexp.email");
-
- private String maskName;
- private String mask;
+ Fixed("fixed"), FixedPhone("fixed.phone", "(##) ####-####"), FixedPhoneUs("fixed.phone-us",
+ "(###) ###-####"), FixedCpf("fixed.cpf", "###.###.###-##"), FixedCnpj("fixed.cnpj",
+ "##.###.###/####-##"), FixedDate("fixed.date", "##/##/####"), FixedDateUs("fixed.date-us",
+ "##/##/####"), FixedCep("fixed.cep", "#####-###"), FixedTime("fixed.time", "##:##"), FixedCc(
+ "fixed.cc", "#### #### #### ####"), ReverseInteger("reverse.integer"), ReverseDecimal(
+ "reverse.decimal"), ReverseDecimalUs("reverse.decimal-us"), ReverseReais("reverse.reais"), ReverseDollar(
+ "reverse.dollar"), RegexpIp("regexp.ip"), RegexpEmail("regexp.email");
- private MaskType(String maskName) {
- this(maskName,null);
- }
-
- private MaskType(String maskName, String mask) {
- this.maskName = maskName;
- this.mask = mask;
- }
+ private String maskName;
+ private String mask;
- public String getMaskName() {
- return maskName;
- }
-
- public String getMask() {
- return mask;
- }
+ private MaskType(String maskName)
+ {
+ this(maskName, null);
+ }
- public MeioMaskBehavior ofBehavior() {
- return new MeioMaskBehavior(this);
- }
-}
+ private MaskType(String maskName, String mask)
+ {
+ this.maskName = maskName;
+ this.mask = mask;
+ }
+
+ public String getMaskName()
+ {
+ return maskName;
+ }
+ public String getMask()
+ {
+ return mask;
+ }
+
+ public MeioMaskBehavior ofBehavior()
+ {
+ return new MeioMaskBehavior(this);
+ }