rj.tools.jcsc.plugins.intellij
Class IntellijJCSCImpl

java.lang.Object
  extended byrj.tools.jcsc.plugins.intellij.IntellijJCSCImpl
All Implemented Interfaces:
com.intellij.openapi.components.BaseComponent, com.intellij.openapi.options.Configurable, java.util.EventListener, com.intellij.openapi.fileEditor.FileEditorManagerListener, IntellijJCSC, com.intellij.openapi.util.JDOMExternalizable, com.intellij.openapi.components.ProjectComponent, com.intellij.openapi.options.UnnamedConfigurable

public class IntellijJCSCImpl
extends java.lang.Object
implements IntellijJCSC, com.intellij.openapi.fileEditor.FileEditorManagerListener

Implementation for the JCSC / IntelliJ plugin

Version:
__0.1__
Author:
Ralph Jocham

Field Summary
 
Fields inherited from interface rj.tools.jcsc.plugins.intellij.IntellijJCSC
COMPONENT_NAME
 
Constructor Summary
IntellijJCSCImpl(com.intellij.openapi.project.Project project)
          Creates a new instance
 
Method Summary
 void apply()
          Apply new settings
 javax.swing.JComponent createComponent()
          Create ui component
 void disposeComponent()
          Dispose the component
 void disposeUIResources()
          Terminate the component
 void fileClosed(com.intellij.openapi.fileEditor.FileEditorManager source, com.intellij.openapi.vfs.VirtualFile file)
          Called when file was closed
 void fileOpened(com.intellij.openapi.fileEditor.FileEditorManager source, com.intellij.openapi.vfs.VirtualFile file)
          Called when new file was opened
 java.lang.String getComponentName()
          Get the name of the component
 java.lang.String getDisplayName()
          Get the display name for the component
 java.lang.String getHelpTopic()
          Get the help topic of the component
 javax.swing.Icon getIcon()
          Get the icon of the component
 JCSCOptions getJCSCOptions()
          Get the JCSC options
 java.lang.String getProjectId()
          Get the project id
 void initComponent()
          Initialize the component
 boolean isModified()
          Whether plugin has been modified
 void projectClosed()
          Called when project was closes
 void projectOpened()
          Called when project was opened
 void readExternal(org.jdom.Element element)
          Called to read the component settings
 void reset()
          Restore old settings
 void selectedFileChanged(com.intellij.openapi.fileEditor.FileEditorManagerEvent e)
          Called when selected file has changed
 void selectionChanged(com.intellij.openapi.fileEditor.FileEditorManagerEvent event)
          Called when selection has changed
 void writeExternal(org.jdom.Element element)
          Called to write the component settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntellijJCSCImpl

public IntellijJCSCImpl(com.intellij.openapi.project.Project project)
Creates a new instance

Parameters:
project -
Method Detail

fileOpened

public void fileOpened(com.intellij.openapi.fileEditor.FileEditorManager source,
                       com.intellij.openapi.vfs.VirtualFile file)
Called when new file was opened

Specified by:
fileOpened in interface com.intellij.openapi.fileEditor.FileEditorManagerListener
Parameters:
source -
file -

fileClosed

public void fileClosed(com.intellij.openapi.fileEditor.FileEditorManager source,
                       com.intellij.openapi.vfs.VirtualFile file)
Called when file was closed

Specified by:
fileClosed in interface com.intellij.openapi.fileEditor.FileEditorManagerListener
Parameters:
source -
file -

selectionChanged

public void selectionChanged(com.intellij.openapi.fileEditor.FileEditorManagerEvent event)
Called when selection has changed

Specified by:
selectionChanged in interface com.intellij.openapi.fileEditor.FileEditorManagerListener
Parameters:
event -

selectedFileChanged

public void selectedFileChanged(com.intellij.openapi.fileEditor.FileEditorManagerEvent e)
Called when selected file has changed

Parameters:
e -

getDisplayName

public java.lang.String getDisplayName()
Get the display name for the component

Specified by:
getDisplayName in interface com.intellij.openapi.options.Configurable
Returns:
display name

getIcon

public javax.swing.Icon getIcon()
Get the icon of the component

Specified by:
getIcon in interface com.intellij.openapi.options.Configurable
Returns:
icon

getHelpTopic

public java.lang.String getHelpTopic()
Get the help topic of the component

Specified by:
getHelpTopic in interface com.intellij.openapi.options.Configurable
Returns:
help topic

createComponent

public javax.swing.JComponent createComponent()
Create ui component

Specified by:
createComponent in interface com.intellij.openapi.options.UnnamedConfigurable
Returns:
ui component

isModified

public boolean isModified()
Whether plugin has been modified

Specified by:
isModified in interface com.intellij.openapi.options.UnnamedConfigurable
Returns:
modification flag

apply

public void apply()
           throws com.intellij.openapi.options.ConfigurationException
Apply new settings

Specified by:
apply in interface com.intellij.openapi.options.UnnamedConfigurable
Throws:
com.intellij.openapi.options.ConfigurationException

reset

public void reset()
Restore old settings

Specified by:
reset in interface com.intellij.openapi.options.UnnamedConfigurable

getJCSCOptions

public JCSCOptions getJCSCOptions()
Get the JCSC options

Specified by:
getJCSCOptions in interface IntellijJCSC
Returns:
options for JCSC

disposeUIResources

public void disposeUIResources()
Terminate the component

Specified by:
disposeUIResources in interface com.intellij.openapi.options.UnnamedConfigurable

initComponent

public void initComponent()
Initialize the component

Specified by:
initComponent in interface com.intellij.openapi.components.BaseComponent

disposeComponent

public void disposeComponent()
Dispose the component

Specified by:
disposeComponent in interface com.intellij.openapi.components.BaseComponent

projectOpened

public void projectOpened()
Called when project was opened

Specified by:
projectOpened in interface com.intellij.openapi.components.ProjectComponent

projectClosed

public void projectClosed()
Called when project was closes

Specified by:
projectClosed in interface com.intellij.openapi.components.ProjectComponent

readExternal

public void readExternal(org.jdom.Element element)
                  throws com.intellij.openapi.util.InvalidDataException
Called to read the component settings

Specified by:
readExternal in interface com.intellij.openapi.util.JDOMExternalizable
Parameters:
element -
Throws:
com.intellij.openapi.util.InvalidDataException

writeExternal

public void writeExternal(org.jdom.Element element)
                   throws com.intellij.openapi.util.WriteExternalException
Called to write the component settings

Specified by:
writeExternal in interface com.intellij.openapi.util.JDOMExternalizable
Parameters:
element -
Throws:
com.intellij.openapi.util.WriteExternalException

getComponentName

public java.lang.String getComponentName()
Get the name of the component

Specified by:
getComponentName in interface com.intellij.openapi.components.BaseComponent
Returns:
name of component

getProjectId

public java.lang.String getProjectId()
Get the project id

Returns:
project id


(c) 1999-2005 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License