Browse Source

去掉之前接口冗余操作

master
hugh 8 years ago
parent
commit
cc4994a9eb
  1. 8
      designer_base/src/com/fr/design/formula/FunctionConstants.java

8
designer_base/src/com/fr/design/formula/FunctionConstants.java

@ -34,16 +34,10 @@ public abstract class FunctionConstants {
* @param listModel * @param listModel
*/ */
public static void addFunctionGroupFromPlugins(DefaultListModel listModel){ public static void addFunctionGroupFromPlugins(DefaultListModel listModel){
//hugh:自定义函数分组,分组名不允许重复 //hugh:自定义函数分组
Set<Mutable> containers = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING); Set<Mutable> containers = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING);
List<String> nameList = new ArrayList<String>();
if(!containers.isEmpty()){ if(!containers.isEmpty()){
for(Mutable container : containers){ for(Mutable container : containers){
String name = ((FunctionDefContainer)container).getGroupName();
if(nameList.contains(name)){
continue;
}
nameList.add(name);
listModel.addElement(createFunctionGroup((FunctionDefContainer)container)); listModel.addElement(createFunctionGroup((FunctionDefContainer)container));
} }
} }

Loading…
Cancel
Save