Menu

#2 Mapping questions

open
None
5
2010-04-12
2010-04-09
DM192
No

Hi Alex,

When we add a mapping for an entity where the translator already has its own mapping, how are the two mappings combined?

If the new mapping overlays the old, is there a way to say that all the original mappings are to be ignored?

Is there a way to map the uses of an annotation, eg @MyAnno("value") ?

Many thanks /Dave

Discussion

  • Alexandre FAU

    Alexandre FAU - 2010-04-12

    Hi,

    I made many changes with the last version but your mapping "must" override the existing one.

     
  • Alexandre FAU

    Alexandre FAU - 2010-04-12
    • assigned_to: nobody --> alexandrefau
     
  • DM192

    DM192 - 2010-04-12

    Hi Alex,

    So if mappings for MyClass, methods a, b and c are defined in the base translator,
    And then we define mapping MyClass, method b the mappings for a and c are removed,
    correct?

    Is there a way to map uses of java annotations, such as @MyAnno(":value") ??

    Thanks /Dave

     
  • Alexandre FAU

    Alexandre FAU - 2010-04-12

    "Normally", you keep the old mappings.

    No annotation but you can put mapping in comments for class/method/field

     
  • DM192

    DM192 - 2010-04-12

    Ah! So in the normal case my example would have a new mapping for b and still use old mapping for a and c. Are there ways to change this normal behaviour ??

    For annotation, do you mean something like /* insert_here:[CSharpAttribute("value")] */ before the class/method/field ??

    /D

     
  • Alexandre FAU

    Alexandre FAU - 2010-04-12

    Arggg . I work a lot to repair that behavior and you ask me to not have it :-)
    So your need is to "remove" an existing mapping isn't it ? If yes it could be possible. Can you register a "wish" (feature request) for that ?

    My fault I misunderstand you about annotation stuff.
    You want a full support (definition and call) for annotation or add a new annotation usage to a field/class/method ?

    @

     
  • Alexandre FAU

    Alexandre FAU - 2010-04-12
    • labels: 1074659 -->
     
  • DM192

    DM192 - 2010-04-12

    My first interest was to understand how overlaid mappings work, not alter your excellent work.
    In many cases the way things work today are what is required, but I can imagine that completely replacing a whole class mapping might be useful in some cases.
    I will add a wish request.

    I guess I was trying to see how close we could come to mapping existng jave annotation implementations into C# attributes, so full support for definition and call. But being able to map just the calls would get the largest part of the work done.

    Many thanks /D

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.