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.tests/ui/org/eclipse/jdt/ui/tests/core/source/AddUnimplementedConstructorsTest.java
StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID, comment.toString(), null);
		StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORSTUB_ID, "${body_statement}\n// TODO", null);
		fSettings= JavaPreferencesSettings.getCodeGenerationSettings(null);
		fSettings.createComments= true;
	}
	private boolean nameContained(String methName, IJavaElement[] methods) {
		for (int i= 0; i < methods.length; i++) {
			if (methods[i].getElementName().equals(methName)) {
				return true;
			}
		}
		return false;
	}
	/**
	 * Creates a new test Java project.
	 */
	protected void setUp() {
		initCodeTemplates();
	}
	protected void tearDown() throws Exception {
		JavaProjectHelper.delete(fJavaProject);
		fJavaProject= null;
		fPackage= null;
		fClassA= null;
	}
	/*
	 * basic test: test with default constructor only
	 */
	public void testDefaultConstructorToOverride() throws Exception {
		fJavaProject= JavaProjectHelper.createJavaProject("DummyProject", "bin");