Skip to content

Commit

Permalink
Merge pull request #152 from acend/dst/fix_theia_sources
Browse files Browse the repository at this point in the history
Dst/fix theia sources
  • Loading branch information
sybnex authored Oct 4, 2023
2 parents b2a0fe6 + 76360ad commit e67ee33
Show file tree
Hide file tree
Showing 129 changed files with 414 additions and 3,711 deletions.
19 changes: 16 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,24 @@
FROM node:18-bookworm as build-stage

# install required tools to build the application
RUN apt-get update && apt-get install -y libxkbfile-dev libsecret-1-dev
RUN apt-get update && \
apt-get install -y git jq libxkbfile-dev libsecret-1-dev

WORKDIR /tmp
RUN git clone --depth 1 https://github.com/eclipse-theia/theia-blueprint.git

WORKDIR /home/theia
# Copy repository files
COPY theia/. .
RUN cp -r /tmp/theia-blueprint/* . && \
mv package.json package.json.orig
COPY package.json.acend .
COPY preload.html ./applications/browser/resources/preload.html
COPY branding-util.tsx ./theia-extensions/product/src/browser/branding-util.tsx

# customize package.json
RUN jq -s '.[0] * .[1]' package.json.acend package.json.orig > package.json.tmp1 && \
jq 'del(.theiaPlugins."vscode-builtin-extensions-pack")' package.json.tmp1 > package.json.tmp2 && \
jq 'del(.theiaPlugins."vscjava.vscode-java-pack")' package.json.tmp2 > package.json.tmp3 && \
jq 'del(.theiaPlugins."vscjava.vscode-java-dependency")' package.json.tmp3 > package.json

# Remove unnecesarry files for the browser application
# Download plugins and build application production mode
Expand Down
131 changes: 131 additions & 0 deletions build/branding-util.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/********************************************************************************
* Copyright (C) 2020 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

import { Key, KeyCode } from '@theia/core/lib/browser';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import * as React from 'react';

export interface ExternalBrowserLinkProps {
text: string;
url: string;
windowService: WindowService;
}

function ExternalBrowserLink(props: ExternalBrowserLinkProps): JSX.Element {
return <a
role={'button'}
tabIndex={0}
onClick={() => openExternalLink(props.url, props.windowService)}
onKeyDown={(e: React.KeyboardEvent) => {
if (Key.ENTER.keyCode === KeyCode.createKeyCode(e.nativeEvent).key?.keyCode) {
openExternalLink(props.url, props.windowService);
}
}}>
{props.text}
</a>;
}

function openExternalLink(url: string, windowService: WindowService): void {
windowService.openNewWindow(url, { external: true });
}

export function renderWhatIs(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
What is this Webshell?
</h3>
<div >
This Webshell gives you everthing you need to work on our Labs.
All tools mentioned in the lab are integraded and preconfigured.
For more information ask your Trainer (the person in the front)!
</div>
</div>;
}

export function renderWhatIsNot(): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
What is it not?
</h3>
<div >
As it used for our Tranings only it will be deleted after your Training has ended (plus 2 or 3 days).
</div>
</div>;
}

export function renderSupport(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Support
</h3>
<div >
For any questions or things which are not working ask your acend Trainer.
</div>
</div>;
}

export function renderTickets(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Reporting feature requests and bugs
</h3>
<div >
If something is missing in the toolset or you have a great idea, please tell us so we can integrate it.
</div>
</div>;
}

export function renderSourceCode(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Source Code
</h3>
<div >
The source code of Eclipse Theia Blueprint is available
on <ExternalBrowserLink text="Github" url="https://github.com/eclipse-theia/theia-blueprint"
windowService={windowService} ></ExternalBrowserLink>.
</div>
</div>;
}

export function renderDocumentation(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Documentation
</h3>
<div >
Please see <ExternalBrowserLink text="here" url="https://theia-ide.org/docs/blueprint_documentation/"
windowService={windowService} ></ExternalBrowserLink> for
documentation how to customize Eclipse Theia Blueprint.
</div>
</div>;
}

export function renderDownloads(): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Updates and Downloads
</h3>
<div className='gs-action-container'>
You can update Eclipse Theia Blueprint directly in this application by navigating to
File {'>'} Settings {'>'} Check for Updates… Moreover the application will check for updates
after each launch automatically.
</div>
<div className='gs-action-container'>
Alternatively you can download the most recent version from the download page.
</div>
</div>;
}
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build() {
echo -e "\nBuild:\n"
set -e
if [ -n "$(which docker)" ]; then
DOCKER_BUILDKIT=1 docker build -t $ORG/$APP .
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build -t $ORG/$APP .
test_image
docker push $ORG/$APP
elif [ -n "$(which buildah)" ]; then
Expand Down
14 changes: 14 additions & 0 deletions build/package.json.acend
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"theiaPlugins": {
"json": "https://open-vsx.org/api/vscode/json/1.62.3/file/vscode.json-1.62.3.vsix",
"yaml": "https://open-vsx.org/api/vscode/yaml/1.62.3/file/vscode.yaml-1.62.3.vsix",
"shell": "https://open-vsx.org/api/vscode/shellscript/1.62.3/file/vscode.shellscript-1.62.3.vsix",
"golang": "https://open-vsx.org/api/vscode/go/1.62.3/file/vscode.go-1.62.3.vsix",
"python": "https://open-vsx.org/api/vscode/python/1.62.3/file/vscode.python-1.62.3.vsix",
"docker": "https://open-vsx.org/api/vscode/docker/1.62.3/file/vscode.docker-1.62.3.vsix",
"dockerfile": "https://open-vsx.org/api/jeff-hykin/better-dockerfile-syntax/1.0.2/file/jeff-hykin.better-dockerfile-syntax-1.0.2.vsix",
"markdown": "https://open-vsx.org/api/vscode/markdown/1.62.3/file/vscode.markdown-1.62.3.vsix",
"terraform": "https://open-vsx.org/api/4ops/terraform/0.2.1/file/4ops.terraform-0.2.1.vsix",
"yaml.lint": "https://open-vsx.org/api/phil9909/ytt-lint/0.3.1/file/phil9909.ytt-lint-0.3.1.vsix"
}
}
File renamed without changes.
105 changes: 0 additions & 105 deletions build/theia/applications/browser/package.json

This file was deleted.

15 changes: 0 additions & 15 deletions build/theia/applications/browser/tsconfig.json

This file was deleted.

26 changes: 0 additions & 26 deletions build/theia/applications/browser/webpack.config.js

This file was deleted.

10 changes: 0 additions & 10 deletions build/theia/applications/electron/.eslintrc.js

This file was deleted.

Loading

0 comments on commit e67ee33

Please sign in to comment.