<?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>Developer Papercuts &#187; Subversive</title>
	<atom:link href="http://www.vogella.de/blog/tag/subversive/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vogella.de/blog</link>
	<description>Tips around Eclipse and Android programming</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:31:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Eclipse Papercut #2 – Changing Eclipse subversive default behavior</title>
		<link>http://www.vogella.de/blog/2009/07/08/modify-eclipse-code/</link>
		<comments>http://www.vogella.de/blog/2009/07/08/modify-eclipse-code/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 21:53:09 +0000</pubDate>
		<dc:creator>Lars Vogel</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Papercut]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Subversive]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.vogella.de/blog/?p=443</guid>
		<description><![CDATA[How to modify the Eclipse source code]]></description>
			<content:encoded><![CDATA[<p><strong>Update: Igor Burilo (Eclipse Subversive developer) was kind enough to accept a modified version of patch developed in this episode. While I&#8217;m very happy about this, this unfortunately renders this example irrelevant . You still might want to read this to see how to checkout code from the Eclipse version control system</strong>.</p>
<p>In this second part of my <a href="http://www.vogella.de/blog/?p=385">7 Paper Cuts in Eclipse</a> I want to change some standard Eclipse code.</p>
<p>This second papercut is a bit more complex as the <a href="http://www.vogella.de/blog/?p=421"> first papercut</a>; I&#8217;m planning to return to simpler examples in the next papercut.</p>
<p>So lets define the papercut:</p>
<p>I frequently create example projects which I share in a svn repository. For related projects I use the mulitproject layout. The standard in subversion is &#8220;Simple Mode &#8211; One project for one repository&#8221;. Therefore everytime I share a project I have to switch in the subversion dialog from &#8220;Simple Mode&#8221; to &#8220;Advanced Mode&#8221;.</p>
<p><a href="http://www.vogella.de/blog/wp-content/uploads/2009/07/papercut1_101.gif"><img src="http://www.vogella.de/blog/wp-content/uploads/2009/07/papercut1_101.gif" alt="papercut1_10" width="572" height="596" class="alignnone size-full wp-image-444" /></a></p>
<p>Nothing big? I agree, hence the perfect example for a papercut. </p>
<p>To change the coding of this dialog we need to find the class which is responsible to display this page. <a href="http://www.vogella.de/articles/EclipseCodeAccess/article.html#pluginspy">Plug-in Spy<a href="http://www.vogella.de/articles/EclipseCodeAccess/article.html#pluginspy"> </a> make this easy via Alt + Shift + F1.</p>
<p><a href="http://www.vogella.de/blog/wp-content/uploads/2009/07/papercut1_201.gif"><img src="http://www.vogella.de/blog/wp-content/uploads/2009/07/papercut1_201.gif" alt="papercut1_20" width="576" height="598" class="alignnone size-full wp-image-445" /></a></p>
<p>Now you need to download the source code of the plug-in &#8221;<br />
org.eclipse.team.svn.ui&#8221;. This plug-in is stored in svn and can get access via subversion itself. The URL for the subversion repository view is: &#8220;http://dev.eclipse.org/svnroot/technology/org.eclipse.subversive&#8221;. See <a href="http://www.vogella.de/articles/EclipseCodeAccess/article.html#versioncontrol"> here </a> to learn how to use svn and cvs to access the Eclipse code</p>
<p>Add this repository in the &#8220;SVN Repository&#8221; view and check-out (download) the plug-ins &#8221;<br />
org.eclipse.team.svn.ui&#8221; and &#8220;org.eclipse.team.svn.core&#8221;. You find them in &#8220;trunk&#8221;.</p>
<p><a href="http://www.vogella.de/blog/wp-content/uploads/2009/07/papercut1_301.gif"><img src="http://www.vogella.de/blog/wp-content/uploads/2009/07/papercut1_301.gif" alt="papercut1_30" width="407" height="482" class="alignnone size-full wp-image-453" /></a></p>
<p>Looking at the coding of SelectProjectNamePage.java changing the selection only requires a few lines to be changed.</p>
<p>I use <a href="http://www.vogella.de/articles/EclipsePreferences/article.html">Eclipse Preferences </a> to remember the last user selection.</p>
<pre class="brush: java; title: ; notranslate">
protected SelectProjectNamePageSimpleModeComposite simpleModeComposite;
	protected ShareProjectNameAdvancedModeComposite advancedModeComposite;
	private static String SELECTION_MODE = &quot;isSimpleMode&quot;;

	public SelectProjectNamePage() {
		super(
			SelectProjectNamePage.class.getName(),
			&quot;&quot;,  //$NON-NLS-1$
			SVNTeamUIPlugin.instance().getImageDescriptor(&quot;icons/wizards/newconnect.gif&quot;)); //$NON-NLS-1$
		Preferences preferences = new ConfigurationScope()
		.getNode(&quot;org.eclipse.team.svn.ui.wizard.shareproject&quot;);
		Preferences preference = preferences.node(&quot;note1&quot;);
		this.isSimpleMode = preference.getBoolean(SELECTION_MODE, true);;
	}
</pre>
<p>and I have to change a few more lines to use isSimpleMode everywhere:</p>
<pre class="brush: java; title: ; notranslate">
this.simpleModeRadionButton.setSelection(this.isSimpleMode);
....
this.advancedModeRadionButton.setSelection(!this.isSimpleMode); // Either or
this.advancedModeRadionButton.addSelectionListener(modeListener);
</pre>
<p>And I have to set the preference in the ModeListener</p>
<pre class="brush: java; title: ; notranslate">

	protected class ModeListener extends SelectionAdapter {
		public void widgetSelected(SelectionEvent e) {
			//change controls area mode
			Button modeButton = (Button) e.widget;
			if (SelectProjectNamePage.this.simpleModeRadionButton == modeButton &amp;&amp; SelectProjectNamePage.this.isSimpleMode == false) {
				SelectProjectNamePage.this.isSimpleMode = true;
				preference.putBoolean(SELECTION_MODE, true);
				enableControlsArea();
			} else if (SelectProjectNamePage.this.advancedModeRadionButton == modeButton &amp;&amp; SelectProjectNamePage.this.isSimpleMode == true) {
				SelectProjectNamePage.this.isSimpleMode = false;
				preference.putBoolean(SELECTION_MODE, false);
				enableControlsArea();
			}
		}
	}
</pre>
<p>The full source code is attached.</p>
<p><a href='http://www.vogella.de/blog/wp-content/uploads/2009/07/SelectProjectNamePage1.zip'>SelectProjectNamePage</a></p>
<p>If you now export these two plug-ins into your runnig Eclipse, this dialog will remember the last selection (Simple vrs. Advanced).</p>
<p>As I hope this behavior is useful to others I created a bug report (with a patch). See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282583"> Bug </a>. I hope the subversion programmers will consider this patch (or an improved version of it).</p>
<p>Remember sharing is good. Open Source does not only allow you to solve your issues but it makes it easy to contribute back.</p>
<p>See <a href="http://www.vogella.de/blog/?cat=10"> Eclipse Papercuts</a> to get all posts in this series.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.vogella.de/blog/2009/07/08/modify-eclipse-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eclipse Subversive Installation with Eclipse 3.4.2</title>
		<link>http://www.vogella.de/blog/2009/03/04/subversive-installation/</link>
		<comments>http://www.vogella.de/blog/2009/03/04/subversive-installation/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 15:42:39 +0000</pubDate>
		<dc:creator>Lars Vogel</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Subversive]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.vogella.de/blog/?p=225</guid>
		<description><![CDATA[I recently had the problem to install and upload the subversive installation. For some reason the svn team provider is not included anymore in the standard Ganymede 3.4.2 update side.

Here is what you can do to install subversion:

1. Install SVN Team Provider from
http://download.eclipse.org/technology/subversive/0.7/update-site/.
2. After installing SVN Team Provider and restarting Eclipse, I installed SVN
connectors ...]]></description>
			<content:encoded><![CDATA[<p>I recently had the problem to install and upload the subversive installation. For some reason the svn team provider is not included anymore in the standard Ganymede 3.4.2 update side.</p>
<p>Here is what you can do to install subversion:</p>
<p>1. Install SVN Team Provider from</p>
<p>http://download.eclipse.org/technology/subversive/0.7/update-site/.</p>
<p>2. After installing SVN Team Provider and restarting Eclipse, I installed SVN<br />
connectors from</p>
<p>http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.vogella.de/blog/2009/03/04/subversive-installation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

