mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-21 22:52:22 +00:00
Merge from DG fork (#58)
* Plugin Help Small change to Help system so that plugins under development can more easily display their help * PamModel update Notes on how to add a plugin to the model during the plugin development phase.
This commit is contained in:
parent
eb176a4568
commit
6aefbc124b
@ -6,9 +6,8 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/AdoptOpenJDK 16">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
|
@ -1069,6 +1069,22 @@ final public class PamModel implements PamModelInterface, PamSettings {
|
||||
pluginList.clear();
|
||||
daqList.clear();
|
||||
|
||||
/*
|
||||
* If developing a new PAMPlugin in eclipse, the easiest way to do it is to make a new
|
||||
* Eclipse project for your plugin code. Within that project, copy this PamModel class
|
||||
* and put it into a package with exactly the same name within your new project (i.e. PamModel)
|
||||
* then add a line to the copy of this class to explicitly add the class name of your new
|
||||
* plugin, e.g.
|
||||
pluginList.add(new CollatorPlugin());
|
||||
* The plugin information will then be extracted from the PamPluginInterface in the same way as
|
||||
* it would should it be being used as a real plugin, inclusing help information which will be
|
||||
* added to the PAMGuard help
|
||||
*
|
||||
* When you export the code for your plugin to a jar file, remember to NOT inlcude the copy of
|
||||
* PamModel !
|
||||
*/
|
||||
|
||||
|
||||
// Load up whatever default classloader was used to create this class. Must use the same classloader
|
||||
// for all plugins, or else we will not be able to create proper dependencies between them or be able
|
||||
// to save properties in the psf file. Found this problem because ipiDemo requires the
|
||||
|
@ -376,8 +376,18 @@ public class PamHelp {
|
||||
// set up a URL to point to the helpset file inside the jar
|
||||
try {
|
||||
//URL helpSetLoc = new URL("jar:file:\\C:\\Users\\SCANS\\workspace\\Pamguard_MikeBranch\\plugins\\TestPlugin.jar!/TestPlugin/PluginHelp.hs"); this one worked - passed argument should match
|
||||
URL helpSetLoc = new URL("jar:file:" + File.separator + pluginList.get(i).getJarFile()+"!/"+pluginList.get(i).getHelpSetName());
|
||||
String pluginJar = pluginList.get(i).getJarFile();
|
||||
URL helpSetLoc;
|
||||
if (pluginJar != null) {
|
||||
helpSetLoc = new URL("jar:file:" + File.separator + pluginList.get(i).getJarFile()+"!/"+pluginList.get(i).getHelpSetName());
|
||||
addPluginHelpSet(helpSetLoc);
|
||||
}
|
||||
else {
|
||||
// this used when developing plugins and they are not actually in a jar file yet, rather they
|
||||
// have just been manually added to the list of available plugins.
|
||||
String hsN = pluginList.get(i).getHelpSetName();
|
||||
addHelpSet(hsN);
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Error generating URL for help set " + pluginList.get(i).getHelpSetName());
|
||||
System.err.println(e.getMessage());
|
||||
@ -552,16 +562,16 @@ public class PamHelp {
|
||||
this.helpLocURL = helpLocURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quick main function
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (Exception e) { }
|
||||
PamHelp.getInstance().displayHelp();
|
||||
}
|
||||
// /**
|
||||
// * Quick main function
|
||||
// * @param args
|
||||
// */
|
||||
// public static void main(String[] args) {
|
||||
// try {
|
||||
// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
// } catch (Exception e) { }
|
||||
// PamHelp.getInstance().displayHelp();
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class ClickTrainDetLogging extends SuperDetLogging {
|
||||
|
||||
String classificationData = getClassifierData(ctDataUnit);
|
||||
|
||||
System.out.println("Classifier Save: " + classificationData);
|
||||
// System.out.println("Classifier Save: " + classificationData);
|
||||
|
||||
if (classificationData.length()>0) {
|
||||
//classifiers.setLength(classificationData.length());
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<link href="../../../pamHelpStylesheet.css" type="text/css" rel="STYLESHEET"><title>Click Classification with Frequency Sweep</title></head>
|
||||
<link href="../../../pamHelpStylesheet.css" type="text/css" rel="STYLESHEET">
|
||||
<title>Click Classification with Frequency Sweep</title></head>
|
||||
<body>
|
||||
<h1>Click Detector</h1>
|
||||
<h2>Click Classification With Frequency Sweep</h2>
|
||||
|
Loading…
Reference in New Issue
Block a user