Author: rob
Date: Mon Nov 29 14:32:49 2010
New Revision: 24916
URL: https://svn.nixos.org/websvn/nix/?rev=24916&sc=1
Log:
Modified:
nix-eclipse/trunk/org.nix.editor/.externalToolBuilders/Nix
build.main.xml.launch
nix-eclipse/trunk/org.nix.editor/build.generated.xml
nix-eclipse/trunk/org.nix.editor/editor/Nix-Completions.generated.esv
nix-eclipse/trunk/org.nix.editor/lib/editor-common.generated.str
Modified: nix-eclipse/trunk/org.nix.editor/.externalToolBuilders/Nix
build.main.xml.launch
==============================================================================
--- nix-eclipse/trunk/org.nix.editor/.externalToolBuilders/Nix
build.main.xml.launch Mon Nov 29 13:46:45 2010 (r24915)
+++ nix-eclipse/trunk/org.nix.editor/.externalToolBuilders/Nix
build.main.xml.launch Mon Nov 29 14:32:49 2010 (r24916)
@@ -2,9 +2,9 @@
<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
<stringAttribute key="bad_container_name" value=".externalToolBuilders"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE"
value="${working_set:<?xml version="1.0"
encoding="UTF-8"?> <launchConfigurationWorkingSet
editPageId="org.eclipse.ui.resourceWorkingSetPage"
factoryID="org.eclipse.ui.internal.WorkingSetFactory"
id="1260698330169_15" label="working set"
name="working set"> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/editor/Nix-Builders.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/editor/Nix-Colorer.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/editor/Nix-Folding.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/e!
ditor/Nix-Outliner.generated.esv" type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/editor/Nix-References.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/editor/Nix-Syntax.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/lib/editor-common.str"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/editor/java" type="2"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/build.generated.xml" type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/Nix/utils"
type="2"/> </launchConfigurationWorking!
Set>}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE"
value="${working_set:<?xml version="1.0"
encoding="UTF-8"?> <launchConfigurationWorkingSet
editPageId="org.eclipse.ui.resourceWorkingSetPage"
factoryID="org.eclipse.ui.internal.WorkingSetFactory"
id="1260698330169_15" label="working set"
name="working set"> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/editor/Nix-Builders.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/editor/Nix-Colorer.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/editor/Nix-Folding.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.Resour!
ceFactory"
path="/org.nix.editor/editor/Nix-Outliner.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/editor/Nix-References.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/editor/Nix-Syntax.generated.esv"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/lib/editor-common.str"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/editor/java"
type="2"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFactory"
path="/org.nix.editor/build.generated.xml"
type="1"/> <item
factoryID="org.eclipse.ui.internal.model.ResourceFa!
ctory" path="/org.nix.editor/utils" type="2"
gt; </launchConfigurationWorkingSet>}"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/Nix/build.main.xml"/>
+<listEntry value="/org.nix.editor/build.main.xml"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -21,8 +21,8 @@
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS"
value="all,"/>
<stringAttribute
key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE"
value="${project}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION"
value="${workspace_loc:/Nix/build.main.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION"
value="${workspace_loc:/org.nix.editor/build.main.xml}"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED"
value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY"
value="${workspace_loc:/Nix}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY"
value="${workspace_loc:/org.nix.editor}"/>
<stringAttribute key="process_factory_id"
value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
</launchConfiguration>
Modified: nix-eclipse/trunk/org.nix.editor/build.generated.xml
==============================================================================
--- nix-eclipse/trunk/org.nix.editor/build.generated.xml Mon Nov 29
13:46:45 2010 (r24915)
+++ nix-eclipse/trunk/org.nix.editor/build.generated.xml Mon Nov 29
14:32:49 2010 (r24916)
@@ -3,10 +3,17 @@
<project name="build.generated">
<target name="spoofaximp.default" depends="spoofaximp.default.ctree"/>
- <target name="spoofaximp.default.ctree"
depends="sdf2table,meta-sdf2table,ppgen,pppack,stratego.aster,stratego.ctree,sdf2imp,refresh"/>
- <target name="spoofaximp.default.jar"
depends="sdf2table,meta-sdf2table,ppgen,pppack,stratego.aster,stratego.jar,
sdf2imp,refresh"/>
+ <target name="spoofaximp.default.ctree"
depends="check-classpath,sdf2table,meta-sdf2table,ppgen,pppack,stratego.aster,stratego.ctree,java.jar,sdf2imp,refresh"/>
+ <target name="spoofaximp.default.jar"
depends="check-classpath,sdf2table,meta-sdf2table,ppgen,pppack,stratego.aster,stratego.jar,
java.jar,sdf2imp,refresh"/>
<!-- Initialization -->
+ <available file="${build}/Nix/strategies/Main.class"
property="java.jar.enabled"/>
+ <condition property="java.jar.import" value="-la Nix.strategies"
else="">
+ <isset property="java.jar.enabled"/>
+ </condition>
+ <condition property="java.jar.classpath"
value=":${include}/${strmodule}-java.jar" else="">
+ <isset property="java.jar.enabled"/>
+ </condition>
<available file="${trans}/${strmodule}.str"
property="build.stratego.enabled"/>
<dirname property="externaldefdir" file="${externaldef}"/>
<condition property="externaldefimport" value="-I ${externaldefdir}"
else="">
@@ -24,6 +31,8 @@
<condition property="metasdfmodule.available" value="1">
<available file="${syntax}/${metasdfmodule}.sdf"/>
</condition>
+
+ <fail unless="build" message="Please use build.main.xml to build this
project or configure the required properties manually"/>
<mkdir dir="${build}"/>
<mkdir dir="${src-gen}"/>
<mkdir dir="${dist}"/>
@@ -41,9 +50,11 @@
<target name="refresh" if="eclipse.running">
<eclipse.convertPath fileSystemPath="${basedir}"
property="projectdir"/>
- <eclipse.refreshLocal resource="${projectdir}/lib"
depth="infinite"/>
- <eclipse.refreshLocal
resource="${projectdir}/syntax/${sdfmodule}.pp.generated" depth="infinite"/>
- <eclipse.refreshLocal
resource="${projectdir}/lib/editor-common.generated.str" depth="infinite"/>
+ <eclipse.convertPath fileSystemPath="${syntax}"
property="syntaxdir"/>
+ <eclipse.convertPath fileSystemPath="${lib}" property="libdir"/>
+ <eclipse.refreshLocal resource="${libdir}" depth="infinite"/>
+ <eclipse.refreshLocal
resource="${syntaxdir}/${sdfmodule}.pp.generated" depth="infinite"/>
+ <eclipse.refreshLocal
resource="${libdir}/editor-common.generated.str" depth="infinite"/>
<eclipse.refreshLocal resource="${projectdir}/build.generated.xml"
depth="infinite"/>
<eclipse.refreshLocal
resource="${projectdir}/editor/${sdfmodule}-Builders.generated.esv"
depth="infinite"/>
<eclipse.refreshLocal
resource="${projectdir}/editor/${sdfmodule}-Colorer.generated.esv"
depth="infinite"/>
@@ -68,6 +79,22 @@
<arg value="${include}/${sdfmodule}.tbl"/>
</java>
</target>
+
+ <target name="check-classpath">
+ <available classname="org.strategoxt.imp.generator.sdf2imp"
property="check-classpath.available"/>
+ <antcall target="check-classpath.helper"/>
+ </target>
+
+ <target name="check-classpath.helper"
unless="check-classpath.available">
+ <echo level="error" message="Could not load the Spoofax plugin
loading classes."/>
+ <echo level="error" message="Make sure it is on the class path."/>
+ <echo level="error" message=""/>
+ <echo level="error" message="In Eclipse, make sure the Ant builder
is configured properly:"/>
+ <echo level="error" message="right-click on build.main.xml, go to
Run as, Ant build..., JRE tab,"/>
+ <echo level="error" message="and ensure Run in the same JRE as the
workspace is selected"/>
+ <echo level="error" message="alternatively, build the project
using Build Project in the Project menu"/>
+ <fail/>
+ </target>
<target name="sdf2table" depends="make-permissive">
<apply executable="${build.strategoxt.sdf}sdf2table"
dest="${include}" failonerror="true">
@@ -89,6 +116,12 @@
<param name="sdfmodule" value="${metasdfmodule}"/>
<param name="build.sdf.imports" value="-Idef
"${eclipse.spoofaximp.jars}/StrategoMix.def" ${build.sdf.imports}"/>
</antcall>
+ <antcall target="meta-sdf2table.helper"/>
+ </target>
+
+ <target name="meta-sdf2table.helper" if="eclipse.running">
+ <eclipse.convertPath fileSystemPath="${include}"
property="includeresource"/>
+ <eclipse.refreshLocal
resource="${includeresource}/${metasdfmodule}.tbl" depth="infinite"/>
</target>
<target name="make-permissive" depends="pack-sdf,copy-sdf">
@@ -292,6 +325,10 @@
</fileset>
</java>
</target>
+
+ <target name="java.jar" if="java.jar.enabled">
+ <jar basedir="${build}" excludes="trans/**" update="true"
destfile="${include}/${strmodule}-java.jar"/>
+ </target>
<!-- Stratego to Java interpreter -->
<target name="stratego.ctree" depends="rtg2sig">
@@ -306,10 +343,8 @@
<available file="${include}/${strmodule}.ctree"
property="strc-java.available"/>
<antcall target="copy-jar"/>
<antcall target="stratego.jvm.helper">
- <param name="build.stratego.outputpath" value="${include}"/>
+ <param name="build.stratego.outputfile"
value="${include}/${strmodule}.ctree"/>
<param name="build.stratego.extraargs" value="-F"/>
- <param name="build.stratego.extension" value="ctree"/>
- <param name="build.stratego.compiler" value="strc"/>
</antcall>
</target>
@@ -327,11 +362,10 @@
<antcall target="copy-jar"/>
<antcall target="stratego.jar.deletehelper"/>
<antcall target="stratego.jvm.helper">
- <param name="build.stratego.outputpath"
value="${src-gen}/trans"/>
- <param name="build.stratego.extraargs" value="-la java-front"/>
- <param name="build.stratego.extension" value="java"/>
+ <param name="build.stratego.outputfile"
value="${src-gen}/trans/Main.java"/>
+ <param name="build.stratego.extraargs" value="-la java-front
${java.jar.import}"/>
</antcall>
- <javac
classpath="utils/strategoxt.jar:${src-gen}${externaljarimport}"
srcdir="${src-gen}" includes="trans/**" destdir="${build}" source="1.5"
target="1.5" debug="on"/>
+ <javac
classpath="utils/strategoxt.jar:${src-gen}${externaljarimport}${java.jar.classpath}"
srcdir="${src-gen}" includes="trans/**" destdir="${build}" source="1.5"
target="1.5" debug="on"/>
<!-- copy imported terms -->
<copy todir="${build}/trans">
<fileset dir="${src-gen}/trans" excludes="**/*.java"/>
@@ -354,7 +388,7 @@
<arg value="-i"/>
<arg value="${trans}/${strmodule}.str"/>
<arg value="-o"/>
- <arg
value="${build.stratego.outputpath}/${strmodule}.${build.stratego.extension}"/>
+ <arg value="${build.stratego.outputfile}"/>
<arg value="-p"/>
<arg value="trans"/>
<arg value="--library"/>
@@ -363,7 +397,7 @@
<arg line="${build.stratego.extraargs}"/>
<arg line="${externaljarflags}"/>
<arg line="${externaldefimport}"/>
- <arg line="-I "${lib}" --cache-dir
"${basedir}/.cache""/>
+ <arg line="-I "${lib}" -I "${include}"
--cache-dir "${basedir}/.cache""/>
</java>
<delete file="${include}/${strmodule}.rtree" failonerror="false"/>
<mkdir dir="${build}/trans"/>
Modified: nix-eclipse/trunk/org.nix.editor/editor/Nix-Completions.generated.esv
==============================================================================
--- nix-eclipse/trunk/org.nix.editor/editor/Nix-Completions.generated.esv
Mon Nov 29 13:46:45 2010 (r24915)
+++ nix-eclipse/trunk/org.nix.editor/editor/Nix-Completions.generated.esv
Mon Nov 29 14:32:49 2010 (r24916)
@@ -15,7 +15,13 @@
// Use the (blank) annotation if you want a template completion only to
// appear on blank lines:
//
- // completion template: "section" <title> "\n\t" (blank)
+ // completion template: "section " <title> "\n\t" (blank)
+ //
+ // Finally, you can specify a specific SDF sort for which a completion
+ // rule should trigger as follows:
+ //
+ // completion template : Section =
+ // "section " <title> "\n\t" (blank)
//
// Semantic content completion can be defined as follows:
//
Modified: nix-eclipse/trunk/org.nix.editor/lib/editor-common.generated.str
==============================================================================
--- nix-eclipse/trunk/org.nix.editor/lib/editor-common.generated.str Mon Nov
29 13:46:45 2010 (r24915)
+++ nix-eclipse/trunk/org.nix.editor/lib/editor-common.generated.str Mon Nov
29 14:32:49 2010 (r24916)
@@ -100,6 +100,8 @@
project-path = prim("SSL_EXT_projectpath")
plugin-path = prim("SSL_EXT_pluginpath")
+
+ candidate-sorts = prim("SSL_EXT_candidatesorts")
is-newer:
(file1, file2) -> <id>
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits