diff options
Diffstat (limited to 'bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java')
-rw-r--r-- | bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java deleted file mode 100644 index c000cb304d..0000000000 --- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.css.core.internal.metamodel; - - - -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.eclipse.wst.css.core.internal.metamodelimpl.RegistryReader; - - - -public class CSSProfileRegistry { - public synchronized static CSSProfileRegistry getInstance() { - if (fInstance == null) { - fInstance = new CSSProfileRegistry(); - } - return fInstance; - } - - public Iterator getProfiles() { - return Collections.unmodifiableCollection(fProfiles.values()).iterator(); - } - - public CSSProfile getProfile(String profileID) { - return (CSSProfile) fProfiles.get(profileID); - } - - public CSSProfile getDefaultProfile() { - Iterator i = getProfiles(); - while (i.hasNext()) { - CSSProfile profile = (CSSProfile) i.next(); - if (profile.isDefault()) { - return profile; - } - } - return null; - } - - /** - * Constructor for CSSProfileRegistry. - */ - private CSSProfileRegistry() { - super(); - fProfiles = new HashMap(); - Iterator i = new RegistryReader().enumProfiles(); - while (i.hasNext()) { - Object profile = i.next(); - if (profile instanceof CSSProfile) { - fProfiles.put(((CSSProfile) profile).getProfileID(), profile); - } - } - } - - - private static CSSProfileRegistry fInstance = null; - private Map fProfiles = null; -} |