<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-26  評論-111  文章-19  trackbacks-0
        Myeclipse 7 的插件安裝方式與原先的方式完全不一樣了,下面以JBossTools-2.1.2.GA插件安裝為例進行說明。

        假設(shè)
                Myeclipse 7的安裝路徑為:C:\Genuitec
                JBossTools-2.1.2.GA插件的路徑為:  C:\eclipse-plugins\plugins\JBossTools-2.1.2.GA-ALL-win32

        將下面這段代碼編譯后執(zhí)行:

        
     1package test;
     2
     3import java.io.File;
     4import java.util.ArrayList;
     5import java.util.List;
     6
     7
     8/**
     9 * Descript: 
    10 *
    11 *
    12 */

    13
    14public class CreatePluginsConfig {
    15    private String path;
    16    
    17    public CreatePluginsConfig(String path){
    18        this.path=path;
    19    }

    20    
    21    public void print(){
    22        List list=getFileList(path);
    23        if(list==null){
    24            return;
    25        }

    26        
    27        int length=list.size();
    28        for(int i=0;i<length;i++){
    29            String result="";
    30            String thePath=getFormatPath(getString(list.get(i)));
    31            File file=new File(thePath);
    32            if(file.isDirectory()){
    33                String fileName=file.getName();
    34                if(fileName.indexOf("_")<0){
    35                    continue;
    36                }

    37                String[] filenames=fileName.split("_");
    38                String filename1=filenames[0];
    39                String filename2=filenames[1];
    40                result=filename1+","+filename2+",file:/"+path+"\\"+fileName+"\\,4,false";
    41                System.out.println(result);
    42            }
    else if(file.isFile()){
    43                String fileName=file.getName();
    44                if(fileName.indexOf("_")<0){
    45                    continue;
    46                }

    47                String[] filenames=fileName.split("_");
    48                String filename1=filenames[0];
    49                String filename2=filenames[1].substring(0, filenames[1].lastIndexOf("."));
    50                result=filename1+","+filename2+",file:/"+path+"\\"+fileName+",4,false";
    51                System.out.println(result);
    52            }

    53            
    54        }

    55    }

    56    
    57    public List getFileList(String path){
    58        path=getFormatPath(path);
    59        path=path+"/";
    60        File filePath=new File(path);
    61        if(!filePath.isDirectory()){
    62            return null;
    63        }

    64        String[] filelist=filePath.list();
    65        List filelistFilter=new ArrayList();
    66
    67        for(int i=0;i<filelist.length;i++){
    68            String tempfilename=getFormatPath(path+filelist[i]);
    69            filelistFilter.add(tempfilename);
    70        }

    71        return filelistFilter;
    72    }

    73    
    74    public String getString(Object object){
    75        if(object==null){
    76            return "";
    77        }

    78        return String.valueOf(object);
    79    }

    80    
    81    public String getFormatPath(String path) {
    82        path = path.replaceAll("\\\\""/");
    83        path = path.replaceAll("//""/");
    84        return path;
    85    }

    86    
    87    public static void main(String[] args){
    88        new CreatePluginsConfig("C:\\eclipse-plugins\\plugins\\JBossTools-2.1.2.GA-ALL-win32\\eclipse\\plugins").print();
    89    }

    90}
        
        執(zhí)行完之后,將控制臺中打印出的執(zhí)行結(jié)果,直接復(fù)制到下面這個文件中:

        C:\Genuitec\MyEclipse 7.0\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info

        然后用 -clean 命令重新啟動Myeclipse即了完成插件的安裝。
        
    posted on 2008-12-15 13:41 snoics 閱讀(8470) 評論(13)  編輯  收藏

    評論:
    # re: Myeclipse 7 插件安裝[未登錄] 2008-12-16 16:51 | dragon
    其他的插件怎么安裝??  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2008-12-16 17:22 | a_faint_hope
    非常感謝你的幫助.
    但程序出現(xiàn)兩個問題:
    1.C:\\eclipse-plugins\\plugins\JBossTools-2.1.2.GA-ALL-win32
    這里(\JBossTools-2.1.2.GA-ALL-win32)應(yīng)該是 \\ ;
    2.文件名有兩個下劃線時,會報下標(biāo)越界問題.
    修改后的程序如下:
    import java.io.File;
    import java.util.ArrayList;
    import java.util.List;

    public class CreatePluginsConfig {
    private String path;

    public CreatePluginsConfig(String path) {
    this.path = path;
    }

    public void print() {
    List list = getFileList(path);
    if (list == null) {
    return;
    }

    int length = list.size();
    for (int i = 0; i < length; i++) {
    String result = "";
    String thePath = getFormatPath(getString(list.get(i)));
    File file = new File(thePath);
    if (file.isDirectory()) {
    String fileName = file.getName();
    if (fileName.indexOf("_") < 0) {
    continue;
    }
    String[] filenames = fileName.split("_");
    String filename1 = filenames[0];
    String filename2 = filenames[1];
    result = filename1 + "," + filename2 + ",file:/" + path + "\\"
    + fileName + "\\,4,false";
    System.out.println(result);
    } else if (file.isFile()) {
    String fileName = file.getName();
    if (fileName.indexOf("_") < 0) {
    continue;
    }
    int last = fileName.lastIndexOf("_");// 最后一個下劃線的位置
    String filename1 = fileName.substring(0, last);
    String filename2 = fileName.substring(last + 1, fileName
    .length() - 4);
    result = filename1 + "," + filename2 + ",file:/" + path + "\\"
    + fileName + ",4,false";
    System.out.println(result);
    }
    }
    }

    public List getFileList(String path) {
    path = getFormatPath(path);
    path = path + "/";
    File filePath = new File(path);
    if (!filePath.isDirectory()) {
    return null;
    }
    String[] filelist = filePath.list();
    List filelistFilter = new ArrayList();

    for (int i = 0; i < filelist.length; i++) {
    String tempfilename = getFormatPath(path + filelist[i]);
    filelistFilter.add(tempfilename);
    }
    return filelistFilter;
    }

    public String getString(Object object) {
    if (object == null) {
    return "";
    }
    return String.valueOf(object);
    }

    public String getFormatPath(String path) {
    path = path.replaceAll("\\\\", "/");
    path = path.replaceAll("//", "/");
    return path;
    }

    public static void main(String[] args) {
    new CreatePluginsConfig(
    "C:\\eclipse-plugins\\plugins\\JBossTools-2.1.2.GA-ALL-win32")
    .print();
    }
    }


      回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2008-12-16 22:09 | Ivan阿文
    7.0出是出來了,只是不怎么好用。
    至少已經(jīng)發(fā)現(xiàn)幾個問題了,
    1、插件跟原地的安裝方式不一樣,好多插件目前我還不會裝,希望有高人指點
    2、用默認(rèn)的hibernate編輯器去編輯hibernate 綁定的那xml文件的時候,ctrl+d ctrl+alt+下這兩個(目前為止發(fā)現(xiàn)的)快捷鍵都無法使用。設(shè)置那里,設(shè)置為in dialog and window就有效果,不過回到普通代碼編輯就無效果。如果設(shè)置為editing text,效果就剛好相反,反正就沒一種設(shè)法可以兩邊都能用上這兩個快捷鍵。
    3、同樣的一段JSP普通位碼,在6.6下可以用ctrl+shift+f格式化,在7下就有問題了 - -
    給我感覺是7的html標(biāo)簽配對做得很好,有vs和netbeans等ide的風(fēng)格。后臺的設(shè)置也強了很多,但,以上我說的3個小問題。其實對于開發(fā)來說,很重要啦,竟然,,,,,,7在這些方面都退步了 - -  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝[未登錄] 2008-12-17 01:23 | kevin
    我試了一下阿,弄了半天都沒用,什么都不顯示  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2008-12-17 08:58 | a_faint_hope
    插件按樓主說的那樣做可以啊!
    我昨天都安裝了svn插件.

    路徑修改為:
    C:\\eclipse-plugins\\plugins\\JBossTools-2.1.2.GA-ALL-win32\\eclipse\\plugins
      回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2008-12-17 10:33 | snoics
    ^_^ 謝謝,Bug 已修復(fù),最后一行的路徑寫錯了,應(yīng)該是

    C:\\eclipse-plugins\\plugins\\JBossTools-2.1.2.GA-ALL-win32\\eclipse\\plugins

    已改正,其他插件的安裝也都是可以按照這種方式來處理,只要將路徑指向插件目錄即可一般都是插件包內(nèi)的 plugins 這個目錄  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2008-12-17 16:27 | Q
    我碰到這么個問題,適用check for update的執(zhí)行update的時候會自動關(guān)閉,并且會死機  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝[未登錄] 2008-12-17 22:49 | kevin
    @snoics
    請問features目錄為什么不要呢?  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝[未登錄] 2008-12-25 21:28 | z
    我把你的代碼考下來執(zhí)行完了后生成了兩行記錄,考進去沒法用。然后我就根據(jù)那個文檔里的東西手工寫了一個就可以了  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2009-01-02 15:09 | 小東東
    怎么用你這種方式我裝了不成功呢,
    我的插件位置在E:\java\plugin\PropEditor
    用你的這個方法改變main方法中 對應(yīng)的path為
    E:\java\plugin\PropEditor\eclipse\plugins
    能夠生成兩行代碼
    jp.gr.java,conf.ussiy.app.propedit,file:/E:\java\plugin\PropEditor\eclipse\plugins\jp.gr.java_conf.ussiy.app.propedit_4.8.2\,4,false
    viPluginPropertiesEditorVersion,0.2.11,file:/E:\java\plugin\PropEditor\eclipse\plugins\viPluginPropertiesEditorVersion_0.2.11\,4,false

    但是復(fù)制到我Myeclipse中對應(yīng)的文件中,重新啟動卻不能看到插件。。

    請幫看一下 我控制臺打印出來的 東西有錯嗎?

    怎么修改? 十分感謝?。?!  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2009-05-19 08:35 | shyhao
    我就奇怪了 按個插件 搞這么復(fù)雜干什么




      回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2009-05-19 08:38 | shyhao
    我就用以前的方式安裝,改怎么用,就怎么用  回復(fù)  更多評論
      
    # re: Myeclipse 7 插件安裝 2009-06-12 12:54 | xiaobenniao
    @shyhao
    你把你做法發(fā)上來 大家分享   回復(fù)  更多評論
      

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


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 两个人的视频高清在线观看免费| 亚洲人成电影在线天堂| 在线免费观看国产| 日本一区二区在线免费观看 | a级毛片免费观看网站| 亚洲欧美日韩中文无线码| 久久精品蜜芽亚洲国产AV| 亚洲一区二区三区在线观看精品中文 | 1000部啪啪毛片免费看| 久久99精品免费一区二区| 国产亚洲精品精品精品| 亚洲中文字幕无码中文字| 亚洲最新在线视频| 亚洲大片在线观看| 日本亚洲视频在线| 亚洲精品乱码久久久久66| 国产亚洲?V无码?V男人的天堂 | 久久亚洲熟女cc98cm| 国产亚洲老熟女视频| www国产亚洲精品久久久日本| 女人18毛片a级毛片免费视频| 免费观看黄网站在线播放| 免费看黄视频网站| 中文毛片无遮挡高潮免费| 亚洲高清视频免费| 亚洲精品免费在线视频| 亚洲免费视频播放| 99久久久精品免费观看国产| 69av免费观看| 色片在线免费观看| 午夜宅男在线永久免费观看网| 最近中文字幕免费mv视频8| 久久精品免费全国观看国产| 久久不见久久见免费影院| 亚洲成在人线aⅴ免费毛片| 久久久久国色AV免费观看性色| 色窝窝免费一区二区三区| 精品久久久久久久久免费影院| 9久9久女女免费精品视频在线观看| 国拍在线精品视频免费观看| 91香蕉视频免费|