Revision: 6568
          http://sourceforge.net/p/jump-pilot/code/6568
Author:   edso
Date:     2020-10-04 11:20:00 +0000 (Sun, 04 Oct 2020)
Log Message:
-----------
minor performance enhancement

Modified Paths:
--------------
    
core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java

Modified: 
core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java
===================================================================
--- 
core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java
    2020-10-03 18:21:26 UTC (rev 6567)
+++ 
core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java
    2020-10-04 11:20:00 UTC (rev 6568)
@@ -402,6 +402,9 @@
 
   }
 
+  // regex pattern to strip position setting from strings, keep static to 
prevent recompilation
+  static Pattern posPattern = Pattern.compile("^(.*)\\{(?:pos\\:)?(\\d+)\\}$");
+
   /**
    * The addMenu method. it adds a given menu item to a menu path
    * associates the given plugin and generally does everything so
@@ -469,9 +472,6 @@
 //    if (plugin.getClass().getName().contains("Printer"))
 //      System.out.println(plugin.getClass().getName());
 
-    // regex pattern to strip position setting from strings
-    Pattern posPattern = Pattern.compile("^(.*)\\{(?:pos\\:)?(\\d+)\\}$");
-    
     // strip pospattern from menuitem name e.g. foo{pos:3}
     // we ignore them, positions are determined by position in *.xml config
     // anything not listed in there will be appended.



_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to