1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 405909 - LLVM plugin refreshes resources when bp is inserted in java

Change-Id: Iad9082d59d188714bed6f6e110c32a631e65450f
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/13468
This commit is contained in:
Marc-Andre Laperle 2013-06-01 20:07:10 -04:00
parent 63bc5765e3
commit 898e6a676a

View file

@ -1,22 +1,20 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2010-2013 Nokia Siemens Networks Oyj, Finland. * Copyright (c) 2010, 2013 Nokia Siemens Networks Oyj, Finland.
* 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Nokia Siemens Networks - initial implementation * Nokia Siemens Networks - initial implementation
* Petri Tuononen - Initial implementation * Petri Tuononen - Initial implementation
* Marc-Andre Laperle (Ericsson)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.managedbuilder.llvm.util; package org.eclipse.cdt.managedbuilder.llvm.util;
import org.eclipse.cdt.managedbuilder.llvm.ui.preferences.LlvmPreferenceStore; import org.eclipse.cdt.managedbuilder.llvm.ui.preferences.LlvmPreferenceStore;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.runtime.CoreException;
/** /**
* Implements Resource listener. * Implements Resource listener.
@ -31,17 +29,26 @@ public class LlvmResourceListener implements IResourceChangeListener {
public void resourceChanged(IResourceChangeEvent event) { public void resourceChanged(IResourceChangeEvent event) {
if (event.getType() == IResourceChangeEvent.POST_BUILD) { //refresh every project after build if (event.getType() == IResourceChangeEvent.POST_BUILD) { //refresh every project after build
//get all projects
IProject[] projects = LlvmToolOptionPathUtil.getProjectsInWorkspace();
//refresh the projects /*
for (IProject proj : projects) { * FIXME: M-A.L: (Bug 405909) I commented out the refresh code because it was a
try { * major performance issue even without LLVM projects in the
proj.refreshLocal(IResource.DEPTH_INFINITE, null); * workspace. Unfortunately, I could not track down the reason as to
} catch (CoreException e) { * why there was a refresh in the first the place by looking at the
e.printStackTrace(); * history (git and svn) and by manual testing
} */
}
// //get all projects
// IProject[] projects = LlvmToolOptionPathUtil.getProjectsInWorkspace();
//
// //refresh the projects
// for (IProject proj : projects) {
// try {
// proj.refreshLocal(IResource.DEPTH_INFINITE, null);
// } catch (CoreException e) {
// e.printStackTrace();
// }
// }
} else if (event.getType() == IResourceChangeEvent.PRE_BUILD) { } else if (event.getType() == IResourceChangeEvent.PRE_BUILD) {
String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$ String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
if (os.indexOf("win") >= 0) { //$NON-NLS-1$ if (os.indexOf("win") >= 0) { //$NON-NLS-1$