Skip to content

Commit dd79754

Browse files
authored
Update docs in preparation for 1.0.0 release (#205)
- Created changelog and releasing markdown files - Update contribution guidelines to help better setup for development - Added reference to CI jobs - Update all screenshots in README to be consistent with current source - Added a Version Support table to the readme Fixes #204 Part of #209
1 parent 29d8d15 commit dd79754

7 files changed

+117
-8
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## CDT LSP Change Log
2+
3+
### v1.0.0 (Sep 2023)
4+
5+
- First release of CDT LSP
6+
7+
Fixed issues: <https://github.com/eclipse-cdt/cdt-lsp/milestone/1?closed=1>

CONTRIBUTING.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ To try out and develop the plug-ins in you can edit and run them from source.
1212
1. Setup a CDT development environment following the instructions in [CDT's contributing instructions](https://github.com/eclipse-cdt/cdt/blob/main/CONTRIBUTING.md#contributing-to-cdt).
1313
2. Clone this repo
1414
3. Import the plug-ins in this repo into Eclipse development environment from Step 1
15-
4. Launch the Eclipse IDE with this Pug-ins tab settings from the launch config: *All workspace and enabled target Pug-ins* from your development IDE
15+
4. Consider closing the `org.eclipse.cdt.lsp.examples.*` projects as they demonstrate how to extend CDT LSP and may affect the overall behaviour, for example by removing the "Prefer C/C++ Editor (LSP)" checkbox.
16+
5. Launch the Eclipse IDE with this Pug-ins tab settings from the launch config: *All workspace and enabled target Pug-ins* from your development IDE
1617

1718
## CI Builds
1819

1920
All PRs are built using GitHub Actions using the workflows in the [.github/workflows](.github/workflows) directory.
2021

2122
All branches are built using the [Jenkinsfile](Jenkinsfile) on the [Eclipse Foundations Jenkins infrastructure](https://wiki.eclipse.org/Jenkins) in the [cdt-lsp](https://ci.eclipse.org/cdt/job/cdt-lsp) multi-branch pipeline.
2223
The pipeline publishes continuously to download.eclipse.org, for example the `master` branch publishes to https://download.eclipse.org/tools/cdt/builds/cdt-lsp/master/
24+
25+
## CI Milestone and Release Builds
26+
27+
The [cdt-lsp](https://ci.eclipse.org/cdt/job/cdt-lsp) multi-branch pipeline's build results can be published as milestones or release builds by using the [promote-a-build](https://ci.eclipse.org/cdt/job/promote-a-build/) building with parameters and choosing the CDT repo and branch to publish.

README.md

+59-7
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,57 @@
22

33
**Target audience** are Eclipse plugin developers who want to use/develop a LSP based C/C++ Editor.
44

5-
This plugin is based on the [LSP4E](https://github.com/eclipse/lsp4e) and [TM4E](https://github.com/eclipse/tm4e) Eclipse projects. The editor is based on the `ExtensionBasedTextEditor` in Eclipse.
5+
This plugin is based on the [LSP4E](https://github.com/eclipse/lsp4e) and [TM4E](https://github.com/eclipse/tm4e) Eclipse projects. The editor is based on the [`ExtensionBasedTextEditor`](https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextEditor.java#L55-L56) in Eclipse.
66

7-
The `org.eclipse.cdt.lsp` is the core plugin. C/C++ IDE Developers can use the `serverProvider` extension point to define a C/C++ language server. If there is no extension defined, the LLVM [clangd](https://clangd.llvm.org/) language server will be used and searched on the PATH environment variable. Clangd searches for a `compile_commands.json` file in the source file folder and its parents. It's needed to determine the compile informations. In the default clangd configuration, the PATH will be searched for a `gcc` compiler to determine the default compiler include paths.
7+
The [`org.eclipse.cdt.lsp`](https://github.com/eclipse-cdt/cdt-lsp/tree/master/bundles/org.eclipse.cdt.lsp) is the core plugin. C/C++ IDE Developers can use the [`serverProvider`](https://github.com/eclipse-cdt/cdt-lsp/blob/master/bundles/org.eclipse.cdt.lsp/schema/serverProvider.exsd) extension point to define a C/C++ language server. If there is no extension defined, the LLVM [clangd](https://clangd.llvm.org/) language server will be used and searched on the PATH environment variable. Clangd searches for a `compile_commands.json` file in the source file folder and its parents. It's needed to determine the compile informations. In the default clangd configuration, the PATH will be searched for a `gcc` compiler to determine the default compiler include paths.
88

99
The editor is basically the `ExtensionBasedTextEditor`. The language grammar comes from [TM4E](https://github.com/eclipse/tm4e).
1010

1111
![screenshot.png](images/screenshot.png "screenshot.png")
1212

13+
<!--
1314
15+
For regenerating the overall screenshot create a new CMake project in Eclipse called
16+
something similar to HelloCMake and use this contents for the main file to allow
17+
showing the following features:
18+
19+
- Project Explorer expanded to show outline
20+
- Outline View
21+
- hover over something from the std library
22+
- Open type hierarchy for Message
23+
- Open call hierarchy for display
24+
25+
#include <iostream>
26+
using namespace std;
27+
28+
class Message {
29+
public:
30+
virtual void display() = 0;
31+
};
32+
33+
class HelloWorld : Message {
34+
public:
35+
void display() { cout << "Hello World" << endl; }
36+
};
37+
38+
class CDTDoesLsp : Message {
39+
public:
40+
void display() { cout << "CDT does LSP" << endl; }
41+
};
42+
43+
int main() {
44+
HelloWorld hw;
45+
hw.display();
46+
CDTDoesLsp cdt;
47+
cdt.display();
48+
49+
return 0;
50+
}
51+
52+
-->
1453

1554
The Editors features depends on the support on client ([LSP4E](https://github.com/eclipse/lsp4e)) and server ([clangd](https://clangd.llvm.org/)) side.
16-
Currently these feature are supported (clangd 15.0.3) and current LSP4E:
55+
Currently these feature are supported (clangd 15 and 16) and current LSP4E:
1756

1857
- Auto completion
1958
- Hovering
@@ -22,7 +61,7 @@ Currently these feature are supported (clangd 15.0.3) and current LSP4E:
2261
- Find References
2362
- Code actions (Declare implicit copy/move members, Extract to function/variable, rename)
2463
- Quick Fix (Ctrl+1)
25-
- Type hierarchy (quick hierarchy view only)
64+
- Type hierarchy
2665
- Call hierarchy
2766
- Outline view
2867

@@ -49,8 +88,10 @@ see [issues](https://github.com/eclipse-cdt/cdt-lsp/issues)
4988

5089
## Try it out
5190

52-
1. Download the latest Developer Build of Eclipse for C/C++ Developers or Eclipse for Embedded C/C++ Developers using the [Eclipse installer](https://www.eclipse.org/downloads/packages/installer) or downloading and extracting the latest milestone available on [eclipse.org](https://www.eclipse.org/downloads/packages/release/).
53-
2. Add `https://download.eclipse.org/tools/cdt/builds/cdt-lsp/master/` to your Available Software Sites and install *C/C++ LSP Support* in the *Eclipse CDT LSP* Category and restart Eclipse.
91+
1. Download the latest Developer Build of Eclipse for C/C++ Developers or Eclipse for Embedded C/C++ Developers using the [Eclipse installer](https://www.eclipse.org/downloads/packages/installer) or downloading and extracting the latest release available on [eclipse.org](https://www.eclipse.org/downloads/packages/release/).
92+
2. Add to your Available Software Sites and install *C/C++ LSP Support* in the *Eclipse CDT LSP* Category and restart Eclipse from one of these p2 sites:
93+
- For latest release: `https://download.eclipse.org/tools/cdt/releases/cdt-lsp-latest`
94+
- For current master branch continuous build: `https://download.eclipse.org/tools/cdt/builds/cdt-lsp/master/`
5495
3. [Install Pre-requisites](#install-pre-requisites) listed below
5596
4. [Create a CMake project](#create-an-example-cmake-project) or [import an existing](#import-an-existing-project) project following guidelines below
5697
5. [Enable the LSP based C/C++ Editor](#activating-lsp-based-cc-editor) following instructions above.
@@ -87,7 +128,7 @@ This file may be hidden by default, therefore to see the file uncheck the *.\* r
87128
By default C/C++ will be opened with the standard CEditor.
88129
The default can be changed per project or per workspace with the *C/C++ General* -> *Editor (LSP)* -> *Prefer C/C++ Editor (LSP)* checkbox in the project setting or preferences.
89130

90-
- Note: The workspace setting will be used for new projects only. To use the LSP based editor on a project, *Prefer C/C++ Editor (LSP)* must be activated in the project properties.
131+
- Note: The workspace setting will be used for projects that have not checked the *Enable project specific settings* checkbox in the project properties -> *C/C++ General* -> *Editor (LSP)* page.
91132

92133
Alternatively, you can choose which editor to open the file by using *Open With*:
93134

@@ -98,6 +139,17 @@ With the *C/C++ Editor (LSP)* open, the presentation of the C++ file will follow
98139

99140
![hello-world.png](images/hello-world.png "hello-world.png")
100141

142+
### Version Support
143+
144+
The following table shows the versions of the main dependencies of CDT LSP for best operation as developed and tested.
145+
For example, CDT LSP 1.0.x was developed against clangd 15.0.x but CDT LSP should work with newer versions of clangd as well.
146+
For plug-in dependencies the MANIFEST.MF's dependency information will provide the most accurate information.
147+
148+
| CDT LSP Version | clangd | cmake* | Eclipse IDE Release |
149+
|:-:|:-:|:-:|:-:|
150+
| 1.0.x | 15.0.x | 3.x | 2023-09 |
151+
152+
\* cmake is required to run through the demo flow, but any tool that can create compile_commands.json or otherwise feed settings to clangd is suitable.
101153

102154
### Known issues
103155

RELEASING.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
This is the Release plan and TODO list for CDT LSP.
2+
3+
## Steps for Release
4+
5+
Items at the beginning of development
6+
7+
- [ ] Create an Endgame Issue to track the release. As a starting point use [RELEASING.md](https://github.com/eclipse-cdt/cdt-lsp/blob/master/RELEASING.md).
8+
- [ ] Add the [Endgame](https://github.com/eclipse-cdt/cdt-lsp/labels/endgame) label
9+
- [ ] Create a [New milestone](https://github.com/eclipse-cdt/cdt-lsp/milestones/new) for the release, and if available add a due date
10+
- [ ] Apply the milestone to the endgame issue
11+
- [ ] Ensure all previous [Endgame issues](https://github.com/eclipse-cdt/cdt-lsp/labels/endgame) are done.
12+
- [ ] Make sure any previous edits made to [Endgame issues](https://github.com/eclipse-cdt/cdt-lsp/labels/endgame) of previous releases are updated in [RELEASING.md](https://github.com/eclipse-cdt/cdt-lsp/blob/master/RELEASING.md)
13+
- [ ] Update version numbers on master branch (after the release branch was created), this is generally the next minor version (or major version if that is what the committers on the project agree) and applies to the following types of files:
14+
- [ ] `feature.xml` version
15+
- [ ] `pom.xml` version
16+
- It does not apply to versions in MANIFEST.MF which follow [API rules](https://github.com/eclipse-cdt/cdt/blob/main/POLICY.md#api).
17+
- [ ] Ensure [the CI build](https://ci.eclipse.org/cdt/job/cdt-lsp/job/master/) is stable - it is always better to release a "Green Dot" build
18+
19+
Items in the days ahead of Release day:
20+
21+
- [ ] Create release on [PMI](https://projects.eclipse.org/projects/tools.cdt) (e.g. `1.0.0 (CDT LSP)`)
22+
- [ ] Fill in the *Review Documentation* -> *New & Noteworthy URL* with the [CHANGELOG.md](https://github.com/eclipse-cdt/cdt-lsp/blob/master/CHANGELOG.md)
23+
- [ ] Check [CHANGELOG.md](https://github.com/eclipse-cdt/cdt-lsp/blob/master/CHANGELOG.md) is up to date. The changelog should have a version entry, release date, API Breakages and other information consistent with current entries in the changelog.
24+
- [ ] Check [README.md](https://github.com/eclipse-cdt/cdt-lsp/blob/master/README.md) is up to date, in particular:
25+
- [ ] the planned release and which versions of main dependencies are supported in the version support table
26+
- [ ] screenshots are up to date and consistent
27+
- [ ] try it out steps are correct and where suitable versions are up to date
28+
- [ ] Check all closed PRs and Issues to make sure their milestone is set. [This search may be useful to identify such closed issues](https://github.com/eclipse-cdt/cdt-lsp/issues?q=is%3Aclosed)
29+
- [ ] Create a branch for the release
30+
- [ ] Create the endgame for the next scheduled release right away and update the versions on the master branch
31+
32+
Items on Release day:
33+
34+
- [ ] Run [the CI build](https://ci.eclipse.org/cdt/job/cdt-lsp/) for the branch
35+
- [ ] Mark the build as Keep Forever and add the version to the description
36+
- [ ] Create a GitHub releases page (like https://github.com/eclipse-cdt/cdt-lsp/releases/tag/CDT_LSP_1_0_0)
37+
- [ ] [Promote a cdt build from jenkins](https://ci.eclipse.org/cdt/job/promote-a-build/) to releases
38+
- [ ] Add description to the promote-a-build job and the job it promoted.
39+
- [ ] Unmark as keep all old Milestone and RC jobs
40+
- [ ] Update or create [composites](https://github.com/eclipse-cdt/cdt/tree/main/releng/download/releases) in preparation for going public on release day
41+
- [ ] Include the update to latest URL https://download.eclipse.org/tools/cdt/releases/cdt-lsp-latest to point to latest release
42+
- [ ] Tag the release. Example: `git tag -a CDT_LSP_1_0_0 HEAD -m"CDT LSP 1.0.0" && git push origin CDT_LSP_1_0_0`
43+
- [ ] Create a [release page on github](https://github.com/eclipse-cdt/cdt-lsp/releases/new)
44+
- [ ] Publish the GitHub release page
45+
- [ ] Forward the GitHub release page email to cdt-dev

images/preferences.png

41.7 KB
Loading

images/properties.png

48.9 KB
Loading

images/screenshot.png

49 KB
Loading

0 commit comments

Comments
 (0)