1 19 package org.netbeans.modules.javacore.jmiimpl.javamodel; 20 21 import java.util.List ; 22 import org.netbeans.jmi.javamodel.Element; 23 import org.netbeans.jmi.javamodel.EmptyStatement; 24 import org.netbeans.jmi.javamodel.JavaModelPackage; 25 import org.netbeans.mdr.storagemodel.StorableObject; 26 27 public abstract class EmptyStatementImpl extends StatementImpl implements EmptyStatement { 28 29 public EmptyStatementImpl(StorableObject o) { 30 super(o); 31 } 32 33 String getRawText() { 34 if (isNew()) { 35 StringBuffer buf = new StringBuffer (); 36 buf.append(';'); 37 return buf.toString(); 38 } 39 String origSrc = getParser().getSourceText(); 40 return origSrc.substring(IndentUtil.getElementStart(this), IndentUtil.getElementEnd(this)); 41 } 42 43 public void getDiff(List diff) { 44 } 46 47 public Element duplicate(JavaModelPackage targetExtent) { 48 return targetExtent.getEmptyStatement().createEmptyStatement(); 49 } 50 } 51 | Popular Tags |