Skip to content

Commit

Permalink
Update copyright
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Wisniewski <[email protected]>
  • Loading branch information
Adam Wisniewski authored and Adam Wisniewski committed Sep 19, 2023
1 parent 91f6fef commit eda08f1
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 6 deletions.
1 change: 0 additions & 1 deletion releng/io.openliberty.tools.update/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<category-def name="io.openliberty.tools.eclipse" label="Liberty Tools" />

<repository-reference location="https://download.eclipse.org/lsp4e/releases/0.23.0/" enabled="true" />
<repository-reference location="https://download.eclipse.org/jdtls/milestones/1.25.0/repository" enabled="true" />
<repository-reference location="https://download.eclipse.org/lsp4mp/releases/0.7.0/repository" enabled="true" />
<repository-reference location="https://download.eclipse.org/lsp4jakarta/releases/0.1.1/repository" enabled="true" />

Expand Down
12 changes: 11 additions & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<properties>
<testAppImportWait>60000</testAppImportWait>
</properties>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -100,6 +100,16 @@
<id>org.eclipse.lsp4e.jdt</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
<type>p2-installable-unit</type>
<id>org.eclipse.lsp4jakarta.jdt.core</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
<type>p2-installable-unit</type>
<id>org.eclipse.jdt.ls.core</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-->
<server description="Sample Servlet server">
<featureManager>
<feature>jakartaee-10.0</feature>
<feature>jsp-3.1</feature>
</featureManager>

<httpEndpoint host="*" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-->
<server description="Sample Servlet server">
<featureManager>
<feature>jakartaee-10.0</feature>
<feature>jsp-3.1</feature>
</featureManager>

<httpEndpoint host="*" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 IBM Corporation and others.
* Copyright (c) 2023 IBM Corporation and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -13,6 +13,7 @@
package io.openliberty.tools.eclipse.test.it;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import java.io.File;
import java.nio.file.Path;
Expand Down Expand Up @@ -74,9 +75,11 @@ public class LibertyPluginSWTBotLSP4JakartaTest extends AbstractLibertyPluginSWT

/**
* Setup.
*
* @throws Exception
*/
@BeforeAll
public static void setup() {
public static void setup() throws Exception {

commonSetup();

Expand Down Expand Up @@ -111,6 +114,7 @@ public void testClassLevelSnippets() {

// Get type-ahead list
List<String> typeAheadOptions = SWTBotPluginOperations.getTypeAheadList(bot, "MyClass.java", "", 0, 0);
System.out.println("INFO: Type-ahead options found = " + Arrays.toString(typeAheadOptions.toArray()));

boolean allFound = true;
List<String> missingOptions = new ArrayList<String>();
Expand All @@ -123,10 +127,14 @@ public void testClassLevelSnippets() {

assertTrue(allFound, "Missing type-ahead options: " + Arrays.toString(missingOptions.toArray()));

} catch (Exception e) {
fail("Unexpected exception was thrown: " + e);
} finally {

// Delete new file
System.out.println("INFO: Deleting MyClass.java file");
LibertyPluginTestUtils.deleteFile(new File(wrapperProjectPath + "/src/main/java/test/maven/liberty/web/app/MyClass.java"));

}
}

Expand All @@ -142,6 +150,7 @@ public void testInClassSnippets() {

// Get type-ahead list
List<String> typeAheadOptions = SWTBotPluginOperations.getTypeAheadList(bot, "MyClass.java", "", 3, 0);
System.out.println("INFO: Type-ahead options found = " + Arrays.toString(typeAheadOptions.toArray()));

boolean allFound = true;
List<String> missingOptions = new ArrayList<String>();
Expand All @@ -154,9 +163,12 @@ public void testInClassSnippets() {

assertTrue(allFound, "Missing type-ahead options: " + Arrays.toString(missingOptions.toArray()));

} catch (Exception e) {
fail("Unexpected exception was thrown: " + e);
} finally {

// Delete new file
System.out.println("INFO: Deleting MyClass.java file");
LibertyPluginTestUtils.deleteFile(new File(wrapperProjectPath + "/src/main/java/test/maven/liberty/web/app/MyClass.java"));
}
}
Expand Down Expand Up @@ -193,9 +205,12 @@ public void testDiagnosticsAndQuickFixes() {

assertTrue(allFound, "Missing quick-fixes: " + Arrays.toString(missingFixes.toArray()));

} catch (Exception e) {
fail("Unexpected exception was thrown: " + e);
} finally {

// Delete new file
System.out.println("INFO: Deleting MyClass.java file");
LibertyPluginTestUtils.deleteFile(new File(wrapperProjectPath + "/src/main/java/test/maven/liberty/web/app/MyClass.java"));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,8 @@ public boolean matches(Object object) {
*/
public static void createNewClass(SWTWorkbenchBot bot, String appName, String className, boolean clearContent) {

System.out.println("INFO: Creating new Java class: " + className);

Object project = getAppInPackageExplorerTree(appName);
context(project, "New", "Class");

Expand Down Expand Up @@ -967,6 +969,9 @@ public static void createNewClass(SWTWorkbenchBot bot, String appName, String cl
*/
public static List<String> getTypeAheadList(SWTWorkbenchBot bot, String editorFileName, String insertText, int cursorRow,
int cursorColumn) {

System.out.println("INFO: Getting type-ahead list");

SWTBotPreferences.PLAYBACK_DELAY = 1000;

SWTBotEditor editor = searchForEditor(bot, editorFileName);
Expand All @@ -992,6 +997,9 @@ public static List<String> getTypeAheadList(SWTWorkbenchBot bot, String editorFi
*/
public static void selectTypeAheadOption(SWTWorkbenchBot bot, String editorFileName, String option, int cursorRow,
int cursorColumn) {

System.out.println("INFO: Selecting type-ahead option: " + option);

SWTBotPreferences.PLAYBACK_DELAY = 1000;
SWTBotEditor editor = searchForEditor(bot, editorFileName);
SWTBotEclipseEditor e = editor.toTextEditor();
Expand All @@ -1009,6 +1017,8 @@ public static void selectTypeAheadOption(SWTWorkbenchBot bot, String editorFileN
* @return
*/
public static List<String> getQuickFixList(SWTWorkbenchBot bot, String editorFileName) {
System.out.println("INFO: Getting quick-fix list for class: " + editorFileName);

SWTBotPreferences.PLAYBACK_DELAY = 1000;

SWTBotEditor editor = searchForEditor(bot, editorFileName);
Expand Down

0 comments on commit eda08f1

Please sign in to comment.