use of org.eclipse.wst.common.componentcore.internal.flat.IFlatVirtualComponent in project webtools.sourceediting by eclipse.
the class FlatComponentDeployable method getExportModelChildren.
public IChildModuleReference[] getExportModelChildren() throws CoreException {
IFlatVirtualComponent em = getFlatComponent();
IChildModuleReference[] children = em.getChildModules();
return children;
}
use of org.eclipse.wst.common.componentcore.internal.flat.IFlatVirtualComponent in project webtools.sourceediting by eclipse.
the class FlatComponentDeployable method getFlatComponent.
/**
* The export model is what does the grunt of the work
* @return
*/
protected IFlatVirtualComponent getFlatComponent() {
if (!shouldCache() || cacheFlattened == null) {
FlatComponentTaskModel options = new FlatComponentTaskModel();
options.put(FlatVirtualComponent.PARTICIPANT_LIST, Arrays.asList(getParticipants()));
FlatVirtualComponent tmp = new FlatVirtualComponent(component, options);
if (shouldCache())
cacheFlattened = tmp;
return tmp;
}
return cacheFlattened;
}
use of org.eclipse.wst.common.componentcore.internal.flat.IFlatVirtualComponent in project webtools.sourceediting by eclipse.
the class FlatComponentDeployable method getURI.
/**
* Returns the URI of the given contained CHILD module.
*
* SOFT requirements (NOT API!!) in use by some adopters
* If the passed in module is equal to this module, return our own deployed name
*
* @param module a module
* @return the URI of the given module, or <code>null</code> if the URI could
* not be found
*/
public String getURI(IModule module) {
ProjectModule md = (ProjectModule) module.loadAdapter(ProjectModule.class, new NullProgressMonitor());
if (md == this) {
// guess my own name
return VirtualReferenceUtilities.INSTANCE.getDefaultProjectArchiveName(this.component);
}
try {
FlatComponentDeployable cd = (FlatComponentDeployable) module.loadAdapter(FlatComponentDeployable.class, new NullProgressMonitor());
if (cd != null) {
IFlatVirtualComponent em = getFlatComponent();
IChildModuleReference[] children = em.getChildModules();
for (int i = 0; i < children.length; i++) {
IModule child = gatherModuleReference(component, children[i]);
if (child != null && child.getId().equals(module.getId()))
return children[i].getRelativeURI().toString();
}
}
} catch (CoreException ce) {
}
return null;
}
use of org.eclipse.wst.common.componentcore.internal.flat.IFlatVirtualComponent in project webtools.sourceediting by eclipse.
the class FlatComponentDeployable method members.
@Override
public IModuleResource[] members() throws CoreException {
if (component.isBinary())
return LEGACY_binaryMembers();
IFlatVirtualComponent em = getFlatComponent();
IFlatResource[] resources = em.fetchResources();
return convert(resources);
}
Aggregations