protected Coloring getMethodColoring(DrawContext ctx) { TokenContextPath path = ctx.getTokenContextPath().replaceStart( JavaLayerTokenContext.contextPath); return ctx.getEditorUI().getColoring( path.getFullTokenName(JavaLayerTokenContext.METHOD)); }
protected Coloring getMethodColoring(DrawContext ctx) { TokenContextPath path = ctx.getTokenContextPath().replaceStart(JavaLayerTokenContext.contextPath); return ctx.getEditorUI().getColoring(path.getFullTokenName(JavaLayerTokenContext.METHOD)); }
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); } } } } }