private void updateDynamicHelp(String expression, Control c) { if (expression == null) { expression = computeDefaultSearchExpression(c); } RelatedTopicsPart part = (RelatedTopicsPart) parent .findPart(IHelpUIConstants.HV_RELATED_TOPICS); if (part != null) { if (expression != null) part.startSearch(expression, lastContext); } }
/** * @param parent */ public ScopeSetDialog(Shell parent, ScopeSetManager manager, EngineDescriptorManager descManager) { super(parent); this.manager = manager; this.descManager = descManager; this.sets = extractSets(manager.getScopeSets(false)); setContentProvider(new ScopeContentProvider()); setLabelProvider(new ScopeLabelProvider()); setInitialSelections(new Object[] { manager.getActiveSet() }); }
public void startSearch(String phrase) { showPage(IHelpUIConstants.HV_FSEARCH_PAGE, true); SearchPart part = (SearchPart) findPart(IHelpUIConstants.HV_FSEARCH); if (part != null && phrase != null) part.startSearch(phrase); }
private void storeSearchHistory(String expression) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=95479 HistoryScopeSet sset = scopeSetManager.findSearchSet(expression); if (sset == null) { sset = new HistoryScopeSet(expression); scopeSetManager.add(sset); } ScopeSet activeSet = scopeSetManager.getActiveSet(); sset.copyFrom(activeSet); sset.save(); updateSearchCombo(sset); searchWordCombo.setText(expression); }
private void searchFromHistory(int index) { String expression = searchWordCombo.getSelection(); ScopeSet set = scopeSetManager.findSearchSet(expression); if (set == null) return; setActiveScopeSet(set); doSearch(expression, true); }
public void run() { helpPart.showPage(IHelpUIConstants.HV_ALL_TOPICS_PAGE); AllTopicsPart part = (AllTopicsPart)helpPart.findPart(IHelpUIConstants.HV_TOPIC_TREE); if (part != null) { part.selectReveal(res); } } });
public void showDynamicHelp(IWorkbenchPart wpart, Control c) { showPage(IHelpUIConstants.HV_CONTEXT_HELP_PAGE, true); RelatedTopicsPart part = (RelatedTopicsPart) findPart(IHelpUIConstants.HV_RELATED_TOPICS); if (part != null) { part.handleActivation(c, wpart); } }
public void copyFrom(ScopeSet set) { String expression = getExpression(); super.copyFrom(set); setExpression(expression); }
public void notifyPropertyChange(EngineDescriptor desc) { this.setChanged(); this.notifyObservers(new DescriptorEvent(desc, CHANGE)); }
public void setDescription(String desc) { if (isUserDefined()) { this.desc = desc; if (manager!=null) manager.notifyPropertyChange(this); } }
public synchronized void add(EngineDescriptor ed, ISearchEngineResult match) { EngineResultSection ers = findEngineResult(ed); if (match != null) ers.add(match); }
/** * */ public ScopePreferenceManager(EngineDescriptorManager descManager, ScopeSet set) { this.set = set; load(descManager.getDescriptors()); }
public boolean restoreLastExplicitSet() { if (activeSet != null && activeSet.isImplicit() && lastExplicitSet != null) { setActiveSet(lastExplicitSet); return true; } return false; }
public String getText(Object obj) { String name = findNewName((ScopeSet)obj); if (name!=null) return name; return ((ScopeSet)obj).getName(); } private String findNewName(ScopeSet set) {
public IPreferenceNode addNode(EngineDescriptor desc) { PreferenceNode node = new EnginePreferenceNode(desc); addToRoot(node); return node; } private IPreferenceNode addNode(String category, String id, String name, IConfigurationElement config) {
public void addPages() { selectionPage = new EngineTypeWizardPage(engineTypes); addPage(selectionPage); }
public void setLabel(String label) { if (isUserDefined()) { this.label = label; if (manager!=null) manager.notifyPropertyChange(this); } }