Defining your own syntax highlighting in Crucible or Fisheye

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Create Your Own

All existing syntax highlighting definitions can be found at <Fisheye installation directory>/syntax directory.
For example java.def:

syntaxdef java {


/\s+/m : ;


/(abstract|b(oolean|reak|yte)|c(a(se|tch)|har|lass|on(st|tinue))\
|d(efault|o(|uble))|e(lse|xtends)|f(alse|inal(|ly)|loat|or)|goto\
|i(f|mp(lements|ort)|n(stanceof|t(|erface)))|long|n(ative|ew|ull)\
|p(ackage|r(ivate|otected)|ublic)|return|s(hort|tatic|uper|witch|ynchronized)\
|t(h(is|row(|s))|r(ansient|ue|y))|vo(id|latile)|while)\b/ : {
      region {
        type=keyword;
        index=word;
      }
}

...
...
...

   context todo {
      /(?i)todo\s.*/ : {
        region {
          type=todo;
        }
      }

   }

}

To create your own:

  1. Copy one of the existing definitions into your FISHEYE_INST/syntax directory. (Note, by making your modifications in the FISHEYE_INST directory, your changes will persist across upgrades. If you make the changes in FISHEYE_HOME, they will need to be reapplied each upgrade).
  2. Then modify the filename and the definition in the FISHEYE_INST/syntax directory. E.g. you can change java.def to objectiveC.def and modify the definition to suit your programming language.
  3. Copy the FISHEYE_HOME/filename.map to your FISHEYE_INST/syntax directory and modify it to map file extensions to definitions.
  4. Restart Fisheye to pick up the change.

Configure syntax highlighting for non-standard file extensions


最終更新日 2018 年 7 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.