Myeclipse 7.5的漢化方法

來源:互聯網
上載者:User

JSP中文學習網獨家發布 www.jsphelp.com   此漢化包是由 MyEclipse 7.1 漢化包修改

方法一(推薦!)
1.把你下載的漢化外掛程式(比如:MyEclipse 7.5正式版(09-6-17)漢化外掛程式.rar,網上搜一搜或者去JSP中文學習網下載http://www.accptech.com/learnsoft/958.html)解壓,將language檔案夾放到你的MyEclipse檔案夾下,預設安裝位置 C:/Program Files/Genuitec/MyEclipse 7.5。如果修改了安裝位置則放到相應的MyEclipse 7.5檔案的路徑下!
2.建立java工程,建立 CreatePluginsConfig 類,將外掛程式代碼產生器的代碼(漢化外掛程式裡有一個Java的類檔案,複製裡面的代碼即可。或者我貼出來:

import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class CreatePluginsConfig {

 public CreatePluginsConfig() {
 }

 public void print(String path) {
  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) {
     print(thePath);
     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) {
  // 外掛程式檔案所在目錄designer下的目錄結構是eclipse/features and plugins的形式
  String plugin = "C://Program Files//Genuitec//MyEclipse 7.5//language//plugins";
  new CreatePluginsConfig().print(plugin);
 }
}

)粘貼到裡面。
3.如果你MyEclipse安裝時修改了預設的安裝位置需要修改代碼裡面的漢化包language的位置(代碼中紅色部分)C://Program Files//Genuitec//MyEclipse 7.5//language//plugins 修改成你language所在的路徑
替換main函數的原先的案例路徑.注意粘貼後,要將你的路徑的單個/全部改為//或者/。
4.運行你的代碼
5.將產生的結果(就是控制台裡產生的代碼),複製到你的安裝檔案的MyEclipse 7.5檔案夾下的configuration/org.eclipse.equinox.simpleconfigurator/bundles.info(用記事本開啟)檔案尾部即可。
6.找到myeclipse 7.5的目錄下找到myeclipse.ini 用編輯器開啟後在最後加上一行 -Duser.language=zh 儲存

結束

然後在命令提示字元中使用 myeclipse.exe -clean 重啟或者關閉MyEclipse在開啟即可使用中文版

 

方法二(懶人專用)
1.預設安裝MyEclipse 7.5後將此包中的language檔案夾放到你的MyEclipse7.5檔案夾下,然後複製一下如下(顯示紅色)代碼到configuration/org.eclipse.equinox.simpleconfigurator/bundles.info檔案尾部,然後找到myeclipse7的目錄下找到myeclipse.ini 用編輯器開啟後在最後加上一行 -Duser.language=zh 儲存。

 

由於部落格字數限制,此處未貼出代碼,需要的朋友在MyEclipse 7.5正式版(09-6-17)漢化外掛程式.rar解壓後的安裝說明檔案裡有。

備忘:本文只供學習交流之用。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.