use of com.perl5.lang.perl.psi.stubs.globs.PerlGlobStub in project Perl5-IDEA by Camelcade.
the class PerlGlobVariableMixin method getName.
@Override
public String getName() {
PerlGlobStub stub = getStub();
if (stub != null) {
return stub.getName();
}
PerlVariableNameElement variableNameElement = getVariableNameElement();
if (variableNameElement == null) {
return null;
}
String variableNameText = variableNameElement.getText();
int delimiterIndex = variableNameText.lastIndexOf(':');
return delimiterIndex == -1 ? variableNameText : variableNameText.substring(delimiterIndex + 1);
}
use of com.perl5.lang.perl.psi.stubs.globs.PerlGlobStub in project Perl5-IDEA by Camelcade.
the class PerlGlobVariableMixin method getPackageName.
@Nullable
@Override
public String getPackageName() {
PerlGlobStub stub = getStub();
if (stub != null) {
return stub.getPackageName();
}
String namespace = getExplicitPackageName();
if (namespace == null) {
namespace = getContextPackageName();
}
return namespace;
}
Aggregations