diff -r 25787ba8d904 editor/src/org/netbeans/modules/editor/impl/KitsTrackerImpl.java --- a/editor/src/org/netbeans/modules/editor/impl/KitsTrackerImpl.java Mon Jan 19 09:15:39 2009 +0100 +++ b/editor/src/org/netbeans/modules/editor/impl/KitsTrackerImpl.java Mon Jan 19 11:47:19 2009 +0100 @@ -301,7 +301,24 @@ } private static FileObject findKitRegistration(FileObject folder) { + Set filesWithInstanceOfAttribute = new HashSet(); + Set otherFiles = new HashSet(); + for(FileObject f : folder.getChildren()) { + if (f.getAttribute("instanceOf") != null) { //NOI18N + filesWithInstanceOfAttribute.add(f); + } else { + otherFiles.add(f); + } + } + + for(FileObject f : filesWithInstanceOfAttribute) { + if (isInstanceOf(f, EditorKit.class, false)) { + return f; + } + } + + for(FileObject f : otherFiles) { if (isInstanceOf(f, EditorKit.class, false)) { return f; }