ist.palcom.eclipse.browserplugin
Class PalcomBrowserPlugin

java.lang.Object
  extended by AbstractUIPlugin
      extended by ist.palcom.eclipse.browserplugin.PalcomBrowserPlugin
All Implemented Interfaces:
DebugListener

public class PalcomBrowserPlugin
extends AbstractUIPlugin
implements DebugListener

The main plugin class to be used in the desktop.


Field Summary
 Image IMG_CUSTOMER_GREEN
           
 Image IMG_CUSTOMER_RED
           
 Image IMG_CUSTOMER_YELLOW
           
 Image IMG_DEVICE_GREEN
           
 Image IMG_DEVICE_RED
           
 Image IMG_DEVICE_YELLOW
           
 Image IMG_PROVIDER_GREEN
           
 Image IMG_PROVIDER_RED
           
 Image IMG_PROVIDER_YELLOW
           
 Image IMG_SUBLIST_GREEN
           
 Image IMG_SUBLIST_RED
           
 Image IMG_SUBLIST_YELLOW
           
 Image IMG_SVCBOTH_GREEN
           
 Image IMG_SVCBOTH_RED
           
 Image IMG_SVCBOTH_YELLOW
           
static int YNC_CANCEL
           
static int YNC_NO
           
static int YNC_YES
           
 
Constructor Summary
PalcomBrowserPlugin()
          The constructor.
 
Method Summary
 void addCommand(ASTNode c)
          enqueue a command to be displayed in a new view
 void addOutCommandView(OutCommandView v)
           
 void addService(ASTNode c)
          enqueue a service to be displayed in a new view
 void addServiceDescriptionView(ServiceDescriptionView view)
           
static CommandInfo browseCommandInfoFromEHC(EventHandlerClause ehc)
          Use browser to find CommandInfo matching an EventHandlerClause
 boolean confirmEditing(java.lang.String title, java.lang.String message)
          If confirmEditing is true, show an OK/Cancel dialog
 void debug(java.lang.String s)
          A simple debug/dump facility
 void debugCommandListenerThread(Command c)
           
static CommandInfo doGetCommandInfoFromEHC(EventHandlerClause ehc)
           
 void doRefresh()
          refresh all secondary views
static ControlService findControlService(AbstractResourceAddress sa)
           
 java.lang.String getAssemblyInfoFromManager(int idx)
           
 DeviceID getBrowserDeviceID()
           
 boolean getCheckSemantics()
           
static PalcomBrowserPlugin getDefault()
          Returns the shared instance.
 PalcomDeviceTree getDeviceTree()
           
 DeviceTreeContentProvider getDeviceTreeContentProvider()
           
static ImageDescriptor getImageDescriptor(java.lang.String path)
          Returns an image descriptor for the image file at the given plug-in relative path.
 ASTNode getNextCommand()
           
 ASTNode getNextService()
           
 java.io.File getRootPath()
           
 boolean okDialog(java.lang.String title, java.lang.String message)
           
 void putAssemblyUpdateEvent(AssemblyEditor editor, IFile resource)
           
 void removeOutCommandView(OutCommandView v)
           
 void removeServiceDescriptionView(ServiceDescriptionView view)
           
 void safePutCommandEvent(CommandEvent cEvent)
           
 void setBrowserView(BrowserView v)
           
 void setCheckSemantics(boolean b)
           
 void setConfirmEditing(boolean b)
           
 void setDebug(boolean b)
           
 void start(BundleContext context)
          This method is called upon plug-in activation
 void startAssemblyOnBrowser(PRDAssemblyVer a)
           
 void stop(BundleContext context)
          This method is called when the plug-in is stopped
static boolean updateCommandInfoForEHC(EventHandlerClause ehc)
          Update commandInfo of ehc from browser
 int yesNoCancelDialog(java.lang.String title, java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMG_SVCBOTH_GREEN

public final Image IMG_SVCBOTH_GREEN

IMG_SVCBOTH_YELLOW

public final Image IMG_SVCBOTH_YELLOW

IMG_SVCBOTH_RED

public final Image IMG_SVCBOTH_RED

IMG_PROVIDER_GREEN

public final Image IMG_PROVIDER_GREEN

IMG_PROVIDER_YELLOW

public final Image IMG_PROVIDER_YELLOW

IMG_PROVIDER_RED

public final Image IMG_PROVIDER_RED

IMG_CUSTOMER_GREEN

public final Image IMG_CUSTOMER_GREEN

IMG_CUSTOMER_YELLOW

public final Image IMG_CUSTOMER_YELLOW

IMG_CUSTOMER_RED

public final Image IMG_CUSTOMER_RED

IMG_DEVICE_GREEN

public final Image IMG_DEVICE_GREEN

IMG_DEVICE_YELLOW

public final Image IMG_DEVICE_YELLOW

IMG_DEVICE_RED

public final Image IMG_DEVICE_RED

IMG_SUBLIST_GREEN

public final Image IMG_SUBLIST_GREEN

IMG_SUBLIST_YELLOW

public final Image IMG_SUBLIST_YELLOW

IMG_SUBLIST_RED

public final Image IMG_SUBLIST_RED

YNC_YES

public static final int YNC_YES
See Also:
Constant Field Values

YNC_NO

public static final int YNC_NO
See Also:
Constant Field Values

YNC_CANCEL

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

PalcomBrowserPlugin

public PalcomBrowserPlugin()
The constructor.

Method Detail

start

public void start(BundleContext context)
           throws java.lang.Exception
This method is called upon plug-in activation

Throws:
java.lang.Exception

stop

public void stop(BundleContext context)
          throws java.lang.Exception
This method is called when the plug-in is stopped

Throws:
java.lang.Exception

getDefault

public static PalcomBrowserPlugin getDefault()
Returns the shared instance.


getImageDescriptor

public static ImageDescriptor getImageDescriptor(java.lang.String path)
Returns an image descriptor for the image file at the given plug-in relative path.

Parameters:
path - the path
Returns:
the image descriptor

getRootPath

public java.io.File getRootPath()

addCommand

public void addCommand(ASTNode c)
enqueue a command to be displayed in a new view


getNextCommand

public ASTNode getNextCommand()

addService

public void addService(ASTNode c)
enqueue a service to be displayed in a new view


getNextService

public ASTNode getNextService()

doRefresh

public void doRefresh()
refresh all secondary views


addOutCommandView

public void addOutCommandView(OutCommandView v)

removeOutCommandView

public void removeOutCommandView(OutCommandView v)

addServiceDescriptionView

public void addServiceDescriptionView(ServiceDescriptionView view)

removeServiceDescriptionView

public void removeServiceDescriptionView(ServiceDescriptionView view)

setBrowserView

public void setBrowserView(BrowserView v)

getDeviceTree

public PalcomDeviceTree getDeviceTree()

getDeviceTreeContentProvider

public DeviceTreeContentProvider getDeviceTreeContentProvider()

getAssemblyInfoFromManager

public java.lang.String getAssemblyInfoFromManager(int idx)

getBrowserDeviceID

public DeviceID getBrowserDeviceID()

safePutCommandEvent

public void safePutCommandEvent(CommandEvent cEvent)

putAssemblyUpdateEvent

public void putAssemblyUpdateEvent(AssemblyEditor editor,
                                   IFile resource)

browseCommandInfoFromEHC

public static CommandInfo browseCommandInfoFromEHC(EventHandlerClause ehc)
Use browser to find CommandInfo matching an EventHandlerClause

Parameters:
ehc -
Returns:
matcing CommandInfo seen on the net, if any

updateCommandInfoForEHC

public static boolean updateCommandInfoForEHC(EventHandlerClause ehc)
Update commandInfo of ehc from browser

Parameters:
ehc -
Returns:
true on change

doGetCommandInfoFromEHC

public static CommandInfo doGetCommandInfoFromEHC(EventHandlerClause ehc)

findControlService

public static ControlService findControlService(AbstractResourceAddress sa)

debug

public void debug(java.lang.String s)
A simple debug/dump facility

Specified by:
debug in interface DebugListener

setDebug

public void setDebug(boolean b)

setCheckSemantics

public void setCheckSemantics(boolean b)

getCheckSemantics

public boolean getCheckSemantics()

setConfirmEditing

public void setConfirmEditing(boolean b)

confirmEditing

public boolean confirmEditing(java.lang.String title,
                              java.lang.String message)
If confirmEditing is true, show an OK/Cancel dialog

Parameters:
title -
message -
Returns:
true if OK or !confirmEditing, otherwise false

okDialog

public boolean okDialog(java.lang.String title,
                        java.lang.String message)

yesNoCancelDialog

public int yesNoCancelDialog(java.lang.String title,
                             java.lang.String message)

startAssemblyOnBrowser

public void startAssemblyOnBrowser(PRDAssemblyVer a)

debugCommandListenerThread

public void debugCommandListenerThread(Command c)