Skip to content

Commit

Permalink
[VSC] Implement accounts and contacts
Browse files Browse the repository at this point in the history
This commit will add the functionality of
managing accounts and contacts of
Saros. There are wizards for handling
those data and necessary UI elements
such as the contact and active account
view.
  • Loading branch information
mschaefer88 committed Sep 17, 2020
1 parent 5cf3e7b commit ea603e0
Show file tree
Hide file tree
Showing 73 changed files with 3,399 additions and 497 deletions.
84 changes: 80 additions & 4 deletions vscode/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,41 @@
!.vscode/extensions.json
out/*

# VSCE
*.vsix

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
Expand All @@ -29,4 +58,51 @@ typings/
.npm

# Optional eslint cache
.eslintcache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# gatsby files
.cache/
public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Generated images
media/colors-generated/
9 changes: 9 additions & 0 deletions vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "saros" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

- Initial release
6 changes: 5 additions & 1 deletion vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ This is the Saros implementation for Visual Studio Code.

## Requirements

**TBD**
For now build the Saros Language Protocol Server prior building the extension with:

> `./gradlew sarosLsp`
Then either copy the resulting jar from `../build/distribute` to `./out` or create a symlink with `mklink /H saros.lsp.jar "../../build/distribution/lsp/saros.lsp.jar" ` (Windows).

## Extension Settings

Expand Down
101 changes: 0 additions & 101 deletions vscode/build.gradle

This file was deleted.

110 changes: 110 additions & 0 deletions vscode/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// Imports for node support
import com.moowork.gradle.node.npm.NpmInstallTask
import com.moowork.gradle.node.npm.NpmTask
import com.moowork.gradle.node.npm.NpxTask
import com.moowork.gradle.node.task.NodeTask
import com.moowork.gradle.node.yarn.YarnInstallTask
import com.moowork.gradle.node.yarn.YarnTask

// Imports for os detection
import org.apache.tools.ant.taskdefs.condition.Os

plugins {
id("com.github.node-gradle.node") version "2.2.4" apply true
}

// Extract extension data
var packageJsonContent = File("${project.projectDir}/package.json").readText()

var versionRegex = "\"version\": \"(.*?)\"".toRegex()
var versionMatch = versionRegex.find(packageJsonContent)
var version = versionMatch!!.groups.get(1)!!.value

var publisherRegex = "\"publisher\": \"(.*?)\"".toRegex()
var publisherMatch = publisherRegex.find(packageJsonContent)
var publisher = publisherMatch!!.groups.get(1)!!.value

var nameRegex = "\"name\": \"(.*?)\"".toRegex()
var nameMatch = nameRegex.find(packageJsonContent)
var name = nameMatch!!.groups.get(1)!!.value

// Path to vsce cli
var vscePath = "./node_modules/vsce/out/vsce"

node {
version = "10.14.1"
npmVersion = "6.4.1"
download = true
}

tasks.register<Copy>("copyLsp") {
from("${rootDir.absolutePath}/build/distribution/lsp")
into("dist")
}

tasks.register("buildExtension") {
dependsOn("copyLsp",
"npmInstall",
"npm_run_webpack")
group = "VS Code"
description = "Builds the extension"
}

tasks.register<Exec>("runExtension") {
dependsOn("buildExtension")
group = "VS Code"
description = "Builds and runs the extension"

var cwd = System.getProperty("cwd", "") // argument is -Pcwd=
var execArgs = "code --extensionDevelopmentPath=${projectDir.absolutePath} ${cwd} --inspect-extensions 1234"

if (Os.isFamily(Os.FAMILY_WINDOWS)) {
executable = "cmd"
setArgs(listOf("/c ${execArgs}"))
} else {
executable = "sh"
setArgs(listOf(execArgs))
}

workingDir = File("./dist")
}

tasks.register<NodeTask>("packageExtension") {
dependsOn("copyLsp", "npmInstall")
group = "VS Code"
description = "Packages the extension"

var outDir = "${project.projectDir}/vsix"
doFirst {
delete("$outDir/*")
File("$outDir").mkdirs()
}

script = file(vscePath)
setArgs(listOf("package" , "--out", "$outDir/${project.name}-$version.vsix" ))
}

tasks.register<NodeTask>("publishExtension") {
dependsOn("copyLsp", "npmInstall")
group = "VS Code"
description = "Publishes the extension"

script = file(vscePath)
setArgs(listOf("publish", "patch"))

setExecOverrides(closureOf<ExecSpec>({
workingDir = file("./")
}))
}

tasks.register<NodeTask>("unpublishExtension") {
group = "VS Code"
description = "Unpublishes the extension"

script = file(vscePath)
setArgs(listOf("unpublish", "${publisher}.${name}"))

setExecOverrides(closureOf<ExecSpec>({
workingDir = file("./")
}))
}
Binary file added vscode/media/btn/addaccount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/btn/changeaccount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/btn/deleteaccount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/dlcl16/xmpp_connect_tsk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/dlcl16/xmpp_disconnect_tsk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/elcl16/session_add_contacts_tsk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/obj16/contact_obj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/obj16/contact_offline_obj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vscode/media/obj16/contact_saros_obj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ea603e0

Please sign in to comment.