隨筆 - 251  文章 - 504  trackbacks - 0
          <2010年4月>
          28293031123
          45678910
          11121314151617
          18192021222324
          2526272829301
          2345678

          本博客系個人收集材料及學習記錄之用,各類“大俠”勿擾!

          留言簿(14)

          隨筆分類

          收藏夾

          My Favorite Web Sites

          名Bloger

          非著名Bloger

          搜索

          •  

          積分與排名

          • 積分 - 204419
          • 排名 - 283

          最新評論

                  環境:MyEclipse8.0,jbpm-jpdl-3.2.3,tomcat6.0。網上沒有具體關于MyEclipse8.0如何集成jbpm3的方法,倒是有集成jbpm4.0的方法,但此法不適用jbpm3.0。本文借用“MyEclipse 7.0 安裝jbpm插件:jbpm-jpdl-designer-3.1.4”的方法,完成了MyEclipse8.0與jbpm-jpdl-3.2.3的集成,目前運行良好。方法如下:
                 假設MyEclipse8.0的安裝路徑是:D:\Program Files\Genuitec\MyEclipse 8.x Latest;jbpm-jpdl-3.2.3插件的解壓路徑:E:\Java\jbpm-jpdl-3.2.3\designer。運行以下程序:

           1import java.io.File; 
           2import java.util.ArrayList; 
           3import java.util.List; 
           4
           5public class CreatePluginsConfig 
           6
           7    public CreatePluginsConfig()
           8    }
           
           9
          10    public void print(String path)
          11        List list=getFileList(path); 
          12        if(list==null)
          13            return
          14        }
           
          15
          16        int length=list.size(); 
          17        for(int i=0;i<length;i++)
          18            String result=""
          19            String thePath=getFormatPath(getString(list.get(i))); 
          20            File file=new File(thePath); 
          21            if(file.isDirectory())
          22                String fileName=file.getName(); 
          23                if(fileName.indexOf("_")<0)
          24                    print(thePath); 
          25                    continue
          26                }
           
          27                String[] filenames=fileName.split("_"); 
          28                String filename1=filenames[0]; 
          29                String filename2=filenames[1]; 
          30                result=filename1+","+filename2+",file:/"+path+"\\"+fileName+"\\,4,false"
          31                System.out.println(result); 
          32            }
          else if(file.isFile())
          33                String fileName=file.getName(); 
          34                if(fileName.indexOf("_")<0)
          35                    continue
          36                }
           
          37                int last = fileName.lastIndexOf("_");// 最后一個下劃線的位置 
          38                String filename1 = fileName.substring(0, last); 
          39                String filename2 = fileName.substring(last + 1, fileName .length() - 4); 
          40                result = filename1 + "," + filename2 + ",file:/" + path + "\\" + fileName + ",4,false"
          41                System.out.println(result); 
          42            }
           
          43
          44        }
           
          45    }
           
          46
          47    public List getFileList(String path)
          48        path=getFormatPath(path); 
          49        path=path+"/"
          50        File filePath=new File(path); 
          51        if(!filePath.isDirectory())
          52            return null
          53        }
           
          54        String[] filelist=filePath.list(); 
          55        List filelistFilter=new ArrayList(); 
          56
          57        for(int i=0;i<filelist.length;i++)
          58            String tempfilename=getFormatPath(path+filelist[i]); 
          59            filelistFilter.add(tempfilename); 
          60        }
           
          61        return filelistFilter; 
          62    }
           
          63
          64    public String getString(Object object)
          65        if(object==null)
          66            return ""
          67        }
           
          68        return String.valueOf(object); 
          69    }
           
          70
          71    public String getFormatPath(String path) 
          72        path = path.replaceAll("\\\\""/"); 
          73        path = path.replaceAll("//""/"); 
          74        return path; 
          75    }
           
          76
          77    public static void main(String[] args){
          78        //插件文件所在目錄designer下的目錄結構是eclipse/features and plugins的形式
          79        String plugin = "E:\\Java\\jbpm-jpdl-3.2.3\\designer"
          80        new CreatePluginsConfig().print(plugin); 
          81    }
           
          82}
           
          83

                 將打印出來的插件配置信息復制到
          D:\Program Files\Genuitec\MyEclipse 8.x Latest\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info中。然后重啟MyEclipse8.0即可!
                

          posted on 2010-04-06 16:04 matthew 閱讀(1295) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 安龙县| 高阳县| 六盘水市| 准格尔旗| 土默特左旗| 炎陵县| 高陵县| 区。| 宁波市| 湄潭县| 武威市| 綦江县| 武宣县| 新乡县| 思茅市| 名山县| 社旗县| 廉江市| 即墨市| 清水河县| 渭源县| 徐闻县| 闻喜县| 夹江县| 绥中县| 兴业县| 历史| 潮安县| 西丰县| 嘉禾县| 永登县| 兴城市| 三台县| 宁武县| 济宁市| 桂林市| 旺苍县| 丰都县| 双桥区| 阆中市| 北流市|