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 157160 Details for
Bug 300724
MatchService.resolveAll - Problem when comparing fragment resources with non-fragment ones.
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 to fix MatchService, so it can deal with cyclic references.
EMFCompare_MatchService_Reentry.txt (text/plain), 2.94 KB, created by
Alexander Nyßen
on 2010-01-25 15:08:07 EST
(
hide
)
Description:
Patch to fix MatchService, so it can deal with cyclic references.
Filename:
MIME Type:
Creator:
Alexander Nyßen
Created:
2010-01-25 15:08:07 EST
Size:
2.94 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.emf.compare.match >Index: src/org/eclipse/emf/compare/match/service/MatchService.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf.compare/plugins/org.eclipse.emf.compare.match/src/org/eclipse/emf/compare/match/service/MatchService.java,v >retrieving revision 1.43 >diff -u -r1.43 MatchService.java >--- src/org/eclipse/emf/compare/match/service/MatchService.java 24 Nov 2009 09:35:39 -0000 1.43 >+++ src/org/eclipse/emf/compare/match/service/MatchService.java 25 Jan 2010 19:56:19 -0000 >@@ -227,11 +227,11 @@ > * @since 1.0 > */ > @SuppressWarnings("unchecked") >- public static MatchResourceSet doResourceSetMatch(ResourceSet leftResourceSet, >- ResourceSet rightResourceSet, Map<String, Object> options) throws InterruptedException { >+ public static MatchResourceSet doResourceSetMatch(Resource leftResource, Resource rightResource, >+ Map<String, Object> options) throws InterruptedException { > // Resolve all proxies so that all resources get loaded >- resolveAll(leftResourceSet); >- resolveAll(rightResourceSet); >+ ResourceSet leftResourceSet = getResolvedResourceSet(leftResource); >+ ResourceSet rightResourceSet = getResolvedResourceSet(rightResource); > > final List<Resource> remainingLeftResources = new ArrayList<Resource>(leftResourceSet.getResources()); > final List<Resource> remainingRightResources = new ArrayList<Resource>(rightResourceSet >@@ -310,13 +310,12 @@ > * @since 1.0 > */ > @SuppressWarnings("unchecked") >- public static MatchResourceSet doResourceSetMatch(ResourceSet leftResourceSet, >- ResourceSet rightResourceSet, ResourceSet ancestorResourceSet, Map<String, Object> options) >- throws InterruptedException { >- // Resolve all proxies so that all resources get loaded >- resolveAll(leftResourceSet); >- resolveAll(rightResourceSet); >- resolveAll(ancestorResourceSet); >+ public static MatchResourceSet doResourceSetMatch(Resource leftResource, Resource rightResource, >+ Resource ancestorResource, Map<String, Object> options) throws InterruptedException { >+ // resolve all proxies >+ ResourceSet leftResourceSet = getResolvedResourceSet(leftResource); >+ ResourceSet rightResourceSet = getResolvedResourceSet(rightResource); >+ ResourceSet ancestorResourceSet = getResolvedResourceSet(ancestorResource); > > final List<Resource> remainingLeftResources = new ArrayList<Resource>(leftResourceSet.getResources()); > final List<Resource> remainingRightResources = new ArrayList<Resource>(rightResourceSet >@@ -412,6 +411,13 @@ > return match; > } > >+ private static ResourceSet getResolvedResourceSet(Resource resource) { >+ resolveAll(resource.getResourceSet()); >+ // if the matching resource was detected as FRAGMENT, remove it from this list >+ FRAGMENT_RESOURCES.remove(resource); >+ return resource.getResourceSet(); >+ } >+ > /** > * This will try and find a resource in <code>candidates</code> similar to <code>resource</code>. > *
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 300724
:
157160