Package bndtools.central

Examples of bndtools.central.RefreshFileJob


    protected static IPath fileToPath(File file) throws Exception {
        IPath path = Central.toPath(file);
        if (path == null)
            path = Path.fromOSString(file.getAbsolutePath());

        RefreshFileJob refreshJob = new RefreshFileJob(file, false);
        if (refreshJob.needsToSchedule())
            refreshJob.schedule(100);

        return path;
    }
View Full Code Here


            try {
                RepositoryPlugin.PutResult result = repository.put(new BufferedInputStream(new FileInputStream(file)), new RepositoryPlugin.PutOptions());
                if (result.artifact != null && result.artifact.getScheme().equals("file")) {
                    File newFile = new File(result.artifact);

                    RefreshFileJob refreshJob = new RefreshFileJob(newFile, false);
                    if (refreshJob.needsToSchedule())
                        refreshJob.schedule();
                }
            } catch (Exception e) {
                status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, MessageFormat.format("Failed to add JAR to repository: {0}", file.getPath()), e));
                continue;
            }
View Full Code Here

    protected static IPath fileToPath(File file) throws Exception {
        IPath path = Central.toPath(file);
        if (path == null)
            path = Path.fromOSString(file.getAbsolutePath());

        RefreshFileJob refreshJob = new RefreshFileJob(file, false);
        if (refreshJob.needsToSchedule())
            refreshJob.schedule(100);

        return path;
    }
View Full Code Here

            try {
                RepositoryPlugin.PutResult result = repository.put(new BufferedInputStream(new FileInputStream(file)), new RepositoryPlugin.PutOptions());
                if (result.artifact != null && result.artifact.getScheme().equals("file")) {
                    File newFile = new File(result.artifact);

                    RefreshFileJob refreshJob = new RefreshFileJob(newFile, false);
                    if (refreshJob.needsToSchedule())
                        refreshJob.schedule();
                }
            } catch (Exception e) {
                status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, MessageFormat.format("Failed to add JAR to repository: {0}", file.getPath()), e));
                continue;
            }
View Full Code Here

TOP

Related Classes of bndtools.central.RefreshFileJob

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.