+ protected String generateName(IFile file) {\r
+ IPath relativePath = file.getProjectRelativePath();\r
+ String name = relativePath.toString();\r
+ int idx = name.lastIndexOf(".xml");\r
+ if (idx > 0)\r
+ name = name.substring(0, idx);\r
+\r
+ if (name.startsWith("src/main/slc/root/"))\r
+ name = name.substring("src/main/slc/root/".length());\r
+ else if (name.startsWith("src/main/slc/"))\r
+ name = name.substring("src/main/slc/".length());\r
+\r
+ name = name.replace('/', '.');// otherwise not properly saved\r
+ return name;\r
+ }\r
+\r
+ protected ILaunchConfiguration findLaunchConfiguration(IFile file,\r
+ ILaunchConfiguration[] configs) throws CoreException {\r
+ for (ILaunchConfiguration config : configs) {\r
+ IResource[] res = config.getMappedResources();\r
+ if (res.length > 1) {\r
+ IFile fileT = (IFile) res[0];\r
+ if (fileT.equals(file)) {\r
+ return config;\r
+ }\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+\r