`
黑色联想
  • 浏览: 26733 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Myeclipse9整合Flex4

阅读更多

 

一、Myeclipse9安装配置(略)

二、Flex4插件安装和SDK4.5配置

Flex4插件:FlashBuilder_4_Plugin_LS10.exe

 

 

注意这里的myeclipse路径的选择问题:我Myeclipse安装在D:\Program Files\Genuitec\如下图:

 

所以这里的路径我选择的是:D:\Program Files\Genuitec\MyEclipse-9.0M1,并且需要手动的在当前目录下创建一个dropins的文件夹,我个人认为是Flex4安装的时候用来为Myeclipse添加插件的.link文件。当FLEX4安装完成后: 至此,Flex4插件安装成功。

 

接下来配置Myeclipse9Flex4整合:

PluginConfigCreator.java

 

import java.io.File;   
import java.util.ArrayList;   
import java.util.List;   
  
/**  
 * MyEclipse9 插件配置代码生成器  
 *  
 *  
 */  
  
public class PluginConfigCreator   
{   
  
    public PluginConfigCreator()   
    {   
    }   
  
    public void print(String path)   
    {   
        List<String> 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<String> getFileList(String path)   
    {   
        path = getFormatPath(path);   
        path = path + "/";   
        File filePath = new File(path);   
        if (!filePath.isDirectory())   
        {   
            return null;   
        }   
        String[] filelist = filePath.list();   
        List<String> filelistFilter = new ArrayList<String>();   
  
        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)   
    {   
        /*你的插件的安装目录*/  
            String plugin = "D://Program Files//Adobe//Adobe Flash Builder 4 Plug-in//eclipse";   
        new PluginConfigCreator().print(plugin);   
    }   
}

 在主方法中设置Flex4插件的安装路径,一定要设置到安装路径下的eclipse文件夹下

这时控制台会输出一大串字符,COPY下来,并追加到D:\Program Files\Genuitec\MyEclipse-9.0M1\configuration\org.eclipse.equinox.simpleconfigurator目录下的bundles.info文件尾,追加前最好备份一下bundles.info文件:

至些,重新启动Myeclipse

大功告成!

  • 大小: 45.4 KB
  • 大小: 17.9 KB
  • 大小: 17 KB
  • 大小: 24.2 KB
  • 大小: 52.8 KB
  • 大小: 56.9 KB
  • 大小: 94.6 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics