Lines 91-96
Link Here
|
91 |
import org.netbeans.api.project.Sources; |
91 |
import org.netbeans.api.project.Sources; |
92 |
import org.netbeans.api.queries.FileEncodingQuery; |
92 |
import org.netbeans.api.queries.FileEncodingQuery; |
93 |
import org.netbeans.api.queries.VersioningQuery; |
93 |
import org.netbeans.api.queries.VersioningQuery; |
|
|
94 |
import org.netbeans.modules.versioning.core.api.VCSFileProxy; |
94 |
import org.netbeans.modules.versioning.spi.VersioningSystem; |
95 |
import org.netbeans.modules.versioning.spi.VersioningSystem; |
95 |
import org.openide.ErrorManager; |
96 |
import org.openide.ErrorManager; |
96 |
import org.openide.awt.AcceleratorBinding; |
97 |
import org.openide.awt.AcceleratorBinding; |
Lines 298-308
Link Here
|
298 |
* @return <code>true</code> if the folder identified by the given path |
299 |
* @return <code>true</code> if the folder identified by the given path |
299 |
* should be skipped when searching for metadata. |
300 |
* should be skipped when searching for metadata. |
300 |
* @since 1.54 |
301 |
* @since 1.54 |
|
|
302 |
* @deprecated use org.netbeans.modules.versioning.core.Utils.isForbiddenFolder() |
301 |
*/ |
303 |
*/ |
302 |
public static boolean isForbiddenFolder (String folderPath) { |
304 |
public static boolean isForbiddenFolder (String folderPath) { |
303 |
return forbiddenFolders.contains(folderPath); |
305 |
return forbiddenFolders.contains(folderPath); |
304 |
} |
306 |
} |
305 |
|
307 |
|
|
|
308 |
/** |
309 |
* Some folders are special and versioning should not look for metadata in |
310 |
* them. Folders like /net with automount enabled may take a long time to |
311 |
* answer I/O on their children, so |
312 |
* <code>VCSFileProxy.exists("/net/.git")</code> will freeze until it |
313 |
* timeouts. You should call this method before asking any I/O on children |
314 |
* of this folder you are unsure to actually exist. This does not mean |
315 |
* however that whole subtree should be excluded from version control, only |
316 |
* that you should not look for the metadata directly in this folder. |
317 |
* Returns <code>true</code> if the given folder is among such folders. |
318 |
* |
319 |
* @param folderPath path to a folder to query |
320 |
* @return <code>true</code> if the folder identified by the given path |
321 |
* should be skipped when searching for metadata. |
322 |
* @since 1.54 |
323 |
*/ |
324 |
public static boolean isForbiddenFolder (File folder) { |
325 |
return org.netbeans.modules.versioning.core.Utils.isForbiddenFolder(VCSFileProxy.createFileProxy(folder)); |
326 |
} |
327 |
|
306 |
private static DataObject findDataObject(File file) { |
328 |
private static DataObject findDataObject(File file) { |
307 |
FileObject fo = FileUtil.toFileObject(file); |
329 |
FileObject fo = FileUtil.toFileObject(file); |
308 |
if (fo != null) { |
330 |
if (fo != null) { |