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#FieldHidingField
The following examples show how to use
org.eclipse.jdt.core.compiler.IProblem#FieldHidingField .
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: QuickAssistProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private static boolean containsQuickFixableRenameLocal(IProblemLocation[] locations) { if (locations != null) { for (int i= 0; i < locations.length; i++) { IProblemLocation location= locations[i]; if (IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER.equals(location.getMarkerType())) { switch (location.getProblemId()) { case IProblem.LocalVariableHidingLocalVariable: case IProblem.LocalVariableHidingField: case IProblem.FieldHidingLocalVariable: case IProblem.FieldHidingField: case IProblem.ArgumentHidingLocalVariable: case IProblem.ArgumentHidingField: return true; } } } } return false; }
Example 2
Source File: LocalCorrectionsSubProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public static void addInvalidVariableNameProposals(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) { // hiding, redefined or future keyword CompilationUnit root= context.getASTRoot(); ASTNode selectedNode= problem.getCoveringNode(root); if (selectedNode instanceof MethodDeclaration) { selectedNode= ((MethodDeclaration) selectedNode).getName(); } if (!(selectedNode instanceof SimpleName)) { return; } SimpleName nameNode= (SimpleName) selectedNode; String valueSuggestion= null; String name; switch (problem.getProblemId()) { case IProblem.LocalVariableHidingLocalVariable: case IProblem.LocalVariableHidingField: name= Messages.format(CorrectionMessages.LocalCorrectionsSubProcessor_hiding_local_label, BasicElementLabels.getJavaElementName(nameNode.getIdentifier())); break; case IProblem.FieldHidingLocalVariable: case IProblem.FieldHidingField: case IProblem.DuplicateField: name= Messages.format(CorrectionMessages.LocalCorrectionsSubProcessor_hiding_field_label, BasicElementLabels.getJavaElementName(nameNode.getIdentifier())); break; case IProblem.ArgumentHidingLocalVariable: case IProblem.ArgumentHidingField: name= Messages.format(CorrectionMessages.LocalCorrectionsSubProcessor_hiding_argument_label, BasicElementLabels.getJavaElementName(nameNode.getIdentifier())); break; case IProblem.DuplicateMethod: name= Messages.format(CorrectionMessages.LocalCorrectionsSubProcessor_renaming_duplicate_method, BasicElementLabels.getJavaElementName(nameNode.getIdentifier())); break; default: name= Messages.format(CorrectionMessages.LocalCorrectionsSubProcessor_rename_var_label, BasicElementLabels.getJavaElementName(nameNode.getIdentifier())); } if (problem.getProblemId() == IProblem.UseEnumAsAnIdentifier) { valueSuggestion= "enumeration"; //$NON-NLS-1$ } else { valueSuggestion= nameNode.getIdentifier() + '1'; } LinkedNamesAssistProposal proposal= new LinkedNamesAssistProposal(name, context, nameNode, valueSuggestion); proposals.add(proposal); }