Last active
December 18, 2015 23:39
-
-
Save dunmatt/5863040 to your computer and use it in GitHub Desktop.
This is a snippet for Sublime Text 2 (and probably TextMate) to stub out an ADE Component implementation for you.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[/** | |
* Agent Development Environment (ADE) | |
* | |
* @version 1.0 | |
* @author ${1:M@} | |
* @file ${100:${TM_FILEPATH/([^a]|a[^d]|ad[^e])+ade\/(?<dir>.+?)\/[\w\.]+$/$+{dir}/}}/$TM_FILENAME | |
* | |
* Copyright 1997-2013 M@ Dunlap and HRILab (hrilab.org) | |
* All rights reserved. Do not copy and use without permission. | |
* For questions contact ${1} at <${2:matthew.dunlap+hrilab@gmail.com}> | |
*/ | |
package ${100/\//\./g}; | |
import ade.Connection; | |
import ade.SuperADEComponentImpl; | |
import java.rmi.RemoteException; | |
/** | |
* ${3} | |
* | |
* @author ${1} <${2}> | |
*/ | |
public class ${4:${TM_FILENAME/([^\.]+).\w*/$1/}} extends SuperADEComponentImpl implements ${4/(.*)Impl$/$1/} { | |
private boolean constructed; | |
public ${4}() throws RemoteException { | |
super(); | |
${0:// TODO: call connectToComponent() here} | |
constructed = true; | |
} | |
@Override | |
protected void init() { | |
constructed = false; | |
} | |
@Override | |
protected void readyUpdate() { | |
// TODO: do ya thing here | |
} | |
@Override | |
protected boolean localServicesReady() { | |
return constructed && requiredConnectionsPresent(); | |
} | |
@Override | |
protected String additionalUsageInfo() { | |
return ""; | |
} | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>aci</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.java</scope> | |
<description>ADE Component Implementation</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment