本文整理汇总了Java中com.intellij.openapi.util.JDOMUtil.areElementsEqual方法的典型用法代码示例。如果您正苦于以下问题:Java JDOMUtil.areElementsEqual方法的具体用法?Java JDOMUtil.areElementsEqual怎么用?Java JDOMUtil.areElementsEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.util.JDOMUtil
的用法示例。
在下文中一共展示了JDOMUtil.areElementsEqual方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equalTo
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
public boolean equalTo(@NotNull ScopeToolState state2) {
if (isEnabled() != state2.isEnabled()) return false;
if (getLevel() != state2.getLevel()) return false;
InspectionToolWrapper toolWrapper = getTool();
InspectionToolWrapper toolWrapper2 = state2.getTool();
if (!toolWrapper.isInitialized() && !toolWrapper2.isInitialized()) return true;
try {
@NonNls String tempRoot = "root";
Element oldToolSettings = new Element(tempRoot);
toolWrapper.getTool().writeSettings(oldToolSettings);
Element newToolSettings = new Element(tempRoot);
toolWrapper2.getTool().writeSettings(newToolSettings);
return JDOMUtil.areElementsEqual(oldToolSettings, newToolSettings);
}
catch (WriteExternalException e) {
LOG.error(e);
}
return false;
}
示例2: equals
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MavenPlugin that = (MavenPlugin)o;
if (myDefault != that.myDefault) return false;
if (myGroupId != null ? !myGroupId.equals(that.myGroupId) : that.myGroupId != null) return false;
if (myArtifactId != null ? !myArtifactId.equals(that.myArtifactId) : that.myArtifactId != null) return false;
if (myVersion != null ? !myVersion.equals(that.myVersion) : that.myVersion != null) return false;
if (!JDOMUtil.areElementsEqual(myConfiguration, that.myConfiguration)) return false;
if (myExecutions != null ? !myExecutions.equals(that.myExecutions) : that.myExecutions != null) return false;
if (myDependencies != null ? !myDependencies.equals(that.myDependencies) : that.myDependencies != null) return false;
return true;
}
示例3: markSettingsMerged
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
protected boolean markSettingsMerged(Map<String, Element> inspectionsSettings) {
final Element merge = merge(inspectionsSettings, true);
if (merge != null) {
final Element defaultElement = merge(Collections.<String, Element>emptyMap(), true);
return !JDOMUtil.areElementsEqual(merge, defaultElement);
}
return false;
}
示例4: accepts
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
@Override
protected boolean accepts(@NotNull Accessor accessor, @NotNull Object bean, @Nullable Object beanValue) {
Object defValue = accessor.read(getDefaultBean(bean));
if (defValue instanceof Element && beanValue instanceof Element) {
return !JDOMUtil.areElementsEqual((Element)beanValue, (Element)defValue);
}
else {
return !Comparing.equal(beanValue, defValue);
}
}
示例5: equal
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
boolean equal(@Nullable Binding binding, @Nullable Object currentValue, @Nullable Object defaultValue) {
if (defaultValue instanceof Element && currentValue instanceof Element) {
return JDOMUtil.areElementsEqual((Element)currentValue, (Element)defaultValue);
}
else {
if (currentValue == defaultValue) {
return true;
}
if (currentValue == null || defaultValue == null) {
return false;
}
if (binding instanceof BasePrimitiveBinding) {
Binding referencedBinding = ((BasePrimitiveBinding)binding).myBinding;
if (referencedBinding instanceof BeanBinding) {
BeanBinding classBinding = (BeanBinding)referencedBinding;
ThreeState compareByFields = classBinding.compareByFields;
if (compareByFields == ThreeState.UNSURE) {
compareByFields = ReflectionUtil.getDeclaredMethod(classBinding.myBeanClass, "equals", Object.class) == null ? ThreeState.YES : ThreeState.NO;
classBinding.compareByFields = compareByFields;
}
if (compareByFields == ThreeState.YES) {
return classBinding.equalByFields(currentValue, defaultValue, this);
}
}
}
return Comparing.equal(currentValue, defaultValue);
}
}
示例6: wereToolSettingsModified
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
private boolean wereToolSettingsModified(Descriptor descriptor, boolean isDefault) {
if (!mySelectedProfile.isToolEnabled(descriptor.getKey(), descriptor.getScope(), myProjectProfileManager.getProject())) {
return false;
}
Element oldConfig = descriptor.getConfig();
if (oldConfig == null) return false;
ScopeToolState state = null;
if (isDefault) {
state =
mySelectedProfile.getToolDefaultState(descriptor.getKey().toString(), myProjectProfileManager.getProject());
} else {
for (ScopeToolState candidate : mySelectedProfile
.getNonDefaultTools(descriptor.getKey().toString(), myProjectProfileManager.getProject())) {
final String scope = descriptor.getScopeName();
if (Comparing.equal(candidate.getScopeName(), scope)) {
state = candidate;
break;
}
}
}
if (state == null) {
return true;
}
Element newConfig = Descriptor.createConfigElement(state.getTool());
if (!JDOMUtil.areElementsEqual(oldConfig, newConfig)) {
myAlarm.cancelAllRequests();
myAlarm.addRequest(new Runnable() {
@Override
public void run() {
myTreeTable.repaint();
}
}, 300);
myModified = true;
return true;
}
return false;
}
示例7: equals
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
UnknownTask that = (UnknownTask)o;
if (!JDOMUtil.areElementsEqual(myConfig, that.myConfig)) return false;
return true;
}
示例8: areSettingsMerged
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
protected boolean areSettingsMerged(Map<String, Element> inspectionsSettings, Element inspectionElement) {
final Element merge = merge(inspectionsSettings, true);
return merge != null && JDOMUtil.areElementsEqual(merge, inspectionElement);
}
示例9: statesAreDifferent
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
private static boolean statesAreDifferent(BreakpointState state1, BreakpointState state2) {
Element elem1 = XmlSerializer.serialize(state1, SERIALIZATION_FILTER);
Element elem2 = XmlSerializer.serialize(state2, SERIALIZATION_FILTER);
return !JDOMUtil.areElementsEqual(elem1, elem2);
}
示例10: isCodeHighlightingChanged
import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
@Override
public boolean isCodeHighlightingChanged(DaemonCodeAnalyzerSettings oldSettings) {
return !JDOMUtil.areElementsEqual(((DaemonCodeAnalyzerSettingsImpl)oldSettings).getState(), getState());
}