Skip to content

Commit 49c74de

Browse files
committed
Refactor GeneratorHelpers: add removeLeadingSlash method
1 parent ba0fd53 commit 49c74de

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/de.fraunhofer.ipa.rossystem.xtext/src/de/fraunhofer/ipa/rossystem/generator/GeneratorHelpers.xtend

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,12 @@ class GeneratorHelpers {
361361
package_impl = node.eContainer.eContainer as AmentPackageImpl;
362362
return package_impl;
363363
}
364-
364+
def static String removeLeadingSlash(String input) {
365+
if (input !== null && input.startsWith("/")) {
366+
return input.substring(1)
367+
}
368+
return input
369+
}
365370
//Launch files generators
366371
// def check_ns(ComponentInterface component){
367372
// if (component.hasNS){

0 commit comments

Comments
 (0)