Package app.model.languages
Class Empty
java.lang.Object
app.model.languages.Empty
- All Implemented Interfaces:
ProgrammingLanguage
public class Empty extends java.lang.Object implements ProgrammingLanguage
-
Constructor Summary
Constructors Constructor Description Empty()
-
Method Summary
Modifier and Type Method Description java.lang.String
commentLine(java.lang.String line)
Comment out a linejava.lang.String
commentSelection(java.lang.String selection)
Comment out an area of textjava.lang.String
getName()
java.util.regex.Pattern
getPattern()
java.util.Map<java.util.regex.Pattern,java.lang.String>
getPatternMap()
boolean
isCommentedLine(java.lang.String line)
boolean
isCommentedSelection(java.lang.String selection)
java.lang.String
unCommentLine(java.lang.String line)
Uncomment a linejava.lang.String
unCommentSelection(java.lang.String selection)
Uncomment an area of textMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Empty
public Empty()
-
-
Method Details
-
getName
public java.lang.String getName()- Specified by:
getName
in interfaceProgrammingLanguage
- Returns:
- The name of the programming language
-
getPatternMap
public java.util.Map<java.util.regex.Pattern,java.lang.String> getPatternMap()- Specified by:
getPatternMap
in interfaceProgrammingLanguage
- Returns:
- The map containing the regexes and corresponding style-classes to be used for syntax highlighting
-
getPattern
public java.util.regex.Pattern getPattern()- Specified by:
getPattern
in interfaceProgrammingLanguage
- Returns:
- A combined regex for syntax highlighting
-
commentLine
public java.lang.String commentLine(java.lang.String line)Description copied from interface:ProgrammingLanguage
Comment out a line- Specified by:
commentLine
in interfaceProgrammingLanguage
- Parameters:
line
- The text of the line to comment out- Returns:
- The commented line
-
unCommentLine
public java.lang.String unCommentLine(java.lang.String line)Description copied from interface:ProgrammingLanguage
Uncomment a line- Specified by:
unCommentLine
in interfaceProgrammingLanguage
- Parameters:
line
- The text of the line to uncomment- Returns:
- The uncommented line
-
isCommentedLine
public boolean isCommentedLine(java.lang.String line)- Specified by:
isCommentedLine
in interfaceProgrammingLanguage
- Parameters:
line
- The text of the line- Returns:
- Whether or not a line is commented
-
commentSelection
public java.lang.String commentSelection(java.lang.String selection)Description copied from interface:ProgrammingLanguage
Comment out an area of text- Specified by:
commentSelection
in interfaceProgrammingLanguage
- Parameters:
selection
- The text of the area to comment out- Returns:
- The commented area
-
unCommentSelection
public java.lang.String unCommentSelection(java.lang.String selection)Description copied from interface:ProgrammingLanguage
Uncomment an area of text- Specified by:
unCommentSelection
in interfaceProgrammingLanguage
- Parameters:
selection
- The text of the area to uncomment- Returns:
- The uncommented area
-
isCommentedSelection
public boolean isCommentedSelection(java.lang.String selection)- Specified by:
isCommentedSelection
in interfaceProgrammingLanguage
- Parameters:
selection
- The content of the area- Returns:
- Whether or not an area of text is commented
-