Examples of ModuleInfo


Examples of org.jayasoft.woj.common.model.content.ModuleInfo

    private void verifyOnWOJ(final String path) {
        setInfoString(Messages.getString("identify.help.waiting")); //$NON-NLS-1$
        new Thread(new Runnable() {
            public void run() {
                try {
                    final ModuleInfo mi = WojServicesHelper.getDefault().getModuleInfo(path);
                    if(mi != null && mi.isKnown()) {
                        setExistOnWoj(path, mi);
                    } else {
                        setExistOnWoj(path, null);
                    }
                } catch (ServiceNotAvailableException e) {
View Full Code Here

Examples of org.jayasoft.woj.common.model.content.ModuleInfo

    } catch (JavaModelException e) {
            WojPlugin.log("Error while getting user set javadoc url for:"+element, e); //$NON-NLS-1$
    }
        try {
            String jarPath = PDEJavaModelUtil.getContainingJarPath(element);
            ModuleInfo moduleInfo = WojServicesHelper.getDefault().getModuleInfo(jarPath);
            if(moduleInfo == null || !moduleInfo.isKnown()) {
              LOGGER.debug("module is unknow");//$NON-NLS-1$
                MessageDialogWithToggle dialogWithToggle = MessageDialogWithToggle.openYesNoQuestion(shell, Messages.getString("javadoc.addmodule.title"), Messages.getString("javadoc.addmodule.message"), Messages.getString("javadoc.addmodule.toggle.message"), false, WojPlugin.getDefault().getPreferenceStore(), PreferenceConstants.ASK_ADDMODULE_FROM_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                int response = dialogWithToggle.getReturnCode();
                if(response == MessageDialogWithToggle.OK || response == 2) {//seems that return value is 2 for ok instaed of 0
                    AddModule.showAddModuleDialog(jarPath);
                }
            } else if(!moduleInfo.hasJavadoc()) {
              LOGGER.debug("module has no javadoc");//$NON-NLS-1$
              MessageDialog.openWarning(shell, Messages.getString("javadoc.nodoc.title"), Messages.getString("javadoc.nodoc.message", moduleInfo)); //$NON-NLS-1$ //$NON-NLS-2$
            } else {
                String docBase = getJavadocLocation("", element, false); //$NON-NLS-1$
                String member = getMember(element);
View Full Code Here

Examples of org.jboss.modules.management.ModuleInfo

            doDumpModuleInformation(name, b);
            return b.toString();
        }

        private void doDumpModuleInformation(final String name, final StringBuilder b) {
            ModuleInfo description = getModuleDescription(name);
            b.append("Module ").append(name).append('\n');
            b.append("    Class loader: ").append(description.getClassLoader()).append('\n');
            String fallbackLoader = description.getFallbackLoader();
            if (fallbackLoader != null) b.append("    Fallback loader: ").append(fallbackLoader).append('\n');
            String mainClass = description.getMainClass();
            if (mainClass != null) b.append("    Main Class: ").append(mainClass).append('\n');
            List<ResourceLoaderInfo> loaders = description.getResourceLoaders();
            b.append("    Resource Loaders:\n");
            for (ResourceLoaderInfo loader : loaders) {
                b.append("        Loader Type: ").append(loader.getType()).append('\n');
                b.append("        Paths:\n");
                for (String path : loader.getPaths()) {
                    b.append("            ").append(path).append('\n');
                }
            }
            b.append("    Dependencies:\n");
            for (DependencyInfo dependencyInfo : description.getDependencies()) {
                b.append("        Type: ").append(dependencyInfo.getDependencyType()).append('\n');
                String moduleName = dependencyInfo.getModuleName();
                if (moduleName != null) {
                    b.append("        Module Name: ").append(moduleName).append('\n');
                }
View Full Code Here

Examples of org.jdesktop.wonderland.common.modules.ModuleInfo

        mf.write(jos);
    }
   
    public static void main(String[] args) throws IOException, JAXBException {
        ModuleJarWriter mjw = new ModuleJarWriter();
        ModuleInfo info = new ModuleInfo("Fubar", 1, 0, 0, "Fubar module");
        mjw.setModuleInfo(info);
        mjw.addArtFile("models/castle.tiff", new File("/Users/jordanslott/Desktop/yuval.tiff"));
        mjw.addArtFile("models/castle/mystuff.tiff", new File("/Users/jordanslott/Desktop/yuval.tiff"));
        mjw.writeToJar(new File("mymodule.jar"));
    }
View Full Code Here

Examples of org.jdesktop.wonderland.common.modules.ModuleInfo

    public CachedModule getModule(String moduleName) {
        // Look for the cached module. If we can't find it, see if it exists
        // on the server nevertheless.
        CachedModule cm = this.cachedModules.get(moduleName);
        if (cm == null) {
            ModuleInfo info = ModuleUtils.fetchModuleInfo(this.serverURL, moduleName);
            if (info == null) {
                logger.info("[MODULES] No module information found for " + moduleName);
                return null;
            }
            cm = new CachedModule(serverURL, info);
View Full Code Here

Examples of org.jdesktop.wonderland.common.modules.ModuleInfo

        this.setFile(root);
       
        /*
         * Fetch the module info, this is pretty bad if module.xml doesn't exist
         */
        ModuleInfo info = this.fetchModuleInfo();
        if (info == null) {
            info = new ModuleInfo();
        }
        this.setInfo(info);
       
        /*
         * Fetch the module dependencies, this isn't terrible if it doesn't exist
View Full Code Here

Examples of org.jdesktop.wonderland.common.modules.ModuleInfo

        // TODO calculate checksums?       
        super.execute();
    }
   
    private void writeModuleInfo() throws IOException, JAXBException {
        ModuleInfo mi = new ModuleInfo(name, majorVersion, minorVersion,
                miniVersion, moduleDescription);
       
        File moduleInfoFile;
        if (buildDir == null) {
            moduleInfoFile = File.createTempFile("moduleInfo", "xml");
            moduleInfoFile.deleteOnExit();
        } else {
            moduleInfoFile = new File(buildDir, "moduleInfo.xml");
        }
       
        if (overwrite || !compareModuleInfo(mi, moduleInfoFile)) {
            log("Rewriting moduleInfo file", Project.MSG_VERBOSE);
            FileWriter writer = new FileWriter(moduleInfoFile);
            mi.encode(writer);
            writer.close();
        }
       
        ZipFileSet zfs = new ZipFileSet();
        zfs.setFile(moduleInfoFile);
View Full Code Here

Examples of org.jdesktop.wonderland.common.modules.ModuleInfo

        }

        FileReader reader = null;
        try {
            reader = new FileReader(oldMIFile);
            ModuleInfo oldMI = ModuleInfo.decode(reader);
           
            log("New desc:|" + newMI.getDescription() + "|Old desc:|" + oldMI.getDescription() + "|", Project.MSG_VERBOSE);
           
            // ModuleInfo.equals() doesn't check the description field,
            // but we want to re-write the file if the description has
            // changed.
            boolean descChanged = (newMI.getDescription() == null) ?
                (oldMI.getDescription() != null) :
                (!newMI.getDescription().equals(oldMI.getDescription()));
           
            log("ModuleInfo: descChanged: " + descChanged + " " +
                "equals: " + newMI.equals(oldMI), Project.MSG_VERBOSE);
           
            return (!descChanged && newMI.equals(oldMI));
View Full Code Here

Examples of org.jdesktop.wonderland.common.modules.ModuleInfo

    }
   
    private void writeRequires() throws IOException, JAXBException {
        Set<ModuleInfo> mis = new HashSet<ModuleInfo>();
        for (Requires r : requires) {
            mis.add(new ModuleInfo(r.name, r.majorVersion, r.minorVersion,
                    r.miniVersion));
        }
       
        ModuleRequires mr = new ModuleRequires(mis.toArray(new ModuleInfo[0]));
       
View Full Code Here

Examples of org.jdesktop.wonderland.common.modules.ModuleInfo

                    if (f.isDirectory()) {
                        mjw.addDirectory(f);
                    }
                }
            }
            ModuleInfo mi =
                    new ModuleInfo(moduleName, 1, 0, 0, descriptionTF.getText());
            mjw.setModuleInfo(mi);
            try {
                if (targetDir == null) {
                    targetDir = tmpDir.getParentFile();
                }
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.