Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EMF Compare/Specifications/EnhanceReadabilityOfTheStructuralDifferences"

Line 51: Line 51:
 
</source>
 
</source>
 
** /src/org/eclipse/emf/compare/provider/utils/IStyledString.java
 
** /src/org/eclipse/emf/compare/provider/utils/IStyledString.java
** /src/org/eclipse/emf/compare/provider/utils/ComposedStyledString.java
 
 
<source lang="java">
 
<source lang="java">
 
public interface IStyledString {
 
public interface IStyledString {

Revision as of 13:11, 28 January 2013

Evolution Specification: Enhance readability of the structural differences

Current status is DRAFT

Preamble

The difference labels displayed in the structure merge viewer can be quite difficult to read and understand.

_Relevant tickets_ (links to the Bugzilla tickets which are related to the change):

Introduction

Add some styling to these label to more easily identify:

  • if the difference is local or remote,
  • the difference kind (addition, change, deletion, move),
  • the structural feature affected by the change,
  • the label of the element that has changed.

For this purpose, styled texts will be used in the label provider.

Detailed Specification

Here is the new version of the labels:

alt Styled Labels

On each node, the data displayed are: object_name [property_affected type_of_difference]

  • The object name: the object concerned by the difference (e.g. class, attribute, reference...)
  • The property affected: the property of the object concerned by the difference.
  • The type of difference: the type of difference found on the property affected (e.g. add, remove, delete, set, unset, move or change)

Backward Compatibility and Migration Paths

Metamodel Changes

This evolution doesn't change the metamodel.

API Changes

  • New interfaces:
  • org.eclipse.emf.compare.edit
    • /src/org/eclipse/emf/compare/provider/IItemStyledLabelProvider.java
public interface IItemStyledLabelProvider {
 
	public IComposedStyledString getStyledText(Object object);
}
    • /src/org/eclipse/emf/compare/provider/utils/IStyledString.java
public interface IStyledString {
 
	String getString();
 
	Style getStyle();
 
        interface IComposedStyledString extends Iterable<IStyledString> {
 
		IComposedStyledString append(String str);
 
		IComposedStyledString append(String str, Style style);
 
		String getString();
	}
}

User Interface Changes

See detailed specification part.

Documentation Changes

This documentation will have to be updated:

  • New and Noteworthy
  • User Guide
  • Developer Guide

Tests and Non-regression strategy

TODO


Implementation choices and tradeoffs

N/A

Back to the top