Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
PHPirates committed Dec 27, 2024
1 parent 36f0443 commit f4b32eb
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import nl.hannahsten.texifyidea.psi.LatexCommands
*/
class BibitemPresentation(labelCommand: LatexCommands) : ItemPresentation {

private val bibitemName: String
// Get label name.
private val bibitemName = labelCommand.getRequiredParameters().firstOrNull() ?: ""
private val locationString: String

init {
// Get label name.
this.bibitemName = labelCommand.getRequiredParameters().firstOrNull() ?: ""

// Location string.
val manager = FileDocumentManager.getInstance()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import nl.hannahsten.texifyidea.structure.EditableHintPresentation
*/
class LatexChapterPresentation(chapterCommand: LatexCommands) : EditableHintPresentation {

private val chapterName: String
private val chapterName = chapterCommand.getRequiredParameters().getOrElse(0) { "No chapter name" }
private var hint = ""

init {
this.chapterName = chapterCommand.getRequiredParameters().getOrElse(0) { "No chapter name" }
}

override fun getPresentableText() = chapterName

override fun getLocationString() = hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import nl.hannahsten.texifyidea.util.parser.getIncludedFiles
*/
class LatexIncludePresentation(labelCommand: LatexCommands) : ItemPresentation {

private val fileName: String

init {
this.fileName = labelCommand.getIncludedFiles(true).joinToString { it.name }
}
private val fileName = labelCommand.getIncludedFiles(true).joinToString { it.name }

override fun getPresentableText() = fileName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import nl.hannahsten.texifyidea.structure.EditableHintPresentation
*/
class LatexPartPresentation(partCommand: LatexCommands) : EditableHintPresentation {

private val partName: String
private val partName = partCommand.getRequiredParameters().firstOrNull() ?: "Unnamed part"
private var hint = ""

init {
this.partName = partCommand.getRequiredParameters().firstOrNull() ?: "Unnamed part"
}

override fun getPresentableText() = partName

override fun getLocationString() = hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import nl.hannahsten.texifyidea.structure.EditableHintPresentation
*/
class LatexSectionPresentation(sectionCommand: LatexCommands) : EditableHintPresentation {

private val sectionName: String
private val sectionName = sectionCommand.getRequiredParameters().firstOrNull() ?: "Unnamed section"
private var hint = ""

init {
this.sectionName = sectionCommand.getRequiredParameters().firstOrNull() ?: "Unnamed section"
}

override fun getPresentableText() = sectionName

override fun getLocationString() = hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import nl.hannahsten.texifyidea.structure.EditableHintPresentation
*/
class LatexSubParagraphPresentation(subParagraphCommand: LatexCommands) : EditableHintPresentation {

private val subParagraphName: String
private val subParagraphName = subParagraphCommand.getRequiredParameters().firstOrNull() ?: "Unknown subparagraph"
private var hint = ""

init {
this.subParagraphName = subParagraphCommand.getRequiredParameters().firstOrNull() ?: "Unknown subparagraph"
}

override fun getPresentableText() = subParagraphName

override fun getLocationString() = hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import nl.hannahsten.texifyidea.structure.EditableHintPresentation
*/
class LatexSubSectionPresentation(sectionCommand: LatexCommands) : EditableHintPresentation {

private val subSectionName: String
private val subSectionName = sectionCommand.getRequiredParameters().firstOrNull() ?: "Unnamed subsection"
private var hint = ""

init {
this.subSectionName = sectionCommand.getRequiredParameters().firstOrNull() ?: "Unnamed subsection"
}

override fun getPresentableText() = subSectionName

override fun getLocationString() = hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import nl.hannahsten.texifyidea.structure.EditableHintPresentation
*/
class LatexSubSubSectionPresentation(sectionCommand: LatexCommands) : EditableHintPresentation {

private val subSubSectionName: String
private val subSubSectionName = sectionCommand.getRequiredParameters().firstOrNull() ?: "Unnamed subsubsection"
private var hint = ""

init {
this.subSubSectionName = sectionCommand.getRequiredParameters().firstOrNull() ?: "Unnamed subsubsection"
}

override fun getPresentableText() = subSubSectionName

override fun getLocationString() = hint
Expand Down

0 comments on commit f4b32eb

Please sign in to comment.