@Override public String getTitle() { if (context instanceof IContext2) { String ctitle = ((IContext2)context).getTitle(); if (ctitle!=null) { return ctitle; } } return title; }
private void updateTitle() { String title = null; if (lastContext != null && lastContext instanceof IContext2) { IContext2 c2 = (IContext2)lastContext; title = c2.getTitle(); } if (title==null && lastPart != null) title = NLS.bind(Messages.ContextHelpPart_aboutP, lastPart .getSite().getRegisteredName()); if (title==null) title = Messages.ContextHelpPart_about; getSection().setText(title); }
private void updateDynamicHelp(boolean explicitContext) { if (explicitContext && lastContext instanceof IContext2) { String title = ((IContext2)lastContext).getTitle(); if (title!=null) { updateDynamicHelp(stripMnemonic(title), lastControl); return; } } if (lastProvider != null || lastControl != null) updateDynamicHelp(lastProvider != null ? lastProvider .getSearchExpression(lastControl) : null, lastControl); }
public JavadocHelpContext(IContext context, Object[] elements) throws JavaModelException { Assert.isNotNull(elements); if (context instanceof IContext2) fTitle= ((IContext2)context).getTitle();
public JavadocHelpContext(IContext context, Object[] elements) throws JavaModelException { Assert.isNotNull(elements); if (context instanceof IContext2) fTitle= ((IContext2)context).getTitle();
public JavadocHelpContext(IContext context, Object[] elements) throws JavaModelException { Assert.isNotNull(elements); if (context instanceof IContext2) fTitle= ((IContext2)context).getTitle();
public void mergeContext(IContext src) { String text = src.getText(); if (getText() == null || getText().length() == 0) { setText(text); } if (src instanceof IContext2 && getTitle() == null) { String title = ((IContext2)src).getTitle(); if (title != null) { setAttribute(ATTRIBUTE_TITLE, title); } } if (src instanceof IContext3) { ICommandLink[] commands = ((IContext3)src).getRelatedCommands(); for (int i=0;i<commands.length;++i) { appendChild(new CommandLink(commands[i])); } } IHelpResource[] topics = src.getRelatedTopics(); for (int i=0;i<topics.length;++i) { if (topics[i] instanceof ITopic) { appendChild(new Topic((ITopic)topics[i])); } else { Topic topic = new Topic(); topic.setHref(topics[i].getHref()); topic.setLabel(topics[i].getLabel()); appendChild(topic); } } }