Skip to content

Commit bf7c96b

Browse files
authored
feat: Add Java Method Sorter VS Code extension
Add Java Method Sorter VS Code extension
1 parent b4bee35 commit bf7c96b

32 files changed

Lines changed: 8530 additions & 0 deletions

.github/CODEOWNERS

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# See https://help.github.com/articles/about-codeowners/
2+
# for more info about CODEOWNERS file
3+
4+
# It uses the same pattern rule for gitignore file
5+
# https://git-scm.com/docs/gitignore#_pattern_format
6+
7+
# GitHub
8+
.github/** @unknowIfGuestInDream
9+
10+
# Dev conf
11+
.vscode/** @unknowIfGuestInDream
12+
.editorconfig @unknowIfGuestInDream
13+
.gitattributes @unknowIfGuestInDream
14+
.gitignore @unknowIfGuestInDream
15+
16+
# Source
17+
src/** @unknowIfGuestInDream
18+
19+
# Config files
20+
package.json @unknowIfGuestInDream
21+
tsconfig.json @unknowIfGuestInDream
22+
eslint.config.mjs @unknowIfGuestInDream
23+
24+
# Document
25+
LICENSE @unknowIfGuestInDream
26+
README.md @unknowIfGuestInDream
27+
CHANGELOG.md @unknowIfGuestInDream
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Bug report
2+
description: Create a report to help us improve
3+
title: "[Bug] "
4+
labels:
5+
- bug
6+
assignees: unknowIfGuestInDream
7+
body:
8+
- type: input
9+
id: vscode-version
10+
attributes:
11+
label: Which version of VS Code are you using?
12+
description: You can find this in Help > About
13+
14+
- type: input
15+
id: extension-version
16+
attributes:
17+
label: Which version of the extension are you using?
18+
description: Check in Extensions panel
19+
20+
- type: checkboxes
21+
id: operating-systems
22+
attributes:
23+
label: Which operating system are you using?
24+
description: You may select more than one. Don't select anything if it's not about the environment.
25+
options:
26+
- label: macOS
27+
- label: Windows
28+
- label: Linux
29+
30+
- type: input
31+
id: version
32+
attributes:
33+
label: Version since
34+
description: Version since when the behavior is seen [e.g. 1.0.0]
35+
36+
- type: textarea
37+
id: description
38+
attributes:
39+
label: Describe the bug
40+
description: A clear and concise description of what the bug is.
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: reproduce-context
46+
attributes:
47+
label: To Reproduce
48+
description: Steps to reproduce the behavior.
49+
50+
- type: textarea
51+
id: expected-context
52+
attributes:
53+
label: Expected behavior
54+
placeholder: A clear and concise description of what you expected to happen.
55+
56+
- type: textarea
57+
id: screenshots-context
58+
attributes:
59+
label: Screenshots
60+
description: If applicable, add screenshots to help explain your problem.
61+
62+
- type: textarea
63+
id: additional-context
64+
attributes:
65+
label: Additional context
66+
description: If you are not reporting something obvious, a minimal reproduction and related log is required.
67+
placeholder: Add any other context about the problem here. Especially if the issue occurs in certain OS, browser or configuration.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Feature request
2+
description: Suggest an idea for this project
3+
title: "[Feature Request] "
4+
labels:
5+
- enhancement
6+
assignees: unknowIfGuestInDream
7+
body:
8+
- type: textarea
9+
id: feature
10+
attributes:
11+
label: Describe the feature
12+
description: Is your feature request related to a problem? Please describe.
13+
placeholder: A clear and concise description of what the feature is, and what it will enhance or solve. Ex. I'm always frustrated when [...]
14+
15+
- type: textarea
16+
id: solution-context
17+
attributes:
18+
label: Describe the solution you'd like
19+
placeholder: A clear and concise description of what you want to happen.
20+
21+
- type: textarea
22+
id: considered-context
23+
attributes:
24+
label: Describe alternatives you've considered
25+
placeholder: A clear and concise description of any alternative solutions or features you've considered.
26+
27+
- type: textarea
28+
id: additional-context
29+
attributes:
30+
label: Additional context
31+
placeholder: Add any other context or screenshots about the feature request here.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: General question
2+
description: Ask a question here
3+
title: "[Question] "
4+
labels:
5+
- question
6+
assignees: unknowIfGuestInDream
7+
body:
8+
- type: checkboxes
9+
id: checklist
10+
attributes:
11+
label: Checklist
12+
description: |-
13+
Make sure that you follow these statements.
14+
options:
15+
- label: I am following the docs and I am sure I have tried searching for the problem.
16+
required: true
17+
18+
- type: textarea
19+
id: question
20+
attributes:
21+
label: Describe the question
22+
description: What's it for
23+
placeholder: write your question here
24+
validations:
25+
required: true

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
open-pull-requests-limit: 10
8+
labels:
9+
- "dependencies"
10+
- "npm"
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
day: "friday"
16+
timezone: "Asia/Shanghai"
17+
labels:
18+
- "workflow"
19+
- "github_actions"

.github/workflows/artifact.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow packages the extension on every push to master
2+
# Users can download the latest packaged extension from the artifacts
3+
4+
name: Artifact
5+
6+
on:
7+
push:
8+
branches: [master]
9+
paths-ignore:
10+
- '**.md'
11+
- 'LICENSE'
12+
- '.gitignore'
13+
- 'images/**'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v6
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v6
28+
with:
29+
node-version: '22'
30+
cache: 'npm'
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Compile
36+
run: npm run compile
37+
38+
- name: Package extension
39+
run: npx @vscode/vsce package
40+
41+
- name: Upload artifact
42+
uses: actions/upload-artifact@v6
43+
with:
44+
name: vscode-java-method-sorter-vsix
45+
path: '*.vsix'
46+
retention-days: 90

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will build and test the VS Code extension on each push and pull request
2+
3+
name: Build and Test
4+
5+
on:
6+
push:
7+
branches: [master]
8+
paths-ignore:
9+
- '**.md'
10+
- 'LICENSE'
11+
- '.gitignore'
12+
pull_request:
13+
branches: [master]
14+
paths-ignore:
15+
- '**.md'
16+
- 'LICENSE'
17+
- '.gitignore'
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
build:
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
os: [ubuntu-latest, windows-latest, macos-latest]
28+
runs-on: ${{ matrix.os }}
29+
30+
steps:
31+
- uses: actions/checkout@v6
32+
- name: Setup Node.js 22
33+
uses: actions/setup-node@v6
34+
with:
35+
node-version: '22'
36+
cache: 'npm'
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Lint
40+
run: npm run lint
41+
- name: Compile
42+
run: npm run compile

.github/workflows/publish.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow allows manual publishing to VS Code Marketplace
2+
3+
name: Publish to VS Code Marketplace
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
bump_version:
9+
description: 'Bump version before publish (patch/minor/major), leave empty to use current version'
10+
required: false
11+
type: choice
12+
options:
13+
- ''
14+
- patch
15+
- minor
16+
- major
17+
18+
permissions:
19+
contents: write
20+
21+
jobs:
22+
publish:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v6
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v6
33+
with:
34+
node-version: '22'
35+
cache: 'npm'
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Configure Git
41+
if: ${{ inputs.bump_version != '' }}
42+
run: |
43+
git config user.name "github-actions[bot]"
44+
git config user.email "github-actions[bot]@users.noreply.github.com"
45+
46+
- name: Bump version
47+
if: ${{ inputs.bump_version != '' }}
48+
run: |
49+
npm version ${{ inputs.bump_version }} -m "chore: bump version to %s"
50+
git push
51+
git push --tags
52+
53+
- name: Compile
54+
run: npm run compile
55+
56+
- name: Publish to VS Code Marketplace
57+
run: npx @vscode/vsce publish
58+
env:
59+
VSCE_PAT: ${{ secrets.VSCE_PAT }}

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow builds and uploads artifacts on release
2+
3+
name: Build and Upload Artifacts on Release
4+
5+
on:
6+
release:
7+
types: [published]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v6
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v6
22+
with:
23+
node-version: '22'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Compile
30+
run: npm run compile
31+
32+
- name: Package extension
33+
run: npx @vscode/vsce package
34+
35+
- name: Upload artifact to release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
files: '*.vsix'
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)