blob: 32c0b7074461aae14a3c0fcd8e85d8a4fa2929e7 [file] [log] [blame]
david_williamsdce4ddd2005-03-18 05:35:37 +00001/*******************************************************************************
2 * Copyright (c) 2001, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 * Jens Lukowski/Innoopract - initial renaming/restructuring
11 *
12 *******************************************************************************/
13package org.eclipse.wst.sse.core.internal.encoding.util;
14
david_williamsdce4ddd2005-03-18 05:35:37 +000015import org.eclipse.core.resources.IWorkspace;
16import org.eclipse.core.resources.ResourcesPlugin;
17import org.eclipse.core.runtime.Plugin;
18import org.eclipse.core.runtime.Preferences;
19import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
20import org.eclipse.wst.sse.core.internal.encoding.ICodedResourcePlugin;
21
22/**
23 * The main plugin class to be used in the desktop.
24 */
25public class CodedResourcePlugin extends Plugin implements ICodedResourcePlugin {
26 //The shared instance.
27 private static CodedResourcePlugin plugin;
david_williamsdce4ddd2005-03-18 05:35:37 +000028
29 /**
30 * Returns the shared instance.
31 */
32 public static CodedResourcePlugin getDefault() {
33 return plugin;
34 }
35
36 /**
37 * Returns the workspace instance.
38 */
39 public static IWorkspace getWorkspace() {
40 return ResourcesPlugin.getWorkspace();
41 }
42
43 /**
44 * The constructor.
45 */
46 public CodedResourcePlugin() {
47 super();
48 plugin = this;
49 }
50
51 protected void initializeDefaultPluginPreferences() {
52 Preferences prefs = getPluginPreferences();
53 prefs.setDefault(CommonEncodingPreferenceNames.USE_3BYTE_BOM_WITH_UTF8, false);
54 }
david_williamsdce4ddd2005-03-18 05:35:37 +000055}