Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [68e592] Maximize Restore History

Rewrite the build system

- Use Ivy for retrieving almost all dependencies, making it possible to check out source and just do "ant" to build jEdit without the need of additional downloads or properties being set. Only for things that need to be installed, which is InnoSetup for building the windows installer and wine, if InnoSetup should be used on a system other than Windows, need to be installed and setup manually in build.properties.
- Use ant-contrib tasks for better readable and understandable build file and more performant builds with using contrib:runtarget where possible.
- Use Ivy to pull in bundled plugins from plugin central.
- Use saxon for documentation to be able to pull in a system independent XSLT processor with Ivy.

Björn Kautler Björn Kautler 2011-09-20

1 2 3 > >> (Page 1 of 3)
removed jars
removed jars/MacOSX
removed jars/MacOSX/MacOSX.iml
removed jars/MacOSX/MacOSX.props
removed jars/MacOSX/build.xml
removed jars/MacOSX/description.html
removed jars/MacOSX/docs
removed jars/MacOSX/docs/MacOSX.html
removed jars/MacOSX/macosx
removed jars/MacOSX/macosx/OSXAdapter.java
removed jars/QuickNotepad
removed jars/QuickNotepad/QuickNotepad.iml
removed jars/QuickNotepad/QuickNotepad.java
removed jars/QuickNotepad/QuickNotepad.props
removed jars/QuickNotepad/QuickNotepadActions.java
removed jars/QuickNotepad/QuickNotepadOptionPane.java
removed jars/QuickNotepad/QuickNotepadPlugin.java
removed jars/QuickNotepad/QuickNotepadTextArea.java
removed jars/QuickNotepad/QuickNotepadToolPanel.java
removed jars/QuickNotepad/README.txt
removed jars/QuickNotepad/actions.xml
removed jars/QuickNotepad/build.xml
removed jars/QuickNotepad/changes40.txt
removed jars/QuickNotepad/changes42.txt
removed jars/QuickNotepad/description.html
removed jars/QuickNotepad/dockables.xml
removed jars/QuickNotepad/users-guide.xml
changed .idea
changed .idea/ant.xml
changed .idea/compiler.xml
changed .idea/misc.xml
changed .idea/modules.xml
changed README.SRC.txt
changed build.properties.sample
changed build.xml
changed doc
changed doc/jeditfo.xsl
changed doc/jedithtml.xsl
changed doc/users-guide
changed doc/users-guide/conventions.xml
changed doc/users-guide/customizing.xml
changed doc/users-guide/shortcuts.xml
changed doc/users-guide/starting.xml
changed jEdit.iml
changed package-files
changed package-files/windows
changed package-files/windows/win32installer.iss
copied jars/MacOSX/CHANGES.txt -> ivysettings.xml
copied jars/MacOSX/macosx/MacOSXPlugin.java -> ivy.xml
jars
File was removed.
jars/MacOSX
File was removed.
jars/MacOSX/MacOSX.iml
File was removed.
jars/MacOSX/MacOSX.props
File was removed.
jars/MacOSX/build.xml
File was removed.
jars/MacOSX/description.html
File was removed.
jars/MacOSX/docs
File was removed.
jars/MacOSX/docs/MacOSX.html
File was removed.
jars/MacOSX/macosx
File was removed.
jars/QuickNotepad
File was removed.
jars/QuickNotepad/README.txt
File was removed.
jars/QuickNotepad/actions.xml
File was removed.
jars/QuickNotepad/build.xml
File was removed.
.idea
Directory.
.idea/ant.xml Diff Switch to side-by-side view
Loading...
.idea/compiler.xml Diff Switch to side-by-side view
Loading...
.idea/misc.xml Diff Switch to side-by-side view
Loading...
.idea/modules.xml Diff Switch to side-by-side view
Loading...
README.SRC.txt Diff Switch to side-by-side view
Loading...
build.properties.sample Diff Switch to side-by-side view
Loading...
build.xml Diff Switch to side-by-side view
Loading...
doc
Directory.
doc/jeditfo.xsl Diff Switch to side-by-side view
Loading...
doc/jedithtml.xsl Diff Switch to side-by-side view
Loading...
doc/users-guide
Directory.
doc/users-guide/conventions.xml Diff Switch to side-by-side view
Loading...
doc/users-guide/customizing.xml Diff Switch to side-by-side view
Loading...
doc/users-guide/shortcuts.xml Diff Switch to side-by-side view
Loading...
doc/users-guide/starting.xml Diff Switch to side-by-side view
Loading...
jEdit.iml Diff Switch to side-by-side view
Loading...
package-files
Directory.
package-files/windows/win32installer.iss Diff Switch to side-by-side view
Loading...
jars/MacOSX/CHANGES.txt to ivysettings.xml
--- a/jars/MacOSX/CHANGES.txt
+++ b/ivysettings.xml
@@ -1,15 +1,43 @@
-Max OS X Plugin 1.1
-- CTRL is now mapped to the CMD button so CMD+C and CMD+V will work correctly in *all* windows.
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ jEdit - Programmer's Text Editor
+  ~ :tabSize=8:indentSize=8:noTabs=false:
+  ~ :folding=explicit:collapseFolds=1:
+  ~
+  ~ Copyright Š 2011 jEdit contributors
+  ~
+  ~ 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 any later version.
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program; if not, write to the Free Software
+  ~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+  -->
 
+<ivysettings>
+	<settings defaultResolver="default"/>
+	<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
+	<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
+	<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
+	<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
+	<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
 
-Mac OS X Plugin 1.0
-
-- Initial release
-- Support for drag and drop onto the dock icon
-- Support for Open With for files that are associated with jEdit
-- Application menu integration
-  - "Preferences" will open Global Preferences
-  - "About jEdit" will open the Help -> About jEdit... dialog
-- CMD-click in titlebar now displays the current buffer path in a drop down. Clicking on a folder will reveal that folder in the finder.
-- The red close button now indicates the entire view's modification status. This way it will be consistent with the "save modified buffers?" dialog.
-
+	<resolvers>
+		<url name="launch4j">
+			<artifact pattern="http://downloads.sourceforge.net/project/launch4j/launch4j-3/[revision]/[artifact]-[revision]-[classifier].[ext]" />
+		</url>
+		<url name="jedit-plugins">
+			<artifact pattern="jar:http://downloads.sourceforge.net/project/jedit-plugins/[artifact]/[revision]/[artifact]-[revision]-bin.zip!/[artifact].jar" />
+		</url>
+	</resolvers>
+	<modules>
+		<module organisation="net.sf.launch4j" resolver="launch4j" />
+		<module organisation="org.jedit.plugins" resolver="jedit-plugins" />
+	</modules>
+</ivysettings>
jars/MacOSX/macosx/MacOSXPlugin.java to ivy.xml
--- a/jars/MacOSX/macosx/MacOSXPlugin.java
+++ b/ivy.xml
@@ -1,287 +1,75 @@
-/* 
- * :tabSize=4:indentSize=4:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * MacOSXPlugin.java - Main class Mac OS X Plugin
- * Copyright (C) 2008 Seph M. Soliman
- *
- * 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 any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ jEdit - Programmer's Text Editor
+  ~ :tabSize=8:indentSize=8:noTabs=false:
+  ~ :folding=explicit:collapseFolds=1:
+  ~
+  ~ Copyright �� 2011 jEdit contributors
+  ~
+  ~ 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 any later version.
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program; if not, write to the Free Software
+  ~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+  -->
 
-package macosx;
+<ivy-module version="2.0"
+	    xmlns:e="http://ant.apache.org/ivy/extra"
+	    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	    xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
 
-//{{{ Imports
-import javax.swing.*;
-import java.util.regex.Pattern;
-import java.io.File;
+	<info organisation="org.jedit" module="jedit">
+		<license name="GPLv2" url="http://www.gnu.org/licenses/gpl-2.0.txt"/>
+		<ivyauthor name="Bj��rn &quot;Vampire&quot; Kautler"/>
+		<description homepage="http://www.jEdit.org">
+		    jEdit - Programmer's Text Editor
+		</description>
+	</info>
 
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.options.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.msg.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.ThreadUtilities;
-//}}}
+	<configurations confmappingoverride="true"
+			defaultconfmapping="sources,javadoc->@;
+					    compile->master;
+					    %->default">
+		<conf name="default" description="Runtime dependencies and master artifacts" extends="master, runtime"/>
+		<conf name="master" description="Artifacts of this module without dependencies"/>
+		<conf name="compile" description="Compile dependencies" visibility="private" transitive="false"/>
+		<conf name="runtime" description="Runtime dependencies" extends="compile"/>
+		<conf name="test" description="Testing dependencies" visibility="private" extends="runtime"/>
+		<conf name="provided" description="Provided dependencies" visibility="private"/>
+		<conf name="sources" description="Source artifacts" visibility="private"/>
+		<conf name="javadoc" description="JavaDoc artifacts" visibility="private"/>
+		<conf name="ant-contrib" description="Dependencies for ant-contrib" visibility="private"/>
+		<conf name="docbook" description="Dependencies for translating DocBook files" visibility="private"/>
+		<conf name="fop" description="Dependencies for FOP" visibility="private"/>
+		<conf name="jarbundler" description="Dependencies for JarBundler" visibility="private"/>
+		<conf name="launch4j" description="Dependencies for Launch4j" visibility="private"/>
+		<conf name="default-plugins" description="Shipped default plugins" visibility="private"/>
+	</configurations>
 
-public class MacOSXPlugin extends EBPlugin
-{
-	//{{{ Variables
-	private boolean osok = false;
-	private static final Pattern ctrlPat = Pattern.compile("\\bctrl\\b");
-	//}}}
-	
-	public void MacOSXPlugin()
-	{
-	}
-	
-	//{{{ start() method
-	public void start()
-	{
-		if(osok())
-		{
-			Runnable setup = new Runnable() {
-				public void run()
-				{
-					try
-					{
-						MacOSXPlugin listener = MacOSXPlugin.this;
-						Class theClass = listener.getClass();
-						
-						// Generate and register the OSXAdapter, passing it a hash of all the methods we wish to
-						// use as delegates for various com.apple.eawt.ApplicationListener methods
-						OSXAdapter.setQuitHandler(listener, theClass.getDeclaredMethod("handleQuit", (Class[])null));
-						OSXAdapter.setAboutHandler(listener, theClass.getDeclaredMethod("handleAbout", (Class[])null));
-						OSXAdapter.setPreferencesHandler(listener, theClass.getDeclaredMethod("handlePreferences", (Class[])null));
-						OSXAdapter.setFileHandler(listener, theClass.getDeclaredMethod("handleOpenFile", new Class[] { String.class }));
-						OSXAdapter.setReOpenApplicationHandler(listener, theClass.getDeclaredMethod("handleReOpenApplication", (Class[])null));
-						
-						String lf = jEdit.getProperty("lookAndFeel");
-						if(lf != null && lf.length() != 0)
-						{
-							// Fix key bindings for OS X for anything other than Aqua LNF
-							// See: http://lists.apple.com/archives/java-dev/2008/Apr/msg00209.html
-							if (!UIManager.getLookAndFeel().isNativeLookAndFeel())
-							{
-								Log.log(Log.DEBUG, this, "Fixing keybindingds on current LNF");
-								UIDefaults uid = UIManager.getLookAndFeelDefaults();
-								fixMacKeyBindings(uid);
-							}
-						}
-						
-					}
-					catch (Exception e)
-					{
-						System.err.println("Error while loading the OSXAdapter:" + e);
-						e.printStackTrace();
-					}
-				}
-			};
-			
-			ThreadUtilities.runInDispatchThread(setup);
-		}
-	} //}}}
-	
-	public void stop()
-	{
-		// TODO: Only show it on reload - plugin does not support reloading
-		//JOptionPane.showMessageDialog(null, jEdit.getProperty("MacOSXPlugin.dialog.unload.message"), jEdit.getProperty("MacOSXPlugin.dialog.unload.title"), 1);
-	}
-	
-	// General quit handler; fed to the OSXAdapter as the method to call when a system quit event occurs
-	// A quit event is triggered by Cmd-Q, selecting Quit from the application or Dock menu, or logging out
-	public boolean handleQuit()
-	{
-		jEdit.exit(jEdit.getActiveView(), true);
-		return false;
-	}
-	
-	public void handlePreferences()
-	{
-		new GlobalOptions(jEdit.getActiveView());
-	}
-	
-	// General info dialog; fed to the OSXAdapter as the method to call when 
-	// "About OSXAdapter" is selected from the application menu
-	public void handleAbout()
-	{
-		new AboutDialog(jEdit.getActiveView());
-	}
-	
-	public void handleOpenFile(String filepath)
-	{
-		File file = new File(filepath);
-		if(file.exists())
-		{
-			if(file.isDirectory())
-			{
-				// TODO: What to do with dirs?
-				//VFSBrowser.browseDirectory(jEdit.getActiveView(), file.getPath());
-				return;
-			}
-			
-			if (jEdit.isStartupDone())
-			{
-				View view = jEdit.getActiveView();
-				if (view == null)
-				{
-					view = PerspectiveManager.loadPerspective(false);
-				}
-				
-				if (jEdit.openFile(view, file.getPath()) == null)
-					Log.log(Log.ERROR, this, "Unable to open file: " + filepath);
-			}
-			else
-			{
-				jEdit.openFileAfterStartup(file.getPath());
-			}
-		}
-		else
-		{
-			Log.log(Log.ERROR, this, "Cannot open non-existing file: " + filepath);
-		}
-		
-	}
-	
-	public void handleReOpenApplication()
-	{
-		if(jEdit.getActiveView() != null)
-		{
-			jEdit.getActiveView().requestFocus();
-		}
-		else
-		{
-			PerspectiveManager.loadPerspective(true);
-		}
-	}
-	
-	public void handleMessage(EBMessage message)
-	{
-		if(message instanceof BufferUpdate)
-		{
-			BufferUpdate msg = (BufferUpdate)message;
-			refreshViewModification(jEdit.getActiveView());
-		}
-		else if(message instanceof ViewUpdate)
-		{
-			ViewUpdate msg = (ViewUpdate)message;
-			refreshViewModification(msg.getView());
-		}
-		else if(message instanceof EditPaneUpdate)
-		{
-			EditPaneUpdate msg = (EditPaneUpdate)message;
-			View view = msg.getEditPane().getView();
-			if(view != null)
-			{
-				if(view.getBuffer() != null)
-				{
-					String path = view.getBuffer().getPath();
-					view.getRootPane().putClientProperty("Window.documentFile", new File(path));
-				}
-			}
-		}
-	}
-	
-	public void refreshViewModification(View view)
-	{
-		boolean modifiedView = false;
-		if(view != null)
-		{
-			EditPane[] editPanes = view.getEditPanes();
-			for(int i = 0; i < editPanes.length; i++)
-			{
-				Buffer[] buffers = editPanes[i].getBufferSet().getAllBuffers();
-				for(int j = 0; j < buffers.length; j++)
-				{
-					Buffer buf = buffers[j];
-					if(buf.isDirty())
-					{
-						Log.log(Log.DEBUG, this, "Dirty buffer found");
-						modifiedView = true;
-						break;
-					}
-				}
-			}
-			Log.log(Log.DEBUG, this, "Dirty buffer found? " + modifiedView + " for " + editPanes.length + " buffers");
-			if(modifiedView)
-			{
-				view.getRootPane().putClientProperty("Window.documentModified", Boolean.TRUE);
-				view.getRootPane().putClientProperty("windowModified", Boolean.TRUE); // * support for Tiger
-			}
-			else
-			{
-				view.getRootPane().putClientProperty("Window.documentModified", Boolean.FALSE);
-				view.getRootPane().putClientProperty("windowModified", Boolean.FALSE); // * support for Tiger
-			}
-		} 
-	}
-	
-	public static void fixMacKeyBindings(UIDefaults uiDefaults)
-	{
-		Object[] keys = uiDefaults.keySet().toArray(); // Copied to prevent concurrent modification issues.
-		
-		for (Object key : keys)
-		{
-			Object  value = uiDefaults.get(key);
-			
-			if (value instanceof InputMap)
-			{
-				InputMap map = (InputMap) value;
-				KeyStroke[] keyStrokes = map.keys();
-				
-				if (keyStrokes != null)
-				{
-					for (KeyStroke keyStroke : keyStrokes)
-					{
-						String  keyString = keyStroke.toString();
-						
-						if (keyString.indexOf("ctrl ") >= 0)
-						{
-							Object  action = map.get(keyStroke);
-							
-							keyString = ctrlPat.matcher(keyString).replaceAll("meta");
-							map.remove(keyStroke);
-							keyStroke = KeyStroke.getKeyStroke(keyString);
-							map.put(keyStroke, action);
-						}
-					}
-				}
-			}
-		}
-	}
+	<publications defaultconf="master"/>
 
-	//{{{ osok() method
-	private boolean osok()
-	{
-		final String mrjversion = jEdit.getProperty("MacOSXPlugin.depend.mrj.version");
-		
-		if (!OperatingSystem.isMacOS())
-		{
-			// According to Slava this is better
-			Log.log(Log.ERROR,this,jEdit.getProperty("MacOSXPlugin.dialog.osname.message"));
-			return false;
-		}
-		
-		if (StandardUtilities.compareStrings(System.getProperty("mrj.version"),mrjversion,false) < 0)
-		{
-			SwingUtilities.invokeLater( new Runnable() { public void run() {
-				GUIUtilities.error(null,"MacOSXPlugin.dialog.mrjversion",new Object[] {mrjversion});
-			}});
-			return false;
-		}
-
-		return true;
-	}//}}}
-}
+	<dependencies defaultconf="compile;sources;javadoc">
+		<dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="ant-contrib"/>
+		<dependency org="saxon" name="saxon" rev="6.5.3" conf="docbook"/>
+		<dependency org="net.sf.docbook" name="docbook-xsl" rev="1.76.1" conf="docbook">
+			<artifact name="docbook-xsl" e:classifier="resources" type="zip"/>
+		</dependency>
+		<dependency org="net.sf.docbook" name="docbook-xsl-saxon" rev="1.0.0" conf="docbook"/>
+		<dependency org="xerces" name="xercesImpl" rev="2.10.0" conf="docbook,jarbundler"/>
+		<dependency org="org.apache.xmlgraphics" name="fop" rev="1.0" conf="fop"/>
+		<dependency org="net.sf.launch4j" name="launch4j" rev="3.0.2" conf="launch4j">
+			<artifact name="launch4j" e:classifier="win32" type="zip"/>
+			<artifact name="launch4j" e:classifier="macosx" type="tgz"/>
+			<artifact name="launch4j" e:classifier="linux" type="tgz"/>
+		</dependency>
+		<dependency org="org.jedit.plugins" name="MacOSX" rev="1.2" conf="default-plugins"/>
+		<dependency org="org.jedit.plugins" name="QuickNotepad" rev="4.4" conf="default-plugins"/>
+	</dependencies>
+</ivy-module>
1 2 3 > >> (Page 1 of 3)