Available Methods
- isError ( )
- getID ( )
- getSourceStart ( )
- UnusedPrivateField ( )
- getSourceEnd ( )
- IllegalRedefinitionToNonNullParameter ( )
- JavadocDuplicateThrowsClassName ( )
- UndefinedType ( )
- RedundantNullDefaultAnnotationType ( )
- LocalVariableIsNeverUsed ( )
- CannotOverrideAStaticMethodWithAnInstanceMethod ( )
- UndefinedMethod ( )
- Task ( )
- JavadocUnexpectedTag ( )
- EnumConstantMustImplementAbstractMethod ( )
- ImportNotFound ( )
- UndefinedName ( )
- ArgumentIsNeverUsed ( )
- IllegalModifierCombinationFinalVolatileForField ( )
- AmbiguousType ( )
- CannotImportPackage ( )
- JavadocInvalidTag ( )
- IllegalDefinitionToNonNullParameter ( )
- ForbiddenReference ( )
- NonStaticFieldFromStaticInvocation ( )
- UnusedTypeParameter ( )
- UnnecessaryCast ( )
- MissingOverrideAnnotationForInterfaceMethodImplementation ( )
- NonStaticAccessToStaticMethod ( )
- IllegalModifierForVariable ( )
- MethodReducesVisibility ( )
- IllegalModifierForInterfaceMethod ( )
- RequiredNonNullButProvidedNull ( )
- ParsingErrorMergeTokens ( )
- ShouldReturnValue ( )
- FieldHidingField ( )
- ArgumentHidingField ( )
- UnqualifiedFieldAccess ( )
- UnterminatedString ( )
- LocalVariableHidingLocalVariable ( )
- UnusedPrivateConstructor ( )
- InvalidUsageOfForeachStatements ( )
- DuplicateNestedType ( )
- MissingEnumConstantCase ( )
- UnusedImport ( )
- DuplicateField ( )
- ConflictingImport ( )
- NotVisibleField ( )
- DuplicateBlankFinalFieldInitialization ( )
- IllegalModifierForEnumConstructor ( )
- IllegalModifierForConstructor ( )
- PackageIsNotExpectedPackage ( )
- NonExternalizedStringLiteral ( )
- JavadocAmbiguousType ( )
- ReturnTypeMismatch ( )
- IllegalModifierForEnum ( )
- InvalidInput ( )
- NullSourceString ( )
- UnresolvedVariable ( )
- IllegalReturnNullityRedefinition ( )
- UseEnumAsAnIdentifier ( )
- UnexpectedStaticModifierForField ( )
- IllegalModifierForMemberEnum ( )
- EnumAbstractMethodMustBeImplemented ( )
- MethodCanBePotentiallyStatic ( )
- TypeMissingDeprecatedAnnotation ( )
- RedundantSpecificationOfTypeArguments ( )
- IncompatibleExceptionInThrowsClause ( )
- UnhandledWarningToken ( )
- NonStaticOrAlienTypeReceiver ( )
- ParsingErrorInsertToCompletePhrase ( )
- ParsingErrorNoSuggestion ( )
- UnhandledExceptionInDefaultConstructor ( )
- RawTypeReference ( )
- UndefinedAnnotationMember ( )
- AbstractMethodMustBeImplemented ( )
Related Classes
- java.util.Arrays
- java.io.File
- java.io.InputStream
- java.util.Iterator
- java.util.Locale
- org.eclipse.core.runtime.CoreException
- org.eclipse.core.runtime.NullProgressMonitor
- org.eclipse.jdt.core.dom.CompilationUnit
- org.eclipse.jdt.core.IJavaProject
- org.eclipse.jdt.core.JavaModelException
- org.eclipse.jdt.core.ICompilationUnit
- org.eclipse.jdt.core.dom.SimpleName
- org.eclipse.jdt.core.dom.ASTNode
- org.eclipse.jdt.core.dom.Modifier
- org.eclipse.jdt.core.IPackageFragment
- org.eclipse.jdt.core.dom.ITypeBinding
- org.eclipse.jdt.internal.compiler.impl.CompilerOptions
- org.eclipse.jdt.core.dom.IMethodBinding
- org.eclipse.ltk.core.refactoring.RefactoringStatus
- org.eclipse.jdt.core.search.IJavaSearchConstants
- org.eclipse.jdt.core.dom.BodyDeclaration
- org.eclipse.lsp4j.TextDocumentIdentifier
- org.eclipse.jdt.internal.compiler.env.ICompilationUnit
- org.eclipse.lsp4j.Range
- org.eclipse.lsp4j.jsonrpc.messages.Either
Java Code Examples for org.eclipse.jdt.core.compiler.IProblem#UndefinedType
The following examples show how to use
org.eclipse.jdt.core.compiler.IProblem#UndefinedType .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IntroduceParameterObjectProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected boolean shouldReport(IProblem problem, CompilationUnit cu) { if (!super.shouldReport(problem, cu)) return false; ASTNode node= ASTNodeSearchUtil.getAstNode(cu, problem.getSourceStart(), problem.getSourceEnd() - problem.getSourceStart() + 1); if (node instanceof Type) { Type type= (Type) node; if (problem.getID() == IProblem.UndefinedType && getClassName().equals(ASTNodes.getTypeName(type))) { return false; } } if (node instanceof Name) { Name name= (Name) node; if (problem.getID() == IProblem.ImportNotFound && getPackage().indexOf(name.getFullyQualifiedName()) != -1) return false; if (problem.getID() == IProblem.MissingTypeInMethod) { StructuralPropertyDescriptor locationInParent= name.getLocationInParent(); String[] arguments= problem.getArguments(); if ((locationInParent == MethodInvocation.NAME_PROPERTY || locationInParent == SuperMethodInvocation.NAME_PROPERTY) && arguments.length > 3 && arguments[3].endsWith(getClassName())) return false; } } return true; }
Example 2
Source File: LinkedNodeFinder.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private static int getProblemKind(IProblem problem) { switch (problem.getID()) { case IProblem.UndefinedField: return FIELD; case IProblem.UndefinedMethod: return METHOD; case IProblem.UndefinedLabel: return LABEL; case IProblem.UndefinedName: case IProblem.UnresolvedVariable: return NAME; case IProblem.UndefinedType: return TYPE; } return 0; }
Example 3
Source File: ChangeSignatureProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Evaluates if a problem needs to be reported. * @param problem the problem * @param cu the AST containing the new source * @return return <code>true</code> if the problem needs to be reported */ protected boolean shouldReport(IProblem problem, CompilationUnit cu) { if (! problem.isError()) return false; if (problem.getID() == IProblem.UndefinedType) //reported when trying to import return false; return true; }