mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DomExtender: some javadoc
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,18 +20,18 @@ import com.intellij.util.xml.DomElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Register DOM extenders via dom.extender extension point. Specify 2 attributes:
|
||||
* domClass - the DOM element class for which this extender will be called. Should be equal to T.
|
||||
* extenderClass - this class qualified name.
|
||||
*
|
||||
* For registering extenders, use "com.intellij.dom.extender" extension point.
|
||||
* Register DOM extenders via {@code dom.extender} extension point. Specify 2 attributes:
|
||||
* <ul>
|
||||
* <li>domClass - the DOM element class for which this extender will be called, must be equal to T</li>
|
||||
* <li>extenderClass - this class qualified name</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author peter
|
||||
*/
|
||||
public abstract class DomExtender<T extends DomElement> {
|
||||
|
||||
/**
|
||||
* @param t DOM element where new children may be added to
|
||||
* @param t DOM element where new children may be added to
|
||||
* @param registrar a place to register your own DOM children descriptions
|
||||
*/
|
||||
public abstract void registerExtensions(@NotNull T t, @NotNull final DomExtensionsRegistrar registrar);
|
||||
@@ -39,6 +39,7 @@ public abstract class DomExtender<T extends DomElement> {
|
||||
/**
|
||||
* Makes stub building for extensions available.
|
||||
* To be compatible with general stubs contract, extension should NOT depend on anything beyond current file's content.
|
||||
*
|
||||
* @since 13.1
|
||||
*/
|
||||
public boolean supportsStubs() {
|
||||
|
||||
@@ -22,16 +22,27 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
/**
|
||||
* Allows runtime extension of DOM Model.
|
||||
*
|
||||
* @author peter
|
||||
*/
|
||||
public interface DomExtensionsRegistrar {
|
||||
|
||||
/**
|
||||
* Register single occurence subtag extension.
|
||||
*/
|
||||
@NotNull
|
||||
DomExtension registerFixedNumberChildExtension(@NotNull XmlName name, @NotNull Type type);
|
||||
|
||||
/**
|
||||
* Register multiple occurence subtag extension.
|
||||
*/
|
||||
@NotNull
|
||||
DomExtension registerCollectionChildrenExtension(@NotNull XmlName name, @NotNull Type type);
|
||||
|
||||
/**
|
||||
* Register {@link com.intellij.util.xml.GenericAttributeValue} using given parameterType.
|
||||
*/
|
||||
@NotNull
|
||||
DomExtension registerGenericAttributeValueChildExtension(@NotNull XmlName name, final Type parameterType);
|
||||
|
||||
@@ -44,8 +55,6 @@ public interface DomExtensionsRegistrar {
|
||||
DomExtension registerAttributeChildExtension(@NotNull XmlName name, @NotNull final Type type);
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* @return
|
||||
* @see com.intellij.util.xml.CustomChildren
|
||||
*/
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user