org.apache.log4j.varia.NullAppender#org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences源码实例Demo

下面列出了org.apache.log4j.varia.NullAppender#org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: tmxeditor8   文件: MergeSegmentsTest.java
/**
 * 每个测试开始之前执行
 */
@Before
public void setUp() {
	if (SLOW_PLAYBACK) {
		SWTBotPreferences.PLAYBACK_DELAY = 500;
	}
	SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
	INVISIBLE_CHAR = XlfEditor.INVISIBLE_CHAR;
	reTag = "(" + INVISIBLE_CHAR + "\\d+)?" + INVISIBLE_CHAR + "(x|bx|ex|g|bpt|ept|mrk|sub|ph|it)" + INVISIBLE_CHAR + "(\\d+" + INVISIBLE_CHAR + ")?";
	bot = HSBot.bot();
	bot.closeAllEditors();
	ts = TS.getInstance();
	prjName = "swtBot-Project-001";
	fileName = "HSCAT8-3.xlf";
	ProjectTreeView.doubleClickXlfFile(prjName, fileName);
	xe = new XlfEditor(bot.editorByTitle(fileName));
}
 
源代码2 项目: dsl-devkit   文件: CoreSwtbotTools.java
/**
 * Sets common SWTBot preferences.
 */
public static void initializePreferences() {
  // -Dorg.eclipse.swtbot.playback.delay=2
  SWTBotPreferences.PLAYBACK_DELAY = BOT_PLAYBACK_DELAY;

  // System.setProperty("org.eclipse.swtbot.keyboardLayout", "EN_US");
  SWTBotPreferences.KEYBOARD_LAYOUT = "org.eclipse.swtbot.swt.finder.keyboard.EN_US";

  // SWTBot Keyboard strategies
  SWTBotPreferences.KEYBOARD_STRATEGY = "org.eclipse.swtbot.swt.finder.keyboard.SWTKeyboardStrategy";

  // keyboard type interval
  SWTBotPreferences.TYPE_INTERVAL = KEYBOARD_TYPE_INTERVAL;

  // Waiting for Widgets
  SWTBotPreferences.TIMEOUT = BOT_WIDGET_TIMEOUT;

  // screenshot directory
  SWTBotPreferences.SCREENSHOTS_DIR = System.getProperty(SWTBotPreferenceConstants.KEY_SCREENSHOTS_DIR, "target/screenshots");

  // test window focus policy
  workbenchFocusPolicy = WorkbenchFocusPolicy.valueOf(System.getProperty(PROPERTY_COM_AVALOQ_TEST_WORKBENCHFOCUSPOLICY, WorkbenchFocusPolicy.REFOCUS.toString()));

  preferencesInitialized = true;
}
 
源代码3 项目: dsl-devkit   文件: DeChKeyboardLayoutTest.java
/**
 * Tests com.avaloq.test.swtbot.DE_CH.
 */
@Test
public void testDeChKeyboardLayout() {
  SWTBotPreferences.KEYBOARD_LAYOUT = "com.avaloq.test.swtbot.DE_CH";
  SWTBotPreferences.KEYBOARD_STRATEGY = "org.eclipse.swtbot.swt.finder.keyboard.MockKeyboardStrategy";
  SwtWorkbenchBot bot = new SwtWorkbenchBot();

  bot.closeWelcomePage();
  bot.menu("File").menu("New").menu("Untitled Text File").click();
  SWTBotEclipseEditor editor = bot.activeEditor().toTextEditor();
  editor.setFocus();
  editor.typeText(EXPECTED_RESULT);
  String actualResult = editor.getText();
  bot.closeAllEditors();

  assertEquals("Written and read characters must exactly match", EXPECTED_RESULT, actualResult);
}
 
源代码4 项目: tracecompass   文件: TestInvalidCtfTrace.java
/**
 * Initialization
 */
@BeforeClass
public static void beforeClass() {
    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBot Thread"); // for the debugger
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
    fBot = new SWTWorkbenchBot();

    /* finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
    SWTBotUtils.createProject(PROJET_NAME);

}
 
源代码5 项目: tracecompass   文件: ImportAndReadPcapTest.java
/**
 * Test Class setup
 */
@BeforeClass
public static void init() {

    SWTBotUtils.initialize();

    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 300000; /* 300 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();

    SWTBotUtils.closeView("welcome", fBot);
    /* Switch perspectives */
    SWTBotUtils.switchToPerspective(NETWORK_PERSPECTIVE_ID);
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
源代码6 项目: tracecompass   文件: ChartMakerDialogTest.java
/**
 * Things to setup
 */
@BeforeClass
public static void beforeClass() {

    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBotTest");
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
    SWTBotUtils.openView(CustomChartStubView.ID);
    CustomChartStubView.setChartProvider(CHART_PROVIDER);
}
 
源代码7 项目: tracecompass   文件: XmlTimegraphViewTest.java
/**
 * Things to setup
 */
@Before
public void before() {

    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBotTest");
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 10000; /* 10 second timeout */
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

    fBot = new SWTWorkbenchBot();

    loadXmlFile();
    openTrace();
    openView(VIEW_NAME);
}
 
源代码8 项目: tracecompass   文件: PatternLatencyViewTestBase.java
/**
 * Things to setup
 */
@BeforeClass
public static void beforeClass() {

    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBotTest");
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

    fBot = new SWTWorkbenchBot();

    loadXmlFile();
    openTrace();
}
 
源代码9 项目: tracecompass   文件: ViewsResponseTest.java
/**
 * Things to setup
 */
@Before
public void beforeClass() {

    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBotTest");
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 60000; /* 60 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    SWTWorkbenchBot bot = new SWTWorkbenchBot();
    SWTBotUtils.closeView("welcome", bot);
    /* Prepare the workspace */
    prepareWorkspace();
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

    /* Create project */
    SWTBotUtils.createProject(PROJECT_NAME);
}
 
源代码10 项目: tracecompass   文件: XYDataProviderBaseTest.java
/**
 * Before Class
 */
@BeforeClass
public static void beforeClass() {
    SWTBotUtils.initialize();

    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();
    SWTBotUtils.closeView("welcome", fBot);
    /* Create the trace project */
    SWTBotUtils.createProject(TRACE_PROJECT_NAME);
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
源代码11 项目: tracecompass   文件: TraceTypePreferencePageTest.java
/**
 * Before Class
 */
@BeforeClass
public static void beforeClass() {
    SWTBotUtils.initialize();

    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();
    /* Create the trace project */
    SWTBotUtils.createProject(TRACE_PROJECT_NAME);
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

    /* set up test trace */
    setUpTrace();

}
 
/** Test Class setup */
@BeforeClass
public static void init() {
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    SWTBotUtils.initialize();
    Thread.currentThread().setName(SWT_BOT_THREAD_NAME); // for the debugger
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
    fBot = new SWTWorkbenchBot();

    /* finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

}
 
源代码13 项目: tracecompass   文件: FontEventEditorTest.java
/**
 * Test Class setup
 */
@BeforeClass
public static void init() {
    SWTBotUtils.initialize();

    /* set up test trace */
    URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(COLUMN_TRACE_PATH), null);
    URI uri;
    try {
        uri = FileLocator.toFileURL(location).toURI();
        fTestFile = new File(uri);
    } catch (URISyntaxException | IOException e) {
        fail(e.getMessage());
    }

    assumeTrue(fTestFile.exists());

    /* Set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();

    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
源代码14 项目: tracecompass   文件: TmfAlignTimeAxisTest.java
/**
 * Initialization, creates a temp trace
 *
 * @throws IOException
 *             should not happen
 */
@BeforeClass
public static void init() throws IOException {
    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBot Thread"); // for the debugger
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
    SWTWorkbenchBot bot = new SWTWorkbenchBot();

    /* finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
    fLocation = File.createTempFile("sample", ".xml");
    try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fLocation, "rw")) {
        braf.writeBytes(TRACE_START);
        for (int i = 0; i < NUM_EVENTS; i++) {
            braf.writeBytes(makeEvent(i * 100, i % 4));
        }
        braf.writeBytes(TRACE_END);
    }
    SWTBotUtils.createProject(PROJET_NAME);
    SWTBotUtils.selectTracesFolder(bot, PROJET_NAME);
}
 
源代码15 项目: tracecompass   文件: TestTraceOffsetting.java
/**
 * Initialization, creates a temp trace
 *
 * @throws IOException
 *             should not happen
 */
@Before
public void init() throws IOException {
    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBot Thread"); // for the debugger
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
    fBot = new SWTWorkbenchBot();

    IEclipsePreferences defaultPreferences = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
    defaultPreferences.put(ITmfTimePreferencesConstants.TIME_ZONE, "GMT-05:00");
    TmfTimestampFormat.updateDefaultFormats();

    /* finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
    fLocation = File.createTempFile("sample", ".xml");
    try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fLocation, "rw")) {
        braf.writeBytes(TRACE_START);
        for (int i = 0; i < NUM_EVENTS; i++) {
            braf.writeBytes(makeEvent(i * 100, i % 4));
        }
        braf.writeBytes(TRACE_END);
    }
}
 
/**
 * Test Class setup
 */
@BeforeClass
public static void init() {
    SWTBotUtils.initialize();

    /* set up test trace */
    URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(COLUMN_TRACE_PATH), null);
    URI uri;
    try {
        uri = FileLocator.toFileURL(location).toURI();
        fTestFile = new File(uri);
    } catch (URISyntaxException | IOException e) {
        fail(e.getMessage());
    }

    assumeTrue(fTestFile.exists());

    /* Set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();

    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
源代码17 项目: tracecompass   文件: FilterViewerTest.java
/**
 * Initialization, creates a temp trace
 *
 * @throws IOException
 *             should not happen
 */
@BeforeClass
public static void init() throws IOException {
    IEclipsePreferences defaultPreferences = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
    defaultPreferences.put(ITmfTimePreferencesConstants.TIME_ZONE, "GMT-05:00");
    TmfTimestampFormat.updateDefaultFormats();

    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBot Thread"); // for the debugger
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
    fBot = new SWTWorkbenchBot();

    /* finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
    fFileLocation = File.createTempFile("sample", ".xml");
    try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fFileLocation, "rw")) {
        braf.writeBytes(TRACE_START);
        for (int i = 0; i < 100; i++) {
            braf.writeBytes(makeEvent(i * 100, i % 4));
        }
        braf.writeBytes(TRACE_END);
    }
}
 
源代码18 项目: tracecompass   文件: MarkerSetSwtBotTest.java
/**
 * Set up the test context and environment
 */
@BeforeClass
public static void setUp() {
    SWTBotUtils.initialize();

    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 10000; /* 10 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fBot = new SWTWorkbenchBot();

    SWTBotUtils.createProject(TRACE_PROJECT_NAME);
    WaitUtils.waitForJobs();

    final CtfTestTrace cygProfile = CtfTestTrace.CYG_PROFILE;
    LttngUstTrace trace = LttngUstTestTraceUtils.getTrace(cygProfile);
    fStart = ((CtfTmfTrace) trace).getStartTime().toNanos();
    fFullRange = new TmfTimeRange(TmfTimestamp.fromNanos(fStart), TmfTimestamp.fromNanos(fStart + 100l));
    final File file = new File(trace.getPath());
    LttngUstTestTraceUtils.dispose(cygProfile);
    SWTBotUtils.openTrace(TRACE_PROJECT_NAME, file.getAbsolutePath(), UST_ID);
    SWTBotUtils.openView(FlameChartView.ID);
    fViewBot = fBot.viewByTitle("Flame Chart");
    WaitUtils.waitForJobs();
}
 
源代码19 项目: tracecompass   文件: ProjectExplorerRefreshTest.java
/**
 * Test Class setup
 *
 * @throws Exception
 *             on error
 */
@BeforeClass
public static void init() throws Exception {
    TestDirectoryStructureUtil.generateTraceStructure(TEST_TRACES_PATH);

    SWTBotUtils.initialize();

    /* Set up for SWTBot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();

    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

    SWTBotUtils.createProject(TRACE_PROJECT_NAME);
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(TRACE_PROJECT_NAME);
    fTracesFolder = new File(Objects.requireNonNull(TmfProjectRegistry.getProject(project, true).getTracesFolder()).getResource().getLocation().toOSString());

    createCProject(C_PROJECT_NAME);
    setTracingNature(C_PROJECT_NAME);
    IProject cProject = ResourcesPlugin.getWorkspace().getRoot().getProject(C_PROJECT_NAME);
    fCProjectFolder = cProject.getLocation().toFile();
}
 
/**
 * Things to setup
 */
@BeforeClass
public static void beforeClass() {

    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBotTest");
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

}
 
源代码21 项目: tracecompass   文件: LamiChartViewerTest.java
/**
 * Start the SWT bot test, register the LAMI analyses and open a trace (any
 * trace) on a new project
 */
@BeforeClass
public static void beforeClass() {

    SWTBotUtils.initialize();
    Thread.currentThread().setName("SWTBotTest");
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

    OnDemandAnalysisManager.getInstance().registerAnalysis(LamiAnalyses.MULTIPLE_ROW.getAnalysis());
    OnDemandAnalysisManager.getInstance().registerAnalysis(LamiAnalyses.MULTIPLE_SIMILAR_ROW.getAnalysis());

    // Create the project and open the trace
    String tracePath = TRACE.getFullPath();

    SWTBotUtils.createProject(PROJECT_NAME);
    SWTBotUtils.openTrace(PROJECT_NAME, tracePath, TRACE_TYPE);
    WaitUtils.waitForJobs();
}
 
源代码22 项目: tracecompass   文件: FlameChartViewTest.java
/**
 * Initialization
 */
@BeforeClass
public static void init() {
    SWTBotUtils.initialize();

    Thread.currentThread().setName("SWTBot Thread"); // for the debugger
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    sfLogger.removeAllAppenders();
    sfLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
    sfBot = new SWTWorkbenchBot();

    SWTBotUtils.closeView("Statistics", sfBot);
    /* finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
源代码23 项目: tracecompass   文件: FindDialogTestBase.java
/**
 * Before Class
 *
 * @throws IOException
 *             When the trace could not be opened
 */
@BeforeClass
public static void beforeClass() throws IOException {
    SWTBotUtils.initialize();

    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();
    SWTBotUtils.closeView("welcome", fBot);
    /* Switch perspectives */
    SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);
    /* Create the trace project */
    SWTBotUtils.createProject(TRACE_PROJECT_NAME);
    /* Open the trace */
    String tracePath = FileUtils.toFile(FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL())).getAbsolutePath();
    SWTBotUtils.openTrace(TRACE_PROJECT_NAME, tracePath, KERNEL_TRACE_TYPE);
    /* Finish waiting for eclipse to load */
    SWTBotUtils.activateEditor(fBot, CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL().getPath().replaceAll("/", ""));
}
 
源代码24 项目: tracecompass   文件: OpenTraceStressTest.java
/**
 * Test Class setup
 */
@BeforeClass
public static void init() {
    SWTBotUtils.initialize();

    /* Set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */

    workbenchbot = new SWTWorkbenchBot();

    /* Close welcome view */
    SWTBotUtils.closeView("Welcome", workbenchbot);

    /* Switch perspectives */
    SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);

    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
源代码25 项目: tracecompass   文件: KernelTestBase.java
/**
 * Before Class
 */
@BeforeClass
public static void beforeClass() {
    SWTBotUtils.initialize();

    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();
    SWTBotUtils.closeView("welcome", fBot);
    /* Switch perspectives */
    SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);
    /* Create the trace project */
    SWTBotUtils.createProject(TRACE_PROJECT_NAME);
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
/**
 * Before Class
 *
 * @throws IOException
 *             If the traces can not be found
 */
@BeforeClass
public static void beforeClass() throws IOException {
    SWTBotUtils.initialize();

    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
    fBot = new SWTWorkbenchBot();
    SWTBotUtils.closeView("welcome", fBot);
    /* Switch perspectives */
    SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);
    /* Create the trace project */
    SWTBotUtils.createProject(TRACE_PROJECT_NAME);
    /* Finish waiting for eclipse to load */
    WaitUtils.waitForJobs();
}
 
源代码27 项目: tracecompass   文件: ControlViewTest.java
/**
 * Initialization
 */
@BeforeClass
public static void init() {
    SWTBotUtils.initialize();

    Thread.currentThread().setName("SWTBot Thread"); // for the debugger
    /* set up for swtbot */
    SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
    fLogger.removeAllAppenders();
    fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
    fBot = new SWTWorkbenchBot();

    SWTBotUtils.closeView("welcome", fBot);

    /* finish waiting for eclipse to load */
    WaitUtils.waitForJobs();

    SWTBotUtils.switchToPerspective(PERSPECTIVE_ID);
}
 
源代码28 项目: translationstudio8   文件: MergeSegmentsTest.java
/**
 * 每个测试开始之前执行
 */
@Before
public void setUp() {
	if (SLOW_PLAYBACK) {
		SWTBotPreferences.PLAYBACK_DELAY = 500;
	}
	SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
	INVISIBLE_CHAR = XlfEditor.INVISIBLE_CHAR;
	reTag = "(" + INVISIBLE_CHAR + "\\d+)?" + INVISIBLE_CHAR + "(x|bx|ex|g|bpt|ept|mrk|sub|ph|it)" + INVISIBLE_CHAR + "(\\d+" + INVISIBLE_CHAR + ")?";
	bot = HSBot.bot();
	bot.closeAllEditors();
	ts = TS.getInstance();
	prjName = "swtBot-Project-001";
	fileName = "HSCAT8-3.xlf";
	ProjectTreeView.doubleClickXlfFile(prjName, fileName);
	xe = new XlfEditor(bot.editorByTitle(fileName));
}
 
源代码29 项目: nebula   文件: GeoMapTest.java
@Before
public void setUp() {
	SWTBotPreferences.PLAYBACK_DELAY = 1000; // slow down tests...Otherwise we won't see anything
	display = Display.getCurrent();
	parent = createUI(display);

	bot = new SWTBot(parent);
	geoMapPositioned = geoMap = bot.widget(Is.isA(GeoMap.class));
	geoMapBot = new SWTBotGeoMap(geoMap);
}
 
源代码30 项目: nebula   文件: GeoMapViewerTest.java
@Before
public void setUp() {
	SWTBotPreferences.PLAYBACK_DELAY = 1000; // slow down tests...Otherwise we won't see anything
	display = Display.getCurrent();
	parent = createUI(display);

	bot = new SWTBot(parent);
	GeoMap geoMap = bot.widget(Is.isA(GeoMap.class));
	geoMapBot = new SWTBotGeoMap(geoMap);
}