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


Java POMExtensibilityElement.getQName方法代碼示例

本文整理匯總了Java中org.netbeans.modules.maven.model.pom.POMExtensibilityElement.getQName方法的典型用法代碼示例。如果您正苦於以下問題:Java POMExtensibilityElement.getQName方法的具體用法?Java POMExtensibilityElement.getQName怎麽用?Java POMExtensibilityElement.getQName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.netbeans.modules.maven.model.pom.POMExtensibilityElement的用法示例。


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

示例1: performOperation

import org.netbeans.modules.maven.model.pom.POMExtensibilityElement; //導入方法依賴的package包/類
@Override
public void performOperation( POMModel model ) {
    debugAddress = DebugUtils.getBindAddress(model);
    Plugin plugin = POMUtils.getVaadinPlugin(model);
    if (plugin == null) {
        return;
    }
    Configuration configuration = plugin.getConfiguration();
    if (configuration == null) {
        return;
    }
    List<POMExtensibilityElement> params = configuration
            .getExtensibilityElements();
    for (POMExtensibilityElement param : params) {
        QName qName = param.getQName();
        String name = qName.getLocalPart();
        String value = param.getElementText().trim();
        switch (name) {
            case HOSTED_WEBAPP:
                hostedWebApp = value;
                break;
            case PORT:
                try {
                    port = Integer.parseInt(value);
                }
                catch (NumberFormatException ignore) {
                }
                break;
            case RUN_TARGET:
                runTarget = value;
                break;
            case NO_SERVER:
                noServer = Boolean.parseBoolean(value);
                break;
            default:
                break;
        }
    }
}
 
開發者ID:vaadin,項目名稱:netbeans-plugin,代碼行數:40,代碼來源:DevModeOptionsPanel.java

示例2: performOperation

import org.netbeans.modules.maven.model.pom.POMExtensibilityElement; //導入方法依賴的package包/類
@Override
public void performOperation( POMModel model ) {
    Plugin vaadinPlugin = POMUtils.getVaadinPlugin(model);
    if (vaadinPlugin == null) {
        return;
    }

    Configuration configuration = vaadinPlugin.getConfiguration();
    if (configuration == null) {
        return;
    }
    List<POMExtensibilityElement> params = configuration
            .getExtensibilityElements();
    for (POMExtensibilityElement param : params) {
        QName qName = param.getQName();
        String name = qName.getLocalPart();
        String value = param.getElementText() == null ? "" : param
                .getElementText().trim();
        switch (name) {
            case WEBAPP_DIRECTORY:
                webApp = value;
                break;
            case PERSISTENT_UNIT_CACHEDIR:
                persistentUnitDir = value;
                break;
            case OPTIMIZATION_LEVEL:
                try {
                    optimization = Integer.parseInt(value);
                }
                catch (NumberFormatException e) {
                    optimization = -1;
                }
                break;
            case COMPILE_REPORT:
                compileReport = Boolean.parseBoolean(value);
                break;
            case STRICT:
                strict = Boolean.parseBoolean(value);
                break;
            case FORCE:
                force = Boolean.parseBoolean(value);
                break;
            case SKIP:
                skip = Boolean.parseBoolean(value);
                break;
            case VALIDATE_ONLY:
                validate = Boolean.parseBoolean(value);
                break;
            case TREE_LOGGER:
                treeLogger = Boolean.parseBoolean(value);
                break;
            case PERSISTENT_UNIT_CACHE:
                usePersistentUnitCache = Boolean.parseBoolean(value);
                break;
        }
    }
}
 
開發者ID:vaadin,項目名稱:netbeans-plugin,代碼行數:58,代碼來源:AdvancedGwtOptionsPanel.java

示例3: performOperation

import org.netbeans.modules.maven.model.pom.POMExtensibilityElement; //導入方法依賴的package包/類
@Override
public void performOperation( POMModel model ) {
    Plugin vaadinPlugin = POMUtils.getVaadinPlugin(model);
    if (vaadinPlugin == null) {
        return;
    }

    Configuration configuration = vaadinPlugin.getConfiguration();
    if (configuration == null) {
        return;
    }
    List<POMExtensibilityElement> params = configuration
            .getExtensibilityElements();
    for (POMExtensibilityElement param : params) {
        QName qName = param.getQName();
        String name = qName.getLocalPart();
        String value = param.getElementText() == null ? "" : param
                .getElementText().trim();
        switch (name) {
            case JVM_ARGS:
                jvmArgs = value;
                break;
            case STYLE:
                style = JSStyle.forString(value);
                break;
            case LOG_LEVEL:
                logLevel = GwtLogLevel.forString(value);
                break;
            case LOCAL_WORKERS:
                try {
                    threads = Integer.parseInt(value);
                }
                catch (NumberFormatException ignore) {
                }
                break;
            case DRAFT:
                draft = Boolean.parseBoolean(value);
                break;
        }
    }
}
 
開發者ID:vaadin,項目名稱:netbeans-plugin,代碼行數:42,代碼來源:GwtCompilerOptionsPanel.java

示例4: performOperation

import org.netbeans.modules.maven.model.pom.POMExtensibilityElement; //導入方法依賴的package包/類
@Override
public void performOperation( POMModel model ) {
    Plugin plugin = POMUtils.getJettyPlugin(model);
    if (plugin == null) {
        return;
    }
    Configuration configuration = plugin.getConfiguration();
    if (configuration == null) {
        return;
    }
    List<POMExtensibilityElement> params = configuration
            .getExtensibilityElements();
    POMExtensibilityElement webApp = null;
    POMExtensibilityElement scanTargets = null;
    for (POMExtensibilityElement param : params) {
        QName qName = param.getQName();
        String name = qName.getLocalPart();
        String value = param.getElementText().trim();
        switch (name) {
            case CLASSES_DIRECTORY:
                classes = value;
                break;
            case RELOAD:
                reload = ReloadMode.forString(value);
                break;
            case SCAN_INTERVAL_SECONDS:
                try {
                    scanInterval = Integer.parseInt(value);
                }
                catch (NumberFormatException ignore) {
                }
                break;
            case WEB_APP:
                webApp = param;
                break;
            case SCAN_TARGETS:
                scanTargets = param;
                break;
            default:
                break;
        }
    }
    if (webApp != null) {
        List<POMExtensibilityElement> webAppConfs = webApp
                .getExtensibilityElements();
        for (POMExtensibilityElement conf : webAppConfs) {
            if (conf.getQName().getLocalPart().equals(CONTEXT_PATH)) {
                ctxtPath = conf.getElementText().trim();
                break;
            }
        }
    }

    if (scanTargets != null) {
        additionalScanTargets = getPomTargets(scanTargets);
    }
}
 
開發者ID:vaadin,項目名稱:netbeans-plugin,代碼行數:58,代碼來源:JettyOptionsPanel.java


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