Example usage for org.eclipse.jdt.core.compiler CategorizedProblem CAT_RESTRICTION

List of usage examples for org.eclipse.jdt.core.compiler CategorizedProblem CAT_RESTRICTION

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.compiler CategorizedProblem CAT_RESTRICTION.

Prototype

int CAT_RESTRICTION

To view the source code for org.eclipse.jdt.core.compiler CategorizedProblem CAT_RESTRICTION.

Click Source Link

Document

Category for optional problems related to access restrictions

Usage

From source file:astview.ProblemNode.java

License:Open Source License

private String getCategoryCode() {
    CategorizedProblem categorized = (CategorizedProblem) fProblem;
    int categoryID = categorized.getCategoryID();
    StringBuffer buf = new StringBuffer();

    switch (categoryID) {
    case CategorizedProblem.CAT_UNSPECIFIED:
        buf.append("Unspecified");
        break;/*from  w  w  w .ja v  a 2 s .co m*/

    case CategorizedProblem.CAT_BUILDPATH:
        buf.append("Buildpath");
        break;
    case CategorizedProblem.CAT_SYNTAX:
        buf.append("Syntax");
        break;
    case CategorizedProblem.CAT_IMPORT:
        buf.append("Import");
        break;
    case CategorizedProblem.CAT_TYPE:
        buf.append("Type");
        break;
    case CategorizedProblem.CAT_MEMBER:
        buf.append("Member");
        break;
    case CategorizedProblem.CAT_INTERNAL:
        buf.append("Internal");
        break;
    case CategorizedProblem.CAT_JAVADOC:
        buf.append("Javadoc");
        break;
    case CategorizedProblem.CAT_CODE_STYLE:
        buf.append("Code Style");
        break;
    case CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM:
        buf.append("Potential Programming Problem");
        break;
    case CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT:
        buf.append("Name Shadowing Conflict");
        break;
    case CategorizedProblem.CAT_DEPRECATION:
        buf.append("Deprecation");
        break;
    case CategorizedProblem.CAT_UNNECESSARY_CODE:
        buf.append("Unnecessary Code");
        break;
    case CategorizedProblem.CAT_UNCHECKED_RAW:
        buf.append("Unchecked Raw");
        break;
    case CategorizedProblem.CAT_NLS:
        buf.append("NLS");
        break;
    case CategorizedProblem.CAT_RESTRICTION:
        buf.append("Restriction");
        break;
    default:
        buf.append("<UNKNOWN CATEGORY>");
        break;
    }

    buf.append(" = ").append(categoryID);

    return buf.toString();
}

From source file:fromastview.ProblemNode.java

License:Open Source License

private String getCategoryCode() {
    CategorizedProblem categorized = (CategorizedProblem) fProblem;
    int categoryID = categorized.getCategoryID();
    StringBuffer buf = new StringBuffer();

    switch (categoryID) {
    case CategorizedProblem.CAT_UNSPECIFIED:
        buf.append("Unspecified");
        break;//from   www. jav  a  2 s  .  com
    case CategorizedProblem.CAT_BUILDPATH:
        buf.append("Buildpath");
        break;
    case CategorizedProblem.CAT_SYNTAX:
        buf.append("Syntax");
        break;
    case CategorizedProblem.CAT_IMPORT:
        buf.append("Import");
        break;
    case CategorizedProblem.CAT_TYPE:
        buf.append("Type");
        break;
    case CategorizedProblem.CAT_MEMBER:
        buf.append("Member");
        break;
    case CategorizedProblem.CAT_INTERNAL:
        buf.append("Internal");
        break;
    case CategorizedProblem.CAT_JAVADOC:
        buf.append("Javadoc");
        break;
    case CategorizedProblem.CAT_CODE_STYLE:
        buf.append("Code Style");
        break;
    case CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM:
        buf.append("Potential Programming Problem");
        break;
    case CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT:
        buf.append("Name Shadowing Conflict");
        break;
    case CategorizedProblem.CAT_DEPRECATION:
        buf.append("Deprecation");
        break;
    case CategorizedProblem.CAT_UNNECESSARY_CODE:
        buf.append("Unnecessary Code");
        break;
    case CategorizedProblem.CAT_UNCHECKED_RAW:
        buf.append("Unchecked Raw");
        break;
    case CategorizedProblem.CAT_NLS:
        buf.append("NLS");
        break;
    case CategorizedProblem.CAT_RESTRICTION:
        buf.append("Restriction");
        break;
    default:
        buf.append("<UNKNOWN CATEGORY>");
        break;
    }

    buf.append(" = ").append(categoryID);

    return buf.toString();
}

From source file:org.eclipse.objectteams.otdt.test.builder.OTEquinoxBuilderTests.java

License:Open Source License

private Problem getDecapsulationProblem(IJavaProject project, String baseclassName, String teamPath, int start,
        int end) {
    return new Problem("", "Decapsulating base class " + baseclassName
            + " by means of a forced export. Note, that additionally a corresponing declaration is needed in config.ini (OTJLD 2.1.2(c) + OT/Equinox).",
            project.getPath().append(new Path("src/" + teamPath)), start, end,
            CategorizedProblem.CAT_RESTRICTION, IMarker.SEVERITY_WARNING);
}

From source file:org.eclipse.objectteams.otdt.test.builder.OTEquinoxBuilderTests.java

License:Open Source License

private void expectAccessRestriction(IJavaProject project, String fileName, int start, int end) {
    expectingSpecificProblemFor(project.getPath(), new Problem("",
            "Access restriction: The type 'SampleAction' is not API (restriction on required project 'Trac18b')",
            project.getPath().append(new Path(fileName)), start, end, CategorizedProblem.CAT_RESTRICTION,
            IMarker.SEVERITY_ERROR));/*  w  w w .j  a v a  2s .  c om*/
}