Project

General

Profile

« Previous | Next » 

Revision 7a676646

Added by Patrick Plitzner almost 5 years ago

ref #6318 Remove LF and CR from description text

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveLabelProvider.java
20 20
 */
21 21
public class DescriptiveLabelProvider extends ColumnLabelProvider implements IStyledLabelProvider  {
22 22

  
23
    private static final String TRUNCATE_SIGN = "...";
23
    private static final String TRUNCATE_SIGN = "..."; //$NON-NLS-1$
24 24
    private static final int MAX_LENGTH = 60;
25 25

  
26 26
	@Override
27 27
    public String getText(Object element) {
28 28
		String text = DescriptionHelper.getLabel(element);
29
		text = text.replaceAll("[\\r\\n]", ""); //$NON-NLS-1$ //$NON-NLS-2$
29 30
		if(text.length()>MAX_LENGTH){
30 31
		    text = text.substring(0, MAX_LENGTH)+TRUNCATE_SIGN;
31 32
		}

Also available in: Unified diff