Ticket #11 (closed enhancement: wontfix)

Opened 4 years ago

Last modified 21 months ago

otj may provide callin field bindings

Reported by: AndreasWerner Owned by: stephan
Priority: major Milestone:
Component: language Version:
Keywords: Cc:

Description

The feature of binding a role method to a base field for a callin (replace) binding can be of great value, when using OT/J for adaptation. So, for example in the Eclipse GMF there are a some classes, that are using public constants as their identities. The usage of these constants can be wide spread over lots of classes. Currently the only way to adapt the identity is to replace all calling methods of the identity constant, which may result in a huge amount of work.

Change History

Changed 4 years ago by stephan

  • component changed from compiler to language

Unfortunately, this feature cannot easily be implemented in the near future, since it requires a new strategy for byte code weaving.

Still, I'd like to ask to questions:

1. What kind of constants are these? String? int? In both cases it could well be that the compiler inlines the constants so within the byte-code it's impossible to find references to the constant.

2. Can you explain in simple words why the identity of a class should be adapted? Why should the value of the constant matters if it is just consistently used throughout the application?

Changed 4 years ago by stephan

Set milestone to OTDT_2.0.0 to put this issue on our long-term radar.

Changed 4 years ago by stephan

  • milestone set to OTDT_2.0.0

Changed 4 years ago by AndreasWerner

Regarding question: 1. In fact both String and integer constants may occur. (Of course, constants with the same semantic meaning have the same type!)

2. A GMF generated graphical editor plugin makes use of the well-known MVC pattern. But a controller component is here called EditPart. This EditParts are organized in a tree structure, specifically one EditPart may contain several other (child-) EditParts and is itself contained in one (parent-) EditPart. There is always one topmost EditPart (representing the diagram), which has a MODEL_ID. This MODEL_ID is used in other classes (factories, registries, etc.) to decide whether an EditPart can be contained in the topmost EditPart. If one wants to adapt (via OT/J) a GMF plugin in order to add new children - that may originate from another generated plugin - to the topmost EditPart of that plugin, he has to make sure that the MODEL_ID of both GMF generated plugins are identical. This condition is obviously not met by default.

Hope this was short enough and clear though.

Changed 21 months ago by stephan

  • status changed from new to closed
  • resolution set to wontfix
  • milestone OTDT_2.0.0 deleted

Not now, we don't (yet) have the infrastructure to weave into all clients accessing a given field.

Note: See TracTickets for help on using tickets.