mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
inplace introduce: try our best to restore complex expressions during introduce (IDEA-80665)
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
public abstract class PartnerAuthenticationInterceptor {
|
||||
|
||||
|
||||
protected boolean validateProtection(PartnerAuthentication partnerAuthentication) {
|
||||
tryPartnerAuthenticationTypes(partnerAuthentication, validated, ip, partner, "serviceGroup");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private boolean tryPartnerAuthenticationTypes(PartnerAuthentication partnerAuthentication, boolean validated, String ip, String partner, String serviceGroup) {
|
||||
if (partnerAuthentication.typ<caret>e() == PartnerAuthenticationType.IP_PARTNER_ID) {
|
||||
|
||||
} else if (partnerAuthentication.type() == PartnerAuthenticationType.IP) {
|
||||
}
|
||||
return validated;
|
||||
}
|
||||
|
||||
|
||||
private class PartnerAuthentication {
|
||||
public String serviceGroup() {
|
||||
return null; //To change body of created methods use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
public String type() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static class PartnerIdHolder {
|
||||
private static PartnerIP partnerIP;
|
||||
|
||||
public static PartnerIP getPartnerIP() {
|
||||
return partnerIP;
|
||||
}
|
||||
}
|
||||
|
||||
private class PartnerIP {
|
||||
private String ip;
|
||||
private String partner;
|
||||
private boolean valid;
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public String getPartner() {
|
||||
return partner;
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return valid;
|
||||
}
|
||||
}
|
||||
|
||||
private class PartnerAuthenticationType {
|
||||
public static final String IP_PARTNER_ID = "id";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
public abstract class PartnerAuthenticationInterceptor {
|
||||
|
||||
|
||||
protected boolean validateProtection(PartnerAuthentication partnerAuthentication) {
|
||||
tryPartnerAuthenticationTypes(validated, ip, partner, "serviceGroup", partnerAuthentication.type());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private boolean tryPartnerAuthenticationTypes(boolean validated, String ip, String partner, String serviceGroup, String type) {
|
||||
if (type == PartnerAuthenticationType.IP_PARTNER_ID) {
|
||||
|
||||
} else if (type == PartnerAuthenticationType.IP) {
|
||||
}
|
||||
return validated;
|
||||
}
|
||||
|
||||
|
||||
private class PartnerAuthentication {
|
||||
public String serviceGroup() {
|
||||
return null; //To change body of created methods use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
public String type() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static class PartnerIdHolder {
|
||||
private static PartnerIP partnerIP;
|
||||
|
||||
public static PartnerIP getPartnerIP() {
|
||||
return partnerIP;
|
||||
}
|
||||
}
|
||||
|
||||
private class PartnerIP {
|
||||
private String ip;
|
||||
private String partner;
|
||||
private boolean valid;
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public String getPartner() {
|
||||
return partner;
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return valid;
|
||||
}
|
||||
}
|
||||
|
||||
private class PartnerAuthenticationType {
|
||||
public static final String IP_PARTNER_ID = "id";
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,15 @@ public class InplaceIntroduceParameterTest extends AbstractJavaInplaceIntroduceT
|
||||
});
|
||||
}
|
||||
|
||||
public void testReplaceAll1() throws Exception {
|
||||
doTest(new Pass<AbstractInplaceIntroducer>() {
|
||||
@Override
|
||||
public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
|
||||
inplaceIntroduceFieldPopup.setReplaceAllOccurrences(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void testReplaceAllMethodCalls() throws Exception {
|
||||
doTest(new Pass<AbstractInplaceIntroducer>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user