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:
authornitind2012-03-14 17:44:24 +0000
committernitind2012-03-14 17:44:24 +0000
commit75aa232a0ea702f9a424b1ae7244d5302c39960b (patch)
treeffb0287220f35bb05009a940e58f13cdfcd7bff5 /bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java
parent8d9633e3f55499602e222eacbf5e7018882b7890 (diff)
downloadwebtools.sourceediting-201203141800.tar.gz
webtools.sourceediting-201203141800.tar.xz
webtools.sourceediting-201203141800.zip
This commit was manufactured by cvs2svn to create tag 'v201203141800'.v201203141800
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java')
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java79
1 files changed, 0 insertions, 79 deletions
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java
deleted file mode 100644
index c80d99065f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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.dtd.ui.internal.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.style.IStyleConstantsDTD;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-
-/**
- * Sets default values for DTD UI preferences
- */
-public class DTDUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = DTDUIPlugin.getDefault().getPreferenceStore();
- ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
-
- // DTD Style Preferences
- String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
- String JUSTITALIC = " | null | false | true"; //$NON-NLS-1$
- String styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_DEFAULT, 0, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_DEFAULT, styleValue); // black
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_TAG, 63, 63, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_TAG, styleValue); // blue
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_TAGNAME, 63, 63, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_TAGNAME, styleValue); // blue
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_COMMENT, 127, 127, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_COMMENT, styleValue); // grey
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_KEYWORD, 128, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_KEYWORD, styleValue); // dark
- // red
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_STRING, 63, 159, 95) + JUSTITALIC;
- store.setDefault(IStyleConstantsDTD.DTD_STRING, styleValue); // green
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_DATA, 191, 95, 95) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_DATA, styleValue); // light
- // red
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_SYMBOL, 128, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_SYMBOL, styleValue); // dark
- // red
-
- // set default new xml file template to use in new file wizard
- /*
- * Need to find template name that goes with default template id (name
- * may change for differnt language)
- */
- String templateName = ""; //$NON-NLS-1$
- Template template = DTDUIPlugin.getDefault().getTemplateStore().findTemplateById("org.eclipse.wst.dtd.ui.internal.templates.xmldeclaration"); //$NON-NLS-1$
- if (template != null)
- templateName = template.getName();
- store.setDefault(DTDUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
-
- store.setDefault(DTDUIPreferenceNames.ACTIVATE_PROPERTIES, true);
- }
-}

Back to the top