-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-1425: groundwork to allow nested beans in internal index structure
- Loading branch information
1 parent
1c64204
commit 85afe5c
Showing
15 changed files
with
328 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...src/main/java/org/springframework/ide/vscode/commons/protocol/spring/DocumentElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Broadcom | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Broadcom - initial API and implementation | ||
*******************************************************************************/ | ||
package org.springframework.ide.vscode.commons.protocol.spring; | ||
|
||
public class DocumentElement extends AbstractSpringIndexElement { | ||
|
||
private final String docURI; | ||
|
||
public DocumentElement(String docURI) { | ||
this.docURI = docURI; | ||
} | ||
|
||
public String getDocURI() { | ||
return docURI; | ||
} | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
.../src/main/java/org/springframework/ide/vscode/commons/protocol/spring/ProjectElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2025 Broadcom | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Broadcom - initial API and implementation | ||
*******************************************************************************/ | ||
package org.springframework.ide.vscode.commons.protocol.spring; | ||
|
||
import java.util.Iterator; | ||
import java.util.List; | ||
|
||
public class ProjectElement extends AbstractSpringIndexElement { | ||
|
||
private String projectName; | ||
|
||
public ProjectElement(String projectName) { | ||
this.projectName = projectName; | ||
} | ||
|
||
public String getProjectName() { | ||
return projectName; | ||
} | ||
|
||
public void removeDocument(String docURI) { | ||
List<SpringIndexElement> children = this.getChildren(); | ||
|
||
for (Iterator<SpringIndexElement> iterator = children.iterator(); iterator.hasNext();) { | ||
SpringIndexElement springIndexElement = (SpringIndexElement) iterator.next(); | ||
if (springIndexElement instanceof DocumentElement doc && doc.getDocURI().equals(docURI)) { | ||
iterator.remove(); | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.