Search in sources :

Example 1 with PortalPropertiesFile

use of com.liferay.ide.hook.core.model.PortalPropertiesFile in project liferay-ide by liferay.

the class PortalPropertiesFileListener method handleTypedEvent.

@Override
protected void handleTypedEvent(PropertyContentEvent event) {
    Property prop = event.property();
    if (Hook.PROP_PORTAL_PROPERTIES_FILE.equals(prop.definition())) {
        Hook hook = prop.element().nearest(Hook.class);
        PortalPropertiesFile ppf = hook.getPortalPropertiesFile().content(false);
        if (ppf != null) {
            Value<Path> value = ppf.getValue();
            if (value != null) {
                Path path = value.content(false);
                if (path == null) {
                    ppf.initialize();
                }
            }
        }
    }
}
Also used : Path(org.eclipse.sapphire.modeling.Path) Hook(com.liferay.ide.hook.core.model.Hook) PortalPropertiesFile(com.liferay.ide.hook.core.model.PortalPropertiesFile) Property(org.eclipse.sapphire.Property)

Aggregations

Hook (com.liferay.ide.hook.core.model.Hook)1 PortalPropertiesFile (com.liferay.ide.hook.core.model.PortalPropertiesFile)1 Property (org.eclipse.sapphire.Property)1 Path (org.eclipse.sapphire.modeling.Path)1