Extension SDK 10.1.2

Package oracle.ide.config

Contains classes encapsulating JDevelopers's environment settings.

See:
          Description

Class Summary
ChangeEventSource Implements the registry of ChangeListeners.
DocumentExtensions DocumentExtensions class.
DocumentExtensions.DocRecord DocRecord class.
DocumentExtensions.ExtInfo ExtInfo class.
DocumentExtensionsPanel DocumentExtensionsPanel class.
DTCache The DTCache is a persisted cache that can be used to store data that is not user-configurable.
DTCacheMigrator  
EnvironOptions This class stores the IDE environment options.
EnvironOptionsPanel A panel to edit EnvironOptions.
IdeKeyStrokes This class defines the default global shortcuts for the application
IdeSettings This classes stores the IDE settings.
IdeSettingsMigrator Migrator responsible for migrating user IDE settings from a previous installation to the current installation.
LogOptionsPanel A panel to edit the log properties in EnvironOptions.
PlatformProperties This class is used internally by the framework to overload IDE properties with platform specific values.
SplashScreenOptions Utility class to get and set the display status of the SplashScreen.
 

Package oracle.ide.config Description

Contains classes encapsulating JDevelopers's environment settings. Addins can extends these settings with their own.

Related Documentation

See Extending JDeveloper Using the Addin API for detailed information.


Example of an option bean

package mypackage;

import oracle.ide.config.ChangeEventSource;
import oracle.ide.util.Copyable;

public class MyConfigOptions extends ChangeEventSource
    implements Copyable
{
  public static final String KEY = "MyConfigOptions";

  private boolean _myOption;

  public boolean getMyOption()
  {
    return _myOption;
  }

  public void setMyOption( boolean myOption )
  {
    _myOption = myOption;
  }

  public Object copyTo( Object target )
  {
    final MyConfigOptions other = ( target != null ) ? (MyConfigOptions) target: new MyConfigOptions();

    other.setMyOption(getMyOption());

    return other;
  }
}

Example of an option panel

package mypackage;

import java.awt.BorderLayout;
import javax.swing.JCheckBox;
import oracle.ide.Ide;
import oracle.ide.config.IdeSettings;
import oracle.ide.panels.DefaultTraversablePanel;
import oracle.ide.panels.Navigable;
import oracle.ide.panels.TraversableContext;

public class MyConfigPanel extends DefaultTraversablePanel
{
  private JCheckBox _myCheckBox;

  public static final void registerPanel()
  {
    IdeSettings ideSettings = Ide.getSettings();
    if ( ideSettings.getData(MyConfigOptions.KEY) == null )
    {
      ideSettings.putData(MyConfigOptions.KEY, new MyConfigOptions());
    }

    Navigable myNavigable = new Navigable("My Options", MyConfigPanel.class);

    // To register a top level panel
    IdeSettings.registerUI(myNavigable);

//  To register a child of another Navigable:
//  Navigable parentNavigable = null;
//  parentNavigable.addChildNavigable(myNavigable);
  }

  public MyConfigPanel()
  {
    setLayout(new BorderLayout());
    _myCheckBox = new JCheckBox("My Option:", true);
    add(_myCheckBox, BorderLayout.CENTER);
  }

  public void onEntry( TraversableContext tc )
  {
    final MyConfigOptions options = (MyConfigOptions) tc.find( MyConfigOptions.KEY );
    _myCheckBox.setSelected(options.getMyOption());
  }

  public void onExit( TraversableContext tc )
  {
    final MyConfigOptions options =(MyConfigOptions) tc.find( MyConfigOptions.KEY );
    options.setMyOption(_myCheckBox.isSelected());
  }

}


Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.