# Java Logical Structures

###### Identifier:

org.eclipse.jdt.debug.javaLogicalStructures

###### Since:

3.1

###### Description:

This extension point allows developers to define a logical structure for Java objects of a specified type. The logical value is created by evaluating the provided code snippet.

###### Configuration Markup:

<!ELEMENT extension (javaLogicalStructure+)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance

<!ELEMENT javaLogicalStructure (variable+)?>

<!ATTLIST javaLogicalStructure

type CDATA #REQUIRED

subtypes (true | false) "true"

value CDATA #IMPLIED

description CDATA #REQUIRED>

- type - Fully qualified name of the type.
- subtypes - specify if this Java logical structure should be used also for the objects of a subtype of the specified type, or only for the objects of the specified type. This attribute is optional, the default value is `true`.
- value - The code snippet to evaluate to create the logical value. This attribute is optional, if unspecified, the extension must declare one or more variables.
- description - a description of this logical structure.

<!ELEMENT variable EMPTY>

<!ATTLIST variable

name CDATA #REQUIRED

value CDATA #REQUIRED>

One variable of the logical value for the object of this type.

- name - The name of the variable which will be created
- value - The code snippet which will be evaluated as the value of the variable

###### Examples:

Following is an example of a Java logical structure extension point with two structures:

    <extension point="org.eclipse.jdt.debug.javaLogicalStructures">
      <javaLogitalStructure
          subtypes="true"
          value="return entrySet().toArray();"
          type="java.util.Map"/>
      <javaLogitalStructure
          subtypes="true"
          type="java.util.Map$Entry">
        <variable
          value="return getKey();"
          name="key"/>
        <variable
          value="return getValue();"
          name="value"/>
      </javaLogitalStructure>
    </extension>

In the example above a Map is translated into its entries and a Map$Entry is translated into its key and value.

###### API Information:

[Enter API information here.]

###### Supplied Implementation:

[Enter information about supplied implementation of this extension point.]

Copyright (c) 2004, 2005 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0