[hg] main-silver: implement build artifacts provider (exec log p...

  • From: Alexander Simon < >
  • To:
  • Subject: [hg] main-silver: implement build artifacts provider (exec log p...
  • Date: Sat, 02 Feb 2013 03:33:24 -0800

changeset 077469ee9a0a in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/077469ee9a0a
description:
        implement build artifacts provider (exec log privider)

diffstat:

 cnd.discovery/nbproject/project.properties                                   
                  |    2 +-
 
cnd.discovery/src/org/netbeans/modules/cnd/discovery/projectimport/ImportProject.java
          |   11 +
 
cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/DiscoveryWizardDescriptor.java
     |   31 ++
 
cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/SelectConfigurationPanel.java
      |    5 +
 
cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/api/DiscoveryDescriptor.java
       |    3 +
 
cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecLog.java
    |  133 +++++++--
 
cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecutable.java
 |    4 +-
 
cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeFolder.java
     |    2 +-
 
cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeMakeLog.java
    |    4 +-
 
cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/BaseDwarfProvider.java
 |   18 +-
 
cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/DwarfProvider.java
     |    2 +-
 11 files changed, 163 insertions(+), 52 deletions(-)

diffs (475 lines):

diff --git a/cnd.discovery/nbproject/project.properties 
b/cnd.discovery/nbproject/project.properties
--- a/cnd.discovery/nbproject/project.properties
+++ b/cnd.discovery/nbproject/project.properties
@@ -1,6 +1,6 @@
 javac.compilerargs=-Xlint -Xlint:-serial
 javac.source=1.6
-spec.version.base=1.31
+spec.version.base=1.32
 release.external/cnd-build-trace-1.0.zip!/SunOS-x86/libBuildTrace.so        
= bin/SunOS-x86/libBuildTrace.so
 release.external/cnd-build-trace-1.0.zip!/SunOS-x86_64/libBuildTrace.so     
= bin/SunOS-x86_64/libBuildTrace.so
 release.external/cnd-build-trace-1.0.zip!/SunOS-sparc/libBuildTrace.so      
= bin/SunOS-sparc/libBuildTrace.so
diff --git 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/projectimport/ImportProject.java
 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/projectimport/ImportProject.java
--- 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/projectimport/ImportProject.java
+++ 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/projectimport/ImportProject.java
@@ -1337,6 +1337,17 @@
                 try {
                     done = true;
                     extension.apply(map, makeProject);
+                    if (false) {
+                        List<String> buildArtifacts = (List<String>) 
map.get(DiscoveryWizardDescriptor.BUILD_ARTIFACTS);
+                        if (buildArtifacts != null) {
+                            ConfigurationDescriptorProvider pdp = 
makeProject.getLookup().lookup(ConfigurationDescriptorProvider.class);
+                            MakeConfigurationDescriptor 
makeConfigurationDescriptor = pdp.getConfigurationDescriptor();
+                            Folder externalFileItems = 
makeConfigurationDescriptor.getExternalFileItems();
+                            for(String binary : buildArtifacts) {
+                                
externalFileItems.addItem(Item.createInFileSystem(makeConfigurationDescriptor.getBaseDirFileSystem(),binary));
+                            }
+                        }
+                    }
                     importResult.put(Step.DiscoveryLog, State.Successful);
                 } catch (IOException ex) {
                     ex.printStackTrace(System.err);
diff --git 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/DiscoveryWizardDescriptor.java
 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/DiscoveryWizardDescriptor.java
--- 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/DiscoveryWizardDescriptor.java
+++ 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/DiscoveryWizardDescriptor.java
@@ -76,6 +76,7 @@
     public static final String INVOKE_PROVIDER = "DW:invokeProvider"; // 
NOI18N
     public static final String COMPILER_NAME = "DW:compiler"; // NOI18N
     public static final String DEPENDENCIES = "DW:dependencies"; // NOI18N
+    public static final String BUILD_ARTIFACTS = "DW:buildArtifacts"; // 
NOI18N
     public static final String SEARCH_PATHS = "DW:searchPaths"; // NOI18N
     public static final String ERRORS = "DW:errors"; // NOI18N
     public static final String INCREMENTAL = "DW:incremental"; // NOI18N
@@ -294,6 +295,16 @@
     }
 
     @Override
+    public List<String> getBuildArtifacts() {
+        return (List<String>) getProperty(BUILD_ARTIFACTS);
+    }
+
+    @Override
+    public void setBuildArtifacts(List<String> buildArtifacts) {
+        putProperty(BUILD_ARTIFACTS, buildArtifacts);
+    }
+
+    @Override
     public List<String> getSearchPaths() {
         return (List<String>) getProperty(SEARCH_PATHS);
     }
@@ -528,6 +539,16 @@
         }
 
         @Override
+        public List<String> getBuildArtifacts() {
+            return (List<String>) wizard.getProperty(BUILD_ARTIFACTS);
+        }
+
+        @Override
+        public void setBuildArtifacts(List<String> buildArtifacts) {
+            wizard.putProperty(DEPENDENCIES, buildArtifacts);
+        }
+
+        @Override
         public List<String> getSearchPaths() {
             return (List<String>) wizard.getProperty(SEARCH_PATHS);
         }
@@ -764,6 +785,16 @@
         }
 
         @Override
+        public List<String> getBuildArtifacts() {
+            return (List<String>) map.get(BUILD_ARTIFACTS);
+        }
+
+        @Override
+        public void setBuildArtifacts(List<String> buildArtifacts) {
+            map.put(BUILD_ARTIFACTS, buildArtifacts);
+        }
+
+        @Override
         public List<String> getSearchPaths() {
             return (List<String>) map.get(SEARCH_PATHS);
         }
diff --git 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/SelectConfigurationPanel.java
 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/SelectConfigurationPanel.java
--- 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/SelectConfigurationPanel.java
+++ 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/SelectConfigurationPanel.java
@@ -371,6 +371,7 @@
         wizardDescriptor.setIncludedFiles(includedFiles);
         Map<String, AtomicInteger> compilers = new HashMap<String, 
AtomicInteger>();
         Set<String> dep = new HashSet<String>();
+        Set<String> buildArtifacts = new HashSet<String>();
         for (Iterator<Configuration> it = configs.iterator(); it.hasNext();) 
{
             Configuration conf = it.next();
             includedFiles.addAll(conf.getIncludedFiles());
@@ -394,9 +395,13 @@
             if (conf.getDependencies() != null) {
                 dep.addAll(conf.getDependencies());
             }
+            if (conf.getBuildArtifacts() != null) {
+                buildArtifacts.addAll(conf.getBuildArtifacts());
+            }
         }
         wizardDescriptor.setInvokeProvider(false);
         wizardDescriptor.setDependencies(new ArrayList<String>(dep));
+        wizardDescriptor.setBuildArtifacts(new 
ArrayList<String>(buildArtifacts));
         wizardDescriptor.setConfigurations(projectConfigurations);
         int max = 0;
         String top = "";
diff --git 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/api/DiscoveryDescriptor.java
 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/api/DiscoveryDescriptor.java
--- 
a/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/api/DiscoveryDescriptor.java
+++ 
b/cnd.discovery/src/org/netbeans/modules/cnd/discovery/wizard/api/DiscoveryDescriptor.java
@@ -107,6 +107,9 @@
     List<String> getDependencies();
     void setDependencies(List<String> dependencies);
 
+    List<String> getBuildArtifacts();
+    void setBuildArtifacts(List<String> buildArtifacts);
+
     List<String> getSearchPaths();
     void setSearchPaths(List<String> searchPaths);
 
diff --git 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecLog.java
 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecLog.java
--- 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecLog.java
+++ 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecLog.java
@@ -242,21 +242,22 @@
     }
 
     @Override
-    protected List<SourceFileProperties> getSourceFileProperties(String 
objFileName, Map<String, SourceFileProperties> map, ProjectProxy project, 
Set<String> dlls, CompileLineStorage storage) {
+    protected List<SourceFileProperties> getSourceFileProperties(String 
objFileName, Map<String, SourceFileProperties> map, ProjectProxy project, 
Set<String> dlls, List<String> buildArtifacts, CompileLineStorage storage) {
         ProviderProperty p = getProperty(RESTRICT_COMPILE_ROOT);
         String root = "";
         if (p != null) {
             root = (String) p.getValue();
         }
-        List<SourceFileProperties> res = runLogReader(objFileName, root, 
progress, project, storage);
+        List<SourceFileProperties> res = runLogReader(objFileName, root, 
progress, project, buildArtifacts, storage);
         progress = null;
         return res;
 
     }
 
-    private List<SourceFileProperties> runLogReader(String objFileName, 
String root, Progress progress, ProjectProxy project, CompileLineStorage 
storage) {
+    private List<SourceFileProperties> runLogReader(String objFileName, 
String root, Progress progress, ProjectProxy project, List<String> 
buildArtifacts, CompileLineStorage storage) {
         ExecLogReader clrf = new ExecLogReader(objFileName, root, project);
         List<SourceFileProperties> list = clrf.getResults(progress, 
isStoped, storage);
+        buildArtifacts.addAll(clrf.getArtifacts(progress, isStoped, 
storage));
         return list;
     }
     private Progress progress;
@@ -271,6 +272,7 @@
             Configuration conf = new Configuration() {
 
                 private List<SourceFileProperties> myFileProperties;
+                private List<String> myBuildArtifacts;
                 private List<String> myIncludedFiles = new 
ArrayList<String>();
 
                 @Override
@@ -285,15 +287,23 @@
 
                 @Override
                 public List<String> getBuildArtifacts() {
-                    return null;
+                    if (myBuildArtifacts == null) {
+                        myBuildArtifacts = Collections.synchronizedList(new 
ArrayList<String>());
+                        String set = (String) 
getProperty(EXEC_LOG_KEY).getValue();
+                        if (set != null && set.length() > 0) {
+                            myFileProperties = getSourceFileProperties(new 
String[]{set}, null, project, null, myBuildArtifacts, new 
CompileLineStorage());
+                        }
+                    }
+                    return myBuildArtifacts;
                 }
 
                 @Override
                 public List<SourceFileProperties> getSourcesConfiguration() {
                     if (myFileProperties == null) {
+                        myBuildArtifacts = Collections.synchronizedList(new 
ArrayList<String>());
                         String set = (String) 
getProperty(EXEC_LOG_KEY).getValue();
                         if (set != null && set.length() > 0) {
-                            myFileProperties = getSourceFileProperties(new 
String[]{set}, null, project, null, new CompileLineStorage());
+                            myFileProperties = getSourceFileProperties(new 
String[]{set}, null, project, null, myBuildArtifacts, new 
CompileLineStorage());
                         }
                     }
                     return myFileProperties;
@@ -317,6 +327,7 @@
         private final String root;
         private final String fileName;
         private List<SourceFileProperties> result;
+        private List<String> buildArtifacts;
         private final ProjectProxy project;
         private final PathMap pathMapper;
         private final FileSystem fileSystem;
@@ -381,6 +392,7 @@
 
         private void run(Progress progress, AtomicBoolean isStoped, 
CompileLineStorage storage) {
             result = new ArrayList<SourceFileProperties>();
+            buildArtifacts = new ArrayList<String>();
             File file = new File(fileName);
             if (file.exists() && file.canRead()) {
                 try {
@@ -455,6 +467,13 @@
             return result;
         }
         
+        public List<String> getArtifacts(Progress progress, AtomicBoolean 
isStoped, CompileLineStorage storage) {
+            if (buildArtifacts == null) {
+                run(progress, isStoped, storage);
+            }
+            return buildArtifacts;
+        }
+        
         private void addSources(String tool, List<String> args, 
CompileLineStorage storage) {
             String compiler;
             ItemProperties.LanguageKind language;
@@ -617,39 +636,77 @@
         
         private void processLibrary(String tool, List<String> args, 
CompileLineStorage storage) {
             //TODO: get library name
-/*            
-called: /usr/ccs/bin/ld
-       
/var/tmp/alsimon-cnd-test-downloads/pkg-config-0.25/glib-1.2.10/gmodule
-       /usr/ccs/bin/ld
-       -zld32=-S/tmp/lib_link.1359732141.24769.01/libldstab_ws.so
-       -zld64=-S/tmp/lib_link.1359732141.24769.01/amd64/libldstab_ws.so
-       -zld32=-S/tmp/lib_link.1359732141.24769.01/libld_annotate.so
-       -zld64=-S/tmp/lib_link.1359732141.24769.01/amd64/libld_annotate.so
-       /opt/solarisstudio12.3/prod/lib/crti.o
-       /opt/solarisstudio12.3/prod/lib/crt1.o
-       /opt/solarisstudio12.3/prod/lib/values-xa.o
-       testgmodule.o
-       ./.libs/libgmodule.a
-       ../.libs/libglib.a
-       -o
-       testgmodule
-       -Y
-       P,/opt/solarisstudio12.3/prod/lib:/usr/ccs/lib:/lib:/usr/lib
-       -Qy
-       -lc
-       /opt/solarisstudio12.3/prod/lib/crtn.o
-
-called: /usr/ccs/bin/ar
-       /var/tmp/alsimon-cnd-test-downloads/pkg-config-0.25/popt
-       ar
-       cru
-       .libs/libpopt.a
-       .libs/popt.o
-       .libs/poptconfig.o
-       .libs/popthelp.o
-       .libs/poptparse.o
-       .libs/findme.o
-*/            
+            if ("ar".equals(tool)) { // NOI18N
+                // static library
+                //called: /usr/ccs/bin/ar
+                //        
/var/tmp/alsimon-cnd-test-downloads/pkg-config-0.25/popt
+                //        ar
+                //        cru
+                //        .libs/libpopt.a
+                //        .libs/popt.o
+                //        .libs/poptconfig.o
+            } else if ("ld".equals(tool)) { // NOI18N
+                // executable or dynamic library
+                //called: /usr/ccs/bin/ld
+                //        
/var/tmp/alsimon-cnd-test-downloads/pkg-config-0.25/glib-1.2.10/gmodule
+                //        /usr/ccs/bin/ld
+                //        
-zld32=-S/tmp/lib_link.1359732141.24769.01/libldstab_ws.so
+                //        /opt/solarisstudio12.3/prod/lib/crti.o
+                //        testgmodule.o
+                //        ./.libs/libgmodule.a
+                //        ../.libs/libglib.a
+                //        -o
+                //        testgmodule
+                //        -Y
+                //        
P,/opt/solarisstudio12.3/prod/lib:/usr/ccs/lib:/lib:/usr/lib
+                //        -Qy
+                //        -lc
+                //        /opt/solarisstudio12.3/prod/lib/crtn.o
+                Iterator<String> iterator = args.iterator();
+                if (!iterator.hasNext()) {
+                    return;
+                }
+                String compilePath = iterator.next();
+                if (pathMapper != null) {
+                    String anCompilePath = 
pathMapper.getLocalPath(compilePath);
+                    if (anCompilePath != null) {
+                        compilePath = anCompilePath;
+                    }
+                }
+                if (!iterator.hasNext()) {
+                    return;
+                }
+                // skip tool
+                iterator.next();
+                String binary = null;
+                while(iterator.hasNext()) {
+                    String option = iterator.next();
+                    if ("-o".equals(option)) { // NOI18N
+                        if (iterator.hasNext()) {
+                            binary = iterator.next();
+                            break;
+                        }
+                    }
+                }
+                if (binary != null) {
+                    String fullName;
+                    if (binary.startsWith("/")){  //NOI18N
+                        if (pathMapper != null) {
+                            String mapped = pathMapper.getLocalPath(binary);
+                            if (mapped != null) {
+                                binary = mapped;
+                            }
+                        }
+                        fullName = binary;
+                    } else {
+                        fullName = compilePath+"/"+binary; //NOI18N
+                    }
+                    FileObject f = fileSystem.findResource(fullName);
+                    if (f != null && f.isValid() && f.isData()) {
+                        buildArtifacts.add(fullName);
+                    }
+                }
+            }
         }
     }
     
diff --git 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecutable.java
 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecutable.java
--- 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecutable.java
+++ 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeExecutable.java
@@ -326,12 +326,12 @@
                         if (set != null && set.length() > 0) {
                             String[] add = 
(String[])getProperty(LIBRARIES_KEY).getValue();
                             if (add == null || add.length==0) {
-                                myFileProperties = 
getSourceFileProperties(new String[]{set},null, project, myDependencies, new 
CompileLineStorage());
+                                myFileProperties = 
getSourceFileProperties(new String[]{set},null, project, myDependencies, 
null, new CompileLineStorage());
                             } else {
                                 String[] all = new String[add.length+1];
                                 all[0] = set;
                                 System.arraycopy(add, 0, all, 1, add.length);
-                                myFileProperties = 
getSourceFileProperties(all,null, project, myDependencies, new 
CompileLineStorage());
+                                myFileProperties = 
getSourceFileProperties(all,null, project, myDependencies, null, new 
CompileLineStorage());
                             }
                         }
                     }
diff --git 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeFolder.java
 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeFolder.java
--- 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeFolder.java
+++ 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeFolder.java
@@ -246,7 +246,7 @@
                                 progress.start(set.size());
                             }
                             if (set.size() > 0) {
-                                myFileProperties = 
getSourceFileProperties(set.toArray(new String[set.size()]), progress, 
project, null, new CompileLineStorage());
+                                myFileProperties = 
getSourceFileProperties(set.toArray(new String[set.size()]), progress, 
project, null, null, new CompileLineStorage());
                             } else {
                                 myFileProperties = new 
ArrayList<SourceFileProperties>();
                             }
diff --git 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeMakeLog.java
 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeMakeLog.java
--- 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeMakeLog.java
+++ 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/AnalyzeMakeLog.java
@@ -252,7 +252,7 @@
     }
 
     @Override
-    protected List<SourceFileProperties> getSourceFileProperties(String 
objFileName, Map<String,SourceFileProperties> map, ProjectProxy project, 
Set<String> dlls, CompileLineStorage storage){
+    protected List<SourceFileProperties> getSourceFileProperties(String 
objFileName, Map<String,SourceFileProperties> map, ProjectProxy project, 
Set<String> dlls, List<String> buildArtifacts, CompileLineStorage storage){
         ProviderProperty p = getProperty(RESTRICT_COMPILE_ROOT);
         String root = "";
         if (p != null) {
@@ -305,7 +305,7 @@
                             set = detectMakeLog(project);
                         }
                         if (set != null && set.length() > 0) {
-                            myFileProperties = getSourceFileProperties(new 
String[]{set},null, project, null, new CompileLineStorage());
+                            myFileProperties = getSourceFileProperties(new 
String[]{set},null, project, null, null, new CompileLineStorage());
                         }
                     }
                     return myFileProperties;
diff --git 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/BaseDwarfProvider.java
 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/BaseDwarfProvider.java
--- 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/BaseDwarfProvider.java
+++ 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/BaseDwarfProvider.java
@@ -121,13 +121,14 @@
         isStoped.set(true);
     }
 
-    protected List<SourceFileProperties> getSourceFileProperties(String[] 
objFileName, Progress progress, ProjectProxy project, Set<String> dlls, 
CompileLineStorage storage){
+    protected List<SourceFileProperties> getSourceFileProperties(String[] 
objFileName, Progress progress, ProjectProxy project,
+            Set<String> dlls, List<String> buildArtifacts, 
CompileLineStorage storage){
         CountDownLatch countDownLatch = new 
CountDownLatch(objFileName.length);
         RequestProcessor rp = new RequestProcessor("Parallel analyzing", 
CndUtils.getNumberCndWorkerThreads()); // NOI18N
         try{
             Map<String,SourceFileProperties> map = new 
ConcurrentHashMap<String,SourceFileProperties>();
             for (String file : objFileName) {
-                MyRunnable r = new MyRunnable(countDownLatch, file, map, 
progress, project, dlls, storage);
+                MyRunnable r = new MyRunnable(countDownLatch, file, map, 
progress, project, dlls, buildArtifacts, storage);
                 rp.post(r);
             }
             try {
@@ -253,7 +254,7 @@
         return null;
     }
         
-    private boolean processObjectFile(String file, Map<String, 
SourceFileProperties> map, Progress progress, ProjectProxy project, 
Set<String> dlls, CompileLineStorage storage) {
+    private boolean processObjectFile(String file, Map<String, 
SourceFileProperties> map, Progress progress, ProjectProxy project, 
Set<String> dlls, List<String> buildArtifacts, CompileLineStorage storage) {
         if (isStoped.get()) {
             return true;
         }
@@ -278,7 +279,7 @@
             }
         }
         FileSystem fileSystem  = getFileSystem(project);
-        for (SourceFileProperties f : getSourceFileProperties(file, map, 
project, dlls, storage)) {
+        for (SourceFileProperties f : getSourceFileProperties(file, map, 
project, dlls, buildArtifacts, storage)) {
             if (isStoped.get()) {
                 break;
             }
@@ -622,7 +623,7 @@
         return bestRoot;
     }
 
-    protected List<SourceFileProperties> getSourceFileProperties(String 
objFileName, Map<String, SourceFileProperties> map, ProjectProxy project, 
Set<String> dlls, CompileLineStorage storage) {
+    protected List<SourceFileProperties> getSourceFileProperties(String 
objFileName, Map<String, SourceFileProperties> map, ProjectProxy project, 
Set<String> dlls, List<String> buildArtifacts, CompileLineStorage storage) {
         List<SourceFileProperties> list = new 
ArrayList<SourceFileProperties>();
         Dwarf dump = null;
         try {
@@ -739,15 +740,18 @@
         private final CountDownLatch countDownLatch;
         private final ProjectProxy project;
         private final Set<String> dlls;
+        private final List<String> buildArtifacts;
         private final CompileLineStorage storage;
 
-        private MyRunnable(CountDownLatch countDownLatch, String file, 
Map<String, SourceFileProperties> map, Progress progress, ProjectProxy 
project, Set<String> dlls, CompileLineStorage storage){
+        private MyRunnable(CountDownLatch countDownLatch, String file, 
Map<String, SourceFileProperties> map, Progress progress, ProjectProxy 
project,
+                Set<String> dlls, List<String> buildArtifacts, 
CompileLineStorage storage){
             this.file = file;
             this.map = map;
             this.progress = progress;
             this.countDownLatch = countDownLatch;
             this.project = project;
             this.dlls = dlls;
+            this.buildArtifacts = buildArtifacts;
             this.storage = storage;
         }
         @Override
@@ -755,7 +759,7 @@
             try {
                 if (!isStoped.get()) {
                     Thread.currentThread().setName("Parallel analyzing 
"+file); // NOI18N
-                    processObjectFile(file, map, progress, project, dlls, 
storage);
+                    processObjectFile(file, map, progress, project, dlls, 
buildArtifacts, storage);
                 }
             } finally {
                 countDownLatch.countDown();
diff --git 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/DwarfProvider.java
 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/DwarfProvider.java
--- 
a/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/DwarfProvider.java
+++ 
b/cnd.dwarfdiscovery/src/org/netbeans/modules/cnd/dwarfdiscovery/provider/DwarfProvider.java
@@ -156,7 +156,7 @@
                     if (myFileProperties == null){
                         String[] objFileNames = 
(String[])getProperty(EXECUTABLES_KEY).getValue();
                         if (objFileNames != null) {
-                            myFileProperties = 
getSourceFileProperties(objFileNames,null, project, null, new 
CompileLineStorage());
+                            myFileProperties = 
getSourceFileProperties(objFileNames,null, project, null, null, new 
CompileLineStorage());
                         }
                     }
                     return myFileProperties;

[hg] main-silver: implement build artifacts provider (exec log p...

Alexander Simon 02/02/2013

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 131 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close