diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2b5f517 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +## YAML Template. +--- +language: java \ No newline at end of file diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 424306b..771938a 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=4df9123e +build.xml.data.CRC32=a983ed61 build.xml.script.CRC32=09922fb1 -build.xml.stylesheet.CRC32=a56c6a5b@1.46.2 +build.xml.stylesheet.CRC32=a56c6a5b@2.72.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=4df9123e +nbproject/build-impl.xml.data.CRC32=a983ed61 nbproject/build-impl.xml.script.CRC32=850bcdad -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.72.1 diff --git a/nbproject/project.properties b/nbproject/project.properties index 6372b97..d2739ba 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,4 +1,4 @@ -javac.source=1.6 +javac.source=1.7 javac.compilerargs=-Xlint -Xlint:-serial license.file=license/gpl-2.0.txt nbm.homepage=https://github.com/mdolk/angular-netbeans-plugin diff --git a/nbproject/project.xml b/nbproject/project.xml index 1fd12d7..0f04217 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -65,6 +65,14 @@ 8.8.1 + + org.openide.util.ui + + + + 9.6.1 + + diff --git a/src/.travis.yml b/src/.travis.yml new file mode 100644 index 0000000..2b5f517 --- /dev/null +++ b/src/.travis.yml @@ -0,0 +1,3 @@ +## YAML Template. +--- +language: java \ No newline at end of file diff --git a/src/com/github/mdolk/ng/netbeans/codecompletion/NgDocCache.java b/src/com/github/mdolk/ng/netbeans/codecompletion/NgDocCache.java index a28e9f9..aa3622b 100644 --- a/src/com/github/mdolk/ng/netbeans/codecompletion/NgDocCache.java +++ b/src/com/github/mdolk/ng/netbeans/codecompletion/NgDocCache.java @@ -16,7 +16,7 @@ import org.openide.util.Exceptions; public class NgDocCache { - private final Map> cache = new HashMap>(); + private final Map> cache = new HashMap<>(); public NgDocCache() { FileUtil.addFileChangeListener(new UpdateCacheWhenJsFileChangedListener()); @@ -65,7 +65,7 @@ public List getNgDocs(Project project) { private static List readProjectNgDocsFromFiles(Project project) { List jsFiles = NgUtils.findByMimeType(project.getProjectDirectory(), "text/javascript"); - List result = new ArrayList(); + List result = new ArrayList<>(); for (FileObject jsFile : jsFiles) { System.out.println(" -- " + jsFile.getPath()); try { diff --git a/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionContext.java b/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionContext.java index 54f318d..f904d5c 100644 --- a/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionContext.java +++ b/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionContext.java @@ -47,7 +47,7 @@ private String getInTagName() { private int lookLeftUntil(Character... lookFor) { Character[] l = lookFor; - HashSet set = new HashSet(Arrays.asList(l)); + HashSet set = new HashSet<>(Arrays.asList(l)); int offset = caretOffset - 1; try { while (offset >= 0 && !set.contains(charAt(offset))) { diff --git a/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionProvider.java b/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionProvider.java index 5169cc7..41898aa 100644 --- a/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionProvider.java +++ b/src/com/github/mdolk/ng/netbeans/codecompletion/NgHtmlCompletionProvider.java @@ -35,7 +35,7 @@ protected void query(CompletionResultSet resultSet, Document document, int caret return; } String filter = ctx.getFilter(); - Set added = new HashSet(); + Set added = new HashSet<>(); for (NgDoc ngDoc : getNgDocs()) { String type = ngDoc.getAttribute("@ngdoc"); String name = ngDoc.getAttribute("@name"); diff --git a/src/com/github/mdolk/ng/netbeans/codecompletion/NgUtils.java b/src/com/github/mdolk/ng/netbeans/codecompletion/NgUtils.java index 1875e60..00445b6 100644 --- a/src/com/github/mdolk/ng/netbeans/codecompletion/NgUtils.java +++ b/src/com/github/mdolk/ng/netbeans/codecompletion/NgUtils.java @@ -13,7 +13,7 @@ public static List findByMimeType(FileObject root, String mime) { if (!root.isFolder()) { throw new IllegalArgumentException("Not a folder"); } - List result = new ArrayList(); + List result = new ArrayList<>(); Enumeration children = root.getChildren(true); while (children.hasMoreElements()) { FileObject file = children.nextElement(); @@ -30,7 +30,7 @@ public static List findByMimeType(FileObject root, String mime) { public static List getDocComments(String s) { Pattern pattern = Pattern.compile("/\\*\\*.*?\\*/", Pattern.DOTALL); Matcher matcher = pattern.matcher(s); - List result = new ArrayList(); + List result = new ArrayList<>(); while (matcher.find()) { result.add(matcher.group()); } diff --git a/test/unit/src/com/github/mdolk/ng/codecompletion/NgDocTest.java b/test/unit/src/com/github/mdolk/ng/codecompletion/NgDocTest.java index 386e81f..c2c745d 100644 --- a/test/unit/src/com/github/mdolk/ng/codecompletion/NgDocTest.java +++ b/test/unit/src/com/github/mdolk/ng/codecompletion/NgDocTest.java @@ -6,7 +6,7 @@ import static org.junit.Assert.*; public class NgDocTest { - private static String DOC = + private static final String DOC = "/**\n" + " * @workInProgress\n" + " * @ngdoc directive\n" +