Skip to content

Commit

Permalink
Merge pull request #1445 from halcyon-tech/feature/ile_libl_only
Browse files Browse the repository at this point in the history
Feature/ile_libl_only
  • Loading branch information
worksofliam authored Jul 18, 2023
2 parents 9135e79 + 15df6cf commit dbd17e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
6 changes: 4 additions & 2 deletions src/api/CompileTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,10 @@ export namespace CompileTools {
const commands = commandString.split(`\n`).filter(command => command.trim().length > 0);

outputChannel.append(`\n\n`);
outputChannel.append(`Current library: ` + ileSetup.currentLibrary + `\n`);
outputChannel.append(`Library list: ` + ileSetup.libraryList.join(` `) + `\n`);
if (options.environment === `ile`) {
outputChannel.append(`Current library: ` + ileSetup.currentLibrary + `\n`);
outputChannel.append(`Library list: ` + ileSetup.libraryList.join(` `) + `\n`);
}
outputChannel.append(`Commands:\n${commands.map(command => `\t\t${command}\n`).join(``)}\n`);

const callbacks: StandardIO = {
Expand Down
34 changes: 8 additions & 26 deletions src/instantiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,16 @@ disconnectBarItem.command = {
command: `code-for-ibmi.disconnect`,
title: `Disconnect from system`
}

const connectedBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 10);
connectedBarItem.command = {
command: `code-for-ibmi.showAdditionalSettings`,
title: `Show Additional Connection Settings`,
};
disconnectBarItem.tooltip = `Disconnect from system.`;
disconnectBarItem.text = `$(debug-disconnect)`;

const terminalBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 0);
terminalBarItem.command = {
command: `code-for-ibmi.launchTerminalPicker`,
title: `Launch Terminal Picker`
}
terminalBarItem.text = `$(terminal) Terminals`;

const actionsBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
actionsBarItem.command = {
command: `code-for-ibmi.showActionsMaintenance`,
title: `Show IBM i Actions`,
};
actionsBarItem.text = `$(file-binary) Actions`;
const connectedBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 10);
connectedBarItem.tooltip = new vscode.MarkdownString([
`[$(settings-gear) Settings](command:code-for-ibmi.showAdditionalSettings)`,
`[$(file-binary) Actions](command:code-for-ibmi.showActionsMaintenance)`,
`[$(terminal) Terminals](command:code-for-ibmi.launchTerminalPicker)`
].join(`\n\n---\n\n`), true);
connectedBarItem.tooltip.isTrusted = true;

let selectedForCompare: vscode.Uri;
let searchViewContext: SearchView;
Expand Down Expand Up @@ -95,8 +83,6 @@ export async function loadAllofExtension(context: vscode.ExtensionContext) {
context.subscriptions.push(
connectedBarItem,
disconnectBarItem,
terminalBarItem,
actionsBarItem,
vscode.commands.registerCommand(`code-for-ibmi.disconnect`, async (silent?:boolean) => {
if (instance.getConnection()) {
await disconnect();
Expand Down Expand Up @@ -400,7 +386,7 @@ export async function loadAllofExtension(context: vscode.ExtensionContext) {
function updateConnectedBar() {
const config = instance.getConfig();
if (config) {
connectedBarItem.text = `$(${config.readOnlyMode ? "lock" : "settings-gear"}) Settings: ${config.name}`;
connectedBarItem.text = `$(${config.readOnlyMode ? "lock" : "settings-gear"}) ${config.name}`;
}
}

Expand All @@ -410,8 +396,6 @@ async function onConnected(context: vscode.ExtensionContext) {
[
connectedBarItem,
disconnectBarItem,
terminalBarItem,
actionsBarItem
].forEach(barItem => barItem.show());

updateConnectedBar();
Expand Down Expand Up @@ -447,7 +431,5 @@ async function onDisconnected() {
[
disconnectBarItem,
connectedBarItem,
terminalBarItem,
actionsBarItem,
].forEach(barItem => barItem.hide())
}

0 comments on commit dbd17e1

Please sign in to comment.