public static void writeElementLayoutExpressions( final WriteableDocumentBundle bundle, final BundleWriterState state, final XmlWriter writer) throws IOException, BundleWriterException { if (state == null) { throw new NullPointerException(); } if (writer == null) { throw new NullPointerException(); } if (bundle == null) { throw new NullPointerException(); } final ExpressionCollection exp = state.getReport().getExpressions(); final ExpressionRegistry registry = ExpressionRegistry.getInstance(); for (int i = 0; i < exp.size(); i++) { final Expression expression = exp.getExpression(i); if (registry.isExpressionRegistered(expression.getClass().getName()) == false) { continue; } final ExpressionMetaData emd = registry.getExpressionMetaData(expression.getClass().getName()); if (emd.isElementLayoutProcessor()) { writeExpression( bundle, state, expression, writer, BundleNamespaces.LAYOUT, "expression"); // NON-NLS } } }
public static boolean isElementLayoutExpressionActive(final BundleWriterState state) { if (state == null) { throw new NullPointerException(); } final ExpressionCollection exp = state.getReport().getExpressions(); final ExpressionRegistry registry = ExpressionRegistry.getInstance(); for (int i = 0; i < exp.size(); i++) { final Expression expression = exp.getExpression(i); if (registry.isExpressionRegistered(expression.getClass().getName()) == false) { continue; } final ExpressionMetaData emd = registry.getExpressionMetaData(expression.getClass().getName()); if (emd.isElementLayoutProcessor()) { return true; } } return false; }