Search in sources :

Example 86 with Hashtable

use of java.util.Hashtable in project robovm by robovm.

the class PKCS12KeyStoreSpi method engineAliases.

public Enumeration engineAliases() {
    Hashtable tab = new Hashtable();
    Enumeration e = certs.keys();
    while (e.hasMoreElements()) {
        tab.put(e.nextElement(), "cert");
    }
    e = keys.keys();
    while (e.hasMoreElements()) {
        String a = (String) e.nextElement();
        if (tab.get(a) == null) {
            tab.put(a, "key");
        }
    }
    return tab.keys();
}
Also used : Enumeration(java.util.Enumeration) Hashtable(java.util.Hashtable) ASN1OctetString(org.bouncycastle.asn1.ASN1OctetString) DERBMPString(org.bouncycastle.asn1.DERBMPString) DEROctetString(org.bouncycastle.asn1.DEROctetString) BEROctetString(org.bouncycastle.asn1.BEROctetString)

Example 87 with Hashtable

use of java.util.Hashtable in project jetty.project by eclipse.

the class WarUrlActivator method start.

/**
     * Register the url stream handler factory.
     * 
     * @param context
     */
@SuppressWarnings("unchecked")
public void start(BundleContext context) throws Exception {
    Dictionary props = new Hashtable();
    props.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] { "war" });
    context.registerService(URLStreamHandlerService.class.getName(), new WarUrlStreamHandler(), props);
}
Also used : Dictionary(java.util.Dictionary) URLStreamHandlerService(org.osgi.service.url.URLStreamHandlerService) Hashtable(java.util.Hashtable)

Example 88 with Hashtable

use of java.util.Hashtable in project jetty.project by eclipse.

the class AbstractOSGiApp method registerAsOSGiService.

/* ------------------------------------------------------------ */
public void registerAsOSGiService() throws Exception {
    if (_registration == null) {
        Dictionary<String, String> properties = new Hashtable<String, String>();
        properties.put(OSGiWebappConstants.WATERMARK, OSGiWebappConstants.WATERMARK);
        if (getBundleSymbolicName() != null)
            properties.put(OSGiWebappConstants.OSGI_WEB_SYMBOLICNAME, getBundleSymbolicName());
        if (getBundleVersionAsString() != null)
            properties.put(OSGiWebappConstants.OSGI_WEB_VERSION, getBundleVersionAsString());
        properties.put(OSGiWebappConstants.OSGI_WEB_CONTEXTPATH, getContextPath());
        ServiceRegistration rego = FrameworkUtil.getBundle(this.getClass()).getBundleContext().registerService(ContextHandler.class.getName(), getContextHandler(), properties);
        setRegistration(rego);
    }
}
Also used : ContextHandler(org.eclipse.jetty.server.handler.ContextHandler) Hashtable(java.util.Hashtable) ServiceRegistration(org.osgi.framework.ServiceRegistration)

Example 89 with Hashtable

use of java.util.Hashtable in project che by eclipse.

the class AssistQuickFixTest18 method setUp.

//	public static Test suite() {
//		return setUpTest(new TestSuite(THIS));
//	}
//
//	public static Test setUpTest(Test test) {
//		return new Java18ProjectTestSetup(test);
//	}
@Before
public void setUp() throws Exception {
    super.setUp();
    Hashtable options = TestOptions.getDefaultOptions();
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
    JavaCore.setOptions(options);
    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);
    StubUtility.setCodeTemplate(CodeTemplateContextType.METHODSTUB_ID, "//TODO\n${body_statement}", null);
    fJProject1 = Java18ProjectTestSetup.getProject();
    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
}
Also used : Hashtable(java.util.Hashtable) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) Before(org.junit.Before)

Example 90 with Hashtable

use of java.util.Hashtable in project che by eclipse.

the class AssistQuickFixTest17 method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    Hashtable options = TestOptions.getDefaultOptions();
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
    JavaCore.setOptions(options);
    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);
    store.setValue(PreferenceConstants.CODEGEN_KEYWORD_THIS, false);
    StubUtility.setCodeTemplate(CodeTemplateContextType.METHODSTUB_ID, "//TODO\n${body_statement}", null);
    //		Preferences corePrefs = JavaPlugin.getJavaCorePluginPreferences();
    //		corePrefs.setValue(JavaCore.CODEASSIST_FIELD_PREFIXES, "");
    //		corePrefs.setValue(JavaCore.CODEASSIST_STATIC_FIELD_PREFIXES, "");
    //		corePrefs.setValue(JavaCore.CODEASSIST_FIELD_SUFFIXES, "");
    //		corePrefs.setValue(JavaCore.CODEASSIST_STATIC_FIELD_SUFFIXES, "");
    fJProject1 = Java17ProjectTestSetup.getProject();
    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
}
Also used : Hashtable(java.util.Hashtable) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) Before(org.junit.Before)

Aggregations

Hashtable (java.util.Hashtable)1752 Test (org.junit.Test)374 ArrayList (java.util.ArrayList)355 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)219 ICompilationUnit (org.eclipse.jdt.core.ICompilationUnit)142 CompilationUnit (org.eclipse.jdt.core.dom.CompilationUnit)137 IPackageFragment (org.eclipse.jdt.core.IPackageFragment)136 HashMap (java.util.HashMap)104 IOException (java.io.IOException)91 Dictionary (java.util.Dictionary)91 Vector (java.util.Vector)88 File (java.io.File)86 Map (java.util.Map)84 Bundle (org.osgi.framework.Bundle)84 BundleContext (org.osgi.framework.BundleContext)78 Configuration (org.osgi.service.cm.Configuration)75 Enumeration (java.util.Enumeration)70 BundleDescription (org.eclipse.osgi.service.resolver.BundleDescription)70 State (org.eclipse.osgi.service.resolver.State)70 ServiceRegistration (org.osgi.framework.ServiceRegistration)65