Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core
Class MTJCore


java.lang.Object
  extended by Plugin
      extended by 
org.eclipse.mtj.core.MTJCore

public class MTJCore
extends Plugin

The main plug-in class to be used in the workbench.

The single instance of this class can be accessed from any plug-in declaring the MTJ Core plug-in as a prerequisite via MTJCore.getJavaCore() . The Java model plug-in will be activated automatically if not already active.

Since:
1.0
Restriction:
This class is not intended to be instantiated by clients.

Constructor Summary
MTJCore ()
          Creates the MTJ core plug-in.
 
Method Summary
static  IMetaData createMetaData (IProject project, ProjectType projectType)
          Construct a new metadata object for the given type of project.
static  IAPI createNewAPI ( ProjectType projectType)
          Create a new IAPI instance.
static  IDeviceClasspath createNewDeviceClasspath ()
          Construct a new deviceClasspath instance.
static  ILibrary createNewLibrary ( ProjectType projectType)
          Create a new ILibrary instance.
static  IPreverifier createPreverifier ( String preverifierType, Object param)
          Create a new Preverifier instance based on the preverifier type.
static  IMTJProject geMTJProject (IProject project)
          Returns the active MTJ project associated with the specified IProject, or null if no MTJ project yet exists for the IProject.
static  String getDeploymentDirectoryName ()
          Get the deployment directory name the user has specified in the preferences.
static  IDeviceFinder getDeviceFinder ()
          Return the IDeviceFinder instance that can be used to find for devices in a specific directory.
static  IDeviceRegistry getDeviceRegistry ()
          Returns the IDeviceRegistry instance that can be used to manage the devices available in MTJ.
static  ILibraryImporter getLibraryImporter ( String type)
          Returns a library importer associated to a specific type.
static  MTJCore getMTJCore ()
          Returns the single instance of the MTJ core plug-in runtime class.
static  String getMTJCoreVersion ()
          Return MTJ Core plug-in version.
static  String getPluginId ()
          Returns the symbolic name of MTJUIPlugin as specified by its Bundle-SymbolicName manifest header.
static  File getProguardJarFile ()
          Return the File instance representing the Proguard implementation jar file as defined by the user preferences.
static  InputStream getResourceAsStream (IPath path)
          Gets the InputStream for a resource inside the plug-in.
static  String getResourcesDirectoryName ()
          Get the resources directory name the user has specified in the preferences.
static  ISymbolSetFactory getSymbolSetFactory ()
          Returns the symbol set factory that can be used create symbolsets and symbols.
static  ISymbolSetRegistry getSymbolSetRegistry ()
          Returns the symbol set registry that can be used to manage the symbols that were saved on the workspace
static  String getVerifiedOutputDirectoryName ()
          Get the verified output directory name the user has specified in the preferences.
static IWorkspace getWorkspace ()
          Returns the workspace.
 void start (BundleContext context)
           
 void stop (BundleContext context)
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTJCore

public MTJCore()
Creates the MTJ core plug-in.

Restriction:
This constructor is not intended to be referenced by clients.
Method Detail

createMetaData

public static 
IMetaData createMetaData(IProject project,
                                       
ProjectType projectType)
Construct a new metadata object for the given type of project.

NOTE: Each type of IMetaData is associated to a specific type of project. For example, the IMIDPMetaData is associated to IMidletSuiteProject.

This metadata will not be persisted until the IMetaData.saveMetaData() method is invoked.

Parameters:
project - the project to be associated to the metadata.
projectType - the project type associated to this metadata.
Returns:
a new metadata instance for the given type of project.

createNewAPI

public static 
IAPI createNewAPI(
ProjectType projectType)
Create a new IAPI instance.

NOTE: Each type of API is associated to a specific type of project. For example, the IMIDPAPI is associated to IMidletSuiteProject.

Parameters:
projectType - the type of project.
Returns:
the new IAPI instance. Possible instances are:

createNewDeviceClasspath

public static 
IDeviceClasspath createNewDeviceClasspath()
Construct a new deviceClasspath instance.

Returns:
a new deviceClasspath instance.

createNewLibrary

public static 
ILibrary createNewLibrary(
ProjectType projectType)
Create a new ILibrary instance.

NOTE: Each type of library is associated to a specific type of project. For example, the IMIDPLibrary is associated to IMidletSuiteProject.

Parameters:
projectType - the type of project.
Returns:
the new ILibrary instance. Possible instances are:

createPreverifier

public static 
IPreverifier createPreverifier(
String preverifierType,
                                             
Object param)
                                      throws CoreException
Create a new Preverifier instance based on the preverifier type. Returns null if the preverifier cannot be created for some reason.

Parameters:
preverifierType - type of the preverifier to be created
param - Any parameter that is required by each preverifier type. Please check PreverifierType for information about each type available and the parameters they accept
Returns:
the preverifier instance or null if the preverifier cannot be created for some reason.
Throws:
CoreException - if failed to get the preverifier parameters.

geMTJProject

public static 
IMTJProject geMTJProject(IProject project)
Returns the active MTJ project associated with the specified IProject, or null if no MTJ project yet exists for the IProject.

Parameters:
project - the project for extracting the associated MTJ type of project.
Returns:
the IMTJProject instance associated to the given project. null will be returned in case no type of MTJ project was associated to the given project.

getDeploymentDirectoryName

public static 
String getDeploymentDirectoryName()
Get the deployment directory name the user has specified in the preferences.

Returns:
the name of the deployment folder specified by the user in the preferences.

getDeviceFinder

public static 
IDeviceFinder getDeviceFinder()
Return the IDeviceFinder instance that can be used to find for devices in a specific directory.

Returns:
the IDeviceFinder instance.

getDeviceRegistry

public static 
IDeviceRegistry getDeviceRegistry()
Returns the IDeviceRegistry instance that can be used to manage the devices available in MTJ.

Returns:
the IDeviceRegistry instance.

getLibraryImporter

public static 
ILibraryImporter getLibraryImporter(
String type)
Returns a library importer associated to a specific type. The library importer is used to importer the libraries defined by each SDK.

Clients should refer to ILibraryImporter documentation to find the list of importers.

Parameters:
type - library importer type.
Returns:
the ILibraryImporter instance for the given type.

getMTJCore

public static 
MTJCore getMTJCore()
Returns the single instance of the MTJ core plug-in runtime class.

Returns:
the single instance of the MTJ core plug-in runtime class.

getMTJCoreVersion

public static 
String getMTJCoreVersion()
Return MTJ Core plug-in version.

Returns:
the MTJ Core plug-in version

getProguardJarFile

public static 
File getProguardJarFile()
Return the File instance representing the Proguard implementation jar file as defined by the user preferences. This File is not guaranteed to exist.

Returns:
the file instance for the Proguard jar.

getResourceAsStream

public static 
InputStream getResourceAsStream(IPath path)
Gets the InputStream for a resource inside the plug-in.

Parameters:
path - relative resource path.
Returns:
the resource InputStream.

getResourcesDirectoryName

public static 
String getResourcesDirectoryName()
Get the resources directory name the user has specified in the preferences.

Returns:
the name of the directory to be used for resources, as specified in the preferences.

getSymbolSetFactory

public static 
ISymbolSetFactory getSymbolSetFactory()
Returns the symbol set factory that can be used create symbolsets and symbols.

Returns:
the ISymbolSetFactory instance.

getSymbolSetRegistry

public static 
ISymbolSetRegistry getSymbolSetRegistry()
Returns the symbol set registry that can be used to manage the symbols that were saved on the workspace

Returns:
the ISymbolSetRegistry instance.

getVerifiedOutputDirectoryName

public static 
String getVerifiedOutputDirectoryName()
Get the verified output directory name the user has specified in the preferences.

Returns:
the name of the directory to be used for verified classes, as specified in the preferences.

getWorkspace

public static IWorkspace getWorkspace()
Returns the workspace.

Returns:
the workspace that was created by the single instance of this plug-in class.

getPluginId

public static 
String getPluginId()
Returns the symbolic name of MTJUIPlugin as specified by its Bundle-SymbolicName manifest header.

Returns:
the symbolic name of MTJUIPlugin.

start

public void start(BundleContext context)
           throws 
Exception
Throws:
Exception

stop

public void stop(BundleContext context)
          throws 
Exception
Throws:
Exception

Mobile Tools for Java
Release 1.0


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire