[prev in list] [next in list] [prev in thread] [next in thread]
List: jedit-cvs
Subject: [ jEdit-commits ] SF.net SVN: jedit: [9878] plugins/SideKick/trunk
From: ezust () users ! sourceforge ! net
Date: 2007-06-29 3:51:20
Message-ID: E1I47Vw-0007AY-OA () sc8-pr-svn4 ! sourceforge ! net
[Download RAW message or body]
Revision: 9878
http://svn.sourceforge.net/jedit/?rev=9878&view=rev
Author: ezust
Date: 2007-06-28 20:51:20 -0700 (Thu, 28 Jun 2007)
Log Message:
-----------
[ 1744797 ] SideKick: Enable parser-specific toolbar
Modified Paths:
--------------
plugins/SideKick/trunk/SideKick.props
plugins/SideKick/trunk/sidekick/SideKick.java
plugins/SideKick/trunk/sidekick/SideKickCompletionPopup.java
plugins/SideKick/trunk/sidekick/SideKickParser.java
plugins/SideKick/trunk/sidekick/SideKickTree.java
plugins/SideKick/trunk/users-guide.xml
Modified: plugins/SideKick/trunk/SideKick.props
===================================================================
--- plugins/SideKick/trunk/SideKick.props 2007-06-28 23:27:37 UTC (rev 9877)
+++ plugins/SideKick/trunk/SideKick.props 2007-06-29 03:51:20 UTC (rev 9878)
@@ -3,7 +3,7 @@
plugin.sidekick.SideKickPlugin.name=SideKick
plugin.sidekick.SideKickPlugin.author=Slava Pestov,Dale Anson,Martin Raspe,Alan \
Ezust
-plugin.sidekick.SideKickPlugin.version=0.7.3
+plugin.sidekick.SideKickPlugin.version=0.7.4
plugin.sidekick.SideKickPlugin.docs=index.html
plugin.sidekick.SideKickPlugin.depend.0=jedit 04.03.08.00
plugin.sidekick.SideKickPlugin.depend.1=jdk 1.5
Modified: plugins/SideKick/trunk/sidekick/SideKick.java
===================================================================
--- plugins/SideKick/trunk/sidekick/SideKick.java 2007-06-28 23:27:37 UTC (rev 9877)
+++ plugins/SideKick/trunk/sidekick/SideKick.java 2007-06-29 03:51:20 UTC (rev 9878)
@@ -435,6 +435,9 @@
else
parser.deactivate(this.editPane);
// this.editPane = null;
+ SideKickTree tree = (SideKickTree) \
view.getDockableWindowManager().getDockable("sidekick-tree"); + if (tree == null) \
return; + tree.removeParserPanel();
}
} //}}}
@@ -455,6 +458,8 @@
SideKickTree tree = (SideKickTree) \
view.getDockableWindowManager().getDockable("sidekick-tree"); if (tree == null) \
return; tree.reloadParserCombo();
+ if (parser != null)
+ tree.addParserPanel(parser);
parse(true);
} //}}}
Modified: plugins/SideKick/trunk/sidekick/SideKickCompletionPopup.java
===================================================================
--- plugins/SideKick/trunk/sidekick/SideKickCompletionPopup.java 2007-06-28 23:27:37 \
UTC (rev 9877)
+++ plugins/SideKick/trunk/sidekick/SideKickCompletionPopup.java 2007-06-29 03:51:20 \
UTC (rev 9878) @@ -308,7 +308,14 @@
{
if(complete == null || complete.size() == 0)
{
- view.getTextArea().userInput(ch);
+ if (ch == '\b')
+ {
+ view.getTextArea().backspace();
+ }
+ else
+ {
+ view.getTextArea().userInput(ch);
+ }
dispose();
}
else if(complete.handleKeystroke(list.getSelectedIndex(), ch))
Modified: plugins/SideKick/trunk/sidekick/SideKickParser.java
===================================================================
--- plugins/SideKick/trunk/sidekick/SideKickParser.java 2007-06-28 23:27:37 UTC (rev \
9877)
+++ plugins/SideKick/trunk/sidekick/SideKickParser.java 2007-06-29 03:51:20 UTC (rev \
9878) @@ -25,6 +25,9 @@
//{{{ Imports
import java.util.*;
+
+import javax.swing.JPanel;
+
import org.gjt.sp.jedit.*;
import errorlist.DefaultErrorSource;
import org.gjt.sp.util.Log;
@@ -240,6 +243,19 @@
return null;
} //}}}
+ //{{{ getPanel() method
+ /**
+ * Returns a parser-specific panel that will be shown in the SideKick dockable
+ * window just below the SideKick toolbar. This panel is meant to be a toolbar,
+ * but can be another UI element if needed.
+ *
+ * Returns null by default.
+ * @since SideKick 0.7.4
+ */
+ public JPanel getPanel() {
+ return null;
+ } //}}}
+
private String getWordAtCaret( EditPane editPane, int caret ) {
if ( caret <= 0 ) {
return "";
Modified: plugins/SideKick/trunk/sidekick/SideKickTree.java
===================================================================
--- plugins/SideKick/trunk/sidekick/SideKickTree.java 2007-06-28 23:27:37 UTC (rev \
9877)
+++ plugins/SideKick/trunk/sidekick/SideKickTree.java 2007-06-29 03:51:20 UTC (rev \
9878) @@ -116,6 +116,8 @@
protected SideKickParsedData data;
private int autoExpandTree = 0;
+ private JPanel toolBox;
+ private JPanel parserPanel = null;
//}}}
//{{{ SideKickTree constructor
@@ -177,8 +179,10 @@
buttonBox.add(parserCombo);
parserCombo.addActionListener(ah);
+ toolBox = new JPanel(new BorderLayout());
+ toolBox.add(BorderLayout.NORTH,buttonBox);
- topPanel.add(BorderLayout.NORTH,buttonBox);
+ topPanel.add(BorderLayout.NORTH,toolBox);
// create a faux model that will do until a real one arrives
DefaultTreeModel emptyModel = new DefaultTreeModel(
@@ -430,7 +434,21 @@
}
} // }}}
- //{{{ expandTreeWithDelay() method
+ //{{{ addParserToolbar() method
+ void addParserPanel(SideKickParser parser)
+ {
+ parserPanel = parser.getPanel();
+ if (parserPanel != null)
+ toolBox.add(BorderLayout.CENTER,parserPanel);
+ } // }}}
+ //{{{ removeParserToolbar() method
+ void removeParserPanel()
+ {
+ if (parserPanel != null)
+ toolBox.remove(parserPanel);
+ } // }}}
+
+ //{{{ expandTreeWithDelay() method
/**
* Expands the tree after a delay.
* The delay timer is restarted each time this method is called.
Modified: plugins/SideKick/trunk/users-guide.xml
===================================================================
--- plugins/SideKick/trunk/users-guide.xml 2007-06-28 23:27:37 UTC (rev 9877)
+++ plugins/SideKick/trunk/users-guide.xml 2007-06-29 03:51:20 UTC (rev 9878)
@@ -343,7 +343,15 @@
<appendix id="changes"><title>Change log</title>
<itemizedlist>
+
<listitem><para>
+ <emphasis role="bold">Version 0.7.4</emphasis> requires JDK 1.5, jEdit 4.3pre8 and \
ErrorListPlugin 1.4.</para> + <itemizedlist>
+ <listitem><para>Added support for SideKick Parser Services to offer a JPanel for \
inserting above the SideKickTree. (Shlomy Reinstein, # 1744797 ) </para></listitem> + \
</itemizedlist> + </listitem>
+
+<listitem><para>
<emphasis role="bold">Version 0.7.3</emphasis> requires JDK 1.5, jEdit 4.3pre8 and \
ErrorListPlugin 1.4.</para> <itemizedlist>
<listitem><para> Added parser setting from mode options pane. (ezust) \
</para></listitem>
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic