Today I decided to go hunting through the Eclipse preferences and I found exactly what I was looking for:
![]() |
Naming Eclipse Workspaces |
After setting names for all my workspaces, their titles are now useful:
One more Eclipse developer.
![]() |
Naming Eclipse Workspaces |
[Edit Jan 3, 2012: Orion has evolved significantly since this post was first written a year ago. Please see this post written by Felipe for an update.]
Yesterday I wrote a blog post which contains a few snippets of Ant code. If you have java-script enabled, those snippets should be nicely formatted with line numbers and some basic syntax highlighting.
Those code snippets are actually being shown using the Orion Editor embedded into my blog post. Granted, using the full editor here is a little over-kill since we aren't doing very much with it, but this was an interesting exercise.
Here is the javascript I wrote to do this:
org.eclipse.orion.client.editor/web/js/editor.js org.eclipse.orion.client.editor/web/js/model.js org.eclipse.orion.client.editor/web/samples/rulers.js org.eclipse.orion.client.editor/web/samples/styler.jsand minified it all using the Google Closure compiler. I hosted the resulting .js file on download.eclipse.org and added the following lines to the bottom of my blog post:
package.org.eclipse.pde.build.container.feature.all.xml
package.org.eclipse.pde.build.container.feature.linux.gtk.x86.xml
package.org.eclipse.pde.build.container.feature.macosx.cocoa.x86.xml
package.org.eclipse.pde.build.container.feature.win32.win32.x86.xml
git archive --format=tar --remote=/gitroot/e4/org.eclipse.orion.server.git master releng/org.eclipse.orion.releng | tar -xf -The build machine has local access to the git repository, if we were running from somewhere else, this would change to something like --remote=ssh://user@dev.eclipse.org/gitroot/...
<target name="getMapFiles" unless="skipMaps"> <mkdir dir="${buildDirectory}/maps" /> <exec executable="git" dir="${buildDirectory}/maps" output="${buildDirectory}/maps/maps.tar"> <arg line="archive -format=tar" /> <arg line="--remote=/gitroot/e4/org.eclipse.orion.server.git" /> <arg line="master releng/org.eclipse.orion.releng/maps" /> </exec> <untar src="${buildDirectory}/maps/maps.tar" dest="${buildDirectory}/maps" /> </target>Because the "| tar -xf -" we used earlier is a redirection done by the shell, that doesn't work when we invoke git from ant. Here we specify a file to hold the output of the archive command, this ends up being a tar file which we can just untar.
plugin@org.eclipse.orion.client.core=GIT,tag=v20110125-1800,\ repo=dev.eclipse.org:/gitroot/e4/org.eclipse.orion.client.git,\ path=bundles/org.eclipse.orion.client.core
Some notes:
<project name="CustomAssemble.overrides" default="noDefault">
<import file="${eclipse.pdebuild.templates}/headless-build/customAssembly.xml" />
<!-- every time gather.bin.parts is called, we will record the project being built -->
<target name="gather.bin.parts" >
<echo append="true" file="${buildDirectory}/built.list"
message="**/${projectName}.jar${line.separator}" />
</target>
<target name="post.gather.bin.parts" >
<property name="signingArchive" value="${buildDirectory}/${buildLabel}/sign-${buildId}.zip" />
<zip zipfile="${signingArchive}" basedir="${p2.build.repo}"
includesFile="${buildDirectory}/built.list" />
<!-- sign! -->
<ant antfile="${builder}/sign.xml" dir="${basedir}" target="signMasterFeature" >
<property name="signingArchive" value="${signingArchive}" />
</ant>
<!--unzip signed archive over top of the repository -->
<unzip dest="${p2.build.repo}" src="${signingArchive}" />
<!--update repository with new checksums for signed bundles -->
<p2.process.artifacts repositoryPath="file://${p2.build.repo}" />
</target>
</project>
Unhandled event loop exceptionAs indicated in the Eclipse FAQ, there is a simple workaround for this problem, edit your eclipse.ini file and add -XX:MaxPermSize=256m below the -vmargs line:
PermGen space
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-XX:MaxPermSize=256m
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
eclipse --launcher.openFile myFile.txt
This tells the launcher that if it is called with a command line that only contains arguments that don't start with "-", then those arguments should be treated as if they followed "--launcher.openFile"....
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Xms256m
-Xmx768m
eclipse myFile.txt
Relative paths will be resolved first against the current working directory, and second against the eclipse program directory.