Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2010-07-30 17:00:29 -0400
committerStephan Herrmann2010-07-30 17:00:29 -0400
commit376c31c8dfa825c6b5e8745ffd79f69066041ace (patch)
tree2126fbdf7d85d2dde2ef0fa747336ae55f13f351 /org.eclipse.jdt.core.tests.model
parent4f2ef57937d9208a0c298391dd7641c04b059678 (diff)
downloadorg.eclipse.objectteams-376c31c8dfa825c6b5e8745ffd79f69066041ace.tar.gz
org.eclipse.objectteams-376c31c8dfa825c6b5e8745ffd79f69066041ace.tar.xz
org.eclipse.objectteams-376c31c8dfa825c6b5e8745ffd79f69066041ace.zip
even more test output: are the preferences corrupted?
Diffstat (limited to 'org.eclipse.jdt.core.tests.model')
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java
index 79ef00517..35e588f5a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java
@@ -32,6 +32,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
import org.eclipse.jdt.core.*;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.core.search.*;
@@ -10968,6 +10970,7 @@ public void testBug286379c() throws CoreException {
System.out.println(" + Task tags: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_TAGS));
System.out.println(" + Task priorities: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_PRIORITIES));
System.out.println(" + Forbidden reference: " + JavaCore.getOptions().get(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ printPreference();
IContentType javaContentType = Platform.getContentTypeManager().getContentType(JavaCore.JAVA_SOURCE_CONTENT_TYPE);
TestResourceChangeListener changeListener = new TestResourceChangeListener();
@@ -11015,6 +11018,7 @@ public void testBug286379c() throws CoreException {
System.out.println(" + Task tags: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_TAGS));
System.out.println(" + Task priorities: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_PRIORITIES));
System.out.println(" + Forbidden reference: " + JavaCore.getOptions().get(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ printPreference();
// Restart to let the indexes to be refreshed
simulateExit();
simulateRestart();
@@ -11023,6 +11027,7 @@ public void testBug286379c() throws CoreException {
System.out.println(" + Task tags: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_TAGS));
System.out.println(" + Task priorities: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_PRIORITIES));
System.out.println(" + Forbidden reference: " + JavaCore.getOptions().get(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ printPreference();
waitUntilIndexesReady();
// Search for the new type with new extension
@@ -11047,6 +11052,7 @@ public void testBug286379c() throws CoreException {
System.out.println(" + Task tags: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_TAGS));
System.out.println(" + Task priorities: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_PRIORITIES));
System.out.println(" + Forbidden reference: " + JavaCore.getOptions().get(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ printPreference();
// Restarting should update the index file to remove the references of any .torem files
simulateExit();
simulateRestart();
@@ -11055,6 +11061,7 @@ public void testBug286379c() throws CoreException {
System.out.println(" + Task tags: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_TAGS));
System.out.println(" + Task priorities: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_PRIORITIES));
System.out.println(" + Forbidden reference: " + JavaCore.getOptions().get(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ printPreference();
waitUntilIndexesReady();
// Search for the new type with new extension
@@ -11071,6 +11078,7 @@ public void testBug286379c() throws CoreException {
System.out.println(" + Task tags: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_TAGS));
System.out.println(" + Task priorities: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_PRIORITIES));
System.out.println(" + Forbidden reference: " + JavaCore.getOptions().get(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ printPreference();
} finally {
getWorkspace().removeResourceChangeListener(changeListener);
if (javaContentType != null)
@@ -11080,9 +11088,17 @@ public void testBug286379c() throws CoreException {
System.out.println(" + Task tags: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_TAGS));
System.out.println(" + Task priorities: " + JavaCore.getOptions().get(JavaCore.COMPILER_TASK_PRIORITIES));
System.out.println(" + Forbidden reference: " + JavaCore.getOptions().get(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ printPreference();
System.out.println("================================================================================");
}
}
+private void printPreference() {
+ IPreferencesService service;
+ IEclipsePreferences[] lookups;
+ service = Platform.getPreferencesService();
+ lookups = new IEclipsePreferences[] { JavaModelManager.getJavaModelManager().getInstancePreferences(), JavaModelManager.getJavaModelManager().getDefaultPreferences()};
+ System.out.println(" + Task tags from preferences: "+service.get(JavaCore.COMPILER_TASK_TAGS, null, lookups));
+}
/**
* @bug 295894: Search shows focus type implementation for nested types even though the scope is restricted to subtypes.

Back to the top