public abstract class PoshDummyElement<THIS extends PoshElement,PARENT extends PoshElement> extends PoshElement<THIS,PARENT>
| Modifier and Type | Field and Description |
|---|---|
static String |
IDENT_PATTERN
Regular pattern, only text that matches this pattern can be a name of the
POSH element.
|
| Constructor and Description |
|---|
PoshDummyElement() |
| Modifier and Type | Method and Description |
|---|---|
protected <ELEMENT extends PoshElement & INamedElement> |
getElementId(List<ELEMENT> elements,
ELEMENT element)
Get index of @element in all @elements.
|
protected static String |
getUnusedName(String template,
List<? extends INamedElement> elements)
Get valid name for new element, but name can't be same as any name used
by passed elements.
|
protected static boolean |
isUsedName(String name,
List<? extends INamedElement> elements)
Is passed name used by one of elements?
|
protected <T extends PoshElement> |
moveChildInList(List<T> list,
T child,
int newIndex)
Take the @list of elements and one @child of the @list.
|
addElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getDataFlavor, getElementListeners, getChildDataNodes, getChildId, getChildren, getId, getParent, getRootNode, getType, isChildOfParent, moveChild, removeElementListener, setParentpublic static final String IDENT_PATTERN
NAME in the PoshParser.jj
Because of dash (-), not all strings that match this pattern are FQN.protected <T extends PoshElement> boolean moveChildInList(List<T> list, T child, int newIndex)
NoSuchElementException, if @newIndex is same as the index
the @child is currently at, don't do anything.T - list - child - newIndex - Indexprotected static boolean isUsedName(String name, List<? extends INamedElement> elements)
name - name to be testedelements - elements againt which the test is doneprotected static String getUnusedName(String template, List<? extends INamedElement> elements)
template - string used as prefix of created nameelements - elements that must have different name that created nameprotected <ELEMENT extends PoshElement & INamedElement> int getElementId(List<ELEMENT> elements, ELEMENT element)
ELEMENT - Type of elements.elements - List of elements whereelement - element for which we are looking for in elements.IllegalArgumentException - If element is not among elements.Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.