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


Java NbBundle.getBranding方法代碼示例

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


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

示例1: getLocalizingSuffixesFast

import org.openide.util.NbBundle; //導入方法依賴的package包/類
/** Similar to {@link NbBundle#getLocalizingSuffixes} but optimized.
 * @since JST-PENDING: Called from InstalledFileLocatorImpl
 */
static synchronized String[] getLocalizingSuffixesFast() {
    if (suffixes == null ||
            Locale.getDefault() != lastLocale ||
            !BaseUtilities.compareObjects(NbBundle.getBranding(), lastBranding)) {
        List<String> _suffixes = new ArrayList<String>();
        Iterator<String> it = NbBundle.getLocalizingSuffixes();
        while (it.hasNext()) {
            _suffixes.add(it.next());
        }
        suffixes = _suffixes.toArray(new String[_suffixes.size()]);
        lastLocale = Locale.getDefault();
        lastBranding = NbBundle.getBranding();
    }
    return suffixes;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:19,代碼來源:LocaleVariants.java

示例2: testBrandingLayerOverrides

import org.openide.util.NbBundle; //導入方法依賴的package包/類
/** Test #21173/#23595: overriding layers by branding. */
public void testBrandingLayerOverrides() throws Exception {
    Main.getModuleSystem ();
    final MockEvents ev = new MockEvents();
    NbInstaller installer = new NbInstaller(ev);
    ModuleManager mgr = new ModuleManager(installer, ev);
    installer.registerManager(mgr);
    mgr.mutexPrivileged().enterWriteAccess();
    try {
        String orig = NbBundle.getBranding();
        NbBundle.setBranding("foo");
        try {
            Module m1 = mgr.create(new File(jars, "base-layer-mod.jar"), null, false, false, false);
            assertEquals(Collections.EMPTY_SET, m1.getProblems());
            mgr.enable(m1);
            assertEquals("special contents", slurp("foo/file1.txt"));
            assertEquals(null, slurp("foo/file2.txt"));
            mgr.disable(m1);
            mgr.delete(m1);
        } finally {
            NbBundle.setBranding(orig);
        }
    } finally {
        mgr.mutexPrivileged().exitWriteAccess();
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:27,代碼來源:NbInstallerTest3.java

示例3: setUp

import org.openide.util.NbBundle; //導入方法依賴的package包/類
@Override
protected void setUp() throws Exception {
    branding = NbBundle.getBranding();
    locale = Locale.getDefault();
    
    clearWorkDir();
    
    install = new File(getWorkDir(), "install");
    platform = new File(install, "platform");
    ide = createIdeCluster(install);
    userdir = new File(getWorkDir(), "tmp");
    
    System.setProperty("netbeans.home", platform.getPath());
    System.setProperty("netbeans.dirs", ide.getPath());
    System.setProperty("netbeans.user", userdir.getPath());
    
    createModule("org.openide.awt", platform, 50000L);
    createModule("org.openide.nodes", platform, 60000L);
    createModule("org.netbeans.api.languages", ide, 90000L);
    createModule("org.netbeans.modules.logmanagement", userdir, 10000L);
    
    reset();
    
    Thread.sleep(100);

    Logger l = Logger.getLogger("org");
    l.setLevel(Level.OFF);
    l.setUseParentHandlers(false);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:30,代碼來源:StampsTest.java

示例4: setUp

import org.openide.util.NbBundle; //導入方法依賴的package包/類
@Override
protected void setUp() throws Exception {
    branding = NbBundle.getBranding();
    locale = Locale.getDefault();
    
    clearWorkDir();
    
    install = new File(getWorkDir(), "install");
    platform = new File(install, "platform");
    ide = new File(install, "ide");
    userdir = new File(getWorkDir(), "tmp");
    
    System.setProperty("netbeans.home", platform.getPath());
    System.setProperty("netbeans.dirs", ide.getPath());
    System.setProperty("netbeans.user", userdir.getPath());
    
    createModule("org.openide.awt", platform, 50000L);
    createModule("org.openide.nodes", platform, 60000L);
    createModule("org.netbeans.api.languages", ide, 90000L);
    createModule("org.netbeans.modules.logmanagement", userdir, 10000L);
    
    Thread.sleep(100);
    
    createPopulateZip();

    Logger l = Logger.getLogger("org");
    l.setLevel(Level.OFF);
    l.setUseParentHandlers(false);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:30,代碼來源:StampsNoFallbackTest.java

示例5: setUp

import org.openide.util.NbBundle; //導入方法依賴的package包/類
@Override
protected void setUp() throws Exception {
    branding = NbBundle.getBranding();
    locale = Locale.getDefault();
    
    clearWorkDir();
    
    install = new File(getWorkDir(), "install");
    platform = new File(install, "platform");
    ide = new File(install, "ide");
    userdir = new File(getWorkDir(), "tmp");
    cache = new File(install, "cache");
    
    System.setProperty("netbeans.home", platform.getPath());
    System.setProperty("netbeans.dirs", ide.getPath());
    System.setProperty("netbeans.user", userdir.getPath());
    
    createModule("org.openide.awt", platform, 50000L);
    createModule("org.openide.nodes", platform, 60000L);
    createModule("org.netbeans.api.languages", ide, 90000L);
    createModule("org.netbeans.modules.logmanagement", userdir, 10000L);
    
    Thread.sleep(100);
    
    createPopulateZip();

    Logger l = Logger.getLogger("org");
    l.setLevel(Level.OFF);
    l.setUseParentHandlers(false);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:31,代碼來源:StampsDifferentPopulateTest.java

示例6: LocaleIterator

import org.openide.util.NbBundle; //導入方法依賴的package包/類
/** Creates new LocaleIterator for given locale.
         * @param locale given Locale
         */
        public LocaleIterator(Locale locale) {
            this.locale = this.initLocale = locale;
//            if (locale.equals(Locale.getDefault())) {
//                defaultInProgress = true;
//            }
            current = '_' + locale.toString();
            if (NbBundle.getBranding() == null)
                branding = null;
            else
                branding = "_" + NbBundle.getBranding(); // NOI18N
            //System.err.println("Constructed: " + this);
        }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:DictionaryProviderImpl.java

示例7: nonNullBranding

import org.openide.util.NbBundle; //導入方法依賴的package包/類
private String nonNullBranding() {
    String s = NbBundle.getBranding();
    return s == null ? "" : s;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:5,代碼來源:ModuleManager.java

示例8: testBrandingIsAssigned

import org.openide.util.NbBundle; //導入方法依賴的package包/類
public void testBrandingIsAssigned() throws Exception {
    String branding = NbBundle.getBranding();
    assertEquals("Default branding in NetBeans is nb", "nb", branding);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:5,代碼來源:BrandingAssignedTest.java

示例9: getSystemLocaleValue

import org.openide.util.NbBundle; //導入方法依賴的package包/類
public static String getSystemLocaleValue () {
    String branding;
    return Locale.getDefault().toString() + ((branding = NbBundle.getBranding()) == null ? "" : (" (" + branding + ")")); // NOI18N
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:5,代碼來源:ProductInformationPanel.java


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