Second try about: * Bug #12520 fixed - Improve the description of the size in...
[scilab.git] / scilab / modules / ui_data / src / java / org / scilab / modules / ui_data / variablebrowser / SwingScilabVariableBrowser.java
1 /**
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2010 - DIGITEO - Bruno JOFRET
4  * Copyright (C) 2010 - DIGITEO - Vincent COUVERT
5  * Copyright (C) 2011 - Calixte DENIZET
6  *
7  * This file must be used under the terms of the CeCILL.
8  * This source file is licensed as described in the file COPYING, which
9  * you should have received as part of this distribution.  The terms
10  * are also available at
11  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
12  *
13  */
14 package org.scilab.modules.ui_data.variablebrowser;
15
16 import static org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement.asynchronousScilabExec;
17
18 import java.awt.Color;
19 import java.awt.event.ActionEvent;
20 import java.awt.event.ActionListener;
21 import java.awt.event.MouseEvent;
22 import java.awt.event.MouseListener;
23 import java.util.ArrayList;
24 import java.util.HashSet;
25 import java.util.List;
26
27 import javax.swing.JScrollPane;
28 import javax.swing.JTable;
29 import javax.swing.ListSelectionModel;
30 import javax.swing.RowFilter;
31 import javax.swing.table.DefaultTableCellRenderer;
32 import javax.swing.table.TableColumn;
33 import javax.swing.table.TableModel;
34 import javax.swing.table.TableRowSorter;
35
36 import org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement;
37 import org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement.InterpreterException;
38 import org.scilab.modules.gui.bridge.tab.SwingScilabTab;
39 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
40 import org.scilab.modules.gui.menu.Menu;
41 import org.scilab.modules.gui.menu.ScilabMenu;
42 import org.scilab.modules.gui.menubar.MenuBar;
43 import org.scilab.modules.gui.menubar.ScilabMenuBar;
44 import org.scilab.modules.gui.messagebox.ScilabModalDialog;
45 import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
46 import org.scilab.modules.gui.pushbutton.PushButton;
47 import org.scilab.modules.gui.textbox.TextBox;
48 import org.scilab.modules.gui.toolbar.ScilabToolBar;
49 import org.scilab.modules.gui.toolbar.ToolBar;
50 import org.scilab.modules.gui.utils.WindowsConfigurationManager;
51 import org.scilab.modules.localization.Messages;
52 import org.scilab.modules.types.ScilabTypeEnum;
53 import org.scilab.modules.ui_data.BrowseVar;
54 import org.scilab.modules.ui_data.actions.BooleanFilteringAction;
55 import org.scilab.modules.ui_data.actions.CompiledFunctionFilteringAction;
56 import org.scilab.modules.ui_data.actions.DoubleFilteringAction;
57 import org.scilab.modules.ui_data.actions.FunctionLibFilteringAction;
58 import org.scilab.modules.ui_data.actions.GraphicHandlesFilteringAction;
59 import org.scilab.modules.ui_data.actions.HelpAction;
60 import org.scilab.modules.ui_data.actions.ImplicitPolynomialFilteringAction;
61 import org.scilab.modules.ui_data.actions.IntegerFilteringAction;
62 import org.scilab.modules.ui_data.actions.IntrinsicFunctionFilteringAction;
63 import org.scilab.modules.ui_data.actions.ListFilteringAction;
64 import org.scilab.modules.ui_data.actions.MListFilteringAction;
65 import org.scilab.modules.ui_data.actions.MatlabSparseFilteringAction;
66 import org.scilab.modules.ui_data.actions.PointerFilteringAction;
67 import org.scilab.modules.ui_data.actions.PolynomialFilteringAction;
68 import org.scilab.modules.ui_data.actions.ScilabVarFilteringAction;
69 import org.scilab.modules.ui_data.actions.ScilabVarFilteringButtonAction;
70 import org.scilab.modules.ui_data.actions.SparseBoolFilteringAction;
71 import org.scilab.modules.ui_data.actions.SparseFilteringAction;
72 import org.scilab.modules.ui_data.actions.StringFilteringAction;
73 import org.scilab.modules.ui_data.actions.TListFilteringAction;
74 import org.scilab.modules.ui_data.actions.UncompiledFunctionFilteringAction;
75 import org.scilab.modules.ui_data.datatable.SwingTableModel;
76 import org.scilab.modules.ui_data.utils.UiDataMessages;
77 import org.scilab.modules.ui_data.variablebrowser.actions.CloseAction;
78 import org.scilab.modules.ui_data.variablebrowser.actions.RefreshAction;
79 import org.scilab.modules.ui_data.variablebrowser.rowfilter.VariableBrowserRowDataFilter;
80 import org.scilab.modules.ui_data.variablebrowser.rowfilter.VariableBrowserRowTypeFilter;
81
82 /**
83  * Swing implementation of Scilab Variable browser
84  * uses JTable
85  */
86 public final class SwingScilabVariableBrowser extends SwingScilabTab implements SimpleVariableBrowser {
87
88     public static final String VARBROWSERUUID = "3b649047-6a71-4998-bd8e-00d367a4793c";
89
90     private static final long serialVersionUID = 2169382559550113917L;
91
92     private SwingTableModel<Object> dataModel;
93     private JTable table;
94
95     private MenuBar menuBar;
96     private Menu fileMenu;
97     private Menu helpMenu;
98     private Menu filterMenu;
99     private CheckBoxMenuItem filterDoubleCheckBox;
100     private CheckBoxMenuItem filterPolynomialCheckBox;
101     private CheckBoxMenuItem filterScilabVarCheckBox;
102     private CheckBoxMenuItem filterBooleanCheckBox;
103     private CheckBoxMenuItem filterSparseCheckBox;
104     private CheckBoxMenuItem filterSparseBoolCheckBox;
105     private CheckBoxMenuItem filterIntegerCheckBox;
106     private CheckBoxMenuItem filterGraphicHandlesCheckBox;
107     private CheckBoxMenuItem filterStringCheckBox;
108     private CheckBoxMenuItem filterUncompiledFuncCheckBox;
109     private CheckBoxMenuItem filtercompiledFuncCheckBox;
110     private CheckBoxMenuItem filterFunctionLibCheckBox;
111     private CheckBoxMenuItem filterListCheckBox;
112     private CheckBoxMenuItem filterTListCheckBox;
113     private CheckBoxMenuItem filterMListCheckBox;
114     private CheckBoxMenuItem filterPointerCheckBox;
115     private CheckBoxMenuItem filterIntrinsicFunctionCheckBox;
116     private CheckBoxMenuItem filterMatlabSparseCheckBox;
117     private CheckBoxMenuItem filterImplicitPolynomialCheckBox;
118     private PushButton filteringButton;
119
120     private boolean isSetData = false;
121
122     private TableRowSorter < ? > rowSorter;
123
124     /**
125      * Create a JTable with data Model.
126      * @param columnsName : Titles of JTable columns.
127      */
128     public SwingScilabVariableBrowser(String[] columnsName, int[] aligment) {
129         super(UiDataMessages.VARIABLE_BROWSER, VARBROWSERUUID);
130
131         setAssociatedXMLIDForHelp("browsevar");
132
133         buildMenuBar();
134         addMenuBar(menuBar);
135
136         ToolBar toolBar = ScilabToolBar.createToolBar();
137         toolBar.add(RefreshAction.createButton(UiDataMessages.REFRESH));
138         toolBar.addSeparator();
139         toolBar.add(HelpAction.createButton(UiDataMessages.HELP));
140         filteringButton = ScilabVarFilteringButtonAction.createButton("Show/hide Scilab variable");
141         //        toolBar.add(filteringButton);
142         addToolBar(toolBar);
143
144         dataModel = new SwingTableModel<Object>(columnsName);
145
146         table = new JTable(dataModel) {
147             //Implement table cell tool tips.
148             public String getToolTipText(MouseEvent e) {
149                 String tip = null;
150                 TableModel model = ((JTable) e.getSource()).getModel();
151                 java.awt.Point p = e.getPoint();
152                 int rowIndex = rowAtPoint(p);
153
154                 if (rowIndex >= 0) {
155                     rowIndex = convertRowIndexToModel(rowIndex);
156                     int colIndex = columnAtPoint(p);
157                     if (colIndex == BrowseVar.TYPE_DESC_COLUMN_INDEX) { /* Scilab type */
158                         try {
159                             tip = Messages.gettext("Scilab type:") + " " + model.getValueAt(rowIndex, BrowseVar.TYPE_COLUMN_INDEX).toString();
160                         } catch (IllegalArgumentException exception) {
161                             /* If the type is not known/managed, don't crash */
162                         }
163                     } else {
164
165                         if (colIndex == BrowseVar.SIZE_COLUMN_INDEX) {
166                             /* Use the getModel() method because the
167                              * column 5 has been removed from display
168                              * but still exist in the model */
169                             tip = Messages.gettext("Bytes:") + " " + model.getValueAt(rowIndex, BrowseVar.BYTES_COLUMN_INDEX).toString();
170                         }
171                     }
172                 }
173                 return tip;
174             }
175         };
176
177         table.setFillsViewportHeight(true);
178         table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
179         table.setAutoCreateRowSorter(true);
180
181         /* Size of the icon column */
182         table.getColumnModel().getColumn(0).setPreferredWidth(30);
183
184         /* Hide the columns. But keep it in memory for the tooltip */
185         TableColumn column = table.getColumnModel().getColumn(BrowseVar.TYPE_COLUMN_INDEX);
186         /* The order to removing does matter since it changes the positions */
187         table.removeColumn(column);
188
189         column = table.getColumnModel().getColumn(BrowseVar.FROM_SCILAB_COLUMN_INDEX);
190         table.removeColumn(column);
191
192         column = table.getColumnModel().getColumn(BrowseVar.BYTES_COLUMN_INDEX);
193         table.removeColumn(column);
194
195         table.addMouseListener(new BrowseVarMouseListener());
196         // Mouse selection mode
197         table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
198         table.setCellSelectionEnabled(true);
199
200         table.setBackground(Color.WHITE);
201         if (table.getGridColor().equals(Color.WHITE)) {
202             table.setGridColor(new Color(128, 128, 128));
203         }
204         table.setShowHorizontalLines(true);
205         table.setShowVerticalLines(true);
206
207         for (int i = 0; i < aligment.length; i++) {
208             align(table, columnsName[i], aligment[i]);
209         }
210
211         JScrollPane scrollPane = new JScrollPane(table);
212         setContentPane(scrollPane);
213         WindowsConfigurationManager.restorationFinished(this);
214     }
215
216     /**
217      * {@inheritDoc}
218      */
219     public void addInfoBar(TextBox infoBarToAdd) {
220         setInfoBar(infoBarToAdd);
221     }
222
223     /**
224      * {@inheritDoc}
225      */
226     public void addMenuBar(MenuBar menuBarToAdd) {
227         setMenuBar(menuBarToAdd);
228     }
229
230     /**
231      * {@inheritDoc}
232      */
233     public void addToolBar(ToolBar toolBarToAdd) {
234         setToolBar(toolBarToAdd);
235     }
236
237     /**
238      * {@inheritDoc}
239      */
240     public void setColumnNames(String[] columnNames) {
241         dataModel.setColumnNames(columnNames);
242     }
243
244     /**
245      * {@inheritDoc}
246      */
247     public void setData(Object[][] data) {
248         isSetData = true;
249         dataModel.setData(data);
250         rowSorter = new TableRowSorter<TableModel>(dataModel);
251         this.updateRowFiltering();
252     }
253
254     private static void align(JTable table, String name, int alignment) {
255         if (alignment != -1) {
256             DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
257             renderer.setHorizontalAlignment(alignment);
258             try {
259                 TableColumn col = table.getColumn(name);
260                 if (col != null) {
261                     col.setCellRenderer(renderer);
262                 }
263             } catch (IllegalArgumentException e) { }
264         }
265     }
266
267     /**
268      * Update the display after filtering
269      * @see org.scilab.modules.ui_data.variablebrowser.SimpleVariableBrowser#updateRowFiltering()
270      */
271     public void updateRowFiltering() {
272         if (isSetData == false) { /* If the pull of the data has not been done, do it (please) */
273             try {
274                 ScilabInterpreterManagement.synchronousScilabExec("browsevar");
275                 isSetData = true;
276             } catch (InterpreterException e) {
277                 System.err.println(e);
278             }
279         }
280         VariableBrowserRowTypeFilter rowTypeFilter = new VariableBrowserRowTypeFilter(getFilteredTypeValues());
281         VariableBrowserRowDataFilter rowDataFilter = new VariableBrowserRowDataFilter(getFilteredDataValues());
282
283         List<RowFilter<Object, Object>> filters = new ArrayList<RowFilter<Object, Object>>();
284         RowFilter<Object, Object> compoundRowFilter = null;
285         filters.add(rowTypeFilter);
286         filters.add(rowDataFilter);
287         compoundRowFilter = RowFilter.andFilter(filters);
288
289         rowSorter.setRowFilter(compoundRowFilter);
290         table.setRowSorter(rowSorter);
291     }
292
293     /**
294      * MouseListener inner class
295      */
296     private class BrowseVarMouseListener implements MouseListener {
297
298         /**
299          * Contructor
300          */
301         public BrowseVarMouseListener() {
302
303         }
304
305         /**
306          * Mouse CLICKED event handling
307          * @param e the event
308          * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
309          */
310         public void mouseClicked(MouseEvent e) {
311             if (e.getClickCount() >= 2) {
312                 int clickedRow = ((JTable) e.getSource()).rowAtPoint(e.getPoint());
313                 if (clickedRow != -1) {
314                     String variableName = ((JTable) e.getSource()).getValueAt(clickedRow, 1).toString();
315                     final ActionListener action = new ActionListener() {
316                         public void actionPerformed(ActionEvent e) {
317
318                         }
319                     };
320
321                     String variableVisibility = ((JTable) e.getSource())
322                                                 .getValueAt(((JTable) e.getSource()).getSelectedRow(), BrowseVar.VISIBILITY_COLUMN_INDEX).toString();
323
324                     // Global variables are not editable yet
325                     if (variableVisibility.equals("global")) {
326                         ScilabModalDialog.show(getBrowserTab(),
327                                                UiDataMessages.GLOBAL_NOT_EDITABLE,
328                                                UiDataMessages.VARIABLE_EDITOR,
329                                                IconType.ERROR_ICON);
330                         return;
331                     }
332
333                     try {
334                         asynchronousScilabExec(action,
335                                                "if exists(\"" + variableName + "\") == 1 then "
336                                                + "  try "
337                                                + "    editvar(\"" + variableName + "\"); "
338                                                + "  catch "
339                                                + "    messagebox(\"Variables of type \"\"\" + typeof ("
340                                                + variableName + ") + \"\"\" can not be edited.\""
341                                                + ",\"" + UiDataMessages.VARIABLE_EDITOR + "\", \"error\", \"modal\");"
342                                                + "    clear ans;"   // clear return value of messagebox
343                                                + "  end "
344                                                + "else "
345                                                + "  messagebox(\"Variable \"\""
346                                                + variableName + "\"\" no more exists.\""
347                                                + ",\"" + UiDataMessages.VARIABLE_EDITOR + "\", \"error\", \"modal\");"
348                                                + "  clear ans;"  // clear return value of messagebox
349                                                + "  browsevar();" // Reload browsevar to remove cleared variables
350                                                + "end");
351                     } catch (InterpreterException e1) {
352                         System.err.println("An error in the interpreter has been catched: " + e1.getLocalizedMessage());
353                     }
354                 }
355             }
356         }
357
358         /**
359          * Mouse ENTERED event handling
360          * @param e the event
361          * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
362          */
363         public void mouseEntered(MouseEvent e) {
364         }
365
366         /**
367          * Mouse EXITED event handling
368          * @param e the event
369          * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
370          */
371         public void mouseExited(MouseEvent e) {
372         }
373
374         /**
375          * Mouse PRESSED event handling
376          * @param e the event
377          * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
378          */
379         public void mousePressed(MouseEvent e) {
380         }
381
382         /**
383          * Mouse RELEASED event handling
384          * @param e the event
385          * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
386          */
387         public void mouseReleased(MouseEvent e) {
388
389         }
390     }
391
392     /**
393      * Creates the menuBar
394      */
395     public void buildMenuBar() {
396         menuBar = ScilabMenuBar.createMenuBar();
397
398         fileMenu = ScilabMenu.createMenu();
399         fileMenu.setText(UiDataMessages.FILE);
400         fileMenu.setMnemonic('F');
401         fileMenu.add(RefreshAction.createMenuItem(UiDataMessages.REFRESH));
402         fileMenu.addSeparator();
403         fileMenu.add(CloseAction.createMenu());
404
405         menuBar.add(fileMenu);
406
407         filterMenu = ScilabMenu.createMenu();
408         filterMenu.setText(UiDataMessages.FILTER);
409         filterMenu.setMnemonic('I');
410
411         filterScilabVarCheckBox = ScilabVarFilteringAction.createCheckBoxMenu();
412         filterScilabVarCheckBox.setChecked(true);
413         filterMenu.add(filterScilabVarCheckBox);
414
415         filterMenu.addSeparator();
416
417         filterBooleanCheckBox = BooleanFilteringAction.createCheckBoxMenu();
418         filterBooleanCheckBox.setChecked(true);
419         filterMenu.add(filterBooleanCheckBox);
420
421         filterDoubleCheckBox = DoubleFilteringAction.createCheckBoxMenu();
422         filterDoubleCheckBox.setChecked(true);
423         filterMenu.add(filterDoubleCheckBox);
424
425         filterPolynomialCheckBox = PolynomialFilteringAction.createCheckBoxMenu();
426         filterPolynomialCheckBox.setChecked(true);
427         filterMenu.add(filterPolynomialCheckBox);
428
429         filterFunctionLibCheckBox = FunctionLibFilteringAction.createCheckBoxMenu();
430         filterMenu.add(filterFunctionLibCheckBox);
431
432         filterStringCheckBox = StringFilteringAction.createCheckBoxMenu();
433         filterStringCheckBox.setChecked(true);
434         filterMenu.add(filterStringCheckBox);
435
436         filterSparseCheckBox = SparseFilteringAction.createCheckBoxMenu();
437         filterSparseCheckBox.setChecked(true);
438         filterMenu.add(filterSparseCheckBox);
439
440         filterSparseBoolCheckBox = SparseBoolFilteringAction.createCheckBoxMenu();
441         filterSparseBoolCheckBox.setChecked(true);
442         filterMenu.add(filterSparseBoolCheckBox);
443
444         filterIntegerCheckBox = IntegerFilteringAction.createCheckBoxMenu();
445         filterIntegerCheckBox.setChecked(true);
446         filterMenu.add(filterIntegerCheckBox);
447
448         filterGraphicHandlesCheckBox = GraphicHandlesFilteringAction.createCheckBoxMenu();
449         filterGraphicHandlesCheckBox.setChecked(true);
450         filterMenu.add(filterGraphicHandlesCheckBox);
451
452         filterUncompiledFuncCheckBox = UncompiledFunctionFilteringAction.createCheckBoxMenu();
453         filterMenu.add(filterUncompiledFuncCheckBox);
454
455         filtercompiledFuncCheckBox = CompiledFunctionFilteringAction.createCheckBoxMenu();
456         filterMenu.add(filtercompiledFuncCheckBox);
457
458         filterListCheckBox = ListFilteringAction.createCheckBoxMenu();
459         filterListCheckBox.setChecked(true);
460         filterMenu.add(filterListCheckBox);
461
462         filterTListCheckBox = TListFilteringAction.createCheckBoxMenu();
463         filterTListCheckBox.setChecked(true);
464         filterMenu.add(filterTListCheckBox);
465
466         filterMListCheckBox = MListFilteringAction.createCheckBoxMenu();
467         filterMListCheckBox.setChecked(true);
468         filterMenu.add(filterMListCheckBox);
469
470         filterPointerCheckBox = PointerFilteringAction.createCheckBoxMenu();
471         filterPointerCheckBox.setChecked(true);
472         filterMenu.add(filterPointerCheckBox);
473
474         filterIntrinsicFunctionCheckBox = IntrinsicFunctionFilteringAction.createCheckBoxMenu();
475         filterMenu.add(filterIntrinsicFunctionCheckBox);
476
477         filterMatlabSparseCheckBox = MatlabSparseFilteringAction.createCheckBoxMenu();
478         filterMenu.add(filterMatlabSparseCheckBox);
479
480         filterImplicitPolynomialCheckBox = ImplicitPolynomialFilteringAction.createCheckBoxMenu();
481         filterMenu.add(filterImplicitPolynomialCheckBox);
482
483         menuBar.add(filterMenu);
484
485         helpMenu = ScilabMenu.createMenu();
486         helpMenu.setText("?");
487         helpMenu.setMnemonic('?');
488         helpMenu.add(HelpAction.createMenuItem(UiDataMessages.HELP));
489         menuBar.add(helpMenu);
490     }
491
492
493     /**
494      * Filter management of data (Scilab or user data)
495      * @return the set of filtered values
496      */
497     public boolean getFilteredDataValues() {
498         return filterScilabVarCheckBox.isChecked();
499
500     }
501
502     /**
503      * Filter management of type
504      * @return the set of filtered values
505      */
506     public HashSet<ScilabTypeEnum> getFilteredTypeValues() {
507         HashSet<ScilabTypeEnum> filteredValues = new HashSet<ScilabTypeEnum>();
508         // TODO to replace later by something which smells less
509         if (!filterBooleanCheckBox.isChecked()) {
510             filteredValues.add(ScilabTypeEnum.sci_boolean);
511         }
512
513         if (!filterDoubleCheckBox.isChecked()) {
514             filteredValues.add(ScilabTypeEnum.sci_matrix);
515         }
516
517         if (!filterFunctionLibCheckBox.isChecked()) {
518             filteredValues.add(ScilabTypeEnum.sci_lib);
519         }
520
521         if (!filterStringCheckBox.isChecked()) {
522             filteredValues.add(ScilabTypeEnum.sci_strings);
523         }
524
525         if (!filterPolynomialCheckBox.isChecked()) {
526             filteredValues.add(ScilabTypeEnum.sci_poly);
527         }
528
529         if (!filterSparseCheckBox.isChecked()) {
530             filteredValues.add(ScilabTypeEnum.sci_sparse);
531         }
532
533         if (!filterSparseBoolCheckBox.isChecked()) {
534             filteredValues.add(ScilabTypeEnum.sci_boolean_sparse);
535         }
536
537         if (!filterIntegerCheckBox.isChecked()) {
538             filteredValues.add(ScilabTypeEnum.sci_ints);
539         }
540
541         if (!filterGraphicHandlesCheckBox.isChecked()) {
542             filteredValues.add(ScilabTypeEnum.sci_handles);
543         }
544
545         if (!filterUncompiledFuncCheckBox.isChecked()) {
546             filteredValues.add(ScilabTypeEnum.sci_u_function);
547         }
548
549         if (!filtercompiledFuncCheckBox.isChecked()) {
550             filteredValues.add(ScilabTypeEnum.sci_c_function);
551         }
552
553         if (!filterListCheckBox.isChecked()) {
554             filteredValues.add(ScilabTypeEnum.sci_list);
555         }
556
557         if (!filterTListCheckBox.isChecked()) {
558             filteredValues.add(ScilabTypeEnum.sci_tlist);
559         }
560
561         if (!filterMListCheckBox.isChecked()) {
562             filteredValues.add(ScilabTypeEnum.sci_mlist);
563         }
564
565         if (!filterPointerCheckBox.isChecked()) {
566             filteredValues.add(ScilabTypeEnum.sci_pointer);
567         }
568
569         if (!filterIntrinsicFunctionCheckBox.isChecked()) {
570             filteredValues.add(ScilabTypeEnum.sci_intrinsic_function);
571         }
572
573         if (!filterMatlabSparseCheckBox.isChecked()) {
574             filteredValues.add(ScilabTypeEnum.sci_matlab_sparse);
575         }
576
577         if (!filterImplicitPolynomialCheckBox.isChecked()) {
578             filteredValues.add(ScilabTypeEnum.sci_implicit_poly);
579         }
580
581         return filteredValues;
582     }
583
584     /**
585      * Get this browser as a Tab object
586      * @return the tab
587      */
588     public SwingScilabTab getBrowserTab() {
589         return this;
590     }
591 }