You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by da...@apache.org on 2007/08/16 00:15:42 UTC
svn commit: r566356 - in
/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket:
Component.java MarkupContainer.java settings/IDebugSettings.java
settings/Settings.java
Author: dashorst
Date: Wed Aug 15 15:15:37 2007
New Revision: 566356
URL: http://svn.apache.org/viewvc?view=rev&rev=566356
Log:
WICKET-761 Disable line-precise exceptions for component use check
Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java?view=diff&rev=566356&r1=566355&r2=566356
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java Wed Aug 15 15:15:37 2007
@@ -728,7 +728,7 @@
getApplication().notifyComponentInstantiationListeners(this);
final IDebugSettings debugSettings = Application.get().getDebugSettings();
- if (debugSettings.getComponentUseCheck())
+ if (debugSettings.isLinePreciseReportingOnNewComponentEnabled())
{
setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new MarkupException(
"constructed")));
@@ -754,7 +754,7 @@
this.model = wrap(model);
final IDebugSettings debugSettings = Application.get().getDebugSettings();
- if (debugSettings.getComponentUseCheck())
+ if (debugSettings.isLinePreciseReportingOnNewComponentEnabled())
{
setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new MarkupException(
"constructed")));
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?view=diff&rev=566356&r1=566355&r2=566356
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java Wed Aug 15 15:15:37 2007
@@ -905,7 +905,7 @@
}
final IDebugSettings debugSettings = Application.get().getDebugSettings();
- if (debugSettings.getComponentUseCheck())
+ if (debugSettings.isLinePreciseReportingOnAddComponentEnabled())
{
component.setMetaData(ADDED_AT_KEY, Strings.toString(component, new MarkupException(
"added")));
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java?view=diff&rev=566356&r1=566355&r2=566356
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IDebugSettings.java Wed Aug 15 15:15:37 2007
@@ -60,22 +60,63 @@
*
*/
boolean isAjaxDebugModeEnabled();
-
+
/**
- * Enables wrapping output of markup container in html comments that
- * contain markup container's class name. (Useful for determining which
- * part of page belongs to which markup file).
+ * Enables wrapping output of markup container in html comments that contain
+ * markup container's class name. (Useful for determining which part of page
+ * belongs to which markup file).
*
* @param enable
*/
void setOutputMarkupContainerClassName(boolean enable);
-
+
/**
- * Returns whether the output of markup container's should be wrapped
- * by comments containing the container's class name.
+ * Returns whether the output of markup container's should be wrapped by
+ * comments containing the container's class name.
*
- * @return true if the markup container's class name should be written
- * to response
+ * @return true if the markup container's class name should be written to
+ * response
*/
public boolean isOutputMarkupContainerClassName();
+
+ /**
+ * Returns status of line precise error reporting for added components that
+ * are not present in the markup: it points to the line where the component
+ * was added to the hierarchy in your Java classes. This can cause a
+ * significant decrease in performance, do not use in customer facing
+ * applications.
+ *
+ * @return true if the line precise error reporting is enabled
+ */
+ public boolean isLinePreciseReportingOnAddComponentEnabled();
+
+ /**
+ * Enables line precise error reporting for added components that are not
+ * present in the markup: it points to the line where the component was
+ * added to the hierarchy in your Java classes. This can cause a significant
+ * decrease in performance, do not use in customer facing applications.
+ *
+ * @param enable
+ */
+ public void setLinePreciseReportingOnAddComponentEnabled(boolean enable);
+
+ /**
+ * Returns status of line precise error reporting for new components that
+ * are not present in the markup: it points to the line where the component
+ * was created in your Java classes. This can cause a significant decrease
+ * in performance, do not use in customer facing applications.
+ *
+ * @return true if the line precise error reporting is enabled
+ */
+ public boolean isLinePreciseReportingOnNewComponentEnabled();
+
+ /**
+ * Enables line precise error reporting for new components that are not
+ * present in the markup: it points to the line where the component was
+ * created in your Java classes. This can cause a significant decrease in
+ * performance, do not use in customer facing applications.
+ *
+ * @param enable
+ */
+ public void setLinePreciseReportingOnNewComponentEnabled(boolean enable);
}
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java?view=diff&rev=566356&r1=566355&r2=566356
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java Wed Aug 15 15:15:37 2007
@@ -167,6 +167,18 @@
/** Class of internal error page. */
private WeakReference/* <Class<? extends Page> */internalErrorPage;
+ /**
+ * whether wicket should track line precise additions of components for
+ * error reporting.
+ */
+ private boolean linePreciseReportingOnAddComponentEnabled = false;
+
+ /**
+ * whether wicket should track line precise instantiations of components for
+ * error reporting.
+ */
+ private boolean linePreciseReportingOnNewComponentEnabled = false;
+
/** I18N support */
private Localizer localizer;
@@ -1305,5 +1317,25 @@
public boolean isPageIdUniquePerSession()
{
return pageIdUniquePerSession;
+ }
+
+ public boolean isLinePreciseReportingOnAddComponentEnabled()
+ {
+ return linePreciseReportingOnAddComponentEnabled;
+ }
+
+ public boolean isLinePreciseReportingOnNewComponentEnabled()
+ {
+ return linePreciseReportingOnNewComponentEnabled;
+ }
+
+ public void setLinePreciseReportingOnAddComponentEnabled(boolean enable)
+ {
+ linePreciseReportingOnAddComponentEnabled = enable;
+ }
+
+ public void setLinePreciseReportingOnNewComponentEnabled(boolean enable)
+ {
+ linePreciseReportingOnNewComponentEnabled = enable;
}
}