public void updateContext(DrawContext ctx) { if (ctx.getTokenID() == JavaTokenContext.IDENTIFIER && isMethod(ctx)) { Coloring mc = getMethodColoring(ctx); if (mc != null) { mc.apply(ctx); } } }
public void updateContext(DrawContext ctx) { if (ctx.getTokenID() == JavaTokenContext.IDENTIFIER && isMethod(ctx)) { Coloring mc = getMethodColoring(ctx); if (mc != null) { mc.apply(ctx); } } }
public void updateContext(DrawContext ctx) { // Get the token type and docColorings TokenID tokenID = ctx.getTokenID(); TokenContextPath tcp = ctx.getTokenContextPath(); if (tokenID != null && tcp != null) { // Get the coloring according the name of the token String fullName = tcp.getFullTokenName(tokenID); Coloring c = ctx.getEditorUI().getColoring(fullName); if (c != null) { c.apply(ctx); } else { // Token coloring null, try category TokenCategory cat = tokenID.getCategory(); if (cat != null) { fullName = tcp.getFullTokenName(cat); c = ctx.getEditorUI().getColoring(fullName); if (c != null) { c.apply(ctx); } } } } }
public void updateContext(DrawContext ctx) { // Get the token type and docColorings TokenID tokenID = ctx.getTokenID(); TokenContextPath tcp = ctx.getTokenContextPath(); if (tokenID != null && tcp != null) { // Get the coloring according the name of the token String fullName = tcp.getFullTokenName(tokenID); Coloring c = ctx.getEditorUI().getColoring(fullName); if (c != null) { c.apply(ctx); } else { // Token coloring null, try category TokenCategory cat = tokenID.getCategory(); if (cat != null) { fullName = tcp.getFullTokenName(cat); c = ctx.getEditorUI().getColoring(fullName); if (c != null) { c.apply(ctx); } } } } }