use of com.liferay.ide.project.core.IProjectBuilder in project liferay-ide by liferay.
the class MavenBundlePluginProject method adapt.
@Override
public <T> T adapt(Class<T> adapterType) {
T adapter = super.adapt(adapterType);
if (adapter != null) {
return adapter;
}
IMavenProjectFacade facade = MavenUtil.getProjectFacade(getProject(), new NullProgressMonitor());
if (facade != null) {
if (IProjectBuilder.class.equals(adapterType)) {
IProjectBuilder projectBuilder = new MavenProjectBuilder(getProject());
return adapterType.cast(projectBuilder);
} else if (IRemoteServerPublisher.class.equals(adapterType)) {
IRemoteServerPublisher remoteServerPublisher = new MavenProjectRemoteServerPublisher(getProject());
return adapterType.cast(remoteServerPublisher);
} else if (IBundleProject.class.equals(adapterType)) {
return adapterType.cast(this);
}
}
return null;
}
Aggregations