本文整理汇总了Java中org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry.addContextType方法的典型用法代码示例。如果您正苦于以下问题:Java ContributionContextTypeRegistry.addContextType方法的具体用法?Java ContributionContextTypeRegistry.addContextType怎么用?Java ContributionContextTypeRegistry.addContextType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry
的用法示例。
在下文中一共展示了ContributionContextTypeRegistry.addContextType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SilverStripeTemplatesPreferencePage
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
public SilverStripeTemplatesPreferencePage() {
setPreferenceStore(SilverStripePDTPlugin.getDefault().getPreferenceStore());
//Build registry
Iterator contexts=SilverStripePDTPlugin.getDefault().getTemplateContextRegistry().contextTypes();
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
registry.addContextType(new CodeTemplateContextType(NewSilverStripeClassWizardTemplatePage.NEW_CLASS_CONTEXTTYPE));
while(contexts.hasNext()) {
registry.addContextType((TemplateContextType) contexts.next());
}
setTemplateStore(new SilverStripeTemplateStore(registry, this.getPreferenceStore(), "ca.edchipman.silverstripepdt.SilverStripe.templates"));
try {
this.getTemplateStore().load();
} catch (IOException e) {
e.printStackTrace();
}
setContextTypeRegistry(registry);
}
开发者ID:UndefinedOffset,项目名称:eclipse-silverstripedt,代码行数:21,代码来源:SilverStripeTemplatesPreferencePage.java
示例2: SilverStripeCATemplatesPreferencePage
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
public SilverStripeCATemplatesPreferencePage() {
setPreferenceStore(SilverStripePDTPlugin.getDefault().getPreferenceStore());
setTemplateStore(SilverStripePDTPlugin.getDefault().getCATemplateStore());
//Build registry
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
registry.addContextType(new CodeTemplateContextType(SSTemplateCompletionProcessor.TEMPLATE_CONTEXT_ID));
setTemplateStore(new SilverStripeTemplateStore(registry, this.getPreferenceStore(),"ca.edchipman.silverstripepdt.contentassist.templates"));
try {
this.getTemplateStore().load();
} catch (IOException e) {
e.printStackTrace();
}
setContextTypeRegistry(registry);
}
开发者ID:UndefinedOffset,项目名称:eclipse-silverstripedt,代码行数:18,代码来源:SilverStripeCATemplatesPreferencePage.java
示例3: getContextTypeRegistry
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
public ContextTypeRegistry getContextTypeRegistry() {
if (registry == null) {
if (FluentMkUI.getDefault() != null) {
ContributionContextTypeRegistry contributionRegistry = new ContributionContextTypeRegistry();
contributionRegistry.addContextType(SourceTemplateContextType.ID);
registry = contributionRegistry;
} else {
ContextTypeRegistry contextTypeRegistry = new ContextTypeRegistry();
contextTypeRegistry.addContextType(new SourceTemplateContextType());
registry = contextTypeRegistry;
}
}
return registry;
}
示例4: getTemplateContextRegistry
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
/**
* Returns the template context type registry for the html plugin.
*
* @return the template context type registry for the html plugin
*/
public ContextTypeRegistry getTemplateContextRegistry() {
if (fContextTypeRegistry == null) {
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
registry.addContextType(CardContextType.CONTEXT_TYPE);
fContextTypeRegistry = registry;
}
return fContextTypeRegistry;
}
示例5: getNewClassContextRegistry
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
/**
* Returns the template context type registry for creating SilverStripe classes.
* @return the template context type registry for creating SilverStripe classes
*/
public ContextTypeRegistry getNewClassContextRegistry() {
if (fClassContextTypeRegistry == null) {
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
registry.addContextType(new CodeTemplateContextType(NewSilverStripeClassWizardTemplatePage.NEW_CLASS_CONTEXTTYPE));
fClassContextTypeRegistry = registry;
}
return fClassContextTypeRegistry;
}
示例6: getTemplateContextRegistry
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
/**
* Returns the template context type registry for SilverStripe template files.
* @return the template context type registry for SilverStripe template files
*/
public ContextTypeRegistry getTemplateContextRegistry() {
if (fContextTypeRegistry == null) {
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
registry.addContextType(new CodeTemplateContextType(NewSilverStripeTemplatesWizardPage.NEW_SS_TEMPLATE_CONTEXTTYPE));
registry.addContextType(new CodeTemplateContextType(NewSilverStripeTemplatesWizardPage.NEW_SS_30_TEMPLATE_CONTEXTTYPE));
registry.addContextType(new CodeTemplateContextType(NewSilverStripeProjectWizard.NEW_SS_PROJECT_TEMPLATE_CONTEXTTYPE));
fContextTypeRegistry = registry;
}
return fContextTypeRegistry;
}
示例7: getCATemplateContextRegistry
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
/**
* Returns the content assist template context type registry for the xml plugin.
*
* @return the content assist template context type registry for the xml plugin
*/
public ContextTypeRegistry getCATemplateContextRegistry() {
if (caContextTypeRegistry == null) {
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
registry.addContextType(new CodeTemplateContextType(SSTemplateCompletionProcessor.TEMPLATE_CONTEXT_ID));
registry.addContextType(new CodeTemplateContextType(NewSilverStripeTemplatesWizardPage.NEW_SS_TEMPLATE_CONTEXTTYPE));
registry.addContextType(new CodeTemplateContextType(NewSilverStripeTemplatesWizardPage.NEW_SS_30_TEMPLATE_CONTEXTTYPE));
caContextTypeRegistry = registry;
}
return caContextTypeRegistry;
}
示例8: createContributionContextTypeRegistry
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
protected ContextTypeRegistry createContributionContextTypeRegistry() {
final ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
for(String id : getRegisteredContextTypeIds()) {
registry.addContextType(id);
}
return registry;
}
示例9: getTemplateContextType
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; //导入方法依赖的package包/类
private TemplateContextType getTemplateContextType() {
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
registry.addContextType(FtcContextType.TYPE);
return registry.getContextType(FtcContextType.TYPE);
}