Skip to content

Commit

Permalink
Added a constructor without URIConverter to MImageImpl.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Aug 8, 2017
1 parent 79619aa commit b54a8c7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.URIConverter;
import org.eclipse.sirius.business.api.dialect.DialectManager;
import org.eclipse.sirius.business.api.dialect.command.CreateRepresentationCommand;
import org.eclipse.sirius.business.api.query.DRepresentationDescriptorQuery;
Expand Down Expand Up @@ -281,7 +280,7 @@ public void run() {
exportDiagUnitOfWork.run();
}

res = new MImageImpl(URIConverter.INSTANCE, URI.createFileURI(tmpFile.getAbsolutePath()));
res = new MImageImpl(URI.createFileURI(tmpFile.getAbsolutePath()));

return res;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ public class MImageImpl implements MImage {
* default.
* </p>
*
* @param uri
* the {@link URI}
*/
public MImageImpl(URI uri) {
this(URIConverter.INSTANCE, uri, PictureType.toType(uri));
}

/**
* Constructor.
* <p>
* The image type is deducted from the image {@link URI} file extension. If the extension is unknown, jpeg format will be selected by
* default.
* </p>
*
* @param uriConverter
* the {@link URIConverter uri converter} to use.
* @param uri
Expand Down

0 comments on commit b54a8c7

Please sign in to comment.