List of usage examples for org.eclipse.jdt.apt.core.util AptPreferenceConstants APT_PROCESSANNOTATIONS
String APT_PROCESSANNOTATIONS
To view the source code for org.eclipse.jdt.apt.core.util AptPreferenceConstants APT_PROCESSANNOTATIONS.
Click Source Link
From source file:org.eclipse.gmt.mod.infra.common.core.internal.utils.ProjectUtils.java
License:Open Source License
public static void enableAPT(final IProject project) { IJavaProject javaProject = JavaCore.create(project); if (javaProject != null) { try {//from w w w. j a va 2 s . c o m IScopeContext context = new ProjectScope(project); IEclipsePreferences node = context.getNode(AptPreferenceConstants.APT_STRING_BASE + ".core"); //$NON-NLS-1$ node.put(AptPreferenceConstants.APT_ENABLED, "true"); //$NON-NLS-1$ node.sync(); IEclipsePreferences javaNode = context.getNode(JavaCore.PLUGIN_ID); javaNode.put(AptPreferenceConstants.APT_PROCESSANNOTATIONS, "enabled"); //$NON-NLS-1$ javaNode.sync(); } catch (Exception e) { log.error(e.getMessage() + " -- Error enabling apt processing"); } } }