Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Commit [f3dadf] Maximize Restore History

Merge branch 'master' into fix

Conflicts:
HaXeSideKick.props

dionjwa dionjwa 2010-10-22

1 2 > >> (Page 1 of 2)
added src/sidekick/haxe/HaxeCodeCompletion.java
removed src/sidekick/CircleIcon.java
removed src/sidekick/CodeCellRenderer.java
removed src/sidekick/CodeCompletion.java
removed src/sidekick/CodeCompletionField.java
removed src/sidekick/CodeCompletionMethod.java
removed src/sidekick/CodeCompletionType.java
removed src/sidekick/CodeCompletionVariable.java
removed src/sidekick/ComplexRenderingExample.java
removed src/sidekick/DiamondIcon2.java
removed src/sidekick/GenericSideKickCompletion.java
removed .classpath~
changed docs/CHANGES.txt
changed docs/users-guide.xml
changed HaXeSideKick.props
changed scripts/fixHaxePackageNames.py
changed src/sidekick/haxe/HaXeOptionPane.java
changed src/sidekick/haxe/HaXeParser.java
changed src/sidekick/haxe/HaXeSideKickPlugin.java
changed src/sidekick/haxe/JavaSystemCaller.java
changed .classpath
copied docs/index.htmlOLD -> src/sidekick/haxe/LastEditLocation.java
copied docs/users-guide.xmlORIG -> #HaXeSideKick.props#
src/sidekick/haxe/HaxeCodeCompletion.java Diff Switch to side-by-side view
Loading...
src/sidekick/CircleIcon.java
File was removed.
src/sidekick/DiamondIcon2.java
File was removed.
.classpath~
File was removed.
docs/CHANGES.txt Diff Switch to side-by-side view
Loading...
docs/users-guide.xml Diff Switch to side-by-side view
Loading...
HaXeSideKick.props Diff Switch to side-by-side view
Loading...
scripts/fixHaxePackageNames.py Diff Switch to side-by-side view
Loading...
src/sidekick/haxe/HaXeOptionPane.java Diff Switch to side-by-side view
Loading...
src/sidekick/haxe/HaXeParser.java Diff Switch to side-by-side view
Loading...
src/sidekick/haxe/HaXeSideKickPlugin.java Diff Switch to side-by-side view
Loading...
src/sidekick/haxe/JavaSystemCaller.java Diff Switch to side-by-side view
Loading...
.classpath Diff Switch to side-by-side view
Loading...
docs/index.htmlOLD to src/sidekick/haxe/LastEditLocation.java
--- a/docs/index.htmlOLD
+++ b/src/sidekick/haxe/LastEditLocation.java
@@ -1,56 +1,80 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd"> 
+package sidekick.haxe;
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.EditPane;
+import org.gjt.sp.jedit.buffer.BufferAdapter;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.msg.EditPaneUpdate;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.util.Log;
 
-<head>
-<title>HaXe Plugin</title>
+public class LastEditLocation extends BufferAdapter
+    implements EBComponent
+{
 
-<meta name="author" content="Dion Amago"></meta>
-<meta name="date" content="30.04.2010, 19:28 h"></meta>
-<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></meta>
+    public LastEditLocation ()
+    {
+        super();
+        EditBus.addToBus(this);
+    }
 
-</head>
+    public void goToLastEditLocation ()
+    {
+        if (_lastEditOffset == -1) {
+            Log.log(Log.WARNING, this, "No edits done yet");
+            return;
+        }
+        TextArea ta = _editPane.getTextArea();
+        if (_currentBuffer != _lastEditedBuffer) {
+            _editPane.setBuffer((Buffer)_lastEditedBuffer);
+        }
+        ta.setCaretPosition(_lastEditOffset);
+        int line = ta.getLineOfOffset(_lastEditOffset);
+        line -= ta.getVisibleLines() / 2;
+        line = Math.max(line, 0);
+        ta.setFirstLine(line);
+    }
 
-<body>
+    @Override
+    public void handleMessage (EBMessage message)
+    {
+        if (message instanceof EditPaneUpdate &&
+                (((EditPaneUpdate)message).getWhat() == EditPaneUpdate.BUFFER_CHANGED ||
+                        ((EditPaneUpdate)message).getWhat() == EditPaneUpdate.CREATED)) {
+            if (_currentBuffer != null) {
+                _currentBuffer.removeBufferListener(this);
+            }
+            _currentBuffer = ((EditPaneUpdate)message).getEditPane().getBuffer();
+            _currentBuffer.addBufferListener(this);
+            _editPane = ((EditPaneUpdate)message).getEditPane();
+        }
+    }
 
-<div class="main">
-<h2>HaXe plugin</h2>
-<p>
-(c) 2010 by Dion Amago<br/>
-</p>
+    @Override
+    public void contentInserted(JEditBuffer buffer, int startLine, int offset,
+        int numLines, int length)
+    {
+        cacheEdit(buffer, offset);
+    }
 
-<p>Provides code completion, code browsing, and automatic imports for the <a href="http://haxe.org/">HaXe</a> language. 
+    @Override
+    public void contentRemoved(JEditBuffer buffer, int startLine, int offset,
+        int numLines, int length)
+    {
+        cacheEdit(buffer, offset);
+    }
 
-<p>If you have Haxe installed, code completion should work out of the box.  Code completion only works if you activate it immediately after a period e.g. "someVariable.".  The plugin will then list all the class members.
+    private void cacheEdit (JEditBuffer buffer, int offset)
+    {
+        _lastEditOffset = offset;
+        _lastEditedBuffer = _currentBuffer;
+    }
 
-<p>
-Import can be automatically added.  By default, existing imports are not deleted.  Only HaXe source folders given in the *.hxml build file are used to search for imports.  Potential clashes are resolved with a dialog.
-</p>
-
-<p>Additional (optional) installation steps:</p>
-<p>The Haxe plugin can use the CtagsSideKick plugin to parse and display HaXe code in navigable browser.  Ctags doesn't support HaXe out of the box.  Append this to your ~/.ctags file (or create it if it doesn't exist:</p>
-
-
-<p>
---langdef=haxe<br/>
---langmap=haxe:.hx<br/>
---regex-haxe=/^[ \t]*import[ \t]+([A-Za-z0-9_.]+)[ \t]*; /\1/F,import, imports/<br/>
---regex-haxe=/^[ \t]*enum[ \t]+([A-Za-z0-9_]+).* /\1/e,enum, enumerators/<br/>
---regex-haxe=/^[ \t]*typedef[ \t]+([A-Za-z0-9_]+)[ \t]+.*/\1/t,typedef, typedefs/ <br/>
---regex-haxe=/^[ \t]*((private|public|static|inline)[ \t]*)*[ \t]+var[ \t]+([A-Za-z0-9_]+)[ \t]*(: *([A-Za-z0-9_<,> ]+))?[ \t]*.*[;=].*/\3/v,variable, variables/<br/> 
---regex-haxe=/^[ \t]*((private|public|static|override|inline)[ \t]*)*[ \t]*function[ \t]+(([A-Za-z0-9_]+)[ \t]*.*)/\3/f,function, functions/ <br/>
---regex-haxe=/^[ \t]*(class|interface)[ \t]+([A-Za-z0-9_]+)[ \t]*($|((extends|implements)?[ \t]+([A-Za-z0-9_]+))?.*)/\2 \5 \6 /c,class, classes/<br/>
-</p>
-
-<p>Credit to <a href="http://haxegui.blogspot.com/2009/08/jedit-and-haxe.html">Gershon</a></p>.
-
-
-<p> Like all "SideKick" plugins, this has no dockable
-view. Instead, it shares its view with other SideKick plugins through
-the SideKick Structure Browser. To use SideKick, dock the Structure
-Browser on the left or the right. </p>
-
-</div>
-
-</body>
-</html>
+    private int _lastEditOffset = -1;
+    private JEditBuffer _currentBuffer;
+    private JEditBuffer _lastEditedBuffer;
+    private EditPane _editPane;
+}
docs/users-guide.xmlORIG to #HaXeSideKick.props#
--- a/docs/users-guide.xmlORIG
+++ b/#HaXeSideKick.props#
@@ -1,101 +1,89 @@
-<?xml version="1.0"?>
-<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:noNamespaceSchemaLocation='http://www.docbook.org/xsd/4.4/docbook.xsd' >
-<!-- :wrap=soft:maxLineLen=0: -->
-<title>Haxe SideKick Plugin Guide</title>
-<bookinfo>
- <authorgroup>
-  <author><firstname>Dion</firstname><surname>Amago</surname></author>
- </authorgroup>
-
- <legalnotice><title>Legal Notice</title>
-  <para>
-   Permission is granted to copy, distribute and/or modify this document
-   under the terms of the GNU Free Documentation License, Version 1.1 or
-   any later version published by the Free Software Foundation; with no
-   <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
-   <quote>Back-Cover Texts</quote>, each as defined in the license. A copy of
-   the license can be found in the file <filename>COPYING.DOC.txt</filename>
-   included with jEdit.
-  </para>
-
- </legalnotice>
- </bookinfo>
-
- <chapter id="intro">
-  <title> Introduction </title>
-
- <para> Provides code completion, code browsing, and automatic imports for the <ulink url="http://haxe.org/">HaXe</ulink> language. 
- </para>
- </chapter>
- 
- <chapter id="setup">
- <title> Setup and Configuration </title>
- 
-
- 
-  <para> Haxe must be in your path for code completion to work.  To test this, open a shell or dos prompt and type "haxe".  If you see haxe related output, then good, otherwise see the 
-  <ulink url="http://haxe.org/">HaXe</ulink> website for installation help.</para>
-  
-  </chapter> 
- <!--<title> Usage </title>-->
-  
-  
-  <chapter id="code-completion">
-   <title> Code Completion </title>
-  <programlisting>
-var someVar = "blah";
-somevar.
-</programlisting>
-
-  <para> At the end of the code above, calling the "Code Completion" command will show a list of class members and functions.  Select one for insertion.
-   Code completion only works if you activate it immediately after a period e.g. "someVariable." (including imports, but you don't need that). </para>
-   </chapter>
-   
-   
-     <chapter id="imports">
-   <title> Imports </title>
-
-  <para> The command "Add missing import" will search though the source folders listed in the project hxml file, and try to match classes used in the hx file with class and packages in the source folders.  For duplicates, a dialog will be shown.  Existing imports are not touched, in case you use imports that are not in the listed source folders. </para>
-   </chapter>
-   
-      <chapter id="buildrun">
-   <title> Building and running </title>
-
-  <para> The command "Build project" will attempt to build the haxe project.  The error will be passed to the Error List plugin so you can navigate directly to the source causing any compile problems.</para>
-  
-  <para> The command "Launch project" will attempt to build the haxe project, and if successful, will launch the project.  Due to the many ways to launch HaXe projects, the launch command must be given in the Plugin Options.</para>
-   </chapter>
-   
-      <chapter id="ctags">
-   <title>Code Browsing </title>
-
-   <para> Like all "SideKick" plugins, this has no dockable
-view. Instead, it shares its view with other SideKick plugins through
-the SideKick Structure Browser. To use SideKick, dock the Structure
-Browser on the left or the right. </para>
-
-  <para> Code browsing relies on the CtagsInterface plugin.  As HaXe is not a standard langauage supported by Ctags, you have to add the following language definition to your ctags configuration file (located at ~/.ctags on Mac and Linux)</para>
-
-  
-    <programlisting>
---langdef=haxe
---langmap=haxe:.hx
---regex-haxe=/^[ \t]*import[ \t]+([A-Za-z0-9_.]+)[ \t]*; /\1/F,import, imports/
---regex-haxe=/^[ \t]*enum[ \t]+([A-Za-z0-9_]+).* /\1/e,enum, enumerators/
---regex-haxe=/^[ \t]*typedef[ \t]+([A-Za-z0-9_]+)[ \t]+.*/\1/t,typedef, typedefs/ 
---regex-haxe=/^[ \t]*((private|public|static|inline)[ \t]*)*[ \t]+var[ \t]+([A-Za-z0-9_]+)[ \t]*(: *([A-Za-z0-9_&lt;,&gt; ]+))?[ \t]*.*[;=].*/\3/v,variable, variables/ 
---regex-haxe=/^[ \t]*((private|public|static|override|inline)[ \t]*)*[ \t]*function[ \t]+(([A-Za-z0-9_]+)[ \t]*.*)/\3/f,function, functions/ 
---regex-haxe=/^[ \t]*(class|interface)[ \t]+([A-Za-z0-9_]+)[ \t]*($|((extends|implements)?[ \t]+([A-Za-z0-9_]+))?.*)/\2 \5 \6 /c,class, classes/
-</programlisting>
-   </chapter>
- 
-<appendix id="changelog">
- <title> Changelog </title>
-  <para> For a list of changes in this plugin, see the
-  <ulink url="docs/CHANGES.txt">change log</ulink>.
-  </para>
-</appendix>
+# :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1:
+#
+# HaXePlugin.props - Properties file for the HaXeSideKick plugin
+#
+# 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.
 
 
-</book>
+# general plugin properites
+plugin.sidekick.haxe.HaXeSideKickPlugin.activate=defer
+plugin.sidekick.haxe.HaXeSideKickPlugin.name=HaXeSideKick
+plugin.sidekick.haxe.HaXeSideKickPlugin.author=Dion Amago
+plugin.sidekick.haxe.HaXeSideKickPlugin.version=0.2
+plugin.sidekick.haxe.HaXeSideKickPlugin.docs=index.html
+plugin.sidekick.haxe.HaXeSideKickPlugin.description=HaXe parser, builder, and code-completion plugin.
+
+# dependencies
+plugin.sidekick.haxe.HaXeSideKickPlugin.depend.0=jdk 1.5
+plugin.sidekick.haxe.HaXeSideKickPlugin.depend.1=jedit 04.03.99.02
+plugin.sidekick.haxe.HaXeSideKickPlugin.depend.2=plugin errorlist.ErrorListPlugin 1.9
+plugin.sidekick.haxe.HaXeSideKickPlugin.depend.3=plugin ctags.sidekick.Plugin 1.4
+plugin.sidekick.haxe.HaXeSideKickPlugin.depend.4=plugin projectviewer.ProjectPlugin 3.1.0
+plugin.sidekick.haxe.HaXeSideKickPlugin.depend.3=plugin ctags.sidekick.Plugin 1.4
+
+
+# Plugins menu items
+plugin.sidekick.haxe.HaXeSideKickPlugin.menu.label=HaXe
+plugin.sidekick.haxe.HaXeSideKickPlugin.menu=haxe-build-project \
+             haxe-launch-project \
+             haxe-code-completion \
+             haxe-add-missing-imports
+haxe-build-project.label=Build project
+haxe-launch-project.label=Launch project
+haxe-code-completion.label=Code completion
+haxe-add-missing-imports.label=Add missing imports
+  
+# menu
+#plugin.sidekick.haxe.HaXeSideKickPlugin.menu=sidekick-tree 
+
+# registration with SideKick as a mode parser
+sidekick.parser.haxe.label=haxe
+mode.haxe.sidekick.parser=haxe
+
+#I did make a commando.xml, but it's easier to just integrate the haxe build directly into the Errorlist
+#mode.haxe.commando.compile=haxe
+#commando.haxe.command=haxe
+#commando.haxe.buildfile=build.hxml
+
+# Option panel
+plugin.sidekick.haxe.HaXeSideKickPlugin.option-pane=haxe
+options.haxe.label=HaXe
+options.haxe.code=new sidekick.haxe.HaXeOptionPane();
+
+# Option Pane values and labels
+options.haxe.launchCommand=/usr/bin/open deploy/out.swf
+options.haxe.launchCommand.label=Launch output command
+#Keep null to use the system default
+options.haxe.installDir=System Default
+options.haxe.installDir.label=Installation directory (leave empty for default)
+# options.haxe.compilerLocation.label=Compiler location:
+options.haxe.defaultInstallDirMac=/usr/lib/haxe
+options.haxe.defaultInstallDirLinux=/usr/lib/haxe
+options.haxe.defaultInstallDirWindows=C:\\Program Files\\Motion-Twin\\haxe
+options.haxe.defaultInstallDirWindows7=C:\\Program Files (x86)\\Motion-Twin\\haxe
+
+#Errors
+haxe.error.noBuildFile.message=Attempting to build haxe project, but no *.hxml at the project root, or in a parent directory of the current buffer.
+haxe.error.noBuildFile.title=No *.hxml file found
+
+#Apparently I should set this to true, even though I don't write any data there
+plugin.sidekick.haxe.HaXeSideKickPlugin.usePluginHome=true
+
+
+
+
+
+
+
1 2 > >> (Page 1 of 2)