blob: d948058e31509f498e423daa9bae88f952d9be06 [file] [log] [blame]
//------------------------------------------------------------------------------
// Copyright (c) 2005, 2006 IBM Corporation and others.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
package org.eclipse.epf.library.layout.elements;
import java.util.List;
import org.eclipse.epf.library.configuration.ConfigurationHelper;
import org.eclipse.epf.library.layout.ElementLayoutManager;
import org.eclipse.epf.library.layout.util.XmlElement;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.UmaPackage;
import org.eclipse.epf.uma.WorkProductDescriptor;
public class WorkProductDescriptorLayout extends DescriptorLayout {
public void init(ElementLayoutManager layoutManager, MethodElement element) {
super.__init(layoutManager, element);
}
/**
* @see org.eclipse.epf.library.layout.elements.AbstractElementLayout#loadReferences(XmlElement, boolean)
*/
public void loadReferences(XmlElement elementXml, boolean includeReferences) {
super.loadReferences(elementXml, includeReferences);
// 161325 - WPDescriptors did not show modify RoleDescriptors
// get the modifies feature
// this guy does not have a defined opposite feature
List modifyRoles = ConfigurationHelper.calcModifyRoleDescriptors(
(WorkProductDescriptor)super.element,
layoutManager.getElementRealizer());
addReferences(null, elementXml, "workedOnBy", modifyRoles); //$NON-NLS-1$
elementXml.setAttribute("ShowFullMethodContent", (layoutManager.getValidator().showExtraInfoForDescriptors()) ? "true" : "false");
if ((super.elementLayout != null ) && layoutManager.getValidator().showExtraInfoForDescriptors() ) {
// also load the linked element referenced information
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getWorkProduct_EstimationConsiderations(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getWorkProduct_Reports(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getWorkProduct_Templates(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getWorkProduct_ToolMentors(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getContentElement_Assets(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getContentElement_Checklists(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getContentElement_ConceptsAndPapers(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getContentElement_Examples(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getContentElement_Guidelines(), elementXml, false);
super.elementLayout.loadFeature(UmaPackage.eINSTANCE.getContentElement_SupportingMaterials(), elementXml, false);
}
}
}