use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class GroupIdValidationService method compute.
@Override
protected Status compute() {
NewLiferayPluginProjectOp op = _op();
NewLiferayProjectProvider<NewLiferayPluginProjectOp> provider = op.getProjectProvider().content(true);
if ("maven".equals(provider.getShortName())) {
String groupId = op.getGroupId().content(true);
IStatus javaStatus = JavaConventions.validatePackageName(groupId, CompilerOptions.VERSION_1_7, CompilerOptions.VERSION_1_7);
return StatusBridge.create(javaStatus);
}
return StatusBridge.create(org.eclipse.core.runtime.Status.OK_STATUS);
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class PluginTypeValidationService method initValidationService.
@Override
protected void initValidationService() {
super.initValidationService();
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refresh();
}
};
NewLiferayPluginProjectOp op = _op();
op.getProjectProvider().attach(listener);
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class PortletFrameworkValidationService method dispose.
@Override
public void dispose() {
NewLiferayPluginProjectOp op = _op();
op.property(NewLiferayPluginProjectOp.PROP_PROJECT_PROVIDER).detach(_listener);
super.dispose();
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class PortletFrameworkValidationService method initValidationService.
@Override
protected void initValidationService() {
super.initValidationService();
_listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refresh();
}
};
NewLiferayPluginProjectOp op = _op();
op.property(NewLiferayPluginProjectOp.PROP_PROJECT_PROVIDER).attach(_listener);
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class NewLiferayPluginProjectMavenTests method testUseDefaultLocationEnablement.
public void testUseDefaultLocationEnablement(boolean versionRestriction) throws Exception {
final NewLiferayPluginProjectOp op = newProjectOp("test-use-default-location-enablement");
op.setProjectProvider("maven");
assertEquals(true, op.getUseDefaultLocation().service(EnablementService.class).enablement());
assertEquals(true, op.getUseDefaultLocation().enabled());
if (versionRestriction) {
op.setProjectProvider("ant");
assertEquals(false, op.getUseDefaultLocation().service(EnablementService.class).enablement());
assertEquals(false, op.getUseDefaultLocation().enabled());
}
}
Aggregations