hotspot/make/src/classes/build/tools/projectcreator/FileTreeCreatorVC10.java
author duke
Wed, 05 Jul 2017 22:53:30 +0200
changeset 43880 b5015f742ba6
parent 38247 6ff550a6307e
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     1
/*
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 19277
diff changeset
     2
 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     4
 *
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     7
 * published by the Free Software Foundation.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     8
 *
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    13
 * accompanied this code).
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    14
 *
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    18
 *
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    21
 * questions.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    22
 *
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    23
 */
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    24
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 19277
diff changeset
    25
package build.tools.projectcreator;
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 19277
diff changeset
    26
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    27
import static java.nio.file.FileVisitResult.CONTINUE;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    28
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    29
import java.io.IOException;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    30
import java.nio.file.FileSystems;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    31
import java.nio.file.FileVisitResult;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    32
import java.nio.file.Files;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    33
import java.nio.file.Path;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    34
import java.nio.file.attribute.BasicFileAttributes;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    35
import java.util.Stack;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    36
import java.util.Vector;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    37
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    38
public class FileTreeCreatorVC10 extends FileTreeCreator {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    39
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    40
      public FileTreeCreatorVC10(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatformVC10 wg) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    41
         super(startDir, allConfigs, wg);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    42
      }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    43
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    44
      @Override
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    45
      public FileVisitResult visitFile(Path file, BasicFileAttributes attr) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    46
         DirAttributes currentFileAttr = attributes.peek().clone();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    47
         boolean usePch = false;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    48
         boolean disablePch = false;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    49
         boolean useIgnore = false;
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    50
         boolean isAltSrc = false;  // only needed as a debugging crumb
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    51
         boolean isReplacedByAltSrc = false;
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    52
         String fileName = file.getFileName().toString();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    53
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    54
         // TODO hideFile
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    55
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    56
         // usePch applies to all configs for a file.
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    57
         if (fileName.equals(BuildConfig.getFieldString(null, "UseToGeneratePch"))) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    58
            usePch = true;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    59
         }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    60
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    61
         String fileLoc = vcProjLocation.relativize(file).toString();
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    62
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    63
         // isAltSrc and isReplacedByAltSrc applies to all configs for a file
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    64
         if (BuildConfig.matchesRelativeAltSrcInclude(
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    65
               file.toAbsolutePath().toString())) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    66
            // current file is an alternate source file so track it
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    67
            isAltSrc = true;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    68
            BuildConfig.trackRelativeAltSrcFile(
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    69
                file.toAbsolutePath().toString());
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    70
         } else if (BuildConfig.matchesRelativeAltSrcFile(
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    71
                    file.toAbsolutePath().toString())) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    72
            // current file is a regular file that matches an alternate
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    73
            // source file so yack about replacing the regular file
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    74
            isReplacedByAltSrc = true;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    75
            System.out.println("INFO: alternate source file '" +
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    76
                               BuildConfig.getMatchingRelativeAltSrcFile(
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    77
                                   file.toAbsolutePath().toString()) +
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    78
                               "' replaces '" + fileLoc + "'");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    79
         }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
    80
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    81
         for (BuildConfig cfg : allConfigs) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    82
            if (cfg.lookupHashFieldInContext("IgnoreFile", fileName) != null) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    83
               useIgnore = true;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    84
               currentFileAttr.setIgnore(cfg);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    85
            } else if (cfg.matchesIgnoredPath(file.toAbsolutePath().toString())) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    86
               useIgnore = true;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    87
               currentFileAttr.setIgnore(cfg);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    88
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    89
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    90
            if (cfg.lookupHashFieldInContext("DisablePch", fileName) != null) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    91
               disablePch = true;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    92
               currentFileAttr.setDisablePch(cfg);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    93
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    94
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    95
            Vector<String> rv = new Vector<String>();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    96
            cfg.collectRelevantVectors(rv, "AdditionalFile");
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    97
            for(String addFile : rv) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    98
               if (addFile.equals(fileName)) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
    99
                  // supress any ignore
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   100
                  // TODO - may need some adjustments
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   101
                  if (file.toAbsolutePath().toString().contains(cfg.get("Flavour"))) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   102
                     currentFileAttr.removeFromIgnored(cfg);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   103
                  }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   104
               }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   105
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   106
         }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   107
19277
8952a5e25673 8022740: Visual 2008 IDE build is broken
iklam
parents: 19270
diff changeset
   108
         String tagName = wg10.getFileTagFromSuffix(fileName);
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   109
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
   110
         if (!useIgnore && !disablePch && !usePch && !isReplacedByAltSrc) {
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   111
            wg.tag(tagName, new String[] { "Include", fileLoc});
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   112
         } else {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   113
            wg.startTag(
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   114
                  tagName,
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   115
                  new String[] { "Include", fileLoc});
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   116
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   117
            for (BuildConfig cfg : allConfigs) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   118
               boolean ignore = currentFileAttr.hasIgnore(cfg);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   119
               if (ignore) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   120
                  wg.tagData("ExcludedFromBuild", "true", "Condition", "'$(Configuration)|$(Platform)'=='" + cfg.get("Name") + "'");
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   121
               }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   122
               if (usePch) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   123
                  wg.tagData("PrecompiledHeader", "Create", "Condition", "'$(Configuration)|$(Platform)'=='" + cfg.get("Name") + "'");
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   124
               }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   125
               if (disablePch) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   126
                  wg.tag("PrecompiledHeader", "Condition", "'$(Configuration)|$(Platform)'=='" + cfg.get("Name") + "'");
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   127
               }
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
   128
               if (isReplacedByAltSrc) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
   129
                  wg.tagData("ExcludedFromBuild", "true", "Condition",
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
   130
                             "'$(Configuration)|$(Platform)'=='" +
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
   131
                             cfg.get("Name") + "'");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
   132
               }
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   133
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   134
            wg.endTag();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   135
         }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   136
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   137
         String filter = startDir.relativize(file.getParent().toAbsolutePath()).toString();
19277
8952a5e25673 8022740: Visual 2008 IDE build is broken
iklam
parents: 19270
diff changeset
   138
         wg10.addFilterDependency(fileLoc, filter);
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   139
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   140
         return CONTINUE;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   141
      }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   142
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   143
      @Override
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   144
      public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs)
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   145
            throws IOException {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   146
         Boolean hide = false;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   147
         // TODO remove attrs, if path is matched in this dir, then it is too in every subdir.
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   148
         // And we will check anyway
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   149
         DirAttributes newAttr = attributes.peek().clone();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   150
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   151
         // check per config ignorePaths!
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   152
         for (BuildConfig cfg : allConfigs) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   153
            if (cfg.matchesIgnoredPath(path.toAbsolutePath().toString())) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   154
               newAttr.setIgnore(cfg);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   155
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   156
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   157
            // Hide is always on all configs. And additional files are never hiddden
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   158
            if (cfg.matchesHidePath(path.toAbsolutePath().toString())) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   159
               hide = true;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   160
               break;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   161
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   162
         }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   163
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   164
         if (!hide) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   165
            String name = startDir.relativize(path.toAbsolutePath()).toString();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   166
            if (!"".equals(name)) {
19277
8952a5e25673 8022740: Visual 2008 IDE build is broken
iklam
parents: 19270
diff changeset
   167
               wg10.addFilter(name);
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   168
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   169
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   170
            attributes.push(newAttr);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   171
            return super.preVisitDirectory(path, attrs);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   172
         } else {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   173
            return FileVisitResult.SKIP_SUBTREE;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   174
         }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   175
      }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   176
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   177
      @Override
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   178
      public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   179
         //end matching attributes set by ignorepath
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   180
         attributes.pop();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   181
         return CONTINUE;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   182
      }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   183
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   184
      @Override
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   185
      public FileVisitResult visitFileFailed(Path file, IOException exc) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   186
         return CONTINUE;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   187
      }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   188
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   189
      public void writeFileTree() throws IOException {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   190
         Files.walkFileTree(this.startDir, this);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents:
diff changeset
   191
      }
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 13892
diff changeset
   192
}