List of usage examples for org.eclipse.jdt.core JavaCore COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING
String COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING
To view the source code for org.eclipse.jdt.core JavaCore COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING.
Click Source Link
From source file:org.eclipse.jst.j2ee.internal.project.WTPJETEmitter.java
License:Open Source License
/** * @param progressMonitor//from w w w . j a v a 2 s .c o m * @param project * @param javaProject * @throws CoreException * @throws JavaModelException * @throws BackingStoreException */ protected void initializeJavaProject(IProgressMonitor progressMonitor, final IProject project, IJavaProject javaProject) throws CoreException, JavaModelException, BackingStoreException { progressMonitor.subTask(CodeGenPlugin.getPlugin().getString("_UI_JETInitializingProject_message", //$NON-NLS-1$ new Object[] { project.getName() })); IClasspathEntry classpathEntry = JavaCore.newSourceEntry(new Path("/" + project.getName() + "/src")); //$NON-NLS-1$ //$NON-NLS-2$ //IClasspathEntry jreClasspathEntry = JavaCore.newVariableEntry(new Path(JavaRuntime.JRELIB_VARIABLE), new Path(JavaRuntime.JRESRC_VARIABLE), new Path(JavaRuntime.JRESRCROOT_VARIABLE)); IClasspathEntry jreClasspathEntry = JavaRuntime.getDefaultJREContainerEntry(); List classpath = new ArrayList(); classpath.add(classpathEntry); classpath.add(jreClasspathEntry); classpath.addAll(classpathEntries); IFolder sourceFolder = project.getFolder(new Path("src")); //$NON-NLS-1$ if (!sourceFolder.exists()) { sourceFolder.create(false, true, new SubProgressMonitor(progressMonitor, 1)); } IFolder runtimeFolder = project.getFolder(new Path("runtime")); //$NON-NLS-1$ if (!runtimeFolder.exists()) { runtimeFolder.create(false, true, new SubProgressMonitor(progressMonitor, 1)); } IClasspathEntry[] classpathEntryArray = (IClasspathEntry[]) classpath .toArray(new IClasspathEntry[classpath.size()]); javaProject.setRawClasspath(classpathEntryArray, new SubProgressMonitor(progressMonitor, 1)); javaProject.setOutputLocation(new Path("/" + project.getName() + "/runtime"), //$NON-NLS-1$//$NON-NLS-2$ new SubProgressMonitor(progressMonitor, 1)); // appended from previous implementation createClasspathEntries(project); IScopeContext context = new ProjectScope(project); IEclipsePreferences prefs = context.getNode(JavaCore.PLUGIN_ID); prefs.put(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE); prefs.put(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, JavaCore.IGNORE); // set Java compiler compliance level to 1.5 prefs.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); prefs.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); prefs.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5); prefs.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR); prefs.put(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, JavaCore.ERROR); // set Javadoc validation to the default ignore level prefs.put(JavaCore.COMPILER_PB_INVALID_JAVADOC, JavaCore.IGNORE); prefs.put(JavaCore.COMPILER_PB_INVALID_JAVADOC_TAGS, JavaCore.DISABLED); prefs.put(JavaCore.COMPILER_PB_INVALID_JAVADOC_TAGS__DEPRECATED_REF, JavaCore.DISABLED); prefs.put(JavaCore.COMPILER_PB_INVALID_JAVADOC_TAGS__NOT_VISIBLE_REF, JavaCore.DISABLED); prefs.put(JavaCore.COMPILER_PB_INVALID_JAVADOC_TAGS_VISIBILITY, JavaCore.PUBLIC); prefs.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION, JavaCore.COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_RETURN_TAG); prefs.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS, JavaCore.IGNORE); prefs.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS_VISIBILITY, JavaCore.PUBLIC); prefs.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING, JavaCore.DISABLED); prefs.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS, JavaCore.IGNORE); prefs.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY, JavaCore.PUBLIC); prefs.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING, JavaCore.DISABLED); // store changed properties permanently prefs.flush(); }
From source file:org.eclipse.objectteams.otdt.ui.tests.core.OTJavadocQuickFixTest.java
License:Open Source License
@SuppressWarnings("unchecked") @Override/* ww w . j ava 2 s .com*/ protected void setUp() throws Exception { Hashtable options = TestOptions.getDefaultOptions(); options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE); options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4"); options.put(JavaCore.COMPILER_PB_INVALID_JAVADOC, JavaCore.ERROR); options.put(JavaCore.COMPILER_PB_INVALID_JAVADOC_TAGS, JavaCore.ENABLED); options.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS, JavaCore.ERROR); options.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS, JavaCore.ERROR); options.put(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING, JavaCore.ENABLED); JavaCore.setOptions(options); StringBuffer comment = new StringBuffer(); comment.append("/**\n"); comment.append(" * A comment.\n"); comment.append(" * ${tags}\n"); comment.append(" */"); String res = comment.toString(); StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID, res, null); StubUtility.setCodeTemplate(CodeTemplateContextType.METHODCOMMENT_ID, res, null); StubUtility.setCodeTemplate(CodeTemplateContextType.TYPECOMMENT_ID, res, null); comment = new StringBuffer(); comment.append("/**\n"); comment.append(" * A field comment for ${field}.\n"); comment.append(" */"); StubUtility.setCodeTemplate(CodeTemplateContextType.FIELDCOMMENT_ID, comment.toString(), null); comment = new StringBuffer(); comment.append("/**\n"); comment.append(" * A override comment.\n"); comment.append(" * ${see_to_overridden}\n"); comment.append(" */"); StubUtility.setCodeTemplate(CodeTemplateContextType.OVERRIDECOMMENT_ID, comment.toString(), null); comment = new StringBuffer(); comment.append("/**\n"); comment.append(" * A delegate comment.\n"); comment.append(" * ${see_to_target}\n"); comment.append(" */"); StubUtility.setCodeTemplate(CodeTemplateContextType.DELEGATECOMMENT_ID, comment.toString(), null); fJProject1 = ProjectTestSetup.getProject(); fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src"); //{ObjectTeams: add the OTRE: JavaProjectHelper.addLibrary(fJProject1, new Path(OTRE_JAR_PATH)); // SH} }