Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipe Mulet2001-08-07 09:27:13 +0000
committerPhilipe Mulet2001-08-07 09:27:13 +0000
commit8d6cea2b563dfcf3e967c213abbf6edfdfbdc3fb (patch)
tree9d361aa9df14de9209b492d7d06c2bed91bfd1d7
parentfc6d96b34b996ca454401b8df9f47cbdd05258ef (diff)
downloadeclipse.jdt.core-8d6cea2b563dfcf3e967c213abbf6edfdfbdc3fb.tar.gz
eclipse.jdt.core-8d6cea2b563dfcf3e967c213abbf6edfdfbdc3fb.tar.xz
eclipse.jdt.core-8d6cea2b563dfcf3e967c213abbf6edfdfbdc3fb.zip
*** empty log message ***
-rw-r--r--org.eclipse.jdt.core/changes.txt4
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.ini382
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java2
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java2
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/eval/EvaluationContextWrapper.java5
5 files changed, 311 insertions, 84 deletions
diff --git a/org.eclipse.jdt.core/changes.txt b/org.eclipse.jdt.core/changes.txt
index f418a04934..1bc9f5e0b1 100644
--- a/org.eclipse.jdt.core/changes.txt
+++ b/org.eclipse.jdt.core/changes.txt
@@ -4,11 +4,13 @@ What's new in this drop (since 0.9)
==================================================================================
* JCK1.3a compliant.
* All messages have been externalized.
- * Added 2 new APIs on JavaConventions:
+ * Added 2 new APIs on JavaConventions for classpath validation.
- IJavaModelStatus validateClasspath(IJavaProject project, IClasspathEntry[] classpath, IPath outputLocation)
- IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment)
* Ant Eclipse compiler task added (org.eclipse.jdt.core.ant.Jdtcom)
* Assertions support enabled: by default the compiler is 1.3 compliant, but it can optionally be turned into source 1.4 mode cf. JavaCore options.
+ * Added new APIs on JavaCore so as to change optional settings (compiler, formatter, codeassist, ...). Description of available options is available in JavaCore.ini
+ along with default values. Option settings are globally kept on JavaCore.
PRs Fixed in this Release (since 1.0NL stream)
==================================================================================
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.ini b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.ini
index a2daa3bbb5..a36e9c110c 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.ini
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.ini
@@ -1,139 +1,363 @@
-# JavaCore Configurable Options
+# ===============================================================
+# List of recognized configurable options for the Java Core
+# ===============================================================
+# All available options of the underlying components are listed below, with the
+# default setting to be used in the Java core. Note that the default values mentionned
+# below might override some defaults in the underlying component. Therefore, the
+# component default value is indicated in comment.
#
-# Recognized options are listed below,
-# optionName = possibleValue1(valueIndex1)| [possibleValue2(valueIndex2)]
-# or
-# optionName = type(min,max)[value]
-#
-# component default value are between [ ]
+# Each option is described in one of the possible 2 formats below.
+# 1. optionName = possibleValue1(valueIndex1)| [possibleValue2(valueIndex2)]
+# 2. optionName = type(min,max)[value]
+
-### debugLocalVariable = Generate(0) | [Do not generate(1)]
-### When generated, this attribute will enable local variable names to be displayed
-### in debugger, only in place where variables are definitely assigned
-### (.class file is then bigger)
+# ===============================================================
+# COMPILER / Generating Local Variable Debug Attribute
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.debugLocalVariable = 0
+
+# When generated, this attribute will enable local variable names to be displayed
+# in debugger, only in place where variables are definitely assigned
+# (.class file is then bigger)
+#
+# Possible values:
+# 0 - Generate
+# 1 - Do not generate [compiler default]
-### debugLineNumber = [Generate(0)] | Do not generate(1)
-### When generated, this attribute will enable source code highlighting in debugger
-### (.class file is then bigger).
+
+# ===============================================================
+# COMPILER / Generating Line Number Debug Attribute
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.debugLineNumber = 0
-### debugSourceFile = [Generate(0)] | Do not generate(1)
-### When generated, this attribute will enable the debugger to present the
-### corresponding source code.
+# When generated, this attribute will enable source code highlighting in debugger
+# (.class file is then bigger).
+#
+# Possible values:
+# 0 - Generate [compiler default]
+# 1 - Do not generate
+
+
+# ===============================================================
+# COMPILER / Generating Source Debug Attribute
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.debugSourceFile = 0
-### codegenUnusedLocal = Preserve(0) | [Optimize out(1)]
-### Unless requested to preserve unused local variables (i.e. never read), the
-### compiler will optimize them out, potentially altering debugging
+# When generated, this attribute will enable the debugger to present the
+# corresponding source code.
+#
+# Possible values:
+# 0 - Generate [default]
+# 1 - Do not generate
+
+
+# ===============================================================
+# COMPILER / Preserving Unused Local Variables
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.codegenUnusedLocal = 0
-### codegenTargetPlatform = [1.1(0)] | 1.2(1)
-### Generate .class files either backward compatible with JVM 1.1 or only executable
-### on JVM 1.2 and later
+# Unless requested to preserve unused local variables (i.e. never read), the
+# compiler will optimize them out, potentially altering debugging
+#
+# Possible values:
+# 0 - Preserve
+# 1 - Optimize out [default]
+
+
+# ===============================================================
+# COMPILER / Defining Target Java Platform
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.codegenTargetPlatform = 0
-### problemUnreachableCode = [Error(0)] | Warning(1) | Ignore(2)
-### Unreachable code can either be reported as an error or a warning
+# Generate .class files either backward compatible with JVM 1.1 or only executable
+# on JVM 1.2 and later
+#
+# Possible values:
+# 0 - 1.1 [default]
+# 1 - 1.2 or better
+
+
+# ===============================================================
+# COMPILER / Reporting Unreachable Code
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemUnreachableCode = 0
-### problemInvalidImport = [Error(0)] | Warning(1) | Ignore(2)
-### An import statement that cannot be resolved might either be reported
-### either as an error or as a warning
+# Unreachable code can optionally be reported as an error, warning or simply
+# ignored. The bytecode generation will always optimized it out.
+#
+# Possible values:
+# 0 - Error [default]
+# 1 - Warning
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Invalid Import
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemInvalidImport = 0
-### problemOverridingPackageDefaultMethod = Error(0) | [Warning(1)] | Ignore(2)
-### A package default method is not visible in a different package, and thus
-### cannot be overriden. When enabling this option, the compiler will signal
-### such scenarii.
+# An import statement that cannot be resolved might optionally be reported
+# as an error, as a warning or ignored.
+#
+# Possible values:
+# 0 - Error [default]
+# 1 - Warning
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Attempt to Override Package-Default Method
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemOverridingPackageDefaultMethod = 1
-### problemMethodWithConstructorName = Error(0) | [Warning(1)] | Ignore(2)
-### Naming a method with a constructor name is generally considered poor
-### style programming. When enabling this option, the compiler will signal such
-### scenarii
+# A package default method is not visible in a different package, and thus
+# cannot be overriden. When enabling this option, the compiler will signal
+# such scenarii either as an error or a warning.
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning [default]
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Method With Constructor Name
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemMethodWithConstructorName = 1
-### problemDeprecation = Error(0) | [Warning(1)] | Ignore(2)
-### When enabled, the compiler will signal use of deprecated API.
+# Naming a method with a constructor name is generally considered poor
+# style programming. When enabling this option, the compiler will signal such
+# scenarii either as an error or a warning.
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning [default]
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Deprecation
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemDeprecation = 1
-### problemHiddenCatchBlock = Error(0) | [Warning(1)] | Ignore(2)
-### Locally to a try statement, some catch blocks may hide others
-### (e.g. try { throw new java.io.CharConversionException();
-### } catch (java.io.CharConversionException e) {
-### } catch (java.io.IOException e) {}).
-### When enabling this option, the compiler will issue a warning for hidden catch
-### blocks corresponding to checked exceptions
+# When enabled, the compiler will signal use of deprecated API either as an
+# error or a warning.
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning [default]
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Hidden Catch Block
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemHiddenCatchBlock = 1
-### problemUnusedLocal = Error(0) | [Warning(1)] | Ignore(2)
-### When enabled, the compiler will issue a warning for unused local variables
-### (i.e. variables never read from)
+# Locally to a try statement, some catch blocks may hide others
+# (e.g. try { throw new java.io.CharConversionException();
+# } catch (java.io.CharConversionException e) {
+# } catch (java.io.IOException e) {}).
+# When enabling this option, the compiler will issue an error or a warning for hidden
+# catch blocks corresponding to checked exceptions
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning [default]
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Unused Local
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemUnusedLocal = 2
-### problemUnusedParameter = Error(0) | [Warning(1)] | Ignore(2)
-### When enabled, the compiler will issue a warning for unused method parameters
-### (i.e. parameters never read from)
+# When enabled, the compiler will issue an error or a warning for unused local
+# variables (i.e. variables never read from)
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning [default]
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Unused Parameter
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemUnusedParameter = 2
-### problemSyntheticAccessEmulation = Error(0) | Warning(1) | [Ignore(2)]
-### When enabled, the compiler will issue a warning whenever it emulates access
-### to a non-accessible member of an enclosing type
+# When enabled, the compiler will issue an error or a warning for unused method
+# parameters (i.e. parameters never read from)
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning [default]
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Reporting Synthetic Access Emulation
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemSyntheticAccessEmulation = 2
-### problemNonExternalizedStringLiteral = Error(0) | Warning(1) | [Ignore(2)]
-### When enabled, the compiler will issue a warning for non externalized String literal
+# When enabled, the compiler will issue an error or a warning whenever it emulates
+# access to a non-accessible member of an enclosing type. Such access can have
+# performance ramifications.
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning
+# 2 - Ignore [default]
+
+
+# ===============================================================
+# COMPILER / Reporting Non-Externalized String Literal
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemNonExternalizedStringLiteral = 1
-### problemAssertIdentifier = Error(0) | [Warning(1)] | Ignore(2)
-### When enabled, the compiler will issue a warning whenever 'assert' is used as
-### an identifier (reserved keyword in 1.4)
+# When enabled, the compiler will issue an error or a warning for non externalized
+# String literal (i.e. non immediately followed by '/*nonNLS*/').
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning
+# 2 - Ignore [default]
+
+
+# ===============================================================
+# COMPILER / Reporting Usage of 'assert' Identifier
+# ===============================================================
org.eclipse.jdt.internal.compiler.Compiler.problemAssertIdentifier = 2
-### computeJavaBuildOrder = Compute(0)| [Ignore(1)]
-### When enabled, the build order is automatically reflecting the classpath on each
-### classpath change action. It can still be modified manually afterwards.
+# When enabled, the compiler will issue an error or a warning whenever 'assert' is
+# used as an identifier (reserved keyword in 1.4)
+#
+# Possible values:
+# 0 - Error
+# 1 - Warning [default]
+# 2 - Ignore
+
+
+# ===============================================================
+# COMPILER / Setting Source Compatibility Mode
+# ===============================================================
+org.eclipse.jdt.internal.compiler.Compiler.source = 0
+
+# Specify whether source is 1.3 or 1.4 compatible. From 1.4 on, 'assert' is a keyword
+# reserved for assertion support.
+#
+# Possible values:
+# 0 - 1.3 [default]
+# 1 - 1.4
+
+
+# ===============================================================
+# JAVACORE / Computing Project Build Order
+# ===============================================================
org.eclipse.jdt.core.JavaCore.computeJavaBuildOrder = 1
-### newlineOpeningBrace = Insert(0) | [Do not insert(1)]
-### When Insert, a new line is inserted before an opening brace, otherwise nothing
-### is inserted
+# Indicate whether JavaCore should enforce the project build order to be based on
+# the classpath prerequisite chain. When requesting to compute, this takes over
+# the platform default order (based on project references).
+#
+# Possible values:
+# 0 - Compute
+# 1 - Ignore [default]
+
+
+# ===============================================================
+# FORMATTER / Inserting New Line Before Opening Brace
+# ===============================================================
org.eclipse.jdt.internal.formatter.CodeFormatter.newlineOpeningBrace=1
-### newlineControlStatement.possibleValues = Insert(0) | [Do not insert(1)]
-### When Insert, a new line is inserted between } and else, catch, finally
+# When Insert, a new line is inserted before an opening brace, otherwise nothing
+# is inserted
+#
+# Possible values:
+# 0 - Insert
+# 1 - Do not insert [default]
+
+
+# ===============================================================
+# FORMATTER / Inserting New Line Inside Control Statement
+# ===============================================================
org.eclipse.jdt.internal.formatter.CodeFormatter.newlineControlStatement=1
-### newlineClearAll.possibleValues = Clear(0) | [Preserve one(1)]
-### When Clear, all blank lines are removed. When Preserve one, only one is kept
-### and all others removed.
+# When Insert, a new line is inserted between } and following else, catch, finally
+#
+# Possible values:
+# 0 - Insert
+# 1 - Do not insert [default]
+
+
+# ===============================================================
+# FORMATTER / Clearing Blank Lines
+# ===============================================================
org.eclipse.jdt.internal.formatter.CodeFormatter.newlineClearAll=1
-### newlineElseIf.possibleValues = [Yes(0)] | No(1)
-### When Yes, a blank line is inserted between a else and a if when they are contiguous
+# When Clear all, all blank lines are removed. When Preserve one, only one is kept
+# and all others removed.
+#
+# Possible values:
+# 0 - Clear all
+# 1 - Preserve one [default]
+
+
+# ===============================================================
+# FORMATTER / Inserting New Line Between Else/If
+# ===============================================================
org.eclipse.jdt.internal.formatter.CodeFormatter.newlineElseIf=0
-### newlineEmptyBlock.possibleValues = [Insert(0)] | Do not insert(1)
-### When insert, a line break is inserted between contiguous { and }, if } is not followed
-### by a keyword.
+# When Insert, a blank line is inserted between an else and an if when they are
+# contiguous. When choosing to not insert, else-if will be kept on the same
+# line when possible.
+#
+# Possible values:
+# 0 - Insert [default]
+# 1 - Do not insert
+
+
+# ===============================================================
+# FORMATTER / Inserting New Line In Empty Block
+# ===============================================================
org.eclipse.jdt.internal.formatter.CodeFormatter.newlineEmptyBlock=0
-### lineSplit.possibleValues = int(1,no)[80]
-### Enable splitting of long lines (exceeding the configurable length). Length of 0 will
-### disable line splitting
+# When insert, a line break is inserted between contiguous { and }, if } is not followed
+# by a keyword.
+#
+# Possible values:
+# 0 - Insert [default]
+# 1 - Do not insert
+
+
+# ===============================================================
+# FORMATTER / Splitting Lines Exceeding Length
+# ===============================================================
org.eclipse.jdt.internal.formatter.CodeFormatter.lineSplit=80
-### tyleCompactAssignment.possibleValues = Compact(0) | [Normal(1)]
+# Enable splitting of long lines (exceeding the configurable length). Length of 0 will
+# disable line splitting
+#
+# Possible values:
+# 0 - Do not split
+# >0 - Split when exceeding length [default:80]
+
+### styleCompactAssignment.possibleValues = Compact(0) | [Normal(1)]
+# ===============================================================
+# ===============================================================
### Assignments can be formatted asymmetrically, e.g. 'int x= 2;', when Normal, a space
### is inserted before the assignment operator
org.eclipse.jdt.internal.formatter.CodeFormatter.styleCompactAssignment=1
### tabulationChar.possibleValues = [Tab(0)] | Spaces(1)
+# ===============================================================
+# ===============================================================
### Either choose to indent with tab characters or spaces
org.eclipse.jdt.internal.formatter.CodeFormatter.tabulationChar=0
### tabulationSize.possibleValues = int(0,no)[4]
+# ===============================================================
+# ===============================================================
### Tabulation size in term of space characters
org.eclipse.jdt.internal.formatter.CodeFormatter.tabulationSize=4
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
index cd8c0ecd6e..77634456db 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
@@ -1209,7 +1209,7 @@ private static void setJavaCoreDefaultOptionsValue(Locale locale){
}
private static Hashtable getOptions(){
if(JavaModelManager.fOptions == null)
- setOptionsToDefault();
+ resetOptions();
return JavaModelManager.fOptions;
}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
index d5f6bdb261..cd19b5803a 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
@@ -760,7 +760,7 @@ public void prepareToSave(ISaveContext context) throws CoreException {
public void readOptions(String xmlString) throws IOException {
if(fOptions == null)
- JavaCore.setOptionsToDefault();
+ JavaCore.resetOptions();
StringReader reader = new StringReader(xmlString);
Element cpElement;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/eval/EvaluationContextWrapper.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/eval/EvaluationContextWrapper.java
index 5070521a41..c66bbdbd91 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/eval/EvaluationContextWrapper.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/eval/EvaluationContextWrapper.java
@@ -7,16 +7,17 @@ package org.eclipse.jdt.internal.core.eval;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
+import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.core.eval.*;
import org.eclipse.jdt.internal.codeassist.ISelectionRequestor;
import org.eclipse.jdt.internal.codeassist.ICompletionRequestor;
import org.eclipse.jdt.internal.compiler.*;
import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
-import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.core.eval.*;
import org.eclipse.jdt.internal.compiler.util.CharOperation;
import org.eclipse.jdt.internal.core.*;
import org.eclipse.jdt.internal.core.builder.impl.JavaBuilder;
import org.eclipse.jdt.internal.core.builder.impl.ProblemFactory;
+import org.eclipse.jdt.internal.core.ClassFile;
import org.eclipse.jdt.internal.eval.*;
import java.util.Locale;

Back to the top