Tabnine Logo
ReorgCorrectionsSubProcessor$ClasspathFixCorrectionProposal.getCompilationUnit
Code IndexAdd Tabnine to your IDE (free)

How to use
getCompilationUnit
method
in
org.eclipse.jdt.internal.ui.text.correction.ReorgCorrectionsSubProcessor$ClasspathFixCorrectionProposal

Best Java code snippets using org.eclipse.jdt.internal.ui.text.correction.ReorgCorrectionsSubProcessor$ClasspathFixCorrectionProposal.getCompilationUnit (Showing top 2 results out of 315)

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void apply(IDocument document) {
  IRunnableContext context= JavaPlugin.getActiveWorkbenchWindow();
  if (context == null) {
    context= new BusyIndicatorRunnableContext();
  }
  Shell shell= JavaPlugin.getActiveWorkbenchShell();
  if (ClasspathFixSelectionDialog.openClasspathFixSelectionDialog(shell, getCompilationUnit().getJavaProject(), fMissingType, context)) {
    if (fMissingType.indexOf('.') == -1) {
      try {
        IChooseImportQuery query= AddImportOnSelectionAction.newDialogQuery(shell);
        AddImportsOperation op= new AddImportsOperation(getCompilationUnit(), fOffset, fLength, query, false, false);
        IProgressService progressService= PlatformUI.getWorkbench().getProgressService();
        progressService.runInUI(context, new WorkbenchRunnableAdapter(op, op.getScheduleRule()), op.getScheduleRule());
        fResultingEdit= op.getResultingEdit();
        super.apply(document);
      } catch (InvocationTargetException e) {
        JavaPlugin.log(e);
      } catch (InterruptedException e) {
        // ignore
      }
    }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void apply(IDocument document) {
  IRunnableContext context= JavaPlugin.getActiveWorkbenchWindow();
  if (context == null) {
    context= new BusyIndicatorRunnableContext();
  }
  Shell shell= JavaPlugin.getActiveWorkbenchShell();
  if (ClasspathFixSelectionDialog.openClasspathFixSelectionDialog(shell, getCompilationUnit().getJavaProject(), fMissingType, context)) {
    if (fMissingType.indexOf('.') == -1) {
      try {
        IChooseImportQuery query= AddImportOnSelectionAction.newDialogQuery(shell);
        AddImportsOperation op= new AddImportsOperation(getCompilationUnit(), fOffset, fLength, query, false, false);
        IProgressService progressService= PlatformUI.getWorkbench().getProgressService();
        progressService.runInUI(context, new WorkbenchRunnableAdapter(op, op.getScheduleRule()), op.getScheduleRule());
        fResultingEdit= op.getResultingEdit();
        super.apply(document);
      } catch (InvocationTargetException e) {
        JavaPlugin.log(e);
      } catch (InterruptedException e) {
        // ignore
      }
    }
  }
}
org.eclipse.jdt.internal.ui.text.correctionReorgCorrectionsSubProcessor$ClasspathFixCorrectionProposalgetCompilationUnit

Popular methods of ReorgCorrectionsSubProcessor$ClasspathFixCorrectionProposal

  • <init>

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now