Lines 807-813
Link Here
|
807 |
"package bugs.b139621;\n" + |
807 |
"package bugs.b139621;\n" + |
808 |
"public class BasicTestBugs {\n" + |
808 |
"public class BasicTestBugs {\n" + |
809 |
" /**\n" + |
809 |
" /**\n" + |
810 |
" * This method returns an object\n" + |
810 |
" * Test with only an orphan comment in type declaration\n" + |
811 |
" * @see Obj\n" + |
811 |
" * @see Obj\n" + |
812 |
" */\n" + |
812 |
" */\n" + |
813 |
"}\n"; |
813 |
"}\n"; |
Lines 820-829
Link Here
|
820 |
String source = |
820 |
String source = |
821 |
"package bugs.b139621;\n" + |
821 |
"package bugs.b139621;\n" + |
822 |
"/**\n" + |
822 |
"/**\n" + |
823 |
" * This method returns an object\n" + |
823 |
" * Test with an existing javadoc type declaration\n" + |
|
|
824 |
" * @see Test\n" + |
825 |
" */\n" + |
826 |
"public class BasicTestBugs {\n" + |
827 |
" /**\n" + |
828 |
" * Test with only an orphan comment in type declaration\n" + |
829 |
" * @see Obj\n" + |
830 |
" */\n" + |
831 |
"}\n"; |
832 |
completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj"); |
833 |
assertSortedResults( |
834 |
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}" |
835 |
); |
836 |
} |
837 |
public void testBug139621c() throws JavaModelException { |
838 |
String source = |
839 |
"package bugs.b139621;\n" + |
840 |
"public class BasicTestBugs {\n" + |
841 |
" /**\n" + |
842 |
" * Test with only an orphan comment in type declaration\n" + |
843 |
" * (completion for tags)\n" + |
844 |
" * @\n" + |
845 |
" */\n" + |
846 |
"}\n"; |
847 |
completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@"); |
848 |
assertSortedResults( |
849 |
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
850 |
"category[JAVADOC_BLOCK_TAG]{@category, null, null, category, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
851 |
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
852 |
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
853 |
"exception[JAVADOC_BLOCK_TAG]{@exception, null, null, exception, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
854 |
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
855 |
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
856 |
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
857 |
"param[JAVADOC_BLOCK_TAG]{@param, null, null, param, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
858 |
"return[JAVADOC_BLOCK_TAG]{@return, null, null, return, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
859 |
"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
860 |
"serial[JAVADOC_BLOCK_TAG]{@serial, null, null, serial, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
861 |
"serialData[JAVADOC_BLOCK_TAG]{@serialData, null, null, serialData, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
862 |
"serialField[JAVADOC_BLOCK_TAG]{@serialField, null, null, serialField, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
863 |
"since[JAVADOC_BLOCK_TAG]{@since, null, null, since, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
864 |
"throws[JAVADOC_BLOCK_TAG]{@throws, null, null, throws, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
865 |
"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
866 |
"version[JAVADOC_BLOCK_TAG]{@version, null, null, version, null, "+this.positions+JAVADOC_RELEVANCE+"}" |
867 |
); |
868 |
} |
869 |
public void testBug139621d() throws JavaModelException { |
870 |
String source = |
871 |
"package bugs.b139621;\n" + |
872 |
"public class BasicTestBugs {\n" + |
873 |
" /**\n" + |
874 |
" * Test with only an orphan comment in type declaration\n" + |
875 |
" * (variation of completion for tags but considered in text as it's in fact tag start character is after a reference )\n" + |
876 |
" * @see Object" + // missing \n |
877 |
" * @\n" + |
878 |
" */\n" + |
879 |
"}\n"; |
880 |
completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@", 2); |
881 |
assertSortedResults( |
882 |
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
883 |
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
884 |
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
885 |
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
886 |
"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}" |
887 |
); |
888 |
} |
889 |
public void testBug139621e() throws JavaModelException { |
890 |
String source = |
891 |
"package bugs.b139621;\n" + |
892 |
"/**\n" + |
893 |
" * Test with orphan comment after a method declaration\n" + |
894 |
" * @see Test\n" + |
895 |
" */\n" + |
896 |
"public class BasicTestBugs {\n" + |
897 |
" public void foo() {}\n" + |
898 |
" /**\n" + |
899 |
" * This method returns an object\n" + |
900 |
" * @see Obj\n" + |
901 |
" */\n" + |
902 |
"}\n"; |
903 |
completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj"); |
904 |
assertSortedResults( |
905 |
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}" |
906 |
); |
907 |
} |
908 |
public void testBug139621f() throws JavaModelException { |
909 |
String source = |
910 |
"package bugs.b139621;\n" + |
911 |
"/**\n" + |
912 |
" * Test with orphan comment after a field declaration\n" + |
824 |
" * @see Test\n" + |
913 |
" * @see Test\n" + |
825 |
" */\n" + |
914 |
" */\n" + |
826 |
"public class BasicTestBugs {\n" + |
915 |
"public class BasicTestBugs {\n" + |
|
|
916 |
" public int x;\n" + |
827 |
" /**\n" + |
917 |
" /**\n" + |
828 |
" * This method returns an object\n" + |
918 |
" * This method returns an object\n" + |
829 |
" * @see Obj\n" + |
919 |
" * @see Obj\n" + |
Lines 834-839
Link Here
|
834 |
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}" |
924 |
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}" |
835 |
); |
925 |
); |
836 |
} |
926 |
} |
|
|
927 |
public void testBug139621g() throws JavaModelException { |
928 |
String source = |
929 |
"package bugs.b139621;\n" + |
930 |
"/**\n" + |
931 |
" * Compilation unit without any type\n" + |
932 |
" * @see Obj\n" + |
933 |
" */\n"; |
934 |
completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj"); |
935 |
assertSortedResults( |
936 |
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}" |
937 |
); |
938 |
} |
939 |
public void testBug139621h() throws JavaModelException { |
940 |
String source = |
941 |
"package bugs.b139621;\n" + |
942 |
"/**\n" + |
943 |
" * Compilation unit without any type\n" + |
944 |
" * (completion for tags)\n" + |
945 |
" * @\n" + |
946 |
" */\n"; |
947 |
completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@"); |
948 |
assertSortedResults( |
949 |
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
950 |
"category[JAVADOC_BLOCK_TAG]{@category, null, null, category, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
951 |
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
952 |
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
953 |
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
954 |
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
955 |
"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
956 |
"serial[JAVADOC_BLOCK_TAG]{@serial, null, null, serial, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
957 |
"since[JAVADOC_BLOCK_TAG]{@since, null, null, since, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
958 |
"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
959 |
"version[JAVADOC_BLOCK_TAG]{@version, null, null, version, null, "+this.positions+JAVADOC_RELEVANCE+"}" |
960 |
); |
961 |
} |
962 |
public void testBug139621i() throws JavaModelException { |
963 |
String source = |
964 |
"package bugs.b139621;\n" + |
965 |
"/**\n" + |
966 |
" * Compilation unit without any type\n" + |
967 |
" * (variation of completion for tags but considered in text as it's in fact tag start character is after a reference )\n" + |
968 |
" * @see Object The root class" + // missing \n |
969 |
" * @\n" + |
970 |
" */\n"; |
971 |
completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@", 2); |
972 |
assertSortedResults( |
973 |
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
974 |
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
975 |
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + |
976 |
"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}" |
977 |
); |
978 |
} |
837 |
|
979 |
|
838 |
/** |
980 |
/** |
839 |
* Bug 144866: [assist][javadoc] Wrong completion inside @value tag |
981 |
* Bug 144866: [assist][javadoc] Wrong completion inside @value tag |