|
Lines 21-29
Link Here
|
| 21 |
import org.eclipse.jst.common.internal.modulecore.ReplaceManifestExportParticipant; |
21 |
import org.eclipse.jst.common.internal.modulecore.ReplaceManifestExportParticipant; |
| 22 |
import org.eclipse.jst.j2ee.internal.J2EEConstants; |
22 |
import org.eclipse.jst.j2ee.internal.J2EEConstants; |
| 23 |
import org.eclipse.jst.j2ee.internal.common.exportmodel.JavaEEComponentExportCallback; |
23 |
import org.eclipse.jst.j2ee.internal.common.exportmodel.JavaEEComponentExportCallback; |
| 24 |
import org.eclipse.jst.j2ee.internal.common.exportmodel.AddJavaEEReferencesParticipant; |
24 |
import org.eclipse.wst.common.componentcore.internal.flat.AbstractFlattenParticipant; |
| 25 |
import org.eclipse.wst.common.componentcore.internal.flat.FilterResourceParticipant; |
25 |
import org.eclipse.wst.common.componentcore.internal.flat.FilterResourceParticipant; |
| 26 |
import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant; |
26 |
import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant; |
|
|
27 |
import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.FlatComponentTaskModel; |
| 28 |
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; |
| 29 |
import org.eclipse.wst.common.componentcore.resources.IVirtualReference; |
| 27 |
import org.eclipse.wst.common.frameworks.datamodel.IDataModel; |
30 |
import org.eclipse.wst.common.frameworks.datamodel.IDataModel; |
| 28 |
|
31 |
|
| 29 |
public class JavaEEComponentExportOperation extends ComponentExportOperation { |
32 |
public class JavaEEComponentExportOperation extends ComponentExportOperation { |
|
Lines 41-47
Link Here
|
| 41 |
List<IFlattenParticipant> participants = new ArrayList<IFlattenParticipant>(); |
44 |
List<IFlattenParticipant> participants = new ArrayList<IFlattenParticipant>(); |
| 42 |
String[] filteredExtensions = getFilteredExtensions(); |
45 |
String[] filteredExtensions = getFilteredExtensions(); |
| 43 |
|
46 |
|
| 44 |
participants.add(new AddJavaEEReferencesParticipant()); |
47 |
participants.add(createHierarchyParticipant()); |
| 45 |
participants.add(new AddMappedOutputFoldersParticipant(filteredExtensions)); |
48 |
participants.add(new AddMappedOutputFoldersParticipant(filteredExtensions)); |
| 46 |
participants.add(FilterResourceParticipant.createSuffixFilterParticipant(filteredExtensions)); |
49 |
participants.add(FilterResourceParticipant.createSuffixFilterParticipant(filteredExtensions)); |
| 47 |
participants.add(new ReplaceManifestExportParticipant(new Path(J2EEConstants.MANIFEST_URI))); |
50 |
participants.add(new ReplaceManifestExportParticipant(new Path(J2EEConstants.MANIFEST_URI))); |
|
Lines 51-56
Link Here
|
| 51 |
return participants; |
54 |
return participants; |
| 52 |
} |
55 |
} |
| 53 |
|
56 |
|
|
|
57 |
protected IFlattenParticipant createHierarchyParticipant() { |
| 58 |
return new AbstractFlattenParticipant() { |
| 59 |
@Override |
| 60 |
public boolean isChildModule(IVirtualComponent rootComponent, IVirtualReference reference, FlatComponentTaskModel dataModel) { |
| 61 |
if (!reference.getReferencedComponent().isBinary()) { |
| 62 |
return true; |
| 63 |
} |
| 64 |
return false; |
| 65 |
} |
| 66 |
}; |
| 67 |
} |
| 68 |
|
| 54 |
@Override |
69 |
@Override |
| 55 |
protected FlatComponentArchiver createFlatComponentArchiver(OutputStream out) { |
70 |
protected FlatComponentArchiver createFlatComponentArchiver(OutputStream out) { |
| 56 |
return new FlatComponentArchiver(getComponent(), out, getParticipants(), new JavaEEComponentExportCallback(isExportSource())); |
71 |
return new FlatComponentArchiver(getComponent(), out, getParticipants(), new JavaEEComponentExportCallback(isExportSource())); |