Package org.jtrim.concurrent

Examples of org.jtrim.concurrent.CancelableTask


        if (NbGradleConfiguration.DEFAULT_CONFIG.equals(config)) {
            LOGGER.warning("Cannot remove the default configuration");
            return;
        }

        NbGradleProject.PROJECT_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) {
                removeFromConfig(config);
                File profileFile = SettingsFiles.getFilesForProfile(rootDirectory, config.getProfileDef())[0];
                if (profileFile.isFile()) {
View Full Code Here


            }
        }
    }

    private void saveActiveProfile() {
        NbGradleProject.PROJECT_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) {
                saveActiveProfileNow();
            }
        }, null);
View Full Code Here

        }, null);
    }

    private void ensureLoadedAsynchronously() {
        if (hasBeenUsed.compareAndSet(false, true)) {
            NbGradleProject.PROJECT_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
                @Override
                public void execute(CancellationToken cancelToken) {
                    findAndUpdateConfigurations(false);
                    readAndUpdateDefaultProfile();
                }
View Full Code Here

    }

    public static void setGradleHome(final FileObject gradleHome) {
        ExceptionHelper.checkNotNullArgument(gradleHome, "gradleHome");

        NbGradleProject.PROJECT_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) {
                URL[] urls = GradleHomeClassPathProvider.getAllGradleLibs(gradleHome);
                if (urls.length == 0) {
                    // Keep the previous classpaths if there are non found.
View Full Code Here

                }
            }
        });

        progress.start(origDisplayName);
        executor.execute(cancel.getToken(), new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) throws Exception {
                inProgress.set(true);
                cancelToken.checkCanceled();
View Full Code Here

        if (MODEL_LOAD_NOTIFIER.isExecutingInThis()) {
            listener.onComplete(model, error);
        }
        else {
            MODEL_LOAD_NOTIFIER.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
                @Override
                public void execute(CancellationToken cancelToken) {
                    listener.onComplete(model, error);
                }
            }, null);
View Full Code Here

        if (!mayFetchFromCache || project.hasLoadedProject()) {
            fetchModelWithoutPersistentCache(project, mayFetchFromCache, listener);
            return;
        }

        MODEL_LOAD_NOTIFIER.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) {
                NbGradleModel model = null;
                boolean needLoadFromScripts = true;
View Full Code Here

        }
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        NbGradleProject.PROJECT_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) {
                for (File projectDir: projectDirs) {
                    openProject(projectDir);
                }
View Full Code Here

        });
    }

    @Override
    public void onDebugeeListening(final int port) {
        ATTACH_EXECUTOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) {
                try {
                    doAttach(port);
                } catch (DebuggerStartException ex) {
View Full Code Here

        if (!scanRequestId.compareAndSet(null, requestId)) {
            return;
        }

        hasScanned.set(true);
        NbGradleProject.PROJECT_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
            @Override
            public void execute(CancellationToken cancelToken) {
                scanRequestId.compareAndSet(requestId, null);

                Map<String, SourceGroup[]> groups = findSourceGroups(javaExt);
View Full Code Here

TOP

Related Classes of org.jtrim.concurrent.CancelableTask

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.