Moves the reference value down in the value list.<p>

@param reference the reference value
495035
public void moveAttributeValueDown(final CmsAttributeValueView reference) {

        final int index = reference.getValueIndex();
        if (index >= (m_entity.getAttribute(m_attributeName).getValueCount() - 1)) {
            return;
        }
        m_widgetService.addChangedOrderPath(getSimplePath(-1));
        reference.hideAllButtons();
        Element parent = reference.getElement().getParentElement();
        parent.getStyle().setPosition(Position.RELATIVE);
        final Element placeHolder = reference.getPlaceholder(null);
        int top = reference.getElement().getOffsetTop();
        int left = reference.getElement().getOffsetLeft();
        int width = reference.getOffsetWidth();
        reference.getElement().getStyle().setPosition(Position.ABSOLUTE);
        reference.getElement().getStyle().setZIndex(5);
        parent.insertAfter(placeHolder, reference.getElement().getNextSibling());
        reference.getElement().getStyle().setTop(top, Unit.PX);
        reference.getElement().getStyle().setLeft(left, Unit.PX);
        reference.getElement().getStyle().setWidth(width, Unit.PX);
        new CmsMoveAnimation(reference.getElement(), top, left, placeHolder.getOffsetTop(), left, new Command() {

            public void execute() {

                clearMoveAnimationStyles(placeHolder, reference);
                moveAttributeValue(reference, index, index + 1);

            }
        }).run(200);
        CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
        if (handler.isIntitalized()) {
            handler.addChange(m_entity.getId(), m_attributeName, 0, ChangeType.sort);
        }
    }
1093451
public void referencedElementUpdated(ModelElementInstance referenceTargetElement, String oldIdentifier, String newIdentifier) {
    for (ModelElementInstance referenceSourceElement : findReferenceSourceElements(referenceTargetElement)) {
      updateReference(referenceSourceElement, oldIdentifier, newIdentifier);
    }
  }
734762
public void setReferenceResolver(final Object referenceResolver) {
        if (referenceResolver instanceof ReferenceResolver) {
            this.referenceResolver = (ReferenceResolver) referenceResolver;
        } else if (referenceResolver instanceof String) {
            this.referenceResolver = new ReferenceResolver() {
                public String getReferenceFor(String nodeName) {
                    return (String) referenceResolver;
                }
            };
        } else if (referenceResolver instanceof Closure) {
            final ObjectGraphBuilder self = this;
            this.referenceResolver = new ReferenceResolver() {
                public String getReferenceFor(String nodeName) {
                    Closure cls = (Closure) referenceResolver;
                    cls.setDelegate(self);
                    return (String) cls.call(new Object[]{nodeName});
                }
            };
        } else {
            this.referenceResolver = new DefaultReferenceResolver();
        }
    }
832879
protected void removeReferencingFromCache(Set<String> references) {

        if (m_jspLoader != null) {
            m_jspLoader.removeFromCache(references, false);
        }
    }
262007
protected void unsetComponentMetadataDecorator(ServiceReference<ComponentMetaDataDecorator> ref) {
        componentMetadataDecoratorRefs.removeReference((String) ref.getProperty("component.name"), ref);
    }
816105
private boolean cleanUp(Reference<?> reference) {
    Method finalizeReferentMethod = getFinalizeReferentMethod();
    if (finalizeReferentMethod == null) {
      return false;
    }
    do {
      /*
       * This is for the benefit of phantom references. Weak and soft
       * references will have already been cleared by this point.
       */
      reference.clear();

      if (reference == frqReference) {
        /*
         * The client no longer has a reference to the
         * FinalizableReferenceQueue. We can stop.
         */
        return false;
      }

      try {
        finalizeReferentMethod.invoke(reference);
      } catch (Throwable t) {
        logger.log(Level.SEVERE, "Error cleaning up after reference.", t);
      }

      /*
       * Loop as long as we have references available so as not to waste
       * CPU looking up the Method over and over again.
       */
    } while ((reference = queue.poll()) != null);
    return true;
  }
655193
protected void unsetSsl(ServiceReference<Object> reference) {
        sslConfigurationRef.unsetReference(reference);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "sslRef unset");
        }
    }
1308124
public boolean addReference(ServiceReference<T> reference) {
        if (reference == null)
            return false;

        ConcurrentServiceReferenceElement<T> element = new ConcurrentServiceReferenceElement<T>(referenceName, reference);

        synchronized (elementMap) {
            ConcurrentServiceReferenceElement<T> oldElement = elementMap.put(reference, element);
            if (oldElement != null) {
                if (!element.getRanking().equals(oldElement.getRanking())) {
                    elementSetUnsorted = true;
                }
                return true;
            }

            elementSet.add(element);
        }
        return false;
    }
22956
public void clearFieldReference()
    {
        RecordReferenceField field = m_field;
        m_field = null;   // This keeps this from being called twice
        if (field != null)
            field.setReferenceRecord(null);   // Just in case a converter was used (removes converter, leaves field!)
    }
1237866
public void removeAttributeValue(CmsAttributeValueView reference, boolean force) {

        CmsAttributeHandler parentHandler = null;
        CmsAttributeValueView parentView = null;
        boolean removeParent = false;

        CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
        if (isChoiceHandler() && attribute.isSingleValue()) {
            // removing last choice value, so remove choice itself
            parentHandler = (CmsAttributeHandler)m_parentHandler;
            parentView = reference.getParentView();
            removeParent = true;
        }

        if (attribute.isSingleValue() && !force) {

            reference.removeValue();
            if (!attribute.isSimpleValue()) {
                removeHandlers(0);
            }
            m_entity.removeAttribute(m_attributeName);
        } else {
            int index = reference.getValueIndex();
            if (attribute.isComplexValue()) {
                removeHandlers(index);
                CmsEntity value = attribute.getComplexValues().get(index);
                m_entity.removeAttributeValue(m_attributeName, index);
                m_entityBackEnd.removeEntity(value.getId());
            } else {
                m_entity.removeAttributeValue(m_attributeName, index);
            }
            reference.removeFromParent();
            m_attributeValueViews.remove(reference);

        }
        updateButtonVisisbility();
        if (removeParent && (parentHandler != null) && (parentView != null)) {
            parentHandler.removeAttributeValue(parentView);
            parentView.setCollapsed(false);
        }
        CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
        if (handler.isIntitalized()) {
            handler.addChange(m_entity.getId(), m_attributeName, 0, ChangeType.remove);
        }

    }
12560
public void clear(String treeReference){
		Pool<BehaviorTree> treePool = pools.get(treeReference);
		if(treePool != null){
			treePool.clear();
		}
	}
430355
public void setReferenceRecord(Record record)
    {
        if (m_recordReference != record)
        {
            if (m_recordReference != null)
            { // Take behaviors off old references
               // You only want to disconnect the referenced record (not free it).
                if (this.getRecord() != null)
                {
                    FreeOnFreeHandler freeListener = (FreeOnFreeHandler)this.getRecord().getListener(FreeOnFreeHandler.class);
                    while (freeListener != null)
                    {
                        if (freeListener.getDependentObject() == m_recordReference)
                        {
                            freeListener.setDependentObject(null);
                            this.getRecord().removeListener(freeListener, true);
                            break;
                        }
                        freeListener = (FreeOnFreeHandler)freeListener.getListener(FreeOnFreeHandler.class);
                    }
                }

                ClearFieldReferenceOnCloseHandler listener = (ClearFieldReferenceOnCloseHandler)m_recordReference.getListener(ClearFieldReferenceOnCloseHandler.class.getName());
                while (listener != null)
                {
                    if (listener.getField() == this)
                    {
                        Record recordTemp = m_recordReference;
                        m_recordReference = null; // Cancel echo
                        recordTemp.removeListener(listener, true);
                        listener = null;    // Got it!
                    }
                    else
                        listener = (ClearFieldReferenceOnCloseHandler)listener.getListener(ClearFieldReferenceOnCloseHandler.class.getName());
                }
            }
            if (record != null)
            { // Make sure reference is cleared when record is discarded
                record.addListener(new ClearFieldReferenceOnCloseHandler(this));
            }
            m_recordReference = record;
        }
    }
705243
protected void fireReferenceRelease(int released) {
		final List<ReferenceListener> list = this.listeners;
		if (list != null && !list.isEmpty()) {
			for (final ReferenceListener listener : list) {
				listener.referenceReleased(released);
			}
		}
	}
268781
protected void setExecutor(ServiceReference<ExecutorService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setExecutor", ref);
        execSvcRef.setReference(ref);
    }
79172
public final void expurge() {
		final Iterator<Entry<K, ReferencableValue<K, V>>> iter = this.map.entrySet().iterator();
		Entry<K, ReferencableValue<K, V>> entry;
		ReferencableValue<K, V> value;
		while (iter.hasNext()) {
			entry = iter.next();
			if (entry != null) {
				value = entry.getValue();
				if ((value != null)
						&& ((value.isEnqueued()) || (value.get() == null))) {
					value.enqueue();
					value.clear();
				}
			}
		}
		Reference<? extends V> reference;
		while ((reference = this.queue.poll()) != null) {
			if (reference instanceof ReferencableValue<?, ?>) {
				this.map.remove(((ReferencableValue<?, ?>) reference).getKey());
			}
			reference.clear();
		}
	}
241808
public void addReference(final String propertyName, final BeanId ref) {
        Preconditions.checkNotNull(ref);
        Preconditions.checkNotNull(propertyName);
        checkCircularReference(ref);
        List<BeanId> list = references.get(propertyName);
        if (list == null) {
            list = new ArrayList<>();
            list.add(ref);
            references.put(propertyName, list);
        } else {
            list.add(ref);
        }
    }
279617
protected void moveSelectionTop() {
		final IStructuredSelection selection = this.list.getStructuredSelection();
		final int index = this.conversions.indexOf(selection.getFirstElement());
		if (index > 0) {
			final int endIndex = index + selection.size() - 1;
			for (int i = 0; i < selection.size(); ++i) {
				final ConversionMapping next = this.conversions.remove(endIndex);
				this.conversions.addFirst(next);
			}
			refreshListUI();
			this.list.refresh(true);
			enableButtons();
			preferenceValueChanged();
		}
	}