mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 285932 - DocCommentOwnerManager doesn't use the DefaultScope for settings, patch by Johan Ekberg
This commit is contained in:
parent
33d129e24c
commit
e121a4b255
1 changed files with 9 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Ferguson (Symbian) - Initial implementation
|
* Andrew Ferguson (Symbian) - Initial implementation
|
||||||
* IBM Corporation
|
* IBM Corporation
|
||||||
|
* Johan Ekberg - Bug 285932
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.ui.text.doctools;
|
package org.eclipse.cdt.internal.ui.text.doctools;
|
||||||
|
|
||||||
|
@ -30,6 +31,7 @@ import org.eclipse.core.runtime.IExtensionRegistry;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
import org.osgi.service.prefs.Preferences;
|
import org.osgi.service.prefs.Preferences;
|
||||||
|
|
||||||
|
@ -71,8 +73,12 @@ public class DocCommentOwnerManager {
|
||||||
fOwners= getCommentOwnerExtensions();
|
fOwners= getCommentOwnerExtensions();
|
||||||
fListeners= new ArrayList<IDocCommentOwnershipListener>();
|
fListeners= new ArrayList<IDocCommentOwnershipListener>();
|
||||||
|
|
||||||
|
Preferences defaultPrefs = new
|
||||||
|
DefaultScope().getNode(QUALIFIER).node(WORKSPACE_DOC_TOOL_NODE);
|
||||||
Preferences prefs= new InstanceScope().getNode(QUALIFIER).node(WORKSPACE_DOC_TOOL_NODE);
|
Preferences prefs= new InstanceScope().getNode(QUALIFIER).node(WORKSPACE_DOC_TOOL_NODE);
|
||||||
String id= prefs.get(PREFKEY_WORKSPACE_DEFAULT, NullDocCommentOwner.INSTANCE.getID());
|
String id= prefs.get(PREFKEY_WORKSPACE_DEFAULT, defaultPrefs.get(PREFKEY_WORKSPACE_DEFAULT,
|
||||||
|
NullDocCommentOwner.INSTANCE.getID()));
|
||||||
|
|
||||||
fWorkspaceOwner= getOwner(id);
|
fWorkspaceOwner= getOwner(id);
|
||||||
if(fWorkspaceOwner == null) {
|
if(fWorkspaceOwner == null) {
|
||||||
// this could occur if a plug-in is no longer available
|
// this could occur if a plug-in is no longer available
|
||||||
|
|
Loading…
Add table
Reference in a new issue