|
From: David C. <dc...@us...> - 2005-11-13 15:47:15
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5103/src/org/rubypeople/rdt/internal/core/builder Modified Files: MassIndexUpdater.java Added Files: MassIndexUpdaterJob.java Log Message: Scan project SymbolIndex on startup/project open asynchronously. --- NEW FILE: MassIndexUpdaterJob.java --- /* * Author: David Corbin * * Copyright (c) 2005 RubyPeople. * * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. * RDT is subject to the "Common Public License (CPL) v 1.0". You may not use * RDT except in compliance with the License. For further information see * org.rubypeople.rdt/rdt.license. */ package org.rubypeople.rdt.internal.core.builder; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; public class MassIndexUpdaterJob extends Job { private final List rubyProjects; private MassIndexUpdater massIndexUpdater; public MassIndexUpdaterJob(IndexUpdater indexUpdater, List rubyProjects) { this(new MassIndexUpdater(indexUpdater), rubyProjects); } public MassIndexUpdaterJob(MassIndexUpdater massIndexUpdater, List rubyProjects) { super("Mass Index Update"); this.massIndexUpdater = massIndexUpdater; this.rubyProjects = rubyProjects; } protected IStatus run(IProgressMonitor monitor) { massIndexUpdater.updateProjects(rubyProjects); return Status.OK_STATUS; } public boolean equals(Object obj) { if (!(obj instanceof MassIndexUpdaterJob)) return false; MassIndexUpdaterJob that = (MassIndexUpdaterJob) obj; return this.rubyProjects.equals(that.rubyProjects) && massIndexUpdater.equals(massIndexUpdater); } public int hashCode() { return 0; } } Index: MassIndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/MassIndexUpdater.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MassIndexUpdater.java 13 Nov 2005 13:05:12 -0000 1.4 --- MassIndexUpdater.java 13 Nov 2005 15:47:08 -0000 1.5 *************** *** 73,75 **** --- 73,88 ---- return files; } + + public boolean equals(Object obj) { + if (!(obj instanceof MassIndexUpdater)) + return false; + + MassIndexUpdater that = (MassIndexUpdater) obj; + return updater.getClass().equals(that.updater.getClass()) + && parser.getClass().equals(that.parser); + } + + public int hashCode() { + return 0; + } } |