mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-136004 Some "Find Action.." search queries causes NPE in plugin XPathView + XSLT Support
This commit is contained in:
@@ -114,6 +114,7 @@ public final class Presentation implements Cloneable {
|
||||
myChangeSupport.removePropertyChangeListener(l);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getText(){
|
||||
return myText;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,8 @@ public class ShowXPathAction extends XPathAction {
|
||||
super.update(event);
|
||||
|
||||
final Presentation presentation = event.getPresentation();
|
||||
if (ActionPlaces.isMainMenuOrActionSearch(event.getPlace()) && presentation.getText().startsWith("Show ")) {
|
||||
String presentationText = presentation.getText();
|
||||
if (presentationText != null && ActionPlaces.isMainMenuOrActionSearch(event.getPlace()) && presentationText.startsWith("Show ")) {
|
||||
final String text = presentation.getText().substring("Show ".length());
|
||||
presentation.setText(Character.toUpperCase(text.charAt(0)) + text.substring(1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user