This commit is contained in:
Alexey Kudravtsev
2011-12-20 19:25:06 +04:00
parent a5062c0955
commit efffab516f
8 changed files with 10 additions and 23 deletions
@@ -544,7 +544,7 @@ public class HighlightMethodUtil {
PsiMethod method = methodCandidate.getElement();
PsiParameter[] parameters = method.getParameterList().getParameters();
PsiSubstitutor substitutor = methodCandidate.getSubstitutor();
@NonNls String ms = "<td><b>" + method.getName() + "</b></td>";
@NonNls @Language("HTML") String ms = "<td><b>" + method.getName() + "</b></td>";
for (int j = 0; j < parameters.length; j++) {
PsiParameter parameter = parameters[j];
@@ -36,7 +36,6 @@ public class SideEffectWarningDialog extends DialogWrapper {
private final String myBeforeText;
private final String myAfterText;
private final boolean myCanCopeWithSideEffects;
private AbstractAction myMakeStmtAction;
private AbstractAction myRemoveAllAction;
private AbstractAction myCancelAllAction;
public static final int MAKE_STATEMENT = 1;
@@ -71,7 +70,7 @@ public class SideEffectWarningDialog extends DialogWrapper {
};
actions.add(myRemoveAllAction);
if (myCanCopeWithSideEffects) {
myMakeStmtAction = new AbstractAction() {
AbstractAction makeStmtAction = new AbstractAction() {
{
UIUtil.setActionNameAndMnemonic(QuickFixBundle.message("side.effect.action.transform"), this);
}
@@ -80,9 +79,8 @@ public class SideEffectWarningDialog extends DialogWrapper {
public void actionPerformed(ActionEvent e) {
close(MAKE_STATEMENT);
}
};
actions.add(myMakeStmtAction);
actions.add(makeStmtAction);
}
myCancelAllAction = new AbstractAction() {
{
@@ -37,6 +37,7 @@ import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class TypeMigrationProcessor extends BaseRefactoringProcessor {
@@ -132,7 +133,7 @@ public class TypeMigrationProcessor extends BaseRefactoringProcessor {
text = "method \'" + ((PsiMethod)myRoot[0]).getName() + "\' return";
}
else {
text = myRoot.toString();
text = Arrays.toString(myRoot);
}
Content content = UsageViewManager.getInstance(myProject)
.addContent("Migrate Type of " +
@@ -499,9 +499,6 @@ public class FileBasedIndex implements ApplicationComponent {
keyDescriptor.save(out, key);
}
}
catch (IOException e) {
throw e;
}
catch (IllegalArgumentException e) {
throw new IOException("Error saving data for index " + indexId, e);
}
@@ -517,9 +514,6 @@ public class FileBasedIndex implements ApplicationComponent {
}
return list;
}
catch (IOException e) {
throw e;
}
catch (IllegalArgumentException e) {
throw new IOException("Error reading data for index " + indexId, e);
}
@@ -192,8 +192,6 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
private static final int MOUSE_SELECTION_STATE_WORD_SELECTED = 1;
private static final int MOUSE_SELECTION_STATE_LINE_SELECTED = 2;
private final MarkupModelListener myMarkupModelListener;
private EditorHighlighter myHighlighter;
private final TextDrawingCallback myTextDrawingCallback = new MyTextDrawingCallback();
@@ -306,7 +304,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
}
myMouseMotionListeners = ContainerUtil.createEmptyCOWList();
myMarkupModelListener = new MarkupModelListener() {
MarkupModelListener markupModelListener = new MarkupModelListener() {
@Override
public void afterAdded(@NotNull RangeHighlighterEx highlighter) {
attributesChanged(highlighter);
@@ -341,8 +339,8 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
}
};
((MarkupModelEx)DocumentMarkupModel.forDocument(myDocument, myProject, true)).addMarkupModelListener(myCaretModel, myMarkupModelListener);
((MarkupModelEx)getMarkupModel()).addMarkupModelListener(myCaretModel, myMarkupModelListener);
((MarkupModelEx)DocumentMarkupModel.forDocument(myDocument, myProject, true)).addMarkupModelListener(myCaretModel, markupModelListener);
((MarkupModelEx)getMarkupModel()).addMarkupModelListener(myCaretModel, markupModelListener);
myDocument.addDocumentListener(myFoldingModel,myCaretModel);
myDocument.addDocumentListener(myCaretModel,myCaretModel);
@@ -930,9 +930,7 @@ public class InjectionsSettingsUI implements SearchableConfigurable.Parent, NonD
@Override
public boolean equals(final BaseInjection o1, final BaseInjection o2) {
if (!o1.sameLanguageParameters(o2)) return false;
if (!o1.getInjectionPlaces().equals(o2.getInjectionPlaces())) return false;
return true;
return o1.sameLanguageParameters(o2) && Arrays.equals(o1.getInjectionPlaces(), o2.getInjectionPlaces());
}
}
@@ -156,9 +156,6 @@ public class IdeaJdk extends SdkType implements JavaSdkType {
else if (new File(sdkHome, "lib/webide.jar").exists()) {
productName = "WebStorm/PhpStorm ";
}
else if (new File(sdkHome, "lib/webide.jar").exists()) {
productName = "WebStorm/PhpStorm ";
}
else {
productName = "IDEA ";
}
@@ -66,6 +66,7 @@ public class XmlEncodingReference implements PsiReference, EmptyResolveMessagePr
}
public String getUnresolvedMessagePattern() {
//noinspection UnresolvedPropertyKey
return XmlErrorMessages.message("unknown.encoding.0");
}