WEB开发网
开发学院软件开发C语言 使用 Sharpen java to C# 阅读

使用 Sharpen java to C#

 2009-05-14 08:28:28 来源:WEB开发网   
核心提示: 文件2:Sharpen-Common.Xml<project name="sharpen common"><property file="sharpen.properties" /><macrodef name=&quo

文件2:

Sharpen-Common.Xml

<project name="sharpen common">
 <property file="sharpen.properties" />

 <macrodef name="reset-dir">
  <attribute name="dir" />
  <sequential>
   <delete dir="@{dir}" />
   <mkdir dir="@{dir}" />
  </sequential>
 </macrodef>

 <macrodef name="sharpen">
  <attribute name="workspace" />
  <attribute name="resource" />

  <element name="args" optional="yes" />

  <sequential>
   <exec executable="${file.jvm.jdk1.5}" failonerror="true"
    timeout="1800000">
    <arg value="-Xms256m" />
    <arg value="-Xmx512m" />
    <arg value="-cp" />
    <arg value="${eclipse.startup.jar}" />
    <arg value="org.eclipse.core.launcher.Main" />
    <arg value="-data" />
    <arg file="@{workspace}" />
    <arg value="-application" />
    <arg value="sharpen.core.application" />
    <arg value="-header" />
    <arg file="config/copyright_comment.txt" />
    <arg value="@{resource}" />

    <args />

   </exec>
  </sequential>
 </macrodef>

 <target name="install-sharpen-plugin">

  <property name="sharpen.core.dir" location="../sharpen.core" />
  <reset-dir dir="${dir.dist.classes.sharp}" />

  <echo>${eclipse.home}/plugins</echo>
  <javac fork="true" debug="true" target="1.5" source="1.5"
   destdir="${dir.dist.classes.sharp}" srcdir="${sharpen.core.dir}/src"
   encoding="UTF-8">
   <classpath>
    <fileset dir="${eclipse.home}/plugins">
     <include name="org.eclipse.osgi_*/osgi.jar" />
     <include
      name="org.eclipse.core.resources_*/resources.jar" />
     <include
      name="org.eclipse.core.runtime_*/runtime.jar" />
     <include name="org.eclipse.jdt.core_*/jdtcore.jar" />
     <!-- redundant entries: in newer eclipse installs those reside in jars -->
     <include name="org.eclipse.osgi_*.jar" />
     <include name="org.eclipse.core.resources_*.jar" />
     <include name="org.eclipse.core.runtime_*.jar" />
     <include name="org.eclipse.jdt.core_*.jar" />
     <include name="org.eclipse.jdt.launching_*.jar" />
     <include name="org.eclipse.equinox.*.jar" />
     <include name="org.eclipse.core.jobs_*.jar" />
    </fileset>
   </classpath>
  </javac>

  <property name="plugin.dir"
   value="${plugins.home}/sharpen.core_1.0.0" />
  <reset-dir dir="${plugin.dir}" />
  <jar destfile="${plugin.dir}/sharpen.jar"
   basedir="${dir.dist.classes.sharp}" />
  <copy todir="${plugin.dir}"
   file="${sharpen.core.dir}/plugin.xml" />

 </target>


</project>

下面加两个图说明一下问题吧。

项目结构:

使用 Sharpen java to C#

生成时选项:

使用 Sharpen java to C#

图片看不清楚?请点击这里查看原图(大图)。

其它的也没什么说的了。

上一页  1 2 

Tags:使用 Sharpen java

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接