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


Java LwInspectionSuppression.getComponentId方法代码示例

本文整理汇总了Java中com.intellij.uiDesigner.lw.LwInspectionSuppression.getComponentId方法的典型用法代码示例。如果您正苦于以下问题:Java LwInspectionSuppression.getComponentId方法的具体用法?Java LwInspectionSuppression.getComponentId怎么用?Java LwInspectionSuppression.getComponentId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.uiDesigner.lw.LwInspectionSuppression的用法示例。


在下文中一共展示了LwInspectionSuppression.getComponentId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeInspectionSuppressions

import com.intellij.uiDesigner.lw.LwInspectionSuppression; //导入方法依赖的package包/类
private void writeInspectionSuppressions(final XmlWriter writer) {
  if (myInspectionSuppressions.size() > 0) {
    writer.startElement(UIFormXmlConstants.ELEMENT_INSPECTION_SUPPRESSIONS);
    for(LwInspectionSuppression suppression: myInspectionSuppressions) {
      writer.startElement(UIFormXmlConstants.ELEMENT_SUPPRESS);
      writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_INSPECTION, suppression.getInspectionId());
      if (suppression.getComponentId() != null) {
        writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_ID, suppression.getComponentId());
      }
      writer.endElement();
    }
    writer.endElement();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:RadRootContainer.java

示例2: suppressInspection

import com.intellij.uiDesigner.lw.LwInspectionSuppression; //导入方法依赖的package包/类
public void suppressInspection(String inspectionId, @Nullable RadComponent component) {
  for(int i=myInspectionSuppressions.size()-1; i >= 0; i--) {
    LwInspectionSuppression suppression = myInspectionSuppressions.get(i);
    if (suppression.getInspectionId().equals(inspectionId)) {
      if (component != null && (component.getId().equals(suppression.getComponentId()) || suppression.getComponentId() == null)) {
        return;
      }
      if (component == null && suppression.getComponentId() != null) {
        myInspectionSuppressions.remove(i);
      }
    }
  }
  myInspectionSuppressions.add(new LwInspectionSuppression(inspectionId, component == null ? null : component.getId()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:RadRootContainer.java

示例3: isInspectionSuppressed

import com.intellij.uiDesigner.lw.LwInspectionSuppression; //导入方法依赖的package包/类
public boolean isInspectionSuppressed(final String inspectionId, final String componentId) {
  for(LwInspectionSuppression suppression: myInspectionSuppressions) {
    if ((suppression.getComponentId() == null || suppression.getComponentId().equals(componentId)) &&
        suppression.getInspectionId().equals(inspectionId)) {
      return true;
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:RadRootContainer.java

示例4: createDescriptor

import com.intellij.uiDesigner.lw.LwInspectionSuppression; //导入方法依赖的package包/类
@NotNull
public NodeDescriptor createDescriptor(final Object element,final NodeDescriptor parentDescriptor){
  if(element==myRootElement){
    return new RootDescriptor(parentDescriptor,myRootElement);
  }
  else if(element instanceof ComponentPtr){
    return new ComponentPtrDescriptor(parentDescriptor,(ComponentPtr)element);
  }
  else if (element instanceof LwInspectionSuppression[]) {
    return new SuppressionGroupDescriptor(parentDescriptor, (LwInspectionSuppression[]) element);
  }
  else if (element instanceof LwInspectionSuppression) {
    final LwInspectionSuppression suppression = (LwInspectionSuppression)element;
    RadComponent target = (RadComponent)(suppression.getComponentId() == null
                                         ? null
                                         : FormEditingUtil.findComponent(myEditor.getRootContainer(), suppression.getComponentId()));
    return new SuppressionDescriptor(parentDescriptor, target, suppression);
  }
  else if (element instanceof RadButtonGroup[]) {
    return new ButtonGroupListDescriptor(parentDescriptor, (RadButtonGroup[]) element);
  }
  else if (element instanceof RadButtonGroup) {
    return new ButtonGroupDescriptor(parentDescriptor, (RadButtonGroup) element);
  }
  else{
    throw new IllegalArgumentException("unknown element: "+element);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ComponentTreeStructure.java

示例5: getChildElements

import com.intellij.uiDesigner.lw.LwInspectionSuppression; //导入方法依赖的package包/类
public Object[] getChildElements(final Object element){
  if(element==myRootElement){
    ArrayList<Object> elements = new ArrayList<Object>();
    final RadRootContainer rootContainer=myEditor.getRootContainer();
    elements.add(new ComponentPtr(myEditor, rootContainer));
    final LwInspectionSuppression[] suppressions = rootContainer.getInspectionSuppressions();
    if (suppressions.length > 0) {
      elements.add(suppressions);
    }
    RadButtonGroup[] buttonGroups = rootContainer.getButtonGroups();
    if (buttonGroups.length > 0) {
      elements.add(buttonGroups);
    }
    return elements.toArray();
  }
  else if(element instanceof ComponentPtr){
    final ComponentPtr ptr=(ComponentPtr)element;
    LOG.assertTrue(ptr.isValid()); // pointer must be valid
    final RadComponent component=ptr.getComponent();
    if(component instanceof RadContainer){
      final RadContainer container=(RadContainer)component;
      final ComponentPtr[] ptrs=new ComponentPtr[container.getComponentCount()];
      for(int i=0;i<ptrs.length;i++){
        ptrs[i]=new ComponentPtr(myEditor,container.getComponent(i));
      }
      return ptrs;
    }else{
      return ourEmptyObjectArray;
    }
  }
  else if (element instanceof LwInspectionSuppression[]) {
    ArrayList<LwInspectionSuppression> result = new ArrayList<LwInspectionSuppression>();
    for(LwInspectionSuppression suppression: (LwInspectionSuppression[]) element) {
      if (suppression.getComponentId() == null ||
        FormEditingUtil.findComponent(myEditor.getRootContainer(), suppression.getComponentId()) != null) {
        result.add(suppression);
      }
    }
    return ArrayUtil.toObjectArray(result);
  }
  else if (element instanceof RadButtonGroup[]) {
    return (RadButtonGroup[]) element;
  }
  else if (element instanceof LwInspectionSuppression || element instanceof RadButtonGroup) {
    return ArrayUtil.EMPTY_OBJECT_ARRAY;
  }
  else{
    throw new IllegalArgumentException("unknown element: "+element);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:51,代码来源:ComponentTreeStructure.java


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