Eclipse外文翻译Word格式.docx
- 文档编号:19511347
- 上传时间:2023-01-07
- 格式:DOCX
- 页数:9
- 大小:276.07KB
Eclipse外文翻译Word格式.docx
《Eclipse外文翻译Word格式.docx》由会员分享,可在线阅读,更多相关《Eclipse外文翻译Word格式.docx(9页珍藏版)》请在冰豆网上搜索。
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.
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,andinterpreterorcompiler.
Figure1showstheuserinterfacedevelopedusingJFC/Swing.Thisfigureshowsthemodularstructureofthespecification.Eachnodeinthegraphcanbeclickedandallowstheinvocationofasyntax,equation,ortermeditor.
Thevarioustypesofeditorsaredecoratedwithdifferentpull-downmenus.Alleditorshavefunctionalitytoinvoketheparser,viewtheparsetreeofthefocusasgraph,andtomovethefocus.Termeditorsmayhavelanguagespecificpull-downmenus.
InordertoachieveastrictseparationbetweencoordinationandcomputationweusetheToolBuscoordinationarchitecture,aprogrammablesoftwarebusbasedonprocessalgebra.Coordinationisexpressedbyaformaldescriptionofthecooperationprotocolbetweencomponentswhilecomputationisexpressedincomponentsthatmaybewritteninanylanguage.Wethusobtaininteroperabilityofheterogeneouscomponentsina(possibly)distributedsystem.Thecomponentsarenotallowedtocommunicatedirectlywitheachother,butonlyviatheToolBus.Thisleadstoarigorousseparationofconcerns.
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).
Implementation
WedescribesomeoftheimplementationdetailsofthecurrentMeta-EnvironmentGUI.InthetargetarchitecturewereplaceboththeJFC/SwingGUIandtheexternaltexteditorsbyEclipseasdescribed.
JFC/Swing-basedimplementation
TheToolBusprincipletoseparatefunctionalityleadstoagenericimplementationoftheuserinterface.TomeettheMeta-Environmentrequirementstheuserinterfaceonlyhastoimplementsomebasicfunctionality.TheJFC/SwingimplementationextendstheMeta-EnvironmentwithaGUIthatsupportsseveralcomponents:
atreepanel,graphpanel,andsomeinformationalpanels.Thetreeandgraphpanelsprovidetheuserwitharepresentationofopenedandimportedmodulesinatextualandgraphicalway,respectively.Statusmessagesandinformationaboutselectedmodulesaredisplayedindedicatedinformationalpanels.EachoftheseGUIelementsisdumb:
itiscapableofpresentingagraphicalrepresentationofitsdataanditcommunicatesevents(e.g.amouseclick)totheToolBus,butitabstractsfromthedetailsoftheseevents.Theactualimplementationofanevent(e.g.performingarefactoringoperationonaselectedmodule)ishandledelsewhereintheMeta-Environment.
TheprovidedbasicframeworkcanbeextendeddynamicallywithuserinterfaceelementsbymeansofToolBusmessagessenttotheuserinterface.Thesemessagescontainthetypeofuserinterfaceelementtobeadded(e.g.menu,tool-barbutton),thecaptiontobedisplayed,andtheactionthathastobeperformedwhenselectingthisuserinterfaceelement.ThissetupensuresthattheuserinterfacedoesnotknowaboutanyfunctionalityimplementedintheMeta-Environment
Texteditingfunctionalityisprovidedbymeansofexternaltexteditorsasdescribedbefore.Ingeneralthechoiceoftexteditorisfreeaslongasitiscapableofaddingmenusandmethodsfordisplayingafocus.AfterconnectionwiththeToolBusisestablisheditwillreceiveitsspecificmenus,menuitems,andcorrespondingactions.
Eclipse-basedimplementation
In
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Eclipse 外文 翻译
![提示](https://static.bdocx.com/images/bang_tan.gif)