[[nbpython-commits]] [hg] main/contrib: (1) Fix code coverage background colors to be...

  • From: Tor Norbye < >
  • To:
  • Subject: [[nbpython-commits]] [hg] main/contrib: (1) Fix code coverage background colors to be...
  • Date: Thu, 21 Oct 2010 08:34:29 -0700

changeset 719047cec3e0 in main/contrib
details: http://hg.netbeans.org/main/contrib?cmd=changeset;node=719047cec3e0
description:
        (1) Fix code coverage background colors to be theme sensitive, (2) 
Make the dark themes specify suitable colors, and (3) Fix dark and extra 
color themes for Python

diffstat:

 python.editor/src/org/netbeans/modules/python/editor/layer.xml               
                   |   36 ++-
 
python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-Strings.xml
     |   15 +
 
python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-fontsColors.xml
 |  115 ++++++++++
 
python.editor/src/org/netbeans/modules/python/editor/resources/Bundle.properties
                |  100 ++++++++
 
python.editor/src/org/netbeans/modules/python/editor/resources/fontsColors.xml
                  |   35 +--
 5 files changed, 268 insertions(+), 33 deletions(-)

diffs (364 lines):

diff --git a/python.editor/src/org/netbeans/modules/python/editor/layer.xml 
b/python.editor/src/org/netbeans/modules/python/editor/layer.xml
--- a/python.editor/src/org/netbeans/modules/python/editor/layer.xml
+++ b/python.editor/src/org/netbeans/modules/python/editor/layer.xml
@@ -76,13 +76,27 @@
                         <attr name="position" intvalue="400"/>
                     </file>
                 </folder>
-                <!-- TODO - this should not be necessary; I'm doing this now 
to work around
-                    bugs in color initialization -->
                 <folder name="FontsColors">
                     <folder name="NetBeans">
                         <folder name="Defaults">
                             <file name="coloring.xml" 
url="resources/fontsColors.xml">
-                                <attr 
name="SystemFileSystem.localizingBundle" 
stringvalue="org.netbeans.modules.python.editor.Bundle"/>
+                                <attr 
name="SystemFileSystem.localizingBundle" 
stringvalue="org.netbeans.modules.python.editor.resources.Bundle"/>
+                            </file>
+                        </folder>
+                    </folder>
+                    <folder name="BlueTheme">
+                        <folder name="Defaults">
+                            <file name="python-colorings.xml" 
url="resources/BlueTheme-Python-fontsColors.xml">
+                                <attr 
name="SystemFileSystem.localizingBundle" 
stringvalue="org.netbeans.modules.python.editor.resources.Bundle"/>
+                            </file>
+                        </folder>
+                    </folder>
+                    <folder name="CityLights">
+                        <folder name="Defaults">
+                            <!-- This is just the bluetheme again - not 
right, but it's better
+                                 to use a dark theme than the light theme a 
a backup. -->
+                            <file name="python-colorings.xml" 
url="resources/BlueTheme-Python-fontsColors.xml">
+                                <attr 
name="SystemFileSystem.localizingBundle" 
stringvalue="org.netbeans.modules.python.editor.resources.Bundle"/>
                             </file>
                         </folder>
                     </folder>
@@ -113,6 +127,22 @@
                             </file>
                         </folder>
                     </folder>
+                    <folder name="BlueTheme">
+                        <folder name="Defaults">
+                            <file name="python-colorings.xml" 
url="resources/BlueTheme-Python-Strings.xml">
+                                <attr 
name="SystemFileSystem.localizingBundle" 
stringvalue="org.netbeans.modules.python.editor.resources.Bundle"/>
+                            </file>
+                        </folder>
+                    </folder>
+                    <folder name="CityLights">
+                        <folder name="Defaults">
+                            <!-- This is just the bluetheme again - not 
right, but it's better
+                                 to use a dark theme than the light theme a 
a backup. -->
+                            <file name="python-colorings.xml" 
url="resources/BlueTheme-Python-Strings.xml">
+                                <attr 
name="SystemFileSystem.localizingBundle" 
stringvalue="org.netbeans.modules.python.editor.resources.Bundle"/>
+                            </file>
+                        </folder>
+                    </folder>
                 </folder>
             </folder>
 
diff --git 
a/python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-Strings.xml
 
b/python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-Strings.xml
new file mode 100644
--- /dev/null
+++ 
b/python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-Strings.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors 
settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd";>
+<fontscolors>
+    <fontcolor default="string" name="STRING_TEXT"/>
+    <fontcolor default="string" name="STRING_ESCAPE">
+        <font style="bold"/>
+    </fontcolor>
+    <fontcolor default="string" name="STRING_INVALID" waveUnderlined="red">
+        <font style="bold"/>
+    </fontcolor>
+    <fontcolor name="EMBEDDED_PYTHON" default="string">
+        <font style="bold" />
+    </fontcolor>
+    <fontcolor name="URL" underline="blue" foreColor="blue" 
default="default"/>
+</fontscolors>
diff --git 
a/python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-fontsColors.xml
 
b/python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-fontsColors.xml
new file mode 100644
--- /dev/null
+++ 
b/python.editor/src/org/netbeans/modules/python/editor/resources/BlueTheme-Python-fontsColors.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+
+The contents of this file are subject to the terms of either the GNU
+General Public License Version 2 only ("GPL") or the Common
+Development and Distribution License("CDDL") (collectively, the
+"License"). You may not use this file except in compliance with the
+License. You can obtain a copy of the License at
+http://www.netbeans.org/cddl-gplv2.html
+or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+specific language governing permissions and limitations under the
+License.  When distributing the software, include this License Header
+Notice in each file and include the License file at
+nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+particular file as subject to the "Classpath" exception as provided
+by Sun in the GPL Version 2 section of the License file that
+accompanied this code. If applicable, add the following below the
+License Header, with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+Contributor(s):
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
+Microsystems, Inc. All Rights Reserved.
+
+If you wish your version of this file to be governed by only the CDDL
+or only the GPL Version 2, indicate your decision by adding
+"[Contributor] elects to include this software in this distribution
+under the [CDDL or GPL Version 2] license." If you do not indicate a
+single choice of license, a recipient has the option to distribute
+your version of this file under either the CDDL, the GPL Version 2 or
+to extend the choice of license to its licensees as provided above.
+However, if you add GPL Version 2 code and therefore, elected the GPL
+Version 2 license, then the option applies only if the new code is
+made subject to such option by the copyright holder.
+-->
+<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors 
settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd";>
+
+<fontscolors>
+    <fontcolor name="CLASS_VAR" foreColor="EDDD3D">
+        <font style="bold+italic"/>
+    </fontcolor>
+    
+    <fontcolor name="INT_LITERAL" default="number"/>
+    <fontcolor name="FLOAT_LITERAL" default="number"/>
+    <fontcolor name="ANY_OPERATOR" default="8AA6C1"/>
+    <fontcolor name="INSTANCE_VAR" foreColor="EDDD3D">
+        <font style="bold"/>
+    </fontcolor>
+    <fontcolor name="GLOBAL_VAR" foreColor="EDDD3D">
+        <font style="italic"/>
+    </fontcolor>
+    <fontcolor name="STRING_LITERAL" default="string"/>
+    <fontcolor name="DOUBLE_LITERAL" default="number"/>
+    <fontcolor name="LONG_LITERAL" default="number"/>
+    <fontcolor name="REGEXP_LITERAL" foreColor="CA4344"/>
+    <fontcolor name="ERROR" default="error"/>
+    <fontcolor name="LINE_COMMENT" default="comment"/>
+    <fontcolor name="CONSTANT" foreColor="8AA6C1"/>
+    <fontcolor name="TYPE_SYMBOL" foreColor="B53B3C"/>
+    <fontcolor name="IDENTIFIER" default="identifier"/>
+    <fontcolor name="WHITESPACE" default="whitespace"/>
+    <fontcolor name="ANY_KEYWORD" default="keyword"/>
+    <fontcolor name="TODO" foreColor="ff99006b">
+        <font style="bold"/>
+    </fontcolor>
+    <fontcolor name="QUOTED_STRING_LITERAL" default="string"/>
+
+    <!--"semantic" highlighting:-->
+    <fontcolor name="mod-unused" waveUnderlined="ff8888"/>
+    <fontcolor name="mod-field" foreColor="EDDD3D" >
+        <font style="bold" />
+    </fontcolor>
+    <fontcolor name="mod-local-variable" />
+    <fontcolor name="mod-parameter" foreColor="8AA6C1"/>
+    <fontcolor name="mod-method">
+        <font style="italic" />
+    </fontcolor>
+    <fontcolor name="mod-constructor" >
+        <font style="bold" />
+    </fontcolor>
+    <fontcolor name="mod-class" />
+    <fontcolor name="mod-deprecated" strikeThrough="404040" />
+    <fontcolor name="mark-occurrences" bgColor="38566F"/>
+
+    <!-- embedded strings and colors -->
+    <fontcolor name="STRING_INVALID" foreColor="ffff006b" 
strikeThrough="ffff006b" >
+        <font style="bold"/>
+    </fontcolor>
+    <fontcolor name="STRING_TEXT" default="string"/>
+    <fontcolor name="STRING_ESCAPE" foreColor="EDDD37">
+        <font style="bold"/>
+    </fontcolor>
+    
+    <fontcolor name="COMMENT_TODO" foreColor="ff99006b">
+        <font style="bold"/>
+    </fontcolor>
+
+    <!-- Code Coverage -->
+    <!--
+    <fontcolor name="covered" bgColor="ff006633"/>
+    <fontcolor name="uncovered" bgColor="ff602a2a"/>
+    <fontcolor name="inferred" bgColor="ff1e6633"/>
+    -->
+    <fontcolor name="covered" bgColor="ff122e31"/>
+    <fontcolor name="uncovered" bgColor="ff321e31"/>
+    <fontcolor name="inferred" bgColor="ff122831"/>
+    
+</fontscolors>
diff --git 
a/python.editor/src/org/netbeans/modules/python/editor/resources/Bundle.properties
 
b/python.editor/src/org/netbeans/modules/python/editor/resources/Bundle.properties
new file mode 100644
--- /dev/null
+++ 
b/python.editor/src/org/netbeans/modules/python/editor/resources/Bundle.properties
@@ -0,0 +1,100 @@
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common
+# Development and Distribution License("CDDL") (collectively, the
+# "License"). You may not use this file except in compliance with the
+# License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html
+# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+# specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header
+# Notice in each file and include the License file at
+# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the GPL Version 2 section of the License file that
+# accompanied this code. If applicable, add the following below the
+# License Header, with the fields enclosed by brackets [] replaced by
+# your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+#
+# If you wish your version of this file to be governed by only the CDDL
+# or only the GPL Version 2, indicate your decision by adding
+# "[Contributor] elects to include this software in this distribution
+# under the [CDDL or GPL Version 2] license." If you do not indicate a
+# single choice of license, a recipient has the option to distribute
+# your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above.
+# However, if you add GPL Version 2 code and therefore, elected the GPL
+# Version 2 license, then the option applies only if the new code is
+# made subject to such option by the copyright holder.
+#
+# Contributor(s):
+#
+# Portions Copyrighted 2008 Sun Microsystems, Inc.
+
+ERROR=Error
+CLASS_VAR=Class Variable
+REGEXP_LITERAL=Regular Expression
+LINE_COMMENT=Line Comment
+CONSTANT=Constant
+INT_LITERAL=Number
+IDENTIFIER=Identifier
+keyword=Keyword
+ANY_KEYWORD=Keyword
+WHITESPACE=Whitespace
+FLOAT_LITERAL=Floating Point Number
+ANY_OPERATOR=Operator
+INSTANCE_VAR=Instance
+STRING_INVALID=Invalid String
+GLOBAL_VAR=Global Variable
+STRING_LITERAL=String
+DOUBLE_LITERAL=Double
+BLOCK_COMMENT=Block Comment
+STRING_TEXT=String
+QUOTED_STRING_LITERAL=Quoted String
+LONG_LITERAL=Long
+STRING_ESCAPE=String Escape
+DOCUMENTATION=Documentation
+COMMENT_TEXT=Comment Text
+COMMENT_TODO=Comment TODO Text
+COMMENT_RDOC=RDoc Comment Tag
+COMMENT_HTMLTAG=Comment HTML Tag
+COMMENT_LINK=Comment Link
+COMMENT_BOLD=Bold Comment
+COMMENT_ITALIC=Italic Comment
+TYPE_SYMBOL=Type Symbol
+REGEXP_TEXT=Regular Expression
+REGEXP_META=Regular Expression Metachar
+REGEXP_INVALID=Invalid Regular Expression
+EMBEDDED_PYTHON=Embedded Python
+
+#"Semantic" highlighting:
+mod-unused=Unused Element
+mod-abstract=Abstract Element
+mod-field=Field
+mod-local-variable=Local Variable
+mod-parameter=Parameter
+mod-method=Method
+mod-constructor=Constructor
+mod-class=Class
+mod-interface=Interface
+mod-annotation-type=Annotation
+mod-enum=Enum
+mod-deprecated=Deprecated Element
+mod-static=Static Member
+mod-private=Private Member
+mod-package-private=Package Private Member
+mod-protected=Protected Member
+mod-public=Public Member
+mod-type-parameter-declaration=Type Parameter
+mod-type-parameter-use=Type Parameter Use
+mod-undefined=Undefined Element
+
+mark-occurrences=Mark Occurrences
+
+covered=Covered
+uncovered=Not Covered
+inferred=Inferred Covered
diff --git 
a/python.editor/src/org/netbeans/modules/python/editor/resources/fontsColors.xml
 
b/python.editor/src/org/netbeans/modules/python/editor/resources/fontsColors.xml
--- 
a/python.editor/src/org/netbeans/modules/python/editor/resources/fontsColors.xml
+++ 
b/python.editor/src/org/netbeans/modules/python/editor/resources/fontsColors.xml
@@ -19,8 +19,6 @@
     </fontcolor>
     <fontcolor name="STRING_LITERAL" default="string"/>
     <fontcolor name="DOUBLE_LITERAL" default="number"/>
-    <fontcolor name="BLOCK_COMMENT" default="comment"/>
-    <fontcolor name="DOCUMENTATION" default="comment"/>
     <fontcolor name="LONG_LITERAL" default="number"/>
     <fontcolor name="REGEXP_LITERAL" foreColor="9933CC"/>
     <fontcolor name="ERROR" default="error"/>
@@ -37,20 +35,8 @@
     </fontcolor>
     <fontcolor name="QUOTED_STRING_LITERAL" default="string"/>
 
-    <!-- This is intended for an embedded regular expression language -->
-    <!--
-    <fontcolor name="REGEXP_TEXT" foreColor="ff006f00"/>
-    <fontcolor name="REGEXP_META" foreColor="ff006f00">
-        <font style="bold"/>
-    </fontcolor>
-    <fontcolor name="REGEXP_INVALID" foreColor="ffff006b" 
strikeThrough="ffff006b" >
-        <font style="bold"/>
-    </fontcolor>
-    -->
-
     <!--"semantic" highlighting:-->
     <fontcolor name="mod-unused" waveUnderlined="999999"/>
-    <fontcolor name="mod-abstract" />
     <fontcolor name="mod-field" default="field"/>
     <fontcolor name="mod-local-variable" />
     <fontcolor name="mod-parameter" foreColor="A06001"/> 
@@ -62,23 +48,12 @@
         <font style="bold" />
     </fontcolor>
     <fontcolor name="mod-class" />
-    <fontcolor name="mod-interface" />
-    <fontcolor name="mod-annotation-type" />
-    <fontcolor name="mod-enum" />
     <fontcolor name="mod-deprecated" strikeThrough="404040" />
-    <fontcolor name="mod-static" >
-        <font style="italic" />
-    </fontcolor>
-    <fontcolor name="mod-private" />
-    <fontcolor name="mod-package-private" />
-    <fontcolor name="mod-protected" />
-    <fontcolor name="mod-public" />
+    <fontcolor name="mark-occurrences" bgColor="ECEBA3"/>
 
-    <!--currently not used:-->
-<!--    <fontcolor name="mod-type-parameter-declaration" 
bgColor="lightGray"/>
-    <fontcolor name="mod-type-parameter-use" bgColor="green"/>
-    <fontcolor name="mod-undefined" foreColor="red"/>-->
+    <!-- Code Coverage -->
+    <fontcolor name="covered" bgColor="ccffcc"/>
+    <fontcolor name="uncovered" bgColor="ffcccc"/>
+    <fontcolor name="inferred" bgColor="e0ffe0"/>
 
-    <!--mark occurrences:-->
-    <fontcolor name="mark-occurrences" bgColor="ECEBA3"/>
 </fontscolors>

[[nbpython-commits]] [hg] main/contrib: (1) Fix code coverage background colors to be...

Tor Norbye 10/21/2010

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close