This is an automated email from the ASF dual-hosted git repository.
akhileshsingh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 3635afff14 Java Record - changed state_component to record_component
(#4293)
3635afff14 is described below
commit 3635afff141f9d7c17475203c7c4913ca65578cb
Author: Akhilesh Singh <[email protected]>
AuthorDate: Fri Jul 1 13:57:19 2022 +0530
Java Record - changed state_component to record_component (#4293)
* changed state_component to record_component
---
.../java/navigation/ElementScanningTask.java | 2 +-
.../{stateComponent.png => recordComponent.png} | Bin
.../src/org/netbeans/modules/java/ui/Icons.java | 88 ++++++++++-----------
3 files changed, 44 insertions(+), 46 deletions(-)
diff --git
a/java/java.navigation/src/org/netbeans/modules/java/navigation/ElementScanningTask.java
b/java/java.navigation/src/org/netbeans/modules/java/navigation/ElementScanningTask.java
index 47cb5d61bd..ab864a47d7 100644
---
a/java/java.navigation/src/org/netbeans/modules/java/navigation/ElementScanningTask.java
+++
b/java/java.navigation/src/org/netbeans/modules/java/navigation/ElementScanningTask.java
@@ -360,7 +360,7 @@ public class ElementScanningTask implements
CancellableTask<CompilationInfo>{
} else if( e instanceof ExecutableElement ) {
d.htmlHeader = createHtmlHeader(info, (ExecutableElement)e,
info.getElements().isDeprecated(e),d.isInherited, fqn, overridenFrom);
} else if( e instanceof VariableElement ) {
- if( !(e.getKind() == ElementKind.FIELD || e.getKind() ==
ElementKind.ENUM_CONSTANT || e.getKind().name().equals("STATE_COMPONENT")) )
+ if( !(e.getKind() == ElementKind.FIELD || e.getKind() ==
ElementKind.ENUM_CONSTANT || e.getKind() == ElementKind.RECORD_COMPONENT) )
return null;
d.htmlHeader = createHtmlHeader(info, (VariableElement)e,
info.getElements().isDeprecated(e),d.isInherited, fqn );
} else if (isModule) {
diff --git
a/java/java.source/src/org/netbeans/modules/java/source/resources/icons/stateComponent.png
b/java/java.source/src/org/netbeans/modules/java/source/resources/icons/recordComponent.png
similarity index 100%
rename from
java/java.source/src/org/netbeans/modules/java/source/resources/icons/stateComponent.png
rename to
java/java.source/src/org/netbeans/modules/java/source/resources/icons/recordComponent.png
diff --git a/java/java.source/src/org/netbeans/modules/java/ui/Icons.java
b/java/java.source/src/org/netbeans/modules/java/ui/Icons.java
index f7d0329069..62c582c33a 100644
--- a/java/java.source/src/org/netbeans/modules/java/ui/Icons.java
+++ b/java/java.source/src/org/netbeans/modules/java/ui/Icons.java
@@ -54,52 +54,50 @@ public final class Icons {
}
ImageIcon icon = null;
-
- switch( elementKind ) {
+
+ switch (elementKind) {
case MODULE:
- icon = ImageUtilities.loadImageIcon(ICON_BASE + "module" +
PNG_EXTENSION, false );
- break;
- case PACKAGE:
- icon = ImageUtilities.loadImageIcon(ICON_BASE + "package" +
GIF_EXTENSION, false );
- break;
- case ENUM:
- icon = ImageUtilities.loadImageIcon( ICON_BASE + "enum" +
PNG_EXTENSION, false );
- break;
- case ANNOTATION_TYPE:
- icon = ImageUtilities.loadImageIcon( ICON_BASE + "annotation" +
PNG_EXTENSION, false );
- break;
- case CLASS:
- icon = ImageUtilities.loadImageIcon( ICON_BASE + "class" +
PNG_EXTENSION, false );
- break;
- case INTERFACE:
- icon = ImageUtilities.loadImageIcon( ICON_BASE + "interface" +
PNG_EXTENSION, false );
- break;
- case FIELD:
- icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "field", PNG_EXTENSION, modifiers ), false );
- break;
- case ENUM_CONSTANT:
- icon = ImageUtilities.loadImageIcon(ICON_BASE + "constant" +
PNG_EXTENSION, false );
- break;
- case CONSTRUCTOR:
- icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "constructor", PNG_EXTENSION, modifiers ), false );
- break;
- case INSTANCE_INIT:
- case STATIC_INIT:
- icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "initializer", PNG_EXTENSION, modifiers ), false );
- break;
- case METHOD:
- icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "method", PNG_EXTENSION, modifiers ), false );
- break;
- default:
- if (elementKind.name().equals("RECORD")) {
- icon = ImageUtilities.loadImageIcon(ICON_BASE + "record" +
PNG_EXTENSION, false);
- break;
- }
- if (elementKind.name().equals("STATE_COMPONENT")) {
- icon = ImageUtilities.loadImageIcon(ICON_BASE +
"stateComponent" + PNG_EXTENSION, false);
- break;
- }
- icon = null;
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "module" +
PNG_EXTENSION, false);
+ break;
+ case PACKAGE:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "package" +
GIF_EXTENSION, false);
+ break;
+ case ENUM:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "enum" +
PNG_EXTENSION, false);
+ break;
+ case ANNOTATION_TYPE:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "annotation" +
PNG_EXTENSION, false);
+ break;
+ case CLASS:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "class" +
PNG_EXTENSION, false);
+ break;
+ case INTERFACE:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "interface" +
PNG_EXTENSION, false);
+ break;
+ case FIELD:
+ icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "field", PNG_EXTENSION, modifiers), false);
+ break;
+ case ENUM_CONSTANT:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "constant" +
PNG_EXTENSION, false);
+ break;
+ case CONSTRUCTOR:
+ icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "constructor", PNG_EXTENSION, modifiers), false);
+ break;
+ case INSTANCE_INIT:
+ case STATIC_INIT:
+ icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "initializer", PNG_EXTENSION, modifiers), false);
+ break;
+ case METHOD:
+ icon = ImageUtilities.loadImageIcon(getIconName(elementKind,
ICON_BASE + "method", PNG_EXTENSION, modifiers), false);
+ break;
+ case RECORD:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE + "record" +
PNG_EXTENSION, false);
+ break;
+ case RECORD_COMPONENT:
+ icon = ImageUtilities.loadImageIcon(ICON_BASE +
"recordComponent" + PNG_EXTENSION, false);
+ break;
+ default:
+ icon = null;
}
return icon;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists