Skip to content

Commit

Permalink
Fix eclipse-cdt#301 Introduce a header icon (eclipse-cdt#308)
Browse files Browse the repository at this point in the history
Thank you!
  • Loading branch information
travkin79 authored Apr 25, 2024
1 parent 7106af3 commit 5bfd0b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Binary file added bundles/org.eclipse.cdt.lsp/icons/h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ public class LspEditorFileImageDescriptor implements ICFileImageDescriptor {
private final ICLanguageServerProvider cLanguageServerProvider;
private static HashMap<String, ImageDescriptor> imageRegistry = new HashMap<>(2);
private static final String ICONS_PATH = "$nl$/icons/"; //$NON-NLS-1$

public static final String IMG_HFILE = "IMG_HFILE"; //$NON-NLS-1$
public static final String IMG_CFILE = "IMG_CFILE"; //$NON-NLS-1$
public static final String IMG_CXXFILE = "IMG_CXXFILE"; //$NON-NLS-1$

public LspEditorFileImageDescriptor() {
cLanguageServerProvider = LspPlugin.getDefault().getCLanguageServerProvider();
declareRegistryImage(IMG_HFILE, ICONS_PATH + "h.png"); //$NON-NLS-1$
declareRegistryImage(IMG_CFILE, ICONS_PATH + "c.png"); //$NON-NLS-1$
declareRegistryImage(IMG_CXXFILE, ICONS_PATH + "cpp.png"); //$NON-NLS-1$
}
Expand All @@ -49,7 +52,7 @@ public ImageDescriptor getCXXImageDescriptor() {

@Override
public ImageDescriptor getHeaderImageDescriptor() {
return imageRegistry.get(IMG_CFILE);
return imageRegistry.get(IMG_HFILE);
}

@Override
Expand Down

0 comments on commit 5bfd0b7

Please sign in to comment.