update copyright
[fedora-idea.git] / plugins / ui-designer / src / com / intellij / uiDesigner / ErrorInfo.java
blobf4f66e9b0208d8bd6d8c84bb7961e9cbadba62b9
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.uiDesigner;
18 import com.intellij.uiDesigner.quickFixes.QuickFix;
19 import com.intellij.uiDesigner.radComponents.RadComponent;
20 import com.intellij.uiDesigner.lw.IComponent;
21 import com.intellij.codeHighlighting.HighlightDisplayLevel;
22 import org.jetbrains.annotations.NotNull;
23 import org.jetbrains.annotations.NonNls;
25 /**
26 * @author Anton Katilin
27 * @author Vladimir Kondratyev
29 public final class ErrorInfo {
30 public static final ErrorInfo[] EMPTY_ARRAY = new ErrorInfo[0];
32 private final RadComponent myComponent;
33 public final String myDescription;
34 private final String myPropertyName;
35 public final QuickFix[] myFixes;
36 private final HighlightDisplayLevel myHighlightDisplayLevel;
37 private String myInspectionId;
39 public ErrorInfo(IComponent component, @NonNls final String propertyName, @NotNull final String description,
40 @NotNull HighlightDisplayLevel highlightDisplayLevel, @NotNull final QuickFix[] fixes) {
41 myComponent = component instanceof RadComponent ? (RadComponent) component : null;
42 myHighlightDisplayLevel = highlightDisplayLevel;
43 myPropertyName = propertyName;
44 myDescription = description;
45 myFixes = fixes;
48 public String getPropertyName() {
49 return myPropertyName;
52 public HighlightDisplayLevel getHighlightDisplayLevel() {
53 return myHighlightDisplayLevel;
56 public String getInspectionId() {
57 return myInspectionId;
60 public void setInspectionId(final String inspectionId) {
61 myInspectionId = inspectionId;
64 public RadComponent getComponent() {
65 return myComponent;