/** * @param schemaPreviewFile * @param schema * @throws IOException */ private void recreateSchemaPreviewFileContents(File schemaPreviewFile, ISchema schema) throws IOException { SchemaTransformer transformer = new SchemaTransformer(); OutputStream os = new FileOutputStream(schemaPreviewFile); PrintWriter printWriter = new PrintWriter(os, true); transformer.transform(schema, printWriter); os.flush(); os.close(); }
/** * @param schemaPreviewFile * @param schema * @throws IOException */ private void recreateSchemaPreviewFileContents(File schemaPreviewFile, ISchema schema) throws IOException { SchemaTransformer transformer = new SchemaTransformer(); OutputStream os = new FileOutputStream(schemaPreviewFile); PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(os, ICoreConstants.UTF_8), true); transformer.transform(schema, printWriter); os.flush(); os.close(); }
private void showSchemaDocument() { fPreviewFile = getTempPreviewFile(); if (fPreviewFile == null) return; SchemaTransformer transformer = new SchemaTransformer(); try (OutputStream os = new FileOutputStream(fPreviewFile); PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8), true)) { transformer.transform(fSchema, printWriter); os.flush(); os.close(); showURL(fPreviewFile, fForceExternal); // Associate the generated preview file with the schema file // to enable automatic preview file updates on schema file // changes linkPreviewFileToSchemaFile(); } catch (IOException e) { PDEPlugin.logException(e); } }
Schema schema = (Schema)desc.getSchema(false); SchemaTransformer transformer = new SchemaTransformer(); transformer.transform(schema, writer);
Schema schema = (Schema) desc.getSchema(false); SchemaTransformer transformer = new SchemaTransformer(); transformer.transform(schema, writer);