use of org.eclipse.jst.jsp.core.tests.NullInputStream in project webtools.sourceediting by eclipse.
the class JSPedCSSSourceParserTest method createModel.
private ICSSModel createModel(boolean isFragment) {
IStructuredModel model = null;
try {
IModelManager modelManager = StructuredModelManager.getModelManager();
model = // $NON-NLS-1$
!isFragment ? // $NON-NLS-1$
modelManager.getModelForEdit("cssjsptest" + index_jsp++ + ".jsp", new NullInputStream(), null) : // $NON-NLS-1$
modelManager.getModelForEdit("cssjsptest" + index_jspf++ + ".jspf", new NullInputStream(), null);
// $NON-NLS-1$
model.getStructuredDocument().setLineDelimiter(commonEOL);
} catch (Exception e) {
StringWriter s = new StringWriter();
e.printStackTrace(new PrintWriter(s));
fail(s.toString());
}
return (ICSSModel) model;
}
Aggregations