nice-commit Mailing List for The Nice Programming Language (Page 90)
Brought to you by:
bonniot
You can subscribe to this list here.
2003 |
Jan
|
Feb
(60) |
Mar
(125) |
Apr
(183) |
May
(140) |
Jun
(227) |
Jul
(141) |
Aug
(181) |
Sep
(75) |
Oct
(89) |
Nov
(187) |
Dec
(162) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(69) |
Feb
(197) |
Mar
(98) |
Apr
(26) |
May
(10) |
Jun
(85) |
Jul
(88) |
Aug
(79) |
Sep
(80) |
Oct
(81) |
Nov
(53) |
Dec
(109) |
2005 |
Jan
(68) |
Feb
(77) |
Mar
(232) |
Apr
(79) |
May
(37) |
Jun
(37) |
Jul
(3) |
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(10) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(9) |
2007 |
Jan
(2) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(17) |
Dec
(6) |
2008 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bo...@us...> - 2003-08-07 09:53:42
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1:/tmp/cvs-serv4305/src/bossa/modules Modified Files: Locator.java Compilation.nice Log Message: Warn about non-existing sourcepath and classpath entries. Files are explicitely made absolute, since in Sun's JVM, that correctly uses the current value of the user.dir property even after it was modified, while file operations on a non-absolute File use the starting current directory of the JVM (which seems like a bug, given the documentation in http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html). Index: Locator.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Locator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Locator.java 29 Apr 2002 15:01:30 -0000 1.2 --- Locator.java 7 Aug 2003 09:53:39 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- import java.util.jar.JarFile; import bossa.util.Debug; + import bossa.util.User; /** *************** *** 27,36 **** final class Locator { ! Locator (Compilation compilation) { sourceRoots = splitPath(compilation.sourcePath); ! packageRoots = splitPath(compilation.packagePath + File.pathSeparator + ! compilation.destinationDir + File.pathSeparator + ! compilation.runtimeFile); } --- 28,35 ---- final class Locator { ! Locator (Compilation compilation, String classpath) { sourceRoots = splitPath(compilation.sourcePath); ! packageRoots = splitPath(classpath); } *************** *** 92,96 **** if (pathComponent.length() > 0) { ! File f = nice.tools.util.System.getFile(pathComponent); // Ignore non-existing directories and archives if (f.exists()) --- 91,95 ---- if (pathComponent.length() > 0) { ! File f = nice.tools.util.System.getFile(pathComponent).getAbsoluteFile(); // Ignore non-existing directories and archives if (f.exists()) *************** *** 101,107 **** } catch(IOException e){} ! else res.add(f); } } start = end + 1; --- 100,110 ---- } catch(IOException e){} ! else if (f.isDirectory()) res.add(f); + else + User.warning("Path " + f + " is not valid"); } + else + User.warning("Path " + f + " does not exist"); } start = end + 1; Index: Compilation.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Compilation.nice,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Compilation.nice 24 Jun 2003 15:28:19 -0000 1.25 --- Compilation.nice 7 Aug 2003 09:53:39 -0000 1.26 *************** *** 67,81 **** this.packagePath = "."; ! nice.tools.code.TypeImport.setClasspath ! ((this.destinationDir || "") + ! java.io.File.pathSeparator + ! (this.packagePath || "") + ! java.io.File.pathSeparator + ! this.runtimeFile); Package.startNewCompilation(); // Create the locator that uses these two pathes to locate packages. ! this.locator = new Locator(this); // forces reading nice.lang first --- 67,83 ---- this.packagePath = "."; ! String classpath = ! (this.packagePath || "") + ! java.io.File.pathSeparator + ! (this.destinationDir || "") + ! java.io.File.pathSeparator + ! this.runtimeFile; ! ! nice.tools.code.TypeImport.setClasspath(classpath); Package.startNewCompilation(); // Create the locator that uses these two pathes to locate packages. ! this.locator = new Locator(this, classpath); // forces reading nice.lang first |
From: <bo...@us...> - 2003-08-06 22:41:29
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv6096/web Modified Files: irc.xml Log Message: Corrected conversations->discussions. Index: irc.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/irc.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** irc.xml 16 Jun 2003 18:53:15 -0000 1.1 --- irc.xml 6 Aug 2003 22:41:26 -0000 1.2 *************** *** 34,38 **** <para> <ulink url="http://pauillac.inria.fr/~bonniot/nice@freenode/"> ! Archives of the IRC conversations</ulink> are available. </para> --- 34,38 ---- <para> <ulink url="http://pauillac.inria.fr/~bonniot/nice@freenode/"> ! Archives of the IRC discussions</ulink> are available. </para> |
From: <bo...@us...> - 2003-08-06 22:40:34
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1:/tmp/cvs-serv5857/testsuite/compiler/classes Modified Files: field-override.testsuite Log Message: Fixed generation of the minimalist Java constructor when of field override includes a value and the original field does too. Index: field-override.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/field-override.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** field-override.testsuite 31 Jul 2003 23:40:23 -0000 1.3 --- field-override.testsuite 6 Aug 2003 22:40:31 -0000 1.4 *************** *** 165,166 **** --- 165,192 ---- override String s = "abc"; } + + /// PASS + /// Toplevel + class FOOA { + final byte b = 1; + byte b2 = 2; + } + + class FOOB extends FOOA { + override byte b = 2; + } + + /// PASS + /// Toplevel + class FOOA { + final byte b = 1; + byte b2 = 2; + } + + class FOOB extends FOOA { + override byte b; + } + + class FOOC extends FOOB { + override byte b = 2; + } |
From: <bo...@us...> - 2003-08-06 22:40:34
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv5857/src/bossa/syntax Modified Files: NiceClass.java Log Message: Fixed generation of the minimalist Java constructor when of field override includes a value and the original field does too. Index: NiceClass.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** NiceClass.java 31 Jul 2003 23:40:23 -0000 1.56 --- NiceClass.java 6 Aug 2003 22:40:31 -0000 1.57 *************** *** 253,257 **** if (value != null) inherited[i] = new FormalParameters.OptionalParameter ! (type, sym.getName(), true, value, true); else inherited[i].resetType(type); --- 253,258 ---- if (value != null) inherited[i] = new FormalParameters.OptionalParameter ! (type, sym.getName(), true, value, ! inherited[i].value() == null || inherited[i].isOverriden()); else inherited[i].resetType(type); |
From: <ag...@us...> - 2003-08-06 21:29:55
|
Update of /cvsroot/nice/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv17714 Modified Files: build.xml Log Message: ant install target removes all previous net.sf.nice_* plugins prom the eclipse plugins folder and copies a new version there Index: build.xml =================================================================== RCS file: /cvsroot/nice/eclipse/build.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** build.xml 6 Aug 2003 19:59:37 -0000 1.7 --- build.xml 6 Aug 2003 20:55:09 -0000 1.8 *************** *** 201,206 **** ! --- 201,214 ---- + <target name="install" depends="dist"> + <delete includeEmptyDirs="true"> + <fileset dir="${eclipse.home}/plugins" includes="${plugin.id}_*/**"/> + </delete> + <mkdir dir="${eclipse.home}/plugins/${plugin.id.version}"/> + <copy todir="${eclipse.home}/plugins/${plugin.id.version}"> + <fileset dir="${plugin.dir}" includes="**/*"/> + </copy> ! </target> |
From: <ag...@us...> - 2003-08-06 19:59:40
|
Update of /cvsroot/nice/eclipse/src In directory sc8-pr-cvs1:/tmp/cvs-serv7867/src Modified Files: plugin.xml Log Message: The nicec ant task is in a separate jar in the lib folder. Nice projects can be compiled by ant that use the nicec task. Index: plugin.xml =================================================================== RCS file: /cvsroot/nice/eclipse/src/plugin.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** plugin.xml 6 Aug 2003 12:28:39 -0000 1.3 --- plugin.xml 6 Aug 2003 19:59:37 -0000 1.4 *************** *** 177,179 **** --- 177,188 ---- + <!-- =================================================================================== --> + <!-- Extension: Nicec Ant Adapter --> + <!-- =================================================================================== --> + <extension + point="org.eclipse.ant.core.extraClasspathEntries"> + <extraClasspathEntry library="lib/ant_taskdefs.jar"/> + </extension> + + </plugin> |
From: <ag...@us...> - 2003-08-06 19:59:40
|
Update of /cvsroot/nice/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv7867 Modified Files: build.xml nice_plugin_build.properties Log Message: The nicec ant task is in a separate jar in the lib folder. Nice projects can be compiled by ant that use the nicec task. Index: build.xml =================================================================== RCS file: /cvsroot/nice/eclipse/build.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** build.xml 6 Aug 2003 06:56:07 -0000 1.6 --- build.xml 6 Aug 2003 19:59:37 -0000 1.7 *************** *** 25,29 **** <property name="main.package" value="nice.eclipse.core"/> ! <property name="plugin.jar.name" value="niceplugin.jar"/> <property name="src.dir" value="src"/> --- 25,32 ---- <property name="main.package" value="nice.eclipse.core"/> ! <property name="plugin.jar" value="niceplugin.jar"/> ! <property name="ant.taskdefs.jar" value="ant_taskdefs.jar"/> ! <property name="nice.jar" value="nice.jar"/> ! <property name="src.dir" value="src"/> *************** *** 34,38 **** <property name="plugin.id" value="net.sf.nice"/> ! <property name="plugin.version" value="0.1.6"/> <property name="plugin.id.version" value="${plugin.id}_${plugin.version}"/> <property name="plugin.dir" value="${build.dir}/${plugin.id.version}"/> --- 37,41 ---- <property name="plugin.id" value="net.sf.nice"/> ! <property name="plugin.version" value="0.1.7"/> <property name="plugin.id.version" value="${plugin.id}_${plugin.version}"/> <property name="plugin.dir" value="${build.dir}/${plugin.id.version}"/> *************** *** 42,47 **** - - <target name="clean"> <delete dir="${build.dir}"/> --- 45,48 ---- *************** *** 125,129 **** sourcepath="${src.dir}" destination="${build.dir}" ! jar="${build.dir}/${plugin.jar.name}"> <classpath> <pathelement location="${eclipse.home}/plugins/org.eclipse.core.resources_${eclipse.version}/resources.jar"/> --- 126,130 ---- sourcepath="${src.dir}" destination="${build.dir}" ! jar="${build.dir}/${plugin.jar}"> <classpath> <pathelement location="${eclipse.home}/plugins/org.eclipse.core.resources_${eclipse.version}/resources.jar"/> *************** *** 144,148 **** </nicec> ! <jar destfile="${build.dir}/${plugin.jar.name}" basedir="${src.dir}" update="yes" --- 145,149 ---- </nicec> ! <jar destfile="${build.dir}/${plugin.jar}" basedir="${src.dir}" update="yes" *************** *** 153,164 **** ! ! <target name="dist" depends="compile"> <mkdir dir="${plugin.dir}"/> ! <move file="${build.dir}/${plugin.jar.name}" todir="${plugin.dir}"/> <copy file="${src.dir}/${plugin.manifest.name}" todir="${plugin.dir}"/> <replace file="${plugin.dir}/${plugin.manifest.name}" token="0.0.0" value="${plugin.version}"/> --- 154,180 ---- + <target name="split-ant-taskdefs"> + <property name="tmp.dir" value="${build.dir}/tmp"/> + <mkdir dir="${tmp.dir}"/> + <property name="runtime.tmp.dir" value="${tmp.dir}/runtime"/> + <property name="taskdefs.tmp.dir" value="${tmp.dir}/taskdefs"/> + <mkdir dir="${runtime.tmp.dir}"/> + + + <unjar src="${nice.runtime}" dest="${runtime.tmp.dir}"/> + <property name="nicec.taskdef.path" value="nice/tools/ant"/> + + <jar destfile="${build.dir}/${ant.taskdefs.jar}" basedir="${runtime.tmp.dir}" includes="${nicec.taskdef.path}/Nicec.class"/> + <delete file="${runtime.tmp.dir}/${nicec.taskdef.path}/Nicec.class"/> + <jar destfile="${build.dir}/${nice.jar}" basedir="${runtime.tmp.dir}" includes="*/**" manifest="${runtime.tmp.dir}/META-INF/MANIFEST.MF"/> + <delete dir="${runtime.tmp.dir}"/> + </target> ! <target name="dist" depends="compile,split-ant-taskdefs"> <mkdir dir="${plugin.dir}"/> ! <move file="${build.dir}/${plugin.jar}" todir="${plugin.dir}"/> <copy file="${src.dir}/${plugin.manifest.name}" todir="${plugin.dir}"/> <replace file="${plugin.dir}/${plugin.manifest.name}" token="0.0.0" value="${plugin.version}"/> *************** *** 166,171 **** <property name="plugin.lib.dir" value="${plugin.dir}/lib"/> <mkdir dir="${plugin.lib.dir}"/> ! <copy file="${nice.runtime}" tofile="${plugin.lib.dir}/nice.jar"/> ! <property name="plugin.tar" value="${dist.dir}/${plugin.id.version}.tar"/> --- 182,187 ---- <property name="plugin.lib.dir" value="${plugin.dir}/lib"/> <mkdir dir="${plugin.lib.dir}"/> ! <move file="${build.dir}/${ant.taskdefs.jar}" todir="${plugin.lib.dir}"/> ! <move file="${build.dir}/${nice.jar}" todir="${plugin.lib.dir}"/> <property name="plugin.tar" value="${dist.dir}/${plugin.id.version}.tar"/> *************** *** 190,194 **** </project> - --- 206,209 ---- Index: nice_plugin_build.properties =================================================================== RCS file: /cvsroot/nice/eclipse/nice_plugin_build.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nice_plugin_build.properties 5 Aug 2003 09:40:14 -0000 1.1 --- nice_plugin_build.properties 6 Aug 2003 19:59:37 -0000 1.2 *************** *** 1,4 **** ! #nice.runtime = /Users/agreif/share/java/nice.jar ! ! #eclipse.home = /Volumes/data/app/eclipse --- 1,3 ---- ! nice.runtime = /Users/agreif/share/java/nice.jar + eclipse.home = /Volumes/data/app/eclipse |
From: <ag...@us...> - 2003-08-06 13:15:30
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/util In directory sc8-pr-cvs1:/tmp/cvs-serv17238/src/nice/eclipse/util Modified Files: Resources.properties _util.nice Log Message: remove from Build spec implemented Index: Resources.properties =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/util/Resources.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Resources.properties 6 Aug 2003 12:28:39 -0000 1.2 --- Resources.properties 6 Aug 2003 13:15:27 -0000 1.3 *************** *** 10,11 **** --- 10,13 ---- WizardNewProjectCreationPage.pageDescription=Create a new Nice Project + + Index: _util.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/util/_util.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _util.nice 6 Aug 2003 12:28:39 -0000 1.2 --- _util.nice 6 Aug 2003 13:15:27 -0000 1.3 *************** *** 23,24 **** --- 23,26 ---- IWorkspace getWorkspace() = native IWorkspace ResourcesPlugin.getWorkspace(); + + |
From: <ag...@us...> - 2003-08-06 13:15:29
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/core In directory sc8-pr-cvs1:/tmp/cvs-serv17238/src/nice/eclipse/core Modified Files: NiceProject.nice Log Message: remove from Build spec implemented Index: NiceProject.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/core/NiceProject.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NiceProject.nice 6 Aug 2003 12:28:39 -0000 1.2 --- NiceProject.nice 6 Aug 2003 13:15:27 -0000 1.3 *************** *** 53,59 **** ! void removeFromBuildSpec(String builderID) { ! throw new Exception("not implemented yet"); /* IProjectDescription description = getProject().getDescription(); --- 53,63 ---- ! void removeFromBuildSpec(String builderID) { ! let description = project.getDescription(); ! let commands = description.getBuildSpec(); ! let newCommands = commands.filter(ICommand c => ! c.getBuilderName().equals(builderID)); ! description.setBuildSpec(newCommands); ! project.setDescription(description, null); /* IProjectDescription description = getProject().getDescription(); |
From: <ag...@us...> - 2003-08-06 12:28:42
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/util In directory sc8-pr-cvs1:/tmp/cvs-serv9607/src/nice/eclipse/util Modified Files: Resources.properties _util.nice Log Message: minor changes Index: Resources.properties =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/util/Resources.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Resources.properties 1 Aug 2003 20:09:43 -0000 1.1 --- Resources.properties 6 Aug 2003 12:28:39 -0000 1.2 *************** *** 8,10 **** WizardNewProjectCreationPage.pageName=Create Nice Project WizardNewProjectCreationPage.pageTitle=Nice Project ! WizardNewProjectCreationPage.pageDescription=Create a new Nice Project \ No newline at end of file --- 8,11 ---- WizardNewProjectCreationPage.pageName=Create Nice Project WizardNewProjectCreationPage.pageTitle=Nice Project ! WizardNewProjectCreationPage.pageDescription=Create a new Nice Project ! Index: _util.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/util/_util.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _util.nice 1 Aug 2003 20:09:43 -0000 1.1 --- _util.nice 6 Aug 2003 12:28:39 -0000 1.2 *************** *** 22,24 **** ! IWorkspace getWorkspace() = native IWorkspace ResourcesPlugin.getWorkspace(); \ No newline at end of file --- 22,24 ---- ! IWorkspace getWorkspace() = native IWorkspace ResourcesPlugin.getWorkspace(); |
From: <ag...@us...> - 2003-08-06 12:28:42
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/core In directory sc8-pr-cvs1:/tmp/cvs-serv9607/src/nice/eclipse/core Modified Files: NiceProject.nice _core.nice Log Message: minor changes Index: NiceProject.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/core/NiceProject.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NiceProject.nice 1 Aug 2003 20:09:42 -0000 1.1 --- NiceProject.nice 6 Aug 2003 12:28:39 -0000 1.2 *************** *** 26,30 **** } ! deconfigure() {} getProject() = project; --- 26,32 ---- } ! deconfigure() { ! this.removeFromBuildSpec(NICE_BUILDER_ID); ! } getProject() = project; *************** *** 48,51 **** --- 50,82 ---- } } + + + + + void removeFromBuildSpec(String builderID) { + throw new Exception("not implemented yet"); + /* + IProjectDescription description = getProject().getDescription(); + ICommand[] commands = description.getBuildSpec(); + for (int i = 0; i < commands.length; ++i) { + if (commands[i].getBuilderName().equals(builderID)) { + ICommand[] newCommands = new ICommand[commands.length - 1]; + System.arraycopy(commands, 0, newCommands, 0, i); + System.arraycopy( + commands, + i + 1, + newCommands, + i, + commands.length - i - 1); + description.setBuildSpec(newCommands); + getProject().setDescription(description, null); + return; + } + } + + */ + } + + Index: _core.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/core/_core.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _core.nice 1 Aug 2003 20:09:42 -0000 1.1 --- _core.nice 6 Aug 2003 12:28:39 -0000 1.2 *************** *** 27,30 **** --- 27,31 ---- // force to compile + import nice.eclipse.ui; import nice.eclipse.ui.wizards; import nice.eclipse.ui.views; |
From: <ag...@us...> - 2003-08-06 12:28:42
|
Update of /cvsroot/nice/eclipse/src In directory sc8-pr-cvs1:/tmp/cvs-serv9607/src Modified Files: plugin.xml Log Message: minor changes Index: plugin.xml =================================================================== RCS file: /cvsroot/nice/eclipse/src/plugin.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plugin.xml 3 Aug 2003 21:12:30 -0000 1.2 --- plugin.xml 6 Aug 2003 12:28:39 -0000 1.3 *************** *** 3,7 **** id="net.sf.nice" name="Nice Plug-in" ! version="0.1.5" provider-name="Alex Greif" class="nice.eclipse.core.NicePlugin"> --- 3,7 ---- id="net.sf.nice" name="Nice Plug-in" ! version="0.0.0" provider-name="Alex Greif" class="nice.eclipse.core.NicePlugin"> |
From: <ag...@us...> - 2003-08-06 06:56:10
|
Update of /cvsroot/nice/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv23457 Modified Files: build.xml Log Message: removed carbon.swt Index: build.xml =================================================================== RCS file: /cvsroot/nice/eclipse/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** build.xml 5 Aug 2003 18:38:18 -0000 1.5 --- build.xml 6 Aug 2003 06:56:07 -0000 1.6 *************** *** 132,136 **** <include name="org.eclipse.swt*/**/*.jar"/> </fileset> - <pathelement location="${eclipse.home}/plugins/org.eclipse.swt.carbon_${eclipse.version}/ws/carbon/swt.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.text_${eclipse.version}/text.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.jface_${eclipse.version}/jface.jar"/> --- 132,135 ---- |
From: <ag...@us...> - 2003-08-05 18:38:23
|
Update of /cvsroot/nice/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv2105 Modified Files: build.xml Log Message: plugin version is set to 0.0.0 istead of _plugin.version_. Now this is a valid version number. lib/nice.jar is now included in the distribution. Index: build.xml =================================================================== RCS file: /cvsroot/nice/eclipse/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** build.xml 5 Aug 2003 18:06:23 -0000 1.4 --- build.xml 5 Aug 2003 18:38:18 -0000 1.5 *************** *** 132,135 **** --- 132,136 ---- <include name="org.eclipse.swt*/**/*.jar"/> </fileset> + <pathelement location="${eclipse.home}/plugins/org.eclipse.swt.carbon_${eclipse.version}/ws/carbon/swt.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.text_${eclipse.version}/text.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.jface_${eclipse.version}/jface.jar"/> *************** *** 143,147 **** </classpath> </nicec> ! <jar destfile="${build.dir}/${plugin.jar.name}" basedir="${src.dir}" --- 144,148 ---- </classpath> </nicec> ! <jar destfile="${build.dir}/${plugin.jar.name}" basedir="${src.dir}" *************** *** 162,167 **** <move file="${build.dir}/${plugin.jar.name}" todir="${plugin.dir}"/> <copy file="${src.dir}/${plugin.manifest.name}" todir="${plugin.dir}"/> ! <replace file="${plugin.dir}/${plugin.manifest.name}" token="_plugin.version_" value="${plugin.version}"/> <property name="plugin.tar" value="${dist.dir}/${plugin.id.version}.tar"/> --- 163,172 ---- <move file="${build.dir}/${plugin.jar.name}" todir="${plugin.dir}"/> <copy file="${src.dir}/${plugin.manifest.name}" todir="${plugin.dir}"/> ! <replace file="${plugin.dir}/${plugin.manifest.name}" token="0.0.0" value="${plugin.version}"/> + <property name="plugin.lib.dir" value="${plugin.dir}/lib"/> + <mkdir dir="${plugin.lib.dir}"/> + <copy file="${nice.runtime}" tofile="${plugin.lib.dir}/nice.jar"/> + <property name="plugin.tar" value="${dist.dir}/${plugin.id.version}.tar"/> |
From: <ag...@us...> - 2003-08-05 18:06:26
|
Update of /cvsroot/nice/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv28613 Modified Files: build.xml Log Message: Resources.properties is added to the plugin jar Index: build.xml =================================================================== RCS file: /cvsroot/nice/eclipse/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 5 Aug 2003 11:23:20 -0000 1.3 --- build.xml 5 Aug 2003 18:06:23 -0000 1.4 *************** *** 144,147 **** --- 144,151 ---- </nicec> + <jar destfile="${build.dir}/${plugin.jar.name}" + basedir="${src.dir}" + update="yes" + includes="nice/eclipse/util/Resources.properties"/> </target> |
From: <ag...@us...> - 2003-08-05 11:23:23
|
Update of /cvsroot/nice/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv20177 Modified Files: build.xml Log Message: fixed the swt.jar problem Index: build.xml =================================================================== RCS file: /cvsroot/nice/eclipse/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 5 Aug 2003 09:40:13 -0000 1.2 --- build.xml 5 Aug 2003 11:23:20 -0000 1.3 *************** *** 129,133 **** <pathelement location="${eclipse.home}/plugins/org.eclipse.core.resources_${eclipse.version}/resources.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.ui_${eclipse.version}/ui.jar"/> ! <pathelement location="${eclipse.home}/plugins/org.eclipse.swt.carbon_${eclipse.version}/ws/carbon/swt.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.text_${eclipse.version}/text.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.jface_${eclipse.version}/jface.jar"/> --- 129,135 ---- <pathelement location="${eclipse.home}/plugins/org.eclipse.core.resources_${eclipse.version}/resources.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.ui_${eclipse.version}/ui.jar"/> ! <fileset dir="${eclipse.home}/plugins"> ! <include name="org.eclipse.swt*/**/*.jar"/> ! </fileset> <pathelement location="${eclipse.home}/plugins/org.eclipse.text_${eclipse.version}/text.jar"/> <pathelement location="${eclipse.home}/plugins/org.eclipse.jface_${eclipse.version}/jface.jar"/> |
From: <ag...@us...> - 2003-08-05 09:40:17
|
Update of /cvsroot/nice/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv4580 Modified Files: build.xml Added Files: nice_plugin_build.properties Log Message: initial checkin of the ant build script --- NEW FILE: nice_plugin_build.properties --- #nice.runtime = /Users/agreif/share/java/nice.jar #eclipse.home = /Volumes/data/app/eclipse Index: build.xml =================================================================== RCS file: /cvsroot/nice/eclipse/build.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** build.xml 1 Aug 2003 19:24:32 -0000 1.1.1.1 --- build.xml 5 Aug 2003 09:40:13 -0000 1.2 *************** *** 1 **** --- 1,184 ---- <?xml version="1.0" encoding="UTF-8"?> + + + <!-- + /**************************************************************************/ + /* Nice Eclipse-Plugin */ + /* (c) Alex Greif 2003 */ + /* */ + /* This program is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU General Public License as published by */ + /* the Free Software Foundation; either version 2 of the License, or */ + /* (at your option) any later version. */ + /* */ + /**************************************************************************/ + --> + + + + <project default="dist" basedir="."> + + + + <property name="build.properties" value="nice_plugin_build.properties"/> + <property file="${build.properties}"/> + + <property name="main.package" value="nice.eclipse.core"/> + <property name="plugin.jar.name" value="niceplugin.jar"/> + + <property name="src.dir" value="src"/> + + <property name="build.dir" value="build"/> + + <property name="dist.dir" value="dist"/> + + <property name="plugin.id" value="net.sf.nice"/> + <property name="plugin.version" value="0.1.6"/> + <property name="plugin.id.version" value="${plugin.id}_${plugin.version}"/> + <property name="plugin.dir" value="${build.dir}/${plugin.id.version}"/> + <property name="plugin.manifest.name" value="plugin.xml"/> + + + + + + + <target name="clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> + </target> + + + + <target name="check-nice-runtime"> + <fail unless="nice.runtime"> + please set the "nice.runtime" property in + the file "${build.properties}". It must point to the + nice runtime file "nice.jar". You can download it from + http://sourceforge.net/projects/nice/ + </fail> + + <echo message="nice runtime: ${nice.runtime}"/> + <!-- The task definition for the Nice compile task --> + <path id="classpath"> + <pathelement location="${nice.runtime}"/> + </path> + <taskdef name="nicec" + classname="nice.tools.ant.Nicec" + classpathref="classpath"/> + </target> + + + <target name="check-eclipse-home"> + <fail unless="eclipse.home"> + please set the "eclipse.home" property in + the file "${build.properties}". It must point to the + eclipse home folder + </fail> + <echo message="eclipse home: ${eclipse.home}"/> + </target> + + + + + + <target name="init" depends="check-nice-runtime,check-eclipse-home,clean"> + <mkdir dir="${build.dir}"/> + <mkdir dir="${dist.dir}"/> + </target> + + + + + <target name="check-eclipse-properties" depends="check-eclipse-home,clean"> + <property name="eclipse.properties" value="${build.dir}/eclipse.properties"/> + <copy file="${eclipse.home}/.eclipseproduct" tofile="${eclipse.properties}"/> + <!-- get rid of whitespaces --> + <replace file="${eclipse.properties}" token=" " value=""/> + <replace file="${eclipse.properties}" token="\t" value=""/> + + <!-- rename properties --> + <replace file="${eclipse.properties}" token="version" value="eclipse.version"/> + + <property file="${eclipse.properties}"/> + + <fail unless="eclipse.version"> + eclipse version not found. + Check whether there is a file ".eclipseproduct" in eclipse home. + If the file is missing, then please report a bugreport at + http://sourceforge.net/tracker/?group_id=12788&atid=112788 + include your platform and eclipse version + thanks. + </fail> + <echo message="eclipse version: ${eclipse.version}"/> + + </target> + + + + + + + + <target name="compile" depends="check-eclipse-properties,init"> + <nicec package="${main.package}" + sourcepath="${src.dir}" + destination="${build.dir}" + jar="${build.dir}/${plugin.jar.name}"> + <classpath> + <pathelement location="${eclipse.home}/plugins/org.eclipse.core.resources_${eclipse.version}/resources.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.ui_${eclipse.version}/ui.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.swt.carbon_${eclipse.version}/ws/carbon/swt.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.text_${eclipse.version}/text.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.jface_${eclipse.version}/jface.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.jface.text_${eclipse.version}/jfacetext.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.ui.views_${eclipse.version}/views.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.ui.workbench_${eclipse.version}/workbench.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.ui.workbench.texteditor_${eclipse.version}/texteditor.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.ui.editors_${eclipse.version}/editors.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.debug.ui_${eclipse.version}/dtui.jar"/> + <pathelement location="${eclipse.home}/plugins/org.eclipse.core.runtime_${eclipse.version}/runtime.jar"/> + </classpath> + </nicec> + + </target> + + + + + + + + + + <target name="dist" depends="compile"> + <mkdir dir="${plugin.dir}"/> + <move file="${build.dir}/${plugin.jar.name}" todir="${plugin.dir}"/> + <copy file="${src.dir}/${plugin.manifest.name}" todir="${plugin.dir}"/> + <replace file="${plugin.dir}/${plugin.manifest.name}" token="_plugin.version_" value="${plugin.version}"/> + + + <property name="plugin.tar" value="${dist.dir}/${plugin.id.version}.tar"/> + <tar destfile="${plugin.tar}" basedir="${build.dir}" includes="${plugin.id.version}/**"/> + <gzip src="${plugin.tar}" zipfile="${dist.dir}/${plugin.id.version}.tgz"/> + + <zip destfile="${dist.dir}/${plugin.id.version}.zip" basedir="${build.dir}" includes="${plugin.id.version}/**"/> + + <echo> + following files were placed in folder ${dist.dir}: + ${plugin.id.version}.tgz + ${plugin.id.version}.tar + ${plugin.id.version}.zip + </echo> + </target> + + + + + + + + </project> + + + |
From: <ag...@us...> - 2003-08-03 21:12:33
|
Update of /cvsroot/nice/eclipse/src In directory sc8-pr-cvs1:/tmp/cvs-serv18182/src Modified Files: plugin.xml Log Message: all project related problems are displayed too Index: plugin.xml =================================================================== RCS file: /cvsroot/nice/eclipse/src/plugin.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** plugin.xml 1 Aug 2003 20:09:42 -0000 1.1 --- plugin.xml 3 Aug 2003 21:12:30 -0000 1.2 *************** *** 3,7 **** id="net.sf.nice" name="Nice Plug-in" ! version="0.1.4" provider-name="Alex Greif" class="nice.eclipse.core.NicePlugin"> --- 3,7 ---- id="net.sf.nice" name="Nice Plug-in" ! version="0.1.5" provider-name="Alex Greif" class="nice.eclipse.core.NicePlugin"> |
From: <ag...@us...> - 2003-08-03 17:55:42
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/core/builder In directory sc8-pr-cvs1:/tmp/cvs-serv21012/src/nice/eclipse/core/builder Modified Files: NiceBuilder.nice Added Files: NiceBuildNotifier.nice NicePluginCompilationListener.nice Log Message: general project-scope warnings are reported in Problems view --- NEW FILE: NiceBuildNotifier.nice --- /**************************************************************************/ /* Nice Eclipse-Plugin */ /* (c) Alex Greif 2003 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package nice.eclipse.core.builder; public class NiceBuildNotifier { ?IProgressMonitor monitor; IProject project; int workDone = 0; int totalWork = 1000000; float proportionComplete = 0f; void begin() { if (monitor == null) return; notNull(monitor).beginTask("", totalWork); //$NON-NLS-1$ } void checkCancel() { if (monitor == null) return; if (notNull(monitor).isCanceled()) throw new OperationCanceledException(); } public void done() { this.updateProgress(1.0f); if (monitor == null) return; notNull(monitor).done(); } public void updateProgress(float newProportionComplete) { if (newProportionComplete > proportionComplete) { proportionComplete = Math.min(newProportionComplete, 1.0f); int work = Math.round(proportionComplete * totalWork); if (work > workDone) { if (monitor == null) return; notNull(monitor).worked(work - workDone); workDone = work; } } } public void updateProgressDelta(float proportionWorked) { this.updateProgress(proportionComplete + proportionWorked); } } --- NEW FILE: NicePluginCompilationListener.nice --- /**************************************************************************/ /* Nice Eclipse-Plugin */ /* (c) Alex Greif 2003 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package nice.eclipse.core.builder; class NicePluginCompilationListener implements CompilationListener { ?IProgressMonitor monitor; NiceBuildNotifier notifier; IProject project; error(location, message) { //println("nicec error: "+message); IResource resource = project; try { IMarker marker = resource.createMarker(NICE_MODEL_PROBLEM_MARKER); marker.setAttribute(IMarker.MESSAGE, message); marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); } catch (Throwable e) { e.printStackTrace(); } } error(loc...@Lo...urce, message) { IResource resource = this.getAffectedResource(location); //println("nicec error in source: "+resource+" line: "+location.getLine()+":"+ // location.getColumn()+"\n"+message); try { IMarker marker = resource.createMarker(NICE_MODEL_PROBLEM_MARKER); marker.setAttribute(IMarker.MESSAGE, message); marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); marker.setAttribute(IMarker.LINE_NUMBER, location.getLine()); marker.setAttribute(IMarker.CHAR_START, location.getColumn()); } catch (Throwable e) { e.printStackTrace(); } } warning(location, message) { //println("nicec warning: "+message); IResource resource = project; try { IMarker marker = resource.createMarker(NICE_MODEL_PROBLEM_MARKER); marker.setAttribute(IMarker.MESSAGE, message); marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING); } catch (CoreException e) { e.printStackTrace(); } } warning(loc...@Lo...urce, message) { IResource resource = this.getAffectedResource(location); //println("nicec warning in source: "+resource+" line: "+location.getLine()+":"+ // location.getColumn()+"\n"+message); try { IMarker marker = resource.createMarker(NICE_MODEL_PROBLEM_MARKER); marker.setAttribute(IMarker.MESSAGE, message); marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING); marker.setAttribute(IMarker.LINE_NUMBER, location.getLine()); marker.setAttribute(IMarker.CHAR_START, location.getColumn()); } catch (CoreException e) { e.printStackTrace(); } } /** A bug occured in the compiler. @param url the adress where a bug report should be submitted. */ bug(stackTrace, url) { System.out.println( "nicec bug stackTrace: " + stackTrace + " url: " + url); } /** Reports the progress of compilation. phase can be: parsing, type-checking, generating code, ... the package can be null if the phase applies to the whole program (testing dispatch, creating the archive, compiling to native code, ...). */ progress(packageName, phase) { let monitor = this.monitor; if (monitor == null) return; monitor.subTask("" + phase + " package: " + packageName); } /** Gives an approximation of how much of the compilation has been completed. */ progress(proportion) { notifier.updateProgress(proportion); } IResource getAffectedResource(Location); getAffectedResource(location) { throw new RuntimeException("getAffectedResource() not implemented"); } getAffectedResource(loc...@Lo...urce) { String projectPath = project.getLocation().toFile().getAbsolutePath(); String resourcePath = location.getFile().getAbsolutePath(); Path path = new Path(resourcePath.substring(projectPath.length())); return project.getFile(path); } } Index: NiceBuilder.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/core/builder/NiceBuilder.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NiceBuilder.nice 1 Aug 2003 20:09:42 -0000 1.1 --- NiceBuilder.nice 3 Aug 2003 17:55:38 -0000 1.2 *************** *** 18,22 **** IProject currentProject = cast(null); ?IProgressMonitor monitor = cast(null); ! BuildNotifier notifier = cast(null); build(kind, argsMap, aMonitor) { --- 18,22 ---- IProject currentProject = cast(null); ?IProgressMonitor monitor = cast(null); ! NiceBuildNotifier notifier = cast(null); build(kind, argsMap, aMonitor) { *************** *** 27,31 **** // return new IProject[0]; ! notifier = new BuildNotifier(monitor: monitor, project: currentProject); notifier.begin(); notifier.checkCancel(); --- 27,31 ---- // return new IProject[0]; ! notifier = new NiceBuildNotifier(monitor: monitor, project: currentProject); notifier.begin(); notifier.checkCancel(); *************** *** 89,176 **** - class NicePluginCompilationListener implements CompilationListener { - ?IProgressMonitor monitor; - BuildNotifier notifier; - IProject project; - - error(location, message) {println("nicec error: "+message);} - error(loc...@Lo...urce, message) { - IResource resource = this.getAffectedResource(location); - //println("nicec error in source: "+resource+" line: "+location.getLine()+":"+ - // location.getColumn()+"\n"+message); - try { - IMarker marker = resource.createMarker(NICE_MODEL_PROBLEM_MARKER); - marker.setAttribute(IMarker.MESSAGE, message); - marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); - marker.setAttribute(IMarker.LINE_NUMBER, location.getLine()); - marker.setAttribute(IMarker.CHAR_START, location.getColumn()); - } catch (Throwable e) { - e.printStackTrace(); - } - } - - warning(location, message) {println("nicec warning: "+message);} - warning(loc...@Lo...urce, message) { - IResource resource = this.getAffectedResource(location); - //println("nicec warning in source: "+resource+" line: "+location.getLine()+":"+ - // location.getColumn()+"\n"+message); - try { - IMarker marker = resource.createMarker(NICE_MODEL_PROBLEM_MARKER); - marker.setAttribute(IMarker.MESSAGE, message); - marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING); - marker.setAttribute(IMarker.LINE_NUMBER, location.getLine()); - marker.setAttribute(IMarker.CHAR_START, location.getColumn()); - } catch (CoreException e) { - e.printStackTrace(); - } - } - - /** A bug occured in the compiler. - @param url the adress where a bug report should be submitted. - */ - bug(stackTrace, url) { - System.out.println( - "nicec bug stackTrace: " + stackTrace + " url: " + url); - } - - /** Reports the progress of compilation. - phase can be: parsing, type-checking, generating code, ... - the package can be null if the phase applies to the whole program - (testing dispatch, creating the archive, compiling to native code, ...). - */ - progress(packageName, phase) { - let monitor = this.monitor; - if (monitor == null) return; - monitor.subTask("" + phase + " package: " + packageName); - } - - /** Gives an approximation of how much of the compilation has been completed. - */ - progress(proportion) { - notifier.updateProgress(proportion); - } - - - IResource getAffectedResource(Location); - - getAffectedResource(location) { - throw new RuntimeException("getAffectedResource() not implemented"); - } - getAffectedResource(loc...@Lo...urce) { - String projectPath = project.getLocation().toFile().getAbsolutePath(); - String resourcePath = location.getFile().getAbsolutePath(); - Path path = new Path(resourcePath.substring(projectPath.length())); - return project.getFile(path); - } - - } - - - - - - - - --- 89,92 ---- *************** *** 182,236 **** - public class BuildNotifier { - ?IProgressMonitor monitor; - IProject project; - - int workDone = 0; - int totalWork = 1000000; - float proportionComplete = 0f; - - - - void begin() { - if (monitor == null) - return; - notNull(monitor).beginTask("", totalWork); //$NON-NLS-1$ - } - - - void checkCancel() { - if (monitor == null) - return; - if (notNull(monitor).isCanceled()) - throw new OperationCanceledException(); - } - - - public void done() { - this.updateProgress(1.0f); - if (monitor == null) - return; - notNull(monitor).done(); - } - - - public void updateProgress(float newProportionComplete) { - if (newProportionComplete > proportionComplete) { - proportionComplete = Math.min(newProportionComplete, 1.0f); - int work = Math.round(proportionComplete * totalWork); - if (work > workDone) { - if (monitor == null) - return; - notNull(monitor).worked(work - workDone); - workDone = work; - } - } - } - - public void updateProgressDelta(float proportionWorked) { - this.updateProgress(proportionComplete + proportionWorked); - } - - } --- 98,101 ---- |
From: Daniel B. <Dan...@in...> - 2003-08-01 20:20:06
|
Hi, As you've seen, the source for the eclipse plugin was just added to a new module in the CVS repository. Are all of you interested in receiving commit messages for this project too? If not, just tell me. It is possible to exclude them (and maybe to have a different list for those commits). Cheers to Alex for this first version of the plugin! Daniel |
From: <ag...@us...> - 2003-08-01 20:10:01
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/util In directory sc8-pr-cvs1:/tmp/cvs-serv31895/src/nice/eclipse/util Log Message: Directory /cvsroot/nice/eclipse/src/nice/eclipse/util added to the repository |
From: <ag...@us...> - 2003-08-01 20:10:00
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/core In directory sc8-pr-cvs1:/tmp/cvs-serv31895/src/nice/eclipse/core Log Message: Directory /cvsroot/nice/eclipse/src/nice/eclipse/core added to the repository |
From: <ag...@us...> - 2003-08-01 20:10:00
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/ui In directory sc8-pr-cvs1:/tmp/cvs-serv31895/src/nice/eclipse/ui Log Message: Directory /cvsroot/nice/eclipse/src/nice/eclipse/ui added to the repository |
From: <ag...@us...> - 2003-08-01 20:09:47
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/ui/properties In directory sc8-pr-cvs1:/tmp/cvs-serv919/src/nice/eclipse/ui/properties Added Files: NiceProjectPropertyPage.nice _properties.nice Log Message: initial import --- NEW FILE: NiceProjectPropertyPage.nice --- /**************************************************************************/ /* Nice Eclipse-Plugin */ /* (c) Alex Greif 2003 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package nice.eclipse.ui.properties; Control createContents(org.eclipse.jface.preference.PreferencePage, Composite) = native Control org.eclipse.jface.preference.PreferencePage.createContents(Composite); <T> void setLayoutData(Control, T) = native void Control.setLayoutData(Object); void addModifyListener(Text, ModifyListener) = native void Text.addModifyListener(ModifyListener); class NiceProjectPropertyPage extends PropertyPage implements ModifyListener { Text packageTextField = cast(null); Text classpathTextField = cast(null); Text sourcepathTextField = cast(null); Text jarTextField = cast(null); createContents(parentComposite) { this.noDefaultAndApplyButton(); ?NiceProject workingProject = this.getNiceProject(this.getElement()); if (workingProject == null || ! workingProject.getProject().isOpen()) return this.createClosedProjectPageContents(parentComposite); return this.createProjectPageContents(parentComposite); } // protected noDefaultAndApplyButton() {super;} ?NiceProject getNiceProject(?IAdaptable); //getNiceProject(selectedElement@NiceProject) = selectedElement; getNiceProject(selectedElement) { println("### " + selectedElement); return null; } getNiceProject(aProject@IProject) { try { if (aProject.hasNature(NICE_NATURE_ID)) { NiceProject niceProject = new NiceProject(); niceProject.setProject(aProject); return niceProject; } } catch (CoreException e) { e.printStackTrace(); } return null; } Control createClosedProjectPageContents(Composite parentComposite) { Label label = new Label(parentComposite, SWT.NONE); label.setText("ClosedNicePrjectPropertyPage"); //$NON-NLS-1$ return label; } Control createProjectPageContents(Composite parentComposite) { Composite compositeTextField = this.createComposite(parentComposite, 2); this.createLabel(compositeTextField, "Main package"); //$NON-NLS-1$ packageTextField = this.createTextField(compositeTextField); compositeTextField = this.createComposite(parentComposite, 2); this.createLabel(compositeTextField, "classpath"); //$NON-NLS-1$ classpathTextField = this.createTextField(compositeTextField); compositeTextField = this.createComposite(parentComposite, 2); this.createLabel(compositeTextField, "sourcepath"); //$NON-NLS-1$ sourcepathTextField = this.createTextField(compositeTextField); compositeTextField = this.createComposite(parentComposite, 2); this.createLabel(compositeTextField, "compiled jar name"); //$NON-NLS-1$ jarTextField = this.createTextField(compositeTextField); this.initializeValues(); return new Composite(parentComposite, SWT.NULL); } Composite createComposite(Composite parent, int numColumns) { Composite composite = new Composite(parent, SWT.NULL); //GridLayout GridLayout layout = new GridLayout(); layout.numColumns = numColumns; composite.setLayout(layout); //GridData GridData data = new GridData(); data.verticalAlignment = GridData.FILL; data.horizontalAlignment = GridData.FILL; composite.setLayoutData(data); return composite; } Label createLabel(Composite parent, String text) { Label label = new Label(parent, SWT.LEFT); label.setText(text); GridData data = new GridData(); data.horizontalSpan = 2; data.horizontalAlignment = GridData.FILL; label.setLayoutData(data); return label; } Text createTextField(Composite parent) { Text text = new Text(parent, SWT.SINGLE | SWT.BORDER); text.addModifyListener(this); GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; data.verticalAlignment = GridData.CENTER; data.grabExcessVerticalSpace = false; text.setLayoutData(data); return text; } void initializeValues() { try { IResource resource = cast(this.getElement()); packageTextField.setText(getMainPackageProperty(resource)); classpathTextField.setText(getClasspathProperty(resource)); sourcepathTextField.setText(getSourcepathProperty(resource)); jarTextField.setText(getJarNameProperty(resource)); } catch (CoreException e) { e.printStackTrace(); } } performOk() { try { this.storeValues(); } catch (CoreException e) { e.printStackTrace(); return false; } return true; } void storeValues() { IResource resource = cast(this.getElement()); resource.setPersistentProperty(MAIN_PACKAGE_STORE_ID_QNAME, packageTextField.getText()); resource.setPersistentProperty(CLASSPATH_STORE_ID_QNAME, classpathTextField.getText()); resource.setPersistentProperty(SOURCEPATH_STORE_ID_QNAME, sourcepathTextField.getText()); resource.setPersistentProperty(JAR_NAME_STORE_ID_QNAME, jarTextField.getText()); } // protected performDefaults() {super;} modifyText(modifyEvent) { //Do nothing on a modification in this example } } --- NEW FILE: _properties.nice --- /**************************************************************************/ /* Nice Eclipse-Plugin */ /* (c) Alex Greif 2003 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package nice.eclipse.ui.properties; import org.eclipse.ui.dialogs.*; import org.eclipse.swt.widgets.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.events.*; import nice.eclipse.core; |
From: <ag...@us...> - 2003-08-01 20:09:46
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/ui/views In directory sc8-pr-cvs1:/tmp/cvs-serv919/src/nice/eclipse/ui/views Added Files: NiceResourcesView.nice _views.nice Log Message: initial import --- NEW FILE: NiceResourcesView.nice --- /**************************************************************************/ /* Nice Eclipse-Plugin */ /* (c) Alex Greif 2003 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package nice.eclipse.ui.views; class NiceResourcesView extends ViewPart implements ISetSelectionTarget, IMenuListener { TreeViewer treeViewer = cast(null); Action openTextEditorAction = cast(null); ?MainActionGroup mainActionGroup = null; createPartControl(parentComposite) { treeViewer = new TreeViewer(parentComposite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); treeViewer.addFilter(new NiceResourcesViewerFilter()); treeViewer.setContentProvider(new WorkbenchContentProvider()); treeViewer.setLabelProvider(new WorkbenchLabelProvider()); treeViewer.setInput(this.getInitialInput()); treeViewer.addOpenListener(new NiceResourcesViewOpenListener(view: this)); MenuManager menuMgr = new MenuManager("net.sf.nice.ui.PopupMenu"); //$NON-NLS-1$ menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(this); Menu fContextMenu = menuMgr.createContextMenu(treeViewer.getTree()); treeViewer.getTree().setMenu(fContextMenu); // Register viewer with site. This must be done before making the actions. IWorkbenchPartSite site = this.getSite(); site.registerContextMenu(menuMgr, treeViewer); } TreeViewer getViewer() = treeViewer; Object getInitialInput() { IAdaptable input = this.getSite().getPage().getInput(); ?IResource resource = null; if (input instanceof IResource) { resource = cast(input); } else { resource = cast(input.getAdapter(IResource.class)); } if (resource != null) { int type = resource.getType(); if (type == IResource.FILE) return cast(resource.getParent()); else if (type == IResource.FOLDER || type == IResource.PROJECT || type == IResource.ROOT) return cast(resource); } return cast(getWorkspace().getRoot()); } setFocus() { treeViewer.getControl().setFocus(); } menuAboutToShow(menuManager) { if (menuManager == null) return; IStructuredSelection selection = cast(treeViewer.getSelection()); this.getMainActionGroup().setContext(new ActionContext(selection)); this.getMainActionGroup().fillContextMenu(menuManager); this.getMainActionGroup().setContext(null); } selectReveal(selection) { treeViewer.setSelection(selection, true); } MainActionGroup getMainActionGroup() { if (mainActionGroup == null) { // lazy initialization, because this.getSite() delivers null in constructor mainActionGroup = new MainActionGroup(niceResourcesView: this); } return notNull(mainActionGroup); } } void setInput(TreeViewer, IWorkspaceRoot) = native void org.eclipse.jface.viewers.StructuredViewer.setInput(Object); class NiceResourcesViewerFilter extends ViewerFilter { select(viewer, parent, element) { //System.out.println("NiceViewerFilter.select() element: "+element); if (element instanceof IFolder) return true; IAdaptable adaptable = cast(element); ?Object niceElement = adaptable.getAdapter(INiceElement.class); //System.out.println(" niceElement: "+niceElement); if (niceElement != null) return true; return false; } } class NiceResourcesViewOpenListener implements IOpenListener { NiceResourcesView view; open(openEvent) { IStructuredSelection sel = cast(openEvent.getSelection()); view.getMainActionGroup().runDefaultAction(sel); } } void open(IOpenListener, OpenEvent) = native void IOpenListener.open(OpenEvent); class MainActionGroup extends ActionGroup { NiceResourcesView niceResourcesView; OpenActionGroup openActionGroup = cast(null); RefreshAction refreshAction = cast(null); // initializer { NiceResourceNavigator adapter = new NiceResourceNavigator(niceResourcesView: niceResourcesView) ; openActionGroup = new OpenActionGroup(adapter); Shell shell = niceResourcesView.getSite().getShell(); refreshAction = new RefreshAction(shell) ; } fillContextMenu(menuManager) { openActionGroup.fillContextMenu(menuManager); menuManager.add(new Separator()); menuManager.add(refreshAction) ; menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS + "-end")); //$NON-NLS-1$ } setContext(actionContext) { openActionGroup.setContext(actionContext); } void runDefaultAction(IStructuredSelection structuredSelection) { openActionGroup.runDefaultAction(structuredSelection); } } void fillContextMenu(ActionGroup, IMenuManager) = native void ActionGroup.fillContextMenu(IMenuManager); class NiceResourceNavigator extends ResourceNavigator { NiceResourcesView niceResourcesView; getViewer() = niceResourcesView.getViewer(); getViewSite() = niceResourcesView.getViewSite(); getSite() = niceResourcesView.getSite(); getTitle() = niceResourcesView.getTitle(); getTitleImage() = niceResourcesView.getTitleImage(); getTitleToolTip() = niceResourcesView.getTitleToolTip(); } getAdapter(navi@NiceResourceNavigator(ResourceNavigator),clazz) = navi.niceResourcesView.getAdapter(clazz); --- NEW FILE: _views.nice --- /**************************************************************************/ /* Nice Eclipse-Plugin */ /* (c) Alex Greif 2003 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package nice.eclipse.ui.views; import org.eclipse.jface.util.*; import org.eclipse.jface.viewers.*; import org.eclipse.jface.action.*; import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.ui.*; import org.eclipse.ui.model.*; import org.eclipse.ui.part.*; import org.eclipse.ui.actions.*; import org.eclipse.ui.part.*; import org.eclipse.ui.views.navigator.*; import nice.eclipse.core.element; |