Update of /cvsroot/xdoclet/xdoclet2/src/ide/idea/src/java/xdoclet/ide/idea
In directory sc8-pr-cvs1:/tmp/cvs-serv18831/src/ide/idea/src/java/xdoclet/ide/idea
Added Files:
XDocletExecuteAction.java XDocletPlugin.java
Log Message:
Added initial IDEA plugin that uses the xdoclet.gui.swing classes.
--- NEW FILE: XDocletExecuteAction.java ---
package xdoclet.ide.idea;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
/**
* Action that executes XDoclet.
*
* @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a>
* @version $Revision: 1.1 $
*/
public class XDocletExecuteAction extends AnAction {
public void actionPerformed(AnActionEvent event) {
System.out.println("EXEC XDOCLET");
}
}
--- NEW FILE: XDocletPlugin.java ---
package xdoclet.ide.idea;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import javax.swing.*;
import xdoclet.gui.swing.BeanContextConfigurationPanel;
import xdoclet.XDoclet;
import xdoclet.XDocletException;
import xdoclet.BeanContextSupportEx;
/**
* Main class in the XDoclet Plugin for IDEA.
*
* @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a>
* @version $Revision: 1.1 $
*/
public class XDocletPlugin implements ProjectComponent, Configurable {
/**
* Method is called after plugin is already created and configured. Plugin can
start to communicate with
* other plugins only in this method.
*/
public void initComponent() {
System.out.println("SampleProjectPlugin: initComponent");
}
/**
* This method is called on plugin disposal.
*/
public void disposeComponent() {
System.out.println("SampleProjectPlugin: disposeComponent");
}
/**
* Invoked when project is opened.
*/
public void projectOpened() {
System.out.println("SampleProjectPlugin: projectOpened");
}
/**
* Invoked when project is closed.
*/
public void projectClosed() {
System.out.println("SampleProjectPlugin: projectClosed");
}
/**
* Returns the name of component
* @return String representing component name. Use plugin_name.component_name
notation.
*/
public String getComponentName() {
return "Sample.SampleProjectPlugin";
}
//////////////////// Configurable interface
public String getDisplayName() {
return "XDCLET";
}
public Icon getIcon() {
return null;
}
public String getHelpTopic() {
return "XDoclet Help";
}
public JComponent createComponent() {
// This should be read from a serialised object or config.
BeanContextSupportEx xdocletContainer = new BeanContextSupportEx();
XDoclet xdoclet = new XDoclet();
xdocletContainer.add( xdoclet );
try {
xdoclet.createPlugin("velocity");
xdoclet.createPlugin("jelly");
} catch (XDocletException e) {
e.printStackTrace(); //To change body of catch statement use Options |
File Templates.
}
return new BeanContextConfigurationPanel( xdocletContainer );
}
public boolean isModified() {
return false;
}
public void apply() throws ConfigurationException {
System.out.println("SampleProjectPlugin: apply");
}
public void reset() {
System.out.println("SampleProjectPlugin: reset");
}
public void disposeUIResources() {
System.out.println("SampleProjectPlugin: disposeUIResources");
}
}
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel