Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/parser/DifferentialChangesetParser.php
Show All 38 Lines | final class DifferentialChangesetParser { | ||||
private $coverage; | private $coverage; | ||||
private $markupEngine; | private $markupEngine; | ||||
private $highlightErrors; | private $highlightErrors; | ||||
private $disableCache; | private $disableCache; | ||||
private $renderer; | private $renderer; | ||||
private $characterEncoding; | private $characterEncoding; | ||||
private $highlightAs; | private $highlightAs; | ||||
private $showEditAndReplyLinks = true; | private $showEditAndReplyLinks = true; | ||||
private $canMarkDone; | |||||
private $rangeStart; | private $rangeStart; | ||||
private $rangeEnd; | private $rangeEnd; | ||||
private $mask; | private $mask; | ||||
public function setRange($start, $end) { | public function setRange($start, $end) { | ||||
$this->rangeStart = $start; | $this->rangeStart = $start; | ||||
$this->rangeEnd = $end; | $this->rangeEnd = $end; | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | public function setDisableCache($disable_cache) { | ||||
$this->disableCache = $disable_cache; | $this->disableCache = $disable_cache; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getDisableCache() { | public function getDisableCache() { | ||||
return $this->disableCache; | return $this->disableCache; | ||||
} | } | ||||
public function setCanMarkDone($can_mark_done) { | |||||
$this->canMarkDone = $can_mark_done; | |||||
return $this; | |||||
} | |||||
public function getCanMarkDone() { | |||||
return $this->canMarkDone; | |||||
} | |||||
public static function getDefaultRendererForViewer(PhabricatorUser $viewer) { | public static function getDefaultRendererForViewer(PhabricatorUser $viewer) { | ||||
$prefs = $viewer->loadPreferences(); | $prefs = $viewer->loadPreferences(); | ||||
$pref_unified = PhabricatorUserPreferences::PREFERENCE_DIFF_UNIFIED; | $pref_unified = PhabricatorUserPreferences::PREFERENCE_DIFF_UNIFIED; | ||||
if ($prefs->getPreference($pref_unified) == 'unified') { | if ($prefs->getPreference($pref_unified) == 'unified') { | ||||
return '1up'; | return '1up'; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 692 Lines • ▼ Show 20 Lines | $renderer = $this->getRenderer() | ||||
->setNewAttachesToNewFile($this->rightSideAttachesToNewFile) | ->setNewAttachesToNewFile($this->rightSideAttachesToNewFile) | ||||
->setCodeCoverage($this->getCoverage()) | ->setCodeCoverage($this->getCoverage()) | ||||
->setRenderingReference($this->getRenderingReference()) | ->setRenderingReference($this->getRenderingReference()) | ||||
->setMarkupEngine($this->markupEngine) | ->setMarkupEngine($this->markupEngine) | ||||
->setHandles($this->handles) | ->setHandles($this->handles) | ||||
->setOldLines($this->old) | ->setOldLines($this->old) | ||||
->setNewLines($this->new) | ->setNewLines($this->new) | ||||
->setOriginalCharacterEncoding($encoding) | ->setOriginalCharacterEncoding($encoding) | ||||
->setShowEditAndReplyLinks($this->getShowEditAndReplyLinks()); | ->setShowEditAndReplyLinks($this->getShowEditAndReplyLinks()) | ||||
->setCanMarkDone($this->getCanMarkDone()); | |||||
$shield = null; | $shield = null; | ||||
if ($this->isTopLevel && !$this->comments) { | if ($this->isTopLevel && !$this->comments) { | ||||
if ($this->isGenerated()) { | if ($this->isGenerated()) { | ||||
$shield = $renderer->renderShield( | $shield = $renderer->renderShield( | ||||
pht( | pht( | ||||
'This file contains generated code, which does not normally '. | 'This file contains generated code, which does not normally '. | ||||
'need to be reviewed.')); | 'need to be reviewed.')); | ||||
▲ Show 20 Lines • Show All 545 Lines • Show Last 20 Lines |