Loading plugins/org.etsi.mts.tdl.helper/src/org/etsi/mts/tdl/helper/TDLHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -195,7 +195,7 @@ public class TDLHelper { "tdl", "tdlan2", "tdltx", "tdltxi" }; private static IProject getProjectForResource(Resource resource) { public static IProject getProjectForResource(Resource resource) { IWorkspaceRoot ws = org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot(); URI resourceUri = resource.getURI(); IFile modelFile = null; Loading plugins/org.etsi.mts.tdl.openapi2tdl.next/META-INF/MANIFEST.MF +5 −2 Original line number Diff line number Diff line Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Next Bundle-SymbolicName: org.etsi.mts.tdl.openapi2tdl.next Bundle-SymbolicName: org.etsi.mts.tdl.openapi2tdl.next;singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-Vendor: European Telecommunications Standards Institute (ETSI) Automatic-Module-Name: org.etsi.mts.tdl.openapi2tdl.next Require-Bundle: org.etsi.mts.tdl.model, org.etsi.mts.tdl.common, org.etsi.mts.tdl.openapi.generator.wrapper, org.etsi.mts.tdl.helper org.etsi.mts.tdl.helper, org.eclipse.ui;resolution:=optional, org.eclipse.core.resources;resolution:=optional, org.eclipse.core.runtime;bundle-version="3.26.100";resolution:=optional Export-Package: org.etsi.mts.tdl.openapi2tdl.next, org.etsi.mts.tdl.openapi2tdl.next.doc Bundle-ClassPath: . plugins/org.etsi.mts.tdl.openapi2tdl.next/build.properties +2 −1 Original line number Diff line number Diff line source.. = src/ output.. = bin/ bin.includes = META-INF/,\ . .,\ plugin.xml plugins/org.etsi.mts.tdl.openapi2tdl.next/plugin.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> <plugin> <extension point="org.eclipse.ui.propertyPages"> <page category="org.etsi.mts.tdl.projectPropertyPage" class="org.etsi.mts.tdl.openapi2tdl.next.PropertyPage" id="org.etsi.mts.tdl.openapi2tdl.next.propertyPage" name="OpenAPI import" objectClass="org.eclipse.core.resources.IProject"> </page> </extension> </plugin> plugins/org.etsi.mts.tdl.openapi2tdl.next/src/org/etsi/mts/tdl/openapi2tdl/next/OpenAPI2TDLTranslatorNext.java +12 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ import java.util.List; import java.util.Map; import java.util.Set; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ProjectScope; import org.eclipse.emf.ecore.resource.Resource; import org.etsi.mts.tdl.CollectionDataType; import org.etsi.mts.tdl.DataElementMapping; Loading @@ -23,6 +25,7 @@ import org.etsi.mts.tdl.tdlPackage; import org.etsi.mts.tdl.helper.TDLHelper; import org.etsi.mts.tdl.transform.AbstractTranslator; import org.openapitools.codegen.utils.ModelUtils; import org.osgi.service.prefs.Preferences; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; Loading Loading @@ -76,8 +79,16 @@ public class OpenAPI2TDLTranslatorNext extends AbstractTranslator { getGeneratedPackage().getPackagedElement().remove(stringType); } // TODO configurable message vs procedure based API IProject project = TDLHelper.getProjectForResource(getTargetResource()); Preferences preferences = null; if (project != null) { ProjectScope ps = new ProjectScope(project); preferences = ps.getNode(PropertyPage.PREFERENCE_SCOPE); } boolean useMessageBasedApi = true; if (preferences != null) useMessageBasedApi = !preferences.getBoolean(PropertyPage.PROCEDURE_BASED, false); StructuredDataType messageBody = null; if (useMessageBasedApi) { Package httpPackage = TDLHelper.getHttpPackage(getTargetResource()); Loading Loading
plugins/org.etsi.mts.tdl.helper/src/org/etsi/mts/tdl/helper/TDLHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -195,7 +195,7 @@ public class TDLHelper { "tdl", "tdlan2", "tdltx", "tdltxi" }; private static IProject getProjectForResource(Resource resource) { public static IProject getProjectForResource(Resource resource) { IWorkspaceRoot ws = org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot(); URI resourceUri = resource.getURI(); IFile modelFile = null; Loading
plugins/org.etsi.mts.tdl.openapi2tdl.next/META-INF/MANIFEST.MF +5 −2 Original line number Diff line number Diff line Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Next Bundle-SymbolicName: org.etsi.mts.tdl.openapi2tdl.next Bundle-SymbolicName: org.etsi.mts.tdl.openapi2tdl.next;singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-Vendor: European Telecommunications Standards Institute (ETSI) Automatic-Module-Name: org.etsi.mts.tdl.openapi2tdl.next Require-Bundle: org.etsi.mts.tdl.model, org.etsi.mts.tdl.common, org.etsi.mts.tdl.openapi.generator.wrapper, org.etsi.mts.tdl.helper org.etsi.mts.tdl.helper, org.eclipse.ui;resolution:=optional, org.eclipse.core.resources;resolution:=optional, org.eclipse.core.runtime;bundle-version="3.26.100";resolution:=optional Export-Package: org.etsi.mts.tdl.openapi2tdl.next, org.etsi.mts.tdl.openapi2tdl.next.doc Bundle-ClassPath: .
plugins/org.etsi.mts.tdl.openapi2tdl.next/build.properties +2 −1 Original line number Diff line number Diff line source.. = src/ output.. = bin/ bin.includes = META-INF/,\ . .,\ plugin.xml
plugins/org.etsi.mts.tdl.openapi2tdl.next/plugin.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> <plugin> <extension point="org.eclipse.ui.propertyPages"> <page category="org.etsi.mts.tdl.projectPropertyPage" class="org.etsi.mts.tdl.openapi2tdl.next.PropertyPage" id="org.etsi.mts.tdl.openapi2tdl.next.propertyPage" name="OpenAPI import" objectClass="org.eclipse.core.resources.IProject"> </page> </extension> </plugin>
plugins/org.etsi.mts.tdl.openapi2tdl.next/src/org/etsi/mts/tdl/openapi2tdl/next/OpenAPI2TDLTranslatorNext.java +12 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ import java.util.List; import java.util.Map; import java.util.Set; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ProjectScope; import org.eclipse.emf.ecore.resource.Resource; import org.etsi.mts.tdl.CollectionDataType; import org.etsi.mts.tdl.DataElementMapping; Loading @@ -23,6 +25,7 @@ import org.etsi.mts.tdl.tdlPackage; import org.etsi.mts.tdl.helper.TDLHelper; import org.etsi.mts.tdl.transform.AbstractTranslator; import org.openapitools.codegen.utils.ModelUtils; import org.osgi.service.prefs.Preferences; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; Loading Loading @@ -76,8 +79,16 @@ public class OpenAPI2TDLTranslatorNext extends AbstractTranslator { getGeneratedPackage().getPackagedElement().remove(stringType); } // TODO configurable message vs procedure based API IProject project = TDLHelper.getProjectForResource(getTargetResource()); Preferences preferences = null; if (project != null) { ProjectScope ps = new ProjectScope(project); preferences = ps.getNode(PropertyPage.PREFERENCE_SCOPE); } boolean useMessageBasedApi = true; if (preferences != null) useMessageBasedApi = !preferences.getBoolean(PropertyPage.PROCEDURE_BASED, false); StructuredDataType messageBody = null; if (useMessageBasedApi) { Package httpPackage = TDLHelper.getHttpPackage(getTargetResource()); Loading