Changeset 1215


Ignore:
Timestamp:
Jul 12, 2011, 10:16:47 PM (6 years ago)
Author:
stefan
Message:

added EnvironmentUsageCounter?

Location:
trunk/tools/src/jlatexeditor/tools
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/tools/src/jlatexeditor/tools/CommandUsageCounter.scala

    r1214 r1215  
    55
    66/**
    7  * Determine how often a package is used via Google Code Search.
     7 * Determine how often a command is used via Google Code Search.
    88 *
    99 * @author Stefan Endrullis <stefan@endrullis.de>
  • trunk/tools/src/jlatexeditor/tools/EnvironmentUsageCounter.scala

    r1214 r1215  
    22
    33import scala.xml._
    4 import java.io.PrintStream
    54
    65/**
    7  * Determine how often a package is used via Google Code Search.
     6 * Determine how often an environment is used via Google Code Search.
    87 *
    98 * @author Stefan Endrullis <stefan@endrullis.de>
    109 */
    11 object CommandUsageCounter extends UsageCounter("commandUsageCounts.properties") {
    12   val names = (XML.loadFile("packages.xml") \ "package" \ "command").map(node => (node \ "@name").text).sortBy(x => x).distinct
    13   def getCode(name: String) = "\\\\" + name + "\\b"
     10object EnvironmentUsageCounter extends UsageCounter("environmentUsageCounts.properties") {
     11  val names = (XML.loadFile("packages.xml") \ "package" \ "environment").map(node => (node \ "@name").text).sortBy(x => x).distinct
     12  def getCode(name: String) = "\\\\begin\\{" + name + "\\}"
    1413}
Note: See TracChangeset for help on using the changeset viewer.