Skip to content

Commit e432998

Browse files
committed
core changes required for UX Analytics plugin
Docstring, remove unused imports re-add imports which were necessary at compile time
1 parent 84da2a3 commit e432998

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

app/display/representation/src/main/java/org/csstudio/display/builder/representation/ToolkitListener.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public interface ToolkitListener
4545
*/
4646
default public void handleWrite(Widget widget, Object value) {};
4747

48+
/**
49+
* A method was called from the UI that other listeners might be interested in.
50+
* @param user_args Zero or more objects relevant to what was called.
51+
* Case-specific Implementations should expect and check these.
52+
*/
4853
default public void handleMethodCalled(Object... user_args) {};
4954

5055
}

app/display/runtime/src/main/java/org/csstudio/display/builder/runtime/app/DisplayRuntimeInstance.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212

1313
import java.awt.geom.Rectangle2D;
14+
import java.util.ArrayList;
1415
import java.util.Objects;
1516
import java.util.Optional;
1617
import java.util.concurrent.Callable;
@@ -286,9 +287,12 @@ public DisplayInfo getDisplayInfo()
286287
*/
287288
public void loadDisplayFile(final DisplayInfo info)
288289
{
290+
DisplayInfo old_info = display_info.orElse(null);
289291
// If already executing another display, shut it down
290292
disposeModel();
291293

294+
ArrayList<DisplayInfo> dst_src = new ArrayList<>();
295+
292296
// Set input ASAP so that other requests to open this
293297
// resource will find this instance and not start
294298
// another instance
@@ -324,7 +328,9 @@ public void loadDisplayFile(final DisplayInfo info)
324328
{
325329
representation.awaitRepresentation(30, TimeUnit.SECONDS);
326330
representation_init.run();
327-
representation.fireMethodCall(info, applicationThreadStackTrace);
331+
dst_src.add(info);
332+
dst_src.add(old_info);
333+
representation.fireMethodCall(dst_src, applicationThreadStackTrace);
328334
logger.log(Level.FINE, "Done with representing model of " + info.getPath());
329335
}
330336
catch (TimeoutException | InterruptedException ex)

0 commit comments

Comments
 (0)