Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/CharsetResourceHandler.java')
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/CharsetResourceHandler.java67
1 files changed, 0 insertions, 67 deletions
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/CharsetResourceHandler.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/CharsetResourceHandler.java
deleted file mode 100644
index a1bfeead19..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/CharsetResourceHandler.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.internal.encoding.util;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.sse.core.internal.encoding.ICodedResourcePlugin;
-
-
-public class CharsetResourceHandler {
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- URL configURI = Platform.getBundle(ICodedResourcePlugin.ID).getEntry("/"); //$NON-NLS-1$
- String configPathString = configURI + "config/charset"; //$NON-NLS-1$
- return ResourceBundleHelper.getResourceBundle(configPathString);
- }
- catch (MissingResourceException e) {
- Logger.logException("invalid install or configuration", e); //$NON-NLS-1$
- }
- catch (MalformedURLException e) {
- Logger.logException("invalid install or configuration", e); //$NON-NLS-1$
- }
- catch (IOException e) {
- Logger.logException("invalid install or configuration", e); //$NON-NLS-1$
- }
- return null;
- }
-
- public static String getString(String key) {
- String result = null;
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
- if (fgResourceBundle != null) {
- try {
- result = fgResourceBundle.getString(key);
- }
- catch (MissingResourceException e) {
- result = "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- else {
- result = "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- return result;
- }
-}

Back to the top