Recently I started to try to switch to STM32cubeIDE. On the one hand, keil is really difficult to use, on the other hand, it is produced by ST itself and is free. My own point of view has always been that ST can't stand it anymore, and I made an IDE anew. Although based on eclips, there are still some problems, but personally think it is more comfortable than keil for the current use.
eclipse itself has the completion function, but it needs shortcut keys, which is not very convenient. What I want is automatic pop-up completion such as vs and idea.
Some netizens published their modified version before, but because of the version problem, it is not available, so I tried to modify it this time.
Because cubeIDE and eclipse are basically the same, I will explain from the perspective of eclipse below.
1. First install the CDT plug-in and plug-in (you can download it on the Marketplace)
Open the menu bar Help->Install New Software, enter the following address
https://download.eclipse.org/tools/cdt/releases/

Then continue to the next step until the installation is complete. After the window is closed, it will take a while to install, so be patient.
2. Same as above, use the following address to install the plug-in, and find it in the list: Eclipse Plug-in Develoment Environment under General Purpose Tools
http://download.eclipse.org/releases/photon
3. Open window->show view and select plugin-ins. Find org.eclipse.cdt.ui in plugin-ins. Right-click and select import as -> source project. After importing, you can see the plug-in project in your workspace.

4. Find
/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
modify public void setCompletionProposalAutoActivationCharacters(char[] activationSet)
public void setCompletionProposalAutoActivationCharacters(char[] activationSet) {
//fCompletionAutoActivationCharacters= activationSet;
String test = ".ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
char[] triggers = test.toCharArray();
fCompletionAutoActivationCharacters = triggers;
}
5. Find
/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CContentAssistProcessor.java
Modify protected boolean verifyAutoActivation(ITextViewer viewer, int offset)
protected boolean verifyAutoActivation(ITextViewer viewer, int offset) {
IDocument doc= viewer.getDocument();
if (doc == null) {
return false;
}
if (offset <= 0) {
return false;
}
try {
char activationChar= doc.getChar(--offset);
switch (activationChar) {
case ':':
return offset > 0 && doc.getChar(--offset) == ':';
case '>':
return offset > 0 && doc.getChar(--offset) == '-';
case '.':
// Avoid completion of float literals
CHeuristicScanner scanner= new CHeuristicScanner(doc);
int token= scanner.previousToken(--offset, Math.max(0, offset - 200));
// The scanner reports numbers as identifiers
if (token == Symbols.TokenIDENT && !Character.isJavaIdentifierStart(doc.getChar(scanner.getPosition() + 1))) {
// Not a valid identifier
return false;
}
return true;
default:
return activationChar >= 97 && activationChar <= 122?true:activationChar >= 65 && activationChar <= 90;
}
} catch (BadLocationException e) {
}
return false;
}
6. The following can be exported, right click on the project -> Export, select JAR file.




The exported jar can be used, because the CDT is already installed, so just name the jar package with the original file name and overwrite it in the plugs under the installation directory, for example Mine is
org.eclipse.cdt.ui_6.6.0.201909091956.jar
Eclipse commonly used shortcut keys and modification methods 1. Commonly used shortcut keys Code editing shortcuts Other shortcut keys 2. Customized modification of shortcut keys eclipse is our common...
First, eclipse installation CDT 1、download. Windows 10 64 bit can be directlyclick to download 2、add Open eclipse and click on the menu "Help--->Install New Software" Click the install di...
Eclipse CDT is a good C/C++ IDE, but its editor has a very bad slot: code auto-complete only supports the three characters'.',':', and'>', which is larger than Most C/C++ IDEs are much worse. This ...
STM32Cubeide sets up full shortcut keys and themes STM32Cubeide settings, the province's own forgot. First, theme setting Tip: Here you can add the content you want to learn. E.g: 1. Help-> Eclipse...
First add spring constraints (original) The constraint has been added, but the constraint file has not been bound yet, so there is no prompt, especially in the absence of a network. From the constrain...
First open eclipse, there is a window option in the menu bar above, Click "window", click "preferences" in the pop-up menu, Then on the "preferences" page, click "Ja...
1. Select the Preferences item under the Windows menu in the Eclipse menu bar. 2. Find "Java" on the left -> "Editor" -> "Content Assist" 3. Under the "Auto Ac...
VS code has automatic completion, Eclipse does not? How could it not be, but it is not enabled by default. Setting method: Windows-->Preferences-->Java-->Editor-->Content Asist-->Auto a...
For programmers, it is a bit too painful to remember a large number of class names and method names when writing Java programs. Eclipse provides automatic code completion. The setting method is as fol...