List of usage examples for org.eclipse.jdt.core.tests.builder Problem Problem
public Problem(String location, String message, IPath resourcePath, int start, int end, int categoryId, int severity)
From source file:org.eclipse.objectteams.otdt.test.builder.OTEquinoxBuilderTests.java
License:Open Source License
public void testWrongBaseImport2() throws CoreException, IOException { IJavaProject trac18b = fileManager.setUpJavaProject("Trac18b"); env.addProject(trac18b.getProject()); IJavaProject aspectPlugin = fileManager.setUpJavaProject("WrongBaseImport2"); aspectPlugin.setOption("org.eclipse.objectteams.otdt.compiler.problem.binding_conventions", "error"); env.addProject(aspectPlugin.getProject()); fullBuild();//w w w . ja v a 2s . c o 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 org.eclipse.objectteams.otequinox but by plug-in Trac18b (OT/Equinox).", aspectPlugin.getPath().append(new Path("src/WrongBaseImportTeam2.java")), 12, 34, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR) }); }
From source file:org.eclipse.objectteams.otdt.test.builder.OTEquinoxBuilderTests.java
License:Open Source License
public void testBug374833() throws CoreException, IOException { IJavaProject pluginPrj = fileManager.setUpJavaProject("UnresolvedBasePlugin"); env.addProject(pluginPrj.getProject()); fullBuild();/* w w w.j a v a 2 s.co m*/ expectingOnlySpecificProblemsFor(pluginPrj.getPath(), new Problem[] { new Problem("", "Base plug-in Missing.Plugin cannot be resolved", pluginPrj.getPath().append("plugin.xml"), -1, -1, -1, IMarker.SEVERITY_ERROR) }); }
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 Problem getIllegalUseOfForcedExportProblem(IJavaProject project, String className, int start, int end) { return new Problem("", "The forced-exported type " + className + " cannot be accessed other than as a role's base class (OT/Equinox).", project.getPath().append(new Path("src/IllegalUseOfForcedExportTeam.java")), start, end, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR); }
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));/* ww w . j a v a 2 s. c o m*/ }
From source file:org.eclipse.objectteams.otdt.test.builder.OTEquinoxBuilderTests.java
License:Open Source License
private Problem getMissingAspectExportProblem(IJavaProject project, String packageName) { return new Problem("", "Package " + packageName + " containing one or more bound teams must be exported.", project.getPath().append(new Path("META-INF/MANIFEST.MF")), -1, -1, -1, IMarker.SEVERITY_ERROR); }