mirror of
https://github.com/processing/processing4.git
synced 2026-02-07 23:59:21 +01:00
adding option for disabling completions, fixes #10
This commit is contained in:
@@ -166,6 +166,11 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
*/
|
||||
protected JCheckBoxMenuItem writeErrorLog;
|
||||
|
||||
/**
|
||||
* Enable/Disable code completion
|
||||
*/
|
||||
protected JCheckBoxMenuItem completionsEnabled;
|
||||
|
||||
public DebugEditor(Base base, String path, EditorState state, Mode mode) {
|
||||
super(base, path, state, mode);
|
||||
|
||||
@@ -521,6 +526,17 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
});
|
||||
debugMenu.add(showWarnings);
|
||||
|
||||
completionsEnabled = new JCheckBoxMenuItem("Code Completion Enabled");
|
||||
completionsEnabled.setSelected(true);
|
||||
completionsEnabled.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
errorCheckerService.getASTGenerator().predictionsEnabled
|
||||
.set(((JCheckBoxMenuItem) e.getSource()).isSelected());
|
||||
}
|
||||
});
|
||||
debugMenu.add(completionsEnabled);
|
||||
|
||||
debugMessagesEnabled = new JCheckBoxMenuItem("Show Debug Messages");
|
||||
debugMessagesEnabled.setSelected(ExperimentalMode.DEBUG);
|
||||
debugMessagesEnabled.addActionListener(new ActionListener() {
|
||||
|
||||
Reference in New Issue
Block a user