org.jtool.jxplatform
Class JxPlugin

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.ui.plugin.AbstractUIPlugin
          extended byorg.jtool.jxplatform.JxPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class JxPlugin
extends org.eclipse.ui.plugin.AbstractUIPlugin

Manages plug-in's information.

Author:
Katsuhisa Maruyama

Field Summary
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
JxPlugin()
          Creates a UI plug-in runtime object.
 
Method Summary
static boolean checkJapanese()
          Tests if this plug-in detects the charset name of input source code before the conversion.
 boolean getConvertBinaryFiles()
          Tests if the converter generates XML documents from binary files.
static JxPlugin getDefault()
          Returns a defult plug-in object.
static java.lang.String getEncoding()
          Returns a plugin's encoding.
static java.lang.String getJxFileExt()
          Returns the extention of output XML files.
 boolean getResolveBindings()
          Tests if the converter adds binding information.
 java.util.ResourceBundle getResourceBundle()
          Returns a resource bundle for the default locale.
static java.lang.String getResourceString(java.lang.String key)
          Returns a resource value from a resource file.
 org.eclipse.swt.widgets.Shell getShell()
          Returns a shell for this workbench site.
static org.eclipse.core.resources.IWorkspace getWorkspace()
          Returns a plug-in's workspace.
 void setConvertBinaryFiles(boolean convert)
          Requests that the converter generates XML documents from binary files.
 void setResolveBindings(boolean bindings)
          Requests that the converter adds binding information.
 void setShell(org.eclipse.swt.widgets.Shell shell)
          Sets a shell for this workbench site.
 void start(org.osgi.framework.BundleContext context)
          refreshes this plug-in's actions when the plug-in is activated.
 void stop(org.osgi.framework.BundleContext context)
          Saves this plug-in's preference when the plug-in is stopped.
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JxPlugin

public JxPlugin()
Creates a UI plug-in runtime object.

Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
refreshes this plug-in's actions when the plug-in is activated.

Parameters:
context - The bundle context for this plug-in.
Throws:
java.lang.Exception - if this plug-in did not start up properly.

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Saves this plug-in's preference when the plug-in is stopped.

Parameters:
context - The bundle context for this plug-in.
Throws:
java.lang.Exception - if this method fails to shut down this plug-in.

getDefault

public static JxPlugin getDefault()
Returns a defult plug-in object.

Returns:
The default plug-in object.

getWorkspace

public static org.eclipse.core.resources.IWorkspace getWorkspace()
Returns a plug-in's workspace.

Returns:
The workspace.

getEncoding

public static java.lang.String getEncoding()
Returns a plugin's encoding.

Returns:
The encoding string.

getResourceString

public static java.lang.String getResourceString(java.lang.String key)
Returns a resource value from a resource file.

Parameters:
key - The name of a target resource.
Returns:
The string value of the target resource.

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Returns a resource bundle for the default locale.

Returns:
The resource bundle.

getJxFileExt

public static java.lang.String getJxFileExt()
Returns the extention of output XML files.

Returns:
The extension string.

checkJapanese

public static boolean checkJapanese()
Tests if this plug-in detects the charset name of input source code before the conversion.

Returns:
true if the detection is required, otherwise false.

setShell

public void setShell(org.eclipse.swt.widgets.Shell shell)
Sets a shell for this workbench site.

Parameters:
shell - A shell for this workbench site.

getShell

public org.eclipse.swt.widgets.Shell getShell()
Returns a shell for this workbench site.

Returns:
The shell for this workbench site.

setResolveBindings

public void setResolveBindings(boolean bindings)
Requests that the converter adds binding information.

Parameters:
bindings - true if bindings are wanted.

getResolveBindings

public boolean getResolveBindings()
Tests if the converter adds binding information.

Returns:
true if bindings are wanted, otherwise false.

setConvertBinaryFiles

public void setConvertBinaryFiles(boolean convert)
Requests that the converter generates XML documents from binary files.

Parameters:
convert - true if generation are wanted.

getConvertBinaryFiles

public boolean getConvertBinaryFiles()
Tests if the converter generates XML documents from binary files.

Returns:
true if generation is wanted, otherwise false.