Extension SDK 10.1.3.36.73

oracle.ide.javaxide
Class ModelInteropUtils

java.lang.Object
  extended byoracle.ide.javaxide.ModelInteropUtils

public final class ModelInteropUtils
extends java.lang.Object

Utilities for extensions which have to interoperate between the JSR-198 (javax.ide) API and the Orace IDE extension API.

Since:
10.1.3

Field Summary
static java.lang.String OIDE_CONTEXT
          The property name of the Oracle IDE context stored in a Javax IDE context.
 
Method Summary
static ModelInteropUtils get()
          Get the singleton instance.
 Context getOracleContext(Context jideContext)
          Get the Oracle IDE context for a Javax IDE context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OIDE_CONTEXT

public static final java.lang.String OIDE_CONTEXT
The property name of the Oracle IDE context stored in a Javax IDE context.

See Also:
Constant Field Values
Method Detail

getOracleContext

public Context getOracleContext(Context jideContext)
Get the Oracle IDE context for a Javax IDE context.

Instances of custom Javax IDE document types in an Oracle IDE context are castable to their nearest Oracle IDE equivalent. For example, if some custom Javax IDE document type extending javax.ide.model.text.TextDocument is in the Javax IDE selection, the equivalent item in the Oracle IDE selection will be of a type that is castable to oracle.ide.model.TextNode.

Properties are not shared between Javax IDE contexts and Oracle IDE contexts. Because of this, you will probably not get what you expect if you use the getProperty() method (or its utility wrappers such as getBoolean()) on the returned context. This is an implementation detail that might change in future releases.

Parameters:
jideContext - a Javax IDE context (an instance of javax.ide.command.Context). Must not be null.
Returns:
an Oracle IDE context (an instance of oracle.ide.addin.Context). Will never return null.
Throws:
java.lang.NullPointerException - if jideContext is null.

get

public static ModelInteropUtils get()
Get the singleton instance.

Returns:
the singleton instance.

Extension SDK 10.1.3.36.73

 

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