use of com.liferay.ide.portlet.core.model.EventDefinitionRef in project liferay-ide by liferay.
the class QNamesPossibleValuesService method compute.
/**
* (non-Javadoc)
*
* @see org.eclipse.sapphire.modeling.PossibleValuesService#fillPossibleValues(java.
* util.SortedSet)
*/
@Override
protected void compute(Set<String> values) {
Element Element = context(Element.class);
// values.add( param( "0" ) );
PortletApp portletApp = context(Element.class).nearest(PortletApp.class);
if (Element instanceof EventDefinitionRef) {
ElementList<EventDefinition> eventDefs = portletApp.getEventDefinitions();
for (EventDefinition eventDefinition : eventDefs) {
if ((eventDefinition.getNamespaceURI().content() != null) && (eventDefinition.getLocalPart().content() != null)) {
values.add(getQName(eventDefinition.getNamespaceURI().content(false), eventDefinition.getLocalPart().content()));
}
}
} else if (Element instanceof SupportedPublicRenderParameter) {
ElementList<PublicRenderParameter> publicRenderParameters = portletApp.getPublicRenderParameters();
for (PublicRenderParameter publicRenderParam : publicRenderParameters) {
if ((publicRenderParam.getNamespaceURI().content() != null) && (publicRenderParam.getLocalPart().content() != null)) {
values.add(getQName(publicRenderParam.getNamespaceURI().content(false), publicRenderParam.getLocalPart().content()));
}
}
}
}
Aggregations