Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## YAML Template.
---
language: java
8 changes: 4 additions & 4 deletions nbproject/genfiles.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
<specification-version>8.8.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.ui</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.6.1</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<test-dependencies>
<test-type>
Expand Down
3 changes: 3 additions & 0 deletions src/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## YAML Template.
---
language: java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.openide.util.Exceptions;

public class NgDocCache {
private final Map<String, List<NgDoc>> cache = new HashMap<String, List<NgDoc>>();
private final Map<String, List<NgDoc>> cache = new HashMap<>();

public NgDocCache() {
FileUtil.addFileChangeListener(new UpdateCacheWhenJsFileChangedListener());
Expand Down Expand Up @@ -65,7 +65,7 @@ public List<NgDoc> getNgDocs(Project project) {

private static List<NgDoc> readProjectNgDocsFromFiles(Project project) {
List<FileObject> jsFiles = NgUtils.findByMimeType(project.getProjectDirectory(), "text/javascript");
List<NgDoc> result = new ArrayList<NgDoc>();
List<NgDoc> result = new ArrayList<>();
for (FileObject jsFile : jsFiles) {
System.out.println(" -- " + jsFile.getPath());
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private String getInTagName() {

private int lookLeftUntil(Character... lookFor) {
Character[] l = lookFor;
HashSet<Character> set = new HashSet<Character>(Arrays.asList(l));
HashSet<Character> set = new HashSet<>(Arrays.asList(l));
int offset = caretOffset - 1;
try {
while (offset >= 0 && !set.contains(charAt(offset))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected void query(CompletionResultSet resultSet, Document document, int caret
return;
}
String filter = ctx.getFilter();
Set<String> added = new HashSet<String>();
Set<String> added = new HashSet<>();
for (NgDoc ngDoc : getNgDocs()) {
String type = ngDoc.getAttribute("@ngdoc");
String name = ngDoc.getAttribute("@name");
Expand Down
4 changes: 2 additions & 2 deletions src/com/github/mdolk/ng/netbeans/codecompletion/NgUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static List<FileObject> findByMimeType(FileObject root, String mime) {
if (!root.isFolder()) {
throw new IllegalArgumentException("Not a folder");
}
List<FileObject> result = new ArrayList<FileObject>();
List<FileObject> result = new ArrayList<>();
Enumeration<? extends FileObject> children = root.getChildren(true);
while (children.hasMoreElements()) {
FileObject file = children.nextElement();
Expand All @@ -30,7 +30,7 @@ public static List<FileObject> findByMimeType(FileObject root, String mime) {
public static List<String> getDocComments(String s) {
Pattern pattern = Pattern.compile("/\\*\\*.*?\\*/", Pattern.DOTALL);
Matcher matcher = pattern.matcher(s);
List<String> result = new ArrayList<String>();
List<String> result = new ArrayList<>();
while (matcher.find()) {
result.add(matcher.group());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down