Eclipse外文翻译Word格式.docx

上传人:b****5 文档编号:19511347 上传时间:2023-01-07 格式:DOCX 页数:9 大小:276.07KB
下载 相关 举报
Eclipse外文翻译Word格式.docx_第1页
第1页 / 共9页
Eclipse外文翻译Word格式.docx_第2页
第2页 / 共9页
Eclipse外文翻译Word格式.docx_第3页
第3页 / 共9页
Eclipse外文翻译Word格式.docx_第4页
第4页 / 共9页
Eclipse外文翻译Word格式.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

Eclipse外文翻译Word格式.docx

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

Eclipse外文翻译Word格式.docx

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

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

当前位置:首页 > 求职职场 > 自我管理与提升

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1