| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_75) on Mon May 18 03:56:44 EDT 2015 --> |
| <title>ResourceUtil (EMF Compare API Specification)</title> |
| <meta name="date" content="2015-05-18"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ResourceUtil (EMF Compare API Specification)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ResourceUtil.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-files/index-1.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><span style='font-size:small'><b>EMF Compare</b><br>3.2.0.201505180755</span></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/eclipse/emf/compare/ide/utils/IStoragePathProvider.html" title="interface in org.eclipse.emf.compare.ide.utils"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/eclipse/emf/compare/ide/utils/StorageTraversal.html" title="class in org.eclipse.emf.compare.ide.utils"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/eclipse/emf/compare/ide/utils/ResourceUtil.html" target="_top">Frames</a></li> |
| <li><a href="ResourceUtil.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.eclipse.emf.compare.ide.utils</div> |
| <h2 title="Class ResourceUtil" class="title">Class ResourceUtil</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.eclipse.emf.compare.ide.utils.ResourceUtil</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public final class <span class="strong">ResourceUtil</span> |
| extends <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">This class will be used to provide various utilities aimed at IResource manipulation.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static com.google.common.base.Function<<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a>,<a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util">URI</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#asURI()">asURI</a></strong>()</code> |
| <div class="block">Provides a <code>Function</code> that converts an <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources"><code>IStorage</code></a> into a <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util"><code>URI</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#binaryIdentical(org.eclipse.core.resources.IStorage,%20org.eclipse.core.resources.IStorage)">binaryIdentical</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> left, |
| <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> right)</code> |
| <div class="block">Checks whether the two given storages point to binary identical data.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#binaryIdentical(org.eclipse.core.resources.IStorage,%20org.eclipse.core.resources.IStorage,%20org.eclipse.core.resources.IStorage)">binaryIdentical</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> left, |
| <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> right, |
| <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> origin)</code> |
| <div class="block">Checks whether the three given storages point to binary identical data.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util">URI</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#createURIFor(org.eclipse.core.resources.IFile)">createURIFor</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IFile.html?is-external=true" title="class or interface in org.eclipse.core.resources">IFile</a> file)</code> |
| <div class="block">Create the URI with which we'll load the given IFile as an EMF resource.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util">URI</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#createURIFor(org.eclipse.core.resources.IStorage)">createURIFor</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> storage)</code> |
| <div class="block">Create the URI with which we'll load the given IStorage as an EMF resource.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/content/IContentType.html?is-external=true" title="class or interface in org.eclipse.core.runtime.content">IContentType</a>[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#getContentTypes(org.eclipse.core.resources.IFile)">getContentTypes</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IFile.html?is-external=true" title="class or interface in org.eclipse.core.resources">IFile</a> file)</code> |
| <div class="block">Returns the whole list of content types of the given IFile, or an empty array if none.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/IPath.html?is-external=true" title="class or interface in org.eclipse.core.runtime">IPath</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#getFixedPath(org.eclipse.core.resources.IStorage)">getFixedPath</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> storage)</code> |
| <div class="block">Returns a path for this storage after fixing from an <a href="../../../../../../org/eclipse/emf/compare/ide/utils/IStoragePathProvider.html" title="interface in org.eclipse.emf.compare.ide.utils"><code>IStoragePathProvider</code></a> if one exists.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#hasContentType(java.lang.String,%20java.util.List)">hasContentType</a></strong>(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> contentTypeId, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/content/IContentType.html?is-external=true" title="class or interface in org.eclipse.core.runtime.content">IContentType</a>> contentTypes)</code> |
| <div class="block">This will return <code>true</code> if the given <em>contentTypeId</em> represents a content-type |
| contained in the given array.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#hasModelType(org.eclipse.core.resources.IFile)">hasModelType</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IFile.html?is-external=true" title="class or interface in org.eclipse.core.resources">IFile</a> file)</code> |
| <div class="block">Checks whether the given file has one of the content types described in <a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#MODEL_CONTENT_TYPES"><code>MODEL_CONTENT_TYPES</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">Resource</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#loadResource(org.eclipse.core.resources.IStorage,%20org.eclipse.emf.ecore.resource.ResourceSet,%20java.util.Map)">loadResource</a></strong>(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> storage, |
| <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/ResourceSet.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">ResourceSet</a> resourceSet, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> options)</code> |
| <div class="block">This will try and load the given file as an EMF model, and return the corresponding <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource"><code>Resource</code></a> if |
| at all possible.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#saveAllResources(org.eclipse.emf.ecore.resource.ResourceSet,%20java.util.Map)">saveAllResources</a></strong>(<a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/ResourceSet.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">ResourceSet</a> resourceSet, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> options)</code> |
| <div class="block">This can be called to save all resources contained by the resource set.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#saveResource(org.eclipse.emf.ecore.resource.Resource,%20java.util.Map)">saveResource</a></strong>(<a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">Resource</a> resource, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> options)</code> |
| <div class="block">This can be called to save the given resource.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="asURI()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>asURI</h4> |
| <pre>public static com.google.common.base.Function<<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a>,<a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util">URI</a>> asURI()</pre> |
| <div class="block">Provides a <code>Function</code> that converts an <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources"><code>IStorage</code></a> into a <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util"><code>URI</code></a>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>A <code>Function</code> that converts an <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources"><code>IStorage</code></a> into a <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util"><code>URI</code></a>. This function |
| transforms a <code>null</code> storage into a <code>null</code> URI.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.2</dd></dl> |
| </li> |
| </ul> |
| <a name="loadResource(org.eclipse.core.resources.IStorage, org.eclipse.emf.ecore.resource.ResourceSet, java.util.Map)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>loadResource</h4> |
| <pre>public static <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">Resource</a> loadResource(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> storage, |
| <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/ResourceSet.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">ResourceSet</a> resourceSet, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> options)</pre> |
| <div class="block">This will try and load the given file as an EMF model, and return the corresponding <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource"><code>Resource</code></a> if |
| at all possible.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>storage</code> - The file we need to try and load as a model.</dd><dd><code>resourceSet</code> - The resource set in which to load this Resource.</dd><dd><code>options</code> - The options to pass to <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true#load(java.util.Map)" title="class or interface in org.eclipse.emf.ecore.resource"><code>Resource.load(java.util.Map)</code></a>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The loaded EMF Resource if <code>file</code> was a model, <code>null</code> otherwise.</dd></dl> |
| </li> |
| </ul> |
| <a name="binaryIdentical(org.eclipse.core.resources.IStorage, org.eclipse.core.resources.IStorage)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>binaryIdentical</h4> |
| <pre>public static boolean binaryIdentical(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> left, |
| <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> right)</pre> |
| <div class="block">Checks whether the two given storages point to binary identical data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>left</code> - First of the two storages which content we are testing.</dd><dd><code>right</code> - Second of the two storages which content we are testing.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <code>left</code> and <code>right</code> are binary identical.</dd></dl> |
| </li> |
| </ul> |
| <a name="binaryIdentical(org.eclipse.core.resources.IStorage, org.eclipse.core.resources.IStorage, org.eclipse.core.resources.IStorage)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>binaryIdentical</h4> |
| <pre>public static boolean binaryIdentical(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> left, |
| <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> right, |
| <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> origin)</pre> |
| <div class="block">Checks whether the three given storages point to binary identical data. This could be done by calling |
| <a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#binaryIdentical(org.eclipse.core.resources.IStorage,%20org.eclipse.core.resources.IStorage)"><code>binaryIdentical(IStorage, IStorage)</code></a> twice, though this implementation allows us to shortcut |
| whenever one byte differs... and will read one less file from its input stream.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>left</code> - First of the three storages which content we are testing.</dd><dd><code>right</code> - Second of the three storages which content we are testing.</dd><dd><code>origin</code> - Third of the three storages which content we are testing.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <code>left</code>, <code>right</code> and <code>origin</code> are binary identical.</dd></dl> |
| </li> |
| </ul> |
| <a name="createURIFor(org.eclipse.core.resources.IFile)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createURIFor</h4> |
| <pre>public static <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util">URI</a> createURIFor(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IFile.html?is-external=true" title="class or interface in org.eclipse.core.resources">IFile</a> file)</pre> |
| <div class="block">Create the URI with which we'll load the given IFile as an EMF resource.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - The file for which we need an EMF URI.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The created URI.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="createURIFor(org.eclipse.core.resources.IStorage)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createURIFor</h4> |
| <pre>public static <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/URI.html?is-external=true" title="class or interface in org.eclipse.emf.common.util">URI</a> createURIFor(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> storage)</pre> |
| <div class="block">Create the URI with which we'll load the given IStorage as an EMF resource.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>storage</code> - The storage for which we need an EMF URI.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The created URI.</dd></dl> |
| </li> |
| </ul> |
| <a name="getFixedPath(org.eclipse.core.resources.IStorage)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFixedPath</h4> |
| <pre>public static <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/IPath.html?is-external=true" title="class or interface in org.eclipse.core.runtime">IPath</a> getFixedPath(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IStorage.html?is-external=true" title="class or interface in org.eclipse.core.resources">IStorage</a> storage)</pre> |
| <div class="block">Returns a path for this storage after fixing from an <a href="../../../../../../org/eclipse/emf/compare/ide/utils/IStoragePathProvider.html" title="interface in org.eclipse.emf.compare.ide.utils"><code>IStoragePathProvider</code></a> if one exists.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>storage</code> - The storage for which we need a fixed full path.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The full path to this storage, fixed if need be.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.2</dd></dl> |
| </li> |
| </ul> |
| <a name="saveAllResources(org.eclipse.emf.ecore.resource.ResourceSet, java.util.Map)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>saveAllResources</h4> |
| <pre>public static void saveAllResources(<a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/ResourceSet.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">ResourceSet</a> resourceSet, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> options)</pre> |
| <div class="block">This can be called to save all resources contained by the resource set. This will not try and save |
| resources that do not support output.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>resourceSet</code> - The resource set to save.</dd><dd><code>options</code> - The options we are to pass on to <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true#save(java.util.Map)" title="class or interface in org.eclipse.emf.ecore.resource"><code>Resource.save(Map)</code></a>.</dd></dl> |
| </li> |
| </ul> |
| <a name="saveResource(org.eclipse.emf.ecore.resource.Resource, java.util.Map)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>saveResource</h4> |
| <pre>public static void saveResource(<a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true" title="class or interface in org.eclipse.emf.ecore.resource">Resource</a> resource, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> options)</pre> |
| <div class="block">This can be called to save the given resource. This will not try and save a resource that do not |
| support output.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>resource</code> - The resource to save.</dd><dd><code>options</code> - The options we are to pass on to <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/resource/Resource.html?is-external=true#save(java.util.Map)" title="class or interface in org.eclipse.emf.ecore.resource"><code>Resource.save(Map)</code></a>.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="hasContentType(java.lang.String, java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasContentType</h4> |
| <pre>public static boolean hasContentType(<a href="http://download.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> contentTypeId, |
| <a href="http://download.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/content/IContentType.html?is-external=true" title="class or interface in org.eclipse.core.runtime.content">IContentType</a>> contentTypes)</pre> |
| <div class="block">This will return <code>true</code> if the given <em>contentTypeId</em> represents a content-type |
| contained in the given array.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>contentTypeId</code> - Fully qualified identifier of the content type we seek.</dd><dd><code>contentTypes</code> - The array of content-types to compare against.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the given array contains a content-type with this id.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="hasModelType(org.eclipse.core.resources.IFile)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasModelType</h4> |
| <pre>public static boolean hasModelType(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IFile.html?is-external=true" title="class or interface in org.eclipse.core.resources">IFile</a> file)</pre> |
| <div class="block">Checks whether the given file has one of the content types described in <a href="../../../../../../org/eclipse/emf/compare/ide/utils/ResourceUtil.html#MODEL_CONTENT_TYPES"><code>MODEL_CONTENT_TYPES</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - The file which contents are to be checked.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if this file has one of the "model" content types.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="getContentTypes(org.eclipse.core.resources.IFile)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getContentTypes</h4> |
| <pre>public static <a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/content/IContentType.html?is-external=true" title="class or interface in org.eclipse.core.runtime.content">IContentType</a>[] getContentTypes(<a href="http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IFile.html?is-external=true" title="class or interface in org.eclipse.core.resources">IFile</a> file)</pre> |
| <div class="block">Returns the whole list of content types of the given IFile, or an empty array if none.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - The file we need the content types of.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>All content types associated with the given file, an empty array if none.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ResourceUtil.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-files/index-1.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><span style='font-size:small'><b>EMF Compare</b><br>3.2.0.201505180755</span></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/eclipse/emf/compare/ide/utils/IStoragePathProvider.html" title="interface in org.eclipse.emf.compare.ide.utils"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/eclipse/emf/compare/ide/utils/StorageTraversal.html" title="class in org.eclipse.emf.compare.ide.utils"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/eclipse/emf/compare/ide/utils/ResourceUtil.html" target="_top">Frames</a></li> |
| <li><a href="ResourceUtil.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><br><span style='font-size:small;float:right'>Copyright (c) 2006, 2014 Obeo and others. All rights reserved.</span></small></p> |
| </body> |
| </html> |