当前位置: 首页>>代码示例>>Java>>正文


Java JDOMUtil.areElementsEqual方法代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ScopeToolState.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:MavenPlugin.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InspectionElementsMerger.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SkipDefaultValuesSerializationFilters.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:SkipDefaultsSerializationFilter.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:SingleInspectionProfilePanel.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:UnknownBeforeRunTaskProvider.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:InspectionElementsMerger.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:XBreakpointManagerImpl.java

示例10: isCodeHighlightingChanged

import com.intellij.openapi.util.JDOMUtil; //导入方法依赖的package包/类
@Override
public boolean isCodeHighlightingChanged(DaemonCodeAnalyzerSettings oldSettings) {
  return !JDOMUtil.areElementsEqual(((DaemonCodeAnalyzerSettingsImpl)oldSettings).getState(), getState());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DaemonCodeAnalyzerSettingsImpl.java


注:本文中的com.intellij.openapi.util.JDOMUtil.areElementsEqual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。