Skip to content

Commit

Permalink
refact: rename icon files
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Feb 16, 2024
1 parent f3f08dd commit 0565d40
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 18 deletions.
8 changes: 4 additions & 4 deletions org.eclipse.tm4e.language_pack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ for the [Eclipse IDE](https://eclipseide.org).
| Language/Format | File Associations | Source
|:--------------- |:----------------- |:------ |
| ASP.NET Razor | file-extensions="cshtml, razor" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/razor) [[upstream]](https://github.com/dotnet/razor/commit/b44d0a906d054d2d343adc3f58cbea11d97d7488)
| Batch File <img src="syntaxes/bat/bat.png" width=16/> | file-extensions="bat, cmd" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/bat) [[upstream]](https://github.com/mmims/language-batchfile/commit/6154ae25a24e01ac9329e7bcf958e093cd8733a9)
| Batch File <img src="syntaxes/bat/bat.icon.png" width=16/> | file-extensions="bat, cmd" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/bat) [[upstream]](https://github.com/mmims/language-batchfile/commit/6154ae25a24e01ac9329e7bcf958e093cd8733a9)
| BibTeX | file-extensions="bib" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/latex) [[upstream]](https://github.com/jlelong/vscode-latex-basics/commit/36411b38cf4ed18e02050249e2162b1316488686)
| C | file-extensions="c, i" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/cpp) [[upstream]](https://github.com/jeff-hykin/better-c-syntax/commit/34712a6106a4ffb0a04d2fa836fd28ff6c5849a4)
| C# | file-extensions="cake, cs, csx" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/csharp) [[upstream]](https://github.com/dotnet/csharp-tmLanguage/commit/6666eb1d5e6fb565a4110d6db645cc534fb3c6d2)
| C++ | file-extensions="c++, cc, cpp, cxx, h, h++, h.in, hh, hpp, hpp.in, hxx, ii, inl, ino, ipp, ixx, tpp, txx" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/cpp) [[upstream]](https://github.com/jeff-hykin/better-cpp-syntax/commit/f1d127a8af2b184db570345f0bb179503c47fdf6)
| Clojure <img src="syntaxes/clojure/clojure.png" width=16/> | file-extensions="clj, cljc, cljs, cljx, clojure, edn" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/clojure) [[upstream]](https://github.com/atom/language-clojure/commit/45bdb881501d0b8f8b707ca1d3fcc8b4b99fca03)
| Clojure <img src="syntaxes/clojure/clojure.icon.png" width=16/> | file-extensions="clj, cljc, cljs, cljx, clojure, edn" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/clojure) [[upstream]](https://github.com/atom/language-clojure/commit/45bdb881501d0b8f8b707ca1d3fcc8b4b99fca03)
| Code Snippets | file-extensions="code-snippets"<br />file-patterns="\*\*/User/profiles/\*/snippets/\*.json, \*\*/User/snippets/\*.json" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/json) [[upstream]](https://github.com/jeff-hykin/better-snippet-syntax/commit/2b1bb124cb2b9c75c3c80eae1b8f3a043841d654)
| CoffeeScript <img src="syntaxes/coffeescript/coffeescript.png" width=16/> | file-extensions="coffee, cson, iced" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/coffeescript) [[upstream]](https://github.com/atom/language-coffee-script/commit/0f6db9143663e18b1ad00667820f46747dba495e)
| CoffeeScript <img src="syntaxes/coffeescript/coffeescript.icon.png" width=16/> | file-extensions="coffee, cson, iced" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/coffeescript) [[upstream]](https://github.com/atom/language-coffee-script/commit/0f6db9143663e18b1ad00667820f46747dba495e)
| CSS | file-extensions="css" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/css) [[upstream]](https://github.com/microsoft/vscode-css/commit/c216f777497265700ff336f739328e5197e012cd)
| CUDA C++ | file-extensions="cu, cuh" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/cpp) [[upstream]](https://github.com/NVIDIA/cuda-cpp-grammar/commit/81e88eaec5170aa8585736c63627c73e3589998c)
| Dart | file-extensions="dart" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/dart) [[upstream]](https://github.com/dart-lang/dart-syntax-highlight/commit/bd0079ba7ca85cdd6400a8a467e532b539d0f285)
Expand Down Expand Up @@ -68,7 +68,7 @@ for the [Eclipse IDE](https://eclipseide.org).
| Raku (Perl 6) | file-extensions="nqp, p6, pl6, pm6, raku, rakudoc, rakumod, rakutest" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/perl) [[upstream]](https://github.com/textmate/perl.tmbundle/commit/d9841a0878239fa43f88c640f8d458590f97e8f5)
| reStructuredText | file-extensions="rst" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/restructuredtext) [[upstream]](https://github.com/trond-snekvik/vscode-rst/commit/7f2d6bb4e20642b60f2979afcb594cfe4b48117a)
| Ruby | file-extensions="erb, gemspec, podspec, rake, rb, rbi, rbx, rjs, ru"<br />file-names="appfile, appraisals, berksfile, berksfile.lock, brewfile, capfile, cheffile, dangerfile, deliverfile, fastfile, gemfile, guardfile, gymfile, hobofile, matchfile, podfile, puppetfile, rakefile, rantfile, scanfile, snapfile, thorfile, vagrantfile" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/ruby) [[upstream]](https://github.com/textmate/ruby.tmbundle/commit/efcb8941c701343f1b2e9fb105c678152fea6892)
| Rust <img src="syntaxes/rust/rust.png" width=16/> | file-extensions="rs" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/rust) [[upstream]](https://github.com/dustypomerleau/rust-syntax/commit/20730dff3c367cb40a7edd278fdaf0239ea50833)
| Rust <img src="syntaxes/rust/rust.icon.png" width=16/> | file-extensions="rs" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/rust) [[upstream]](https://github.com/dustypomerleau/rust-syntax/commit/20730dff3c367cb40a7edd278fdaf0239ea50833)
| SCSS | file-extensions="scss" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/scss) [[upstream]](https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47)
| ShaderLab | file-extensions="shader" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/shaderlab) [[upstream]](https://github.com/tgjones/shaders-tmLanguage/commit/c72c8b39380ba5a86c58ceed053b5d965ebf38b3)
| Shell Script | file-extensions="Xsession, bash, bash_aliases, bash_login, bash_logout, bash_profile, bashrc, csh, cshrc, ebuild, fish, ksh, profile, sh, tcshrc, xprofile, xsession, xsessionrc, yash_profile, yashrc, zlogin, zlogout, zprofile, zsh, zsh-theme, zshenv, zshrc"<br />file-names=".envrc, .hushlogin, APKBUILD, PKGBUILD, bashrc_Apple_Terminal, zlogin, zlogout, zprofile, zshenv, zshrc, zshrc_Apple_Terminal"<br />file-patterns=".env.\*" | [1.85.2@microsoft/vscode](https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/shellscript) [[upstream]](https://github.com/jeff-hykin/better-shell-syntax/commit/a3de7b32f1537194a83ee848838402fbf4b67424)
Expand Down
8 changes: 4 additions & 4 deletions org.eclipse.tm4e.language_pack/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h2>About This Content</h2>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/razor">1.85.2@microsoft/vscode</a> <a href="https://github.com/dotnet/razor/commit/b44d0a906d054d2d343adc3f58cbea11d97d7488">[upstream]</a>
</tr>
<tr>
<td>Batch File <img src="syntaxes/bat/bat.png" width=16/></td>
<td>Batch File <img src="syntaxes/bat/bat.icon.png" width=16/></td>
<td>file-extensions="bat, cmd"</td>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/bat">1.85.2@microsoft/vscode</a> <a href="https://github.com/mmims/language-batchfile/commit/6154ae25a24e01ac9329e7bcf958e093cd8733a9">[upstream]</a>
</tr>
Expand All @@ -68,7 +68,7 @@ <h2>About This Content</h2>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/cpp">1.85.2@microsoft/vscode</a> <a href="https://github.com/jeff-hykin/better-cpp-syntax/commit/f1d127a8af2b184db570345f0bb179503c47fdf6">[upstream]</a>
</tr>
<tr>
<td>Clojure <img src="syntaxes/clojure/clojure.png" width=16/></td>
<td>Clojure <img src="syntaxes/clojure/clojure.icon.png" width=16/></td>
<td>file-extensions="clj, cljc, cljs, cljx, clojure, edn"</td>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/clojure">1.85.2@microsoft/vscode</a> <a href="https://github.com/atom/language-clojure/commit/45bdb881501d0b8f8b707ca1d3fcc8b4b99fca03">[upstream]</a>
</tr>
Expand All @@ -78,7 +78,7 @@ <h2>About This Content</h2>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/json">1.85.2@microsoft/vscode</a> <a href="https://github.com/jeff-hykin/better-snippet-syntax/commit/2b1bb124cb2b9c75c3c80eae1b8f3a043841d654">[upstream]</a>
</tr>
<tr>
<td>CoffeeScript <img src="syntaxes/coffeescript/coffeescript.png" width=16/></td>
<td>CoffeeScript <img src="syntaxes/coffeescript/coffeescript.icon.png" width=16/></td>
<td>file-extensions="coffee, cson, iced"</td>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/coffeescript">1.85.2@microsoft/vscode</a> <a href="https://github.com/atom/language-coffee-script/commit/0f6db9143663e18b1ad00667820f46747dba495e">[upstream]</a>
</tr>
Expand Down Expand Up @@ -268,7 +268,7 @@ <h2>About This Content</h2>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/ruby">1.85.2@microsoft/vscode</a> <a href="https://github.com/textmate/ruby.tmbundle/commit/efcb8941c701343f1b2e9fb105c678152fea6892">[upstream]</a>
</tr>
<tr>
<td>Rust <img src="syntaxes/rust/rust.png" width=16/></td>
<td>Rust <img src="syntaxes/rust/rust.icon.png" width=16/></td>
<td>file-extensions="rs"</td>
<td><a href="https://github.com/microsoft/vscode/tree/8b3775030ed1a69b13e4f4c628c612102e30a681/extensions/rust">1.85.2@microsoft/vscode</a> <a href="https://github.com/dustypomerleau/rust-syntax/commit/20730dff3c367cb40a7edd278fdaf0239ea50833">[upstream]</a>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions org.eclipse.tm4e.language_pack/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</extension>

<extension point="org.eclipse.ui.genericeditor.icons">
<icon contentType="org.eclipse.tm4e.language_pack.bat" icon="syntaxes/bat/bat.png"/>
<icon contentType="org.eclipse.tm4e.language_pack.bat" icon="syntaxes/bat/bat.icon.png"/>
</extension>

<extension point="org.eclipse.tm4e.ui.snippets">
Expand All @@ -112,7 +112,7 @@
</extension>

<extension point="org.eclipse.ui.genericeditor.icons">
<icon contentType="org.eclipse.tm4e.language_pack.clojure" icon="syntaxes/clojure/clojure.png"/>
<icon contentType="org.eclipse.tm4e.language_pack.clojure" icon="syntaxes/clojure/clojure.icon.png"/>
</extension>

<extension point="org.eclipse.tm4e.ui.snippets">
Expand All @@ -136,7 +136,7 @@
</extension>

<extension point="org.eclipse.ui.genericeditor.icons">
<icon contentType="org.eclipse.tm4e.language_pack.coffeescript" icon="syntaxes/coffeescript/coffeescript.png"/>
<icon contentType="org.eclipse.tm4e.language_pack.coffeescript" icon="syntaxes/coffeescript/coffeescript.icon.png"/>
</extension>

<extension point="org.eclipse.tm4e.ui.snippets">
Expand Down Expand Up @@ -1132,7 +1132,7 @@
</extension>

<extension point="org.eclipse.ui.genericeditor.icons">
<icon contentType="org.eclipse.tm4e.language_pack.rust" icon="syntaxes/rust/rust.png"/>
<icon contentType="org.eclipse.tm4e.language_pack.rust" icon="syntaxes/rust/rust.icon.png"/>
</extension>

<extension point="org.eclipse.tm4e.ui.snippets">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ public void run(final String sourceId) throws Exception {
logHeader("** DONE **");
}

private String getIconFileName(final Path syntaxDir, final String langId) {
return Files.exists(syntaxDir.resolve(langId + ".icon.png"))
? langId + ".icon.png"
: Files.exists(syntaxDir.resolve("icon.png"))
? "icon.png"
: null;
}

private void updateAboutHTML() throws IOException {
logHeader("Updating [about.html.]...");

Expand All @@ -295,8 +303,7 @@ private void updateAboutHTML() throws IOException {
}

final var syntaxDir = syntaxesDir.resolve(extId);
final var iconFileName = Files.exists(syntaxDir.resolve(langId + ".png")) ? langId + ".png"
: Files.exists(syntaxDir.resolve("icon.png")) ? "icon.png" : null;
final var iconFileName = getIconFileName(syntaxDir, langId);

final var templateVars = new HashMap<String, Object>();

Expand Down Expand Up @@ -357,8 +364,7 @@ private void updatePluginXML() throws IOException {
final var grammarFile = findFirstFile(syntaxDir, //
f -> f.matches(Pattern.quote(langId) + "[.]tmLanguage[.](yaml|json|plist)"));

final var iconFileName = Files.exists(syntaxDir.resolve(langId + ".png")) ? langId + ".png"
: Files.exists(syntaxDir.resolve("icon.png")) ? "icon.png" : null;
final var iconFileName = getIconFileName(syntaxDir, langId);

final var exampleFile = findFirstFile(syntaxDir, //
f -> f.matches(Pattern.quote(langId) + "[.]example[.].*"));
Expand Down Expand Up @@ -509,8 +515,7 @@ private void updateReadmeMD() throws IOException {
}

final var syntaxDir = syntaxesDir.resolve(extId);
final var iconFileName = Files.exists(syntaxDir.resolve(langId + ".png")) ? langId + ".png"
: Files.exists(syntaxDir.resolve("icon.png")) ? "icon.png" : null;
final var iconFileName = getIconFileName(syntaxDir, langId);

final var templateVars = new HashMap<String, Object>();

Expand Down

0 comments on commit 0565d40

Please sign in to comment.