Skip to content

Commit

Permalink
Standardize & apply standard formatting (#325)
Browse files Browse the repository at this point in the history
* Move launch configs to tasks & debug configs
* Remove settings, classpath & project files
* Add java formatter and format files
* Set default formatter to prettier & format markdown
* Format yaml files
* Format json files
* Format tf, ts, js, html and css files
* Add formatter for xml files and format files

Co-authored-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>
  • Loading branch information
sgraband and jfaltermeier authored Jul 19, 2024
1 parent 1be7e1b commit 37785cf
Show file tree
Hide file tree
Showing 246 changed files with 9,914 additions and 13,204 deletions.
13 changes: 9 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"recommendations": [
"hashicorp.terraform"
]
}
"recommendations": [
"hashicorp.terraform",
"vscjava.vscode-java-pack",
"esbenp.prettier-vscode",
"ms-azuretools.vscode-docker",
"jebbs.plantuml",
"redhat.vscode-xml"
]
}
787 changes: 787 additions & 0 deletions .vscode/java-formatter.xml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug Default Operator",
"request": "launch",
"cwd": "${workspaceFolder}/java/operator/org.eclipse.theia.cloud.defaultoperator",
"mainClass": "org.eclipse.theia.cloud.defaultoperator.DefaultTheiaCloudOperatorLauncher",
"args": [
"--instancesHost",
"ws.$(minikube.ip).nip.io",
"--cloudProvider",
"MINIKUBE",
"--sessionsPerUser",
"3",
"--appId",
"asdfghjkl",
"--storageClassName",
"default",
"--requestedStorage",
"250Mi"
],
"vmArgs": "-Dlog4j2.configurationFile=log4j2.xml",
"preLaunchTask": "Build and Install Operator library"
}
]
}
40 changes: 29 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
{
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform",
"editor.formatOnSave": true,
},
"[terraform-vars]": {
"editor.defaultFormatter": "hashicorp.terraform",
"editor.formatOnSave": true,
},
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
}
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform",
"editor.formatOnSave": true
},
"[terraform-vars]": {
"editor.defaultFormatter": "hashicorp.terraform",
"editor.formatOnSave": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive",
"java.format.settings.url": ".vscode/java-formatter.xml",
"[java]": {
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.defaultFormatter": "redhat.java"
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"[plantuml]": {
"editor.defaultFormatter": "jebbs.plantuml"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
}
}
73 changes: 73 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Install Maven config",
"type": "shell",
"command": "mvn",
"args": ["install"],
"options": {
"cwd": "${workspaceFolder}/java/common/maven-conf"
},
"problemMatcher": []
},
{
"label": "Build and Install Common library",
"type": "shell",
"command": "mvn",
"args": ["clean", "install"],
"options": {
"cwd": "${workspaceFolder}/java/common/org.eclipse.theia.cloud.common"
},
"problemMatcher": [],
"dependsOn": "Install Maven config"
},
{
"label": "Build and Install Operator library",
"type": "shell",
"command": "mvn",
"args": ["install"],
"options": {
"cwd": "${workspaceFolder}/java/operator/org.eclipse.theia.cloud.operator"
},
"problemMatcher": [],
"dependsOn": "Build and Install Common library"
},
{
"label": "Run Service",
"type": "shell",
"command": "mvn",
"args": ["compile", "quarkus:dev"],
"options": {
"cwd": "${workspaceFolder}/java/service/org.eclipse.theia.cloud.service"
},
"problemMatcher": [],
"dependsOn": "Build and Install Common library"
},
{
"label": "Run Conversion Hook",
"type": "shell",
"command": "mvn",
"args": ["compile", "quarkus:dev"],
"options": {
"cwd": "${workspaceFolder}/java/conversion/org.eclipse.theia.cloud.conversion"
},
"problemMatcher": [],
"dependsOn": "Build and Install Common library"
},
{
"label": "Run Service Tests",
"type": "shell",
"command": "sh",
"args": [
"-c",
"export JAVA_OPTS='-ea -Djava.util.logging.manager=org.jboss.logmanager.LogManager' && mvn test"
],
"options": {
"cwd": "${workspaceFolder}/java/service/org.eclipse.theia.cloud.service"
},
"problemMatcher": [],
"dependsOn": "Build and Install Common library"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ spec:
image: nginxdemos/hello
securityContext:
runAsUser: 0
runAsGroup: 0
runAsGroup: 0
168 changes: 84 additions & 84 deletions demo/dockerfiles/demo-theia-docker/package.json
Original file line number Diff line number Diff line change
@@ -1,87 +1,87 @@
{
"private": true,
"theia": {
"frontend": {
"config": {
"applicationName": "Theia Cloud Example",
"warnOnPotentiallyInsecureHostPattern": false,
"preferences": {
"files.enableTrash": false
}
}
},
"backend": {
"config": {
"warnOnPotentiallyInsecureHostPattern": false
}
"private": true,
"theia": {
"frontend": {
"config": {
"applicationName": "Theia Cloud Example",
"warnOnPotentiallyInsecureHostPattern": false,
"preferences": {
"files.enableTrash": false
}
}
},
"dependencies": {
"@theia/bulk-edit": "1.43.1",
"@theia/callhierarchy": "1.43.1",
"@theia/console": "1.43.1",
"@theia/core": "1.43.1",
"@theia/debug": "1.43.1",
"@theia/editor": "1.43.1",
"@theia/editor-preview": "1.43.1",
"@theia/electron": "1.43.1",
"@theia/external-terminal": "1.43.1",
"@theia/file-search": "1.43.1",
"@theia/filesystem": "1.43.1",
"@theia/getting-started": "1.43.1",
"@theia/keymaps": "1.43.1",
"@theia/markers": "1.43.1",
"@theia/messages": "1.43.1",
"@theia/metrics": "1.43.1",
"@theia/mini-browser": "1.43.1",
"@theia/monaco": "1.43.1",
"@theia/navigator": "1.43.1",
"@theia/outline-view": "1.43.1",
"@theia/output": "1.43.1",
"@theia/plugin-dev": "1.43.1",
"@theia/plugin-ext": "1.43.1",
"@theia/plugin-ext-vscode": "1.43.1",
"@theia/preferences": "1.43.1",
"@theia/process": "1.43.1",
"@theia/property-view": "1.43.1",
"@theia/scm": "1.43.1",
"@theia/scm-extra": "1.43.1",
"@theia/search-in-workspace": "1.43.1",
"@theia/task": "1.43.1",
"@theia/terminal": "1.43.1",
"@theia/timeline": "1.43.1",
"@theia/toolbar": "1.43.1",
"@theia/typehierarchy": "1.43.1",
"@theia/userstorage": "1.43.1",
"@theia/variable-resolver": "1.43.1",
"@theia/vsx-registry": "1.43.1",
"@theia/workspace": "1.43.1"
},
"devDependencies": {
"@theia/cli": "1.43.1"
},
"scripts": {
"preinstall": "node-gyp install"
},
"theiaPluginsDir": "plugins",
"theiaPlugins": {
"vscode.git": "https://open-vsx.org/api/vscode/git/1.52.1/file/vscode.git-1.52.1.vsix",
"vscode.markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.2/file/vscode.markdown-language-features-1.39.2.vsix",
"vscode-builtin-extensions-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.1/file/eclipse-theia.builtin-extension-pack-1.50.1.vsix",
"redhat.java": "https://open-vsx.org/api/redhat/java/0.73.0/file/redhat.java-0.73.0.vsix",
"vscjava.vscode-java-debug": "https://open-vsx.org/api/vscjava/vscode-java-debug/0.30.0/file/vscjava.vscode-java-debug-0.30.0.vsix",
"vscjava.vscode-java-test": "https://open-vsx.org/api/vscjava/vscode-java-test/0.26.1/file/vscjava.vscode-java-test-0.26.1.vsix",
"vscjava.vscode-maven": "https://open-vsx.org/api/vscjava/vscode-maven/0.21.2/file/vscjava.vscode-maven-0.21.2.vsix",
"vscjava.vscode-java-dependency": "https://open-vsx.org/api/vscjava/vscode-java-dependency/0.16.0/file/vscjava.vscode-java-dependency-0.16.0.vsix",
"redhat.vscode-xml": "https://open-vsx.org/api/redhat/vscode-xml/0.20.0/file/redhat.vscode-xml-0.20.0.vsix",
"cdt-gdb-vscode": "https://open-vsx.org/api/eclipse-cdt/cdt-gdb-vscode/0.0.92/file/eclipse-cdt.cdt-gdb-vscode-0.0.92.vsix",
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.62.3/file/vscode.cpp-1.62.3.vsix",
"vscode-clangd": "https://open-vsx.org/api/llvm-vs-code-extensions/vscode-clangd/0.1.15/file/llvm-vs-code-extensions.vscode-clangd-0.1.15.vsix",
"vscode-cmake": "https://open-vsx.org/api/ms-vscode/cmake-tools/1.9.2/file/ms-vscode.cmake-tools-1.9.2.vsix"
},
"theiaPluginsExcludeIds": [
"vscode.extension-editing",
"vscode.microsoft-authentication",
"vscode.html-language-features"
]
}
"backend": {
"config": {
"warnOnPotentiallyInsecureHostPattern": false
}
}
},
"dependencies": {
"@theia/bulk-edit": "1.43.1",
"@theia/callhierarchy": "1.43.1",
"@theia/console": "1.43.1",
"@theia/core": "1.43.1",
"@theia/debug": "1.43.1",
"@theia/editor": "1.43.1",
"@theia/editor-preview": "1.43.1",
"@theia/electron": "1.43.1",
"@theia/external-terminal": "1.43.1",
"@theia/file-search": "1.43.1",
"@theia/filesystem": "1.43.1",
"@theia/getting-started": "1.43.1",
"@theia/keymaps": "1.43.1",
"@theia/markers": "1.43.1",
"@theia/messages": "1.43.1",
"@theia/metrics": "1.43.1",
"@theia/mini-browser": "1.43.1",
"@theia/monaco": "1.43.1",
"@theia/navigator": "1.43.1",
"@theia/outline-view": "1.43.1",
"@theia/output": "1.43.1",
"@theia/plugin-dev": "1.43.1",
"@theia/plugin-ext": "1.43.1",
"@theia/plugin-ext-vscode": "1.43.1",
"@theia/preferences": "1.43.1",
"@theia/process": "1.43.1",
"@theia/property-view": "1.43.1",
"@theia/scm": "1.43.1",
"@theia/scm-extra": "1.43.1",
"@theia/search-in-workspace": "1.43.1",
"@theia/task": "1.43.1",
"@theia/terminal": "1.43.1",
"@theia/timeline": "1.43.1",
"@theia/toolbar": "1.43.1",
"@theia/typehierarchy": "1.43.1",
"@theia/userstorage": "1.43.1",
"@theia/variable-resolver": "1.43.1",
"@theia/vsx-registry": "1.43.1",
"@theia/workspace": "1.43.1"
},
"devDependencies": {
"@theia/cli": "1.43.1"
},
"scripts": {
"preinstall": "node-gyp install"
},
"theiaPluginsDir": "plugins",
"theiaPlugins": {
"vscode.git": "https://open-vsx.org/api/vscode/git/1.52.1/file/vscode.git-1.52.1.vsix",
"vscode.markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.2/file/vscode.markdown-language-features-1.39.2.vsix",
"vscode-builtin-extensions-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.1/file/eclipse-theia.builtin-extension-pack-1.50.1.vsix",
"redhat.java": "https://open-vsx.org/api/redhat/java/0.73.0/file/redhat.java-0.73.0.vsix",
"vscjava.vscode-java-debug": "https://open-vsx.org/api/vscjava/vscode-java-debug/0.30.0/file/vscjava.vscode-java-debug-0.30.0.vsix",
"vscjava.vscode-java-test": "https://open-vsx.org/api/vscjava/vscode-java-test/0.26.1/file/vscjava.vscode-java-test-0.26.1.vsix",
"vscjava.vscode-maven": "https://open-vsx.org/api/vscjava/vscode-maven/0.21.2/file/vscjava.vscode-maven-0.21.2.vsix",
"vscjava.vscode-java-dependency": "https://open-vsx.org/api/vscjava/vscode-java-dependency/0.16.0/file/vscjava.vscode-java-dependency-0.16.0.vsix",
"redhat.vscode-xml": "https://open-vsx.org/api/redhat/vscode-xml/0.20.0/file/redhat.vscode-xml-0.20.0.vsix",
"cdt-gdb-vscode": "https://open-vsx.org/api/eclipse-cdt/cdt-gdb-vscode/0.0.92/file/eclipse-cdt.cdt-gdb-vscode-0.0.92.vsix",
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.62.3/file/vscode.cpp-1.62.3.vsix",
"vscode-clangd": "https://open-vsx.org/api/llvm-vs-code-extensions/vscode-clangd/0.1.15/file/llvm-vs-code-extensions.vscode-clangd-0.1.15.vsix",
"vscode-cmake": "https://open-vsx.org/api/ms-vscode/cmake-tools/1.9.2/file/ms-vscode.cmake-tools-1.9.2.vsix"
},
"theiaPluginsExcludeIds": [
"vscode.extension-editing",
"vscode.microsoft-authentication",
"vscode.html-language-features"
]
}
26 changes: 13 additions & 13 deletions demo/dockerfiles/demo-theia-docker/project/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"java.configuration.updateBuildConfiguration": "automatic",
"xml.downloadExternalResources.enabled": true,
"cmake.sourceDirectory": "${workspaceFolder}/cpp",
"cmake.buildDirectory": "${workspaceFolder}/cpp/build",
"java.project.importOnFirstTimeStartup": "automatic",
"cmake.configureOnOpen": true,
}
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"java.configuration.updateBuildConfiguration": "automatic",
"xml.downloadExternalResources.enabled": true,
"cmake.sourceDirectory": "${workspaceFolder}/cpp",
"cmake.buildDirectory": "${workspaceFolder}/cpp/build",
"java.project.importOnFirstTimeStartup": "automatic",
"cmake.configureOnOpen": true
}
16 changes: 8 additions & 8 deletions demo/dockerfiles/demo-theia-docker/project/files/template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "./template.schema.json",
"name": "theia-cloud.demo",
"image": "my.docker.registry/theia-cloud-demo",
"limits": {
"cpu": "1",
"memory": "2000M"
}
}
"$schema": "./template.schema.json",
"name": "theia-cloud.demo",
"image": "my.docker.registry/theia-cloud-demo",
"limits": {
"cpu": "1",
"memory": "2000M"
}
}
Loading

0 comments on commit 37785cf

Please sign in to comment.