Package org.openstreetmap.josm.plugins

Examples of org.openstreetmap.josm.plugins.ReadRemotePluginInformationTask


            putValue(SMALL_ICON, ImageProvider.get("download"));
        }

        @Override
        public void actionPerformed(ActionEvent e) {
            final ReadRemotePluginInformationTask task = new ReadRemotePluginInformationTask(Main.pref.getPluginSites());
            Runnable continuation = new Runnable() {
                @Override
                public void run() {
                    if (task.isCanceled()) return;
                    SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            model.updateAvailablePlugins(task.getAvailablePlugins());
                            pnlPluginPreferences.refreshView();
                            Main.pref.putInteger("pluginmanager.version", Version.getInstance().getVersion()); // fix #7030
                        }
                    });
                }
View Full Code Here


                    pnlPluginPreferences,
                    toUpdate,
                    tr("Update plugins")
                    );
            // the async task for downloading plugin information
            final ReadRemotePluginInformationTask pluginInfoDownloadTask = new ReadRemotePluginInformationTask(Main.pref.getPluginSites());

            // to be run asynchronously after the plugin download
            //
            final Runnable pluginDownloadContinuation = new Runnable() {
                @Override
                public void run() {
                    if (pluginDownloadTask.isCanceled())
                        return;
                    notifyDownloadResults(pnlPluginPreferences, pluginDownloadTask);
                    model.refreshLocalPluginVersion(pluginDownloadTask.getDownloadedPlugins());
                    model.clearPendingPlugins(pluginDownloadTask.getDownloadedPlugins());
                    GuiHelper.runInEDT(new Runnable() {
                        @Override
                        public void run() {
                            pnlPluginPreferences.refreshView();                        }
                    });
                }
            };

            // to be run asynchronously after the plugin list download
            //
            final Runnable pluginInfoDownloadContinuation = new Runnable() {
                @Override
                public void run() {
                    if (pluginInfoDownloadTask.isCanceled())
                        return;
                    model.updateAvailablePlugins(pluginInfoDownloadTask.getAvailablePlugins());
                    // select plugins which actually have to be updated
                    //
                    Iterator<PluginInformation> it = toUpdate.iterator();
                    while(it.hasNext()) {
                        PluginInformation pi = it.next();
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.plugins.ReadRemotePluginInformationTask

Copyright © 2018 www.massapicom. 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.