Java Code Examples for org.eclipse.core.runtime.IProgressMonitor#internalWorked()

The following examples show how to use org.eclipse.core.runtime.IProgressMonitor#internalWorked() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Importer.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 6 votes vote down vote up
/**
 * We need to add all hybris projects to the build path of each project so that all configured extensions will be on the Eclipse classpath and the extensions will be loaded correctly
 * @return
 */
private void addAllHybrisProjectsToBuildPathForCustomProjects(IProgressMonitor monitor) throws JavaModelException {
	monitor.setTaskName("Fixing build path");
	Set<IProject> customProjects = FixProjectsUtils.getAllCustomerProjects();
	monitor.beginTask("Fixing build path", customProjects.size());
	int i = 0;
	for (IProject sourceProject : customProjects) {
				
		if (sourceProject.isOpen()) {
			IJavaProject javaSourceProject = JavaCore.create(sourceProject);
			List<IClasspathEntry> entries = new LinkedList<IClasspathEntry>(
					Arrays.asList(javaSourceProject.getRawClasspath()));

			for (IProject targetProject : FixProjectsUtils.getAllPlatformProjects()) {
				if (!sourceProject.equals(targetProject)) {
					IClasspathEntry entry = JavaCore.newProjectEntry(targetProject.getFullPath(), true);
					addToListIfNotExisting(entries, entry);
				}
			}
			FixProjectsUtils.setClasspath(entries.toArray(new IClasspathEntry[entries.size()]), javaSourceProject,
					monitor);
			monitor.internalWorked(i++);
		}
		}
}
 
Example 2
Source File: Importer.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
private void fixBuilders(IProgressMonitor monitor) throws CoreException
{
	monitor.setTaskName("Fixing builders");
	Set<IProject> hybrisProjects = FixProjectsUtils.getAllOpenHybrisProjects();
	monitor.beginTask("Fixing builders", hybrisProjects.size());
	int i = 0;
	for (IProject project : hybrisProjects)
	{
		FixProjectsUtils.removeBuildersFromProject(monitor, project);
		monitor.internalWorked(i++);
	}
}
 
Example 3
Source File: ProgressReporterManager.java    From eclipse.jdt.ls with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void internalWorked(double work) {
	for (IProgressMonitor monitor : monitors) {
		monitor.internalWorked(work);
	}
}
 
Example 4
Source File: BatchInitializationMonitor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public void internalWorked(double work) {
	IProgressMonitor monitor = getMonitor();
	if (monitor != null)
		monitor.internalWorked(work);
}