Skip to content

Conversation

AntonDevil
Copy link
Contributor

@AntonDevil AntonDevil commented Oct 12, 2025

Currently, JSONViewer includes files from plugintemplate directly copied into external/npp
This PR removes these copies and migrates these dependencies to git Submodules like all other existing dependencies

Updates cause by move to submodules:

  1. Added plugintemplate into .gitmodules
  2. Added proxy files (forwarding headers/sources) to \src\NppJsonViewer\plugintemplate folder for ease of use
    as done in Docking_Dialogue_Interface alternative template mentioned in official How to develop a plugin
  3. Updated ExternalIncludePath in NppJsonViewerCommon.props to include new NppJsonViewer\plugintemplate folder
    $(SolutionDir)..\external\npp; -> $(SolutionDir)NppJsonViewer\plugintemplate;
  4. Fixed includes to follow new folder structure because some files are now in DockingFeature subfolder
    Updated in: AboutDlg.h, JsonViewDlg.h, SettingsDlg.h
  5. Sorted files in NPPJSONViewer.vcxproj and NPPJSONViewer.vcxproj.filters in lexicographical order (ignoring case)
    Moved plugintemplate\ files to the bottom since they are not a direct part of main project

Updates cause by plugintemplate update:

  1. Replaced DEPRECATED NPPM_ADDTOOLBARICON with NPPM_ADDTOOLBARICON_FORDARKMODE in NppJsonPlugin.cpp reusing same m_hMenuIcon.hToolbarIcon for toolbarIconsWithDarkMode for dark mode
  2. Replaced DERPECATED NPPM_GETENABLETHEMETEXTUREFUNC with direct call to EnableThemeDialogTexture in SettingsDlg.cpp
  3. Added uxtheme.lib as AdditionalDependencies to NPPJSONViewer.vcxproj to link newly added EnableThemeDialogTexture
  4. Removed! unused URLCtrl.h and URLCtrl.cpp

References:

@AntonDevil
Copy link
Contributor Author

AntonDevil commented Oct 12, 2025

This is an alternative to #222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant