List of usage examples for org.eclipse.jdt.core.compiler IProblem MissingTypeInMethod
int MissingTypeInMethod
To view the source code for org.eclipse.jdt.core.compiler IProblem MissingTypeInMethod.
Click Source Link
From source file:edu.washington.cs.cupid.scripting.java.quickfix.ClasspathProcessor.java
License:Open Source License
@Override public boolean hasCorrections(final ICompilationUnit unit, final int problemId) { try {//from w w w . jav a2 s .co m IResource resource = unit.getCorrespondingResource(); if (resource.getProject() == CupidScriptingPlugin.getDefault().getCupidProject()) { return problemId == IProblem.UndefinedType || problemId == IProblem.IsClassPathCorrect || problemId == IProblem.MissingTypeInMethod; } else { return false; } } catch (Exception ex) { return false; } }
From source file:edu.washington.cs.cupid.scripting.java.quickfix.ClasspathProcessor.java
License:Open Source License
@Override public IJavaCompletionProposal[] getCorrections(final IInvocationContext context, final IProblemLocation[] locations) throws CoreException { List<IJavaCompletionProposal> proposals = Lists.newArrayList(); for (IProblemLocation location : locations) { switch (location.getProblemId()) { case IProblem.ImportNotFound: proposals.addAll(buildImportNotFoundProposals(context, location)); break; case IProblem.MissingTypeInMethod: proposals.addAll(buildMissingTypeProposals(context, location)); break; case IProblem.UndefinedType: proposals.addAll(buildMissingBundleProposals(context, location)); break; default://from ww w. j ava 2 s . c o m // NO OP } } return proposals.toArray(new IJavaCompletionProposal[] {}); }
From source file:org.eclipse.pde.internal.ui.correction.java.QuickFixProcessor.java
License:Open Source License
public IJavaCompletionProposal[] getCorrections(IInvocationContext context, IProblemLocation[] locations) throws CoreException { ArrayList<Object> results = new ArrayList<Object>(); AbstractClassResolutionCollector collector = createCollector(results); for (IProblemLocation location : locations) { int id = location.getProblemId(); switch (id) { case IProblem.ForbiddenReference: handleAccessRestrictionProblem(context, location, collector); case IProblem.ImportNotFound: // fall through case IProblem.UndefinedName: // fall through case IProblem.UndefinedType: // fall through case IProblem.UnresolvedVariable: // fall through case IProblem.MissingTypeInMethod: // fall through case IProblem.MissingTypeInConstructor: handleImportNotFound(context, location, collector); }/* w ww . ja v a 2 s . com*/ } return results.toArray(new IJavaCompletionProposal[results.size()]); }
From source file:org.eclipse.pde.internal.ui.correction.java.QuickFixProcessor.java
License:Open Source License
public boolean hasCorrections(ICompilationUnit unit, int problemId) { switch (problemId) { case IProblem.ForbiddenReference: case IProblem.UndefinedName: // fall through case IProblem.ImportNotFound: // fall through case IProblem.UndefinedType: // fall through case IProblem.UnresolvedVariable: // fall through case IProblem.MissingTypeInMethod: // fall through case IProblem.MissingTypeInConstructor: IJavaElement parent = unit.getParent(); if (parent != null) { IJavaProject project = parent.getJavaProject(); if (project != null) return WorkspaceModelManager.isPluginProject(project.getProject()); }// ww w . j a v a 2 s.c o m } return false; }