[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Dep Tree Patch
|
Here's a patch to fix the NPE pointed
out by Alain...
- Bogdan
Index: .options
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/.options,v
retrieving revision 1.2
diff -u -r1.2 .options
--- .options 26 Aug 2003 19:15:58 -0000 1.2
+++ .options 12 Sep 2003 14:32:11 -0000
@@ -19,4 +19,7 @@
org.eclipse.cdt.core/debug/matchlocator=false
# Reports background dependency tree activity
-org.eclipse.cdt.core/debug/dependency=false
\ No newline at end of file
+org.eclipse.cdt.core/debug/dependency=false
+
+# Reports delta processor tree activity
+org.eclipse.cdt.core/debug/deltaprocessor=false
\ No newline at end of file
Index: model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java,v
retrieving revision 1.14
diff -u -r1.14 DeltaProcessor.java
--- model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java 9 Sep 2003 17:53:51 -0000 1.14
+++ model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java 12 Sep 2003 14:32:12 -0000
@@ -520,10 +520,16 @@
private void updateDependencies(ICElement element){
//Update table
- String fileExtension = element.getResource().getFileExtension();
- if (fileExtension.equals("h") ||
+ IResource resource = element.getResource();
+ if (resource == null)
+ return;
+
+ String fileExtension = resource.getFileExtension();
+
+ if ((fileExtension != null) &&
+ (fileExtension.equals("h") ||
fileExtension.equals("hh") ||
- fileExtension.equals("hpp")){
+ fileExtension.equals("hpp"))){
if (sourceDependencyManager.getProjectDependsForFile(element.getResource().getLocation().toOSString()) == null){
//retrigger dep trees
Index: src/org/eclipse/cdt/core/CCorePlugin.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java,v
retrieving revision 1.30
diff -u -r1.30 CCorePlugin.java
--- src/org/eclipse/cdt/core/CCorePlugin.java 10 Sep 2003 14:26:00 -0000 1.30
+++ src/org/eclipse/cdt/core/CCorePlugin.java 12 Sep 2003 14:32:12 -0000
@@ -25,6 +25,7 @@
import org.eclipse.cdt.internal.core.CPathEntry;
import org.eclipse.cdt.internal.core.model.BufferManager;
import org.eclipse.cdt.internal.core.model.CModelManager;
+import org.eclipse.cdt.internal.core.model.DeltaProcessor;
import org.eclipse.cdt.internal.core.model.IBufferFactory;
import org.eclipse.cdt.internal.core.model.IWorkingCopy;
import org.eclipse.cdt.internal.core.model.Util;
@@ -827,6 +828,7 @@
private static final String MATCH_LOCATOR = CCorePlugin.PLUGIN_ID + "/debug/matchlocator" ; //$NON-NLS-1$
private static final String PARSER = CCorePlugin.PLUGIN_ID + "/debug/parser" ; //$NON-NLS-1$
private static final String DEPENDENCY = CCorePlugin.PLUGIN_ID + "/debug/dependency" ; //$NON-NLS-1$
+ private static final String DELTA = CCorePlugin.PLUGIN_ID + "/debug/deltaprocessor" ;
/**
* Configure the plugin with respect to option settings defined in ".options" file
*/
@@ -858,6 +860,9 @@
option = Platform.getDebugOption(SEARCH);
if(option != null) SearchEngine.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$
+
+ option = Platform.getDebugOption(DELTA);
+ if(option != null) DeltaProcessor.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$
option = Platform.getDebugOption(MATCH_LOCATOR);
if(option != null) MatchLocator.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$