use of org.eclipse.n4js.n4mf.ProjectDescription in project n4js by eclipse.
the class SimpleProjectDescriptionImpl method getVendorId.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getVendorId() {
String _xifexpression = null;
String _declaredVendorId = this.getDeclaredVendorId();
boolean _tripleNotEquals = (_declaredVendorId != null);
if (_tripleNotEquals) {
_xifexpression = this.getDeclaredVendorId();
} else {
EObject _eContainer = this.eContainer();
EObject _eContainer_1 = null;
if (_eContainer != null) {
_eContainer_1 = _eContainer.eContainer();
}
EObject _eContainer_2 = null;
if (_eContainer_1 != null) {
_eContainer_2 = _eContainer_1.eContainer();
}
String _declaredVendorId_1 = null;
if (((ProjectDescription) _eContainer_2) != null) {
_declaredVendorId_1 = ((ProjectDescription) _eContainer_2).getDeclaredVendorId();
}
_xifexpression = _declaredVendorId_1;
}
return _xifexpression;
}
use of org.eclipse.n4js.n4mf.ProjectDescription in project n4js by eclipse.
the class ManifestMerger method mergeContent.
/**
* Merges the content of two {@link ProjectDescription project description} instances that are representing the
* actual N4JS manifests.
*
* @param from
* the source resource. These attributes and references will be merged to the other one given with the
* {@code to} argument.
* @param to
* the target resource. The project description that has to be updated with the content of the
* {@code from} argument.
* @return the merged project description that has been detached from its resource.
*/
public ProjectDescription mergeContent(final Resource from, final Resource to) {
try {
final EObject fromContent = from.getContents().get(0);
final EObject toContent = to.getContents().get(0);
if (fromContent instanceof ProjectDescription && toContent instanceof ProjectDescription) {
return (ProjectDescription) merge(fromContent, toContent);
}
return null;
} finally {
from.getContents().clear();
to.getContents().clear();
}
}
Aggregations