JetBrains/intellij-community · error · IllegalArgumentException

String descriptor value required

Error message

String descriptor value required

What it means

Thrown by LwTabbedPane.readConstraintsForChild when a tabbed-pane child's title StringDescriptor is null: LwXmlReader.getStringDescriptor over the title/title-resource-bundle/title-key attributes produced nothing. Every component placed in a JTabbedPane must carry a tab title (plain value or localized bundle+key), so a null descriptor is an IllegalArgumentException.

Source

Thrown at java/compiler/forms-compiler/src/com/intellij/uiDesigner/lw/LwTabbedPane.java:34

    return null;
  }

  @Override
  public void read(final Element element, final PropertiesProvider provider) throws Exception {
    readNoLayout(element, provider);
  }

  @Override
  protected void readConstraintsForChild(final Element element, final LwComponent component) {
    final Element constraintsElement = LwXmlReader.getRequiredChild(element, UIFormXmlConstants.ELEMENT_CONSTRAINTS);
    final Element tabbedPaneChild = LwXmlReader.getRequiredChild(constraintsElement, UIFormXmlConstants.ELEMENT_TABBEDPANE);

    final StringDescriptor descriptor = LwXmlReader.getStringDescriptor(tabbedPaneChild,
                                                                        UIFormXmlConstants.ATTRIBUTE_TITLE,
                                                                        UIFormXmlConstants.ATTRIBUTE_TITLE_RESOURCE_BUNDLE,
                                                                        UIFormXmlConstants.ATTRIBUTE_TITLE_KEY);
    if (descriptor == null) {
      throw new IllegalArgumentException("String descriptor value required");
    }
    final Constraints constraints = new Constraints(descriptor);

    final Element tooltipElement = LwXmlReader.getChild(tabbedPaneChild, UIFormXmlConstants.ELEMENT_TOOLTIP);
    if (tooltipElement != null) {
      constraints.myToolTip = LwXmlReader.getStringDescriptor(tooltipElement,
                                                              UIFormXmlConstants.ATTRIBUTE_VALUE,
                                                              UIFormXmlConstants.ATTRIBUTE_RESOURCE_BUNDLE,
                                                              UIFormXmlConstants.ATTRIBUTE_KEY);
    }

    String icon = tabbedPaneChild.getAttributeValue(UIFormXmlConstants.ATTRIBUTE_ICON);
    if (icon != null) {
      constraints.myIcon = new IconDescriptor(icon);
    }
    icon = tabbedPaneChild.getAttributeValue(UIFormXmlConstants.ATTRIBUTE_DISABLED_ICON);
    if (icon != null) {
      constraints.myDisabledIcon = new IconDescriptor(icon);

View on GitHub (pinned to be881553f2)

Solutions

  1. Add a title attribute (or title-resource-bundle + title-key pair) to the <tabbedPane> constraints element of the child.
  2. Re-open the form in the GUI designer, select the tab, set its title, and save.
  3. If tabs intentionally have no text, still set an empty title value attribute (title="") so the descriptor is non-null.

Example fix

<!-- before -->
<constraints><tabbedPane/></constraints>

<!-- after -->
<constraints><tabbedPane title="General"/></constraints>
Defensive patterns

Strategy: validation

Validate before calling

// When writing tabbed-pane constraints, always include a title or bundle+key
if (title == null && (titleBundle == null || titleKey == null)) throw new IllegalStateException("tabbedPane constraints require a title");

Try / catch

try { tabbedPane.readConstraintsForChild(element, component); } catch (IllegalArgumentException e) { if ("String descriptor value required".equals(e.getMessage())) { /* add title attribute to <tabbedPane> constraints */ } else throw e; }

Prevention

When it happens

Trigger: A component inside <tabbed-pane> has <constraints><tabbedPane/> with none of the title attributes present, e.g. <tabbedPane icon="..."/> without title, title-resource-bundle, or title-key. getStringDescriptor returns null and the read fails.

Common situations: Hand-edited or generated form XML omitting tab titles; migration scripts converting forms that drop title attributes; older designer versions writing titles differently than the reader expects.

Related errors


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/3b4c55ce846ef0ef. Report an issue: GitHub.