mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
30.23.2016 2e6906d5546cbbeee28692bb39459830714e2044
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BrowseSchemaPanel.java
@@ -16,6 +16,8 @@
 */
package org.opends.guitools.controlpanel.ui;
import static org.opends.guitools.controlpanel.util.Utilities.getElementNameOrOID;
import static org.opends.messages.AdminToolMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -73,7 +75,6 @@
import org.opends.guitools.controlpanel.browser.IconPool;
import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo;
import org.opends.guitools.controlpanel.datamodel.ServerDescriptor;
import org.opends.guitools.controlpanel.datamodel.SomeSchemaElement;
import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent;
import org.opends.guitools.controlpanel.event.ConfigurationElementCreatedEvent;
import org.opends.guitools.controlpanel.event.ConfigurationElementCreatedListener;
@@ -99,6 +100,7 @@
import org.opends.guitools.controlpanel.util.LowerCaseComparator;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.guitools.controlpanel.util.ViewPositions;
import org.opends.server.schema.ServerSchemaElement;
import org.opends.server.types.Schema;
/** The pane that is displayed when the user clicks on 'Browse Schema'. */
@@ -139,7 +141,7 @@
  private JPopupMenu popup;
  private SomeSchemaElement lastCreatedElement;
  private ServerSchemaElement lastCreatedElement;
  private final CategoryTreeNode attributes = new CategoryTreeNode(INFO_CTRL_PANEL_ATTRIBUTES_CATEGORY_NODE.get());
  private final CategoryTreeNode objectClasses =
@@ -669,7 +671,7 @@
    {
      if (mustAdd(oc))
      {
        SomeSchemaElement element = new SomeSchemaElement(oc);
        ServerSchemaElement element = new ServerSchemaElement(oc);
        String name = oc.getNameOrOID();
        if (Utilities.isStandard(element))
        {
@@ -697,7 +699,7 @@
    Map<String, CustomAttributeTreeNode> hmCustomAttrs = new HashMap<>();
    for (AttributeType attr : lastSchema.getAttributeTypes())
    {
      SomeSchemaElement element = new SomeSchemaElement(attr);
      ServerSchemaElement element = new ServerSchemaElement(attr);
      if (mustAdd(attr))
      {
        String name = attr.getNameOrOID();
@@ -870,7 +872,7 @@
            if (lastCreatedElement != null)
            {
              if (node instanceof CustomObjectClassTreeNode
                  && name.equals(lastCreatedElement.getNameOrOID()))
                  && name.equals(getElementNameOrOID(lastCreatedElement)))
              {
                newSelectionPath = new TreePath(node.getPath());
                lastCreatedElement = null;
@@ -1462,9 +1464,9 @@
  private void configurationElementCreated(ConfigurationElementCreatedEvent ev)
  {
    Object o = ev.getConfigurationObject();
    if (o instanceof SomeSchemaElement)
    if (o instanceof ServerSchemaElement)
    {
      lastCreatedElement = (SomeSchemaElement) o;
      lastCreatedElement = (ServerSchemaElement) o;
    }
  }