Example usage for com.intellij.openapi.roots.ui.util CompositeAppearance getEnding

List of usage examples for com.intellij.openapi.roots.ui.util CompositeAppearance getEnding

Introduction

In this page you can find the example usage for com.intellij.openapi.roots.ui.util CompositeAppearance getEnding.

Prototype

public DequeEnd getEnding() 

Source Link

Usage

From source file:com.headwire.aem.tooling.intellij.explorer.AbstractSlingServerNodeDescriptor.java

License:Apache License

public static boolean addShortcutText(String actionId, CompositeAppearance appearance) {
    Keymap activeKeymap = KeymapManager.getInstance().getActiveKeymap();
    Shortcut[] shortcuts = activeKeymap.getShortcuts(actionId);
    if (shortcuts != null && shortcuts.length > 0) {
        appearance.getEnding().addText(" (" + KeymapUtil.getShortcutText(shortcuts[0]) + ")",
                SimpleTextAttributes.GRAY_ATTRIBUTES);
        return true;
    } else/*from   w  ww  .ja  va2s  .  co  m*/
        return false;
}

From source file:com.perl5.lang.htmlmason.idea.hierarchy.HTMLMasonHierarchyNodeDescriptor.java

License:Apache License

@Override
protected void adjustAppearance(CompositeAppearance appearance, ItemPresentation presentation) {
    String absoluteComponentPath = ((HTMLMasonFileImpl) getPerlElement()).getAbsoluteComponentContainerPath();

    if (absoluteComponentPath != null) {
        appearance.getEnding().addText(" in " + absoluteComponentPath,
                HierarchyNodeDescriptor.getPackageNameAttributes()
        //               UsageTreeColorsScheme.getInstance().getScheme().getAttributes(UsageTreeColors.USAGE_LOCATION)
        );/*from  w ww . ja v  a2 s  . c  o m*/
    }
}

From source file:com.perl5.lang.perl.idea.hierarchy.namespace.PerlHierarchyNodeDescriptor.java

License:Apache License

protected void adjustAppearance(CompositeAppearance appearance, ItemPresentation presentation) {
    appearance.getEnding()
            .addText(//from  w  w  w.  ja v a  2s .  com
                    " " + "(" + ((PerlNamespaceDefinition) getPerlElement()).getMroType().toString() + "), "
                            + presentation.getLocationString(),
                    HierarchyNodeDescriptor.getPackageNameAttributes());
}