|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.css.text.syntax; import java.awt.Font; import java.awt.Color; import java.util.Map; import java.util.TreeMap; import java.util.List; import java.util.ArrayList; import java.util.Arrays; import org.openide.actions.ToolsAction; import org.openide.windows.TopComponent; import org.netbeans.editor.*; import org.netbeans.editor.ext.ExtSettingsNames; import org.netbeans.modules.css.actions.*; import org.netbeans.modules.css.text.syntax.CSSTokenContext; /** * Settings.Initializer for CSSEditor * * @author Petr Kuzel * @version 1.0 */ public class CSSEditorSettings extends Settings.AbstractInitializer { /** Name assigned to initializer */ public static final String NAME = "css-settings-initializer"; // NOI18N static final Font boldFont = SettingsDefaults.defaultFont.deriveFont(Font.BOLD); static final Font italicFont = SettingsDefaults.defaultFont.deriveFont(Font.ITALIC); /** Creates new CSSEditorSettings */ public CSSEditorSettings() { super(NAME); } /** Update map filled with the settings from the previous initializer * @param kitClass kit class for which the settings are being updated. * It is always non-null value. * @param settingsMap map with settings to update. It can be null if all * the previous initializers didn't need to create any settings * for the given kit class. * @return map containing the desired settings or null if no settings * are defined for the given kit */ public void updateSettingsMap(Class kitClass, Map settingsMap) { // editor breaks the contact, handle it somehow if (kitClass == null) return; if (kitClass == BaseKit.class) { new CSSTokenColoringInitializer().updateSettingsMap(kitClass, settingsMap); // coloring has to be present in base kit } // #21053 if ("org.netbeans.modules.css.text.syntax.CSSEditorKit".equals(kitClass.getName())) { // popup menu List cssActionNames = new ArrayList (Arrays.asList (new String[] { CopyStyleAction.XML.class.getName(), CopyStyleAction.HTML.class.getName(), CheckStyleAction.class.getName(), null, // |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.