Skip to content

Commit

Permalink
Add project creation before starting to walk the workspace in Synchro…
Browse files Browse the repository at this point in the history
…nizer.
  • Loading branch information
ylussaud committed Mar 14, 2024
1 parent d7d7c92 commit 72b859e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
public abstract class Synchronizer<P extends IQueryProject> implements IResourceVisitor, IResourceChangeListener, IResourceDeltaVisitor, IWorkspaceResolverProvider {

/**
* Counts {@link IResource} i the workspace.
* Counts {@link IResource} in the workspace.
*
* @author <a href="mailto:yvan.lussaud@obeo.fr">Yvan Lussaud</a>
*/
Expand Down Expand Up @@ -117,6 +117,12 @@ public void synchronize() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
try {
for (IProject project : eclipseWorkspace.getRoot().getProjects()) {
if (project.isAccessible()) {
getOrCreateProject(getQueryWorkspace(), project);
}
}

// Keeping up-to-date with the workspace changes.
eclipseWorkspace.addResourceChangeListener(Synchronizer.this);

Expand Down

0 comments on commit 72b859e

Please sign in to comment.