Skip to content

Commit

Permalink
bugfix: only use defines from current project (when multiple projects…
Browse files Browse the repository at this point in the history
… where open, definitions from all projects where used)
  • Loading branch information
m0rkeulv committed Apr 21, 2024
1 parent a293641 commit 838ec48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pluginRepositoryUrl = https://github.com/HaxeFoundation/intellij-haxe
pluginVersion = 1.5.3

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
#platformType = IU
platformType = IC
platformType = IU
#platformType = IC

#platformVersion = 2023.3
platformVersion = 2024.1
Expand All @@ -26,8 +26,8 @@ pluginUntilBuild = 241.*
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
# see flex/flash versions at : https://plugins.jetbrains.com/plugin/14508-flash-flex/versions/stable/252411
#platformPlugins = com.intellij.java, com.intellij.flex:241.14494.158, JavaScript
platformPlugins = com.intellij.java, com.intellij.flex:241.14494.158
platformPlugins = com.intellij.java, com.intellij.flex:241.14494.158, JavaScript
#platformPlugins = com.intellij.java, com.intellij.flex:241.14494.158
#platformPlugins = com.intellij.java, com.intellij.flex:233.11799.196, JavaScript
#platformPlugins = com.intellij.java, com.intellij.flex:233.11799.196
#platformPlugins = com.intellij.java, com.intellij.flex:241.14494.17, JavaScript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,20 @@ public Map<String, String> getAllDefinitions() {
.forEach( e -> map.put(e.getKey(), e.getValue()));

if (instance.getAutoDetectDefinitions()) {
for (Module module : moduleDefinitionsMap.keySet()) {

// add all auto detected values
moduleDefinitionsMap.values().stream()

moduleDefinitionsMap.entrySet().stream()
.filter(e -> e.getKey().getProject() == myProject)
.map(Map.Entry::getValue)
.flatMap(map1 -> map1.entrySet().stream())
.filter(not(HaxeDefineDetectionManager::isUnsetFlag))
.forEach( e -> map.put(e.getKey(), e.getValue()));

//TODO move project defines to module level settings
//HaxeModuleSettings moduleSettings = HaxeModuleSettings.getInstance(module);
//HaxeTarget target = moduleSettings.getHaxeTarget();
}

// remove any value marked with unset flag (*UNSET*)
projectUserDefineMap.entrySet().stream()
.filter(HaxeDefineDetectionManager::isUnsetFlag)
Expand Down

0 comments on commit 838ec48

Please sign in to comment.