-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-1400: include more precise location information for annotations an…
…d annotation attribute values in spring index
- Loading branch information
1 parent
8de5ea4
commit e52ae18
Showing
20 changed files
with
370 additions
and
105 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
...java/org/springframework/ide/vscode/commons/protocol/spring/AnnotationAttributeValue.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,55 @@ | ||
/******************************************************************************* | ||
* 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; | ||
|
||
import java.util.Objects; | ||
|
||
import org.eclipse.lsp4j.Location; | ||
|
||
/** | ||
* @author Martin Lippert | ||
*/ | ||
public class AnnotationAttributeValue { | ||
|
||
private final String name; | ||
private final Location location; | ||
|
||
public AnnotationAttributeValue(String name, Location location) { | ||
this.name = name; | ||
this.location = location; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Location getLocation() { | ||
return location; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(location, name); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
AnnotationAttributeValue other = (AnnotationAttributeValue) obj; | ||
return Objects.equals(location, other.location) && Objects.equals(name, other.name); | ||
} | ||
|
||
} |
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
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
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
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
Oops, something went wrong.