public org.eclipse.jface.text.rules.IToken nextToken() { boolean isOriginalToken = true; if (!nextTokens.isEmpty()) { currentToken = nextTokens.remove(0); isOriginalToken = false; } else { currentToken = lexer.getNextToken(); } if (currentToken == null || !currentToken.canBeUsedForSyntaxHighlighting()) { return org.eclipse.jface.text.rules.Token.EOF; } if (isOriginalToken) { splitCurrentToken(); } org.eclipse.jface.text.TextAttribute textAttribute = null; String tokenName = currentToken.getName(); if (tokenName != null) { tudresden.ocl20.pivot.language.ocl.resource.ocl.IOclTokenStyle staticStyle = getStaticTokenStyle(); // now call dynamic token styler to allow to apply modifications to the static // style tudresden.ocl20.pivot.language.ocl.resource.ocl.IOclTokenStyle dynamicStyle = getDynamicTokenStyle(staticStyle); if (dynamicStyle != null) { textAttribute = getTextAttribute(dynamicStyle); } } return new org.eclipse.jface.text.rules.Token(textAttribute); }