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#RedundantSpecificationOfTypeArguments
The following examples show how to use
org.eclipse.jdt.core.compiler.IProblem#RedundantSpecificationOfTypeArguments .
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: TypeParametersFix.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public static TypeParametersFix createRemoveRedundantTypeArgumentsFix(CompilationUnit compilationUnit, IProblemLocation problem) { int id= problem.getProblemId(); if (id == IProblem.RedundantSpecificationOfTypeArguments) { ParameterizedType parameterizedType= getParameterizedType(compilationUnit, problem); if (parameterizedType == null) return null; RemoveTypeArgumentsOperation operation= new RemoveTypeArgumentsOperation(parameterizedType); return new TypeParametersFix(FixMessages.TypeParametersFix_remove_redundant_type_arguments_name, compilationUnit, new CompilationUnitRewriteOperation[] { operation }); } return null; }
Example 2
Source File: TypeParametersFix.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public static ICleanUpFix createCleanUp(CompilationUnit compilationUnit, IProblemLocation[] problems, boolean insertInferredTypeArguments, boolean removeRedundantTypeArguments) { if (insertInferredTypeArguments) { final ArrayList<ASTNode> changedNodes= new ArrayList<ASTNode>(); compilationUnit.accept(new InsertTypeArgumentsVisitor(changedNodes)); if (changedNodes.isEmpty()) return null; CompilationUnitRewriteOperation op= new InsertTypeArgumentsOperation(changedNodes.toArray(new ParameterizedType[changedNodes.size()])); return new TypeParametersFix(FixMessages.TypeParametersFix_insert_inferred_type_arguments_name, compilationUnit, new CompilationUnitRewriteOperation[] { op }); } else if (removeRedundantTypeArguments) { List<CompilationUnitRewriteOperation> result= new ArrayList<CompilationUnitRewriteOperation>(); for (int i= 0; i < problems.length; i++) { IProblemLocation problem= problems[i]; int id= problem.getProblemId(); if (id == IProblem.RedundantSpecificationOfTypeArguments) { ParameterizedType parameterizedType= getParameterizedType(compilationUnit, problem); if (parameterizedType == null) return null; result.add(new RemoveTypeArgumentsOperation(parameterizedType)); } } if (!result.isEmpty()) { return new TypeParametersFix(FixMessages.TypeParametersFix_remove_redundant_type_arguments_name, compilationUnit, result.toArray(new CompilationUnitRewriteOperation[result.size()])); } } return null; }
Example 3
Source File: TypeParametersCleanUp.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * {@inheritDoc} */ public boolean canFix(ICompilationUnit compilationUnit, IProblemLocation problem) { int problemId= problem.getProblemId(); if (problemId == IProblem.RedundantSpecificationOfTypeArguments) return isEnabled(CleanUpConstants.REMOVE_REDUNDANT_TYPE_ARGUMENTS); if (problemId == IProblem.DiamondNotBelow17) return isEnabled(CleanUpConstants.INSERT_INFERRED_TYPE_ARGUMENTS); return false; }