<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>null is not an object</title>
	
	<link>http://nullisnotanobject.com</link>
	<description />
	<pubDate>Thu, 03 Sep 2009 05:39:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-sa/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/NullIsNotAnObject" type="application/rss+xml" /><feedburner:emailServiceId>NullIsNotAnObject</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Managers and Technical Debt</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/KmvhmJ5hlrg/</link>
		<comments>http://nullisnotanobject.com/2009/09/managers-and-technical-debt-2/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 05:36:10 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[Business]]></category>

		<category><![CDATA[startup]]></category>

		<category><![CDATA[technical debt]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=334</guid>
		<description><![CDATA[Managers love technical debt. It helps them to make it seem like they are doing a better job than they are. They can do this in a few ways. 
First, by skipping tests and taking on other types of technical debt during development they come slightly closer to meeting tight timelines and releasing software that [...]]]></description>
			<content:encoded><![CDATA[<p>Managers love technical debt. It helps them to make it seem like they are doing a better job than they are. They can do this in a few ways. </p>
<p>First, by skipping tests and taking on other types of technical debt during development they come slightly closer to meeting tight timelines and releasing software that is not as good as it could have been, but good enough.</p>
<p>Second, when there are bugs found in the software the manager can blame the developers who were previously told to omit things like tests in an effort to get the software out sooner. Not only do the developers take the blame, but they are also forced to fix the bugs, often by working long hours outside of regular business.</p>
<p>The end result is that the software is closer to the quality it should have been in the first place, and the developers have done it in record time because they had to work evenings and weekends. And the manager, has not only released the software on time but he has also taken the credit for the heroic bug fixing effort.</p>
<p>That leaves the developers paying off the technical debt and looking for a new job where, hopefully, it won&#8217;t happen again.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/09/managers-and-technical-debt-2/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/09/managers-and-technical-debt-2/</feedburner:origLink></item>
		<item>
		<title>Passenger on Rails Playground</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/v_nYbBPrSq4/</link>
		<comments>http://nullisnotanobject.com/2009/08/passenger-on-rails-playground/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 22:36:32 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=333</guid>
		<description><![CDATA[I finally setup Passenger (mod_rails) on my Rails Playground server the other day so that I can quit worrying about Mongrel and it is super easy. The main problem that I found was that I had a spelling mistake in my httpd.conf file in the PassengerRuby config line. The error that this produced in the [...]]]></description>
			<content:encoded><![CDATA[<p>I finally setup <a href="http://www.modrails.com/">Passenger</a> (mod_rails) on my <a href="http://railsplayground.com/">Rails Playground</a> server the other day so that I can quit worrying about <a href="http://mongrel.rubyforge.org/">Mongrel</a> and it is super easy. The main problem that I found was that I had a spelling mistake in my httpd.conf file in the <em>PassengerRuby</em> config line. The error that this produced in the Apache error_log file seemed to be referring to starting the spawn server.</p>
<blockquote><p>Could not start the spawn server: /usr/local/lib/ruby: Permission denied (13)
</p></blockquote>
<p>So I spent a long time trying to find info about Passenger spawn server settings, but the problem in the end was that the path shown in the error did not exist - it should have been pointing to bin obviously :S</p>
<p>The other part of using passenger is the slightly different <a href="http://www.capify.org/index.php/Capistrano">Capistrano</a> recipe. With Passenger there is no spinner task and you need to put in an empty restart task. Here is my recipe:</p>
<blockquote><p>
########################<br />
#	Application<br />
########################</p>
<p>set :application, &#8220;example.com&#8221;<br />
set :deploy_to, &#8220;/var/rails/#{application}&#8221;</p>
<p>########################<br />
#	Settings<br />
########################</p>
<p>default_run_options[:pty] = true<br />
ssh_options[:forward_agent] = false<br />
set :runner, &#8220;user&#8221;</p>
<p>########################<br />
#	Servers<br />
########################</p>
<p>set :user, &#8220;user&#8221;<br />
set :domain, &#8220;example.com&#8221;<br />
server domain, :app, :web<br />
role :db, domain, :primary => true</p>
<p>########################<br />
#	Subversion<br />
########################</p>
<p>set :repository,  &#8220;http://svn.example.com/trunk/server&#8221;<br />
set :scm_username, &#8220;user&#8221;<br />
set :scm_password, &#8220;password&#8221;</p>
<p>########################<br />
#	Passenger<br />
########################</p>
<p>namespace :passenger do<br />
  desc &#8220;Restart Application&#8221;<br />
  task :restart do<br />
    run &#8220;chown -R apache:apache #{current_path}&#8221;<br />
    run &#8220;touch #{current_path}/tmp/restart.txt&#8221;<br />
  end<br />
end</p>
<p>after :deploy, &#8220;passenger:restart&#8221;</p>
<p>deploy.task :start do<br />
  # nothing<br />
end
</p></blockquote>
<p>The other thing that I found I had to do was the chown call since Passenger runs the <a href="http://rubyonrails.org">Rails</a> app with the same user as is running Apache, in this case the apache user and apache group.</p>
<p>Now on to try out <a href="http://incubator.apache.org/cassandra/">Cassandra</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/08/passenger-on-rails-playground/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/08/passenger-on-rails-playground/</feedburner:origLink></item>
		<item>
		<title>Long Live PhoneGap for BlackBerry</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/QI4ysjHjNjk/</link>
		<comments>http://nullisnotanobject.com/2009/07/long-live-phonegap-for-blackberry/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 06:28:44 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[phonegap]]></category>

		<category><![CDATA[blackberry]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[rim]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=332</guid>
		<description><![CDATA[There have been some new developments in the PhoneGap on BlackBerry breathing new life into the project! It all boils down to the fact that in RIM OS >= 4.6 there is a browser rendering option that you can set to make the browser render using the modern rendering engine rather than the archaic one [...]]]></description>
			<content:encoded><![CDATA[<p>There have been some new developments in the PhoneGap on BlackBerry breathing new life into the project! It all boils down to the fact that in RIM OS >= 4.6 there is a browser rendering option that you can set to make the browser render using the modern rendering engine rather than the archaic one from OS 4.2. </p>
<p>It look something like this:</p>
<pre class="code">
_renderingSession.getRenderingOptions().setProperty(
  RenderingOptions.CORE_OPTIONS_GUID, 17000, true);
</pre>
<p>After much trial and error it was found that the BrowserContentManager did not support this rendering option (and RIM says it is completely unsupported / experimental anyhow) yet the Field returned from BrowserContent.getDisplayableContent() does support it!</p>
<p>Long story short it looks like PhoneGap on RIM OS >= 4.6 is going to work really well.</p>
<p>Next up is looking at the new features in OS 5.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/07/long-live-phonegap-for-blackberry/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/07/long-live-phonegap-for-blackberry/</feedburner:origLink></item>
		<item>
		<title>PhoneGap iPhone Approval</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/cTRCCfw0uDo/</link>
		<comments>http://nullisnotanobject.com/2009/06/phonegap-iphone-app-approval/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:26:53 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[mobile]]></category>

		<category><![CDATA[phonegap]]></category>

		<category><![CDATA[appstore]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=330</guid>
		<description><![CDATA[The guys over at Rhomobile posted about IPhone App Store rejection issues the other day - I can only assume due to the recent problems that some users of PhoneGap have been having. Rhomobile and PhoneGap are similar in that they are frameworks that enable developers to build native mobile apps in a language they [...]]]></description>
			<content:encoded><![CDATA[<p>The guys over at <a href="http://www.rhomobile.com">Rhomobile</a> posted about <a href="http://www.rhomobile.com/blog/2009/05/29/iphone-app-store-rules-and-guidelines-on-use-of-frameworks/"><b style="color:black;background-color:#ff9999">IPhone</b> App Store rejection issues</a> the other day - I can only assume due to the recent problems that some users of <a href="http://www.phonegap.com"><b style="color:black;background-color:#ff66ff">PhoneGap</b></a> have been having. Rhomobile and <b style="color:black;background-color:#ff66ff">PhoneGap</b> are similar in that they are frameworks that enable developers to build native mobile apps in a language they are familiar with, Ruby and JavaScript respectively.</p>
<p>I think that they are pretty much spot on in terms of their interpretation of the App Store rule 3.2.2 that states:</p>
<blockquote><p>
An Application may <b style="color:black;background-color:#a0ffff">not</b> itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple’s Published APIs and built-in interpreter(s).</p>
</blockquote>
<p>The two key points in this App Store rule are where it says an app &#8220;<em>may <b style="color:black;background-color:#a0ffff">not</b> itself install or launch other executable code by any means</em>&#8221; and this is exactly what users of <b style="color:black;background-color:#ff66ff">PhoneGap</b> are doing <strong>if their apps are downloading JavaScript over the network rather than including it in the application www folder</strong>. By downloading JavaScript over the network at runtime the application is downloading and running interpreted code that Apple has <b style="color:black;background-color:#a0ffff">not</b> control over during their app approval process.</p>
<p>So if any of you <b style="color:black;background-color:#ff66ff">PhoneGap</b> developers are worried about Apple rejecting your app just make sure that you don&#8217;t download any JavaScript at runtime and instead include it in the application. Having said that, also make sure that you apps don&#8217;t look like you just took a shit and emailed it to Apple <img src='http://nullisnotanobject.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>That is just my thoughts on the issue, whether or <b style="color:black;background-color:#a0ffff">not</b> that is the *real* reason that Apple is rejecting <b style="color:black;background-color:#ff66ff">PhoneGap</b> apps we may never know but that is certainly one reason that they would do it I think. It could just be <a href="http://www.seoxys.com/apples-increasingly-ridiculous-rejections/">because they feel like it</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/06/phonegap-iphone-app-approval/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/06/phonegap-iphone-app-approval/</feedburner:origLink></item>
		<item>
		<title>Where 2.0 Slides</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/OCnPWfSJ3Kw/</link>
		<comments>http://nullisnotanobject.com/2009/06/where-20-slides/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 03:38:44 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[Conference]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[geo]]></category>

		<category><![CDATA[geoweb]]></category>

		<category><![CDATA[phonegap]]></category>

		<category><![CDATA[where20]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=329</guid>
		<description><![CDATA[Here are my slides from my workshop at the recent O&#8217;Reilly Where 2.0 conference down in San Jose. 
Where 2.0
View more PDF documents from davejohnson.

]]></description>
			<content:encoded><![CDATA[<p>Here are my slides from my workshop at the recent O&#8217;Reilly Where 2.0 conference down in San Jose. </p>
<div style="width:425px;text-align:left" id="__ss_1546659"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/davejohnson/where-20?type=presentation" title="Where 2.0">Where 2.0</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=where20-090607222628-phpapp02&#038;stripped_title=where-20" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=where20-090607222628-phpapp02&#038;stripped_title=where-20" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">PDF documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/davejohnson">davejohnson</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/06/where-20-slides/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/06/where-20-slides/</feedburner:origLink></item>
		<item>
		<title>Where 2.0 Workshop</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/Xh8T5rXomyQ/</link>
		<comments>http://nullisnotanobject.com/2009/05/where-20-workshop/#comments</comments>
		<pubDate>Sun, 17 May 2009 22:56:02 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[Conference]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[geo]]></category>

		<category><![CDATA[gps]]></category>

		<category><![CDATA[oreilly]]></category>

		<category><![CDATA[where20]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=328</guid>
		<description><![CDATA[I am going to be running a workshop down at the O&#8217;Reilly Where 2.0 conference on Tuesday called Giving Your Mobile Apps a Sense of Place.
I am going to cover Geo related features and issues of IPhone 2.2.1, Android 1.5 (aka Cupcake), RIM OS 4.7, and, most importantly, PhoneGap. I will be sure to post [...]]]></description>
			<content:encoded><![CDATA[<p>I am going to be running a workshop down at the O&#8217;Reilly Where 2.0 conference on Tuesday called <a href="http://en.oreilly.com/where2009/public/schedule/detail/7778">Giving Your Mobile Apps a Sense of Place</a>.</p>
<p>I am going to cover Geo related features and issues of IPhone 2.2.1, Android 1.5 (aka Cupcake), RIM OS 4.7, and, most importantly, PhoneGap. I will be sure to post the slides once I am done them as well as put all the sample projects up on <a href="http://www.github.com/davejohnson">my GitHub</a>.</p>
<p>If you are in San Jose Monday night then you will probably find me in the bar, whether I am done my slides or not!</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/05/where-20-workshop/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/05/where-20-workshop/</feedburner:origLink></item>
		<item>
		<title>Windows Compilation Problems</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/wdks3l6GGE8/</link>
		<comments>http://nullisnotanobject.com/2009/05/windows-compilation-problems/#comments</comments>
		<pubDate>Tue, 05 May 2009 20:30:16 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[compiling]]></category>

		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=310</guid>
		<description><![CDATA[If you are trying to use midl.exe but have not before or do not have Visual Studio installed, you may come across a few different errors.
One such error that I had was the following:
&#8220;command line error MIDL1001 : cannot open input file oaidl.idl&#8221;
So I figured out that I had to get the Windows Platform SDK [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to use midl.exe but have not before or do not have Visual Studio installed, you may come across a few different errors.</p>
<p>One such error that I had was the following:</p>
<p>&#8220;command line error MIDL1001 : cannot open input file oaidl.idl&#8221;</p>
<p>So I figured out that I had to get the Windows Platform SDK installed but had a hard time finding it. There is a <a href="http://msdn.microsoft.com/en-us/windowsserver/dd146047.aspx">helpful page on MSDN I found that helps you to choose the right SDK</a>. The link never came up in my search results for some reason and I was only able to find it linked from the Windows SDK blog.</p>
<p>I figured that I would just add that to the PATH environment variable as you may expect to be the case but alas it was not. After a long while of trial and error (mostly error really) I found that you can specify certain paths to be included manually as a command line switch <a href="http://msdn.microsoft.com/en-us/library/aa367328(VS.85).aspx">http://msdn.microsoft.com/en-us/library/aa367328(VS.85).aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/05/windows-compilation-problems/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/05/windows-compilation-problems/</feedburner:origLink></item>
		<item>
		<title>JavaScript Pub Sub</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/_E2I9SElKUY/</link>
		<comments>http://nullisnotanobject.com/2009/04/javascript-pub-sub/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 06:12:00 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[pubsub]]></category>

		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=312</guid>
		<description><![CDATA[I was talking to someone the other day about the observer pattern in JavaScript and I was reminded about this JavaScript method that is part of Complete UI.

nitobi.Event.prototype.subscribeOnce = function(method, context) {
  var guid = null;
  var _this = this;
  var func1 = function() {
    method.apply(context &#124;&#124; null, arguments);
 [...]]]></description>
			<content:encoded><![CDATA[<p>I was talking to someone the other day about the observer pattern in JavaScript and I was reminded about this JavaScript method that is part of Complete UI.</p>
<pre class="code">
nitobi.Event.prototype.subscribeOnce = function(method, context) {
  var guid = null;
  var _this = this;
  var func1 = function() {
    method.apply(context || null, arguments);
    _this.unSubscribe(guid);
  }
  guid = this.subscribe(func1);
  return guid;
}
</pre>
<p>subscribeOnce is a special sort of event subscription that rather than being being executed every time the event fires, the handler function is only executed once and then automatically unsubscribed from the event. It is obviously most useful for initialization stuff in JavaScript. There is some more info on JavaScript pub sub <a href="http://ajaxian.com/archives/decoupling-data-and-ui-layers-with-pubsub-architecture">over on Ajaxian</a> too.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/04/javascript-pub-sub/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/04/javascript-pub-sub/</feedburner:origLink></item>
		<item>
		<title>Eclipse Plugin Q&amp;A</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/JTL65N_q740/</link>
		<comments>http://nullisnotanobject.com/2009/03/eclipse-plugin-qa/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:04:39 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<category><![CDATA[phonegap]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[Eclipse]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=324</guid>
		<description><![CDATA[If you are one of the unfortunate few that has decided to, for profit or insanity, write an Eclipse plugin here are a few of the questions that I had during my ordeal and the answer or closest thing to an answer that I can come up with.
Q: How should I get started with Eclipse [...]]]></description>
			<content:encoded><![CDATA[<p>If you are one of the unfortunate few that has decided to, for profit or insanity, write an Eclipse plugin here are a few of the questions that I had during my ordeal and the answer or closest thing to an answer that I can come up with.</p>
<p><strong>Q</strong>: How should I get started with Eclipse plug-ins?</p>
<p><strong>A</strong>: Read a book. I did not do this and really regret it now I think. There are few different ones available that I assume explain all the intricacies. The Google can only help so much. Having said that, the approach that I took was to look at the code of another Eclipse plug-in and borrow from that <img src='http://nullisnotanobject.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Some of the better links I put up on <a href="http://delicious.com/search?context=userposts&amp;p=eclipse&amp;lc=1&amp;u=davyjones">Delicious</a>.</p>
<p><strong>Q</strong>: How do I make my plugin show up in the new project list?</p>
<p><strong>A</strong>: This one seems like it should be easy to find out how to do but it actually wasn&#8217;t that easy. So it is pretty easy to get started using one of the samples in Eclipse like the file editor sample that creates a &#8220;New file&#8221; wizard. While that wizard does not launch from the &#8220;New project&#8221; menu it can be augmented to be a project creation wizard pretty easily. The important bit is setting project=&#8221;true&#8221; on your wizard in the plugin.xml file for the Eclipse newWizards extension.</p>
<pre class="code">
&lt;extension point="org.eclipse.ui.newWizards"&gt;
  &lt;wizard
    project="true" ... /&gt;</pre>
<p><strong>Q</strong>: Now that I have a new project wizard how do I know that a project was created using that wizard or is that type of project so that you can create debug or run configurations accordingly?</p>
<p><strong>A</strong>: This is where project &#8220;Natures&#8221; come in. A project can have different natures associated with it to support different functionality in Eclipse. You need to create a class that implements the IProjectNature interface.</p>
<pre class="code">
public class PhoneGapProjectNature implements IProjectNature
</pre>
<p>You can reference that project Nature from the plugin.xml through the org.eclipse.core.resources.natures extension point.</p>
<pre class="code">
&lt;extension id="com.phonegap.phonegapnature" name="PhoneGap Nature"
  point="org.eclipse.core.resources.natures"&gt;
  &lt;runtime&gt;
    &lt;run class="com.phonegap.project.PhoneGapProjectNature"/&gt;
  &lt;/runtime&gt;
  &lt;builder id="com.phonegap.phonegapbuilder"&gt;&lt;/builder&gt;
&lt;/extension&gt;
</pre>
<p>This enables one to connect certain builders to a nature - in the case of PhoneGap we don&#8217;t actually use a builder since it is just HTML and JavaScript but we do set and read the nature from the plug-in code.</p>
<p>To set the nature of the project when it is created in the new project wizard we can set the project nature(s) on the project description like this:</p>
<pre class="code">
IWorkspace workspace = ResourcesPlugin.getWorkspace();
final IProjectDescription description =
  workspace.newProjectDescription(newProjectHandle.getName());
description.setNatureIds(new String[] { PhoneGapPlugin.PHONEGAP_NATURE_ID });
</pre>
<p>In the case of PhoneGap, we use this project nature information in the properties of the Run and Debug configurations such that a developer can create configurations and choose the project that the configuration should launch when they click Run or Debug. In the configuration we iterate over the projects collection of the workspace and check if each project has the PhoneGap nature, if it does we add it to a combo box.</p>
<pre class="code">
boolean bb = projects[i].hasNature(PhoneGapPlugin.PHONEGAP_NATURE_ID);
if (projects[i].hasNature(PhoneGapPlugin.PHONEGAP_NATURE_ID)) {
  projectCombo.add(projects[i].getName());
}
</pre>
<p><strong>Q</strong>: How do I store preferences and configuration default values?</p>
<p><strong>A</strong>: In your AddLaunch method of the LaunchAdder, which you call from the createProject method of your NewProjecWizard class like this:</p>
<pre class="code">
SimulatorLaunchAdder.addSimulatorLaunch(projectHandle.getName(),
  projectHandle.getName(), "");
</pre>
<p>you will need have some code like this:</p>
<pre class="code">
ILaunchConfigurationWorkingCopy wc = DebugPlugin.getDefault()
.getLaunchManager().getLaunchConfigurationType(
  "com.phonegap.debug.SimulatorLaunchConfigurationType")
.newInstance(null, DebugPlugin.getDefault()
.getLaunchManager().generateUniqueLaunchConfigurationNameFrom(projectName));
wc.setAttribute("KEY", "value");
final ILaunchConfiguration config = wc.doSave();
</pre>
<p><strong>Q</strong>: How do I access resources like files to populate a new project with?</p>
<p><strong>A</strong>: Put any files that you will want to copy to a project into a namespace like com.phonegap.resources then you can access it like this:</p>
<pre class="code">
String rootContent = StreamUtils.readContent(
this.getClass().getResourceAsStream("/com/phonegap/resources/root.html"), null
);
</pre>
<p>Where StreamUtils is just a wrapper for doing the stream reading.</p>
<p><strong>Q</strong>: I am getting a &#8220;class not found&#8221; error when I debug what should I do?</p>
<p><strong>A</strong>: Get Eclipse 3.4 if you don&#8217;t already have it.</p>
<p><strong>Q</strong>: I want to support the debug / run menus but to do that I need org.eclipse.debug.ui/core references - where do I find those?</p>
<p><strong>A</strong>: Add them to the dependcies list in the plugin.xml visual editor. First add core then the ui one will be available.</p>
<p>That&#8217;s about all I can muster for the moment but will try to put up some more tips later!</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/03/eclipse-plugin-qa/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/03/eclipse-plugin-qa/</feedburner:origLink></item>
		<item>
		<title>PhoneGap Project</title>
		<link>http://feedproxy.google.com/~r/NullIsNotAnObject/~3/fXKloU-hJzY/</link>
		<comments>http://nullisnotanobject.com/2009/03/phonegap-project/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 04:50:27 +0000</pubDate>
		<dc:creator>Dave Johnson</dc:creator>
		
		<category><![CDATA[phonegap]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[blackberry]]></category>

		<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://nullisnotanobject.com/?p=325</guid>
		<description><![CDATA[So I started putting together some wireframes for my first real PhoneGap project tonight. I have become sort of bored playing with BlackBerry and Android native development and figured it was about time to actually build something on top of the platform. The only problem I am having is that I can&#8217;t currently do offline [...]]]></description>
			<content:encoded><![CDATA[<p>So I started putting together some wireframes for my first real <a href="http://www.phonegap.com">PhoneGap</a> project tonight. I have become sort of bored playing with BlackBerry and Android native development and figured it was about time to actually build something on top of the platform. The only problem I am having is that I can&#8217;t currently do offline apps on BlackBerry so am really looking forward to the next version of the RIM OS as I hear they may have fixed <a href="http://nullisnotanobject.com/2009/01/blackberry-browser-oddities/">some of my gripes</a>.</p>
<p>In the mean time I have been working on the PhoneGap simulator and Eclipse plugin as well that should be ready very soon - I actually have the simulator launching from my Eclipse PhoneGap project which is pretty cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullisnotanobject.com/2009/03/phonegap-project/feed/</wfw:commentRss>
		<feedburner:origLink>http://nullisnotanobject.com/2009/03/phonegap-project/</feedburner:origLink></item>
	</channel>
</rss>
