01: /*
02: * TEST.java
03: *
04: * Created on August 21, 2006, 4:09 PM
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package org.netbeans.modules.mobility.snippets;
11:
12: import javax.swing.text.BadLocationException;
13: import javax.swing.text.JTextComponent;
14: import org.openide.text.ActiveEditorDrop;
15:
16: /**
17: *
18: * @author bohemius
19: */
20: public class TEST implements ActiveEditorDrop {
21:
22: /** Creates a new instance of TEST */
23: public TEST() {
24: }
25:
26: public boolean handleTransfer(JTextComponent targetComponent) {
27: String body = "//TEST";
28: try {
29: SnippetsPaletteUtilities.insert(body, targetComponent);
30: } catch (BadLocationException ble) {
31: return false;
32: }
33: return true;
34: }
35:
36: }
|