|
What this is
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2004Sun
* Microsystems, Inc. All Rights Reserved.
*/
package gui.action;
import java.awt.event.KeyEvent;
import java.awt.Component;
import java.awt.Point;
import javax.swing.text.Caret;
import org.netbeans.editor.BaseCaret;
import org.netbeans.modules.editor.java.JavaKit;
import org.netbeans.modules.editor.options.BaseOptions;
import org.netbeans.modules.editor.options.JavaOptions;
import org.netbeans.modules.java.settings.JavaSettings;
import org.netbeans.modules.web.core.syntax.JSPKit;
import org.netbeans.modules.web.core.syntax.JSPOptions;
import org.netbeans.jellytools.MainWindowOperator;
import org.netbeans.jellytools.EditorOperator;
import org.netbeans.jellytools.EditorWindowOperator;
import org.netbeans.jellytools.ProjectsTabOperator;
import org.netbeans.jellytools.nodes.Node;
import org.netbeans.jellytools.actions.ActionNoBlock;
import org.netbeans.jellytools.actions.Action.Shortcut;
import org.netbeans.jellytools.actions.OpenAction;
import org.netbeans.jemmy.operators.ComponentOperator;
import org.netbeans.jemmy.ComponentChooser;
/**
* Test of java completion in opened source editor.
*
* @author anebuzelsky@netbeans.org, mmirilovic@netbeans.org
*/
public class JavaCompletionInJspEditor extends testUtilities.PerformanceTestCase {
/** Creates a new instance of JavaCompletionInEditor */
public JavaCompletionInJspEditor(String testName) {
super(testName);
expectedTime = WINDOW_OPEN;
WAIT_AFTER_OPEN = 1;
}
/** Creates a new instance of JavaCompletionInEditor */
public JavaCompletionInJspEditor(String testName, String performanceDataName) {
super(testName, performanceDataName);
expectedTime = WINDOW_OPEN;
}
public String text;
public Shortcut shcut;
public void testScriptletCC() {
WAIT_AFTER_OPEN = 6000;
text = "<% request";
//shcut = new Shortcut(KeyEvent.VK_SEMICOLON, KeyEvent.SHIFT_MASK);
shcut = new Shortcut(KeyEvent.VK_DECIMAL);
measureTime();
}
public void testExpressionCC() {
WAIT_AFTER_OPEN = 6000;
text = "<%= request";
//shcut = new Shortcut(KeyEvent.VK_SEMICOLON, KeyEvent.SHIFT_MASK);
shcut = new Shortcut(KeyEvent.VK_DECIMAL);
measureTime();
}
public void testDeclarationCC() {
WAIT_AFTER_OPEN = 6000;
text = "<%! java";
//shcut = new Shortcut(KeyEvent.VK_SEMICOLON, KeyEvent.SHIFT_MASK);
shcut = new Shortcut(KeyEvent.VK_DECIMAL);
measureTime();
}
public void testAllTags() {
WAIT_AFTER_OPEN = 6000;
text = "";
//shcut = new Shortcut(KeyEvent.VK_SEMICOLON, KeyEvent.SHIFT_MASK);
shcut = new Shortcut(KeyEvent.VK_COMMA, KeyEvent.SHIFT_MASK);
measureTime();
}
public void testTagAttribute1() {
WAIT_AFTER_OPEN = 6000;
text = "<%@page ";
//shcut = new Shortcut(KeyEvent.VK_SEMICOLON, KeyEvent.SHIFT_MASK);
shcut = new Shortcut(KeyEvent.VK_SPACE, KeyEvent.CTRL_MASK);
measureTime();
}
public void testTagAttribute2() {
WAIT_AFTER_OPEN = 6000;
text = "
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.