Eclipse外文翻译.docx

上传人:b****2 文档编号:1818163 上传时间:2023-05-01 格式:DOCX 页数:13 大小:64.24KB
下载 相关 举报
Eclipse外文翻译.docx_第1页
第1页 / 共13页
Eclipse外文翻译.docx_第2页
第2页 / 共13页
Eclipse外文翻译.docx_第3页
第3页 / 共13页
Eclipse外文翻译.docx_第4页
第4页 / 共13页
Eclipse外文翻译.docx_第5页
第5页 / 共13页
Eclipse外文翻译.docx_第6页
第6页 / 共13页
Eclipse外文翻译.docx_第7页
第7页 / 共13页
Eclipse外文翻译.docx_第8页
第8页 / 共13页
Eclipse外文翻译.docx_第9页
第9页 / 共13页
Eclipse外文翻译.docx_第10页
第10页 / 共13页
Eclipse外文翻译.docx_第11页
第11页 / 共13页
Eclipse外文翻译.docx_第12页
第12页 / 共13页
Eclipse外文翻译.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

Eclipse外文翻译.docx

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

Eclipse外文翻译.docx

Eclipse外文翻译

外文原文

ALanguageDevelopmentEnvironmentforEclipse

A.T.KookierJanuary2004

Introduction

TheAsf+SdfMeta-EnvironmentareaninteractivedevelopmentenvironmentwithagraphicaluserinterfacewritteninJFC/Swing.AtypicalsessioninthisenvironmentresultsinanoverwhelmingamountofwindowspresentingtheMeta-Environmentitselfnexttolotsofeditorsalltryingtocatchtheattentionoftheuser.AlthoughthedescribedsceneisalittlebitexaggeratedtheseveralopenwindowsandJFC/SwinggraphicaluserinterfacewerethereasonstotakealookintoEclipse.

Eclipseisaframeworkforcreatingprogrammingenvironments,whereforecurrentlyversionsareavailableforC/C++,javaandcobol.Eachversionaddressesaspecificprogramminglanguagewithitsownsetoftools,commandsandscreenlayout.BecauseEclipseisawelldevelopedenvironmenttheAsf+SdfMeta-EnvironmentcouldbenefitfromintegrationwithEclipse.Eclipseoffersthepossibilitytomakeyourownperspective(whichisascreenlayout)consistingoftreeviews,editorsandotherkindofviewsallinoneplace.

EclipsesontheothersidecanbenefitfromtheintegrationwiththeMeta-Environment,becausetheMeta-EnvironmentbringsgenericlanguagetechnologytoEclipse.InsteadofdevelopingadevelopmentenvironmentforeachprogramminglanguageonedevelopmentenvironmentfortheMeta-EnvironmentisenoughtoprovidetoolsforeveryprogramminglanguagedevelopedintheMeta-Environment.

Introduction

Eclipseisanopensourceframeworkforcreatingprogrammingenvironments.CurrentlyversionsexistforC/C++1,javaandCobol2.Newtoolsandlanguagescanbeaddedbywritingjavaapplicationsthatperformparsing,typecheckingandthelikeforanewlanguage.Eclipseprovidesarichsetoftoolsorientedtowarduser-interfaceconstructionandjavacompilation.Thelevelofautomationforbuildingenvironmentsfornewlanguagesis,however,low.

TheAsf+SdfMeta-Environmentareaprogrammingenvironmentsgenerator:

givenalanguagedefinitionconsistingofasyntaxdefinition(grammar)andtooldescriptions(usingrewriterules)alanguagespecificenvironmentisgenerated.Alanguagedefinitiontypicallyincludessuchfeaturesasprettyprinting,typechecking,analysis,transformationandexecutionofprogramsinthetargetlanguage.TheAsf+SdfMeta-Environmentareusedtocreatetoolsfordomain-specificlanguagesandfortheanalysisandtransformationofsoftwaresystems.AstheEclipseandMeta-Environmenttechnologiesaretoalargeextentcomplementary,itisworthwhiletoinvestigatehowtheycanbeintegrated.

EclipsePluginTechnology

TheEclipsePlatformisdesignedforbuildingintegrateddevelopmentenvironments.AnIDEcanbebuiltbyprovidingtheEclipsePlatformwithaplugincontributingtoanextensionpointofsomeotherplugin.InfacttheEclipsePlatformisanumberofplug-initself.Itconsistsofasmallkernelwhichstartsallnecessaryplug-intorunabasicinstanceoftheEclipsePlatform.Allotherfunctionalityislocatedinplug-inwhichextendthesebasicplug-in.InthiswayEclipseprovidestoolproviderswithamechanismthatleadstoseamlesslyintegratedtools.

EclipsespluginarewritteninjavaandconsistofamanifestfileandjavaclassesinaJARarchive.Themanifestfiledeclarestheextensionpointsofthepluginandwhichotherpluginitextends.Onstart-uptheEclipsePlatformdiscoverswhichplug-inareavailableanditgeneratesaplug-inregistry.Theplug-initselfisloadedwhenitactuallyneedstoberun.

Meta-EnvironmentTechnology

TheAsf+Sdfformalismisusedforthedefinitionofsyntacticaswellassemanticaspectsofalanguage.Itcanbeusedforthedefinitionofarangeoflanguages(forprogramming,writingspecifications,queryingdatabases,textprocessing,orotherapplications).Inadditionitcanbeusedfortheformalspecificationofawidevarietyofproblems.Asf+Sdfcanbecharacterizedasamodular,rewriting-based,specificationformalisminwhichsyntaxandsemanticsarecompletelyintegrated.

TheAsf+SdfMeta-EnvironmentisbothaprogrammingenvironmentforAsf+SdfspecificationsandaprogrammingenvironmentgeneratorwhichusesanAsf+Sdfspecificationforsome(programming)languageLtogenerateastand-aloneenvironmentforL.ThedesignoftheMeta-Environmentisbasedonopenness,reuse,andextensibility.TheMeta-Environmentofferssyntax-directededitingofAsf+SdfspecificationsaswellascompilationofAsf+Sdfspecificationsintodedicatedinteractivestand-aloneenvironmentscontainingvarioustoolssuchasaparser,unparser,syntax-directededitor,debugger,and

interpreterorcompiler.

FigurelshowstheuserinterfacedevelopedusingJFC/Swing.Thisfigureshowsthemodularstructureofthespecification.Eachnodeinthegraphcanbeclickedandallowstheinvocationofasyntax,equation,ortermeditor.

Thevarioustypesofeditorsaredecoratedwithdifferentpull-downmenus.Alleditorshavefunctionalitytoinvoketheparser,viewtheparsetreeofthefocusasgraph,andtomovethefocus.TermeditorsmayhaveIanguagespecificpull-downmenus.

Inordertoachieveastrictseparationbetweencoordinationandcomputationweusethe

ToolBuscoordinationarchitecture,aprogrammablesoftwarebusbasedonprocessalgebra.

Coordinationisexpressedbyaformaldescriptionofthecooperationprotocolbetweencomponentswhilecomputationisexpressedincomponentsthatmaybewritteninany

Ianguage.Wethusobtaininteroperabilityofheterogeneouscomponentsina(possibly)distributedsystem.Thecomponentsarenotallowedtocommunicatedirectlywitheachother,butonlyviatheToolBus.Thisleadstoarigorousseparationofconcerns.

22ARCfJ/KCRflALCUV迎EIMTM网

■frrJrd"I■■■rj.Hrb-Hi4

■J--

Ipr.'1一-I■V

hr3|_|■i・;G25(■nyr

ndlQa妆*直芒bA占」rSj.-'

4UOU4®―-ftaT»*^f

—rt"■■all■,■-LI.

+如■zir!

咗:

--■l・-

IL^r汁:

「4厂“I•t~

 

ih

JMlX:

Il'.-1If'iTq',■

—wii虚

"I(--11-tIMI"a-rIrInI-I

"itL-hI■-Ilb-Iajii-■aI

H

I1i

■■'ll'll•:

1Id■:

I廿"WuritI'-f■I■1'

HF

■bl

二亠二匸I•■聲&皑•w二"j—GLTOBJ・

ht

Architecturalconsiderations

TheMeta-Environmentconsistsofabout20cooperatingcomponents,includingaparsetablegenerator,aparserandunparser,atermstore(forcachingresults),andaninterpreterandcompiler.Also,agraphicaluserinterfaceandanumberoftexteditors(suchasGNUEmacs3andVim4)aswellasastructureeditorareconnectedtotheMeta-Environment.Theseallowuserinteractionwiththesystem,andinparticularallowuserstoeditsyntax,equationsandterms.

Figure2isa(simplified)viewshowingthesecomponentsconnectedtotheToolBusCurrentarchitecture:

usingJFC/Swingandexternaleditors.Figure2showsthecurrentimplementationwithseparatecomponentsfortheGUIandthevarioustexteditors.Currently,theGUIisimplementedinJFC/Swing.

Eachtimeatexteditingsessionisrequestedbytheuser,anewinstanceofoneofthesupportedsystemeditorsisexecutedtotakecareoftheeditingsession.ThesetexteditorsneedonlyimplementaminimalinterfacetobeusablebytheMeta-Environment.Someformofoperatingsystemlevelcommunicationchannelisneeded(e.g.socket,pipe).Theeditorthenneedstobeabletoreceiveandexecutecommandstoaddamenutothemenu-bar,setthecursorataspecificlocation,andhighlightorselectaregionoftext.

Targetarchitecture:

usingEclipseforbothGUIandeditors.EclipseexportsmanyGUIfeaturesthatcanbeusedtowriteplug-inandalsohasabuilt-ineditorwhichimplementstherequiredMeta-Environmenttexteditorinterface.FromanEclipsepointofview,itisinterestingtobeabletoreusethegenericlanguagetechnologyofferedbytheMeta-Environment.FromtheMeta-Environmentpointofview,itwouldbeinterestingtoseeifEclipsecouldbeusedtoimplementtheGUIandthetexteditors(thedottedrectangleinFigure2).FromaToolBuspointofview,itisinterestingtoseehowasingletool(Eclipseinthiscase)canserveastheimplementationofmultiplecomponents(bothGUIandtexteditor).

Unpnrtsr

HIP"护2.ny-JA/VV^RHVVLA/林M卜OP":

PArSrr

Gcnerflirr-r

imorDroitr

MetaTooIBlis

SIR諭IS

丁&斑Edllsj-

TfrrjSitiTH

BB

LEJOf

Ftlirs*

Figure2-2jArdihnc-T.umoftlv?

Mel-ftHnviroiinintirnTonlHu

Implementation

WedescribesomeoftheimplementationdetailsofthecurrentMeta-EnvironmentGUI.InthetargetarchitecturewereplaceboththeJFC/SwingGUIandtheexternaltexteditorsbyEclipseasdescribed.

JFC/Swing-basedimplementation

TheToolBusprincipietoseparatefunctionalityleadstoagenericimplementationoftheuserinterface.TomeettheMeta-Environmentrequirementstheuserinterfaceonlyhastoimplementsomebasicfunctionality.TheJFC/SwingimplementationextendstheMeta-EnvironmentwithaGUIthatsupportsseveralcomponents:

atreepanel,graphpanel,andsomeinformationalpanels.Thetreeandgraphpanelsprovidetheuserwitharepresentationofopenedandimportedmodulesinatextualandgraphicalway,respectively.Statusmessagesandinformationaboutselectedmodulesaredisplayedindedicatedinformationalpanels.EachoftheseGUIelementsisdumb:

itiscapableofpresentingagraphicalrepresentationofitsdataanditcommunicatesevents(e.g.amouseclick)totheToolBus,butitabstractsfromthedetailsoftheseevents.Theactualimplementationofanevent(e.g.performingarefactoringoperationonaselectedmodule)ishandledelsewhereintheMeta-Environment.

Theprovidedbasicframeworkcanbeextendeddynamic

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

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2