Search in sources :

Example 1 with ArtifactEdit

use of org.eclipse.wst.common.componentcore.ArtifactEdit in project webtools.sourceediting by eclipse.

the class ComponentDeployable method addUtilMembers.

protected void addUtilMembers(IVirtualComponent vc) {
    ArtifactEdit edit = null;
    try {
        edit = getComponentArtifactEditForRead();
        IVirtualReference[] components = vc.getReferences();
        for (int i = 0; i < components.length; i++) {
            IVirtualReference reference = components[i];
            IVirtualComponent virtualComp = reference.getReferencedComponent();
            if (shouldIncludeUtilityComponent(virtualComp, components, edit)) {
                addUtilMember(vc, reference, reference.getRuntimePath());
            }
        }
    } finally {
        if (edit != null)
            edit.dispose();
    }
}
Also used : IVirtualReference(org.eclipse.wst.common.componentcore.resources.IVirtualReference) IVirtualComponent(org.eclipse.wst.common.componentcore.resources.IVirtualComponent) ArtifactEdit(org.eclipse.wst.common.componentcore.ArtifactEdit)

Aggregations

ArtifactEdit (org.eclipse.wst.common.componentcore.ArtifactEdit)1 IVirtualComponent (org.eclipse.wst.common.componentcore.resources.IVirtualComponent)1 IVirtualReference (org.eclipse.wst.common.componentcore.resources.IVirtualReference)1