Skip to content

Commit

Permalink
[eclipse-cdt#120] Clangd options in preference/project properties not…
Browse files Browse the repository at this point in the history
… changeable

Set preference store for Properties page when context element is alreayd
known
Correct metadata for query driver preference
  • Loading branch information
ruspl-afed committed Jun 13, 2023
1 parent 42af868 commit a3df71a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public PreferenceMetadata<Boolean> prettyPrint() {
@Override
public PreferenceMetadata<String> queryDriver() {
return new PreferenceMetadata<>(String.class, //
"pretty_print", //$NON-NLS-1$
"query_driver", //$NON-NLS-1$
Optional.ofNullable(PathUtil.findProgramLocation("gcc", null)) //$NON-NLS-1$
.map(p -> p.removeLastSegments(1).append(IPath.SEPARATOR + "*"))// //$NON-NLS-1$
.map(IPath::toString)//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ public LspEditorPropertiesPage() {

@Override
protected Control createContents(Composite parent) {
setPreferenceStore(store());
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).create());
composite.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
area = new ClangdConfigurationArea(composite, configuration.metadata());
area.init(store(), this);
area.init(getPreferenceStore(), this);
area.fields().forEach(FieldEditor::load);
return composite;
}
Expand Down

0 comments on commit a3df71a

Please sign in to comment.