@Override public String getPreview() { StringBuilder buf= new StringBuilder(); if (isEnabled(MAKE_TYPE_ABSTRACT)) { buf.append("public abstract class Face implements IFace {\n"); //$NON-NLS-1$ } else { buf.append("public class Face implements IFace {\n"); //$NON-NLS-1$ } if (isEnabled(CleanUpConstants.ADD_MISSING_METHODES)) { boolean createComments= Boolean.valueOf(PreferenceConstants.getPreference(PreferenceConstants.CODEGEN_ADD_COMMENTS, null)).booleanValue(); if (createComments) buf.append(indent(getOverridingMethodComment(), " ")); //$NON-NLS-1$ buf.append(" @Override\n"); //$NON-NLS-1$ buf.append(" public void method() {\n"); //$NON-NLS-1$ buf.append(indent(getMethodBody(), " ")); //$NON-NLS-1$ buf.append(" }\n"); //$NON-NLS-1$ } buf.append("}\n"); //$NON-NLS-1$ return buf.toString(); }
@Override public String getPreview() { StringBuffer buf= new StringBuffer(); if (isEnabled(MAKE_TYPE_ABSTRACT)) { buf.append("public abstract class Face implements IFace {\n"); //$NON-NLS-1$ } else { buf.append("public class Face implements IFace {\n"); //$NON-NLS-1$ } if (isEnabled(CleanUpConstants.ADD_MISSING_METHODES)) { boolean createComments= Boolean.valueOf(PreferenceConstants.getPreference(PreferenceConstants.CODEGEN_ADD_COMMENTS, null)).booleanValue(); if (createComments) buf.append(indent(getOverridingMethodComment(), " ")); //$NON-NLS-1$ buf.append(" @Override\n"); //$NON-NLS-1$ buf.append(" public void method() {\n"); //$NON-NLS-1$ buf.append(indent(getMethodBody(), " ")); //$NON-NLS-1$ buf.append(" }\n"); //$NON-NLS-1$ } buf.append("}\n"); //$NON-NLS-1$ return buf.toString(); }