當前位置: 首頁>>代碼示例>>Java>>正文


Java TemplateRegistration類代碼示例

本文整理匯總了Java中org.netbeans.api.templates.TemplateRegistration的典型用法代碼示例。如果您正苦於以下問題:Java TemplateRegistration類的具體用法?Java TemplateRegistration怎麽用?Java TemplateRegistration使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TemplateRegistration類屬於org.netbeans.api.templates包,在下文中一共展示了TemplateRegistration類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: contentURI

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
private URI contentURI(Element e, String relativePath, LayerBuilder builder, TemplateRegistration t, String annotationMethod) throws LayerGenerationException {
    String path = LayerBuilder.absolutizeResource(e, relativePath);
    builder.validateResource(path, e, t, annotationMethod, false);
    try {
        return new URI("nbresloc", "/" + path, null).normalize();
    } catch (URISyntaxException x) {
        throw new LayerGenerationException("could not translate " + path, e, processingEnv, t);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:TemplateProcessor.java

示例2: annotationsAvailable

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@Messages("TemplateHinter.missing_dep=You must add a dependency on org.openide.loaders (7.29+) before using this fix.")
private boolean annotationsAvailable(Context ctx) {
    if (ctx.canAccess(TemplateRegistration.class.getName())) {
        return true;
    } else {
        DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(TemplateHinter_missing_dep(), NotifyDescriptor.WARNING_MESSAGE));
        return false;
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:TemplateHinter.java

示例3: myMethod

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
    scriptEngine = "js",
    folder = "Test", iconBase = "org/netbeans/modules/templatesui/x.png",
    page = "org/netbeans/modules/templatesui/x.html",
    content = "x.js"
)
static String myMethod() {
    return "init()";
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:HTMLTemplateTest.java

示例4: myMethod

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
    scriptEngine = "js",
    folder = "JavaTest", iconBase = "org/netbeans/modules/templatesui/x.png",
    page = "x.html",
    content = "x.js", 
    techIds = { "ein", "zwei", "drei" }
)
static XModel myMethod() {
    return new XModel(0, "One", "One", "Two", "Three");
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:11,代碼來源:HTMLJavaTemplateTest.java

示例5: simpleWizard

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        page = "SimpleWizard.html",
        folder = "Project/Test",
        displayName = "#Wizard_displayName",
        content = "SimpleWizard.archetype"
)
@NbBundle.Messages({
    "Wizard_displayName=SimpleWizard"
})
static EmptyModel simpleWizard() {
    return new EmptyModel();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:SimpleWizardHandlerTest.java

示例6: wizard

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistrations({
    @TemplateRegistration(folder="Beans", position=100, content="Bean.java.template", displayName="org.netbeans.modules.beans.Bundle#Templates/Beans/Bean.java", iconBase=JavaTemplates.JAVA_ICON, description="Bean.html", category="java-beans", scriptEngine="freemarker"),
    @TemplateRegistration(folder="Beans", position=200, content="BeanInfo.java.template", displayName="org.netbeans.modules.beans.Bundle#Templates/Beans/BeanInfo.java", iconBase=JavaTemplates.JAVA_ICON, description="BeanInfo.html", category="java-beans", scriptEngine="freemarker"),
    @TemplateRegistration(folder="Beans", position=300, content="NoIconBeanInfo.java.template", displayName="org.netbeans.modules.beans.Bundle#Templates/Beans/NoIconBeanInfo.java", iconBase=JavaTemplates.JAVA_ICON, description="BeanInfo.html", category="java-beans", scriptEngine="freemarker"),
    @TemplateRegistration(folder="Beans", position=400, content={"Customizer.java.template", "Customizer.form.template"}, displayName="org.netbeans.modules.beans.Bundle#Templates/Beans/Customizer.java", description="Customizer.html", category="java-beans", scriptEngine="freemarker"),
    @TemplateRegistration(folder="Beans", position=600, content="PropertyEditor.java.template", displayName="org.netbeans.modules.beans.Bundle#Templates/Beans/PropertyEditor.java", iconBase=JavaTemplates.JAVA_ICON, description="PropertyEditor.html", category="java-beans", scriptEngine="freemarker")
})
public static WizardDescriptor.InstantiatingIterator<?> wizard() {
    return JavaTemplates.createJavaTemplateIterator();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:11,代碼來源:Templates.java

示例7: moduleWizard

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        folder = "J2SEModule",
        position = 1,
        content = "../resources/module-info.java.template",
        scriptEngine = "freemarker",
        displayName = "#moduleWizard",
        iconBase = "org/netbeans/modules/java/j2semodule/ui/resources/module.png",
        description = "../resources/module.html",
        category = {"java-modules"})
@NbBundle.Messages("moduleWizard=Module")
public static NewModuleWizardIterator moduleWizard() {
    return new NewModuleWizardIterator();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:14,代碼來源:NewModuleWizardIterator.java

示例8: createLessWizardIterator

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(folder = "ClientSide", category = "html5",
        content = "../resources/style.less",
        description = "../resources/NewLessFileDescription.html",
        position = 320,
        displayName = "#NewFileWizardIterator.less.template.displayName",
        scriptEngine = "freemarker")
@NbBundle.Messages("NewFileWizardIterator.less.template.displayName=LESS File")
public static WizardDescriptor.InstantiatingIterator<WizardDescriptor> createLessWizardIterator() {
    return new NewFileWizardIterator(CssPreprocessorType.LESS);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:11,代碼來源:NewFileWizardIterator.java

示例9: createSassWizardIterator

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(folder = "ClientSide", category = "html5",
        content = "../resources/style.scss",
        description = "../resources/NewSassFileDescription.html",
        position = 310,
        displayName = "#NewFileWizardIterator.scss.template.displayName",
        scriptEngine = "freemarker")
@NbBundle.Messages("NewFileWizardIterator.scss.template.displayName=Sass File")
public static WizardDescriptor.InstantiatingIterator<WizardDescriptor> createSassWizardIterator() {
    return new NewFileWizardIterator(CssPreprocessorType.SASS);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:11,代碼來源:NewFileWizardIterator.java

示例10: javafxWebViewAppWizard

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        position = 133,
        page = "dukeScriptWizard.html",
        content = "dukescript.archetype",
        folder = "Project/JavaFX",
        displayName = "#DukeScriptWizard_displayName",
        iconBase = "org/netbeans/modules/maven/htmlui/DukeHTML.png",
        description = "description.html"
)
@Messages("DukeScriptWizard_displayName=Java HTML5 Application")
public static WizardData javafxWebViewAppWizard() {
    WizardData data = new WizardData();
    data.init(Boolean.TRUE, Boolean.TRUE, Boolean.TRUE, Boolean.TRUE);
    return data;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:DukeScriptWizard.java

示例11: cfgProperties

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        folder = FOLDER_SPRING_BOOT,
        iconBase = ICON_BOOT_CLASS,
        displayName = "#cfgprops_displayName",
        content = "CfgProperties.java.template",
        description = "CfgProperties.html",
        scriptEngine = "freemarker",
        category = {CATEGORY_SPRING_BOOT},
        position = 100)
@NbBundle.Messages(value = "cfgprops_displayName=Configuration Properties Class")
public static WizardDescriptor.InstantiatingIterator<WizardDescriptor> cfgProperties() {
    return JavaTemplates.createJavaTemplateIterator();
}
 
開發者ID:AlexFalappa,項目名稱:nb-springboot,代碼行數:14,代碼來源:FileTemplates.java

示例12: cmdLineRunner

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        folder = FOLDER_SPRING_BOOT,
        iconBase = ICON_BOOT_CLASS,
        displayName = "#cmdlinerunner_displayName",
        content = "CmdLineRunner.java.template",
        description = "CmdLineRunner.html",
        scriptEngine = "freemarker",
        category = {CATEGORY_SPRING_BOOT},
        position = 200)
@NbBundle.Messages(value = "cmdlinerunner_displayName=CommandLineRunner Class")
public static WizardDescriptor.InstantiatingIterator<WizardDescriptor> cmdLineRunner() {
    return JavaTemplates.createJavaTemplateIterator();
}
 
開發者ID:AlexFalappa,項目名稱:nb-springboot,代碼行數:14,代碼來源:FileTemplates.java

示例13: applicationRunner

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        folder = FOLDER_SPRING_BOOT,
        iconBase = ICON_BOOT_CLASS,
        displayName = "#applrunner_displayName",
        content = "ApplRunner.java.template",
        description = "ApplRunner.html",
        scriptEngine = "freemarker",
        category = {CATEGORY_SPRING_BOOT},
        position = 300)
@NbBundle.Messages(value = "applrunner_displayName=ApplicationRunner Class")
public static WizardDescriptor.InstantiatingIterator<WizardDescriptor> applicationRunner() {
    return JavaTemplates.createJavaTemplateIterator();
}
 
開發者ID:AlexFalappa,項目名稱:nb-springboot,代碼行數:14,代碼來源:FileTemplates.java

示例14: configuration

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        folder = FOLDER_SPRING_FRAMEWORK,
        iconBase = ICON_SPRING_CLASS,
        displayName = "#config_displayName",
        content = "Configuration.java.template",
        description = "Configuration.html",
        scriptEngine = "freemarker",
        category = {CATEGORY_SPRING_FRAMEWORK},
        position = 400)
@NbBundle.Messages(value = "config_displayName=Configuration Class")
public static WizardDescriptor.InstantiatingIterator<WizardDescriptor> configuration() {
    return JavaTemplates.createJavaTemplateIterator();
}
 
開發者ID:AlexFalappa,項目名稱:nb-springboot,代碼行數:14,代碼來源:FileTemplates.java

示例15: component

import org.netbeans.api.templates.TemplateRegistration; //導入依賴的package包/類
@TemplateRegistration(
        folder = FOLDER_SPRING_FRAMEWORK,
        iconBase = ICON_SPRING_CLASS,
        displayName = "#component_displayName",
        content = "Component.java.template",
        description = "Component.html",
        scriptEngine = "freemarker",
        category = {CATEGORY_SPRING_FRAMEWORK},
        position = 500)
@NbBundle.Messages(value = "component_displayName=Component Class")
public static WizardDescriptor.InstantiatingIterator<WizardDescriptor> component() {
    return JavaTemplates.createJavaTemplateIterator();
}
 
開發者ID:AlexFalappa,項目名稱:nb-springboot,代碼行數:14,代碼來源:FileTemplates.java


注:本文中的org.netbeans.api.templates.TemplateRegistration類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。