Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 164870 Details for
Bug 309186
[API] FlatVirtualComponent should ignore manifest references
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
wtp.patch (text/plain), 7.08 KB, created by
Jason Peterson
on 2010-04-14 14:42:12 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jason Peterson
Created:
2010-04-14 14:42:12 EDT
Size:
7.08 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.common.modulecore >Index: modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java >=================================================================== >RCS file: /cvsroot/webtools/common/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java,v >retrieving revision 1.28 >diff -u -r1.28 IVirtualComponent.java >--- modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java 30 Mar 2010 09:06:19 -0000 1.28 >+++ modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java 14 Apr 2010 18:40:56 -0000 >@@ -44,6 +44,7 @@ > public static final String HARD_REFERENCES = "HARD_REFERENCES"; > public static final String NON_DERIVED_REFERENCES = "NON_DERIVED_REFERENCES"; > public static final String DISPLAYABLE_REFERENCES = "DISPLAYABLE_REFERENCES"; >+ public static final String FLATTENABLE_REFERENCES = "FLATTENABLE_REFERENCES"; > > /** > * The name of the component must be unique within its enclosing project. >Index: modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java >=================================================================== >RCS file: /cvsroot/webtools/common/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java,v >retrieving revision 1.13 >diff -u -r1.13 FlatVirtualComponent.java >--- modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java 6 Apr 2010 19:01:17 -0000 1.13 >+++ modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java 14 Apr 2010 18:40:56 -0000 >@@ -14,6 +14,7 @@ > import java.util.ArrayList; > import java.util.HashMap; > import java.util.List; >+import java.util.Map; > > import org.eclipse.core.resources.IContainer; > import org.eclipse.core.resources.IFile; >@@ -186,7 +187,9 @@ > */ > protected void addConsumedReferences(VirtualComponentFlattenUtility util, IVirtualComponent vc, IPath root) throws CoreException { > List consumableMembers = new ArrayList(); >- IVirtualReference[] refComponents = vc.getReferences(); >+ Map<String, Object> options = new HashMap<String, Object>(); >+ options.put(IVirtualComponent.REQUESTED_REFERENCE_TYPE, IVirtualComponent.FLATTENABLE_REFERENCES); >+ IVirtualReference[] refComponents = vc.getReferences(options); > for (int i = 0; i < refComponents.length; i++) { > IVirtualReference reference = refComponents[i]; > if (reference != null && reference.getDependencyType()==IVirtualReference.DEPENDENCY_TYPE_CONSUMES) { >@@ -218,7 +221,9 @@ > } > > protected void addUsedReferences(VirtualComponentFlattenUtility util, IVirtualComponent vc, IPath root) throws CoreException { >- IVirtualReference[] allReferences = vc.getReferences(); >+ Map<String, Object> options = new HashMap<String, Object>(); >+ options.put(IVirtualComponent.REQUESTED_REFERENCE_TYPE, IVirtualComponent.FLATTENABLE_REFERENCES); >+ IVirtualReference[] allReferences = vc.getReferences(options); > for (int i = 0; i < allReferences.length; i++) { > IVirtualReference reference = allReferences[i]; > IVirtualComponent virtualComp = reference.getReferencedComponent(); >#P org.eclipse.jst.j2ee >Index: j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java,v >retrieving revision 1.33 >diff -u -r1.33 J2EEModuleVirtualComponent.java >--- j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java 31 Mar 2010 10:14:25 -0000 1.33 >+++ j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java 14 Apr 2010 18:40:57 -0000 >@@ -119,6 +119,8 @@ > if( val != null ) { > if( HARD_REFERENCES.equals(val) || NON_DERIVED_REFERENCES.equals(val) || DISPLAYABLE_REFERENCES.equals(val)) > return getHardReferences(); >+ if( FLATTENABLE_REFERENCES.equals(val)) >+ return getNonManifestReferences(); > } > > Boolean objGetJavaRefs = (Boolean)options.get(GET_JAVA_REFS); >Index: archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaEEComponentExportOperation.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaEEComponentExportOperation.java,v >retrieving revision 1.7 >diff -u -r1.7 JavaEEComponentExportOperation.java >--- archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaEEComponentExportOperation.java 3 Mar 2010 22:45:23 -0000 1.7 >+++ archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaEEComponentExportOperation.java 14 Apr 2010 18:40:57 -0000 >@@ -21,9 +21,12 @@ > import org.eclipse.jst.common.internal.modulecore.ReplaceManifestExportParticipant; > import org.eclipse.jst.j2ee.internal.J2EEConstants; > import org.eclipse.jst.j2ee.internal.common.exportmodel.JavaEEComponentExportCallback; >-import org.eclipse.jst.j2ee.internal.common.exportmodel.AddJavaEEReferencesParticipant; >+import org.eclipse.wst.common.componentcore.internal.flat.AbstractFlattenParticipant; > import org.eclipse.wst.common.componentcore.internal.flat.FilterResourceParticipant; > import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant; >+import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.FlatComponentTaskModel; >+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; >+import org.eclipse.wst.common.componentcore.resources.IVirtualReference; > import org.eclipse.wst.common.frameworks.datamodel.IDataModel; > > public class JavaEEComponentExportOperation extends ComponentExportOperation { >@@ -41,7 +44,7 @@ > List<IFlattenParticipant> participants = new ArrayList<IFlattenParticipant>(); > String[] filteredExtensions = getFilteredExtensions(); > >- participants.add(new AddJavaEEReferencesParticipant()); >+ participants.add(createHierarchyParticipant()); > participants.add(new AddMappedOutputFoldersParticipant(filteredExtensions)); > participants.add(FilterResourceParticipant.createSuffixFilterParticipant(filteredExtensions)); > participants.add(new ReplaceManifestExportParticipant(new Path(J2EEConstants.MANIFEST_URI))); >@@ -51,6 +54,18 @@ > return participants; > } > >+ protected IFlattenParticipant createHierarchyParticipant() { >+ return new AbstractFlattenParticipant() { >+ @Override >+ public boolean isChildModule(IVirtualComponent rootComponent, IVirtualReference reference, FlatComponentTaskModel dataModel) { >+ if (!reference.getReferencedComponent().isBinary()) { >+ return true; >+ } >+ return false; >+ } >+ }; >+ } >+ > @Override > protected FlatComponentArchiver createFlatComponentArchiver(OutputStream out) { > return new FlatComponentArchiver(getComponent(), out, getParticipants(), new JavaEEComponentExportCallback(isExportSource()));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 309186
: 164870