viplugin-devel Mailing List for viPlugin
Brought to you by:
midramas
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(12) |
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
(7) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <ben...@id...> - 2004-05-22 12:46:47
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
|
From: Michael B. <zed...@sa...> - 2004-04-08 21:33:06
|
Hello everybody! I've released a new version: * fixes an infinite loop on brace matching * the usual clean-ups Best regards, Michael |
|
From: Michael B. <zed...@sa...> - 2004-03-03 09:22:18
|
Hi all!
What's new:
<Luke deGruchy>
* fixed bug #819741: search/replace infinite loop
Have fun,
Michael
|
|
From: Ben D. <bda...@da...> - 2004-02-13 17:32:46
|
Hello Michael et al, I recently switched over to using Eclipse on Java projects because of the viPlugin. Eclipse with vi keys is really nice to use! Of course there is a lot of work to do, and I would like to help. First off, I tried to compile the viPlugin under eclipse 3.0, and there appear to be some symbol referencing errors. I was just wondering if the CVS repository is up-to-date, and if the recent sourceforge issues have caused a problem. Thank you, -Ben |
|
From: Michael B. <zed...@sa...> - 2004-01-12 14:53:37
|
Hi all!
Happy new year 2004!
viPlugin 0.2.8 and it's new features:
* added moving through previous extended commands with CursorUp/CursorDown
* fixed small bug in the bookmark system
* fixed very annoying scrolling behaviour
* JUnit tests refactoring
* bugfix for "w" movement => getNextWord()
Note: The E21 version for eclipse 2.1 is not compiled yet! This will take
another day.
Have fun,
Michael
|
|
From: Kai W. <ka...@ci...> - 2003-12-25 14:27:15
|
Hi Folks, Do job at making progress on viPlugin. This is a main reason that I am using eclipse rather than JBuilder (even though the JB was paid for). I am not sure whether this is right place to submit a feature request; however, I think the feature that lights all the matches in a page, like what vim does, is very helpful. Many time a variable is used in a close related fashion. Happy Holidays! Kai |
|
From: Michael B. <zed...@sa...> - 2003-12-08 22:17:15
|
Hi!
It's actually the first time I did something productive again.
- Bought Martin Fowlers Refactoring book (should be here for Christmas)
- Fixed a bug in the bookmarking system
- Fixed the VERY annoying scrolling behaviour
- Applied a patch from Brian that refactors JUnit tests a bit and fixes
a "w" bug
A bit more bugfixing and I will release 0.2.8 (after that 0.3.0 should
be the stable release)!
Have fun,
Michael
|
|
From: Michael B. <zed...@sa...> - 2003-12-08 12:49:49
|
----- Forwarded message from "Brian M. Kelley" <bk...@sb...> -----
Date: Sun, 07 Dec 2003 23:35:55 -0800
From: "Brian M. Kelley" <bk...@sb...>
To: Michael Bartl <zed...@sa...>
Subject: Re: JUnit Test writer for Eclipse based
Hey Michael. I've spent a little time working on the test suite, and
I've got a few patches for you to review. The included patch file is in
eclipse unified patch format. I've described the changes I made to the
files, below.
I think the changes are a step in the right direction for the test
suite, given that it looks like TextModificator is likely to be
refactored (it's always good to have some type of test infrastructure in
place to do regression testing with). Anyway, all tests are being ran
and are passing now. Let me know if there are any problems with the
changes in your environment. Thanks!
TextModificator.java:
setEmptyInstance() is configurable in support of the movement of
singleton management inside the TextModificator class (rather in
SharedTextResources).
getNextWord() checks for null and empty strings, and handles text with
no word-endings like gvim does (moves to end of line).
AllTests.java:
Added test suite for TextModificatorTest class.
DeleteCommandsTest.java:
Integrate configuration of TextModificator singleton into test, for
synchronization purposes.
MotionCommandsTest.java:
Integrate configuration of TextModificator singleton into test, for
synchronization purposes. Slight tweak of testMoveUp() test.
SharedTestResources.java:
Added opinion comment on why tests were doomed prior to changes :)
Made changes to support configuration and management of TextModificator
singleton in the TextModificator class.
TextModificatorTest.java:
Integrate configuration of TextModificator singleton into test, for
synchronization purposes. Added unit-test for
TextModificator.getNextWord() method. Added prototypes for unit tests to
be implemented next.
Brian
Michael Bartl wrote:
>On Tue, Dec 02, 2003 at 11:02:17AM -0800, Brian M. Kelley wrote:
>
>>Hello. Just wanted to drop a line to your team and thank you
>>for starting up this project - not having vi functionality
>>in eclipse, up until viPlugin was started, was my main
>>reason for not using the entire IDE.
>>
>>I'm also interested in taking on the job of unit test
>>developer. I'm a professional developer by day, with 5 years
>>of Java programming experience (I've been programming for
>>17+ years). I work directly with the JUnit test framework
>>every day for our products. If you need help in that space,
>>please let me know - I'd be glad to put some time in for the
>>project.
>
>
>Hello!
>
>This sounds great! I hope you can help out with the JUnit test, because
>I really want the viPlugin to be as stable and bugfree as possible. We
>already have a nice userbase and I don't want to disappoint them.
>
>Just checkout CVS Head, start hacking around on the testsuite and send
>me a patch. After 3 patches I usualy grant CVS access ;)
>
>Have fun,
> Michael
>
Index: src/viPlugin/TextModificator.java
===================================================================
retrieving revision 1.39
diff -u -r1.39 TextModificator.java
--- src/viPlugin/TextModificator.java 6 Dec 2003 11:42:57 -0000 1.39
+++ src/viPlugin/TextModificator.java 8 Dec 2003 07:20:32 -0000
@@ -28,9 +28,9 @@
* @version $Revision: 1.39 $ $Date: 2003/12/06 11:42:57 $
*/
public class TextModificator {
-
- private static TextModificator _currTextModificator;
-
+
+ private static TextModificator _currTextModificator;
+
private ITextEditor _textEditor;
private ITextViewer _textViewer;
private IDocument _document;
@@ -55,29 +55,30 @@
* @param textEditor text editor
* @param textViewer text viewer
*/
- TextModificator(ITextEditor textEditor, ITextViewer textViewer) {
+ public TextModificator(ITextEditor textEditor, ITextViewer textViewer) {
_textEditor = textEditor;
_textViewer = textViewer;
_yankBuffer = new YankBuffer("<default>");
}
+
+ public static void activateInstance(TextModificator textModificator) {
+ _currTextModificator = textModificator;
+ }
- public static void activateInstance(TextModificator textModificator) {
- _currTextModificator = textModificator;
- }
-
- public static TextModificator getInstance() {
- return _currTextModificator;
- }
+ public static TextModificator getInstance() {
+ return _currTextModificator;
+ }
- /**
- * This method servers <b>only</b> for testing purposes. Should be used
- * nowhere else.
- */
- public static void setEmptyInstance() {
+ /**
+ * This method servers <b>only</b> for testing purposes. Should be used
+ * nowhere else.
+ */
+ public static void setEmptyInstance(IDocument doc) {
activateInstance(new TextModificator(null, null));
- _currTextModificator.setSelection(new TextSelection(0, 0));
- }
-
+ _currTextModificator.setDocument(doc);
+ _currTextModificator.setSelection(new TextSelection(doc, 0, 0));
+ }
+
public ITextEditor getTextEditor() {
return _textEditor;
}
@@ -223,8 +224,8 @@
public int getCarretPosition() {
// needed for JUnit Testsuite
-// if (_visualAnchor != -1 || editor == null) {
-// return _cursorPos;
+// if (_visualAnchor != -1 || _textEditor == null) {
+// return getSelection().getOffset();
// }
if (_isInVisualMode
&& (_visualAnchor == getSelection().getOffset())) {
@@ -364,6 +365,12 @@
int endIndex = text.length();
int newStartIndex = startIndex;
+ if (text == null)
+ return 0;
+
+ if (text.length() == 0)
+ return 0;
+
// current character is already an end character
// now jump until we find the last end character!! (vim behaviour)
if (isWordEnding(text.charAt(startIndex), false)) {
@@ -395,14 +402,20 @@
}
// next word starts after all spaces
- if (text.charAt(endIndex) == ' ') {
- for (int i = endIndex; i < text.length(); ++i) {
- char c = text.charAt(i);
- if (isWordEnding(c, false) || Character.isLetter(c)) {
- return i;
- }
- }
- }
+ if (endIndex < text.length())
+ {
+ if (text.charAt(endIndex) == ' ') {
+ for (int i = endIndex; i < text.length(); ++i) {
+ char c = text.charAt(i);
+ if (isWordEnding(c, false) || Character.isLetter(c)) {
+ return i;
+ }
+ }
+ }
+ }
+ else
+ --endIndex;
return endIndex;
}
@@ -876,7 +889,7 @@
/**
* Tells the TextModificator that the visual mode was activated.
*/
- void activateVisualMode() {
+ public void activateVisualMode() {
_visualAnchor = getCarretPosition();
_isInVisualMode = true;
}
@@ -888,7 +901,8 @@
_isInVisualMode = false;
}
- void refreshVisualSelection(int newPosition) {
+ void refreshVisualSelection(int newPosition)
+ {
newVisualSelection(
_visualAnchor < newPosition ? _visualAnchor : newPosition,
Math.abs(newPosition - _visualAnchor));
@@ -922,4 +936,4 @@
IRegion line = getLine();
return getText(line.getOffset(), line.getLength());
}
-}
+}
\ No newline at end of file
Index: src/viPlugin/test/AllTests.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 AllTests.java
--- src/viPlugin/test/AllTests.java 26 Nov 2003 18:20:54 -0000 1.3
+++ src/viPlugin/test/AllTests.java 8 Dec 2003 07:20:35 -0000
@@ -11,16 +11,17 @@
*/
public class AllTests {
- public static void main(String[] args) {
- junit.textui.TestRunner.run(AllTests.class);
- }
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(AllTests.class);
+ }
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for viPlugin.test");
- //$JUnit-BEGIN$
- suite.addTestSuite(MotionCommandsTest.class);
- suite.addTestSuite(DeleteCommandsTest.class);
- //$JUnit-END$
- return suite;
- }
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for viPlugin.test");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(TextModificatorTest.class);
+ suite.addTestSuite(DeleteCommandsTest.class);
+ suite.addTestSuite(MotionCommandsTest.class);
+ //$JUnit-END$
+ return suite;
+ }
}
Index: src/viPlugin/test/DeleteCommandsTest.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 DeleteCommandsTest.java
--- src/viPlugin/test/DeleteCommandsTest.java 4 Dec 2003 09:12:58 -0000 1.3
+++ src/viPlugin/test/DeleteCommandsTest.java 8 Dec 2003 07:20:35 -0000
@@ -14,9 +14,13 @@
*/
public class DeleteCommandsTest extends TestCase {
- private final int _numberOfLines;
- private final TextModificator _tm;
-
+ private TextModificator t;
+ private final String _documentContent =
+ "1. first second, third, ..., last\r\n"
+ + "2. ffirst, ssecond, tthird, ..., llast\r\n"
+ + "3. ffirst, ssecond, tthird, ..., llast\r\n"
+ + "4. ffirst, ssecond, tthird, ..., llast";
+
/**
* Constructor.
*
@@ -24,24 +28,24 @@
*/
public DeleteCommandsTest(String name) {
super(name);
- _tm = SharedTestResources.getTextModificator();
- _numberOfLines = SharedTestResources.getNumberOfLines();
}
+ protected void setUp() throws Exception
+ {
+ SharedTestResources.setConfiguredTextModificator(_documentContent);
+ t = TextModificator.getInstance();
+ }
+
public void testDeleteWordForward() {
Command goToFirstLine = new GoToFirstLine();
goToFirstLine.execute();
Command dw = new DeleteWordForward(1);
dw.execute();
- assertEquals(". first second, third, ..., last", _tm.getLineText());
- dw.undo();
- assertEquals("1. first second, third, ..., last", _tm.getLineText());
-
+ assertEquals(". first second, third, ..., last", t.getLineText());
dw.undo();
+ assertEquals("1. first second, third, ..., last", t.getLineText());
Command dw3 = new DeleteWordForward(3);
dw3.execute();
- assertEquals("second, third, ..., last", _tm.getLineText());
- dw3.undo();
- assertEquals("1. first second, third, ..., last", _tm.getLineText());
- }
+ assertEquals("second, third, ..., last", t.getLineText());
dw3.undo();
+ assertEquals("1. first second, third, ..., last", t.getLineText());
}
}
Index: src/viPlugin/test/MotionCommandsTest.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 MotionCommandsTest.java
--- src/viPlugin/test/MotionCommandsTest.java 26 Nov 2003 19:01:57 -0000 1.3
+++ src/viPlugin/test/MotionCommandsTest.java 8 Dec 2003 07:20:35 -0000
@@ -15,10 +15,13 @@
* @version $Revision: 1.3 $ $Date: 2003/11/26 19:01:57 $
*/
public class MotionCommandsTest extends TestCase {
-
- private final int _numberOfLines;
- private final TextModificator _tm;
-
+ private TextModificator t;
+ private final String _documentContent =
+ "1. first second, third, ..., last\r\n"
+ + "2. ffirst, ssecond, tthird, ..., llast\r\n"
+ + "3. ffirst, ssecond, tthird, ..., llast\r\n"
+ + "4. ffirst, ssecond, tthird, ..., llast";
+
/**
* Constructor.
*
@@ -26,60 +29,63 @@
*/
public MotionCommandsTest(String name) {
super(name);
- _tm = SharedTestResources.getTextModificator();
- _numberOfLines = SharedTestResources.getNumberOfLines();
}
-
+
+ protected void setUp() throws Exception
+ {
+ SharedTestResources.setConfiguredTextModificator(_documentContent);
+ t = TextModificator.getInstance();
+ }
+
public void testMoveDown() {
// move to the first line
Command goToFirstLine = new GoToFirstLine();
goToFirstLine.execute();
- int pos = _tm.getLinePos();
+ int pos = t.getLinePos();
assertEquals(pos, 0);
// move down two lines
Command moveDown = new MoveDown(2);
moveDown.execute();
pos += 2;
- assertEquals(pos, _tm.getLinePos());
+ assertEquals(pos, t.getLinePos());
// paranoiac check
Command moveDown1 = new MoveDown(1);
boolean isLastLine =
- (_tm.getLinePos() + 1) == _tm.getDocument().getNumberOfLines();
+ (t.getLinePos() + 1) == t.getDocument().getNumberOfLines();
moveDown1.execute();
if (isLastLine) {
- assertEquals(pos, _tm.getLinePos());
+ assertEquals(pos, t.getLinePos());
} else {
- assertEquals(++pos, _tm.getLinePos());
+ assertEquals(++pos, t.getLinePos());
}
// move another 100000 lines down
Command moveDown100k = new MoveDown(100000);
moveDown100k.execute();
- assertEquals(_numberOfLines - 1, _tm.getLinePos());
-
- assertEquals("4. ffirst, ssecond, tthird, ..., llast", _tm.getLineText());
+ assertEquals(t.getDocument().getNumberOfLines() - 1, t.getLinePos());
+ assertEquals("4. ffirst, ssecond, tthird, ..., llast",
t.getLineText());
}
public void testMoveUp() {
// move to the last line
Command goToLastLine = new GoToLastLine();
goToLastLine.execute();
- int pos = _tm.getLinePos();
- assertEquals(pos, _numberOfLines - 1);
-
- // move 3 lines up
- Command moveUp3 = new MoveUp(3);
- moveUp3.execute();
- pos -= 3;
- assertEquals(pos, _tm.getLinePos());
+ int pos = t.getLinePos();
+ assertEquals(pos, t.getDocument().getNumberOfLines() - 1);
+ assertEquals("4. ffirst, ssecond, tthird, ..., llast",
t.getLineText());
+
+ // move 2 lines up
+ Command moveUp2 = new MoveUp(2);
+ moveUp2.execute();
+ pos -= 2;
+ assertEquals(pos, t.getLinePos());
// move another 100000 lines up
Command moveUp100k = new MoveUp(100000);
moveUp100k.execute();
- assertEquals(0, _tm.getLinePos());
-
- assertEquals("1. first second, third, ..., last", _tm.getLineText());
+ assertEquals(0, t.getLinePos());
+ assertEquals("1. first second, third, ..., last", t.getLineText());
}
}
Index: src/viPlugin/test/SharedTestResources.java
===================================================================
retrieving revision 1.1
diff -u -r1.1 SharedTestResources.java
--- src/viPlugin/test/SharedTestResources.java 26 Nov 2003 19:01:40 -0000 1.1
+++ src/viPlugin/test/SharedTestResources.java 8 Dec 2003 07:20:35 -0000
@@ -10,36 +10,35 @@
* design of TextModificator class this class is needed if we want to run all
* tests at once (AllTests class). Try it to know why. If you found out a safer
* style than a Singleton, refactore tests.
+ *
+ * BMK: Strangely enough, the problem with letting this class manage a
+ * TextModificator singleton is that the singleton's consituent fields
* become out of sync with the TextModificator singleton that is utilized
* by other, non-test classes (e.g. Command class derivatives). Is this a
* strange JUnit quirk? I wasn't aware of any parallelism in the Eclipse/JUnit
* combo that would result in this kind of behavior...
+ *
+ * Anyway, the solution is to let the singleton be managed in the actual
+ * TextModificator class as usual, and let the tests configure and acquire
+ * the TextModifcator singleton in the JUnit setUp() methods.
*
* @author <a href="mailto:em...@se...">Martin Krauskopf</a>
* @version $Revision: 1.1 $ $Date: 2003/11/26 19:01:40 $
*/
class SharedTestResources {
-
- private static final String _documentContent =
- "1. first second, third, ..., last\r\n"
- + "2. ffirst, ssecond, tthird, ..., llast\r\n"
- + "3. ffirst, ssecond, tthird, ..., llast\r\n"
- + "4. ffirst, ssecond, tthird, ..., llast";
- private static IDocument doc = new Document(_documentContent);
- private static final int _numberOfLines = 4;
- private static TextModificator _tm;
-
- /**
- * Returns singleton.
- *
- * @return TextModificator
- */
- public static synchronized TextModificator getTextModificator() {
- if (_tm == null) {
- TextModificator.setEmptyInstance();
- _tm = TextModificator.getInstance();
- _tm.setDocument(doc);
- }
- return _tm;
- }
+ private static IDocument doc;
+
+ /**
+ * Return a configured TextModificator.
+ * @param content the string that the returned TextModificator will
+ * represent.
+ * @param numLines the number of logical lines in the text represented
+ * by the returned TextModificator.
+ * @return a configured TextModificator singleton.
+ */
+ public static void setConfiguredTextModificator(String content)
+ {
+ doc = new Document(content);
+ TextModificator.setEmptyInstance(doc);
+ }
public static int getNumberOfLines() {
- return _numberOfLines;
+ return doc.getNumberOfLines();
}
}
Index: src/viPlugin/test/TextModificatorTest.java
===================================================================
retrieving revision 1.15
diff -u -r1.15 TextModificatorTest.java
--- src/viPlugin/test/TextModificatorTest.java 26 Nov 2003 18:07:38 -0000 1.15
+++ src/viPlugin/test/TextModificatorTest.java 8 Dec 2003 07:20:36 -0000
@@ -4,48 +4,45 @@
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
- *
+ *
* Created on 26.05.2003
*******************************************************************************/
package viPlugin.test;
import junit.framework.TestCase;
-
-import org.eclipse.jface.text.Document;
-
import viPlugin.CommandParser;
import viPlugin.TextModificator;
+import org.eclipse.jface.text.IRegion;
/**
* @author Michael Bartl
*/
public class TextModificatorTest extends TestCase {
-
+ private TextModificator t;
private final String simpleString =
"This is a simple.three() line>string ( ) become\r\n"
+ "To test the functionality of\r\n"
+ "the TextModification class";
- private TextModificator tm;
- private Document doc;
-
/**
* Constructor for TextModificatorTest.
* @param arg0
*/
public TextModificatorTest(String arg0) {
super(arg0);
-// tm = TextModificator.getEmptyInstance();
- doc = new Document(simpleString);
- tm.setDocument(doc);
- tm.newVisualSelection(0, 0);
- }
+ }
public static void main(String[] args) {
junit.swingui.TestRunner.run(TextModificatorTest.class);
}
+ protected void setUp() throws Exception
+ {
+ SharedTestResources.setConfiguredTextModificator(simpleString);
+ t = TextModificator.getInstance();
+ }
+
final public void testCommandParser() {
CommandParser parser = new CommandParser();
parser.parse("cc");
@@ -83,17 +80,18 @@
}
final public void testCursorLeft() {
- tm.cursorToLineEnd();
- int cursorPos = tm.cursorLeft(3);
+ t.cursorToLineEnd();
+ int cursorPos = t.cursorLeft(3);
assertEquals(simpleString.indexOf("ome"), cursorPos);
- cursorPos = tm.cursorLeft(100);
+ cursorPos = t.cursorLeft(100);
+ IRegion line = t.getLine();
assertEquals(0, cursorPos);
}
final public void testCursorRight() {
- int cursorPos = tm.cursorRight(3);
+ int cursorPos = t.cursorRight(3);
assertEquals(simpleString.indexOf("s is a"), cursorPos);
- cursorPos = tm.cursorRight(100);
+ cursorPos = t.cursorRight(100);
assertEquals(simpleString.indexOf("\r\nTo test"), cursorPos);
}
@@ -113,15 +111,15 @@
// }
final public void testCursorToLine() {
- int cursorPos = tm.cursorToLine(0, true);
+ int cursorPos = t.cursorToLine(0, true);
assertEquals(0, cursorPos);
- cursorPos = tm.cursorToLine(1, true);
+ cursorPos = t.cursorToLine(1, true);
assertEquals(simpleString.indexOf("To test"), cursorPos);
- cursorPos = tm.cursorToLine(3, true);
+ cursorPos = t.cursorToLine(3, true);
assertEquals(
simpleString.indexOf("the TextModification class"),
cursorPos);
- cursorPos = tm.cursorToLine(100, true);
+ cursorPos = t.cursorToLine(100, true);
assertEquals(
simpleString.indexOf("the TextModification class"),
cursorPos);
@@ -165,25 +163,25 @@
}
final public void testCursorWordEnd() {
- int cursorPos = tm.cursorWordEnd(2);
+ int cursorPos = t.cursorWordEnd(2);
assertEquals(simpleString.indexOf("s a simple"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf("a simple.three()"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf("e.three()"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf(".three()"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf("e() line"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf(") line"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf("e>string"), cursorPos);
- cursorPos = tm.cursorWordEnd(2);
+ cursorPos = t.cursorWordEnd(2);
assertEquals(simpleString.indexOf("g ( ) become"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf("( ) become"), cursorPos);
- cursorPos = tm.cursorWordEnd(1);
+ cursorPos = t.cursorWordEnd(1);
assertEquals(simpleString.indexOf(") become"), cursorPos);
}
@@ -256,4 +254,60 @@
//TODO Implement searchCurrentWordBackwards().
}
+ /**
+ * Tests the functionality of the getNextWord() method.
+ * @throws Exception if there was a problem running the test.
+ */
+ final public void testGetNextWord() throws Exception
+ {
+ // Test single word endings
+ String s0 = "Everyone thinks of changing the world, but no " +
+ "one thinks of changing himself.";
+ int wordSum = 0;
+ int wordIdx = 0;
+ do
+ {
+ wordIdx = t.getNextWord(s0, wordIdx);
+ ++wordSum;
+ } while (wordIdx < s0.length() - 1);
+ assertEquals(14, wordSum);
+
+ // Test multiple series of word endings
+ String s1 = "f(x) = mx + b";
+ wordSum = 0;
+ wordIdx = 0;
+ do
+ {
+ wordIdx = t.getNextWord(s1, wordIdx);
+ ++wordSum;
+ } while (wordIdx < s1.length() - 1);
+ assertEquals(7, wordSum);
+
+ // Test no word endings
+ String s2 = "Supercalifragalisticexpialadocious";
+ assertEquals(s2.length() - 1, t.getNextWord(s2, 0));
+ // Test empty string behavior
+ String s3 = "";
+ assertEquals(0, t.getNextWord(s3, 0));
+ }
+
+
+ /**
+ * Tests the functionality of the getPreviousWord() method.
+ * @throws Exception if there was a problem running the test.
+ */
+ final public void testGetPreviousWord() throws Exception
+ {
+ // TODO: Implement test.
+ }
+
+
+ /**
+ * Tests the functionality of the cursorToLineEnd() method.
+ * @throws Exception if there was a problem running the test.
+ */
+ final public void testCursorToLineEnd() throws Exception
+ {
+ // TODO: Implement test.
+ }
}
----- End forwarded message -----
|
|
From: Michael B. <zed...@sa...> - 2003-12-08 12:49:04
|
Date: Mon, 8 Dec 2003 13:47:44 +0100
To: "Brian M. Kelley" <bk...@sb...>
Subject: Re: JUnit Test writer for Eclipse based
Hi Brian!
I've reviewed and applied your patch! Looks good! There have been 2
annyoing things tough!
1. The patch was incredibly big, because of whitespace issues. Eclipse
has some problems even when I click on "Ignore Whitespace".
2. For a reason I cannot see you renamed the TextModificator instance to
t instead of _tm. I've reverted this change.
There are always problems with applying patches that change something at
the end of a file. "Only-God-knows" why Eclipse can't handle this, but that's
not your fault ;)
I've commited everything to CVS, so don't forget to update your working
copy.
Thank you & Keep up the good work,
Michael
|
|
From: Michael B. <zed...@sa...> - 2003-12-05 08:53:49
|
On Thu, Dec 04, 2003 at 12:18:29PM -0500, Rajesh Kottu wrote: > Michael, > > I am new sourceforge.net. Could you please tell where is CVS head and what > is project name. http://sf.net/projects/viplugin click on CVS for more information on how to check out! Use the anonymous account (Just hit "Enter" on password request)! cvs -d:pserver:ano...@cv...:/cvsroot/viplugin login cvs -z3 -d:pserver:ano...@cv...:/cvsroot/viplugin co viPlugin After 3 successfull patches I usualy grant CVS write access. Have fun, Michael |
|
From: Rajesh K. <rk...@do...> - 2003-12-04 17:18:24
|
Michael, I am new sourceforge.net. Could you please tell where is CVS head and what is project name. Thanks Rajesh. Michael Bartl wrote: > On Thu, Dec 04, 2003 at 08:45:22AM -0800, Rajeswara Rao Kottu wrote: > > > > I am Raj. I have 8 years of software development experiance. > > > > Knowledgeble in java technologies. I have great urge to > > > > participate in tool development using JAVA technologies. > > Hello! > > This sounds great! I hope you can help out with the JUnit tests, because > I really want the viPlugin to be as stable and bugfree as possible. We > already have a nice userbase and I don't want to disappoint them. > > Just checkout CVS Head, start hacking around on the testsuite and send > me a patch. After 3 patches I usualy grant CVS access ;) > > Have fun, > Michael |
|
From: Michael B. <zed...@sa...> - 2003-12-04 16:59:55
|
On Thu, Dec 04, 2003 at 08:45:22AM -0800, Rajeswara Rao Kottu wrote:
>
> I am Raj. I have 8 years of software development experiance.
>
> Knowledgeble in java technologies. I have great urge to
>
> participate in tool development using JAVA technologies.
Hello!
This sounds great! I hope you can help out with the JUnit tests, because
I really want the viPlugin to be as stable and bugfree as possible. We
already have a nice userbase and I don't want to disappoint them.
Just checkout CVS Head, start hacking around on the testsuite and send
me a patch. After 3 patches I usualy grant CVS access ;)
Have fun,
Michael
|
|
From: Michael B. <zed...@sa...> - 2003-12-04 01:04:27
|
Hi all!
It seems we got another release out! Beware that from now on viPlugin
comes in 2 versions. E21 for Eclipse 2.1-3.0M4 and E30 for Eclipse
starting from 3.0M5, so be sure to download the correct version.
Via the update manager only E30 can be downloaded!
* fixed ENTER command
* fixed "Widget is disposed" problem
* '/' and '@' were added to wordEndings chars
* fixed width of VimStyle cursor. It is now set in accordance with font
* used by the current editor.
* dt, dT, df, dF work again
* tests were revived. Just initial version.
Have fun,
Michael
|
|
From: Michael B. <zed...@sa...> - 2003-12-03 11:54:24
|
On Tue, Dec 02, 2003 at 11:02:17AM -0800, Brian M. Kelley wrote:
> Hello. Just wanted to drop a line to your team and thank you
> for starting up this project - not having vi functionality
> in eclipse, up until viPlugin was started, was my main
> reason for not using the entire IDE.
>
> I'm also interested in taking on the job of unit test
> developer. I'm a professional developer by day, with 5 years
> of Java programming experience (I've been programming for
> 17+ years). I work directly with the JUnit test framework
> every day for our products. If you need help in that space,
> please let me know - I'd be glad to put some time in for the
> project.
Hello!
This sounds great! I hope you can help out with the JUnit test, because
I really want the viPlugin to be as stable and bugfree as possible. We
already have a nice userbase and I don't want to disappoint them.
Just checkout CVS Head, start hacking around on the testsuite and send
me a patch. After 3 patches I usualy grant CVS access ;)
Have fun,
Michael
|
|
From: martin.krauskopf <mar...@1p...> - 2003-12-03 08:01:15
|
Michael Bartl wrote: > On Tue, Dec 02, 2003 at 09:28:51AM -0800, Zubair wrote: > >>Hi there, >> >>It would be great if I get a chance to help you out with your >>endeavour if I can. >> >>Hope u consider this offer of mine. >>Regards, >>Zubair > > > Hello! > > I would love to get more JUnit test to provide the users a better tested > release! > > Have fun, > Michael Just one note. The class TextModificatorTest is not used anymore and it will be probably completely removed. It's better to test *Command* classes as far as it is possible. See *Command*Test classes. Another advantage is that it will force us to move more functinality to command classes (which should be the main aim for the next few releases or the code become unmaintainable). Here is the comment from the TextModificator class: * TextModificator is a utility class for all kinds of operations on text * strings. Sooner or later this will be split into the single Commands * of the viplugin.commands package, ViDocument class and a TextUtil * class. So there should be one ViDocument (wrapper for Document) per ViLayer and TextModificator.getInstance() should be eliminated. ToMichael> Correct me if I'm wrong somewhere. I'll appreciate more insinght. It seems that I will have some free time again since tomorrow. So I hope I will start to code something again (even on my lazy laptop ;) ). emdot |
|
From: Michael B. <zed...@sa...> - 2003-12-02 17:59:02
|
On Tue, Dec 02, 2003 at 09:28:51AM -0800, Zubair wrote: > Hi there, > > I am very much interested in working with you > project "viplugin". I am Java Developer with more than one > year experience in the same. I was involved in some very > interesting projects based on J2EE and the Java RMI > technologies. Quite recently I have worked for IBM Storage > Systems, Germany and developed a Swing based UI for > cosolidating, controlling and analyzing logging over a the > network. I find it very interesting and quite thoughtful to > write JUnit tests. > > It would be great if I get a chance to help you out with your > endeavour if I can. > > Hope u consider this offer of mine. > Regards, > Zubair Hello! That sounds great! Please have a look at the JUnit tests we already have (many are outdated, but just to get the idea)! Get the CVS Head from cvs.sourceforge.net and send me a patch. After 3 patches you will be added to the team (and announced on the homepage). I would love to get more JUnit test to provide the users a better tested release! Have fun, Michael |
|
From: martin.krauskopf <mar...@1p...> - 2003-12-01 09:30:11
|
Ken Collins wrote: > I made a small modification to get enter to work correctly. I'm aware that > this might be a redundant effort, but I use enter constantly, so this was > really bugging me. I followed the command pattern used with the other > motion commands so this should be easy to drop in. Thanks for the patch. I've just applied it and works well! :) > I might be able to do some of the JUnits after the holidays when I've had > time to get more familiar with the code and plugin coding in general. I > don't want to commit to anything just yet, though. It would be very welcome. I've coded very initial version of new tests. So you can take a look at them. I don't have a lot of time now ad moreover I need a new computer. And holidays is comming.... so new patchs and tests are very welcome! ;) Martin Krauskopf |
|
From: Ken C. <ke...@co...> - 2003-11-29 03:15:10
|
I made a small modification to get enter to work correctly. I'm aware that
this might be a redundant effort, but I use enter constantly, so this was
really bugging me. I followed the command pattern used with the other
motion commands so this should be easy to drop in.
I might be able to do some of the JUnits after the holidays when I've had
time to get more familiar with the code and plugin coding in general. I
don't want to commit to anything just yet, though.
Ken Collins
Index: .classpath
===================================================================
retrieving revision 1.19
diff -u -r1.19 .classpath
--- .classpath 26 Nov 2003 16:50:35 -0000 1.19
+++ .classpath 29 Nov 2003 03:00:04 -0000
@@ -1,7 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.ide_3.0.0/idesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.ide_3.0.0/ide.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.views_3.0.0/viewssrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.views_3.0.0/views.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface.text_3.0.0/jfacetextsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface.text_3.0.0/jfacetext.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.text_3.0.0/textsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.text_3.0.0/text.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench.texteditor_3.0.0/texteditorsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench.texteditor_3.0.0/texteditor.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.editors_3.0.0/editorssrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.editors_3.0.0/editors.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.resources_3.0.0/resourcessrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.resources_3.0.0/resources.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_JDT_SOURCE_SRC/org.junit_3.8.1/junitsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.junit_3.8.1/junit.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench_3.0.0/workbenchsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench_3.0.0/workbench.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui_3.0.0/uisrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui_3.0.0/ui.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_LINUX_GTK_X86_SRC/org.eclipse.swt.gtk_3.0.0/ws/gtk/swtsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.swt.gtk_3.0.0/ws/gtk/swt.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_LINUX_GTK_X86_SRC/org.eclipse.swt.gtk_3.0.0/ws/gtk/swt-pisrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.swt.gtk_3.0.0/ws/gtk/swt-pi.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_LINUX_GTK_X86_SRC/org.eclipse.swt.gtk_3.0.0/ws/gtk/swt-mozillasrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.swt.gtk_3.0.0/ws/gtk/swt-mozilla.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface_3.0.0/jfacesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface_3.0.0/jface.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.boot_3.0.0/bootsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.boot_3.0.0/boot.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.runtime_3.0.0/runtimesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime_3.0.0/runtime.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Index: src/viPlugin/commands/motion/EnterCommand.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 EnterCommand.java
--- src/viPlugin/commands/motion/EnterCommand.java 25 Nov 2003 17:25:47 -0000 1.3
+++ src/viPlugin/commands/motion/EnterCommand.java 29 Nov 2003 03:00:07 -0000
@@ -21,7 +21,7 @@
public void execute() {
Command command = new MoveDown(_counter);
command.execute();
- command = new MoveToLineBegin();
+ command = new MoveToFirstChar();
command.execute();
}
}
Index: src/viPlugin/commands/motion/MoveToFirstChar.java
===================================================================
RCS file: src/viPlugin/commands/motion/MoveToFirstChar.java
diff -N src/viPlugin/commands/motion/MoveToFirstChar.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/viPlugin/commands/motion/MoveToFirstChar.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,25 @@
+package viPlugin.commands.motion;
+
+import viPlugin.TextModificator;
+
+/**
+ * Moves to the first non-blank character in a line.
+ *
+ * @author <a href="mailto:ke...@co...">Ken Collins</a>
+ * @version $Revision:$ $Date:$
+ */
+public class MoveToFirstChar extends MotionCommand {
+
+ public MoveToFirstChar() {
+ super(1);
+ }
+
+ /* (non-Javadoc)
+ * @see viPlugin.commands.Command#execute()
+ */
+ public void execute() {
+ TextModificator tm = TextModificator.getInstance();
+ tm.cursorToLineFirstNonBlank();
+ }
+
+}
|
|
From: Michael B. <zed...@sa...> - 2003-11-25 00:53:09
|
Hi all! The viPlugin development team looks for 2 more developers: JUnit Testwriter ---------------- Tasks: - Fix the current JUnit TestSuite (most tests are outdated, but give a feeling on how they should be written) - Write many more testcases to ensure proper releases without too much manual retesting Requirements: - Java programming skills (rather simple task) - Time Release manager --------------- Task: - Uploading and adding the release to sf.net - Uploading eclipse software update site http://www.satokar.com/viplugin_update/ - Announcing the release on freshmeat.net, eclipse-plugin.2y.net, ... Requirements: - Time: 1-2h per release (at least once a week) Please write a mail if you are interested. Have fun, Michael |
|
From: Michael B. <zed...@sa...> - 2003-11-25 00:46:33
|
Hi all!
Sooo many bugfixes:
* fixed some 3.0M5 issues
* fixed VIM style cursor for Eclipse version >3.0M3
* fixed default preferences
* VisualMode implementation redesigned (completely refactored)
* new commands: <ENTER>, <SPACE>
* bugfix: '-' and '_' were added to wordEndings chars ('e')
* bugfix: 'gg' works with counter (e.g. 4gg)
* bugfix: <ESC> was detected while searching
* bugfix: 'v' leaves VisualMode if it's active
* ViEditor was disabled (should be possible reason for some issues)
* Code clean up: introduced MotionCommand factory and classes
Have fun,
Michael
|
|
From: george w. <gw...@ya...> - 2003-11-20 19:36:50
|
Just tried the visual mode. It rocks! Thank you Martin and Michael for your good work! -george --- Michael Bartl <zed...@sa...> wrote: > Hi all! > > viPlugin 0.2.5 is out! > > Martin Krauskopf implemented the following: > > * implemented visual mode > * bugfixes > * code cleanups > > Get it while it's hot! > > Have fun, > Michael > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Viplugin-user mailing list > Vip...@li... > https://lists.sourceforge.net/lists/listinfo/viplugin-user __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ |
|
From: Michael B. <zed...@sa...> - 2003-11-19 22:06:51
|
Hi all!
viPlugin 0.2.5 is out!
Martin Krauskopf implemented the following:
* implemented visual mode
* bugfixes
* code cleanups
Get it while it's hot!
Have fun,
Michael
|
|
From: martin.krauskopf <mar...@1p...> - 2003-11-18 08:43:25
|
Hi Michael,
I contacted you at your email. But you are not responding and CVS is not
updated. I don't know if your email is out of order or you are not
online at all for now (or enjoying your CD success ;) ). So let me know
when you are online and I will send you another patch (initial Visual
Mode support and some other changes).
m.
|
|
From: Michael B. <zed...@sa...> - 2003-11-10 22:42:56
|
Hi all!
Another nice release to keep you going!
Martin Krauskopf implemented the following:
* One ViLayer per file which means it keeps all information of
individual layers (e.g. undo, search, ...) when switching
* When the ViLayer is unloaded (button/menu), all layers (for all files)
are unloaded (maybe it will be better to load/unload layers
separately - should probably depend on user preferences)
* It is possible to load/unload the ViLayer even if there is no file open
* commands: "yl", "yh", "cl", "ch", "dl", "dh"
* code cleanups
Have fun,
Michael
|
|
From: george w. <gw...@ya...> - 2003-10-31 14:35:57
|
Not sure if it is fixed: version .22 appears to disable some hotkeys such as: ^C,^P, F5,6,7,8. So I rolled back to .21 --- Michael Bartl <zed...@sa...> wrote: > Hi all! > > 0.2.3 is out: > > * implemented C > > Martin Krauskopf fixed the following: > > * "J": joins two lines with correct cursor positioning and removes > indentation between joined lines > * "I": jumps to the first non-blank character > * "^" for yank and delete commands: deletes or yanks from current > position > to the first non-blank character. known bug: works only in back > direction (but it's 98% of cases :) > * "^" for movement: jumps to the first non-blank character > > Have fun, > Michael > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Viplugin-user mailing list > Vip...@li... > https://lists.sourceforge.net/lists/listinfo/viplugin-user __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ |