Author: jrthomerson
Date: Tue Mar 31 05:14:14 2009
New Revision: 760335

URL: http://svn.apache.org/viewvc?rev=760335&view=rev
Log:
add debug setting for devutils enabled / disabled

Added:
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPage.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPanel.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevelopmentUtilitiesNotEnabledException.java
Modified:
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/ApplicationView.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorBug.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/LiveSessionsPage.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/RequestsPage.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/SessionView.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/Application.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java
    
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/Settings.java

Added: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPage.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPage.java?rev=760335&view=auto
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPage.java
 (added)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPage.java
 Tue Mar 31 05:14:14 2009
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.apache.wicket.devutils;
+
+import org.apache.wicket.IPageMap;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.model.IModel;
+
+/**
+ * All pages in the wicket-devutils package should extend this page so that 
they
+ * automatically get checked to make sure that the utilities are enabled in the
+ * application debug settings.
+ * 
+ * @author Jeremy Thomerson <[email protected]>
+ */
+public class DevUtilsPage extends WebPage {
+
+       public DevUtilsPage() {
+               super();
+       }
+
+       public DevUtilsPage(IModel<?> model) {
+               super(model);
+       }
+
+       public DevUtilsPage(IPageMap pageMap, IModel<?> model) {
+               super(pageMap, model);
+       }
+
+       public DevUtilsPage(IPageMap pageMap, PageParameters parameters) {
+               super(pageMap, parameters);
+       }
+
+       public DevUtilsPage(IPageMap pageMap) {
+               super(pageMap);
+       }
+
+       public DevUtilsPage(PageParameters parameters) {
+               super(parameters);
+       }
+
+       @Override
+       protected void onBeforeRender() {
+               super.onBeforeRender();
+               DevelopmentUtilitiesNotEnabledException.check();
+       }
+}

Added: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPanel.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPanel.java?rev=760335&view=auto
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPanel.java
 (added)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevUtilsPanel.java
 Tue Mar 31 05:14:14 2009
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.apache.wicket.devutils;
+
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+/**
+ * All panels in the wicket-devutils package should extend this panel so that
+ * they automatically get checked to make sure that the utilities are enabled 
in
+ * the application debug settings.
+ * 
+ * @author Jeremy Thomerson <[email protected]>
+ */
+public class DevUtilsPanel extends Panel {
+
+       private static final long serialVersionUID = 1L;
+
+       public DevUtilsPanel(String id, IModel<?> model) {
+               super(id, model);
+       }
+
+       public DevUtilsPanel(String id) {
+               super(id);
+       }
+
+       @Override
+       protected void onBeforeRender() {
+               super.onBeforeRender();
+               DevelopmentUtilitiesNotEnabledException.check();
+       }
+
+}

Added: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevelopmentUtilitiesNotEnabledException.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevelopmentUtilitiesNotEnabledException.java?rev=760335&view=auto
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevelopmentUtilitiesNotEnabledException.java
 (added)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/DevelopmentUtilitiesNotEnabledException.java
 Tue Mar 31 05:14:14 2009
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.apache.wicket.devutils;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.WicketRuntimeException;
+
+/**
+ * Just an exception that can be thrown if aa development utility is invoked,
+ * constructed, etc, and the setting in the application is not enabled.
+ * 
+ * Includes a static method that also does this check so that it is not carbon
+ * copied throughout the code.
+ * 
+ * If you see this error in your application, you need to call:
+ * 
<tt>Application.get().getDebugSettings().setDevelopmentUtilitiesEnabled(true)</tt>
+ * 
+ * @author Jeremy Thomerson
+ */
+public class DevelopmentUtilitiesNotEnabledException extends
+               WicketRuntimeException {
+
+       private static final long serialVersionUID = 1L;
+
+       public DevelopmentUtilitiesNotEnabledException() {
+               super(
+                               "IDebugSettings.developmentUtilitiesEnabled 
must be enabled to use this feature");
+       }
+
+       public static void check() {
+               if (Application.get().getDebugSettings()
+                               .isDevelopmentUtilitiesEnabled() == false) {
+                       throw new DevelopmentUtilitiesNotEnabledException();
+               }
+       }
+}

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/ApplicationView.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/ApplicationView.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/ApplicationView.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/ApplicationView.java
 Tue Mar 31 05:14:14 2009
@@ -17,15 +17,15 @@
 package org.apache.wicket.devutils.inspector;
 
 import org.apache.wicket.Application;
+import org.apache.wicket.devutils.DevUtilsPanel;
 import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.panel.Panel;
 
 /**
  * A Wicket panel that shows interesting information about a given Wicket 
session.
  * 
  * @author Jonathan Locke
  */
-public final class ApplicationView extends Panel
+public final class ApplicationView extends DevUtilsPanel
 {
        private static final long serialVersionUID = 1L;
 

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorBug.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorBug.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorBug.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorBug.java
 Tue Mar 31 05:14:14 2009
@@ -17,11 +17,11 @@
 package org.apache.wicket.devutils.inspector;
 
 import org.apache.wicket.PageParameters;
+import org.apache.wicket.devutils.DevUtilsPanel;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.markup.html.panel.Panel;
 
 /**
  * A page that shows interesting attributes of the Wicket environment, 
including the current session
@@ -29,7 +29,7 @@
  * 
  * @author Jonathan Locke
  */
-public final class InspectorBug extends Panel
+public final class InspectorBug extends DevUtilsPanel
 {
        private static final long serialVersionUID = 1L;
 
@@ -46,7 +46,7 @@
                super(id);
                PageParameters parameters = new PageParameters();
                parameters.put("pageId", page.getId());
-               Link link = new BookmarkablePageLink("link", 
InspectorPage.class, parameters);
+               Link<?> link = new BookmarkablePageLink<Void>("link", 
InspectorPage.class, parameters);
                link.add(new Image("bug"));
                add(link);
        }

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
 Tue Mar 31 05:14:14 2009
@@ -19,7 +19,7 @@
 import org.apache.wicket.Application;
 import org.apache.wicket.PageParameters;
 import org.apache.wicket.Session;
-import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.devutils.DevUtilsPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.debug.PageView;
 import org.apache.wicket.markup.html.image.Image;
@@ -33,7 +33,7 @@
  * 
  * @author Jonathan Locke
  */
-public final class InspectorPage extends WebPage
+public final class InspectorPage extends DevUtilsPage
 {
        private static final long serialVersionUID = 1L;
 
@@ -58,7 +58,7 @@
                }
                add(new PageView("page", entry == null ? null : 
entry.getPage()));
                add(new Image("bug"));
-               add(new BookmarkablePageLink("allsessions", 
LiveSessionsPage.class));
+               add(new BookmarkablePageLink<Void>("allsessions", 
LiveSessionsPage.class));
                add(new Label("wicketVersion", 
getApplication().getFrameworkSettings().getVersion()));
        }
 

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/LiveSessionsPage.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/LiveSessionsPage.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/LiveSessionsPage.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/LiveSessionsPage.java
 Tue Mar 31 05:14:14 2009
@@ -22,7 +22,7 @@
 import java.util.List;
 
 import org.apache.wicket.Application;
-import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.devutils.DevUtilsPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.link.Link;
@@ -34,15 +34,15 @@
 import org.apache.wicket.model.Model;
 import org.apache.wicket.protocol.http.IRequestLogger;
 import org.apache.wicket.protocol.http.RequestLogger;
-import org.apache.wicket.protocol.http.RequestLogger.SessionData;
 import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.protocol.http.RequestLogger.SessionData;
 import org.apache.wicket.util.lang.Bytes;
 
 
 /**
  * @author jcompagner
  */
-public class LiveSessionsPage extends WebPage
+public class LiveSessionsPage extends DevUtilsPage
 {
        private static final long serialVersionUID = 1L;
 

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
 Tue Mar 31 05:14:14 2009
@@ -25,12 +25,12 @@
 import org.apache.wicket.Page;
 import org.apache.wicket.PageParameters;
 import org.apache.wicket.AccessStackPageMap.Access;
+import org.apache.wicket.devutils.DevUtilsPanel;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.session.pagemap.IPageMapEntry;
 import org.apache.wicket.util.collections.ArrayListStack;
 import org.apache.wicket.util.lang.Bytes;
@@ -42,7 +42,7 @@
  * 
  * @author Jonathan Locke
  */
-public final class PageMapView extends Panel
+public final class PageMapView extends DevUtilsPanel
 {
        private static final long serialVersionUID = 1L;
 
@@ -92,7 +92,7 @@
                                IPageMapEntry entry = 
pageMap.getEntry(access.getId());
                                PageParameters parameters = new 
PageParameters();
                                parameters.put("pageId", "" + 
entry.getNumericId());
-                               Link link = new BookmarkablePageLink("link", 
InspectorPage.class, parameters);
+                               Link<?> link = new 
BookmarkablePageLink<Void>("link", InspectorPage.class, parameters);
                                link.add(new Label("id", "" + 
entry.getNumericId()));
                                listItem.add(link);
                                listItem.add(new Label("class", "" + 
entry.getClass().getName()));

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/RequestsPage.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/RequestsPage.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/RequestsPage.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/RequestsPage.java
 Tue Mar 31 05:14:14 2009
@@ -22,8 +22,8 @@
 import java.util.List;
 
 import org.apache.wicket.Application;
+import org.apache.wicket.devutils.DevUtilsPage;
 import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.list.ListItem;
@@ -43,7 +43,7 @@
 /**
  * @author jcompagner
  */
-public class RequestsPage extends WebPage
+public class RequestsPage extends DevUtilsPage
 {
        private static final long serialVersionUID = 1L;
        private final SimpleDateFormat sdf = new SimpleDateFormat("dd MMM 
hh:mm:ss.SSS");

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/SessionView.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/SessionView.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/SessionView.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/SessionView.java
 Tue Mar 31 05:14:14 2009
@@ -21,10 +21,10 @@
 import org.apache.wicket.Component;
 import org.apache.wicket.IPageMap;
 import org.apache.wicket.Session;
+import org.apache.wicket.devutils.DevUtilsPanel;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.util.lang.Bytes;
 import org.apache.wicket.util.lang.Objects;
@@ -35,7 +35,7 @@
  * 
  * @author Jonathan Locke
  */
-public final class SessionView extends Panel
+public final class SessionView extends DevUtilsPanel
 {
        private static final long serialVersionUID = 1L;
 

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java
 Tue Mar 31 05:14:14 2009
@@ -47,6 +47,7 @@
        public WicketExampleHeader(String id, String exampleTitle, WebPage page)
        {
                super(id);
+               
getApplication().getDebugSettings().setDevelopmentUtilitiesEnabled(true);
                WebMarkupContainer hideInPortlet = new 
WebMarkupContainer("hideInPortlet")
                {
                        /**

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/Application.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/Application.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/Application.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/Application.java
 Tue Mar 31 05:14:14 2009
@@ -345,6 +345,7 @@
                        getExceptionSettings().setUnexpectedExceptionDisplay(
                                IExceptionSettings.SHOW_EXCEPTION_PAGE);
                        getDebugSettings().setAjaxDebugModeEnabled(true);
+                       getDebugSettings().setDevelopmentUtilitiesEnabled(true);
                        // 
getDebugSettings().setOutputMarkupContainerClassName(true);
                        getResourceSettings().setJavascriptCompressor(null);
                }
@@ -356,6 +357,7 @@
                        getExceptionSettings().setUnexpectedExceptionDisplay(
                                IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
                        getDebugSettings().setAjaxDebugModeEnabled(false);
+                       
getDebugSettings().setDevelopmentUtilitiesEnabled(false);
                        getResourceSettings().setJavascriptCompressor(new 
DefaultJavascriptCompressor());
                }
                else

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java
 Tue Mar 31 05:14:14 2009
@@ -128,4 +128,18 @@
         * @param enable
         */
        public void setLinePreciseReportingOnNewComponentEnabled(boolean 
enable);
+
+       /**
+        * Enables all of the panels and pages, etc, from wicket-devutils 
package.
+        * 
+        * @param enable
+        */
+       public void setDevelopmentUtilitiesEnabled(boolean enable);
+
+       /**
+        * Are all of the panels and pages, etc, from wicket-devutils package 
enabled?
+        * 
+        * @return true if all of the panels and pages, etc, from 
wicket-devutils package are enabled
+        */
+       public boolean isDevelopmentUtilitiesEnabled();
 }

Modified: 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/Settings.java
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/Settings.java?rev=760335&r1=760334&r2=760335&view=diff
==============================================================================
--- 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/Settings.java
 (original)
+++ 
wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket/src/main/java/org/apache/wicket/settings/Settings.java
 Tue Mar 31 05:14:14 2009
@@ -176,6 +176,11 @@
        private boolean linePreciseReportingOnAddComponentEnabled = false;
 
        /**
+        * @see IDebugSettings#setDevelopmentUtilitiesEnabled(boolean)
+        */
+       private boolean developmentUtilitiesEnabled = false;
+
+       /**
         * whether wicket should track line precise instantiations of 
components for error reporting.
         */
        private boolean linePreciseReportingOnNewComponentEnabled = false;
@@ -1498,5 +1503,20 @@
                this.detachListener = detachListener;
        }
 
+       /**
+        * @see 
org.apache.wicket.settings.IDebugSettings#setDevelopmentUtilitiesEnabled(boolean)
+        */
+       public void setDevelopmentUtilitiesEnabled(boolean enable)
+       {
+               developmentUtilitiesEnabled = enable;
+       }
+
+       /**
+        * @see 
org.apache.wicket.settings.IDebugSettings#isDevelopmentUtilitiesEnabled()
+        */
+       public boolean isDevelopmentUtilitiesEnabled()
+       {
+               return developmentUtilitiesEnabled;
+       }
 
 }


Reply via email to