首页> 外文会议>European conference on object-oriented programming >Java_(UI): Effects for Controlling UI Object Access
【24h】

Java_(UI): Effects for Controlling UI Object Access

机译:Java_(UI):控制UI对象访问的效果

获取原文

摘要

Most graphical user interface (GUI) libraries forbid accessing UI elements from threads other than the UI event loop thread. Violating this requirement leads to a program crash or an inconsistent UI. Unfortunately, such errors are all too common in GUI programs. We present a polymorphic type and effect system that prevents non-UI threads from accessing UI objects or invoking UI-thread-only methods. The type system still permits non-UI threads to hold and pass references to UI objects. We implemented this type system for Java and annotated 8 Java programs (over 140KLOC) for the type system, including several of the most popular Eclipse plugins. We confirmed bugs found by unsound prior work, found an additional bug and code smells, and demonstrated that the annotation burden is low. We also describe code patterns our effect system handles less gracefully or not at all, which we believe offers lessons for those applying other effect systems to existing code.
机译:大多数图形用户界面(GUI)库都禁止从UI事件循环线程以外的线程访问UI元素。违反此要求会导致程序崩溃或UI不一致。不幸的是,这样的错误在GUI程序中太普遍了。我们提出了一种多态类型和效果系统,该系统可防止非UI线程访问UI对象或调用仅UI线程的方法。类型系统仍然允许非UI线程保存和传递对UI对象的引用。我们为Java实现了这种类型的系统,并为该类型系统注释了8个Java程序(超过140KLOC),其中包括几个最受欢迎的Eclipse插件。我们确认了不完善的先前工作中发现的错误,发现了其他错误和代码味道,并证明注释负担很低。我们还描述了效果系统处理得不太好或根本不处理的代码模式,我们认为这为那些将其他效果系统应用于现有代码的人提供了经验教训。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号