@Override public void init(WebApplication webApplication) { if(properties.isEnabled()){ DebugSettings debugSettings = webApplication.getDebugSettings(); debugSettings.setDevelopmentUtilitiesEnabled(properties.isDevelopmentUtilitiesEnabled()); debugSettings.setAjaxDebugModeEnabled(properties.isAjaxDebugModeEnabled()); debugSettings.setComponentUseCheck(properties.isComponentUseCheck()); debugSettings.setOutputMarkupContainerClassName(properties.isOutputMarkupContainerClassName()); debugSettings.setComponentPathAttributeName(properties.getComponentPathAttributeName()); } wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass()) .withDetail("properties", properties) .build()); }
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck() */ @Override public boolean getComponentUseCheck() { return application.getDebugSettings().getComponentUseCheck(); }
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled() */ @Override public boolean isAjaxDebugModeEnabled() { return application.getDebugSettings().isAjaxDebugModeEnabled(); }
/** * Sets the debug settings for development mode for the given application. * * @param application * the new debug settings for development */ public static void setDebugSettingsForDevelopment(final Application application) { application.getDebugSettings().setComponentUseCheck(true); application.getDebugSettings().setOutputMarkupContainerClassName(true); application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(true); application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(true); application.getDebugSettings().setAjaxDebugModeEnabled(true); application.getDebugSettings().setDevelopmentUtilitiesEnabled(true); }
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#setComponentPathAttributeName(boolean) */ @Override public void setComponentPathAttributeName(final String name) { application.getDebugSettings().setComponentPathAttributeName(name); }
getExceptionSettings().setUnexpectedExceptionDisplay( ExceptionSettings.SHOW_EXCEPTION_PAGE); getDebugSettings().setComponentUseCheck(true); getDebugSettings().setAjaxDebugModeEnabled(true); getDebugSettings().setDevelopmentUtilitiesEnabled(true); getExceptionSettings().setUnexpectedExceptionDisplay( ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); getDebugSettings().setComponentUseCheck(false); getDebugSettings().setAjaxDebugModeEnabled(false); getDebugSettings().setDevelopmentUtilitiesEnabled(false); break;
if (getDebugSettings().isAjaxDebugModeEnabled()) { getDebugSettings().setComponentPathAttributeName("syncope-path");
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled() */ @Override public boolean isDevelopmentUtilitiesEnabled() { return application.getDebugSettings().isDevelopmentUtilitiesEnabled(); } }
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean) */ @Override public void setAjaxDebugModeEnabled(final boolean enable) { application.getDebugSettings().setAjaxDebugModeEnabled(enable); }
/** * Constructor. All components have names. A component's id cannot be null. This constructor * includes a model. * * @param id * The non-null id of this component * @param model * The component's model * * @throws WicketRuntimeException * Thrown if the component has been given a null id. */ public Component(final String id, final IModel<?> model) { checkId(id); this.id = id; init(); Application application = getApplication(); application.getComponentInstantiationListeners().onInstantiation(this); final DebugSettings debugSettings = application.getDebugSettings(); if (debugSettings.isLinePreciseReportingOnNewComponentEnabled() && debugSettings.getComponentUseCheck()) { setMetaData(CONSTRUCTED_AT_KEY, ComponentStrings.toString(this, new MarkupException("constructed"))); } if (model != null) { setModelImpl(wrap(model)); } }
if (getApplication().getDebugSettings().getComponentUseCheck()) if (getApplication().getDebugSettings().isOutputMarkupContainerClassName())
if (debugSettings.isLinePreciseReportingOnAddComponentEnabled() && debugSettings.getComponentUseCheck())
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean) */ @Override public void setOutputMarkupContainerClassName(final boolean enable) { application.getDebugSettings().setOutputMarkupContainerClassName(enable); }
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean) */ @Override public void setComponentUseCheck(final boolean check) { application.getDebugSettings().setComponentUseCheck(check); }
/** * @see org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean) */ @Override public void setDevelopmentUtilitiesEnabled(final boolean enable) { application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable); }
/** * Sets the deployment settings for deployment mode for the given application. * * @param application * the application to set the settings */ public static void setDeploymentModeConfiguration(final Application application) { application.getMarkupSettings().setStripComments(true); // The resources are never polled. This are properties, html, // css, js files. application.getResourceSettings().setResourcePollFrequency(null); application.getResourceSettings() .setJavaScriptCompressor(new DefaultJavaScriptCompressor()); // set the behavior if an missing resource is found... application.getResourceSettings().setThrowExceptionOnMissingResource(false); // debug settings... application.getDebugSettings().setComponentUseCheck(false); application.getDebugSettings().setAjaxDebugModeEnabled(false); application.getDebugSettings().setDevelopmentUtilitiesEnabled(false); application.getDebugSettings().setOutputMarkupContainerClassName(false); application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(false); application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(false); }
@Before public void setOutputPaths() { GeoServerApplication.get().getDebugSettings().setComponentPathAttributeName("wicketPath"); }
getExceptionSettings().setUnexpectedExceptionDisplay( ExceptionSettings.SHOW_EXCEPTION_PAGE); getDebugSettings().setComponentUseCheck(true); getDebugSettings().setAjaxDebugModeEnabled(true); getDebugSettings().setDevelopmentUtilitiesEnabled(true); getExceptionSettings().setUnexpectedExceptionDisplay( ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); getDebugSettings().setComponentUseCheck(false); getDebugSettings().setAjaxDebugModeEnabled(false); getDebugSettings().setDevelopmentUtilitiesEnabled(false); break;
@Override public boolean isVisible() { return getApplication().getDebugSettings().isDevelopmentUtilitiesEnabled(); }
.getStringResourceLoaders() .add(0, new GeoServerStringResourceLoader()); getDebugSettings().setAjaxDebugModeEnabled(false);