Fires a progress event message to be displayed

@param state the state integer
@param progress the progress integer
@param messageKey the message key
@param installResource the resource necessitating the progress event
@throws InstallException
967444
private void fireProgressEvent(int state, int progress, String messageKey, RepositoryResource installResource) throws InstallException {
        String resourceName = null;
        if (installResource instanceof EsaResource) {
            EsaResource esar = ((EsaResource) installResource);
            if (esar.getVisibility().equals(Visibility.PUBLIC) || esar.getVisibility().equals(Visibility.INSTALL)) {
                resourceName = (esar.getShortName() == null) ? installResource.getName() : esar.getShortName();
            } else if (!firePublicAssetOnly && messageKey.equals("STATE_DOWNLOADING")) {
                messageKey = "STATE_DOWNLOADING_DEPENDENCY";
                resourceName = "";
            } else {
                return;
            }
        }
        if (installResource instanceof SampleResource) {
            SampleResource sr = ((SampleResource) installResource);
            resourceName = sr.getShortName() == null ? installResource.getName() : sr.getShortName();
        } else {
            resourceName = installResource.getName();
        }
        fireProgressEvent(state, progress,
                          Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(messageKey, resourceName));
    }
434791
@SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity",
		"checkstyle:returncount", "checkstyle:magicnumber"})
	public boolean compile(IProgressMonitor progress) {
		final IProgressMonitor monitor = progress == null ? new NullProgressMonitor() : progress;
		try {
			monitor.beginTask(Messages.SarlBatchCompiler_42, 18);
			if (!checkConfiguration(monitor)) {
				return false;
			}
			monitor.worked(1);
			final ResourceSet resourceSet = this.resourceSetProvider.get();
			configureExtraLanguageGenerators();
			if (!configureWorkspace(resourceSet, monitor)) {
				return false;
			}
			if (getLogger().isDebugEnabled()) {
				getLogger().debug(Utils.dump(getGeneratorConfig(), false));
			}
			monitor.worked(2);
			monitor.subTask(Messages.SarlBatchCompiler_43);
			if (this.generatorConfigProvider instanceof GeneratorConfigProvider) {
				((GeneratorConfigProvider) this.generatorConfigProvider).install(resourceSet, getGeneratorConfig());
			}
			if (monitor.isCanceled()) {
				return false;
			}
			if (this.generatorConfigProvider2 instanceof GeneratorConfigProvider2) {
				((GeneratorConfigProvider2) this.generatorConfigProvider2).install(resourceSet, getGeneratorConfig2());
			}
			if (getLogger().isDebugEnabled()) {
				getLogger().debug(Utils.dump(getGeneratorConfig2(), false));
			}
			if (monitor.isCanceled()) {
				return false;
			}
			monitor.worked(3);
			monitor.subTask(Messages.SarlBatchCompiler_44);
			final File stubClassDirectory = createTempDir(BINCLASS_FOLDER_PREFIX);
			if (monitor.isCanceled()) {
				return false;
			}
			monitor.worked(4);
			try {
				monitor.subTask(Messages.SarlBatchCompiler_45);
				this.compilerPhases.setIndexing(resourceSet, true);
				if (monitor.isCanceled()) {
					return false;
				}
				monitor.worked(5);
				// install a type provider without index lookup for the first phase
				installJvmTypeProvider(resourceSet, stubClassDirectory, true, monitor);
				if (monitor.isCanceled()) {
					return false;
				}
				monitor.worked(6);
				loadSARLFiles(resourceSet, monitor);
				if (monitor.isCanceled()) {
					return false;
				}
				monitor.worked(7);
				final File stubSourceDirectory = createStubs(resourceSet, monitor);
				if (monitor.isCanceled()) {
					return false;
				}
				monitor.worked(8);
				if (!preCompileStubs(stubSourceDirectory, stubClassDirectory, monitor)) {
					if (monitor.isCanceled()) {
						return false;
					}
					reportInternalWarning(Messages.SarlBatchCompiler_2);
				}
				monitor.worked(9);
				if (!preCompileJava(stubSourceDirectory, stubClassDirectory, monitor)) {
					if (monitor.isCanceled()) {
						return false;
					}
					if (getLogger().isDebugEnabled()) {
						getLogger().debug(Messages.SarlBatchCompiler_3);
					}
				}
				monitor.worked(10);
			} finally {
				monitor.subTask(Messages.SarlBatchCompiler_46);
				this.compilerPhases.setIndexing(resourceSet, false);
				if (monitor.isCanceled()) {
					return false;
				}
			}
			monitor.worked(11);
			// install a fresh type provider for the second phase, so we clear all previously cached classes and misses.
			installJvmTypeProvider(resourceSet, stubClassDirectory, false, monitor);
			if (monitor.isCanceled()) {
				return false;
			}
			monitor.worked(12);
			generateJvmElements(resourceSet, monitor);
			if (monitor.isCanceled()) {
				return false;
			}
			monitor.worked(13);
			final List<Resource> validatedResources = new ArrayList<>();
			final List<Issue> issues = validate(resourceSet, validatedResources, monitor);
			if (monitor.isCanceled()) {
				return false;
			}
			if (!issues.isEmpty()) {
				if (reportCompilationIssues(issues)) {
					return false;
				}
			}
			monitor.worked(14);
			overrideXtextInternalLoggers();
			generateJavaFiles(validatedResources, monitor);
			if (monitor.isCanceled()) {
				return false;
			}
			monitor.worked(15);
			if (isJavaPostCompilationEnable()) {
				postCompileJava(monitor);
				if (monitor.isCanceled()) {
					return false;
				}
			}
			monitor.worked(16);
		} finally {
			monitor.subTask(Messages.SarlBatchCompiler_47);
			destroyClassLoader(this.jvmTypesClassLoader);
			destroyClassLoader(this.annotationProcessingClassLoader);
			if (isDeleteTempDirectory()) {
				monitor.subTask(Messages.SarlBatchCompiler_48);
				for (final File file : this.tempFolders) {
					cleanFolder(file, ACCEPT_ALL_FILTER, true, true);
				}
			}
			unconfigureExtraLanguageGenerators();
			monitor.done();
		}
		return true;
	}
655515
public static void fireSREAdded(ISREInstall installation) {
		for (final Object listener : SRE_LISTENERS.getListeners()) {
			((ISREInstallChangedListener) listener).sreAdded(installation);
		}
	}
127368
@Override
	public void executionStateChanged(final ExecutionState newExecutionState, final String optionalMessage) {

		// Check the state transition
		ExecutionStateTransition.checkTransition(false, getTaskName(), this.executionState, newExecutionState);

		// Make sure the reason for a transition to FAILED appears in the log files
		if (newExecutionState == ExecutionState.FAILED) {
			LOG.error(optionalMessage);
		}

		// Notify all listener objects
		final Iterator<ExecutionListener> it = this.registeredListeners.iterator();
		while (it.hasNext()) {
			it.next().executionStateChanged(this.environment.getJobID(), this.vertexID, newExecutionState,
					optionalMessage);
		}

		// Store the new execution state
		this.executionState = newExecutionState;

		// Finally propagate the state change to the job manager
		this.taskManager.executionStateChanged(this.environment.getJobID(), this.vertexID, newExecutionState,
				optionalMessage);
	}
556046
synchronized void statusUpdate(float progress,
                                 String state, 
                                 Counters counters) {
    setProgress(progress);
    setStateString(state);
    setCounters(counters);
  }
197001
protected void handleInstallRequestFailure(MemberState member, InstallRequest request, Throwable error) {
    // Log the failed attempt to contact the member.
    failAttempt(member, error);
  }
899714
private void pushState(final S state) {
        this.state = state;

        header.setHTML(TEMPLATE.header(currentStep().getTitle()));
        clearError();
        body.showWidget(state); // will call onShow(C) for the current step
        footer.back.setEnabled(state != initialState());
        footer.next
                .setHTML(
                        lastStates().contains(state) ? CONSTANTS.common_label_finish() : CONSTANTS.common_label_next());
    }
948736
protected final void fireUpdateWork(String message, long finished) {
	Iterator<WeakReference<ProgressObserver<Observable>>> iterator = observers
		.iterator();
	while (iterator.hasNext()) {
	    WeakReference<ProgressObserver<Observable>> weakReference = iterator
		    .next();
	    ProgressObserver<Observable> observer = weakReference.get();
	    if (observer == null) {
		observers.remove(weakReference);
	    } else {
		observer.updateWork(observable, message, finished);
	    }
	}
    }
158285
function InstallExtensionDialog(installer, _isUpdate) {
        this._installer = installer;
        this._state = STATE_CLOSED;
        this._installResult = null;
        this._isUpdate = _isUpdate;

        // Timeout before we allow user to leave STATE_INSTALL_CANCELING without waiting for a resolution
        // (per-instance so we can poke it for unit testing)
        this._cancelTimeout = 10 * 1000;
    }
38147
def progress(self, loaded, total, msg=''):
        

        self.fire('progress', {
            'loaded': loaded,
            'total': total,
            'msg': msg
        })
389735
function handleInstall(event) {
  logger.log('Entering install handler.');
  self.skipWaiting();
  if ($Cache.precache) {
    event.waitUntil(precache());
  }
}
1254679
@SuppressWarnings("MagicNumber")
    @Override
    public void indicateProgressPercentage(long number, long total) {
        verifySystemOut();
        progressIndicatorActive = true;
        String currMsg = lastMessage;
        try {
            int percentage = Math.round(NumberMath.multiply(NumberMath.divide(number, total), 100).floatValue());

            if (!isAnsiEnabled()) {
                out.print("..");
                out.print(percentage + '%');
            } else {
                updateStatus(currMsg + ' ' + percentage + '%');
            }
        } finally {
            lastMessage = currMsg;
        }
    }
571358
protected final void addFlashMessage(String msgKey, Object... args) {
    getFlash().addMessage(getTextInternal(msgKey, args));
  }
113289
public static void progress(boolean visible, Panel container) {
        loader.setType(LoaderType.PROGRESS);
        loader.setContainer(container);
        if (visible) {
            loader.show();
        } else {
            loader.hide();
        }
    }
1335590
private void fireSendAllowedStateChangeEvent(boolean newState)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "fireSendAllowedStateChangeEvent", Boolean.valueOf(newState));

        MessageProcessor messageProcessor = getMessageProcessor();

        if (messageProcessor.getMessagingEngine().isEventNotificationEnabled())
        {
            // Build the message for the Notification

            String message =
                            nls.getFormattedMessage("NOTIFY_SEND_ALLOWED_STATE_CHANGE_CWSIP0551",
                                                    new Object[] { getName(),
                                                                  getUuid().toString(),
                                                                  Boolean.valueOf(newState) },
                                                    null);

            // Build the properties for the Notification
            Properties props = new Properties();

            props.put(SibNotificationConstants.KEY_DESTINATION_NAME, getName());
            props.put(SibNotificationConstants.KEY_DESTINATION_UUID, getUuid().toString());

            if (newState)
                props.put(SibNotificationConstants.KEY_SEND_ALLOWED_STATE,
                          SibNotificationConstants.SEND_ALLOWED_TRUE);
            else
                props.put(SibNotificationConstants.KEY_SEND_ALLOWED_STATE,
                          SibNotificationConstants.SEND_ALLOWED_FALSE);

            // Now create the Event object to pass to the control adapter
            MPRuntimeEvent MPevent =
                            new MPRuntimeEvent(SibNotificationConstants.TYPE_SIB_MESSAGEPOINT_SEND_ALLOWED_STATE,
                                            message,
                                            props);
            // Fire the event
            runtimeEventOccurred(MPevent);
        }
        else
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "fireSendAllowedStateChangeEvent", "Event Notification is disabled, cannot fire event");
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "fireSendAllowedStateChangeEvent");
    }
230742
public void setInstallState(@Nonnull InstallState newState) {
        String prior = installStateName;
        installStateName = newState.name();
        LOGGER.log(Main.isDevelopmentMode ? Level.INFO : Level.FINE, "Install state transitioning from: {0} to : {1}", new Object[] { prior, installStateName });
        if (!installStateName.equals(prior)) {
            getSetupWizard().onInstallStateUpdate(newState);
            newState.initializeState();
        }
        saveQuietly();
    }
162912
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
    public void enableProgressBar() {
        showProgressBar = true;

        if (searchBoxViewModel != null) {
            progressController = new SearchProgressController(new SearchProgressController.ProgressListener() {
                @Override
                public void onStart() {
                    updateProgressBar(searchBoxViewModel, true);
                }

                @Override
                public void onStop() {
                    updateProgressBar(searchBoxViewModel, false);
                }
            }, progressBarDelay);
        }
    }