Skip to content

Commit

Permalink
Fix IconKeys generator task (#593)
Browse files Browse the repository at this point in the history
We had a `return` instead of `return@forEach` that made the visitor
terminate early as soon as it met a deprecated field, instead of just
skipping the deprecated fields.

This fixes #590
  • Loading branch information
rock3r authored Sep 10, 2024
1 parent 70a3ae3 commit 5d4623d
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/icon-keys-generator.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import com.squareup.kotlinpoet.FileSpec
import com.squareup.kotlinpoet.PropertySpec
import com.squareup.kotlinpoet.TypeSpec
import io.gitlab.arturbosch.detekt.Detekt
import java.lang.reflect.Field
import java.net.URLClassLoader
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.tasks.BaseKotlinCompile
import java.lang.reflect.Field
import java.net.URLClassLoader

private val defaultOutputDir: Provider<Directory> = layout.buildDirectory.dir("generated/iconKeys")

Expand Down Expand Up @@ -149,7 +149,7 @@ open class IconKeysGeneratorTask : DefaultTask() {

if (field.annotations.any { it.annotationClass == java.lang.Deprecated::class }) {
logger.lifecycle("Ignoring deprecated field: $fieldName")
return
return@forEach
}

val icon = field.get(sourceClass)
Expand Down
149 changes: 149 additions & 0 deletions ui/api/ui.api
Original file line number Diff line number Diff line change
Expand Up @@ -2634,6 +2634,122 @@ public final class org/jetbrains/jewel/ui/icons/AllIconsKeys$Actions {
public final fun getMatchCaseHovered ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMatchCaseSelected ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMenuCut ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMenuOpen ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMenuPaste ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMenuSaveall ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMinimap ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getModuleDirectory ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMore ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoreHorizontal ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveDown ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveTo2 ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToBottomLeft ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToBottomRight ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToButton ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToLeftBottom ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToLeftTop ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToRightBottom ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToRightTop ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToTopLeft ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToTopRight ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveToWindow ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getMoveUp ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getNew ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getNewFolder ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getNextOccurence ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getOfflineMode ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getOpenNewTab ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPause ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPinTab ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPlay_back ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPlay_first ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPlay_forward ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPlay_last ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPopFrame ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPresentationAssistantSettings ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPreserveCase ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPreserveCaseHover ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPreserveCaseSelected ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPrettyPrint ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPreview ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPreviewDetails ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPreviewDetailsVertically ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getPreviousOccurence ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProfile ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProfileBlue ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProfileCPU ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProfileMemory ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProfileRed ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProfileYellow ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProjectDirectory ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProjectWideAnalysisOff ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProjectWideAnalysisOn ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getProperties ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getQuickfixBulb ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getQuickfixOffBulb ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRealIntentionBulb ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRebuild ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRedo ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRefactoringBulb ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getReformatCode ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRefresh ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRegex ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRegexHovered ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRegexSelected ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRemoveMulticaret ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getReplace ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getReport ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRerun ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRerunAutomatically ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRestart ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRestartDebugger ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRestartFrame ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getResume ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRollback ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRunAll ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRunToCursor ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRun_anything ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getScratch ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSearch ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSearchNewLine ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSearchNewLineHover ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSearchWithHistory ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSelectall ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSetDefault ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShare ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShortcutFilter ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShow ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShowAsTree ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShowCode ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShowImportStatements ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShowReadAccess ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShowWriteAccess ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSplitHorizontally ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSplitVertically ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStartDebugger ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStartMemoryProfile ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStepOut ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStepOutCodeBlock ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStopAndRestart ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStopRefresh ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStub ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSuggestedRefactoringBulb ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSuspend ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSwapPanels ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSyncPanels ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSynchronizeScrolling ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getToggleSoftWrap ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getToggleVisibility ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTraceInto ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTraceOver ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUndo ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUninstall ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUnselectall ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUnshare ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUpload ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWords ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWordsHovered ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWordsSelected ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
}

public final class org/jetbrains/jewel/ui/icons/AllIconsKeys$Breakpoints {
Expand Down Expand Up @@ -3513,6 +3629,39 @@ public final class org/jetbrains/jewel/ui/icons/AllIconsKeys$Nodes {
public final fun getResourceBundle ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRunnableMark ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getRwAccess ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSecurityRole ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getServices ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getServlet ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getShared ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSortBySeverity ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStatic ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getStaticMark ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getSymlink ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTabAlert ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTabPin ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTag ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTarget ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTemplate ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTest ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTestGroup ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTestIgnored ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTestSourceFolder ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getTextArea ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getToolbox ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getType ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUndeploy ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUnknown ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUnknownJdk ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUpFolder ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getUpLevel ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getVariable ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWarningIntroduction ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWarningMark ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWebFolder ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWeblistener ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWord ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWorkspace ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
public final fun getWriteAccess ()Lorg/jetbrains/jewel/ui/icon/IntelliJIconKey;
}

public final class org/jetbrains/jewel/ui/icons/AllIconsKeys$Nodes$Jsf {
Expand Down

0 comments on commit 5d4623d

Please sign in to comment.