From d26deaba2077789ca75e8d88942c769e64e54dc7 Mon Sep 17 00:00:00 2001 From: marcello Date: Thu, 8 Nov 2018 23:12:09 +0000 Subject: [PATCH] README, transformations in XML, force interfaces to act as leaves --- README.md | 8 ++++---- package.json | 2 +- src/abap/AbapObject.ts | 13 ++++++++++++- src/abap/AbapObjectUtilities.ts | 13 ++++++++++++- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e0683f1..bb36298 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ABAP remote filesystem for visual studio code This extension allows editing and activation of ABAP code on your server directly in Visual studio code. -It's still in its early stages, for now no transport selection is provided, save and activate does work for local objects +Doesn't allow to create objects yet, but does read/save/activate several object types **WRITE SUPPORT IS EXPERIMANTAL USE AT YOUR OWN RISK** @@ -13,7 +13,7 @@ Sadly [ABAPlint](https://marketplace.visualstudio.com/items?itemName=larshp.vsco ## Features -Connect to your SAP server using the ADT interface +Connect to your SAP server using the ADT interface, edit, save and activate files The complete list of editable objects depends on your installation, on my local 7.51 works for: - programs/includes @@ -21,14 +21,14 @@ The complete list of editable objects depends on your installation, on my local - classes - transformations -**Saved objects will be deactivated, this doesn't allow activation yet** +![anim](https://user-images.githubusercontent.com/2453277/48232926-30a78d80-e3ab-11e8-8a12-00844431f9af.gif) ## setup Too early to publish as an extension, there's a compiled extension you can run from source or install from the command line with ```shell -code --install-extension vscode-abap-remote-fs-0.0.3.vsix +code --install-extension vscode-abap-remote-fs-0.1.0.vsix ``` The compiled file can be either downloaded from for the diff --git a/package.json b/package.json index a74c537..c94ae2a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-abap-remote-fs", "displayName": "vscode_abap_remote_fs", "description": "Work on your ABAP code straight from the server", - "version": "0.0.3", + "version": "0.1.0", "publisher": "murbani", "author": { "email": "marcello.urbani@gmail.com", diff --git a/src/abap/AbapObject.ts b/src/abap/AbapObject.ts index 79d879a..ab5c2f8 100644 --- a/src/abap/AbapObject.ts +++ b/src/abap/AbapObject.ts @@ -219,7 +219,7 @@ export class AbapObject { .then(pick("body")) } - getExtension(): any { + getExtension(): string { if (!this.isLeaf()) return "" return this.sapguiOnly ? ".txt" : ".abap" } @@ -276,3 +276,14 @@ export class AbapObject { } } } +export class AbapXmlObject extends AbapObject { + getExtension(): string { + if (!this.isLeaf()) return "" + return this.sapguiOnly ? ".txt" : ".xml" + } +} +export class AbapSimpleObject extends AbapObject { + isLeaf() { + return true + } +} diff --git a/src/abap/AbapObjectUtilities.ts b/src/abap/AbapObjectUtilities.ts index f69701a..ab661e0 100644 --- a/src/abap/AbapObjectUtilities.ts +++ b/src/abap/AbapObjectUtilities.ts @@ -1,4 +1,9 @@ -import { AbapObject, AbapNodeComponentByCategory } from "./AbapObject" +import { + AbapObject, + AbapNodeComponentByCategory, + AbapSimpleObject, + AbapXmlObject +} from "./AbapObject" import { NodeStructure, ObjectNode } from "../adt/AdtNodeStructParser" import { selectMap } from "../functions" import { AbapProgram } from "./AbapProgram" @@ -61,6 +66,12 @@ export function abapObjectFromNode(node: ObjectNode): AbapObject { case "CLAS/I": objtype = AbapClassInclude break + case "XSLT/VT": + objtype = AbapXmlObject + break + case "INTF/OI": + objtype = AbapSimpleObject + break case "PROG/I": case "FUGR/I": objtype = AbapInclude