AngularJSHtmlCodeAssistProcessor implements HTMLCodeAssistProcessor { protected List<String> getAngularAttributes(String text, boolean skipLast) { SplitResult fullAttributes = REGEXP_SPACES.split(text); List<String> attributesName = new ArrayList<>(); if (fullAttributes.length() > 0) { for (int i = 0; i < fullAttributes.length(); i++) { if (i == fullAttributes.length() - 1 && skipLast) { continue; } String attribute = fullAttributes.get(i); SplitResult attributeNameSplit = REGEXP_PROPERTY.split(attribute); attributesName.add(attributeNameSplit.get(0)); } } return attributesName; } @Inject  AngularJSHtmlCodeAssistProcessor(AngularJSResources angularJSResources); @Override void computeCompletionProposals(TextEditor textEditor, int offset, CodeAssistCallback codeAssistCallback); @Override String getErrorMessage();  }
@Test public void testAngularAttributes() { AngularJSHtmlCodeAssistProcessor codeAssistProcessor = new AngularJSHtmlCodeAssistProcessor(null); List<String> attributes = codeAssistProcessor.getAngularAttributes("my attributes", false); assertNotNull(attributes); assertTrue(Arrays.equals(new String[]{"my", "attributes"}, attributes.toArray())); attributes = codeAssistProcessor.getAngularAttributes("att1=\"val1\" att2=\"val2\"", false); assertNotNull(attributes); assertTrue(Arrays.equals(new String[]{"att1", "att2"}, attributes.toArray())); attributes = codeAssistProcessor.getAngularAttributes("body att2", true); assertNotNull(attributes); assertTrue(Arrays.equals(new String[]{"body"}, attributes.toArray())); }