As of http://hg.netbeans.org/jet-main/nb-javac/rev/b4e7a57af8df, ClassTree.getKind returns not only Tree.Kind.CLASS, but also Tree.Kind.ANNOTATION_TYPE, Tree.Kind.ENUM and Tree.Kind.INTERFACE - adjusting modules in NetBeans main to that.
Module owners, please double check the changes.
1.1 --- a/visualweb.insync/manifest.mf Thu Sep 16 16:57:10 2010 -0400
1.2 +++ b/visualweb.insync/manifest.mf Tue Oct 12 15:33:58 2010 +0200
1.3 @@ -1,5 +1,5 @@
1.4 Manifest-Version: 1.0
1.5 -OpenIDE-Module-Specification-Version: 2.9
1.6 +OpenIDE-Module-Specification-Version: 2.10
1.7 OpenIDE-Module: org.netbeans.modules.visualweb.insync/1
1.8 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visualweb/insync/Bundle.properties
1.9 OpenIDE-Module-Install: org/netbeans/modules/visualweb/insync/ModuleInstaller.class
2.1 --- a/visualweb.insync/nbproject/project.xml Thu Sep 16 16:57:10 2010 -0400
2.2 +++ b/visualweb.insync/nbproject/project.xml Tue Oct 12 15:33:58 2010 +0200
2.3 @@ -133,7 +133,7 @@
2.4 <build-prerequisite/>
2.5 <compile-dependency/>
2.6 <run-dependency>
2.7 - <specification-version>0.4.0.1.3</specification-version>
2.8 + <specification-version>0.67</specification-version>
2.9 </run-dependency>
2.10 </dependency>
2.11 <dependency>
3.1 --- a/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/refactoring/ElementGripFactory.java Thu Sep 16 16:57:10 2010 -0400
3.2 +++ b/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/refactoring/ElementGripFactory.java Tue Oct 12 15:33:58 2010 +0200
3.3 @@ -51,6 +51,7 @@
3.4 import java.util.WeakHashMap;
3.5 import javax.lang.model.element.Element;
3.6 import org.netbeans.api.java.source.CompilationInfo;
3.7 +import org.netbeans.api.java.source.TreeUtilities;
3.8 import org.openide.filesystems.FileObject;
3.9
3.10 /**
3.11 @@ -140,7 +141,7 @@
3.12 long end = info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), t);
3.13 Element current = info.getTrees().getElement(tp);
3.14 Tree.Kind kind = tp.getLeaf().getKind();
3.15 - if (kind != Tree.Kind.CLASS && kind != Tree.Kind.METHOD) {
3.16 + if (!TreeUtilities.CLASS_TREE_KINDS.contains(kind) && kind != Tree.Kind.METHOD) {
3.17 if (tp.getParentPath()==null || tp.getParentPath().getLeaf().getKind() == Tree.Kind.COMPILATION_UNIT) {
3.18 //xxx: rather workaround. should be fixed better.
3.19 return null;
4.1 --- a/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/refactoring/FacesRefactoringsPluginFactory.java Thu Sep 16 16:57:10 2010 -0400
4.2 +++ b/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/refactoring/FacesRefactoringsPluginFactory.java Tue Oct 12 15:33:58 2010 +0200
4.3 @@ -48,6 +48,7 @@
4.4
4.5 import org.netbeans.api.fileinfo.NonRecursiveFolder;
4.6 import org.netbeans.api.java.source.TreePathHandle;
4.7 +import org.netbeans.api.java.source.TreeUtilities;
4.8 import org.netbeans.modules.refactoring.api.AbstractRefactoring;
4.9 import org.netbeans.modules.refactoring.api.MoveRefactoring;
4.10 import org.netbeans.modules.refactoring.api.RenameRefactoring;
4.11 @@ -144,7 +145,7 @@
4.12 FacesModelSet.getInstance(refactoredFileObject);
4.13 if (FacesRefactoringUtils.isJavaFileObjectOfInterest(refactoredFileObject)) {
4.14 TreePathHandle treePathHandle = refactoringSource.lookup(TreePathHandle.class);
4.15 - if (treePathHandle == null || treePathHandle.getKind() == Tree.Kind.CLASS) {
4.16 + if (treePathHandle == null || TreeUtilities.CLASS_TREE_KINDS.contains(treePathHandle.getKind())) {
4.17 if (refactoring instanceof RenameRefactoring) {
4.18 return new FacesJavaFileRenameRefactoringPlugin((RenameRefactoring)refactoring);
4.19 } else if (refactoring instanceof MoveRefactoring) {
5.1 --- a/visualweb.insync/src/org/netbeans/modules/visualweb/insync/java/JavaClass.java Thu Sep 16 16:57:10 2010 -0400
5.2 +++ b/visualweb.insync/src/org/netbeans/modules/visualweb/insync/java/JavaClass.java Tue Oct 12 15:33:58 2010 +0200
5.3 @@ -77,6 +77,7 @@
5.4 import org.netbeans.api.java.source.CompilationInfo;
5.5 import org.netbeans.api.java.source.ElementHandle;
5.6 import org.netbeans.api.java.source.TreeMaker;
5.7 +import org.netbeans.api.java.source.TreeUtilities;
5.8 import org.netbeans.api.java.source.WorkingCopy;
5.9 import org.netbeans.modules.visualweb.insync.beans.Bean;
5.10 import org.netbeans.modules.visualweb.insync.beans.BeansUnit;
5.11 @@ -745,7 +746,7 @@
5.12 public Object run(CompilationInfo cinfo) {
5.13 CompilationUnitTree cunit = cinfo.getCompilationUnit();
5.14 for(Tree tree : cunit.getTypeDecls()) {
5.15 - if(tree.getKind() == Tree.Kind.CLASS) {
5.16 + if(TreeUtilities.CLASS_TREE_KINDS.contains(tree.getKind())) {
5.17 ClassTree clazz = (ClassTree)tree;
5.18 if(clazz.getSimpleName().toString().equals(fObj.getName()) &&
5.19 clazz.getModifiers().getFlags().contains(Modifier.PUBLIC)) {