Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 324995
Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterProfileStore.java (-14 / +1 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 24-32 Link Here
24
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
24
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
25
import org.eclipse.core.runtime.preferences.IScopeContext;
25
import org.eclipse.core.runtime.preferences.IScopeContext;
26
26
27
import org.eclipse.core.resources.IProject;
28
import org.eclipse.core.resources.ResourcesPlugin;
29
30
import org.eclipse.jdt.core.JavaCore;
27
import org.eclipse.jdt.core.JavaCore;
31
28
32
import org.eclipse.jdt.ui.JavaUI;
29
import org.eclipse.jdt.ui.JavaUI;
Lines 122-137 Link Here
122
			}
119
			}
123
			uiPreferences.putInt(PREF_FORMATTER_PROFILES + VERSION_KEY_SUFFIX, profileVersioner.getCurrentVersion());
120
			uiPreferences.putInt(PREF_FORMATTER_PROFILES + VERSION_KEY_SUFFIX, profileVersioner.getCurrentVersion());
124
			savePreferences(instanceScope);
121
			savePreferences(instanceScope);
125
126
			IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects();
127
			for (int i= 0; i < projects.length; i++) {
128
				IScopeContext scope= access.getProjectScope(projects[i]);
129
				if (manager.hasProjectSpecificSettings(scope)) {
130
					manager= new FormatterProfileManager(profiles, scope, access, profileVersioner);
131
					manager.commitChanges(scope); // updates JavaCore project options
132
					savePreferences(scope);
133
				}
134
			}
135
		} catch (CoreException e) {
122
		} catch (CoreException e) {
136
			JavaPlugin.log(e);
123
			JavaPlugin.log(e);
137
		} catch (BackingStoreException e) {
124
		} catch (BackingStoreException e) {

Return to bug 324995