Gerard Murphy Posted April 17, 2014 Report Share Posted April 17, 2014 Hi, I'm thinking about the feasibility of implementing an external parser for Semantic Merge for F# - this *might* handle code that defines anonymous functions. Looking at the container definition in the description of the generated YAML file, is it absolutely necessary to populate the 'name' attribute - or can the core Semantic Merge engine work with anonymous containers? My guess is that it can, because the names can change for a construct between files due to renaming, but I'd like to check first.... Regards, Gerard Link to comment Share on other sites More sharing options...
miryamgsm Posted May 6, 2014 Report Share Posted May 6, 2014 Hi Gerard, It sounds good! The name of the declaration (container or terminal node) is required but you can set a default value. SemanticMerge uses this field for two purposes: * identify the declaration and show it on GUI. * improve the matching declaration process; it tries to match declarations with the same name (of course, they must be the same type), otherwise it tries by similitude. In other words, when you specify the name of the declarations you make the matching process easier but this is not always possible. Please, write us if you need a trial license for the external languages Best regards, Míryam Link to comment Share on other sites More sharing options...
Gerard Murphy Posted May 6, 2014 Author Report Share Posted May 6, 2014 Hi Míryam, OK - I'll see if I can use the function arguments as a substitute for the name: so for "(fun x y -> .........)", the name would be "fun x y", likewise "(function (x, y) -> .....)" becomes "function (x, y)". This help match up refactorings that move anonymous functions. If there's a problem with whitespace in the name, I'll think of a workaround or perhaps just fall back to stating 'anonymous function' as a name. Thank you for the trial license offer - I've got a fully paid license for Semantic Merge for C#, I'm not sure what will happen if I'm implementing an F# plugin myself. :-) I'll give it a try when I've got something ready to test and I'll be in touch if I need an additional generic license. Kind Regards, Gerard Link to comment Share on other sites More sharing options...
miryamgsm Posted May 12, 2014 Report Share Posted May 12, 2014 Perfect! Regarding the license, you need a specific license for external language if you want to save the result file. Please do not hesitate to contact us for anything you may need. Best regards, Míryam Link to comment Share on other sites More sharing options...
Gerard Murphy Posted August 10, 2014 Author Report Share Posted August 10, 2014 Hi Míryam, Thanks for your help both here and via E-mail: I've managed to get a proof-of-concept going; some screenshots are attached. The source code for the plugin as at GitHub: https://github.com/sageserpent-open/SemanticMergeFSharpPlugin Perhaps some other people would be interested in forking the repository and filling out the support for the F# constructs handled by the plugin, I can see https://plasticscm.uservoice.com/forums/196398-semanticmerge/suggestions/3839730-f-support ? I will write an introduction to the plugin with a view of getting other developers to contribute in the next week or so... Kind Regards, Gerard Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.