private static void checkFieldAnnotation( @NotNull JetProperty altProperty, @NotNull JavaFieldImpl field, boolean isVar) { if (!ComparatorUtil.equalsNullable(field.getName().asString(), altProperty.getName())) { throw new AlternativeSignatureMismatchException( "Field name mismatch, original: %s, alternative: %s", field.getName().asString(), altProperty.getName()); } if (altProperty.getTypeRef() == null) { throw new AlternativeSignatureMismatchException( "Field annotation for shouldn't have type reference"); } if (altProperty.getGetter() != null || altProperty.getSetter() != null) { throw new AlternativeSignatureMismatchException( "Field annotation for shouldn't have getters and setters"); } if (altProperty.isVar() != isVar) { throw new AlternativeSignatureMismatchException("Wrong mutability in annotation for field"); } if (altProperty.getInitializer() != null) { throw new AlternativeSignatureMismatchException( "Default value is not expected in annotation for field"); } }
private static void checkEqualFunctionNames( @NotNull PsiNamedElement namedElement, @NotNull JavaMethod method) { if (!ComparatorUtil.equalsNullable(method.getName().asString(), namedElement.getName())) { throw new AlternativeSignatureMismatchException( "Function names mismatch, original: %s, alternative: %s", method.getName().asString(), namedElement.getName()); } }
public boolean isModified() { Sdk sdk = myCompilationServerSdk.getSelectedJdk(); String sdkName = sdk == null ? null : sdk.getName(); if (showTypeInfoOnCheckBox.isSelected() != mySettings.SHOW_TYPE_TOOLTIP_ON_MOUSE_HOVER) return true; if (!delaySpinner.getValue().equals(mySettings.SHOW_TYPE_TOOLTIP_DELAY)) return true; return !(myEnableCompileServer.isSelected() == mySettings.COMPILE_SERVER_ENABLED && myCompilationServerPort.getText().equals(mySettings.COMPILE_SERVER_PORT) && ComparatorUtil.equalsNullable(sdkName, mySettings.COMPILE_SERVER_SDK) && myCompilationServerMaximumHeapSize .getText() .equals(mySettings.COMPILE_SERVER_MAXIMUM_HEAP_SIZE) && myCompilationServerJvmParameters .getText() .equals(mySettings.COMPILE_SERVER_JVM_PARAMETERS) && myIncrementalTypeCmb.getModel().getSelectedItem().equals(mySettings.INCREMENTAL_TYPE) && myCompileOrderCmb.getModel().getSelectedItem().equals(mySettings.COMPILE_ORDER)); }