Skip to content

Commit

Permalink
Merge branch 'master' into highprecision
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Nov 30, 2023
2 parents d27ff5f + f307195 commit bf27f29
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
Binary file modified vdmj/documentation/DesignSpec.odt
Binary file not shown.
Binary file modified vdmj/documentation/DesignSpec.pdf
Binary file not shown.
Binary file modified vdmj/documentation/PluginWritersGuide.odt
Binary file not shown.
Binary file modified vdmj/documentation/PluginWritersGuide.pdf
Binary file not shown.
12 changes: 2 additions & 10 deletions vdmj/src/main/java/com/fujitsu/vdmj/plugins/Lifecycle.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ else if (argv.contains("-vdmrt"))

private void usage()
{
List<AnalysisPlugin> plugins = PluginRegistry.getInstance().getPlugins();

println("Usage: VDMJ [-vdmsl | -vdmpp | -vdmrt] [<options>] [<files or dirs>]");
println("-vdmsl: parse files as VDM-SL (default)");
println("-vdmpp: parse files as VDM++");
Expand All @@ -161,10 +159,7 @@ private void usage()
println("-q: suppress information messages");
println("-verbose: display detailed startup information");

for (AnalysisPlugin plugin: plugins)
{
plugin.usage();
}
PluginRegistry.getInstance().usage();

System.exit(0);
}
Expand Down Expand Up @@ -268,10 +263,7 @@ protected void processArgs()
}
}

for (AnalysisPlugin plugin: PluginRegistry.getInstance().getPlugins())
{
plugin.processArgs(argv); // In priority order
}
PluginRegistry.getInstance().processArgs(argv); // In priority order
}

protected void loadPlugins()
Expand Down
16 changes: 16 additions & 0 deletions vdmj/src/main/java/com/fujitsu/vdmj/plugins/PluginRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,22 @@ public List<AnalysisPlugin> getPlugins()
return sorted;
}

public void usage()
{
for (AnalysisPlugin plugin: getPlugins())
{
plugin.usage();
}
}

public void processArgs(List<String> argv)
{
for (AnalysisPlugin plugin: getPlugins())
{
plugin.processArgs(argv); // In priority order
}
}

public AnalysisCommand getCommand(String line)
{
String[] argv = line.split("\\s+");
Expand Down

0 comments on commit bf27f29

Please sign in to comment.