private static void registerPluginParameter(boolean isInPluginManagement, DomExtensionsRegistrar r, final ParameterData data, final String parameterName) { DomExtension e = r.registerFixedNumberChildExtension(new XmlName(parameterName), MavenDomConfigurationParameter.class); if (isCollection(data.parameter)) { e.addExtender(new DomExtender() { public void registerExtensions(@NotNull DomElement domElement, @NotNull DomExtensionsRegistrar registrar) { for (String each : collectPossibleNameForCollectionParameter(parameterName)) { DomExtension inner = registrar.registerCollectionChildrenExtension(new XmlName(each), MavenDomConfigurationParameter.class); inner.setDeclaringElement(data.parameter); } } }); } else { addValueConverter(e, data.parameter); if (!isInPluginManagement) { addRequiredAnnotation(e, data); } } e.setDeclaringElement(data.parameter); data.parameter.getXmlElement().putUserData(PLUGIN_PARAMETER_KEY, data); }
public void registerDomExtender(Class<? extends DomExtender<MyElement>> extender) { registerDomExtender(MyElement.class, extender); }
public <T extends DomElement> void registerDomExtender(final Class<T> domClass, final Class<? extends DomExtender<T>> extenderClass) { final DomExtenderEP extenderEP = new DomExtenderEP(); extenderEP.domClassName = domClass.getName(); extenderEP.extenderClassName = extenderClass.getName(); //TODO [VISTALL] IdeaTestUtil.registerExtension(Extensions.getRootArea(), DomExtenderEP.EP_NAME, extenderEP, myTestRootDisposable); }