Skip to content

Commit 4624c5b

Browse files
committed
added license headers
updated license header
1 parent 07bb048 commit 4624c5b

File tree

15 files changed

+1008
-12
lines changed

15 files changed

+1008
-12
lines changed

build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
patches/nbjavac-not-required.diff
6868
patches/l10n-licence.diff
6969
patches/no-security-manager-allow.diff
70+
patches/add-licences.diff
7071
</string>
7172
<filterchain>
7273
<tokenfilter delimoutput=" ">

patches/add-licences.diff

Lines changed: 792 additions & 0 deletions
Large diffs are not rendered by default.

vscode/.nycrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"text-summary",
77
"cobertura"
88
],
9-
"all": false,
9+
"all": true,
1010
"include": [
1111
"src/**/*.ts",
1212
"out/**/*.js"

vscode/.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ vsc-extension-quickstart.md
88
**/.eslintrc.json
99
**/*.map
1010
**/*.ts
11+
.nyc_output/**
12+
coverage/**
13+
**/.nycrc.json
14+
esbuild.js

vscode/src/test/unit/mocks/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1+
<!--
2+
3+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
118
## Important Note:
219
Every entity exported from this directory should be prefixed with `Mock` or `Mocked` so that any developer doesn't import mocked VS Code or mocked elements in the extension main logic code.

vscode/src/test/unit/mocks/init.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import { initMockedLocaliser } from "./mockLocaliser";
218
import { initMockedVSCode } from "./vscode/mockVscode";
319

vscode/src/test/unit/mocks/mockLocaliser.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
const mockedL10n = {
218
l10n: {
319
value(key: string) {

vscode/src/test/unit/mocks/vscode/charCode.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
1-
/* eslint-disable camelcase */
2-
/*---------------------------------------------------------------------------------------------
3-
* Copyright (c) Microsoft Corporation. All rights reserved.
4-
* Licensed under the MIT License. See License.txt in the project root for license information.
5-
*--------------------------------------------------------------------------------------------*/
1+
/*
2+
Copyright (c) 2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
This file includes work covered by the following copyright and permission notices:
17+
18+
== https://github.com/microsoft/vscode-python/blob/main/src/test/mocks/vsc/charCode.ts ==
19+
Copyright (c) Microsoft Corporation. All rights reserved.
20+
MIT License
21+
22+
Permission is hereby granted, free of charge, to any person obtaining a copy
23+
of this software and associated documentation files (the "Software"), to deal
24+
in the Software without restriction, including without limitation the rights
25+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26+
copies of the Software, and to permit persons to whom the Software is
27+
furnished to do so, subject to the following conditions:
28+
29+
The above copyright notice and this permission notice shall be included in all
30+
copies or substantial portions of the Software.
31+
32+
*/
633

734
// Names from https://blog.codinghorror.com/ascii-pronunciation-rules-for-programmers/
835

vscode/src/test/unit/mocks/vscode/mockVscode.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import * as vscode from 'vscode';
218
import { URI } from './uri';
319
import { mockWindowNamespace } from './namespaces/window';

vscode/src/test/unit/mocks/vscode/namespaces/window.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import * as vscode from 'vscode';
218
import { mock, when, anyString, anyOfClass, anything, instance } from "ts-mockito";
319

vscode/src/test/unit/mocks/vscode/uri.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
1-
/* eslint-disable max-classes-per-file */
2-
/*---------------------------------------------------------------------------------------------
3-
* Copyright (c) Microsoft Corporation. All rights reserved.
4-
* Licensed under the MIT License. See License.txt in the project root for license information.
5-
*--------------------------------------------------------------------------------------------*/
1+
/*
2+
Copyright (c) 2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
This file includes work covered by the following copyright and permission notices:
17+
18+
== https://github.com/microsoft/vscode-python/blob/main/src/test/mocks/vsc/uri.ts ==
19+
Copyright (c) Microsoft Corporation. All rights reserved.
20+
MIT License
21+
22+
Permission is hereby granted, free of charge, to any person obtaining a copy
23+
of this software and associated documentation files (the "Software"), to deal
24+
in the Software without restriction, including without limitation the rights
25+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26+
copies of the Software, and to permit persons to whom the Software is
27+
furnished to do so, subject to the following conditions:
28+
29+
The above copyright notice and this permission notice shall be included in all
30+
copies or substantial portions of the Software.
31+
32+
*/
633

734
'use strict';
835

vscode/src/test/unit/mocks/vscode/vscodeHostedTypes.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
enum ViewColumn {
218
Active = -1,
319
Beside = -2,

vscode/src/test/unit/runTest.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import * as Mocha from 'mocha';
218
import { glob } from 'glob';
319
import * as path from 'path';

vscode/src/test/unit/testUtils.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import { LOGGER } from "../../logger";
218

319
export const getOsType = (): string => {

vscode/src/test/unit/webviews/jdkDownloader/view.unit.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import { describe, it, beforeEach, afterEach } from 'mocha';
218
import { expect } from 'chai';
319
import * as sinon from 'sinon';
@@ -11,7 +27,7 @@ describe('JDK Downloader view tests', () => {
1127

1228
beforeEach(() => {
1329
jdkDownloaderView = new JdkDownloaderView();
14-
if (process.env.ENABLE_CONSOLE_LOG) {
30+
if (process.env.ENABLE_LOGGER) {
1531
enableMockedLoggers(sandbox);
1632
}
1733
});

0 commit comments

Comments
 (0)