transformed Plugin class to Interface with default methods
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<properties>
|
||||
<exec.args>-classpath %classpath ch.psi.pshell.ui.App -p=ch.psi.plugin.TestPlugin</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
<exec.workingdir>../pshell</exec.workingdir>
|
||||
<exec.workingdir>../../pshell</exec.workingdir>
|
||||
|
||||
</properties>
|
||||
</action>
|
||||
@@ -29,7 +29,7 @@
|
||||
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath ch.psi.pshell.ui.App -p=ch.psi.plugin.TestPlugin</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
<jpda.listen>true</jpda.listen>
|
||||
<exec.workingdir>../pshell</exec.workingdir>
|
||||
<exec.workingdir>../../pshell</exec.workingdir>
|
||||
|
||||
</properties>
|
||||
</action>
|
||||
@@ -45,7 +45,7 @@
|
||||
<properties>
|
||||
<exec.args>-classpath %classpath ch.psi.pshell.ui.App -p=ch.psi.plugin.TestPlugin</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
<exec.workingdir>../pshell</exec.workingdir>
|
||||
<exec.workingdir>../../pshell</exec.workingdir>
|
||||
|
||||
</properties>
|
||||
</action>
|
||||
|
||||
@@ -11,14 +11,14 @@ import ch.psi.utils.swing.SwingUtils;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class TestPlugin extends Plugin{
|
||||
public class TestPlugin implements Plugin{
|
||||
MainPanel panel;
|
||||
@Override
|
||||
protected void onStart() {
|
||||
public void onStart() {
|
||||
panel = new MainPanel(){
|
||||
protected void run(String name){
|
||||
try {
|
||||
TestPlugin.this.run(name);
|
||||
TestPlugin.this.runAsync(name);
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showException(panel, ex);
|
||||
}
|
||||
@@ -29,16 +29,16 @@ public class TestPlugin extends Plugin{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
public void onStop() {
|
||||
|
||||
}
|
||||
|
||||
protected void onStateChange(State state, State former){
|
||||
public void onStateChange(State state, State former){
|
||||
panel.setState(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInitialize(int runCount){
|
||||
public void onInitialize(int runCount){
|
||||
panel.setDevice(getDevice("motor"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user