Package javax.tools

Examples of javax.tools.FileObject.openOutputStream()


          if (createBaseAndSubclass) {
            code = code.replaceFirst("(Ext.define\\([\"'].+?)([\"'],)", "$1Base$2");
            FileObject fo = processingEnv.getFiler().createResource(StandardLocation.SOURCE_OUTPUT,
                packageName, fileName + "Base.js");
            OutputStream os = fo.openOutputStream();
            os.write(code.getBytes(ModelGenerator.UTF8_CHARSET));
            os.close();

            try {
              fo = processingEnv.getFiler().getResource(StandardLocation.SOURCE_OUTPUT, packageName,
View Full Code Here


              is.close();
            } catch (FileNotFoundException e) {
              String subClassCode = generateSubclassCode(modelClass, outputConfig);
              fo = processingEnv.getFiler().createResource(StandardLocation.SOURCE_OUTPUT, packageName,
                  fileName + ".js");
              os = fo.openOutputStream();
              os.write(subClassCode.getBytes(ModelGenerator.UTF8_CHARSET));
              os.close();
            }

          } else {
View Full Code Here

            }

          } else {
            FileObject fo = processingEnv.getFiler().createResource(StandardLocation.SOURCE_OUTPUT,
                packageName, fileName + ".js");
            OutputStream os = fo.openOutputStream();
            os.write(code.getBytes(ModelGenerator.UTF8_CHARSET));
            os.close();
          }

        } catch (ClassNotFoundException e) {
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_TEMPLATE, model, output);
            output.flush();
            output.close();
            System.out.println("Written GWT module to " + sourceFile.toUri().toString());
        } catch (IOException e) {
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_DEV_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_DEV_TEMPLATE, model, output);
            output.flush();
            output.close();
            System.out.println("Written GWT dev module to " + sourceFile.toUri().toString());
        } catch (IOException e) {
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_PRODUCT_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_PRODUCT_TEMPLATE, model, output);
            output.flush();
            output.close();
        } catch (IOException e) {
            throw new RuntimeException("Failed to create file", e);
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_PRODUCT_DEV_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_PRODUCT_DEV_TEMPLATE, model, output);
            output.flush();
            output.close();
        } catch (IOException e) {
            throw new RuntimeException("Failed to create file", e);
View Full Code Here

                    StandardLocation.SOURCE_OUTPUT, "", "gwt-proxy.properties");
            OutputStream output1 = sourceFile.openOutputStream();

            FileObject sourceFile2 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "upload-proxy.properties");
            OutputStream output2 = sourceFile2.openOutputStream();

            FileObject sourceFile3 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "patch-proxy.properties");
            OutputStream output3 = sourceFile3.openOutputStream();
View Full Code Here

                    StandardLocation.SOURCE_OUTPUT, "", "upload-proxy.properties");
            OutputStream output2 = sourceFile2.openOutputStream();

            FileObject sourceFile3 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "patch-proxy.properties");
            OutputStream output3 = sourceFile3.openOutputStream();

            FileObject sourceFile4 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "logout.properties");
            OutputStream output4 = sourceFile4.openOutputStream();
View Full Code Here

                    StandardLocation.SOURCE_OUTPUT, "", "patch-proxy.properties");
            OutputStream output3 = sourceFile3.openOutputStream();

            FileObject sourceFile4 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "logout.properties");
            OutputStream output4 = sourceFile4.openOutputStream();

            new TemplateProcessor().process("gwt.proxy.tmpl", model, output1);
            new TemplateProcessor().process("gwt.proxy.upload.tmpl", model, output2);
            new TemplateProcessor().process("gwt.proxy.patch.tmpl", model, output3);
            new TemplateProcessor().process("gwt.proxy.logout.tmpl", model, output4);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.