Eclipse外文翻译.docx

上传人:罗晋 文档编号:11695868 上传时间:2021-08-31 格式:DOCX 页数:16 大小:52.99KB
返回 下载 相关 举报
Eclipse外文翻译.docx_第1页
第1页 / 共16页
Eclipse外文翻译.docx_第2页
第2页 / 共16页
Eclipse外文翻译.docx_第3页
第3页 / 共16页
Eclipse外文翻译.docx_第4页
第4页 / 共16页
Eclipse外文翻译.docx_第5页
第5页 / 共16页
点击查看更多>>
资源描述

《Eclipse外文翻译.docx》由会员分享,可在线阅读,更多相关《Eclipse外文翻译.docx(16页珍藏版)》请在三一文库上搜索。

1、外文原文A Language Development Environment for EclipseA. T. Kookier January 2004IntroductionThe Asf+Sdf Meta-Environment are an interactive development environment with a graphical user interface written in JFC/Swing. A typical session in this environment results in an overwhelming amount of windows pre

2、senting the MetaEnvironment itself next to lots of editors all trying to catch the attention of the user. Although the described scene is a little bit exaggerated the several open windows and JFC/Swing graphical user interface were the reasons to take a look into Eclipse.Eclipse is a framework for c

3、reating programming environments, wherefore currently versions are available for C / C+, java and cobol. Each version addressesa specific programming language with its own set of tools, commands and screen layout. Because Eclipse is a well developed environment the Asf+Sdf Meta-Environment could ben

4、efit from integration with Eclipse. Eclipse offers the possibility to make your own perspective (which is a screen layout) consisting of tree views, editors and other kind of views all in one place.Eclipses on the other side can benefit from the integration with the Meta- Environment, because the Me

5、ta-Environment brings generic language technology to Eclipse. Instead of developing a development environment for each programming language one development environment for the MetaEnvironment is enough to provide tools for every programming language developed in the MetaEnvironment.IntroductionEclip

6、se is an open source framework for creating programming environments.Currently versions exist for C / C+1, java and Cobol2. New tools and languages can be added by writing java applications that perform parsing, type checking and the like for a new language. Eclipse provides a rich set of tools orie

7、nted toward user-interface construction and java compilation. The level of automation for building environments for new languages is, however, low.The Asf+Sdf Meta-Environment are a programming environments generator: given a language definition consisting of a syntax definition (grammar) and tool d

8、escriptions(using rewrite rules) a language specific environment is generated. A language definition typically includes such features as pretty printing, type checking, analysis, transformation and execution of programs in the target language. The Asf+Sdf MetaEnvironment are used to create tools for

9、 domain-specific languages and for the analysis and transformation of software systems. As the Eclipse and Meta-Environment technologies are to a large extent complementary, it is worthwhile to investigate how they can be integrated.Eclipse Plugin TechnologyThe Eclipse Platform is designed for build

10、ing integrated development environments . An IDE can be built by providing the Eclipse Platform with a plugin contributing to an extension point of some other plugin. In fact the Eclipse Platform is a number of plug-in itself. It consists of a small kernel which starts all necessaryplug-in to run a

11、basic instance of the Eclipse Platform. All other functionality is located in plug-in which extend these basic plug-in. In this way Eclipse provides tool providers with a mechanism that leads to seamlessly integrated tools.Eclipses plugin are written in java and consist of a manifest file and java c

12、lasses in a JAR archive. The manifest file declares the extension points of the plugin and which other plugin it extends. On start-up the Eclipse Platform discovers which plug-in are available and it generates a plug-in registry. The plug-in itself is loaded when it actually needs to be run.Meta-Env

13、ironment TechnologyThe Asf+Sdf formalism is used for the definition of syntactic as well as semantic aspects of a language. It can be used for the definition of a range of languages (for programming, writing specifications, querying databases, text processing, or other applications). In addition it

14、can be used for the formal specification of a wide variety of problems. Asf+Sdf can be characterized as a modular, rewriting-based, specification formalism in which syntax and semantics are completely integrated.The Asf+Sdf Meta-Environment is both a programming environment for Asf+Sdf specification

15、s and a programming environment generator which uses an Asf+Sdf specification for some (programming) language L to generate a stand-alone environment for L. The design of the Meta-Environment is based on openness, reuse, and extensibility. The Meta-Environment offers syntax-directed editing of Asf+S

16、dfspecifications as well as compilation of Asf+Sdf specifications into dedicated interactive stand-alone environments containing various tools such as a parser, unparser, syntax-directed editor, debugger, andin terpreter or comp iler.Figurel shows the user in terface devel oped using JFC/Sw ing- Thi

17、s figure shows the modular structure of the sp ecificati on. Each node in the graph can be clicked and allows the inv ocati on of a syn tax, equati on, or term editor.The various types of editors are decorated with different pull-down menus. All editors have function ality to inv oke the p arser, vi

18、ew the p arse tree of the focus as graph, and to move the focus. Term editors may have Ian guage sp ecific pu 11-dow n menus.In order to achieve a strict sep arati on betwee n coord in atio n and compu tati on we use theToolBus coord in ati on architecture, a p rogrammable software bus based on p ro

19、cess algebra.Coord in atio n is exp ressed by a formal descri pti on of the coop erati on p rotocol betwee n components while computation is expressed in components that may be written in any language. We thus obtain interoperability of heterogeneous components in a (possibly) distributed system. Th

20、e components are not allowed to com muni cate directly with each other, but on ly via the ToolBus This leads to a rigorous sep arati on of concerns.ARCfJ/KCR flAL CUV 迎 EIMTM 网 ftrjr* xfl r5 口: r.* I -3 Vr-4U0U 4,一fta ! / T 3 . 1 57,( FI丽. J rvt 】卅 it *ndlQa bA r rJ I -iir .IdJ ILK : U ,.1 M*iT i -

21、nr J a x -t ix to : -x7八、x- 1】r it ; t: i u : :计 Fi i i 9 1 The VIptjvKnf|fvininprt 611 1Architectural considerationsThe MetaEnvironment consists of about 20 cooperating components, including a parse table generator, a parser and unparser, a term store (for caching results), and an interpreter and c

22、ompiler. Also, a graphical user interface and a number of text editors (such as GNU Emacs3 and Vim4) as well as a structure editor are connected to the MetaEnvironment. These allow user interaction with the system, and in particular allow users to edit syntax, equations and terms.Figure2 is a (simpl

23、ified) view showing these components connected to the ToolBus Current architecture: using JFC/Swing and external editors. Figure 2 shows the current implementation with separate components for the GUI and the various text editors. Currently, the GUI is implemented in JFC/Swing.Each time a text editi

24、ng session is requested by the user, a new instance of one of the supported system editors is executed to take care of the editing session. These text editors need only implement a minimal interface to be usable by the Meta-Environment. Some form of operating system level communication channel is ne

25、eded (e. g. socket, pipe). The editor then needs to be able to receive and execute commands to add a menu to the menu-bar, set the cursor at a specific location, and highlight or select a region of text.Target architecture: using Eclipse for both GUI and editors. Eclipse exports many GUI features th

26、at can be used to write plug-in and also has a built-in editor which implements the required Meta-Environment text editor interface. From an Eclipse point of view, it is interesting to be able to reuse the generic language technology offered by the MetaEnvironment. From the Meta-Environment point of

27、 view, it would be interesting to see if Eclipse could be used to implement the GUI and the text editors (the dotted rectangle in Figure 2). From a ToolBus point of view, it is interesting to see how a single tool (Eclipse in this case) can serve as the implementation of multiple components (both GU

28、I and text editor).HIP ”护 2.J A/W -即 V VLA /林M A OP”:Meta TooIBlisFtlirs*TonlHuFigure 2-2j Ardihnc-T. um of tlv? Mel-ft Hnviroiinintir nImp leme ntati onWe describe some of the implementation details of the current Meta-Environment GUI In the target architecture we rep lace both the JFC/Swi ng GUI a

29、nd the exter nal text editors by Ecli pse as described.JFC/Sw in g-based imp leme ntati onThe ToolBus prin ci pie to sep arate fun ctio nality leads to a gen eric imp leme ntati on of the user in terface. To meet the Meta-E nviro nment requireme nts the user in terface on ly has to implement some ba

30、sic functionality. The JFC/Swing implementation extends the Meta-E nvir onment with a GUI that supp orts several componen ts: a tree pan el, graph pan el, and some in formati onal pan els. The tree and graph pan els pro vide the user with a rep rese ntati on of opened and imp orted modules in a text

31、ual and grap hical way, res pectively. Status messages and in formatio n about selected modules are dis played in dedicated in formati onal pan els. Each of these GUI eleme nts is dumb: it is cap able of p rese nting a grap hical rep rese ntati on of its data and it com muni cates eve nts (e. g. a m

32、ouse click) to the ToolBus, but it abstracts from the details of these events. The actual implementation of an eve nt (e.g. p erform ing a refactori ng op erati on on a selected module) is han died elsewhere in the Meta-E nviro nment.The pro vided basic framework can be exte nded dyn amically with u

33、ser in terface eleme nts by means of ToolBus messages sent to the user in terface. These messages contain the type of user in terface eleme nt to be added (e. g. menu, tool-bar butt on), the cap tio n to be dis played, and the action that has to be p erformed whe n select ing this user in terface el

34、eme nt. This set up en sures that the user in terface does notknow about any function ality imp leme nted in theMeta-EnvironmentText editing functionality is provided by means of external text editors as described before. In general the choice of text editor is free as long as it is capable of addin

35、g menus and methods for displaying a focus. After connection with the ToolBus is established it will receive its specific menus, menu items, and corresponding actions.Eclipse-based implementationIn order to use Eclipse for the implementation of the Meta-Environment GUI and text editor, we adapt the

36、Meta-Environment architecture .In a ToolBus setting external tools (such as a GUI and text editor) are rigorously separated components which never directly communicate with each other, but always do so via the ToolBus. In order to connect Eclipse (a single operating system level component) to the Me

37、ta-Environment, we use a second ToolBus which acts as a proxy between the Meta-Environment on one side, and the actual implementations of the GUI and text editor in Eclipse on the other. This second ToolBus, together with two instances of a transparent stub(one for the GUI and one for the text edito

38、r) takes care of any (de-)marshalling and forwarding from the MetaEnvironment to Eclipse and back.The Eclipse Meta plugin is implemented as an Eclipse perspective, containing extensions of an explorer (to display the modules), several views (e.g. to display status messages) and instances of an exten

39、sion of the built-in editor. The perspective itself takes care of setting up a connection to the ToolBus before instantiating the other Eclipse view parts which receive their operational details from the ToolBus.ConclusionsThe main contributions of this work are as follows: _ A proof-of-concept conn

40、ection between Eclipse and the Meta-Environment: this extends Eclipse with language definition tools and extends the Meta-Environment with richer user-interface functionality._ The ToolBus provides a general mechanism for connecting non-java tools to Eclipse._ We have pinpointed several issues of po

41、ssible improvement in both systems. The presented Eclipse Meta Plug-in consists of a user interface and text editing capabilities as already provided by the JFC/Swing Meta-Environment. Through the Eclipse user interface, all generators of the Meta-Environment are available. We plan to work on extend

42、ing each system by integrating functionality from the other one. On the one hand,Eclipse provides functionality for on-line help, documentation and error reporting. All these can be borrowed by the Asf+Sdf Meta-Environment.On the other hand, we are currently integrating the Meta-Environment, s graph

43、 viewer into Eclipse. Other useful functionality is APIGEN which generate application program interfaces in C and java from a grammar definition. This might make Eclipse further open for non-java tools. The integration experiment we described in this paper shows that the combination Eclipse/Asf+Sdf

44、Meta-Environment creates a versatile experimentation platform for programming language research.外文翻译一种语言开发环境一EclipseAsf+Sdf Meta环境是一种交互式的开发环境,其中包括用JFC/Swing编写的图形用户界面。 这个环境里的主要的部分中,很多窗口是用Meta环境呈现,Meta环境自身所包含的几乎所有的编辑器都能够引起用户的注意力。尽管被描述的场景有一点点夸张,但是若干 开放式的窗口和JFC/Swing图形用户界面是构成Eclipse的主要部分。Eclipse是用于创建编程环

45、境的一个框架,因此当前版本对于 C/C+, java , cobol 是现成可用的。每个版本都采用一种特殊的编程语言,其中包括它自身的一组工具、命 令和页面 布局,Eclipse是一*种很好的开发环境,合,可以使 Asf+Sdf Meta环境与Eclipse的结 用Eclipse提供的功能,如:用Eclipse创建树型观 察窗口、编辑器和其他 种观察窗口组成的视图(是一个页面布局)。Eclipse在另一方面也受益于与Meta环境的结合,因为Meta环境提供给Eclipse 一种特殊 的语言技术,不用为每一个编程语言而专门开发它对应的开发环境,Meta环境为每个在该环境中 开发的语言提供了充足的

46、开发工具。 介绍Eclipse是一个开放源代码的框架结构,用其来创建编程环境。当前的版本存在于C/C+, JAVA和COBOL中。新的工具和语言能被添加到编写JAVA的应用程序中,它们 为新的语言来完成 编译、类型语法检查等等任务。Eclipse提供一组面向用户界面结构 和JAVA应用程序的工具。 但是对于新的语言来说,建立环境的自动化水平是相当低的。Asf+Sdf Meta环境是一种编程环境发生器,一个语言的定义是由语法定义(语法)和工具 描述(使用重写规则)组成,一种语言的具体环境可以被产生,因为一种语言的定义通常包括诸 如以下的特点:漂亮的格式、类型检查、分析、编译以及在目标语言中程序的

47、执行,Asf+Sdf Meta环境是适用于特定域的语言及其分析等功能。由于Eclipse和Meta环境技术在相当大的程度上实现互补,探讨它们是如何能够被结合起来的是有意义的。 Eclipse插件技术Eclipse平台是专为构建集成开发环境而设计。IDE通过提供插件给Eclipse平台而被构 建起来,其有助于建立其他一些插件的扩展。实际上Eclipse平台是大量的插件:插件是由一 些基本功能任务组成的,Eclipse开启所有必要的插件来运行一个基本的Eclipse平台实例。所 有其他功能是设在插件中,其用来扩展这些基本插件。这样Eclipse提供一种机制,形成无缝 集成的工具。Eclipse插件

48、被编写在JAVA中,并由一个明显的文件和JAVA类嵌入到在JAR文档中,并声 明插件的接口和其他插件的扩展。对于刚启动的Eclipse平台发现其中插件是现成可使用的,并 产生一个插件注册。插件本身当它实际需要被运行时才被装载。Meta环境技术Asf+Sdf被用于语法的定义以及一个语言的语义方面。它可以用来定义一系列的语言(编 程,写作规格,查询数据库,文字处理,或其他应用程序)。此外,它还可以用于标准规格的各种各样的问题。这里Asf+Sdf可以被定义为一个模块化的、基于重写的规范形 式,其中的语法和语义是完全融为一体的。Asf+Sdf环境既是一种适用于Asf+Sdf规格的编程环境,又是一个适用

49、于一些(编 程)语言 L的编程环境发生器。设计的Meta环境是基于公开,公平,可重用及可扩展 的。Meta环境提供 Asf+Sdf规格的语法指导编辑,并在专属交互式的独立环境中对Asf+Sdf规格的编辑,其里面包含 各种工具如一个解析器和整合器、语法指导编辑器、调试器、翻译器或编译器。图1显示用户界面开发应用了 JFC/SWING在图1中显示了模块化结构规格要求。每个在图形 上的节点可以被选中,并允许调用语法、等式、或者术语编辑器。各种类型的编辑器有配置不同的下拉菜单。所有编辑可以在功能上调用解析器,查 看一个图 的分析树焦点,并移动焦点。文本编辑器可以有语言具体下拉菜单。为了在协调和计算之间实现严格区分,我们使用工具来协调架构,这是一种可编程基于过程 代数软件工具,在构件

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1