List of usage examples for org.eclipse.jdt.core.compiler CategorizedProblem CAT_CODE_STYLE
int CAT_CODE_STYLE
To view the source code for org.eclipse.jdt.core.compiler CategorizedProblem CAT_CODE_STYLE.
Click Source Link
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 . j a v a 2 s . c o 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;// w w w .jav a2 s . c o 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:org.eclipse.objectteams.otdt.test.builder.OTEquinoxBuilderTests.java
License:Open Source License
public void testBaseImportNoAspectBinding() throws CoreException, IOException { IJavaProject trac18b = fileManager.setUpJavaProject("Trac18b"); env.addProject(trac18b.getProject()); IJavaProject aspectPlugin = fileManager.setUpJavaProject("MissingAspectBinding"); aspectPlugin.setOption("org.eclipse.objectteams.otdt.compiler.problem.binding_conventions", "error"); env.addProject(aspectPlugin.getProject()); fullBuild();//from w w w. ja v a2s . c o m expectingNoProblemsFor(trac18b.getPath()); expectingOnlySpecificProblemsFor(aspectPlugin.getPath(), new Problem[] { new Problem("", "Illegal base import: no aspect binding declared for team MissingAspectBindingTeam or any nested team (OT/Equinox).", aspectPlugin.getPath().append(new Path("src/MissingAspectBindingTeam.java")), 12, 34, CategorizedProblem.CAT_CODE_STYLE, IMarker.SEVERITY_ERROR) }); // now fix it: fileManager.replaceWorkspaceFile("MissingAspectBinding/plugin-corrected.xml", aspectPlugin, "plugin.xml"); incrementalBuild(); expectingNoProblemsFor(trac18b.getPath()); expectingNoProblemsFor(aspectPlugin.getPath()); }
From source file:org.eclipse.objectteams.otdt.test.builder.OTEquinoxBuilderTests.java
License:Open Source License
public void testWrongBaseImport1() throws CoreException, IOException { IJavaProject trac18b = fileManager.setUpJavaProject("Trac18b"); env.addProject(trac18b.getProject()); IJavaProject aspectPlugin = fileManager.setUpJavaProject("WrongBaseImport1"); aspectPlugin.setOption("org.eclipse.objectteams.otdt.compiler.problem.binding_conventions", "error"); env.addProject(aspectPlugin.getProject()); fullBuild();//from ww w. j av a 2 s .co m expectingNoProblemsFor(trac18b.getPath()); expectingOnlySpecificProblemsFor(aspectPlugin.getPath(), new Problem[] { new Problem("", "Illegal base import: this package is not provided by the declared base plug-in(s) Trac18b (OT/Equinox).", aspectPlugin.getPath().append(new Path("src/WrongBaseImportTeam1.java")), 12, 63, CategorizedProblem.CAT_CODE_STYLE, IMarker.SEVERITY_ERROR) }); }