Community
Participate
Working Groups
While working on bug #228913 (mostly item 4), few oddities of generated MetricProvider surfaced. 1. Way too 'runtime' style, rather than 'generated' one. A lot of stuff that is known during codegen is being used as configuration at run-time, rather than generated right away. 2. Flawed API: public getMetrics and getMetricsForTarget methods return private classes. 3. Complicated way to write own java metrics - wrapping into AbstractExpression (and reflective code) for the sake of simplicity of runtime configuration (which is not needed at all as all the information is available at codegen time) 4. Too generic model iteration and handling Lite version should be refactored to reuse most of the functionality of the base template
MetricRulesTest should be updated to include tests for overall diagram calculate methods, not only for specific metrics evaluation.
Few questions that need to be answered: 1. GenDiagramElementTarget allwos only GenNodes - why?, 2. Metrics for semantic elements are being collected for diagram.getElement().eAllContents(), not for actual semantic elements present on diagram (although in many cases these sets may be similar, it's not always the case) 3. GenAuditedMetricTarget#metricValueContext is not in use?
(In reply to comment #2) 4. Is there's need for DISABLED_NO_IMPL_EXCEPTION_LOG? Looks like it's only for the sake of tests.
Tests pending, refactoring itself is done in 2.1.
(In reply to comment #2) >> Few questions that need to be answered: >> 1. GenDiagramElementTarget allwos only GenNodes - why?, [Radek] >Looking back into history, it has been introduced by fixing bug #136701. > The constraint then limits to GenNode only in case of multiple elements only. >"element <> null and element->size() > 1 implies element->forAll(oclIsKindOf(GenNode))" > >So Audits/metrics for class-based link is valid, I suspect it was allowed. >> 2. Metrics for semantic elements are being collected for >> diagram.getElement().eAllContents(), not for actual semantic elements present >> on diagram (although in many cases these sets may be similar, it's not always >> the case) >[Radek] it's rather a bug or perhaps I failed to find a better way at that time. >> 3. GenAuditedMetricTarget#metricValueContext is not in use? >> >[Radek] This looks like obsolete.
ContributionItemProvider is no longer used to contribute MetricsAction, now IEditorActionBarContributor does that, instead.
[GMF Restructure] Bug 319140 : product GMF and component Templates was the original product and component for this bug