Package: Vdm2JavaLaunchConfigCommand

Vdm2JavaLaunchConfigCommand

nameinstructionbranchcomplexitylinemethod
Vdm2JavaLaunchConfigCommand()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getJavaSettings(IProject, List)
M: 33 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 12 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package org.overture.ide.plugins.javagen.commands;
2:
3: import java.util.List;
4:
5: import org.eclipse.core.resources.IProject;
6: import org.overture.codegen.vdm2java.JavaSettings;
7: import org.overture.ide.plugins.javagen.CodeGenConsole;
8: import org.overture.ide.plugins.javagen.util.LaunchConfigData;
9: import org.overture.ide.plugins.javagen.util.PluginVdm2JavaUtil;
10:
11: public class Vdm2JavaLaunchConfigCommand extends Vdm2JavaCommand
12: {
13:         @Override
14:         public JavaSettings getJavaSettings(IProject project,
15:                         List<String> classesToSkip)
16:         {
17:                 List<LaunchConfigData> launchConfigs = PluginVdm2JavaUtil.getProjectLaunchConfigs(project);
18:
19:•                if (!launchConfigs.isEmpty())
20:                 {
21:                         String entryExp = PluginVdm2JavaUtil.dialog(launchConfigs);
22:
23:•                        if (entryExp != null)
24:                         {
25:                                 JavaSettings javaSettings = super.getJavaSettings(project, classesToSkip);
26:                                 javaSettings.setVdmEntryExp(entryExp);
27:                                 return javaSettings;
28:                         }
29:                         else
30:                         {
31:                                 CodeGenConsole.GetInstance().println("Process cancelled by user.");
32:                         }
33:                 } else
34:                 {
35:                         CodeGenConsole.GetInstance().println(PluginVdm2JavaUtil.WARNING
36:                                         + " No launch configuration could be found for this project.\n");
37:                         CodeGenConsole.GetInstance().println("Cancelling launch configuration based code generation...\n");
38:                 }
39:
40:                 return null;
41:         }
42: }