Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F547303
PhabricatorEditorSetting.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorEditorSetting.php
View Options
<?php
final
class
PhabricatorEditorSetting
extends
PhabricatorStringSetting
{
const
SETTINGKEY
=
'editor'
;
public
function
getSettingName
()
{
return
pht
(
'Editor Link'
);
}
public
function
getSettingPanelKey
()
{
return
PhabricatorExternalEditorSettingsPanel
::
PANELKEY
;
}
protected
function
getSettingOrder
()
{
return
300
;
}
protected
function
getControlInstructions
()
{
return
pht
(
"Many text editors can be configured as URI handlers for special "
.
"protocols like `editor://`. If you have installed and configured "
.
"such an editor, some applications can generate links that you can "
.
"click to open files locally."
.
"
\n\n
"
.
"Provide a URI pattern for building external editor URIs in your "
.
"environment. For example, if you use TextMate on macOS, the pattern "
.
"for your machine may look something like this:"
.
"
\n\n
"
.
"```name=
\"
Example: TextMate on macOS
\"\n
"
.
"%s
\n
"
.
"```
\n
"
.
"
\n\n
"
.
"For complete instructions on editor configuration, "
.
"see **[[ %s | %s ]]**."
.
"
\n\n
"
.
"See the tables below for a list of supported variables and protocols."
,
'txmt://open/?url=file:///Users/alincoln/editor_links/%n/%f&line=%l'
,
PhabricatorEnv
::
getDoclink
(
'User Guide: Configuring an External Editor'
),
pht
(
'User Guide: Configuring an External Editor'
));
}
public
function
validateTransactionValue
(
$value
)
{
if
(!
phutil_nonempty_string
(
$value
))
{
return
;
}
id
(
new
PhabricatorEditorURIEngine
())
->
setPattern
(
$value
)
->
validatePattern
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:31 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
100422
Default Alt Text
PhabricatorEditorSetting.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment