@Deprecated public FileObject find(String aPackage, String name, String ext) { // create enumeration of name to look for Enumeration<String> st = NbCollections.checkedEnumerationByFilter(new StringTokenizer(aPackage, "."), String.class, true); // NOI18N if ((name == null) || (ext == null)) { // search for folder, return the object only if it is folder FileObject fo = getAbstractRoot().find(st); return ((fo != null) && fo.isFolder()) ? fo : null; } else { Enumeration<String> en = Enumerations.concat(st, Enumerations.singleton(name + '.' + ext)); // tries to find it (can return null) return getAbstractRoot().find(en); } }
public FileObject findResource(String name) { if (name.length() == 0) { return getAbstractRoot(); } /**Next piece of code is preformance enhancement; lastEnum = last value cache; PathElements is StringTokenizer wrapper that caches individual elements*/ PathElements local = lastEnum; if ((local == null) || !local.getOriginalName().equals(name)) { local = new PathElements(name); lastEnum = local; } return getAbstractRoot().find(local.getEnumeration()); }
public FileObject find (String aPackage, String name, String ext) { // create enumeration of name to look for StringTokenizer st = new StringTokenizer (aPackage, "."); // NOI18N if (name == null || ext == null) { // search for folder, return the object only if it is folder FileObject fo = getAbstractRoot ().find (st); return fo != null && fo.isFolder() ? fo : null; } else { Enumeration en = org.openide.util.Enumerations.concat ( st, org.openide.util.Enumerations.singleton (name + '.' + ext) ); // tries to find it (can return null) return getAbstractRoot ().find (en); } }
public FileObject find (String aPackage, String name, String ext) { // create enumeration of name to look for StringTokenizer st = new StringTokenizer (aPackage, "."); // NOI18N if (name == null || ext == null) { // search for folder, return the object only if it is folder FileObject fo = getAbstractRoot ().find (st); return fo != null && fo.isFolder() ? fo : null; } else { Enumeration en = org.openide.util.Enumerations.concat ( st, org.openide.util.Enumerations.singleton (name + '.' + ext) ); // tries to find it (can return null) return getAbstractRoot ().find (en); } }
public FileObject findResource (String name) { if (name.length () == 0) { return getAbstractRoot (); } /**Next piece of code is preformance enhancement; lastEnum = last value cache; PathElements is StringTokenizer wrapper that caches individual elements*/ PathElements local = lastEnum; if (local == null || !local.getOriginalName().equals(name)) { local = new PathElements (name); lastEnum = local; } return getAbstractRoot ().find (local.getEnumeration()); }
public FileObject findResource (String name) { if (name.length () == 0) { return getAbstractRoot (); } /**Next piece of code is preformance enhancement; lastEnum = last value cache; PathElements is StringTokenizer wrapper that caches individual elements*/ PathElements local = lastEnum; if (local == null || !local.getOriginalName().equals(name)) { local = new PathElements (name); lastEnum = local; } return getAbstractRoot ().find (local.getEnumeration()); }
@Deprecated public FileObject find(String aPackage, String name, String ext) { // create enumeration of name to look for Enumeration<String> st = NbCollections.checkedEnumerationByFilter(new StringTokenizer(aPackage, "."), String.class, true); // NOI18N if ((name == null) || (ext == null)) { // search for folder, return the object only if it is folder FileObject fo = afs().getAbstractRoot().find(st); return ((fo != null) && fo.isFolder()) ? fo : null; } else { Enumeration<String> en = Enumerations.concat(st, Enumerations.singleton(name + '.' + ext)); // tries to find it (can return null) return afs().getAbstractRoot().find(en); } }