1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 11:55:40 +02:00

Ignore deltas for deleted projects.

This commit is contained in:
Ken Ryall 2007-02-09 04:03:22 +00:00
parent d26afe3167
commit 48ac3860b3

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2007 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -7,6 +7,7 @@
* *
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
* Warren Paul (Nokia) - Ignore deltas for deleted projects
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.pdom; package org.eclipse.cdt.internal.core.pdom;
@ -56,6 +57,11 @@ public class CModelListener implements IElementChangedListener {
case ICElement.C_PROJECT: case ICElement.C_PROJECT:
// Find the appropriate indexer and pass the delta on // Find the appropriate indexer and pass the delta on
final ICProject project = (ICProject)delta.getElement(); final ICProject project = (ICProject)delta.getElement();
// If the project has been deleted then ignore
if (!project.getProject().exists())
return;
switch (delta.getKind()) { switch (delta.getKind()) {
case ICElementDelta.ADDED: case ICElementDelta.ADDED:
fManager.addProject(project, delta); fManager.addProject(project, delta);