org.jupe.plugin
Class JupePlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.jupe.plugin.JupePlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

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

The main plugin class.

Author:
Michael Pradel, Martin Adolph, Emanuel Thomas

Field Summary
static int FULL_CONSISTENCY_CONST
           
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
JupePlugin()
          Default Constructor.
 
Method Summary
 void addJupeNature(org.eclipse.core.resources.IProject project)
          Specify a project as Jupe project.
 void addJupeProject(JupeProject project)
          Adds a Jupe project.
static JupePlugin getDefault()
          Returns the shared instance.
 ClassDiagramEditor getEditorForDiagram(ClassDiagram classDiagram)
           
 java.lang.String getID()
          Method returns the plugin ID.
 JupeProject getJupeProject(org.eclipse.core.resources.IProject project)
          Find the Jupe project for a given project.
 JupeProject getJupeProject(org.eclipse.uml2.uml.Model uml2Model)
          Find the Jupe project for a given UML2 model.
 java.util.Set<JupeProject> getJupeProjects()
          Get a collection of projects that currently use Jupe.
 boolean isPrintDebugMessages()
           
 void println(java.lang.Object message)
          Add a log message.
 void removeJupeNature(org.eclipse.core.resources.IProject project)
          Remove the Jupe Nature from a project.
 boolean removeJupeProject(JupeProject project)
          Removes a Jupe project.
 void setPrintDebugMessages(boolean enabled)
          Method enables/disables printing of debug messages.
 void start(org.osgi.framework.BundleContext context)
          
 void stop(org.osgi.framework.BundleContext context)
          
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FULL_CONSISTENCY_CONST

public static final int FULL_CONSISTENCY_CONST
See Also:
Constant Field Values
Constructor Detail

JupePlugin

public JupePlugin()
Default Constructor.

Method Detail

getDefault

public static JupePlugin getDefault()
Returns the shared instance.

Returns:
plugin shared instance

addJupeNature

public void addJupeNature(org.eclipse.core.resources.IProject project)
Specify a project as Jupe project.

Parameters:
project - project to add jupe nature
Throws:
org.eclipse.core.runtime.CoreException - if an error occurs

getID

public java.lang.String getID()
Method returns the plugin ID.

Returns:
plgun ID

isPrintDebugMessages

public boolean isPrintDebugMessages()
Returns:
true if printing debug messages is enabled, false otherwise

println

public void println(java.lang.Object message)
Add a log message.

Parameters:
message - message to log

removeJupeNature

public void removeJupeNature(org.eclipse.core.resources.IProject project)
Remove the Jupe Nature from a project.

Parameters:
project - project to remove jupe nature from
Throws:
org.eclipse.core.runtime.CoreException - if an error occurs

setPrintDebugMessages

public void setPrintDebugMessages(boolean enabled)
Method enables/disables printing of debug messages.

Parameters:
enabled - true to enable printing debug messages, false otherwise

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception

Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception

Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
java.lang.Exception

addJupeProject

public void addJupeProject(JupeProject project)
Adds a Jupe project.

Parameters:
project - The new Jupe project.

removeJupeProject

public boolean removeJupeProject(JupeProject project)
Removes a Jupe project.

Parameters:
project - The Jupe project to remove.
Returns:
True, if it has been removed successfully, false otherwise.

getJupeProjects

public java.util.Set<JupeProject> getJupeProjects()
Get a collection of projects that currently use Jupe.

Returns:
Projects using Jupe.

getJupeProject

public JupeProject getJupeProject(org.eclipse.core.resources.IProject project)
Find the Jupe project for a given project.

Parameters:
project - The project whose Jupe project you search.
Returns:
The Jupe project, or null if there is none.

getJupeProject

public JupeProject getJupeProject(org.eclipse.uml2.uml.Model uml2Model)
Find the Jupe project for a given UML2 model.

Parameters:
uml2Model - The UML2 model whose Jupe project you search.
Returns:
The Jupe project, or null if there is none.

getEditorForDiagram

public ClassDiagramEditor getEditorForDiagram(ClassDiagram classDiagram)