Example usage for org.eclipse.jdt.core IMember getCategories

List of usage examples for org.eclipse.jdt.core IMember getCategories

Introduction

In this page you can find the example usage for org.eclipse.jdt.core IMember getCategories.

Prototype

String[] getCategories() throws JavaModelException;

Source Link

Document

Returns the categories defined by this member's Javadoc.

Usage

From source file:at.bestsolution.fxide.jdt.text.viewersupport.JavaElementLabelComposer.java

License:Open Source License

private void appendCategoryLabel(IMember member, long flags) throws JavaModelException {
    String[] categories = member.getCategories();
    if (categories.length > 0) {
        int offset = fBuffer.length();
        StringBuffer categoriesBuf = new StringBuffer();
        for (int i = 0; i < categories.length; i++) {
            if (i > 0)
                categoriesBuf.append(JavaElementLabels.CATEGORY_SEPARATOR_STRING);
            categoriesBuf.append(categories[i]);
        }//  w  w  w .  j  av a 2s .  c  om
        fBuffer.append(JavaElementLabels.CONCAT_STRING);
        fBuffer.append(Messages.format(JavaUIMessages.JavaElementLabels_category, categoriesBuf.toString()));
        //         if (getFlag(flags, JavaElementLabels.COLORIZE)) {
        //            fBuffer.setStyle(offset, fBuffer.length() - offset, COUNTER_STYLE);
        //         }
    }
}

From source file:com.codenvy.ide.ext.java.server.javadoc.JavaElementLabelComposer.java

License:Open Source License

private void appendCategoryLabel(IMember member, long flags) throws JavaModelException {
    String[] categories = member.getCategories();
    if (categories.length > 0) {
        int offset = fBuffer.length();
        StringBuffer categoriesBuf = new StringBuffer();
        for (int i = 0; i < categories.length; i++) {
            if (i > 0)
                categoriesBuf.append(JavaElementLabels.CATEGORY_SEPARATOR_STRING);
            categoriesBuf.append(categories[i]);
        }/*from ww w . j av a 2s . c o m*/
        fBuffer.append(JavaElementLabels.CONCAT_STRING);
        fBuffer.append(MessageFormat.format("[{0}]", categoriesBuf.toString()));
        if (getFlag(flags, JavaElementLabels.COLORIZE)) {
            //            fBuffer.setStyle(offset, fBuffer.length() - offset, COUNTER_STYLE);
        }
    }
}

From source file:com.microsoft.javapkgsrv.JavaElementLabelComposer.java

License:Open Source License

private void appendCategoryLabel(IMember member, long flags) throws JavaModelException {
    String[] categories = member.getCategories();
    if (categories.length > 0) {
        int offset = fBuffer.length();
        StringBuffer categoriesBuf = new StringBuffer();
        for (int i = 0; i < categories.length; i++) {
            if (i > 0)
                categoriesBuf.append(CATEGORY_SEPARATOR_STRING);
            categoriesBuf.append(categories[i]);
        }//from  ww w.  j av  a 2 s  .c  o  m
        fBuffer.append(CONCAT_STRING);
        fBuffer.append('[');
        fBuffer.append(categoriesBuf.toString());
        fBuffer.append(']');
    }
}

From source file:org.eclipse.e4.demo.simpleide.jdt.internal.editor.viewer.JavaElementLabelComposer.java

License:Open Source License

private void appendCategoryLabel(IMember member, long flags) throws JavaModelException {
    String[] categories = member.getCategories();
    if (categories.length > 0) {
        int offset = fBuffer.length();
        StringBuffer categoriesBuf = new StringBuffer();
        for (int i = 0; i < categories.length; i++) {
            if (i > 0)
                categoriesBuf.append(JavaElementLabels.CATEGORY_SEPARATOR_STRING);
            categoriesBuf.append(categories[i]);
        }/* ww  w .ja v a2  s .  c  om*/
        fBuffer.append(JavaElementLabels.CONCAT_STRING);
        fBuffer.append(messages.JavaElementLabels_category(categoriesBuf.toString()));
        if (getFlag(flags, JavaElementLabels.COLORIZE)) {
            fBuffer.setStyle(offset, fBuffer.length() - offset, COUNTER_STYLE);
        }
    }
}