Eclipse外文翻译文档格式.docx
- 文档编号:3454245
- 上传时间:2023-05-01
- 格式:DOCX
- 页数:13
- 大小:64.24KB
Eclipse外文翻译文档格式.docx
《Eclipse外文翻译文档格式.docx》由会员分享,可在线阅读,更多相关《Eclipse外文翻译文档格式.docx(13页珍藏版)》请在冰点文库上搜索。
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<
P■・:
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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Eclipse 外文 翻译