Package de.sebastianbenz.task.impl

Source Code of de.sebastianbenz.task.impl.ProjectImplCustom

/*******************************************************************************
* Copyright (c) 2011 Sebastian Benz.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*     Sebastian Benz - initial API and implementation
******************************************************************************/
package de.sebastianbenz.task.impl;

import org.eclipse.emf.common.util.EList;

import de.sebastianbenz.task.Text;
import de.sebastianbenz.task.TextSegment;


public class ProjectImplCustom extends de.sebastianbenz.task.impl.ProjectImpl {
  @Override
  protected String cleanText(String text) {
    return text.substring(0, text.length()-1);
  }
 
  protected void addTextSegment(EList<TextSegment> segments, int begin,
      int end) {
    super.addTextSegment(segments, begin, end);
    if(end == getText().length()){
      Text lastSegment = (Text) segments.get(segments.size()-1);
      String string = lastSegment.getValue().trim();
      lastSegment.setValue(string.substring(0, string.length()- 1));
    }
  }
 
}
TOP

Related Classes of de.sebastianbenz.task.impl.ProjectImplCustom

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.