Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dorn2013-11-18 08:07:47 -0500
committerJohannes Dorn2013-11-18 08:08:17 -0500
commitcd204382c2845686703e256374ed0607b0265630 (patch)
treedf021f2f45f1029d841028866afaf75caac292a1
parent1d074daf45f763c6812a9f8a4c4e236b63b9aea1 (diff)
downloadorg.eclipse.recommenders.snipmatch.snippets-cd204382c2845686703e256374ed0607b0265630.tar.gz
org.eclipse.recommenders.snipmatch.snippets-cd204382c2845686703e256374ed0607b0265630.tar.xz
org.eclipse.recommenders.snipmatch.snippets-cd204382c2845686703e256374ed0607b0265630.zip
[snippets] Added affected types to eclipse snippets
Signed-off-by: Johannes Dorn <johannes.dorn@codetrails.com>
-rw-r--r--snippets/eclipse/Browser.json3
-rw-r--r--snippets/eclipse/Button.json4
-rw-r--r--snippets/eclipse/Combo.json3
-rw-r--r--snippets/eclipse/Composite.json3
-rw-r--r--snippets/eclipse/DateTime.json3
-rw-r--r--snippets/eclipse/ExpandBar.json3
-rw-r--r--snippets/eclipse/ExpandItem.json4
-rw-r--r--snippets/eclipse/GridData.json3
-rw-r--r--snippets/eclipse/GridLayout.json3
-rw-r--r--snippets/eclipse/Group.json3
-rw-r--r--snippets/eclipse/Label.json3
-rw-r--r--snippets/eclipse/Link.json4
-rw-r--r--snippets/eclipse/List.json3
-rw-r--r--snippets/eclipse/SashForm.json3
-rw-r--r--snippets/eclipse/Scale.json3
-rw-r--r--snippets/eclipse/ScrolledComposite.json4
-rw-r--r--snippets/eclipse/Shell.json3
-rw-r--r--snippets/eclipse/Spinner.json3
-rw-r--r--snippets/eclipse/StyleRange.json4
-rw-r--r--snippets/eclipse/StyledText.json3
-rw-r--r--snippets/eclipse/TabFolder.json3
-rw-r--r--snippets/eclipse/TabItem.json4
-rw-r--r--snippets/eclipse/Table.json3
-rw-r--r--snippets/eclipse/TableColumn.json4
-rw-r--r--snippets/eclipse/TableItem.json4
-rw-r--r--snippets/eclipse/Text.json3
-rw-r--r--snippets/eclipse/ToolBar.json3
-rw-r--r--snippets/eclipse/ToolItem.json4
-rw-r--r--snippets/eclipse/Tree.json3
-rw-r--r--snippets/eclipse/TreeColumn.json4
-rw-r--r--snippets/eclipse/TreeItem.json4
-rw-r--r--snippets/eclipse/addlistener.json4
-rw-r--r--snippets/eclipse/execute.json4
-rw-r--r--snippets/eclipse/runnable.json3
-rw-r--r--snippets/eclipse/test.json3
-rw-r--r--snippets/eclipse/toarray.json3
-rw-r--r--snippets/eclipse/while.json3
-rw-r--r--snippets/selected/File-2.json3
-rw-r--r--snippets/selected/SimpleDateFormat-1.json4
-rw-r--r--snippets/selected/StringTokenizer-8.json4
40 files changed, 135 insertions, 0 deletions
diff --git a/snippets/eclipse/Browser.json b/snippets/eclipse/Browser.json
index ff68f1b..666be6b 100644
--- a/snippets/eclipse/Browser.json
+++ b/snippets/eclipse/Browser.json
@@ -3,5 +3,8 @@
"name": "Browser",
"description": "new Browser",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/browser/Browser"
+ ],
"code": "${browserType:newType(org.eclipse.swt.browser.Browser)} ${browser:newName(org.eclipse.swt.browser.Browser)}\u003d new ${browserType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.NONE, SWT.MOZILLA)});\n${browser}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${browser}.setUrl(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Button.json b/snippets/eclipse/Button.json
index 3510210..e125053 100644
--- a/snippets/eclipse/Button.json
+++ b/snippets/eclipse/Button.json
@@ -3,5 +3,9 @@
"name": "Button",
"description": "new Button",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Button",
+ "Lorg/eclipse/swt/widgets/Listener"
+ ],
"code": "${buttonType:newType(org.eclipse.swt.widgets.Button)} ${button:newName(org.eclipse.swt.widgets.Button)}\u003d new ${buttonType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.PUSH, SWT.TOGGLE, SWT.RADIO, SWT.CHECK, SWT.FLAT)});\n${button}.setLayoutData(new ${type:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(BEGINNING, CENTER, END, FILL)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(false, true)}, ${vex:link(false, true)}));\n${button}.setText(${word_selection}${});\n${button}.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t${listener:link(\u0027\u0027)}\n\t\t\t}\n\t\t});\n${imp:import(org.eclipse.swt.SWT, org.eclipse.swt.events.SelectionAdapter, org.eclipse.swt.events.SelectionEvent)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Combo.json b/snippets/eclipse/Combo.json
index 9b150a8..3f1d6c9 100644
--- a/snippets/eclipse/Combo.json
+++ b/snippets/eclipse/Combo.json
@@ -3,5 +3,8 @@
"name": "Combo",
"description": "new Combo",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Combo"
+ ],
"code": "${comboType:newType(org.eclipse.swt.widgets.Combo)} ${combo:newName(org.eclipse.swt.widgets.Combo)}\u003d new ${comboType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.DROP_DOWN, \u0027SWT.DROP_DOWN | SWT.READ_ONLY\u0027)});\n${combo}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(true, false)}, ${vex:link(false, true)}));\n${combo}.setItems(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Composite.json b/snippets/eclipse/Composite.json
index a81fb1b..250e183 100644
--- a/snippets/eclipse/Composite.json
+++ b/snippets/eclipse/Composite.json
@@ -3,5 +3,8 @@
"name": "Composite",
"description": "new Composite with GridLayout",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Composite"
+ ],
"code": "${compositeType:newType(org.eclipse.swt.widgets.Composite)} ${composite:newName(org.eclipse.swt.widgets.Composite)}\u003d new ${compositeType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.NONE, SWT.BORDER)});\n${composite}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${composite}.setLayout(new ${layoutType:newType(org.eclipse.swt.layout.GridLayout)}(${numberColumns:link(1, 2, 3, 4, 5)}, ${equalColumns:link(false, true)}));\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/DateTime.json b/snippets/eclipse/DateTime.json
index b39823f..50e3357 100644
--- a/snippets/eclipse/DateTime.json
+++ b/snippets/eclipse/DateTime.json
@@ -3,5 +3,8 @@
"name": "DateTime",
"description": "new DateTime",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/DateTime"
+ ],
"code": "${dateType:newType(org.eclipse.swt.widgets.DateTime)} ${dateTime:newName(org.eclipse.swt.widgets.DateTime)}\u003d new ${dateType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(\u0027SWT.CALENDAR | SWT.SHORT\u0027, \u0027SWT.CALENDAR | SWT.MEDIUM\u0027, \u0027SWT.CALENDAR | SWT.LONG\u0027, \u0027SWT.TIME | SWT.SHORT\u0027, \u0027SWT.TIME | SWT.MEDIUM\u0027, \u0027SWT.TIME | SWT.LONG\u0027, \u0027SWT.DATE | SWT.SHORT\u0027, \u0027SWT.DATE | SWT.MEDIUM\u0027, \u0027SWT.DATE | SWT.LONG\u0027)});\n${dateTime}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/ExpandBar.json b/snippets/eclipse/ExpandBar.json
index d18b0a4..3b015b3 100644
--- a/snippets/eclipse/ExpandBar.json
+++ b/snippets/eclipse/ExpandBar.json
@@ -3,5 +3,8 @@
"name": "ExpandBar",
"description": "new ExpandBar",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/ExpandBar"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.ExpandBar)} ${bar:newName(org.eclipse.swt.widgets.ExpandBar)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.V_SCROLL, SWT.NONE)});\n${bar}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/ExpandItem.json b/snippets/eclipse/ExpandItem.json
index 8b650cd..1197856 100644
--- a/snippets/eclipse/ExpandItem.json
+++ b/snippets/eclipse/ExpandItem.json
@@ -3,5 +3,9 @@
"name": "ExpandItem",
"description": "new ExpandItem for an ExpandBar",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/ExpandItem",
+ "Lorg/eclipse/swt/widgets/ExpandBar"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.ExpandItem)} ${item:newName(org.eclipse.swt.widgets.ExpandItem)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.ExpandBar)}, SWT.NONE);\n${item}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}\n\n${item}.setControl(${control});\n${item}.setHeight(${control}.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);"
} \ No newline at end of file
diff --git a/snippets/eclipse/GridData.json b/snippets/eclipse/GridData.json
index 68d630a..9b0039d 100644
--- a/snippets/eclipse/GridData.json
+++ b/snippets/eclipse/GridData.json
@@ -3,5 +3,8 @@
"name": "GridData",
"description": "new GridData for a Control",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/layout/GridData"
+ ],
"code": "${gridData:newType(org.eclipse.swt.layout.GridData)} ${layoutData:newName(org.eclipse.swt.layout.GridData)} \u003d new ${gridData}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(false, true)});\n${layoutData}.widthHint\u003d ${width:link(SWT.DEFAULT)};\n${layoutData}.heightHint\u003d ${height:link(SWT.DEFAULT)};\n${parent:var(org.eclipse.swt.widgets.Control)}.setLayoutData(${layoutData});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/GridLayout.json b/snippets/eclipse/GridLayout.json
index 3d450c9..fc17820 100644
--- a/snippets/eclipse/GridLayout.json
+++ b/snippets/eclipse/GridLayout.json
@@ -3,5 +3,8 @@
"name": "GridLayout",
"description": "new GridLayout for a Composites",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/layout/GridLayout"
+ ],
"code": "${gridLayout:newType(org.eclipse.swt.layout.GridLayout)} ${layout:newName(org.eclipse.swt.layout.GridLayout)} \u003d new ${gridLayout}(${columns:link(1, 2, 3, 4, 5)}, ${width:link(false, true)});\n${layout}.marginWidth \u003d ${marginW:link(5, 0)};\n${layout}.marginHeight \u003d ${marginH:link(5, 0)};\n${layout}.verticalSpacing \u003d ${vSpacing:link(0, 5)};\n${layout}.horizontalSpacing \u003d ${hSpacing:link(0, 5)};\n${parent:var(org.eclipse.swt.widgets.Composite)}.setLayout(${layout});\n${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Group.json b/snippets/eclipse/Group.json
index 3958aeb..ff3b091 100644
--- a/snippets/eclipse/Group.json
+++ b/snippets/eclipse/Group.json
@@ -3,5 +3,8 @@
"name": "Group",
"description": "new Group with GridLayout",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Group"
+ ],
"code": "${groupType:newType(org.eclipse.swt.widgets.Group)} ${group:newName(org.eclipse.swt.widgets.Group)}\u003d new ${groupType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.NONE, SWT.SHADOW_ETCHED_IN, SWT.SHADOW_ETCHED_OUT, SWT.SHADOW_IN, SWT.SHADOW_OUT, SWT.SHADOW_NONE)});\n${group}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(false, true)}));\n${group}.setLayout(new ${layoutType:newType(org.eclipse.swt.layout.GridLayout)}(${numberColumns:link(1, 2, 3, 4, 5)}, ${equalColumns:link(false, true)}));\n${group}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Label.json b/snippets/eclipse/Label.json
index 0ec11ab..cac1b49 100644
--- a/snippets/eclipse/Label.json
+++ b/snippets/eclipse/Label.json
@@ -3,5 +3,8 @@
"name": "Label",
"description": "new Label",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Label"
+ ],
"code": "${labelType:newType(org.eclipse.swt.widgets.Label)} ${label:newName(org.eclipse.swt.widgets.Label)}\u003d new ${labelType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.NONE, SWT.WRAP, \u0027SWT.SEPARATOR | SWT.HORIZONTAL\u0027, \u0027SWT.SEPARATOR | SWT.VERTICAL\u0027)});\n${label}.setLayoutData(new ${type:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(BEGINNING, CENTER, END, FILL)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(false, true)}, ${vex:link(false, true)}));\n${label}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Link.json b/snippets/eclipse/Link.json
index 542b507..e345c1c 100644
--- a/snippets/eclipse/Link.json
+++ b/snippets/eclipse/Link.json
@@ -3,5 +3,9 @@
"name": "Link",
"description": "new Link",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Link",
+ "Lorg/eclipse/swt/widgets/Listener"
+ ],
"code": "${linkType:newType(org.eclipse.swt.widgets.Link)} ${link:newName(org.eclipse.swt.widgets.Link)}\u003d new ${linkType}(${parent:var(org.eclipse.swt.widgets.Composite)}, SWT.NONE);\n${link}.setLayoutData(new ${type:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(BEGINNING, CENTER, END, FILL)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(false, true)}, ${vex:link(false, true)}));\n${link}.setText(${word_selection}${});\n${link}.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t${listener:link(\u0027\u0027)}\n\t\t\t}\n\t\t});\n${imp:import(org.eclipse.swt.SWT, org.eclipse.swt.events.SelectionAdapter, org.eclipse.swt.events.SelectionEvent)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/List.json b/snippets/eclipse/List.json
index 978f7ef..70144fd 100644
--- a/snippets/eclipse/List.json
+++ b/snippets/eclipse/List.json
@@ -3,5 +3,8 @@
"name": "List",
"description": "new List",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/List"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.List)} ${list:newName(org.eclipse.swt.widgets.List)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(\u0027SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL\u0027, \u0027SWT.MULTI | SWT.V_SCROLL\u0027, SWT.MULTI, \u0027SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL\u0027, \u0027SWT.SINGLE | SWT.V_SCROLL\u0027, SWT.SINGLE)});\n${list}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${list}.setItems(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/SashForm.json b/snippets/eclipse/SashForm.json
index ee0ed24..bb0b64b 100644
--- a/snippets/eclipse/SashForm.json
+++ b/snippets/eclipse/SashForm.json
@@ -3,5 +3,8 @@
"name": "SashForm",
"description": "new SashForm",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/custom/SashForm"
+ ],
"code": "${type:newType(org.eclipse.swt.custom.SashForm)} ${sash:newName(org.eclipse.swt.custom.SashForm)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.HORIZONTAL, SWT.VERTICAL)});\n${sash}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${imp:import(org.eclipse.swt.SWT)}${cursor}\n\n${sash}.setWeights(new int[] {1, 1});"
} \ No newline at end of file
diff --git a/snippets/eclipse/Scale.json b/snippets/eclipse/Scale.json
index 7cdfa1e..75da8f1 100644
--- a/snippets/eclipse/Scale.json
+++ b/snippets/eclipse/Scale.json
@@ -3,5 +3,8 @@
"name": "Scale",
"description": "new Scale",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Scale"
+ ],
"code": "${scaleType:newType(org.eclipse.swt.widgets.Scale)} ${scale:newName(org.eclipse.swt.widgets.Scale)}\u003d new ${scaleType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.HORIZONTAL, SWT.VERTICAL)});\n${scale}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(BEGINNING, FILL, CENTER, END)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(false, true)}, ${vex:link(false, true)}));\n${scale}.setMaximum(${max:link(100)});\n${scale}.setIncrement(${inc:link(5)});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/ScrolledComposite.json b/snippets/eclipse/ScrolledComposite.json
index 150b1ac..8c9df90 100644
--- a/snippets/eclipse/ScrolledComposite.json
+++ b/snippets/eclipse/ScrolledComposite.json
@@ -3,5 +3,9 @@
"name": "ScrolledComposite",
"description": "new ScrolledComposite",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/ScrolledComposite",
+ "Lorg/eclipse/swt/widgets/Composite"
+ ],
"code": "${compositeType:newType(org.eclipse.swt.custom.ScrolledComposite)} ${scrolled:newName(org.eclipse.swt.custom.ScrolledComposite)} \u003d new ${compositeType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(\u0027SWT.H_SCROLL | SWT.V_SCROLL\u0027, SWT.H_SCROLL, SWT.V_SCROLL)});\n${scrolled}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${scrolled}.setExpandVertical(${exV:link(false, true)});\n${scrolled}.setExpandHorizontal(${exH:link(false, true)});\n${imp:import(org.eclipse.swt.SWT)}${cursor}\n\n${scrolled}.setContent(${content});\nPoint ${contentSize:newName(org.eclipse.swt.graphics.Point)} \u003d ${content}.computeSize(SWT.DEFAULT, SWT.DEFAULT);\n${content}.setSize(${contentSize});\n${scrolled}.setMinSize(${contentSize});"
} \ No newline at end of file
diff --git a/snippets/eclipse/Shell.json b/snippets/eclipse/Shell.json
index faf7f01..ff914c2 100644
--- a/snippets/eclipse/Shell.json
+++ b/snippets/eclipse/Shell.json
@@ -3,5 +3,8 @@
"name": "Shell",
"description": "new Shell",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Shell"
+ ],
"code": "${shellType:newType(org.eclipse.swt.widgets.Shell)} ${shell:newName(org.eclipse.swt.widgets.Shell)} \u003d new ${shellType}(${parent:var(org.eclipse.swt.widgets.Shell)}, ${style:link(\u0027SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL\u0027, \u0027SWT.DIALOG_TRIM | SWT.MODELESS\u0027, \u0027SWT.SHELL_TRIM | SWT.MODELESS\u0027, \u0027SWT.SHELL_TRIM | SWT.PRIMARY_MODAL\u0027)});\n${shell}.setLayout(new ${layoutType:newType(org.eclipse.swt.layout.GridLayout)}(${numberColumns:link(1, 2, 3, 4, 5)}, ${equalColumns:link(false, true)}));\n\n${imp:import(org.eclipse.swt.SWT)}${cursor}\n\n${shell}.pack();\n\n${shell}.open();"
} \ No newline at end of file
diff --git a/snippets/eclipse/Spinner.json b/snippets/eclipse/Spinner.json
index d58abae..d78b85a 100644
--- a/snippets/eclipse/Spinner.json
+++ b/snippets/eclipse/Spinner.json
@@ -3,5 +3,8 @@
"name": "Spinner",
"description": "new Spinner",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Spinner"
+ ],
"code": "${spinnerType:newType(org.eclipse.swt.widgets.Spinner)} ${spinner:newName(org.eclipse.swt.widgets.Spinner)}\u003d new ${spinnerType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.BORDER, \u0027SWT.WRAP | SWT.BORDER\u0027, \u0027SWT.READ_ONLY | SWT.BORDER\u0027, \u0027SWT.READ_ONLY | SWT.WRAP | SWT.BORDER\u0027, SWT.WRAP, SWT.READ_ONLY)});\n${spinner}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(BEGINNING, CENTER, END, FILL)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(false, true)}, ${vex:link(false, true)}));\n${spinner}.setMaximum(${max:link(10)});\n${spinner}.setIncrement(${inc:link(1)});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/StyleRange.json b/snippets/eclipse/StyleRange.json
index 4706f37..3dd0e44 100644
--- a/snippets/eclipse/StyleRange.json
+++ b/snippets/eclipse/StyleRange.json
@@ -3,5 +3,9 @@
"name": "StyleRange",
"description": "new StyleRange for a StyledText",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/custom/StyleRange",
+ "Lorg/eclipse/swt/widgets/Display"
+ ],
"code": "${type:newType(org.eclipse.swt.custom.StyleRange)} ${range:newName(org.eclipse.swt.custom.StyleRange)}\u003d new ${type}();\n${range}.start\u003d ${start:link(0)};\n${range}.length\u003d ${length:link(0)};\n${range}.foreground\u003d ${fColor:link(null, \u0027Display.getDefault().getSystemColor(SWT.COLOR_BLACK)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_WHITE)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_RED)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_BLUE)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_GREEN)\u0027)};\n${range}.background\u003d ${bColor:link(null, \u0027Display.getDefault().getSystemColor(SWT.COLOR_BLACK)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_WHITE)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_RED)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_BLUE)\u0027, \u0027Display.getDefault().getSystemColor(SWT.COLOR_GREEN)\u0027)};\n${range}.fontStyle\u003d ${fStyle:link(SWT.NORMAL, SWT.ITALIC, SWT.BOLD)};\n${text:var(org.eclipse.swt.custom.StyledText)}.setStyleRange(${range});\n${imp:import(org.eclipse.swt.SWT, org.eclipse.swt.widgets.Display)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/StyledText.json b/snippets/eclipse/StyledText.json
index 8fd8d88..6ca74b2 100644
--- a/snippets/eclipse/StyledText.json
+++ b/snippets/eclipse/StyledText.json
@@ -3,5 +3,8 @@
"name": "StyledText",
"description": "new StyledText ",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/StyledText"
+ ],
"code": "${type:newType(org.eclipse.swt.custom.StyledText)} ${text:newName(org.eclipse.swt.custom.StyledText)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(\u0027SWT.V_SCROLL | SWT.H_SCROLL\u0027, \u0027SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY\u0027, \u0027SWT.WRAP | SWT.V_SCROLL\u0027, SWT.NONE, SWT.BORDER, SWT.FULL_SELECTION)});\n${text}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${text}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/TabFolder.json b/snippets/eclipse/TabFolder.json
index e1f93c0..a4251cf 100644
--- a/snippets/eclipse/TabFolder.json
+++ b/snippets/eclipse/TabFolder.json
@@ -3,5 +3,8 @@
"name": "TabFolder",
"description": "new TabFolder",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/TabFolder"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.TabFolder)} ${folder:newName(org.eclipse.swt.widgets.TabFolder)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.TOP, SWT.BOTTOM)});\n${folder}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/TabItem.json b/snippets/eclipse/TabItem.json
index a6a954a..e558f5c 100644
--- a/snippets/eclipse/TabItem.json
+++ b/snippets/eclipse/TabItem.json
@@ -3,5 +3,9 @@
"name": "TabItem",
"description": "new TabItem for a TabFolder",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/TabItem",
+ "Lorg/eclipse/swt/widgets/TabFolder"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.TabItem)} ${item:newName(org.eclipse.swt.widgets.TabItem)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.TabFolder)}, SWT.NONE);\n${item}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}\n\n${item}.setControl(${control});"
} \ No newline at end of file
diff --git a/snippets/eclipse/Table.json b/snippets/eclipse/Table.json
index 0c9498a..88a995b 100644
--- a/snippets/eclipse/Table.json
+++ b/snippets/eclipse/Table.json
@@ -3,5 +3,8 @@
"name": "Table",
"description": "new Table",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Table"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.Table)} ${table:newName(org.eclipse.swt.widgets.Table)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(\u0027SWT.SINGLE | SWT.FULL_SELECTION\u0027, \u0027SWT.MULTI | SWT.FULL_SELECTION\u0027, SWT.CHECK, SWT.NONE, SWT.VIRTUAL)});\n${table}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${table}.setLinesVisible(${line:link(true, false)});\n${table}.setHeaderVisible(${header:link(true, false)});\n${imp:import(org.eclipse.swt.SWT)}${cursor}\n\nfor (int ${index} \u003d 0; ${index} \u003c ${table}.getColumnCount(); ${index}++) {\n\t${table}.getColumn(${index}).pack();\n}"
} \ No newline at end of file
diff --git a/snippets/eclipse/TableColumn.json b/snippets/eclipse/TableColumn.json
index b401d03..bb00d12 100644
--- a/snippets/eclipse/TableColumn.json
+++ b/snippets/eclipse/TableColumn.json
@@ -3,5 +3,9 @@
"name": "TableColumn",
"description": "new TableColumn for a Table ",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/TableColumn",
+ "Lorg/eclipse/swt/widgets/Table"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.TableColumn)} ${column:newName(org.eclipse.swt.widgets.TableColumn)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Table)}, ${style:link(SWT.LEAD, SWT.CENTER, SWT.TRAIL)});\n${column}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/TableItem.json b/snippets/eclipse/TableItem.json
index 4988641..e78c33b 100644
--- a/snippets/eclipse/TableItem.json
+++ b/snippets/eclipse/TableItem.json
@@ -3,5 +3,9 @@
"name": "TableItem",
"description": "new TableItem for a Table",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/TableItem",
+ "Lorg/eclipse/swt/widgets/Table"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.TableItem)} ${item:newName(org.eclipse.swt.widgets.TableItem)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Table)}, SWT.NONE);\n${item}.setText(${count:link(0, 1, 2, 3, 4, 5)}, ${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Text.json b/snippets/eclipse/Text.json
index ebd72d8..4032881 100644
--- a/snippets/eclipse/Text.json
+++ b/snippets/eclipse/Text.json
@@ -3,5 +3,8 @@
"name": "Text",
"description": "new Text",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Text"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.Text)} ${text:newName(org.eclipse.swt.widgets.Text)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(\u0027SWT.SINGLE | SWT.LEAD | SWT.BORDER\u0027, \u0027SWT.SINGLE | SWT.LEAD | SWT.READ_ONLY | SWT.BORDER\u0027, \u0027SWT.SINGLE | SWT.LEAD | SWT.PASSWORD | SWT.BORDER\u0027, \u0027SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER\u0027, \u0027SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER\u0027)});\n${text}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(true, false)}, ${vex:link(false, true)}));\n${text}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/ToolBar.json b/snippets/eclipse/ToolBar.json
index 29c6058..b73567d 100644
--- a/snippets/eclipse/ToolBar.json
+++ b/snippets/eclipse/ToolBar.json
@@ -3,5 +3,8 @@
"name": "ToolBar",
"description": "new ToolBar",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/ToolBar"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.ToolBar)} ${bar:newName(org.eclipse.swt.widgets.ToolBar)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.FLAT, SWT.WRAP, SWT.RIGHT, SWT.HORIZONTAL, SWT.VERTICAL, SWT.SHADOW_OUT)});\n${bar}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/ToolItem.json b/snippets/eclipse/ToolItem.json
index 84b3baa..4a54edd 100644
--- a/snippets/eclipse/ToolItem.json
+++ b/snippets/eclipse/ToolItem.json
@@ -3,5 +3,9 @@
"name": "ToolItem",
"description": "new ToolItem for a ToolBar",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/ToolItem",
+ "Lorg/eclipse/swt/widgets/ToolBar"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.ToolItem)} ${item:newName(org.eclipse.swt.widgets.ToolItem)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.ToolBar)}, ${style:link(SWT.PUSH, SWT.CHECK, SWT.RADIO, SWT.SEPARATOR, SWT.DROP_DOWN)});\n${item}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/Tree.json b/snippets/eclipse/Tree.json
index 36cf0ba..5c95b08 100644
--- a/snippets/eclipse/Tree.json
+++ b/snippets/eclipse/Tree.json
@@ -3,5 +3,8 @@
"name": "Tree",
"description": "new Tree",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Tree"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.Tree)} ${tree:newName(org.eclipse.swt.widgets.Tree)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(\u0027SWT.SINGLE | SWT.FULL_SELECTION\u0027, \u0027SWT.MULTI | SWT.FULL_SELECTION\u0027, SWT.CHECK, SWT.NONE, SWT.VIRTUAL)});\n${tree}.setLayoutData(new ${gridDataType:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(FILL, BEGINNING, CENTER, END)}, SWT.${vertical:link(FILL, TOP, CENTER, BOTTOM)}, ${hex:link(true, false)}, ${vex:link(true, false)}));\n${tree}.setLinesVisible(${line:link(true, false)});\n${tree}.setHeaderVisible(${header:link(true, false)});\n${imp:import(org.eclipse.swt.SWT)}${cursor}\n\nfor (int ${index} \u003d 0; ${index} \u003c ${tree}.getColumnCount(); ${index}++) {\n\t${tree}.getColumn(${index}).pack();\n}"
} \ No newline at end of file
diff --git a/snippets/eclipse/TreeColumn.json b/snippets/eclipse/TreeColumn.json
index d170b70..acbf12d 100644
--- a/snippets/eclipse/TreeColumn.json
+++ b/snippets/eclipse/TreeColumn.json
@@ -3,5 +3,9 @@
"name": "TreeColumn",
"description": "new TreeColumn for a Tree ",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/TreeColumn",
+ "Lorg/eclipse/swt/widgets/Tree"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.TreeColumn)} ${column:newName(org.eclipse.swt.widgets.TreeColumn)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Tree)}, ${style:link(SWT.LEAD, SWT.CENTER, SWT.TRAIL)});\n${column}.setText(${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/TreeItem.json b/snippets/eclipse/TreeItem.json
index 527f56c..6c2d192 100644
--- a/snippets/eclipse/TreeItem.json
+++ b/snippets/eclipse/TreeItem.json
@@ -3,5 +3,9 @@
"name": "TreeItem",
"description": "new TreeItem for a Tree",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/TreeItem",
+ "Lorg/eclipse/swt/widgets/Tree"
+ ],
"code": "${type:newType(org.eclipse.swt.widgets.TreeItem)} ${item:newName(org.eclipse.swt.widgets.TreeItem)}\u003d new ${type}(${parent:var(org.eclipse.swt.widgets.Tree, org.eclipse.swt.widgets.TreeItem)}, SWT.NONE);\n${item}.setText(${count:link(0, 1, 2, 3, 4, 5)}, ${word_selection}${});\n${imp:import(org.eclipse.swt.SWT)}${cursor}"
} \ No newline at end of file
diff --git a/snippets/eclipse/addlistener.json b/snippets/eclipse/addlistener.json
index ca64955..cd8c197 100644
--- a/snippets/eclipse/addlistener.json
+++ b/snippets/eclipse/addlistener.json
@@ -3,5 +3,9 @@
"name": "addlistener",
"description": "add a listener to a Widget ",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Event",
+ "Lorg/eclipse/swt/widgets/Listener"
+ ],
"code": "${control:var(org.eclipse.swt.widgets.Widget)}.addListener(${type:link(\n\tSWT.Activate,\n\tSWT.Arm,\n\tSWT.Close,\n\tSWT.Collapse,\n\tSWT.Deactivate,\n\tSWT.DefaultSelection,\n\tSWT.Deiconify,\n\tSWT.Dispose,\n\tSWT.DragDetect,\n\tSWT.EraseItem,\n\tSWT.Expand,\n\tSWT.FocusIn,\n\tSWT.FocusOut,\n\tSWT.HardKeyDown,\n\tSWT.HardKeyUp,\n\tSWT.Help,\n\tSWT.Hide,\n\tSWT.Iconify,\n\tSWT.ImeComposition,\n\tSWT.KeyDown,\n\tSWT.KeyUp,\n\tSWT.MeasureItem,\n\tSWT.MenuDetect,\n\tSWT.Modify,\n\tSWT.MouseDoubleClick,\n\tSWT.MouseDown,\n\tSWT.MouseEnter,\n\tSWT.MouseExit,\n\tSWT.MouseHover,\n\tSWT.MouseMove,\n\tSWT.MouseUp,\n\tSWT.MouseWheel,\n\tSWT.Move,\n\tSWT.Paint,\n\tSWT.PaintItem,\n\tSWT.Resize,\n\tSWT.Selection,\n\tSWT.SetData,\n\tSWT.Settings,\n\tSWT.Show,\n\tSWT.Traverse,\n\tSWT.Verify)}, new ${listener:newType(org.eclipse.swt.widgets.Listener)}(){\n\tpublic void handleEvent(${event:newType(org.eclipse.swt.widgets.Event)} e) {\n\t\t${imp:import(org.eclipse.swt.SWT)}${cursor}\t\t\t\t\n\t}\n});"
} \ No newline at end of file
diff --git a/snippets/eclipse/execute.json b/snippets/eclipse/execute.json
index 34d192b..31c92f2 100644
--- a/snippets/eclipse/execute.json
+++ b/snippets/eclipse/execute.json
@@ -3,5 +3,9 @@
"name": "execute",
"description": "execute a runnable in the UI thread",
"aliases": [],
+ "types": [
+ "Lorg/eclipse/swt/widgets/Display",
+ "Ljava/lang/Runnable"
+ ],
"code": "${display:var(org.eclipse.swt.widgets.Display)}.${kind:link(syncExec, asyncExec)}(new ${runnable:newType(java.lang.Runnable)}(){\n\tpublic void run(){\n\t\t${cursor}\n\t}\n});"
} \ No newline at end of file
diff --git a/snippets/eclipse/runnable.json b/snippets/eclipse/runnable.json
index 6044150..79c4095 100644
--- a/snippets/eclipse/runnable.json
+++ b/snippets/eclipse/runnable.json
@@ -3,5 +3,8 @@
"name": "runnable",
"description": "runnable",
"aliases": [],
+ "types": [
+ "Ljava/lang/Runnable"
+ ],
"code": "new Runnable() {\n\tpublic void run() {\n\t\t${line_selection}\n\t}\n}"
} \ No newline at end of file
diff --git a/snippets/eclipse/test.json b/snippets/eclipse/test.json
index 1c5897f..ded718c 100644
--- a/snippets/eclipse/test.json
+++ b/snippets/eclipse/test.json
@@ -3,5 +3,8 @@
"name": "test",
"description": "test method (JUnit 4)",
"aliases": [],
+ "types": [
+ "Lorg/junit/Test"
+ ],
"code": "@${testType:newType(org.junit.Test)}\npublic void ${testName}() throws Exception {\n\t${staticImport:importStatic(\u0027org.junit.Assert.*\u0027)}${cursor}\n}"
} \ No newline at end of file
diff --git a/snippets/eclipse/toarray.json b/snippets/eclipse/toarray.json
index 0e7e45a..b8bf7f5 100644
--- a/snippets/eclipse/toarray.json
+++ b/snippets/eclipse/toarray.json
@@ -3,5 +3,8 @@
"name": "toarray",
"description": "convert collection to array",
"aliases": [],
+ "types": [
+ "Ljava/util/Collection"
+ ],
"code": "(${type:elemType(collection)}[]) ${collection}.toArray(new ${type}[${collection}.size()])"
} \ No newline at end of file
diff --git a/snippets/eclipse/while.json b/snippets/eclipse/while.json
index 492300c..d5551bf 100644
--- a/snippets/eclipse/while.json
+++ b/snippets/eclipse/while.json
@@ -3,5 +3,8 @@
"name": "while",
"description": "iterate with enumeration",
"aliases": [],
+ "types": [
+ "Ljava/util/Enumeration"
+ ],
"code": "while (${en:var(java.util.Enumeration)}.hasMoreElements()) {\n\t${type:argType(en)} ${elem:newName(type)} \u003d (${type}) ${en}.nextElement();\n\t${cursor}\n}"
} \ No newline at end of file
diff --git a/snippets/selected/File-2.json b/snippets/selected/File-2.json
index 24fd1cd..c8a4285 100644
--- a/snippets/selected/File-2.json
+++ b/snippets/selected/File-2.json
@@ -3,5 +3,8 @@
"name": "File-2",
"description": "new File createNewFile deleteOnExit",
"aliases": [],
+ "types": [
+ "Ljava/io/File"
+ ],
"code": "${fileType:newType(java.io.File)} ${file:newName(java.io.File)} \u003d new ${fileType}(${file1:var(java.io.File)}, ${string:var(java.lang.String)});\n// ${todo} Adjust condition\nif (${file}.createNewFile()) { \n// Do something\n}${file}.deleteOnExit();"
} \ No newline at end of file
diff --git a/snippets/selected/SimpleDateFormat-1.json b/snippets/selected/SimpleDateFormat-1.json
index 608c6d4..2ff14e7 100644
--- a/snippets/selected/SimpleDateFormat-1.json
+++ b/snippets/selected/SimpleDateFormat-1.json
@@ -3,5 +3,9 @@
"name": "SimpleDateFormat-1",
"description": "new SimpleDateFormat parse format",
"aliases": [],
+ "types": [
+ "Ljava/text/SimpleDateFormat",
+ "Ljava/util/Date"
+ ],
"code": "${simpledateformatType:newType(java.text.SimpleDateFormat)} ${simpledateformat:newName(java.text.SimpleDateFormat)} \u003d new ${simpledateformatType}(${string:var(java.lang.String)});${parseType:newType(java.util.Date)} ${parse:newName(java.util.Date)} \u003d ${simpledateformat}.parse(${string1:var(java.lang.String)});${formatType:newType(java.lang.String)} ${format:newName(java.lang.String)} \u003d ${simpledateformat}.format(${date:var(java.util.Date)});"
} \ No newline at end of file
diff --git a/snippets/selected/StringTokenizer-8.json b/snippets/selected/StringTokenizer-8.json
index d23595b..e3f21f2 100644
--- a/snippets/selected/StringTokenizer-8.json
+++ b/snippets/selected/StringTokenizer-8.json
@@ -3,5 +3,9 @@
"name": "StringTokenizer-8",
"description": "new StringTokenizer hasMoreTokens nextToken",
"aliases": [],
+ "types": [
+ "Ljava/util/StringTokenizer",
+ "Ljava/lang/String"
+ ],
"code": "${stringtokenizerType:newType(java.util.StringTokenizer)} ${stringtokenizer:newName(java.util.StringTokenizer)} \u003d new ${stringtokenizerType}(${string:var(java.lang.String)}, ${string1:var(java.lang.String)});\n// ${todo} Adjust condition\nif (${stringtokenizer}.hasMoreTokens()) { \n// Do something\n}${nexttokenType:newType(java.lang.String)} ${nexttoken:newName(java.lang.String)} \u003d ${stringtokenizer}.nextToken();"
} \ No newline at end of file

Back to the top