Codota Logo
AddImportCorrectionProposal
Code IndexAdd Codota to your IDE (free)

How to use
AddImportCorrectionProposal
in
org.eclipse.jdt.internal.ui.text.correction.proposals

Best Java code snippets using org.eclipse.jdt.internal.ui.text.correction.proposals.AddImportCorrectionProposal (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void rememberSelection() {
  QualifiedTypeNameHistory.remember(getQualifiedTypeName());
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected void performChange(IEditorPart activeEditor, IDocument document) throws CoreException {
  super.performChange(activeEditor, document);
  rememberSelection();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public AddImportCorrectionProposal(String name, ICompilationUnit cu, int relevance, Image image, String qualifierName, String typeName, SimpleName node) {
  super(name, cu, ASTRewrite.create(node.getAST()), relevance, image);
  fTypeName= typeName;
  fQualifierName= qualifierName;
  fAdditionalProposal= getAdditionalChangeCorrectionProposal();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private AddModuleRequiresCorrectionProposal getAdditionalChangeCorrectionProposal() {
  ICompilationUnit cu= getCompilationUnit();
  AddModuleRequiresCorrectionProposal additionalChangeCorrectionProposal= null;
  IJavaProject currentJavaProject= cu.getJavaProject();
  String qualifiedName= getQualifiedTypeName();
  List<IPackageFragment> packageFragments= AddModuleRequiresCorrectionProposal.getPackageFragmentsOfMatchingTypes(qualifiedName, IJavaSearchConstants.TYPE, currentJavaProject);
  IPackageFragment enclosingPackage= null;
      final String changeName= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_add_requires_module_info, args);
      final String changeDescription= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_add_requires_module_description, args);
      additionalChangeCorrectionProposal= new AddModuleRequiresCorrectionProposal(moduleName, changeName, changeDescription, currentModuleCompilationUnit, getRelevance());
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  Image image= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_IMPDECL);
  int boost= QualifiedTypeNameHistory.getBoost(fullName, 0, maxProposals);
  proposal= new AddImportCorrectionProposal(label, cu, relevance + 100 + boost, image, packName, simpleName, (SimpleName)node);
  proposal.setCommandId(ADD_IMPORT_ID);
} else {
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private static ChangeCorrectionProposal getCompositeChangeProposal(ChangeCorrectionProposal proposal) throws CoreException {
  ChangeCorrectionProposal compositeProposal= null;
  if (proposal instanceof AddImportCorrectionProposal) {
    AddModuleRequiresCorrectionProposal cp= ((AddImportCorrectionProposal) proposal).getAdditionalProposal();
    if (cp != null) {
      Change importChange= proposal.getChange();
      Change change= cp.getChange();
      if (change != null) {
        ImportRewrite importRewrite= ((AddImportCorrectionProposal) proposal).getImportRewrite();
        boolean importNeedsToBeAdded= false;
        if (importRewrite != null) {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  Image image= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_IMPDECL);
  int boost= QualifiedTypeNameHistory.getBoost(fullName, 0, maxProposals);
  proposal= new AddImportCorrectionProposal(label, cu, relevance + 100 + boost, image, packName, simpleName, (SimpleName)node);
  proposal.setCommandId(ADD_IMPORT_ID);
} else {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected void performChange(IEditorPart activeEditor, IDocument document) throws CoreException {
  super.performChange(activeEditor, document);
  rememberSelection();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private void rememberSelection() {
  QualifiedTypeNameHistory.remember(getQualifiedTypeName());
}
org.eclipse.jdt.internal.ui.text.correction.proposalsAddImportCorrectionProposal

Most used methods

  • <init>
  • getQualifiedTypeName
  • rememberSelection
  • getAdditionalChangeCorrectionProposal
  • getAdditionalProposal
  • getCompilationUnit
  • getImportRewrite
  • getRelevance

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JFrame (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
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