Bug 111496 [API] access to AddUnimplementedMethodsOperation
We are using internal jdt calls to perform some of our operations. In order to add method stubs for unimplemented inherited members, we are using the following internal classes / apis - AddMethodStubOperation - IRequestQuery (requried for AddMethodStubOperation) - StubUtility2 (to find unimplemented methods) - ASTNodes - NodeFinder - RefactoringASTParser - JavaPreferenceSettings (to get CodeGenerationSettings for AddMethodStubOperation) We couldn't find public API to replace this usage. This is blocking our effort to remove access to JDT internal source.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddUnimplementedConstructorsAction.java
public AddUnimplementedConstructorsAction(CompilationUnitEditor editor) {
		this(editor.getEditorSite());
		fEditor= editor;
		setEnabled(checkEnabledEditor());
	}
	/**
	 * Creates a new <code>AddUnimplementedConstructorsAction</code>. The action
	 * requires that the selection provided by the site's selection provider is of type
	 * <code>
	 * org.eclipse.jface.viewers.IStructuredSelection</code>.
	 * 
	 * @param site the site providing context information for this action
	 */
	public AddUnimplementedConstructorsAction(IWorkbenchSite site) {
		super(site);
		setText(ActionMessages.AddUnimplementedConstructorsAction_label); 
		setDescription(ActionMessages.AddUnimplementedConstructorsAction_description); 
		setToolTipText(ActionMessages.AddUnimplementedConstructorsAction_tooltip); 
		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.ADD_UNIMPLEMENTED_CONSTRUCTORS_ACTION);
	}
	private boolean canEnable(IStructuredSelection selection) throws JavaModelException {
		if ((selection.size() == 1) && (selection.getFirstElement() instanceof IType)) {
			IType type= (IType) selection.getFirstElement();
			return type.getCompilationUnit() != null && !type.isInterface() && !type.isEnum();
		}
		if ((selection.size() == 1) && (selection.getFirstElement() instanceof ICompilationUnit))
			return true;
		return false;
	}
	private boolean checkEnabledEditor() {