Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
"java.configuration.updateBuildConfiguration": "automatic",
"java.debug.settings.onBuildFailureProceed": true
}
3 changes: 2 additions & 1 deletion java-analyzer-bundle.core/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<!--<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>-->
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java/"/>
<classpathentry kind="output" path="target/classes"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package io.konveyor.tackle.core.internal;

import static java.lang.String.format;
import static org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin.debugTrace;
import static org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin.logInfo;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
Expand Down Expand Up @@ -150,7 +152,7 @@ private static SearchPattern mapLocationToSearchPatternLocation(int location, St
* "import": 8,
* "variable_declaration": 9,
* "type": 10,
* "package": 11,
* "package": 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix incorrect location code in comment.

The comment shows "package": 1 but based on the switch statement (line 191), package location should be 11, not 1. Location 1 is used for "inheritance" (line 178).

- * "package":              1
+ * "package":              11
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* "package": 1
* "package": 11
🤖 Prompt for AI Agents
In
java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/SampleDelegateCommandHandler.java
around line 154, the inline comment incorrectly lists the location code as
"package": 1; update it to "package": 11 so it matches the switch cases
(inheritance uses 1 at ~line 178 and package uses 11 at ~line 191). Ensure the
comment value is changed from 1 to 11 and that any nearby documentation/comments
remain consistent with the switch mapping.

* "field": 12,
* "method_declaration": 13,
* "class_declaration": 14,
Expand Down Expand Up @@ -199,7 +201,7 @@ private static SearchPattern getPatternSingleQuery(int location, String query) t
throw new Exception("unable to create search pattern");
}

private static List<SymbolInformation> search(String projectName, ArrayList<String> includedPaths, String query, AnnotationQuery annotationQuery, int location, String analysisMode,
protected static List<SymbolInformation> search(String projectName, ArrayList<String> includedPaths, String query, AnnotationQuery annotationQuery, int location, String analysisMode,
boolean includeOpenSourceLibraries, String mavenLocalRepoPath, String mavenIndexPath, IProgressMonitor monitor) throws Exception {
IJavaProject[] targetProjects;
IJavaProject project = ProjectUtils.getJavaProject(projectName);
Expand All @@ -209,7 +211,7 @@ private static List<SymbolInformation> search(String projectName, ArrayList<Stri
targetProjects = ProjectUtils.getJavaProjects();
}

logInfo("Searching in target project: " + targetProjects);
logInfo("KONVEYOR_LOG: Searching in target project: " + targetProjects);

// For Partial results, we are going to filter out based on a list in the engine
int s = IJavaSearchScope.SOURCES | IJavaSearchScope.REFERENCED_PROJECTS | IJavaSearchScope.APPLICATION_LIBRARIES;
Expand Down Expand Up @@ -399,10 +401,18 @@ private static List<SymbolInformation> search(String projectName, ArrayList<Stri
}
}

logInfo("KONVEYOR_LOG: got: " + requestor.getAllSearchMatches() +
" search matches for " + query +
" location " + location
+ " matches" + requestor.getSymbols().size());
logInfo("KONVEYOR_LOG: Got: " + requestor.getAllSearchMatches() +
" Number of search matching the query: \"" + query + "\"" +
" and location type: " + location);

logInfo("KONVEYOR_LOG: Results size: " + requestor.getSymbols().size());

String result = requestor.getSymbols().stream()
.map(si ->
String.format("\n-------------------------\nSymbol name: %s\nkind: %s\nLocation: %s",si.getName(), si.getKind(), si.getLocation())
)
.collect(Collectors.joining());
debugTrace("KONVEYOR_DEBUG: " + result);

return symbols;

Expand Down
3 changes: 2 additions & 1 deletion java-analyzer-bundle.test/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<!--<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>-->
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Comment on lines +3 to +4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Clarify Java version strategy and remove commented code.

The change from a pinned JavaSE-17 container to a generic JRE_CONTAINER introduces version ambiguity. Additionally:

  1. The commented-out line should be removed rather than left in place.
  2. The MANIFEST.MF still declares Bundle-RequiredExecutionEnvironment: JavaSE-17, creating an inconsistency.

Please clarify the intended Java version strategy: if JavaSE-17 is required (as the manifest suggests), restore the pinned container; otherwise, update the manifest to match the generic approach.

-	<!--<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>-->
-	 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>

I'll verify the review comment by examining the relevant configuration files.


🏁 Script executed:

#!/bin/bash
# Search for MANIFEST.MF files in the repository, particularly in the test bundle
fd -t f "MANIFEST.MF" | head -20

Length of output: 93


🏁 Script executed:

#!/bin/bash
# Find and examine the .classpath file being reviewed
find . -path "*/java-analyzer-bundle.test/.classpath" -type f

Length of output: 38


🏁 Script executed:

#!/bin/bash
# Look at the .classpath file content to confirm current state
if [ -f "java-analyzer-bundle.test/.classpath" ]; then
  cat "java-analyzer-bundle.test/.classpath"
fi

Length of output: 564


🏁 Script executed:

#!/bin/bash
# Search for MANIFEST.MF in or near the java-analyzer-bundle.test directory
fd -t f "MANIFEST.MF" | xargs -I {} sh -c 'echo "=== {} ===" && head -20 "{}"'

Length of output: 1107


Remove commented code and align .classpath with manifest Java version requirement.

Verification confirms the review concerns are legitimate:

  1. Inconsistency verified: java-analyzer-bundle.test/META-INF/MANIFEST.MF declares Bundle-RequiredExecutionEnvironment: JavaSE-17, but .classpath line 4 uses generic JRE_CONTAINER without version pinning.
  2. Commented code confirmed: Line 3 contains the commented JavaSE-17 pinned entry and should be removed.
  3. Version mismatch confirmed: The manifest requirement (JavaSE-17) conflicts with the classpath configuration.

Either restore the pinned JavaSE-17 container on line 4 to match the manifest, or update the manifest to reflect the generic approach. Remove the commented line regardless.

🤖 Prompt for AI Agents
In java-analyzer-bundle.test/.classpath around lines 3 to 4, remove the
commented out JavaSE-17 entry and make the active classpath entry explicitly pin
to JavaSE-17 to match META-INF/MANIFEST.MF's
Bundle-RequiredExecutionEnvironment: JavaSE-17; specifically delete the
commented line and replace the generic <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/> with the pinned container path
for JavaSE-17
(org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17),
or alternately update the MANIFEST.MF to reflect the generic container if you
prefer that approach.

<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java/">
<attributes>
Expand Down
8 changes: 5 additions & 3 deletions java-analyzer-bundle.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Bundle-Version: 1.0.0.qualifier
Fragment-Host: java-analyzer-bundle.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.jdt.junit4.runtime;bundle-version="1.1.0",
org.junit;bundle-version="4.12",
org.eclipse.m2e.core

org.apache.commons.io,
org.apache.commons.lang3,
org.junit;bundle-version="4.12",
org.eclipse.m2e.core,
org.eclipse.buildship.core
23 changes: 23 additions & 0 deletions java-analyzer-bundle.test/projects/maven/springboot-todo/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>springboot-todo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
118 changes: 118 additions & 0 deletions java-analyzer-bundle.test/projects/maven/springboot-todo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Awesome To-Do App

## Overview

**Awesome To-Do App** is a versatile task management application tailored to assist users in organizing tasks, managing deadlines, and prioritizing activities. The app offers an intuitive user interface complete with a spectrum of features including task creation, deletion, pagination, and advanced error handling.

In this README, you'll find a comprehensive guide that details your project, enumerates its key functionalities, lists the technologies employed, provides installation instructions, and articulates usage instructions.

![Tasks Empty](https://github.com/adampeer/spring-boot-todo-app/assets/90769663/aed896df-0c77-4fe2-845a-e12460ea5b2b)

![Tasks Full](https://github.com/adampeer/spring-boot-todo-app/assets/90769663/3bac6e08-6e5a-4c2c-a69a-520c5a8ff4ec)

## Features

### Task Management

- Create and manage tasks with essential details such as titles, descriptions, and due dates.
- Tasks are elegantly presented in card format, enhancing visibility and comprehension.
- Effortlessly delete tasks with permanent removal from the application.

### Pagination

- Enhance user experience by paginating tasks, ensuring a clutter-free view.
- Navigate seamlessly through the task list with "Previous" and "Next" buttons for effortless organization.

### Error Handling

- Robust error handling, encompassing gracefully displayed custom error pages and user-friendly messages.
- Guard against requests that seek pages beyond the total available count, offering a polished and secure user experience.

### Advanced Features

- Responsive design adapting to diverse devices, guaranteeing a harmonious experience on any platform.
- Intuitive pop-up modals for confirming task deletion, enriching user interaction.

## Technologies Used

**Frontend:**

- HTML
- Thymeleaf (for server-side rendering)
- JavaScript
- jQuery
- Bootstrap (for styling and modals)

**Backend:**

- Spring Boot (Java-based framework)
- Spring MVC
- Spring Data JPA (for database access)
- MySQL (as the database)

## Installation

1. **Clone the Repository:**

```bash
git clone https://github.com/adampeer/spring-boot-todo-app.git
cd awesome-todo-app
```

2. **Database Configuration:**

- Install MySQL and create a database.
- Update the `application.properties` file with your database jdtLSConfiguration such as username, password, database name and port number.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in documentation.

The word "jdtLSConfiguration" should be "configuration". This appears to be a variable name accidentally left in the documentation.

Apply this diff:

-   - Update the `application.properties` file with your database jdtLSConfiguration such as username, password, database name and port number.
+   - Update the `application.properties` file with your database configuration such as username, password, database name and port number.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Update the `application.properties` file with your database jdtLSConfiguration such as username, password, database name and port number.
- Update the `application.properties` file with your database configuration such as username, password, database name and port number.
🧰 Tools
🪛 LanguageTool

[grammar] ~65-~65: Ensure spelling is correct
Context: ...ion.properties` file with your database jdtLSConfiguration such as username, password, database na...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In java-analyzer-bundle.test/projects/maven/springboot-todo/README.md around
line 65, the documentation contains a typo: replace the word
"jdtLSConfiguration" with "configuration" in the sentence so it reads "Update
the `application.properties` file with your database configuration such as
username, password, database name and port number." Ensure only that token is
changed and punctuation/formatting remains intact.


3. **Build and Run the Application:**

```bash
./mvnw clean package
java -jar target/awesome-todo-app-0.1.jar
```

4. **Access the Application:**

Open a web browser and go to `http://localhost:8080` or whatever port you've set in application.properties file.

## Usage

1. **Create a Task:**

- Fill out the task creation form, providing a title, description, and due date.
- Click the "Create Task" button.

2. **Pagination:**

- Use the "Previous" and "Next" buttons to navigate through your task list.
- Each page typically displays 6 tasks.

3. **Delete a Task:**

- Each task card includes a "Delete" button.
- Click the "Delete" button to trigger a confirmation modal.
- Confirm the task deletion by clicking "Yes" in the modal.

4. **Error Handling:**

- Error pages and messages are displayed for various error scenarios.
- Friendly error messages are shown to users.

5. **Advanced Features:**

- Responsive design ensures a seamless experience on different devices.
- Confirmation modal for task deletion adds a layer of user interaction.

## Feedback and Support

We welcome your feedback and suggestions. If you encounter any issues or have ideas for improvements, please open an issue on our GitHub repository.

## License

This project is licensed under the MIT License. Feel free to use it, modify it, and share it as you see fit.

## Author

- [Adam Peer](https://github.com/adampeer)

---
Loading
Loading