From: miettinen Date: Thu, 21 Feb 2013 07:43:59 +0000 (+0000) Subject: * Changed the order in which the functions are shown in ShortcutTabWidget and in... X-Git-Tag: simantics-1.10.1~28 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=179a22008edec5c58411ee4a793cb89f0f256648;p=simantics%2Fsysdyn.git * Changed the order in which the functions are shown in ShortcutTabWidget and in assistive text feed popup. (refs #3965) * A bug fix. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26838 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java index 9fdc02dd..e476da1c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java @@ -78,7 +78,7 @@ public class ShortcutTabWidget implements Widget { functions.setText("Functions"); functionTable = new Table (tabFolder, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.NO_FOCUS | SWT.HIDE_SELECTION); - TableItem item = new TableItem(functionTable, SWT.NONE); + TableItem item; //Finding functions ArrayList functionList = Function.getAllFunctions(); @@ -86,10 +86,10 @@ public class ShortcutTabWidget implements Widget { Collections.sort(functionList); for(Function function : functionList){ + item = new TableItem(functionTable, SWT.NONE); item.setText(function.getName() + "()"); item.setData(function.getName() + "(" + function.getParameterList() + ")"); item.setImage(Function.getImage(functionTable.getDisplay(), function)); - item = new TableItem(functionTable, SWT.NONE); } functions.setControl(functionTable); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/Function.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/Function.java index 7e711018..00f45a32 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/Function.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/Function.java @@ -35,10 +35,10 @@ public class Function implements Comparable{ public enum Type { USER_DEFINED, SHARED, - VENSIM, SYSDYN, MODELICA, - MODELICA_ARRAY + MODELICA_ARRAY, + VENSIM } /**