<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>P0L0&#039;s Blog &#187; python</title>
	<atom:link href="http://p0l0.binware.org/index.php/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://p0l0.binware.org</link>
	<description>Opensource Projects and IT experiences</description>
	<lastBuildDate>Tue, 25 May 2010 06:24:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing TRAC with mod_wsgi using virtualenv</title>
		<link>http://p0l0.binware.org/index.php/2010/05/10/installing-trac-with-mod_wsgi-using-virtualenv/</link>
		<comments>http://p0l0.binware.org/index.php/2010/05/10/installing-trac-with-mod_wsgi-using-virtualenv/#comments</comments>
		<pubDate>Mon, 10 May 2010 19:33:03 +0000</pubDate>
		<dc:creator>P0L0</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[IT Security]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://p0l0.binware.org/?p=664</guid>
		<description><![CDATA[This guide is for installing Trac  as a user using virtualenv for a isolated Python environment so that the whole installation runs under a specific user.
First of all we need to install needed packages

apt-get install libapache2-mod-wsgi python-virtualenv python-setuptools

Once we have installed the required packages proceed to create the Python environment

mkdir /usr/local/trac
cd /usr/local/trac
virtualenv python

We now [...]]]></description>
			<content:encoded><![CDATA[<p>This guide is for installing <a href="http://trac.edgewall.org/" target="_blank">Trac </a> as a user using <a href="http://pypi.python.org/pypi/virtualenv/1.4.8" target="_blank">virtualenv</a> for a isolated Python environment so that the whole installation runs under a specific user.</p>
<p>First of all we need to install needed packages</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libapache2-mod-wsgi python-virtualenv python-setuptools</pre></div></div>

<p>Once we have installed the required packages proceed to create the Python environment</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>trac
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>trac
virtualenv python</pre></div></div>

<p>We now have the isolated Python environment locate under <strong>/usr/local/trac/python</strong>.</p>
<p>To make possible to use <strong>easy_install</strong> with repositories we need to upgrade easy_install. I use this to install Trac plugins directly from SVN.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>easy_install <span style="color: #660033;">-U</span> trunk</pre></div></div>

<p>We now can install trac 0.12 using the 0.12b1 SVN Tag (<strong>http://svn.edgewall.com/repos/trac/tags/trac-0.12b1</strong> or <strong>Trac==0.12b1</strong>) or directly from SVN Trunk:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>easy_install http:<span style="color: #000000; font-weight: bold;">//</span>svn.edgewall.org<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>trunk</pre></div></div>

<p>This will download and install the latest trunk version for Trac.</p>
<p>To have webaccess to the Trac projects, we need a <strong>.wsgi</strong> script, were we define where our local python environment is located:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># Not needed if mod_wsgi &gt;= 3.0</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span> = <span style="color: #dc143c;">sys</span>.<span style="color: black;">stderr</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Load Trac</span>
<span style="color: #ff7700;font-weight:bold;">import</span> trac.<span style="color: black;">web</span>.<span style="color: black;">main</span>
application = trac.<span style="color: black;">web</span>.<span style="color: black;">main</span>.<span style="color: black;">dispatch_request</span></pre></div></div>

<p>And finally we need to configure apache. If you want only one Trac project, you should define <strong>trac.env</strong> to the location of your trac, but if you want multiproject support, you must use <strong>trac.env_parent_dir</strong> (this is what I used)</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">virtualhost</span> *:<span style="color: #ff0000;">80</span>&gt;
    <span style="color: #00007f;">ServerName</span> trac.dns.com
&nbsp;
    <span style="color: #00007f;">DocumentRoot</span> /usr/local/trac/htdocs
    <span style="color: #00007f;">ErrorLog</span> /var/log/apache2/trac-error.log
    <span style="color: #00007f;">CustomLog</span> /var/log/apache2/trac-access.log combined
&nbsp;
    <span style="color: #adadad; font-style: italic;"># Trac Auth</span>
    &lt;<span style="color: #000000; font-weight:bold;">location</span> /&gt;
        <span style="color: #00007f;">AuthType</span> Basic
        <span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;Trac&quot;</span>
        <span style="color: #00007f;">AuthUserFile</span> /usr/local/trac/.htpasswd
        <span style="color: #00007f;">Require</span> valid-<span style="color: #00007f;">user</span>
    &lt; /location&gt;
&nbsp;
    <span style="color: #adadad; font-style: italic;">#Trac</span>
    <span style="color: #adadad; font-style: italic;">#Define ProcessGroup with user and group under which it should run</span>
    WSGIDaemonProcess trac <span style="color: #00007f;">user</span>=trac <span style="color: #00007f;">group</span>=trac python-path=/usr/local/trac/python/lib/python2.5/site-packages python-eggs=/usr/local/trac/python/cache
    WSGIScriptAlias / /usr/local/trac/htdocs/trac.wsgi
&nbsp;
    &lt;<span style="color: #000000; font-weight:bold;">directory</span> /usr/local/trac/htdocs&gt;
        WSGIProcessGroup trac
        WSGIApplicationGroup %{GLOBAL}
        <span style="color: #00007f;">SetEnv</span> trac.env_parent_dir /usr/local/trac/projects
    &lt;/<span style="color: #000000; font-weight:bold;">directory</span>&gt;
&lt;/<span style="color: #000000; font-weight:bold;">virtualhost</span>&gt;</pre></div></div>

<p>We need to create the user and change the permissions for <strong>/usr/local/trac</strong> for that user <strong>trac</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">adduser <span style="color: #660033;">--home</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>trac <span style="color: #660033;">--shell</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span> <span style="color: #660033;">--no-create-home</span> trac
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> trac:trac <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>trac</pre></div></div>

<p>If you get an error <strong>"ImportError: No module named simplejson"</strong> just install it using easy_install</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>easy_install simplejson</pre></div></div>




Share:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F&amp;partner=sociable" title="Print"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F&amp;title=Installing%20TRAC%20with%20mod_wsgi%20using%20virtualenv&amp;bodytext=This%20guide%20is%20for%20installing%20Trac%20%20as%20a%20user%20using%20virtualenv%20for%20a%20isolated%20Python%20environment%20so%20that%20the%20whole%20installation%20runs%20under%20a%20specific%20user.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20install%20needed%20packages%0D%0A%0D%0A%0D%0Aapt-get%20install%20libapache2-mod-wsgi%20pyt" title="Digg"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F&amp;title=Installing%20TRAC%20with%20mod_wsgi%20using%20virtualenv&amp;notes=This%20guide%20is%20for%20installing%20Trac%20%20as%20a%20user%20using%20virtualenv%20for%20a%20isolated%20Python%20environment%20so%20that%20the%20whole%20installation%20runs%20under%20a%20specific%20user.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20install%20needed%20packages%0D%0A%0D%0A%0D%0Aapt-get%20install%20libapache2-mod-wsgi%20pyt" title="del.icio.us"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F&amp;t=Installing%20TRAC%20with%20mod_wsgi%20using%20virtualenv" title="Facebook"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F&amp;title=Installing%20TRAC%20with%20mod_wsgi%20using%20virtualenv&amp;annotation=This%20guide%20is%20for%20installing%20Trac%20%20as%20a%20user%20using%20virtualenv%20for%20a%20isolated%20Python%20environment%20so%20that%20the%20whole%20installation%20runs%20under%20a%20specific%20user.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20install%20needed%20packages%0D%0A%0D%0A%0D%0Aapt-get%20install%20libapache2-mod-wsgi%20pyt" title="Google Bookmarks"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Installing%20TRAC%20with%20mod_wsgi%20using%20virtualenv&amp;body=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F" title="email"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F&amp;title=Installing%20TRAC%20with%20mod_wsgi%20using%20virtualenv&amp;source=P0L0%26%23039%3Bs+Blog+Opensource+Projects+and+IT+experiences&amp;summary=This%20guide%20is%20for%20installing%20Trac%20%20as%20a%20user%20using%20virtualenv%20for%20a%20isolated%20Python%20environment%20so%20that%20the%20whole%20installation%20runs%20under%20a%20specific%20user.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20install%20needed%20packages%0D%0A%0D%0A%0D%0Aapt-get%20install%20libapache2-mod-wsgi%20pyt" title="LinkedIn"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F" title="Meneame"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Installing%20TRAC%20with%20mod_wsgi%20using%20virtualenv%20-%20http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2010%2F05%2F10%2Finstalling-trac-with-mod_wsgi-using-virtualenv%2F" title="Twitter"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://p0l0.binware.org/index.php/2010/05/10/installing-trac-with-mod_wsgi-using-virtualenv/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eclipse Configuration for Web Development</title>
		<link>http://p0l0.binware.org/index.php/2009/07/28/eclipse-configuration-for-web-development/</link>
		<comments>http://p0l0.binware.org/index.php/2009/07/28/eclipse-configuration-for-web-development/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 19:11:17 +0000</pubDate>
		<dc:creator>P0L0</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[epic]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pydev]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[subversive]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[svnkit]]></category>

		<guid isPermaLink="false">http://p0l0.binware.org/?p=326</guid>
		<description><![CDATA[After trying very different IDE and many Eclipse IDE flawors, this is the best configuration I have found, and all the components are free.
First of all we need to download Eclipse Classic from the Eclipse website.
One of the first things we need to do is to change eclipse.ini, we will make it start faster and [...]]]></description>
			<content:encoded><![CDATA[<p>After trying very different IDE and many Eclipse IDE flawors, this is the best configuration I have found, and all the components are free.</p>
<p>First of all we need to download <a href="http://www.eclipse.org/downloads/" target="_blank">Eclipse Classic</a> from the Eclipse website.</p>
<p>One of the first things we need to do is to change eclipse.ini, we will make it start faster and increase the memory limit</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="ini" style="font-family:monospace;">--launcher.XXMaxPermSize
256m
-vm
/usr/bin/java
-vmargs
-Xms40m
-Xmx1024m</pre></td></tr></table></div>

<p>The path to Java VM depends on your installation and system, in windows you must search for "javaw.exe". Setting the path to Java VM makes that Eclipse stops searching for the Java VM every start, which makes the start faster.</p>
<p>Now we can start installing the required Plugins. In "Help->Install New Software..." we will add the following Update Sites.</p>
<ul>
<li>Aptana - http://update15.aptana.org/studio/25914/
<p style="text-align: center"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-install.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-install-300x94.png" alt="Aptana Install" title="Aptana Install" width="300" height="94" class="alignnone size-medium wp-image-339" /></a></p>
</li>
<li>Mylyn - http://download.eclipse.org/tools/mylyn/update/e3.4
<p style="text-align: center"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-mylyn-install.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-mylyn-install-300x161.png" alt="Mylyn Install" title="Mylyn Install" width="300" height="161" class="alignnone size-medium wp-image-366" /></a></p>
</li>
<li>Mylyn Extras - http://download.eclipse.org/tools/mylyn/update/extras
<p style="text-align: center"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-mylyn_extras-install1.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-mylyn_extras-install1-300x95.png" alt="Mylyn Extra Install" title="Mylyn Extra Install" width="300" height="95" class="alignnone size-medium wp-image-368" /></a></p>
</li>
<li>SVNKit - http://community.polarion.com/projects/subversive/download/eclipse/2.0/galileo-site/
<p style="text-align:center"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-svnkit-install.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-svnkit-install-300x131.png" alt="SVNKit Install" title="SVNKit Install" width="300" height="131" class="alignnone size-medium wp-image-370" /></a></p>
</li>
<li>EPIC (Perl) - http://e-p-i-c.sourceforge.net/updates/testing <em>optional, only if you need Perl</em>
<p style="text-align:center;"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-epic-install.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-epic-install-300x78.png" alt="EPIC Install" title="EPIC Install" width="300" height="78" class="alignnone size-medium wp-image-372" /></a></p>
</li>
</ul>
<p>You have noticed that at each start a Window Asking for Installing Addiontal Features. Now that we can start installing this features. For me the most important are:</p>
<ul>
<li>Aptana PHP
<p style="text-align: center;"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-php-install.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-php-install-300x153.png" alt="Aptana PHP Install" title="Aptana PHP Install" width="300" height="153" class="alignnone size-medium wp-image-373" /></a></p>
</li>
<li>Aptana PyDev <em>optional, only if you need Python</em>
<p style="text-align: center;"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-pydev-install.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-pydev-install-300x192.png" alt="Aptana PyDev Install" title="Aptana PyDev Install" width="300" height="192" class="alignnone size-medium wp-image-374" /></a></p>
</li>
<li>Ajax Libraries <em>You can select all or just the one you need</em>
<p style="text-align: center;"><a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-ajax-libraries-install.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-aptana-ajax-libraries-install-300x296.png" alt="Aptana Ajax Libraries Install" title="Aptana Ajax Libraries Install" width="300" height="296" class="alignnone size-medium wp-image-375" /></a></p>
</li>
</ul>
<p>After installing all needed plugins we can start with the configuration.</p>
<ol>
<li>General\Workspace
<ul>
<li>Text file encoding -> UTF-8</li>
<li>New text file line delimiter -> Unix</li>
</ul>
</li>
<li>General\Editors\Text Editors
<ul>
<li>Displayed tab width -> 4</li>
<li>Insert spaces for tabs -> True</li>
<li>Show line number -> True</li>
<li>Show print margin -> True</li>
<li>Print margin column -> 80</li>
</ul>
</li>
<li>General\Keys
<ul>
<li>Show Whitespace Characters (Text Editing) -> Binding: Ctrl+Alt+Space -> When: Editing Text</li>
</ul>
</li>
<li>
Aptana\Editors</p>
<ul>
<li>Formattings -> Insert selected proposal with 'Tab' key as well as 'Enter' key -> True</li>
<li>Tab Insertion -> Use spaces (current width is 4)</li>
</ul>
</li>
<li>Aptana\Editors\PHP
<ul>
<li>Create project file in new PHP project -> False</li>
</ul>
</li>
<li>Aptana\Editors\PHP\Formatting
<ul>
<li>Edit... -></p>
<ul>
<li>Profile Name -> ZendStandards</li>
<li>Control Statemets ->
<ul>
<li>Insert new line before 'else' in an 'if' statement -> False</li>
<li>Insert new line before 'catch' in an 'try' statement -> False</li>
<li>Insert new line before 'while' in an 'do' statement -> False</li>
<li>'if else' - Keep 'then' statement on same line -> False</li>
</ul>
</li>
<li>Braces ->
<ul>
<li>Method declaration -> Next line</li>
<li>Blocks -> Same line</li>
<li>Blocks in case statement -> Same line</li>
<li>'switch' statement -> Same line</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>Install/Update\Automatic Updates
<ul>
<li>Automatically find new updates and notify me -> True</li>
</ul>
</li>
<li>Team\SVN - SVN Client
<ul>
<li>SVN Client -> SVN Kit</li>
<li>SVN Client -> Use SVN Merge View -> True</li>
</ul>
</li>
<li>Team\SVN\Automatic Properties
<ul>
<li>Add: * -> svn:keywords=Id</li>
</ul>
</li>
</ol>
<p>I use the Aptana Perspective with this views:</p>
<ul>
<li>Right Top
<ul>
<li>Aptana Standard Views\Project</li>
</ul>
</li>
<li>Right Bottom
<ul>
<li>General\Outline</li>
<li>Aptana Standard Views\PHP Elements Views</li>
<li>Aptana Standard Views\References</li>
</ul>
</li>
<li>Bottom
<ul>
<li>General\Tasks</li>
<li>Aptana Standard Views\Validation</li>
<li>General\Console</li>
<li>Team\History</li>
<li>Team\SVN Properties</li>
<li>EPIC\RegExp <em>only if you installed EPIC</em></li>
</ul>
</li>
<li>Left
<ul>
<li>Tasks\Task List</li>
</ul>
</li>
</ul>
<p>I like that the Oultine is automatically expanded, so that I have an overview of the file at every moment, but Aptana does not autoexpand the Outline. I use the following workaround:</p>
<ul>
<li>Create a new <em>General Project</em> called "_Monkey"</li>
<li>Create a folder called <em>scripts</em></li>
<li>Create a javascript file called <em>autoExpandOutline.js</em> with the following content

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* 
 * 
 * Menu: EHU &amp;gt; HandlerService (Auto expand outline)
 * Kudos: Ingo Muschenetz &amp;amp; Kevin Lindsey &amp;amp; Steve Daniels
 * License: EPL 1.0
 * Listener: getPartService().addPartListener(this);
 * DOM: http://localhost/com.aptana.ide.scripting
 * DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
 * 
 * 
*/</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> getPartService<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> workbench <span style="color: #339933;">=</span> Packages.<span style="color: #660066;">org</span>.<span style="color: #660066;">eclipse</span>.<span style="color: #660066;">ui</span>.<span style="color: #660066;">PlatformUI</span>.<span style="color: #660066;">getWorkbench</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> result <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>workbench<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> window <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
        runOnUIThread<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            window <span style="color: #339933;">=</span> workbench.<span style="color: #660066;">getActiveWorkbenchWindow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                result <span style="color: #339933;">=</span> window.<span style="color: #660066;">getPartService</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//out.println(&quot;result set to &quot; + result);</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000066; font-weight: bold;">else</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #006600; font-style: italic;">//out.println(&quot;window is not defined&quot;);</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">else</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">//out.println(&quot;workbench is not defined&quot;);</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">//out.println(&quot;getPartService() is returning &quot; + result);</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">return</span> result<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> partBroughtToTop<span style="color: #009900;">&#40;</span>part<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//out.println(&quot;part*()\n&quot;);</span>
<span style="color: #009900;">&#125;</span>  
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> partClosed<span style="color: #009900;">&#40;</span>part<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//out.println(&quot;part*()\n&quot;);</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> partDeactivated<span style="color: #009900;">&#40;</span>part<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//out.println(&quot;part*()\n&quot;);</span>
<span style="color: #009900;">&#125;</span>  
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> partOpened<span style="color: #009900;">&#40;</span>part<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//out.println(&quot;part*()\n&quot;);</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> partActivated<span style="color: #009900;">&#40;</span>part<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>part.<span style="color: #660066;">getEditorInput</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    expandOutline<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> partVisible<span style="color: #009900;">&#40;</span>part<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//out.println(&quot;part*()\n&quot;);</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> partHidden<span style="color: #009900;">&#40;</span>part<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//out.println(&quot;part*()\n&quot;);</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> expandOutline<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//out.println(&quot;expandOutline()\n&quot;);</span>
  <span style="color: #000066; font-weight: bold;">try</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//out.println(&quot;try\n&quot;);</span>
    <span style="color: #003366; font-weight: bold;">var</span> editor <span style="color: #339933;">=</span> editors.<span style="color: #660066;">activeEditor</span>.<span style="color: #660066;">textEditor</span><span style="color: #339933;">;</span>
&nbsp;
    editor.<span style="color: #660066;">getOutlinePage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTreeViewer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">expandAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//out.println(&quot;catch\n&quot;);</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

</li>
</ul>
<p>Each new project that you create must use this project as reference, and now every time you open a file the Outline will be expanded automatically when you enter into the Editor</p>
<p style="text-align:center;">
<a href="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-layout.png" rel="lightbox[326]"><img src="http://p0l0.binware.org/wp-content/uploads/2009/07/eclipse-layout-300x230.png" alt="Eclipse Layout" title="Eclipse Layout" width="300" height="230" class="alignnone size-medium wp-image-378" /></a></p>



Share:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F&amp;partner=sociable" title="Print"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F&amp;title=Eclipse%20Configuration%20for%20Web%20Development&amp;bodytext=After%20trying%20very%20different%20IDE%20and%20many%20Eclipse%20IDE%20flawors%2C%20this%20is%20the%20best%20configuration%20I%20have%20found%2C%20and%20all%20the%20components%20are%20free.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20download%20Eclipse%20Classic%20from%20the%20Eclipse%20website.%0D%0A%0D%0AOne%20of%20the%20first%20things%20we%20ne" title="Digg"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F&amp;title=Eclipse%20Configuration%20for%20Web%20Development&amp;notes=After%20trying%20very%20different%20IDE%20and%20many%20Eclipse%20IDE%20flawors%2C%20this%20is%20the%20best%20configuration%20I%20have%20found%2C%20and%20all%20the%20components%20are%20free.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20download%20Eclipse%20Classic%20from%20the%20Eclipse%20website.%0D%0A%0D%0AOne%20of%20the%20first%20things%20we%20ne" title="del.icio.us"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F&amp;t=Eclipse%20Configuration%20for%20Web%20Development" title="Facebook"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F&amp;title=Eclipse%20Configuration%20for%20Web%20Development&amp;annotation=After%20trying%20very%20different%20IDE%20and%20many%20Eclipse%20IDE%20flawors%2C%20this%20is%20the%20best%20configuration%20I%20have%20found%2C%20and%20all%20the%20components%20are%20free.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20download%20Eclipse%20Classic%20from%20the%20Eclipse%20website.%0D%0A%0D%0AOne%20of%20the%20first%20things%20we%20ne" title="Google Bookmarks"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Eclipse%20Configuration%20for%20Web%20Development&amp;body=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F" title="email"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F&amp;title=Eclipse%20Configuration%20for%20Web%20Development&amp;source=P0L0%26%23039%3Bs+Blog+Opensource+Projects+and+IT+experiences&amp;summary=After%20trying%20very%20different%20IDE%20and%20many%20Eclipse%20IDE%20flawors%2C%20this%20is%20the%20best%20configuration%20I%20have%20found%2C%20and%20all%20the%20components%20are%20free.%0D%0A%0D%0AFirst%20of%20all%20we%20need%20to%20download%20Eclipse%20Classic%20from%20the%20Eclipse%20website.%0D%0A%0D%0AOne%20of%20the%20first%20things%20we%20ne" title="LinkedIn"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F" title="Meneame"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Eclipse%20Configuration%20for%20Web%20Development%20-%20http%3A%2F%2Fp0l0.binware.org%2Findex.php%2F2009%2F07%2F28%2Feclipse-configuration-for-web-development%2F" title="Twitter"><img src="http://p0l0.binware.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://p0l0.binware.org/index.php/2009/07/28/eclipse-configuration-for-web-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
