`
yuanyong
  • 浏览: 248994 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

MyEclipse 9 Velocity插件

阅读更多
1. 先将下载好的plugin文件解压
2.执行下面代码

package t;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class Velocity{

	public Velocity() {
	}

	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) {
		/* 你的插件路径,即plugin解压的路径 */
		String plugin = "C:\\Users\\Administrator\\Desktop\\plugins";
		new Velocity().print(plugin);
	}
}


3.将控制台输出信息粘贴到 MyEclipse 路径下的
\MyEclipse 9\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
(请做好备份)
分享到:
评论
1 楼 slightz 2013-05-30  
博主,能解释下这代码他的作用么,为什么这样输出放到myeclipse中就把插件装上去了呢??

相关推荐

    myeclipse的velocity插件

    对于使用 Velocity 模板语言的开发者来说,MyEclipse 提供的 Velocity 插件则是一个非常实用的辅助工具。 ** MyEclipse 的 Velocity 插件功能 ** 1. **代码高亮和语法提示**:该插件为 Velocity 模板提供语法高亮...

    Myeclipse10手动安装Velocity插件.

    本教程将详细介绍如何在MyEclipse 10上手动安装Velocity插件,以增强其对Velocity模板语言的支持。 Velocity是由Apache软件基金会开发的一款开源的模板引擎,它为Java应用程序提供了简洁、高效的模板语言。在Web...

    myeclipse10 velocity插件的安装及安装包

    在本篇内容中,我们将聚焦于如何在MyEclipse 10中安装Velocity插件,这将帮助开发者更便捷地处理模板语言,尤其在进行Web应用开发时。Velocity是Apache软件基金会的一个开源项目,它是一种简单的、面向对象的模板...

    myeclipse Velocity 插件

    MyEclipse的Velocity插件则为开发者提供了便捷的Velocity模板编辑和调试功能,进一步优化了开发流程。 首先,让我们了解一下如何安装myeclipse Velocity 插件。在MyEclipse中,可以通过"Help" -&gt; "Install New ...

    myeclipse中velocity插件的安装配置

    myeclipse 中 velocity插件的安装配置 1.打开Eclipse---&gt;help---&gt;Software Updates---find and install....----&gt;选第二个ReadButton(Search for new features or install........................) 点next -------...

    myeclipse8.5安装velocity插件

    在IT行业中,Velocity是...这篇文章主要介绍如何在MyEclipse 8.5版本中安装Velocity插件,以及解决可能出现的问题。 **一、在线安装 Velocity 插件** 在线安装是最方便快捷的方式。你可以通过访问以下地址进行安装: ...

    myeclipse 高版本velocity插件

    myeclipse高版本的加入velocity插件 ,网上的办法试了个遍,都不行,这个是自己在官网找到的,下载下来后放到myeclipse 安装目录的plugins 文件夹下,重启myeclipse 即可

    MyEclipse-Velocity-2.0.8插件

    在这个案例中,它可能是指导用户如何将MyEclipse-Velocity插件安装到MyEclipse IDE中的步骤,包括下载、导入、激活等过程,也可能包含了一些基本的使用技巧和常见问题解答。用户在安装和使用插件前应仔细阅读此文件...

    Myeclipse手动安装Velocity编辑器插件

    7. **设置插件首选项**:在MyEclipse中,可以通过“Window” &gt; “Preferences” &gt; “MyEclipse” &gt; “Editors” &gt; “Velocity Editor”来调整插件的配置,如颜色主题、快捷键等,以适应个人习惯。 8. **优化开发**...

    velocity插件

    1. **下载插件**:首先,你需要找到适合 MyEclipse 10 的 Velocity 插件包,如 "Myeclipse10手动安装Velocity插件" 这个压缩文件。 2. **解压插件**:将下载的压缩文件解压,通常包含一个或多个 `.jar` 文件。 3. ...

    用在MyEclipse的VM插件

    在提供的“velocity插件”中,Velocity可能是指Velocity Engine,这是一个流行的Java模板引擎,常用于Web应用中的视图层。Velocity与VM插件结合使用,可以让开发者在MyEclipse环境中高效地编写、测试和调试Velocity...

    myeclipse安装插件

    ### MyEclipse安装插件的方法 #### 一、通过Dropins目录手动安装插件 **方法概述** 在MyEclipse中安装插件的一种常见方法是通过Dropins目录手动安装。这种方法适用于那些没有直接提供在线安装选项的插件,或者...

    MyEclipse插件介绍与下载

    24. **VeloEclipse**:Velocity模板语言的插件,对于使用Velocity模板的项目非常有用。 25. **EditorList**:展示并管理当前所有打开的编辑器,便于切换。 26. **MemoryManager**:监控Eclipse内存使用情况,防止...

    myeclipse插件 svn findbugs ibator maven veloeclipse等

    6. **Veloeclipse**:这是一款用于MyEclipse的Velocity模板语言编辑器,提供了语法高亮、代码提示、自动完成等功能,帮助开发者更方便地编写和调试基于Velocity模板引擎的Web应用。 这些插件的集成使得MyEclipse不...

    velocity模板插件

    将将附件velocity1.6.zip解压后的文件夹放在\%你的myeclipse安装目录%\\Genuitec\Common\plugins 目录下。 打开\%你的myeclipse安装目录%\Genuitec\MyEclipse 8.5\configuration\org.eclipse.equinox....

    opencms关于Myeclipse的插件

    开发者可以在MyEclipse的工作区中直接编辑XML配置文件,如JSP页面、 Velocity模板等,并且可以实时预览修改效果,极大地提高了开发效率。此外,对于OpenCMS的资源管理,如上传的图片、文档等,插件也提供了相应的...

    myeclipse7.*的插件代码生成工具

    MyEclipse可能支持 Velocity 或 FreeMarker 等模板语言。 2. **用户界面**:为了方便用户配置生成规则,插件通常会提供一个图形用户界面(GUI)。这可能包括对话框,用户可以在这里选择生成的类、接口、方法等的...

    velocity eclipse安装的具体详情

    该文档详细描述了velocity eclipse安装的方法,以及安装过程中可能遇到的问题,提出了解决方案。

Global site tag (gtag.js) - Google Analytics