|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.core.runtime.Plugin org.eclipse.ui.plugin.AbstractUIPlugin uk.ac.kcl.cch.jb.pliny.pdfAnnot.PdfAnnotPlugin
The main plugin class for Pliny's PDF Editor to be used in the desktop. The plugin as a whole is a classic Eclipse plugin, and contains many basic Pliny elements including most of the model and UI code.
Much of the code found in the the Editor itself, and some in this particular class come from models provided with JPedal -- the PDF display engine used here.
This plugin class itself, as well as supporting the usual base Eclipse functionality provides several Pliny-specific functions:
ObjectType
for
PDF Resources.
Field Summary | |
static String |
EDITOR_ID
|
static boolean |
isBroken
|
static String |
PLUGIN_ID
|
Fields inherited from class org.eclipse.core.runtime.Plugin |
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME |
Constructor Summary | |
PdfAnnotPlugin()
The constructor. |
Method Summary | |
boolean |
cachePdf(URL url,
int cacheNo)
fetches the PDF file pointed to by the given URL and stores it in the PDF cache, with the given cache ID. |
static PdfAnnotPlugin |
getDefault()
Returns the shared instance. |
static org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(String path)
Returns an image descriptor for the image file at the given plug-in relative path. |
static ObjectType |
getMyObjectType()
returns the ObjectType for PDF resources that the editor in this plugin can handle. |
String |
getOSStringForCachedPdf(int cacheNo)
returns the absolute path to the specific PDF file (identified by the cache number) on this machine. |
File |
getPdfCachePath()
|
org.eclipse.jface.resource.ImageDescriptor |
getThumbnailFromImageCache(int cacheNo)
|
void |
start(org.osgi.framework.BundleContext context)
This method is called upon plug-in activation |
void |
stop(org.osgi.framework.BundleContext context)
This method is called 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 |
Field Detail |
public static String EDITOR_ID
public static String PLUGIN_ID
public static boolean isBroken
Constructor Detail |
public PdfAnnotPlugin()
Method Detail |
public void start(org.osgi.framework.BundleContext context) throws Exception
Exception
public void stop(org.osgi.framework.BundleContext context) throws Exception
Exception
public static PdfAnnotPlugin getDefault()
public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(String path)
path
- the path
public static ObjectType getMyObjectType()
public File getPdfCachePath()
public boolean cachePdf(URL url, int cacheNo)
url
- a URL that points to the PDF file to be cachedcacheNo
- a number that will act as an ID for this PDF file
in the cache in the future.
true
if PDF file was successfully cached.public String getOSStringForCachedPdf(int cacheNo)
cacheNo
- cache ID for the PDF file
public org.eclipse.jface.resource.ImageDescriptor getThumbnailFromImageCache(int cacheNo)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |