Skip to content
Success

Changes

Summary

  1. Fix for pasting snippet with main method to to Package Explorer (details)
Commit 5d4cf1f12ddeb5d3e5f1763bd5c7da94759b67c7 by Andrey Loskutov
Fix for pasting snippet with main method to to Package Explorer

After introducing implicit types via
https://github.com/eclipse-jdt/eclipse.jdt.core/pull/2066 the snippet
that contains only main() method is recognized as
ImplicitTypeDeclaration that does not inherit AbstractTypeDeclaration
but common super class AbstractUnnamedTypeDeclaration.

Make sure we don't fail with CCE and don't generate extra main method
that wraps around pasted main method.

Fixes https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/1414
The file was modified org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/PasteAction.java (diff)