Révision 353
tmp/org.txm.chartsengine.r.rcp/plugin.xml (revision 353) | ||
---|---|---|
4 | 4 |
<extension |
5 | 5 |
point="org.eclipse.ui.preferencePages"> |
6 | 6 |
<page |
7 |
category="org.txm.rcp.chartsengine.core.preferences.ChartsEnginePreferencePage"
|
|
7 |
category="ChartsEnginePreferencePage" |
|
8 | 8 |
class="org.txm.rcp.chartsengine.r.preferences.RChartsEnginePreferencePage" |
9 |
id="org.txm.rcp.chartsengine.r.preferences.RChartsEnginePreferencePage"
|
|
9 |
id="RChartsEnginePreferencePage" |
|
10 | 10 |
name="R"> |
11 | 11 |
</page> |
12 | 12 |
</extension> |
tmp/org.txm.chartsengine.jfreechart.rcp/plugin.xml (revision 353) | ||
---|---|---|
12 | 12 |
<extension |
13 | 13 |
point="org.eclipse.ui.preferencePages"> |
14 | 14 |
<page |
15 |
category="org.txm.rcp.chartsengine.core.preferences.ChartsEnginePreferencePage"
|
|
15 |
category="ChartsEnginePreferencePage" |
|
16 | 16 |
class="org.txm.chartsengine.jfreechart.rcp.preferences.JFCChartsEnginePreferencePage" |
17 |
id="org.txm.rcp.chartsengine.jfreechart.preferences.JFCChartsEnginePreferencePage"
|
|
17 |
id="JFCChartsEnginePreferencePage" |
|
18 | 18 |
name="Java"> |
19 | 19 |
</page> |
20 | 20 |
</extension> |
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/preferences/ChartsEnginePreferencePage.java (revision 353) | ||
---|---|---|
71 | 71 |
|
72 | 72 |
this.chartsEngineComboField = new ComboFieldEditor(ChartsEnginePreferences.CURRENT_NAME, SWTComponentsProviderMessages.ChartsEnginePreferencePage_COMBO_FIELD_SELECT_ENGINE_LABEL, chartsEngines, this.getFieldEditorParent()); |
73 | 73 |
this.addField(this.chartsEngineComboField); |
74 |
|
|
75 | 74 |
|
76 |
// other shared preferences |
|
77 |
SWTChartsComponentsProvider.createChartsRenderingPreferencesFields(this, this.getFieldEditorParent()); |
|
78 | 75 |
|
79 |
// Monochrome color |
|
80 |
this.addField(new ColorFieldEditor(ChartsEnginePreferences.MONOCHROME_COLOR, SWTComponentsProviderMessages.ChartsEnginePreferencePage_RenderingMonochromeColor, this.getFieldEditorParent())); |
|
81 |
|
|
82 |
FontFieldEditor font = new FontFieldEditor(ChartsEnginePreferences.FONT, "Font", "Specificities / Spécificités / Специфичность", this.getFieldEditorParent()); |
|
83 |
this.addField(font); |
|
84 |
// FIXME: preview area tests |
|
85 |
//font.fillIntoGrid(this.getFieldEditorParent(), 4); |
|
86 |
//((Text)font.getPreviewControl()).setLayoutData(new GridData(GridData.FILL_BOTH)); |
|
87 |
//System.out.println("ChartsEnginePreferencePage.createFieldEditors() " + font.getPreviewControl()); |
|
88 |
|
|
89 |
|
|
90 | 76 |
// export formats |
91 | 77 |
ArrayList<String> supportedExportFormats = new ArrayList<String>(); |
92 | 78 |
supportedExportFormats.addAll(ChartsEngine.getCurrent().getSupportedOutputFileFormats()); |
... | ... | |
102 | 88 |
} |
103 | 89 |
|
104 | 90 |
this.addField(new ComboFieldEditor(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT, SWTComponentsProviderMessages.ChartsEnginePreferencePage_COMBO_FIELD_SELECT_EXPORT_FORMAT_LABEL, exportFormats, this.getFieldEditorParent())); |
91 |
|
|
92 |
|
|
93 |
// other shared preferences |
|
94 |
SWTChartsComponentsProvider.createChartsRenderingPreferencesFields(this, this.getFieldEditorParent()); |
|
95 |
|
|
96 |
// Monochrome color |
|
97 |
this.addField(new ColorFieldEditor(ChartsEnginePreferences.MONOCHROME_COLOR, SWTComponentsProviderMessages.ChartsEnginePreferencePage_RenderingMonochromeColor, this.getFieldEditorParent())); |
|
98 |
|
|
99 |
FontFieldEditor font = new FontFieldEditor(ChartsEnginePreferences.FONT, "Font", "Specificities / Spécificités / Специфичность", this.getFieldEditorParent()); |
|
100 |
this.addField(font); |
|
101 |
// FIXME: preview area tests |
|
102 |
//font.fillIntoGrid(this.getFieldEditorParent(), 4); |
|
103 |
//((Text)font.getPreviewControl()).setLayoutData(new GridData(GridData.FILL_BOTH)); |
|
104 |
//System.out.println("ChartsEnginePreferencePage.createFieldEditors() " + font.getPreviewControl()); |
|
105 |
|
|
106 |
|
|
105 | 107 |
} |
106 | 108 |
|
107 | 109 |
|
... | ... | |
145 | 147 |
ChartsEngine.getChartsEngines().get(i).getTheme().setMonochromeColor(TXMPreferences.getString(ChartsEnginePreferences.PREFERENCES_NODE, ChartsEnginePreferences.MONOCHROME_COLOR)); |
146 | 148 |
} |
147 | 149 |
|
150 |
// FIXME: doesn't work, works only when we quit the page and go back to it |
|
151 |
// Refreshes the page to recreate the default export format combo box |
|
152 |
// PlatformUI.getWorkbench().getPreferenceManager(). |
|
153 |
// find("org.txm.rcp.preferences.TextometriePreferencePage/org.txm.rcp.preferences.AdvancePreferencePage/ChartsEnginePreferencePage").createPage(); //$NON-NLS-1$ |
|
154 |
|
|
148 | 155 |
//FIXME: old code |
149 | 156 |
// Refresh the User\Export preference page to update "Default charts export file format" combo box |
150 | 157 |
// PlatformUI.getWorkbench().getPreferenceManager(). |
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java (revision 353) | ||
---|---|---|
50 | 50 |
import org.txm.chartsengine.rcp.swt.ChartEditorToolBar; |
51 | 51 |
import org.txm.core.results.ITXMResult; |
52 | 52 |
import org.txm.rcp.editors.SplitedGenericMultiPageEditor; |
53 |
import org.txm.rcp.editors.TXMEditorPart; |
|
53 | 54 |
import org.txm.rcp.preferences.TXMPreferencePage; |
54 | 55 |
import org.txm.utils.logger.Log; |
55 | 56 |
|
... | ... | |
658 | 659 |
// IWorkbenchWindow window = PlatformUI.getWorkbench().getWorkbenchWindows()[0]; |
659 | 660 |
// IWorkbenchPage page = window.getActivePage(); |
660 | 661 |
|
661 |
boolean isAlreadyOpened = page.findEditor(chartEditorInput) != null;
|
|
662 |
boolean isAlreadyOpened = page.findEditors(chartEditorInput, editorPartId, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID).length > 0;
|
|
662 | 663 |
|
663 |
|
|
664 | 664 |
Log.info("SWTChartsComponentsProvider.openEditor(): opening editor with id " + editorPartId); |
665 | 665 |
|
666 | 666 |
// if the editor is already open or the charts engine can create the specified chart type |
... | ... | |
671 | 671 |
|
672 | 672 |
try { |
673 | 673 |
|
674 |
openedChartEditorPart = (ChartEditorPart) page.openEditor(chartEditorInput, editorPartId, true); |
|
674 |
openedChartEditorPart = (ChartEditorPart) page.openEditor(chartEditorInput, editorPartId, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
|
|
675 | 675 |
openedChartEditorPart.setWasAlreadyOpened(isAlreadyOpened); |
676 | 676 |
|
677 | 677 |
|
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditorInput.java (revision 353) | ||
---|---|---|
225 | 225 |
} |
226 | 226 |
|
227 | 227 |
|
228 |
@Override |
|
229 |
public boolean equals(Object obj) { |
|
230 |
if(obj instanceof ChartEditorInput) { |
|
231 |
if(this.alwaysRecreateEditor) { |
|
232 |
return false; |
|
233 |
} |
|
234 |
return this.result == ((ChartEditorInput) obj).getResult(); |
|
235 |
} |
|
236 |
return false; |
|
237 |
} |
|
228 | 238 |
|
229 | 239 |
} |
tmp/org.txm.chartsengine.rcp/plugin.xml (revision 353) | ||
---|---|---|
8 | 8 |
<page |
9 | 9 |
category="org.txm.rcp.preferences.AdvancePreferencePage" |
10 | 10 |
class="org.txm.chartsengine.rcp.preferences.ChartsEnginePreferencePage" |
11 |
id="org.txm.rcp.chartsengine.core.preferences.ChartsEnginePreferencePage"
|
|
11 |
id="ChartsEnginePreferencePage" |
|
12 | 12 |
name="%page.name"> |
13 | 13 |
</page> |
14 | 14 |
</extension> |
tmp/org.txm.lexicaltable.rcp/plugin.xml (revision 353) | ||
---|---|---|
148 | 148 |
<extension |
149 | 149 |
point="org.eclipse.core.runtime.adapters"> |
150 | 150 |
<factory |
151 |
adaptableType="org.txm.lexicaltable.core.statsengine.data.LexicalTable"
|
|
151 |
adaptableType="org.txm.lexicaltable.core.functions.LexicalTable"
|
|
152 | 152 |
class="org.txm.lexicaltable.rcp.adapters.LexicalTableAdapterFactory"> |
153 | 153 |
<adapter |
154 | 154 |
type="org.eclipse.ui.model.IWorkbenchAdapter"> |
tmp/org.txm.lexicaltable.core/META-INF/MANIFEST.MF (revision 353) | ||
---|---|---|
16 | 16 |
org.txm.lexicaltable.core.messages, |
17 | 17 |
org.txm.lexicaltable.core.preferences, |
18 | 18 |
org.txm.lexicaltable.core.statsengine.data, |
19 |
org.txm.lexicaltable.core.statsengine.r.data, |
|
20 |
org.txm.lexicon.core.messages |
|
19 |
org.txm.lexicaltable.core.statsengine.r.data |
|
21 | 20 |
Bundle-Vendor: Textometrie.org |
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 353) | ||
---|---|---|
174 | 174 |
.toArray(new String[] {})); |
175 | 175 |
} |
176 | 176 |
|
177 |
/** |
|
178 |
* |
|
179 |
* @param partition |
|
180 |
* @param analysisProperty |
|
181 |
* @param fmin |
|
182 |
* @param itable |
|
183 |
*/ |
|
177 | 184 |
public LexicalTable(Partition partition, Property analysisProperty, int fmin, LexicalTableImpl itable) { |
178 |
|
|
185 |
super(partition); |
|
179 | 186 |
this.property = analysisProperty; |
180 | 187 |
this.partition = partition; |
181 | 188 |
this.corpus = partition.getCorpus(); |
... | ... | |
217 | 224 |
return data; |
218 | 225 |
} |
219 | 226 |
|
220 |
@Override |
|
221 |
public String getDetails() { |
|
222 |
return data.getSymbol(); |
|
223 |
} |
|
224 |
|
|
225 |
@Override |
|
226 |
public String getName() { |
|
227 |
return data.getSymbol(); |
|
228 |
} |
|
229 | 227 |
|
228 |
|
|
230 | 229 |
public int getNColumns() { |
231 | 230 |
return data.getNColumns(); |
232 | 231 |
} |
... | ... | |
265 | 264 |
return data.getRowNames(); |
266 | 265 |
} |
267 | 266 |
|
267 |
|
|
268 |
|
|
268 | 269 |
@Override |
270 |
public String getName() { |
|
271 |
return this.getPartition().getSimpleName() + ":" + this.getSimpleName(); //$NON-NLS-1$ |
|
272 |
} |
|
273 |
|
|
274 |
@Override |
|
269 | 275 |
public String getSimpleName() { |
270 |
return data.getSymbol();
|
|
276 |
return property.getName() + " (" + data.getFmin() + " / " + this.getNRows() + ")";
|
|
271 | 277 |
} |
272 | 278 |
|
279 |
@Override |
|
280 |
public String getDetails() { |
|
281 |
// TODO Auto-generated method stub |
|
282 |
return null; |
|
283 |
} |
|
284 |
|
|
285 |
|
|
273 | 286 |
public void toTxt(File outfile, String encoding, String colseparator, String txtseparator) { |
274 | 287 |
data.toTxt(outfile, encoding, colseparator, txtseparator); |
275 | 288 |
} |
Formats disponibles : Unified diff