|
@@ -15,10 +15,8 @@ import java.util.Timer;
|
|
|
import java.util.TimerTask;
|
|
|
|
|
|
public class MyDaemonInstallationNodeContribution implements InstallationNodeContribution {
|
|
|
- private static final String POPUPTITLE_KEY = "popuptitle";
|
|
|
- private static final String XMLRPC_VARIABLE = "my_daemon";
|
|
|
+ private static final String XMLRPC_VARIABLE = "axis";
|
|
|
private static final String ENABLED_KEY = "enabled";
|
|
|
- private static final String DEFAULT_VALUE = "HelloWorld";
|
|
|
private static final String IP = "ip";
|
|
|
private static final String PORT = "port";
|
|
|
|
|
@@ -122,23 +120,6 @@ public class MyDaemonInstallationNodeContribution implements InstallationNodeCon
|
|
|
}
|
|
|
}, 0, 1000);
|
|
|
|
|
|
-// statusTimer = new Timer(true);
|
|
|
-// statusTimer.schedule(new TimerTask() {
|
|
|
-// @Override
|
|
|
-// public void run() {
|
|
|
-// EventQueue.invokeLater(new Runnable() {
|
|
|
-// @Override
|
|
|
-// public void run() {
|
|
|
-// try {
|
|
|
-// Object res = getDaemonInterface().client.execute("status", new String[]{});
|
|
|
-// refLblStatus.setText("<html>"+res.toString()+"</html>");
|
|
|
-// System.out.println(res);
|
|
|
-// } catch (XmlRpcException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }},0,1000);
|
|
|
}
|
|
|
|
|
|
private void updateUI() {
|
|
@@ -180,27 +161,10 @@ public class MyDaemonInstallationNodeContribution implements InstallationNodeCon
|
|
|
@Override
|
|
|
public void generateScript(ScriptWriter writer) {
|
|
|
writer.assign(XMLRPC_VARIABLE, "rpc_factory(\"xmlrpc\", \"http://"+ getIP()+":"+ getPort()+"\")");
|
|
|
- }
|
|
|
-
|
|
|
- public String getPopupTitle() {
|
|
|
- if (!model.isSet(POPUPTITLE_KEY)) {
|
|
|
- resetToDefaultValue();
|
|
|
- }
|
|
|
- return model.get(POPUPTITLE_KEY, DEFAULT_VALUE);
|
|
|
+ writer.writeChildren();
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void setPopupTitle(String title) {
|
|
|
- if ("".equals(title)) {
|
|
|
- resetToDefaultValue();
|
|
|
- } else {
|
|
|
- model.set(POPUPTITLE_KEY, title);
|
|
|
- // Apply the new setting to the daemon for real-time preview purposes
|
|
|
- // Note this might influence a running program, since the actual state is stored in the daemon.
|
|
|
- setDaemonTitle(title);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
public String getIP() {
|
|
|
return model.get(IP, "127.0.0.1");
|
|
|
}
|
|
@@ -217,12 +181,6 @@ public class MyDaemonInstallationNodeContribution implements InstallationNodeCon
|
|
|
model.set(PORT, ip);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- private void resetToDefaultValue() {
|
|
|
- model.set(POPUPTITLE_KEY, DEFAULT_VALUE);
|
|
|
- setDaemonTitle(DEFAULT_VALUE);
|
|
|
- }
|
|
|
-
|
|
|
private void setDaemonTitle(String title) {
|
|
|
try {
|
|
|
daemonInterface.setTitle(title);
|