Codota Logo
ChangeMethodSignatureProposal$RemoveDescription
Code IndexAdd Codota to your IDE (free)

How to use
ChangeMethodSignatureProposal$RemoveDescription
in
org.eclipse.jdt.internal.ui.text.correction.proposals

Best Java code snippets using org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal$RemoveDescription (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static void addUnnecessaryThrownExceptionProposal(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) {
  ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
  selectedNode= ASTNodes.getNormalizedNode(selectedNode);
  if (selectedNode == null || selectedNode.getLocationInParent() != MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY) {
    return;
  }
  MethodDeclaration decl= (MethodDeclaration) selectedNode.getParent();
  IMethodBinding binding= decl.resolveBinding();
  if (binding != null) {
    List<Type> thrownExceptions= decl.thrownExceptionTypes();
    int index= thrownExceptions.indexOf(selectedNode);
    if (index == -1) {
      return;
    }
    ChangeDescription[] desc= new ChangeDescription[thrownExceptions.size()];
    desc[index]= new RemoveDescription();
    ICompilationUnit cu= context.getCompilationUnit();
    String label= CorrectionMessages.LocalCorrectionsSubProcessor_unnecessarythrow_description;
    Image image= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_EXCEPTION);
    proposals.add(new ChangeMethodSignatureProposal(label, cu, selectedNode, binding, null, desc, IProposalRelevance.UNNECESSARY_THROW, image));
  }
  JavadocTagsSubProcessor.getUnusedAndUndocumentedParameterOrExceptionProposals(context, problem, proposals);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public static void addUnnecessaryThrownExceptionProposal(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) {
  ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
  selectedNode= ASTNodes.getNormalizedNode(selectedNode);
  if (selectedNode == null || selectedNode.getLocationInParent() != MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY) {
    return;
  }
  MethodDeclaration decl= (MethodDeclaration) selectedNode.getParent();
  IMethodBinding binding= decl.resolveBinding();
  if (binding != null) {
    List<Type> thrownExceptions= decl.thrownExceptionTypes();
    int index= thrownExceptions.indexOf(selectedNode);
    if (index == -1) {
      return;
    }
    ChangeDescription[] desc= new ChangeDescription[thrownExceptions.size()];
    desc[index]= new RemoveDescription();
    ICompilationUnit cu= context.getCompilationUnit();
    String label= CorrectionMessages.LocalCorrectionsSubProcessor_unnecessarythrow_description;
    Image image= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_EXCEPTION);
    proposals.add(new ChangeMethodSignatureProposal(label, cu, selectedNode, binding, null, desc, IProposalRelevance.UNNECESSARY_THROW, image));
  }
  JavadocTagsSubProcessor.getUnusedAndUndocumentedParameterOrExceptionProposals(context, problem, proposals);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

changes[i]= new RemoveDescription();
undeclaredExceptions.add(methodExceptions[i]);
origin: org.eclipse.jdt/org.eclipse.jdt.ui

changes[i]= new RemoveDescription();
undeclaredExceptions.add(methodExceptions[i]);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

for (int i= diff - 1; i >= 0; i--) {
  int idx= indexSkipped[i];
  changeDesc[idx]= new RemoveDescription();
  changedTypes[i]= declParameterTypes[idx];
origin: org.eclipse.jdt/org.eclipse.jdt.ui

for (int i= diff - 1; i >= 0; i--) {
  int idx= indexSkipped[i];
  changeDesc[idx]= new RemoveDescription();
  changedTypes[i]= declParameterTypes[idx];
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

Type elem= exceptions.get(i);
if (isSubtype(elem.resolveBinding(), uncaughtExceptions)) {
  desc[i]= new RemoveDescription();
origin: org.eclipse.jdt/org.eclipse.jdt.ui

Type elem= exceptions.get(i);
if (isSubtype(elem.resolveBinding(), uncaughtExceptions)) {
  desc[i]= new RemoveDescription();
org.eclipse.jdt.internal.ui.text.correction.proposalsChangeMethodSignatureProposal$RemoveDescription

Most used methods

  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now