1 11 package org.eclipse.ui.internal.dialogs; 12 13 import org.eclipse.jface.preference.IPreferenceNode; 14 import org.eclipse.jface.preference.PreferenceManager; 15 import org.eclipse.ui.internal.WorkbenchPlugin; 16 17 23 24 public class PropertyPageManager extends PreferenceManager { 25 28 public PropertyPageManager() { 29 super(WorkbenchPlugin.PREFERENCE_PAGE_CATEGORY_SEPARATOR); 30 } 31 32 40 public boolean addToDeep(String category, PropertyPageNode node) { 41 42 return addToDeep(category, node, getRoot()); 43 } 44 45 54 public boolean addToDeep(String category, PropertyPageNode node, IPreferenceNode top) { 55 56 IPreferenceNode target = find(category, top); 57 if (target != null) { 58 target.add(node); 59 return true; 60 } 61 62 IPreferenceNode [] subNodes = top.getSubNodes(); 63 for (int i = 0; i < subNodes.length; i++) { 64 if(addToDeep(category, node, subNodes[i])) { 65 return true; 66 } 67 } 68 69 return false; 70 } 71 } 72 | Popular Tags |