Skip to content

Commit

Permalink
Added computeAndConvertPathsToHtmlFromOriginal() to Sirius services.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Aug 21, 2024
1 parent d5a3c1e commit 2fce988
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.emf.common,
org.eclipse.emf.ecore,
org.eclipse.sirius;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius;bundle-version="[6.5.1,7.5.0)",
org.obeonetwork.m2doc.genconf,
org.obeonetwork.m2doc,
org.obeonetwork.m2doc.ide
Expand Down
12 changes: 6 additions & 6 deletions plugins/org.obeonetwork.m2doc.sirius/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Bundle-Name: %pluginName
Bundle-SymbolicName: org.obeonetwork.m2doc.sirius;singleton:=true
Bundle-Version: 3.3.3.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.sirius;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius.diagram;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius;bundle-version="[6.5.1,7.5.0)",
org.eclipse.sirius.diagram;bundle-version="[6.5.1,7.5.0)",
org.eclipse.gmf.runtime.diagram.ui,
org.eclipse.gmf.runtime.diagram.ui.render,
org.eclipse.sirius.diagram.ui;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius.ext.base;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius.table;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius.diagram.ui;bundle-version="[6.5.1,7.5.0)",
org.eclipse.sirius.ext.base;bundle-version="[6.5.1,7.5.0)",
org.eclipse.sirius.table;bundle-version="[6.5.1,7.5.0)",
org.obeonetwork.m2doc;bundle-version="[3.0.0,4.0.0)",
org.obeonetwork.m2doc.genconf;bundle-version="[3.0.0,4.0.0)",
org.eclipse.sirius.common;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius.common;bundle-version="[6.5.1,7.5.0)",
org.eclipse.acceleo.query;bundle-version="[6.0.1,8.0.0)",
org.obeonetwork.m2doc.ide;bundle-version="[3.0.0,4.0.0)",
org.eclipse.acceleo.annotations;bundle-version="[5.0.0,8.0.0)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.sirius.business.api.dialect.DialectManager;
import org.eclipse.sirius.business.api.dialect.command.CreateRepresentationCommand;
import org.eclipse.sirius.business.api.image.ImageManagerProvider;
import org.eclipse.sirius.business.api.query.DRepresentationDescriptorQuery;
import org.eclipse.sirius.business.api.query.DRepresentationQuery;
import org.eclipse.sirius.business.api.session.Session;
Expand Down Expand Up @@ -838,4 +839,18 @@ public MTable availableRepresentations(Object obj) {
return res;
}

// @formatter:off
@Documentation(
value = "Transforms the serialized text to a text that will be used for html page. This method only changes the image paths. It also ensures that the image is available at the modified location",
params = {
@Param(name = "htmlString", value = "The HTML text"),
@Param(name = "context", value = "An EObject context"),
},
result = "Transformed HTML text"
)
// @formatter:on
public String computeAndConvertPathsToHtmlFromOriginal(String htmlString, EObject context) {
return ImageManagerProvider.getImageManager().computeAndConvertPathsToHtmlFromOriginal(context, htmlString);
}

}
6 changes: 3 additions & 3 deletions tests/org.obeonetwork.m2doc.sirius.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Require-Bundle: org.junit,
org.obeonetwork.m2doc;bundle-version="[3.0.0,4.0.0)",
org.eclipse.core.runtime,
org.obeonetwork.m2doc.genconf;bundle-version="[3.0.0,4.0.0)",
org.eclipse.sirius;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius.table;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius.common;bundle-version="[5.0.0,7.5.0)",
org.eclipse.sirius;bundle-version="[6.5.1,7.5.0)",
org.eclipse.sirius.table;bundle-version="[6.5.1,7.5.0)",
org.eclipse.sirius.common;bundle-version="[6.5.1,7.5.0)",
org.obeonetwork.m2doc.tests;bundle-version="[3.0.0,4.0.0)",
org.apache.poi;bundle-version="[5.2.3,5.2.4)",
org.eclipse.emf.transaction,
Expand Down

0 comments on commit 2fce988

Please sign in to comment.