Examples of ParcelDescriptor


Examples of com.sun.star.script.framework.container.ParcelDescriptor

        Vector classpath = getConfigureClasspath();
        classpath.addElement(contents.getAbsolutePath());
       
        try {
            ParcelDescriptor descriptor = getParcelDescriptor();
            if (descriptor == null) {
                descriptor = ParcelDescriptor.createParcelDescriptor(contents);
            }

            if (configuror == null) {
                configuror = new ConfigurePanel(contents.getAbsolutePath(),
                    classpath, descriptor);
            }
            else {
                configuror.reload(contents.getAbsolutePath(), classpath,
                    descriptor);
            }
        }
        catch (IOException ioe) {
            ErrorManager.getDefault().notify(ioe);
            return false;
        }

        DialogDescriptor dd = new DialogDescriptor(configuror,
            ConfigurePanel.DIALOG_TITLE);
       
        Dialog dialog = TopManager.getDefault().createDialog(dd);
        dialog.show();
       
        if (dd.getValue() == DialogDescriptor.OK_OPTION) {
            try {
                ParcelDescriptor descriptor = configuror.getConfiguration();
                descriptor.write();
            }
            catch (Exception e) {
                ErrorManager.getDefault().notify(e);
            }
        }
View Full Code Here

Examples of com.sun.star.script.framework.container.ParcelDescriptor

    public ConfigurePanel(String basedir, Vector classpath)
        throws IOException {

        this.basedir = new File(basedir);
        this.classpath = classpath;
        this.descriptor = new ParcelDescriptor(new File(this.basedir,
            ParcelZipper.PARCEL_DESCRIPTOR_XML));
        initUI();
    }
View Full Code Here

Examples of com.sun.star.script.framework.container.ParcelDescriptor

            this.basedir = new File(basedir);

        if (classpath != null)
            this.classpath = classpath;

        this.descriptor = new ParcelDescriptor(new File(this.basedir,
            ParcelZipper.PARCEL_DESCRIPTOR_XML));

        methodPanel.reload(this.basedir, this.classpath,
            descriptor.getLanguage());
        scriptPanel.reload(descriptor.getScriptEntries());
View Full Code Here

Examples of com.sun.star.script.framework.container.ParcelDescriptor

        FileObject contents =
            recipe.getFileObject(ParcelZipper.CONTENTS_DIRNAME);

        if (contents != null) {
            File f = FileUtil.toFile(contents);
            ParcelDescriptor pd = ParcelDescriptor.createParcelDescriptor(f);
            pd.setLanguage(language);
            pd.write();

            DataFolder parent = DataFolder.findFolder(contents);
            ParcelContentsFolder.createEmptyScript(parent, language);
        }
       
View Full Code Here

Examples of com.sun.star.script.framework.container.ParcelDescriptor

    public String getParcelLanguage(File file) throws IOException {
        ZipFile zf = null;
        ZipEntry ze = null;
        InputStream is = null;
        ParcelDescriptor pd;

        try {
            zf = new ZipFile(file);
            ze = zf.getEntry(PARCEL_DESCRIPTOR_XML);

            if (ze == null)
                throw new IOException("Could not find Parcel Descriptor in parcel");

            is = zf.getInputStream(ze);
            pd = new ParcelDescriptor(is);
        }
        finally {
            if (zf != null)
                zf.close();

            if (is != null)
                is.close();
        }

        return pd.getLanguage().toLowerCase();
    }
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.