Révision 3881
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/test/DrawTSSVG.java (revision 3881) | ||
---|---|---|
12 | 12 |
|
13 | 13 |
public class DrawTSSVG { |
14 | 14 |
|
15 |
String userhome = System.getProperty("user.home"); |
|
16 |
File configdir = new File(userhome,"TXM/corpora/graal/tiger/tigersearch.logprop"); |
|
17 |
File registrydir = new File(userhome, "TXM/corpora/graal/tiger"); |
|
18 |
File svgfile = new File(registrydir, "result.svg"); |
|
19 |
String id = "GRAAL"; |
|
20 |
String query = "#n:[cat = \"Obj\"] >* #m & arity(#n, 2, 10)"; |
|
15 |
String userhome = System.getProperty("user.home"); //$NON-NLS-1$
|
|
16 |
File configdir = new File(userhome,"TXM/corpora/graal/tiger/tigersearch.logprop"); //$NON-NLS-1$
|
|
17 |
File registrydir = new File(userhome, "TXM/corpora/graal/tiger"); //$NON-NLS-1$
|
|
18 |
File svgfile = new File(registrydir, "result.svg"); //$NON-NLS-1$
|
|
19 |
String id = "GRAAL"; //$NON-NLS-1$
|
|
20 |
String query = "#n:[cat = \"Obj\"] >* #m & arity(#n, 2, 10)"; //$NON-NLS-1$
|
|
21 | 21 |
//String query = "[]"; |
22 | 22 |
|
23 | 23 |
public void test() throws Exception { |
... | ... | |
33 | 33 |
|
34 | 34 |
TSResult result = corpus.query(query); |
35 | 35 |
|
36 |
result.setDisplayProperties(new ArrayList<>(Arrays.asList("word", "pos", "form")), "type"); |
|
36 |
result.setDisplayProperties(new ArrayList<>(Arrays.asList("word", "pos", "form")), "type"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
37 | 37 |
|
38 | 38 |
TSMatch first = result.getFirst(); |
39 |
System.out.println("First: nb of sub graph: "+first.getNumberOfSubGraph()); |
|
39 |
System.out.println("First: nb of sub graph: "+first.getNumberOfSubGraph()); //$NON-NLS-1$
|
|
40 | 40 |
first.firstSubGraph(); |
41 |
first.toSVGFile(new File(registrydir,"result_1_1.svg")); |
|
42 |
System.out.println(first.toHTML() + "<br>"); |
|
41 |
first.toSVGFile(new File(registrydir,"result_1_1.svg")); //$NON-NLS-1$
|
|
42 |
System.out.println(first.toHTML() + "<br>"); //$NON-NLS-1$
|
|
43 | 43 |
first.nextSubGraph(); |
44 |
first.toSVGFile(new File(registrydir,"result_1_2.svg")); |
|
45 |
System.out.println(first.toHTML() + "<br>"); |
|
44 |
first.toSVGFile(new File(registrydir,"result_1_2.svg")); //$NON-NLS-1$
|
|
45 |
System.out.println(first.toHTML() + "<br>"); //$NON-NLS-1$
|
|
46 | 46 |
first.nextSubGraph(); |
47 |
first.toSVGFile(new File(registrydir,"result_1_3.svg")); |
|
48 |
System.out.println(first.toHTML() + "<br>"); |
|
47 |
first.toSVGFile(new File(registrydir,"result_1_3.svg")); //$NON-NLS-1$
|
|
48 |
System.out.println(first.toHTML() + "<br>"); //$NON-NLS-1$
|
|
49 | 49 |
|
50 | 50 |
// TSMatch next = result.getNext(); |
51 | 51 |
// System.out.println( "Next: nb of sub graph: "+next.getNumberOfSubGraph()); |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/IndexExtension.java (revision 3881) | ||
---|---|---|
12 | 12 |
|
13 | 13 |
@Override |
14 | 14 |
public String getName() { |
15 |
return "TIGERSearch"; |
|
15 |
return "TIGERSearch"; //$NON-NLS-1$
|
|
16 | 16 |
} |
17 | 17 |
|
18 | 18 |
@Override |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERImportSectionConfigurator.java (revision 3881) | ||
---|---|---|
10 | 10 |
@Override |
11 | 11 |
public void installSections() { |
12 | 12 |
|
13 |
ImportModuleCustomization.addAdditionalSections("tigersearch", TIGERSection.class); |
|
13 |
ImportModuleCustomization.addAdditionalSections("tigersearch", TIGERSection.class); //$NON-NLS-1$
|
|
14 | 14 |
} |
15 | 15 |
} |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERSection.java (revision 3881) | ||
---|---|---|
31 | 31 |
*/ |
32 | 32 |
public TIGERSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
33 | 33 |
|
34 |
super(editor, toolkit2, form2, parent, style, "TIGERSearch"); |
|
34 |
super(editor, toolkit2, form2, parent, style, "TIGERSearch"); //$NON-NLS-1$
|
|
35 | 35 |
|
36 | 36 |
TableWrapLayout layout = new TableWrapLayout(); |
37 | 37 |
layout.makeColumnsEqualWidth = true; |
... | ... | |
72 | 72 |
if (this.section.isDisposed()) return; |
73 | 73 |
if (project == null) return; |
74 | 74 |
|
75 |
Preferences customNode = project.getImportParameters().node("tigersearch"); |
|
75 |
Preferences customNode = project.getImportParameters().node("tigersearch"); //$NON-NLS-1$
|
|
76 | 76 |
// createPagesForSectionsButton.setSelection(customNode.getBoolean("create_section_pages", true)); //$NON-NLS-1$ |
77 | 77 |
// indexTranscriberMetadataButton.setSelection(customNode.getBoolean("ignoreTranscriberMetadata", true)); //$NON-NLS-1$ |
78 | 78 |
} |
... | ... | |
81 | 81 |
public boolean saveFields(Project project) { |
82 | 82 |
if (this.section != null && !this.section.isDisposed()) { |
83 | 83 |
|
84 |
Preferences customNode = project.getImportParameters().node("tigersearch"); |
|
84 |
Preferences customNode = project.getImportParameters().node("tigersearch"); //$NON-NLS-1$
|
|
85 | 85 |
// customNode.putBoolean("create_section_pages", createPagesForSectionsButton.getSelection()); //$NON-NLS-1$ |
86 | 86 |
// customNode.putBoolean("ignoreTranscriberMetadata", indexTranscriberMetadataButton.getSelection()); //$NON-NLS-1$ |
87 | 87 |
} |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/InstallGroovyTIGERFiles.java (revision 3881) | ||
---|---|---|
22 | 22 |
for (String folder : createfolders) { |
23 | 23 |
new File(txmhomedir, folder).mkdirs(); |
24 | 24 |
} |
25 |
File scriptsDirectory = new File(txmhomedir, "scripts/groovy"); |
|
26 |
File userDirectory = new File(scriptsDirectory, "user"); |
|
27 |
File systemDirectory = new File(scriptsDirectory, "system"); |
|
25 |
File scriptsDirectory = new File(txmhomedir, "scripts/groovy"); //$NON-NLS-1$
|
|
26 |
File userDirectory = new File(scriptsDirectory, "user"); //$NON-NLS-1$
|
|
27 |
File systemDirectory = new File(scriptsDirectory, "system"); //$NON-NLS-1$
|
|
28 | 28 |
|
29 |
String bundle_id = "org.txm.tigersearch.rcp"; |
|
29 |
String bundle_id = "org.txm.tigersearch.rcp"; //$NON-NLS-1$
|
|
30 | 30 |
|
31 | 31 |
// IMPORT MODULE SCRIPTS |
32 | 32 |
|
33 |
File scriptsPackageDirectory = new File(userDirectory, "org/txm/scripts/importer"); |
|
34 |
File scriptsPackageDirectory2 = new File(systemDirectory, "org/txm/scripts/importer"); |
|
33 |
File scriptsPackageDirectory = new File(userDirectory, "org/txm/scripts/importer"); //$NON-NLS-1$
|
|
34 |
File scriptsPackageDirectory2 = new File(systemDirectory, "org/txm/scripts/importer"); //$NON-NLS-1$
|
|
35 | 35 |
|
36 |
File tigerDirectory = new File(scriptsPackageDirectory, "tigersearch"); |
|
36 |
File tigerDirectory = new File(scriptsPackageDirectory, "tigersearch"); //$NON-NLS-1$
|
|
37 | 37 |
if (tigerDirectory.exists()) { |
38 |
File backDirectory = new File(tigerDirectory.getParentFile(), "tigersearch-"+Toolbox.dateformat.format(Calendar.getInstance().getTime())); |
|
38 |
File backDirectory = new File(tigerDirectory.getParentFile(), "tigersearch-"+Toolbox.dateformat.format(Calendar.getInstance().getTime())); //$NON-NLS-1$
|
|
39 | 39 |
//System.out.println("Making a copy of previous TIGER import scripts directory: "+tigerDirectory+" to "+backDirectory); |
40 | 40 |
tigerDirectory.renameTo(backDirectory); |
41 | 41 |
DeleteDir.deleteDirectory(tigerDirectory); |
... | ... | |
43 | 43 |
|
44 | 44 |
scriptsPackageDirectory.mkdirs(); |
45 | 45 |
scriptsPackageDirectory2.mkdirs(); |
46 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory, true); |
|
47 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory2, true); |
|
46 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
47 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory2, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
48 | 48 |
|
49 | 49 |
// MACROS |
50 |
File macrosPackageDirectory = new File(userDirectory, "org/txm/macro/tiger"); |
|
51 |
File macrosPackageDirectory2 = new File(systemDirectory, "org/txm/macro/tiger"); |
|
50 |
File macrosPackageDirectory = new File(userDirectory, "org/txm/macro/tiger"); //$NON-NLS-1$
|
|
51 |
File macrosPackageDirectory2 = new File(systemDirectory, "org/txm/macro/tiger"); //$NON-NLS-1$
|
|
52 | 52 |
|
53 | 53 |
if (macrosPackageDirectory.exists()) { |
54 | 54 |
// File backDirectory = new File(scriptsPackageDirectory.getParentFile(), "tiger-"+Toolbox.dateformat.format(Calendar.getInstance().getTime())); |
... | ... | |
62 | 62 |
|
63 | 63 |
macrosPackageDirectory.mkdirs(); |
64 | 64 |
macrosPackageDirectory2.mkdirs(); |
65 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", macrosPackageDirectory, true); |
|
66 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", macrosPackageDirectory2, true); |
|
65 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", macrosPackageDirectory, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
66 |
BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", macrosPackageDirectory2, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
67 | 67 |
|
68 | 68 |
return macrosPackageDirectory.exists(); |
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
@Override |
72 | 72 |
public String getName() { |
73 |
return "TIGERSearch (org.txm.tigersearch.rcp)"; |
|
73 |
return "TIGERSearch (org.txm.tigersearch.rcp)"; //$NON-NLS-1$
|
|
74 | 74 |
} |
75 | 75 |
|
76 | 76 |
@Override |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/TSMacrosMenuContribution.java (revision 3881) | ||
---|---|---|
12 | 12 |
String w = Toolbox.getTxmHomePath(); |
13 | 13 |
if (w == null || w.length() == 0) return null; |
14 | 14 |
|
15 |
return new File(w, "scripts/groovy/user/org/txm/macro/tiger"); |
|
15 |
return new File(w, "scripts/groovy/user/org/txm/macro/tiger"); //$NON-NLS-1$
|
|
16 | 16 |
} |
17 | 17 |
} |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/preferences/TigerSearchPreferencePage.java (revision 3881) | ||
---|---|---|
34 | 34 |
|
35 | 35 |
this.setPreferenceStore(new TXMPreferenceStore(TigerSearchPreferences.getInstance().getPreferencesNodeQualifier())); |
36 | 36 |
|
37 |
this.setImageDescriptor(IImageKeys.getImageDescriptor(this.getClass(), "icons/functions/TS.png")); |
|
37 |
this.setImageDescriptor(IImageKeys.getImageDescriptor(this.getClass(), "icons/functions/TS.png")); //$NON-NLS-1$
|
|
38 | 38 |
} |
39 | 39 |
} |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/preferences/TigerSearchTreePreferencePage.java (revision 3881) | ||
---|---|---|
36 | 36 |
public void init(IWorkbench workbench) { |
37 | 37 |
|
38 | 38 |
this.setPreferenceStore(new TXMPreferenceStore(TigerSearchTreePreferences.getInstance().getPreferencesNodeQualifier())); |
39 |
this.setImageDescriptor(IImageKeys.getImageDescriptor(this.getClass(), "icons/functions/TS.png")); |
|
39 |
this.setImageDescriptor(IImageKeys.getImageDescriptor(this.getClass(), "icons/functions/TS.png")); //$NON-NLS-1$
|
|
40 | 40 |
} |
41 | 41 |
} |
Formats disponibles : Unified diff