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 157872 Details for
Bug 301151
Duplicate Containers returned from FlatVirtualComponent fetchResources()
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]
The Fix ;)
301151.patch (text/plain), 2.06 KB, created by
Rob Stryker
on 2010-02-02 02:18:00 EST
(
hide
)
Description:
The Fix ;)
Filename:
MIME Type:
Creator:
Rob Stryker
Created:
2010-02-02 02:18:00 EST
Size:
2.06 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.common.modulecore >Index: modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/VirtualComponentFlattenUtility.java >=================================================================== >RCS file: /cvsroot/webtools/common/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/VirtualComponentFlattenUtility.java,v >retrieving revision 1.2 >diff -u -r1.2 VirtualComponentFlattenUtility.java >--- modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/VirtualComponentFlattenUtility.java 20 Jan 2010 17:54:48 -0000 1.2 >+++ modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/VirtualComponentFlattenUtility.java 2 Feb 2010 07:17:16 -0000 >@@ -71,16 +71,15 @@ > IFlatFolder mf = (FlatFolder) getExistingModuleResource(members,path.append(container.getName()).makeRelative()); > if( mf == null ) { > mf = new FlatFolder(container, container.getName(), path); >+ IFlatFolder parent = (FlatFolder) getExistingModuleResource(members, path); >+ if (path.isEmpty()) >+ members.add(mf); >+ else { >+ if (parent == null) >+ parent = ensureParentExists(members, path, container); >+ addMembersToModuleFolder(parent, new IFlatResource[] {mf}); >+ } > } >- IFlatFolder parent = (FlatFolder) getExistingModuleResource(members, path); >- if (path.isEmpty()) >- members.add(mf); >- else { >- if (parent == null) >- parent = ensureParentExists(members, path, container); >- addMembersToModuleFolder(parent, new IFlatResource[] {mf}); >- } >- > // recurse > addContainer(container, path.append(container.getName())); > } >@@ -156,6 +155,16 @@ > public static FlatFile createModuleFile(final IFile file, final IPath path) { > return new FlatFile(file, file.getName(), path); > } >+ >+ public static File extractFileFromFlatFile(IFlatFile resource) { >+ File f = (File)resource.getAdapter(File.class); >+ if (f == null) { >+ IFile ifile = (IFile)resource.getAdapter(IFile.class); >+ if (ifile != null) >+ f = ifile.getLocation().toFile(); >+ } >+ return f; >+ } > > > /**
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 301151
:
157872
|
157873