This commit is contained in:
Alexey Kudravtsev
2011-06-03 11:57:31 +04:00
parent 099a114c40
commit 3b85c2fa23
91 changed files with 7 additions and 468 deletions
@@ -187,10 +187,6 @@ public class SuppressFix extends SuppressIntentionAction {
!SuppressManager.getInstance().alreadyHas14Suppressions(container);
}
public boolean startInWriteAction() {
return true;
}
private String getID(PsiElement place) {
if (myAlternativeID != null) {
final Module module = ModuleUtil.findModuleForPsiElement(place);
@@ -123,9 +123,4 @@ public class AddMethodFix extends LocalQuickFixAndIntentionActionOnPsiElement {
GenerateMembersUtil.positionCaret(editor, method, true);
}
}
@Override
public boolean startInWriteAction() {
return true;
}
}
@@ -170,8 +170,4 @@ public class ExtendsListFix extends LocalQuickFixAndIntentionActionOnPsiElement
}
return list;
}
public boolean startInWriteAction() {
return true;
}
}
@@ -103,9 +103,4 @@ public class MakeClassInterfaceFix extends LocalQuickFixAndIntentionActionOnPsiE
}
}
}
@Override
public boolean startInWriteAction() {
return true;
}
}
@@ -137,9 +137,4 @@ public class MethodParameterFix extends LocalQuickFixAndIntentionActionOnPsiElem
}
return result.toArray(new ParameterInfoImpl[result.size()]);
}
public boolean startInWriteAction() {
return true;
}
}
@@ -103,9 +103,4 @@ public class MethodThrowsFix extends LocalQuickFixAndIntentionActionOnPsiElement
LOG.error(e);
}
}
@Override
public boolean startInWriteAction() {
return true;
}
}
@@ -102,8 +102,4 @@ public class RemoveRedundantElseAction extends PsiElementBaseIntentionAction {
}
ifStatement.getElseBranch().delete();
}
public boolean startInWriteAction() {
return true;
}
}
@@ -98,10 +98,4 @@ public class RemoveUnusedParameterFix extends LocalQuickFixAndIntentionActionOnP
}
return result.toArray(new ParameterInfoImpl[result.size()]);
}
public boolean startInWriteAction() {
return true;
}
}
@@ -124,8 +124,4 @@ public class SurroundWithArrayFix extends PsiElementBaseIntentionAction {
assert expressionType != null;
return "new " + expressionType.getCanonicalText() + "[]{" + expression.getText()+ "}";
}
public boolean startInWriteAction() {
return true;
}
}
@@ -178,8 +178,4 @@ public class VariableArrayTypeFix extends LocalQuickFixAndIntentionActionOnPsiEl
myNewExpression.replace(newExpression);
}
}
public boolean startInWriteAction() {
return true;
}
}
@@ -87,10 +87,6 @@ public class VariableTypeFix extends LocalQuickFixAndIntentionActionOnPsiElement
}
}
public boolean startInWriteAction() {
return true;
}
protected PsiType getReturnType() {
return myReturnType;
}
@@ -80,11 +80,6 @@ public class AddAnnotationFix extends LocalQuickFixAndIntentionActionOnPsiElemen
return CodeInsightBundle.message("intention.add.annotation.family");
}
@Override
public boolean startInWriteAction() {
return true;
}
@Nullable
public static PsiModifierListOwner getContainer(final PsiElement element) {
PsiModifierListOwner listOwner = PsiTreeUtil.getParentOfType(element, PsiParameter.class, false);
@@ -83,9 +83,6 @@ public class InstanceGuardedByStaticInspection extends BaseJavaLocalInspectionTo
myHolder.registerProblem(psiDocTag, "Instance member guarded by static \"" + guardValue + "\" #loc");
}
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
public void visitAnnotation(PsiAnnotation annotation) {
super.visitAnnotation(annotation);
if (!JCiPUtil.isGuardedByAnnotation(annotation)) {
@@ -121,4 +118,4 @@ public class InstanceGuardedByStaticInspection extends BaseJavaLocalInspectionTo
myHolder.registerProblem(guardRef, "Instance member guarded by static #ref #loc");
}
}
}
}
@@ -57,9 +57,6 @@ public class NonFinalFieldInImmutableInspection extends BaseJavaLocalInspectionT
holder.registerProblem(field, "Non-final field #ref in @Immutable class #loc");
}
}
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
};
}
}
@@ -105,8 +105,5 @@ public class NonFinalGuardInspection extends BaseJavaLocalInspectionTool {
}
myHolder.registerProblem(psiDocTag, "Non-final @GuardedBy field \"" + guardValue + "\" #loc");
}
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
}
}
@@ -126,8 +126,5 @@ public class StaticGuardedByInstanceInspection extends BaseJavaLocalInspectionTo
private void registerError(PsiElement element) {
myHolder.registerProblem(element, "Static member guarded by instance #ref #loc");
}
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
}
}
@@ -162,8 +162,5 @@ public class UnknownGuardInspection extends BaseJavaLocalInspectionTool {
}
myHolder.registerProblem(psiDocTag, "Unknown @GuardedBy field \"" + guardValue + "\" #loc");
}
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
}
}
@@ -113,10 +113,6 @@ public class DependencyInspection extends BaseLocalInspectionTool {
return HighlightDisplayLevel.ERROR;
}
public boolean isEnabledByDefault() {
return true;
}
private static class EditDependencyRulesAction implements LocalQuickFix {
private final DependencyRule myRule;
public EditDependencyRulesAction(DependencyRule rule) {
@@ -39,9 +39,6 @@ public class EqualsAndHashcode extends BaseJavaLocalInspectionTool {
private PsiMethod myEquals;
private final AtomicBoolean myInitialized = new AtomicBoolean();
public void projectOpened(Project project) {
}
@NotNull
public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) {
if (!myInitialized.getAndSet(true)) {
@@ -24,10 +24,6 @@ import org.jetbrains.annotations.NotNull;
* Date: Dec 27, 2004
*/
public abstract class BaseLocalInspectionTool extends BaseJavaLocalInspectionTool {
@NotNull
public HighlightDisplayLevel getDefaultLevel() {
return HighlightDisplayLevel.WARNING;
}
public boolean isEnabledByDefault() {
return true;
@@ -26,13 +26,6 @@ public class GtkPreferredJComboBoxRendererInspection extends InternalInspection
private static final String RENDERER_CLASS_NAME = DefaultListCellRenderer.class.getName();
private static final String MESSAGE = "Please use ListCellRendererWrapper instead to prevent artifacts under GTK+ Look and Feel.";
@Nls
@NotNull
@Override
public String getGroupDisplayName() {
return InternalInspectionToolsProvider.GROUP_NAME;
}
@Nls
@NotNull
@Override
@@ -46,10 +39,6 @@ public class GtkPreferredJComboBoxRendererInspection extends InternalInspection
return "GtkPreferredJComboBoxRenderer";
}
public boolean isEnabledByDefault() {
return true;
}
@NotNull
public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) {
return new JavaElementVisitor() {
@@ -33,10 +33,6 @@ public class ClassNode extends BasePsiNode<PsiClass> implements Comparable<Class
return aClass != null && aClass.isValid() ? ClassPresentationUtil.getNameForClass(aClass, false) : "";
}
public int getWeight() {
return 4;
}
@Override
public boolean isDeprecated() {
final PsiClass psiClass = (PsiClass)getPsiElement();
@@ -36,10 +36,6 @@ public class PsiFieldTreeElement extends JavaClassTreeElementBase<PsiField> impl
return Collections.emptyList();
}
public ItemPresentation getPresentation() {
return this;
}
public String getPresentableText() {
return PsiFormatUtil.formatVariable(
getElement(),
@@ -95,10 +95,6 @@ public class JavaSdkImpl extends JavaSdk {
public void saveAdditionalData(SdkAdditionalData additionalData, Element additional) {
}
public SdkAdditionalData loadAdditionalData(Element additional) {
return null;
}
@SuppressWarnings({"HardCodedStringLiteral"})
public String getBinPath(Sdk sdk) {
return getConvertedHomePath(sdk) + "bin";
@@ -36,11 +36,6 @@ public class ExcludeDeclaredFilter extends PositionElementFilter{
setFilter(filter);
}
public boolean isClassAcceptable(Class hintClass){
return true;
//return PsiVariable.class.isAssignableFrom(hintClass);
}
SoftReference<PsiElement> myCachedVar = new SoftReference<PsiElement>(null);
SoftReference<PsiElement> myCurrentContext = new SoftReference<PsiElement>(null);
@@ -221,15 +221,6 @@ public abstract class ClsElementImpl extends PsiElementBase implements PsiCompil
return getText().equals(element.getText());
}
@NotNull
public PsiElement getNavigationElement() {
return this;
}
public PsiElement getOriginalElement() {
return this;
}
public ASTNode getNode() {
return null;
}
@@ -48,25 +48,7 @@ public class LightClassReferenceExpression extends LightClassReference implement
return getManager().areElementsEquivalent(resolve(), element);
}
@NotNull
public Object[] getVariants() {
throw new RuntimeException("Variants are not available for light references");
}
public void processVariants(PsiScopeProcessor processor){
throw new RuntimeException("Variants are not available for light references");
}
public TextRange getRangeInElement() {
return new TextRange(0, getTextLength());
}
public PsiReferenceParameterList getParameterList() {
return null;
}
@NotNull
public PsiType[] getTypeParameters() {
return PsiType.EMPTY_ARRAY;
}
}
@@ -45,8 +45,4 @@ public class LightPackageReferenceExpression extends LightPackageReference imple
public boolean isReferenceTo(PsiElement element) {
return getManager().areElementsEquivalent(resolve(), element);
}
public TextRange getRangeInElement() {
return new TextRange(0, getTextLength());
}
}
@@ -51,8 +51,4 @@ public class MigrationPackageImpl extends PsiPackageImpl implements PsiPackage {
public VirtualFile[] occursInPackagePrefixes() {
return VirtualFile.EMPTY_ARRAY;
}
public ASTNode getNode() {
return null;
}
}
@@ -117,10 +117,6 @@ public abstract class JavaStubPsiElement<T extends StubElement> extends StubBase
((CompositeElement)treeElement.getTreeParent()).deleteChildInternal(treeElement);
}
public void checkDelete() throws IncorrectOperationException {
CheckUtil.checkWritable(this);
}
public void deleteChildRange(PsiElement first, PsiElement last) throws IncorrectOperationException {
CheckUtil.checkWritable(this);
if (first == null) {
@@ -128,20 +128,10 @@ public class PsiAnonymousClassImpl extends PsiClassImpl implements PsiAnonymousC
return null;
}
@NotNull
public PsiClassType[] getSuperTypes() {
return PsiClassImplUtil.getSuperTypes(this);
}
public PsiClass getContainingClass() {
return null;
}
@NotNull
public Collection<HierarchicalMethodSignature> getVisibleSignatures() {
return PsiSuperMethodImplUtil.getVisibleSignatures(this);
}
public boolean isInterface() {
return false;
}
@@ -55,9 +55,6 @@ public class PsiBasedFormatterModelWithShiftIndentInside extends PsiBasedFormatt
return shiftIndentInsideWithPsi(textRange, shift);
}
public void commitChanges() {
}
private TextRange shiftIndentInsideWithPsi(final TextRange textRange, final int shift) {
final int offset = textRange.getStartOffset();
@@ -305,10 +305,6 @@ public class ExtractMethodObjectDialog extends AbstractExtractDialog {
ExtractMethodObjectDialog.this.doCancelAction();
}
protected boolean areTypesDirected() {
return true;
}
@Override
protected boolean isUsedAfter(PsiVariable variable) {
return ExtractMethodObjectDialog.this.isUsedAfter(variable);
@@ -138,8 +138,6 @@ public class ExtractMethodObjectProcessor extends BaseRefactoringProcessor {
return UsageViewUtil.removeDuplicatedUsages(usageInfos);
}
protected void refreshElements(final PsiElement[] elements) {}
protected void performRefactoring(final UsageInfo[] usages) {
try {
if (isCreateInnerClass()) {
@@ -352,9 +352,6 @@ public class InheritanceToDelegationProcessor extends BaseRefactoringProcessor {
}
}
protected void refreshElements(PsiElement[] elements) {
}
protected void performRefactoring(UsageInfo[] usages) {
try {
for (UsageInfo aUsage : usages) {
@@ -231,9 +231,6 @@ public abstract class MakeMethodOrClassStaticProcessor<T extends PsiTypeParamete
}
}
protected void refreshElements(PsiElement[] elements) {
}
//should be called before setting static modifier
protected void setupTypeParameterList() throws IncorrectOperationException {
final PsiTypeParameterList list = myMember.getTypeParameterList();
@@ -91,9 +91,6 @@ public class PullUpHelper extends BaseRefactoringProcessor{
return new UsageInfo[0];
}
protected void refreshElements(PsiElement[] elements) {
}
protected void performRefactoring(UsageInfo[] usages) {
moveMembersToBase();
moveFieldInitializations();
@@ -135,10 +135,6 @@ public class MigrationDialog extends DialogWrapper{
return myPanel;
}
protected JComponent createNorthPanel() {
return null;
}
private void updateDescription() {
if (myDescriptionTextArea == null){
return;
@@ -102,9 +102,6 @@ class MigrationProcessor extends BaseRefactoringProcessor {
return usagesVector.toArray(new MigrationUsageInfo[usagesVector.size()]);
}
protected void refreshElements(PsiElement[] elements) {
}
protected boolean preprocessUsages(Ref<UsageInfo[]> refUsages) {
if (refUsages.get().length == 0) {
Messages.showInfoMessage(myProject, RefactoringBundle.message("migration.no.usages.found.in.the.project"), REFACTORING_NAME);
@@ -184,9 +184,6 @@ public class ReplaceConstructorWithFactoryProcessor extends BaseRefactoringProce
}
}
protected void refreshElements(PsiElement[] elements) {
}
protected void performRefactoring(UsageInfo[] usages) {
try {
@@ -33,10 +33,6 @@ public class TypeMigrationTreeBuilder extends AbstractTreeBuilder{
initRootNode();
}
protected boolean isAlwaysShowPlus(final NodeDescriptor nodeDescriptor) {
return false;
}
protected boolean isAutoExpandNode(final NodeDescriptor nodeDescriptor) {
return false;
}
@@ -44,4 +40,4 @@ public class TypeMigrationTreeBuilder extends AbstractTreeBuilder{
public void setRoot(MigrationRootNode root) {
((TypeMigrationTreeStructure)getTreeStructure()).setRoot(root);
}
}
}
@@ -37,9 +37,6 @@ public abstract class FixableUsagesRefactoringProcessor extends BaseRefactoringP
super(project);
}
protected void refreshElements(PsiElement[] psiElements) {
}
protected void performRefactoring(UsageInfo[] usageInfos) {
RefactoringUtil.sortDepthFirstRightLeftOrder(usageInfos);
for (UsageInfo usageInfo : usageInfos) {
@@ -63,10 +63,6 @@ public class SliceLeafValueRootNode extends SliceNode implements MyColoredTreeCe
return "Value: "+ text;
}
public boolean isValid() {
return getValue().isValid();
}
public void customizeCellRenderer(SliceUsageCellRenderer renderer,
JTree tree,
Object value,
@@ -95,11 +95,6 @@ public class OrderEntryTest extends DaemonAnalyzerTestCase {
return LightQuickFixTestCase.findActionWithText(actions, actionText);
}
@Override
protected boolean isRunInWriteAction() {
return false;
}
public void testAddDependency() throws Exception { doTest("B/src/y/AddDependency.java"); }
public void testAddLibrary() throws Exception { doTest("B/src/y/AddLibrary.java"); }
public void testAddCircularDependency() throws Exception {
@@ -45,11 +45,6 @@ public class JavaStubBuilderTest extends LightIdeaTestCase {
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_7);
}
@Override
protected Sdk getProjectJDK() {
return JavaSdkImpl.getMockJdk17();
}
public void testEmpty() {
doTest("/**/",
"PsiJavaFileStub []\n" +
@@ -419,4 +414,4 @@ public class JavaStubBuilderTest extends LightIdeaTestCase {
assertEquals("Light stub tree differs from heavy one", originalStr, lightStr);
}
}
}
}
@@ -206,10 +206,6 @@ public class EnvVariablesTable extends Observable {
super(name);
}
public Class getColumnClass() {
return String.class;
}
@Override
public TableCellRenderer getRenderer(EnvironmentVariable environmentVariable) {
if (myRenderer == null) {
@@ -282,8 +282,4 @@ public abstract class ProjectViewNode <Value> extends AbstractTreeNode<Value> im
public boolean isValidating() {
return myValidating;
}
public boolean isAlwaysLeaf() {
return false;
}
}
@@ -55,10 +55,6 @@ public class SimpleJavaSdkType extends SdkType implements JavaSdkType {
public void saveAdditionalData(SdkAdditionalData additionalData, Element additional) {
}
public SdkAdditionalData loadAdditionalData(Element additional) {
return null;
}
public String getBinPath(Sdk sdk) {
return getConvertedHomePath(sdk) + "bin";
}
@@ -95,9 +91,6 @@ public class SimpleJavaSdkType extends SdkType implements JavaSdkType {
}
public void setupSdkPaths(Sdk sdk) {
}
public final String getVersionString(final String sdkHome) {
return SdkVersionUtil.readVersionFromProcessOutput(sdkHome, new String[] {sdkHome + File.separator + "bin" + File.separator + "java", "-version"}, "version");
}
@@ -66,9 +66,6 @@ public class UnknownSdkType extends SdkType{
return currentSdkName;
}
public void setupSdkPaths(Sdk sdk) {
}
public AdditionalDataConfigurable createAdditionalDataConfigurable(SdkModel sdkModel, SdkModificator sdkModificator) {
return null;
}
@@ -88,10 +85,6 @@ public class UnknownSdkType extends SdkType{
public void saveAdditionalData(SdkAdditionalData additionalData, Element additional) {
}
public SdkAdditionalData loadAdditionalData(Element additional) {
return null;
}
public String getPresentableName() {
return ProjectBundle.message("sdk.unknown.name");
}
@@ -44,9 +44,4 @@ public class StaticTextWhiteSpaceDefinitionStrategy extends AbstractWhiteSpaceFo
return start;
}
@Override
public boolean replaceDefaultStrategy() {
return false;
}
}
@@ -160,10 +160,6 @@ public class CodeStyleBlankLinesPanel extends MultilanguageCodeStyleAbstractPane
return myPanel;
}
protected void prepareForReformat(final PsiFile psiFile) {
//psiFile.putUserData(PsiUtil.FILE_LANGUAGE_LEVEL_KEY, LanguageLevel.HIGHEST);
}
public void showAllStandardOptions() {
myAllOptionsAllowed = true;
for (IntOption option : myOptions) {
@@ -305,4 +301,4 @@ public class CodeStyleBlankLinesPanel extends MultilanguageCodeStyleAbstractPane
}
}
}
}
}
@@ -338,10 +338,6 @@ public abstract class OptionTableWithPreviewPanel extends MultilanguageCodeStyle
myOptions.add(new SelectionOption(null, fieldName, title, groupName, null, null, options, values));
}
protected void prepareForReformat(final PsiFile psiFile) {
//
}
private abstract class Option extends OrderedOption {
@Nullable final Class<? extends CustomCodeStyleSettings> clazz;
@NotNull final Field field;
@@ -734,4 +730,4 @@ public abstract class OptionTableWithPreviewPanel extends MultilanguageCodeStyle
optionNames.add(option.title);
}
}
}
}
@@ -39,10 +39,6 @@ public class HippieBackwardCompletionAction extends BaseCodeInsightAction implem
return new HippieWordCompletionHandler(false);
}
protected boolean isValidForFile(Project project, Editor editor, final PsiFile file) {
return true;
}
@Override
protected boolean isValidForLookup() {
return true;
@@ -39,10 +39,6 @@ public class HippieCompletionAction extends BaseCodeInsightAction implements Dum
return new HippieWordCompletionHandler(true);
}
protected boolean isValidForFile(Project project, Editor editor, final PsiFile file) {
return true;
}
@Override
protected boolean isValidForLookup() {
return true;
@@ -143,8 +143,4 @@ public abstract class AbstractSuppressByNoInspectionCommentFix extends SuppressI
public String getFamilyName() {
return InspectionsBundle.message("suppress.inspection.family");
}
public boolean startInWriteAction() {
return true;
}
}
@@ -183,8 +183,4 @@ public class CreateFileFix extends LocalQuickFixAndIntentionActionOnPsiElement {
myIsAvailable = false;
}
}
public boolean startInWriteAction() {
return true;
}
}
@@ -63,10 +63,6 @@ public class GotoDeclarationAction extends BaseCodeInsightAction implements Code
return this;
}
protected boolean isValidForFile(Project project, Editor editor, final PsiFile file) {
return true;
}
protected boolean isValidForLookup() {
return true;
}
@@ -31,10 +31,6 @@ public class GotoImplementationAction extends BaseCodeInsightAction implements D
return new GotoImplementationHandler();
}
protected boolean isValidForFile(Project project, Editor editor, final PsiFile file) {
return true;
}
public void update(final AnActionEvent event) {
if (!DefinitionsSearch.INSTANCE.hasAnyExecutors()) {
event.getPresentation().setVisible(false);
@@ -43,4 +39,4 @@ public class GotoImplementationAction extends BaseCodeInsightAction implements D
super.update(event);
}
}
}
}
@@ -47,12 +47,6 @@ public class ImageOrColorPreviewProjectComponent extends AbstractProjectComponen
return "ImageOrColorPreviewComponent";
}
public void initComponent() {
}
public void disposeComponent() {
}
private static class MyFileEditorManagerListener implements FileEditorManagerListener {
public void fileOpened(final FileEditorManager source, final VirtualFile file) {
if (isSuitable(source.getProject(), file)) {
@@ -96,9 +96,4 @@ public class GotoInspectionModel extends SimpleChooseByNameModel {
}
return null;
}
@Override
public boolean willOpenEditor() {
return false;
}
}
@@ -215,10 +215,6 @@ public class GridImpl extends Wrapper implements Grid, Disposable, CellTransform
private JComponent myContent;
public boolean isNull() {
return getComponentCount() == 0;
}
public CellTransform.Restore detach() {
if (getComponentCount() == 1) {
myContent = (JComponent)getComponent(0);
@@ -58,10 +58,6 @@ public class CommonFindUsagesDialog extends AbstractFindUsagesDialog {
return null;
}
protected JComponent getPreferredFocusedControl() {
return null;
}
public void configureLabelComponent(final SimpleColoredComponent coloredComponent) {
coloredComponent.append(StringUtil.capitalize(UsageViewUtil.getType(myPsiElement)));
coloredComponent.append(" ");
@@ -101,9 +101,6 @@ public class CreateFileAction extends CreateElementActionBase implements DumbAwa
}
protected class MyValidator extends MyInputValidator {
public boolean checkInput(String inputString) {
return true;
}
public boolean canClose(String inputString) {
if (inputString.length() == 0) {
@@ -72,10 +72,6 @@ public abstract class HierarchyBrowserBase extends SimpleToolWindowPanel impleme
myContent = content;
}
public JComponent getComponent() {
return this;
}
protected void buildUi(JComponent toolbar, JComponent content) {
setToolbar(toolbar);
setContent(content);
@@ -160,10 +160,6 @@ public final class MacrosDialog extends DialogWrapper {
return panel;
}
protected JComponent createNorthPanel() {
return null;
}
/**
* Macro info shown in list
*/
@@ -445,10 +445,6 @@ public class NavBarPanel extends JPanel implements DataProvider, PopupOwner, Dis
return NavBarPresentation.getPresentableText(value, null);
}
public boolean isSelectable(Object value) {
return true;
}
public PopupStep onChosen(final Object selectedValue, final boolean finalChoice) {
return doFinalStep(new Runnable() {
public void run() {
@@ -101,8 +101,4 @@ public abstract class AbstractModuleNode extends ProjectViewNode<Module> impleme
public boolean canNavigate() {
return ProjectSettingsService.getInstance(myProject).canOpenModuleSettings();
}
public boolean canNavigateToSource() {
return false;
}
}
@@ -122,10 +122,6 @@ public class LibraryGroupNode extends ProjectViewNode<LibraryGroupElement> {
return ProjectSettingsService.getInstance(myProject).canOpenModuleLibrarySettings();
}
public boolean canNavigateToSource() {
return false;
}
public void navigate(final boolean requestFocus) {
Module module = getValue().getModule();
ProjectSettingsService.getInstance(myProject).openModuleLibrarySettings(module);
@@ -73,14 +73,6 @@ public class ModuleListNode extends ProjectViewNode<Module> {
presentation.setIcons(Icons.CLOSED_MODULE_GROUP_ICON);
}
public boolean canNavigate() {
return false;
}
public boolean canNavigateToSource() {
return false;
}
@Override
public boolean isAlwaysExpand() {
return true;
@@ -534,10 +534,6 @@ public class StructureViewComponent extends SimpleToolWindowPanel implements Tre
}
public JComponent getComponent() {
return this;
}
public void dispose() {
LOG.assertTrue(EventQueue.isDispatchThread(), Thread.currentThread().getName());
myAbstractTreeBuilder = null;
@@ -36,10 +36,6 @@ public final class ToDoRootNode extends BaseToDoNode{
mySummaryNode = new SummaryNode(getProject(), summary, myBuilder);
}
public boolean contains(VirtualFile file) {
return false;
}
@NotNull
public Collection<AbstractTreeNode> getChildren() {
return new ArrayList<AbstractTreeNode>(Collections.singleton(mySummaryNode));
@@ -39,19 +39,6 @@ public class ViewerTreeBuilder extends AbstractTreeBuilder {
initRootNode();
}
protected boolean isAlwaysShowPlus(NodeDescriptor nodeDescriptor) {
return false;
}
protected boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
Object element = nodeDescriptor.getElement();
Object rootElement = getTreeStructure().getRootElement();
if (rootElement.equals(element)) return true;
NodeDescriptor parent = nodeDescriptor.getParentDescriptor();
if (parent != null && rootElement.equals(parent.getElement())) return true;
return false;
}
@NotNull
protected ProgressIndicator createProgressIndicator() {
return new StatusBarProgress();
@@ -65,10 +65,6 @@ public class ModuleGroupNode extends PackageDependenciesNode {
return myModuleGroup;
}
public int getWeight() {
return 0;
}
public boolean equals(Object o) {
if (isEquals()){
return super.equals(o);
@@ -459,9 +459,6 @@ public class SingleInspectionProfilePanel extends JPanel {
size = new Dimension(size.width + 10, size.height);
return size;
}
public int getToggleClickCount() {
return -1;
}
@Override
protected void onNodeStateChanged(final CheckedTreeNode node) {
@@ -20,7 +20,6 @@ import com.intellij.ide.caches.FileContent;
import com.intellij.ide.util.EditSourceUtil;
import com.intellij.lang.FileASTNode;
import com.intellij.lang.Language;
import com.intellij.navigation.ItemPresentation;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
@@ -32,7 +31,6 @@ import com.intellij.psi.impl.*;
import com.intellij.psi.impl.file.PsiFileImplUtil;
import com.intellij.psi.impl.source.resolve.FileContextUtil;
import com.intellij.psi.impl.source.tree.SharedImplUtil;
import com.intellij.psi.scope.PsiScopeProcessor;
import com.intellij.psi.search.PsiElementProcessor;
import com.intellij.psi.search.SearchScope;
import com.intellij.util.IncorrectOperationException;
@@ -77,14 +75,6 @@ public abstract class LightPsiFileImpl extends PsiElementBase implements PsiFile
return getViewProvider().getContents().toString();
}
public PsiElement getNextSibling() {
return SharedPsiElementImplUtil.getNextSibling(this);
}
public PsiElement getPrevSibling() {
return SharedPsiElementImplUtil.getPrevSibling(this);
}
public long getModificationStamp() {
return getViewProvider().getModificationStamp();
}
@@ -198,14 +188,6 @@ public abstract class LightPsiFileImpl extends PsiElementBase implements PsiFile
return manager.getProject();
}
public PsiElement getNavigationElement() {
return this;
}
public PsiElement getOriginalElement() {
return this;
}
public void acceptChildren(@NotNull PsiElementVisitor visitor) {
PsiElement child = getFirstChild();
while (child != null) {
@@ -215,7 +197,7 @@ public abstract class LightPsiFileImpl extends PsiElementBase implements PsiFile
}
}
public synchronized final PsiElement copy() {
public final synchronized PsiElement copy() {
return clone();
}
@@ -228,23 +210,11 @@ public abstract class LightPsiFileImpl extends PsiElementBase implements PsiFile
return SharedPsiElementImplUtil.getReferences(this);
}
public boolean processDeclarations(@NotNull PsiScopeProcessor processor,
@NotNull ResolveState state,
PsiElement lastParent,
@NotNull PsiElement place) {
return true;
}
@NotNull
public SearchScope getUseScope() {
return ((PsiManagerEx) getManager()).getFileManager().getUseScope(this);
}
// Default implementation just to make sure it compiles.
public ItemPresentation getPresentation() {
return null;
}
public FileStatus getFileStatus() {
return SharedImplUtil.getFileStatus(this);
}
@@ -253,14 +223,6 @@ public abstract class LightPsiFileImpl extends PsiElementBase implements PsiFile
EditSourceUtil.getDescriptor(this).navigate(requestFocus);
}
public boolean canNavigate() {
return EditSourceUtil.canNavigate(this);
}
public boolean canNavigateToSource() {
return canNavigate();
}
public synchronized PsiElement findElementAt(int offset) {
return getViewProvider().findElementAt(offset);
}
@@ -364,10 +326,6 @@ public abstract class LightPsiFileImpl extends PsiElementBase implements PsiFile
throw new IncorrectOperationException("Not implemented");
}
public PsiReference getReference() {
return null;
}
public FileASTNode getNode() {
return null;
}
@@ -25,10 +25,6 @@ import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.Nullable;
public class PlainTextASTFactory extends ASTFactory {
@Nullable
public CompositeElement createComposite(final IElementType type) {
return null;
}
@Nullable
public LeafElement createLeaf(final IElementType type, CharSequence text) {
@@ -33,10 +33,6 @@ public class GotoTestOrCodeAction extends BaseCodeInsightAction {
return new GotoTestOrCodeHandler();
}
protected boolean isValidForFile(Project project, Editor editor, final PsiFile file) {
return true;
}
@Override
public void update(AnActionEvent event) {
Presentation p = event.getPresentation();
@@ -250,10 +250,6 @@ public class SimpleClasspathPanel extends JPanel {
return true;
}
public boolean isSelectable(PopupAction value) {
return true;
}
public PopupStep onChosen(final PopupAction selectedValue, final boolean finalChoice) {
return doFinalStep(new Runnable() {
public void run() {
@@ -708,10 +708,6 @@ public class Messages {
close(-1);
}
protected JComponent createNorthPanel() {
return null;
}
protected JComponent createCenterPanel() {
return doCreateCenterPanel();
}
@@ -23,8 +23,4 @@ public class NullNode extends SimpleNode {
public SimpleNode[] getChildren() {
return NO_CHILDREN;
}
public Object[] getEqualityObjects() {
return NONE;
}
}
@@ -109,9 +109,6 @@ public class MethodParameterInjection extends BaseInjection {
myParameterMap.put(methodSignature, new MethodInfo(methodSignature, selection, false));
}
protected void writeExternalImpl(Element e) {
}
@Override
public MethodParameterInjection copy() {
@@ -88,10 +88,6 @@ public class JavaLanguageInjectionSupport extends AbstractLanguageInjectionSuppo
return new Class[] { PsiJavaPatterns.class };
}
public boolean useDefaultInjector(final PsiElement host) {
return false;
}
public Configurable[] createSettings(final Project project, final Configuration configuration) {
return new Configurable[]{new AdvancedSettingsUI(project, configuration)};
}
@@ -53,9 +53,6 @@ public class InjectionNotApplicable extends LocalInspectionTool {
return new JavaElementVisitor() {
final String annotationName = Configuration.getProjectInstance(holder.getProject()).getAdvancedConfiguration().getLanguageAnnotationClass();
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
@Override
public void visitAnnotation(PsiAnnotation annotation) {
final String name = annotation.getQualifiedName();
@@ -39,11 +39,6 @@ import java.util.Set;
public class LanguageMismatch extends LocalInspectionTool {
public boolean CHECK_NON_ANNOTATED_REFERENCES = true;
@NotNull
public HighlightDisplayLevel getDefaultLevel() {
return HighlightDisplayLevel.WARNING;
}
public boolean isEnabledByDefault() {
return true;
}
@@ -53,9 +53,6 @@ public class UnknownLanguageID extends LocalInspectionTool {
return new JavaElementVisitor() {
final String annotationName = Configuration.getProjectInstance(holder.getProject()).getAdvancedConfiguration().getLanguageAnnotationClass();
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
@Override
public void visitNameValuePair(PsiNameValuePair valuePair) {
final PsiAnnotation annotation = PsiTreeUtil.getParentOfType(valuePair, PsiAnnotation.class);
@@ -53,9 +53,6 @@ public class PatternAnnotationNotApplicable extends LocalInspectionTool {
return new JavaElementVisitor() {
final String annotationName = Configuration.getProjectInstance(holder.getProject()).getAdvancedConfiguration().getPatternAnnotationClass();
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
@Override
public void visitAnnotation(PsiAnnotation annotation) {
final String name = annotation.getQualifiedName();
@@ -15,7 +15,6 @@
*/
package org.intellij.plugins.intelliLang.pattern;
import com.intellij.codeHighlighting.HighlightDisplayLevel;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.openapi.util.Pair;
@@ -31,11 +30,6 @@ import java.util.Set;
public class PatternOverriddenByNonAnnotatedMethod extends LocalInspectionTool {
@NotNull
public HighlightDisplayLevel getDefaultLevel() {
return HighlightDisplayLevel.WARNING;
}
public boolean isEnabledByDefault() {
return true;
}
@@ -55,9 +49,6 @@ public class PatternOverriddenByNonAnnotatedMethod extends LocalInspectionTool {
return new JavaElementVisitor() {
final Pair<String, ? extends Set<String>> annotationName = Configuration.getProjectInstance(holder.getProject()).getAdvancedConfiguration().getPatternAnnotationPair();
public void visitReferenceExpression(PsiReferenceExpression expression) {
}
@Override
public void visitMethod(PsiMethod method) {
final PsiIdentifier psiIdentifier = method.getNameIdentifier();
@@ -64,11 +64,6 @@ public class ComponentNotRegisteredInspection extends DevKitInspectionBase {
return true;
}
@NotNull
public HighlightDisplayLevel getDefaultLevel() {
return HighlightDisplayLevel.WARNING;
}
@Nullable
public JComponent createOptionsPanel() {
final JPanel jPanel = new JPanel();
@@ -163,11 +163,6 @@ public class RegistrationProblemsInspection extends DevKitInspectionBase {
return null;
}
@Nullable
public ProblemDescriptor[] checkMethod(@NotNull PsiMethod method, @NotNull InspectionManager manager, boolean isOnTheFly) {
return null;
}
private List<ProblemDescriptor> addProblem(List<ProblemDescriptor> problems, ProblemDescriptor problemDescriptor) {
if (problems == null) problems = new SmartList<ProblemDescriptor>();
problems.add(problemDescriptor);
@@ -20,7 +20,6 @@ import com.intellij.codeInsight.daemon.GroupNames;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.ex.BaseLocalInspectionTool;
import com.intellij.codeInspection.i18n.JavaI18nUtil;
import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.progress.ProgressIndicator;
@@ -361,11 +360,6 @@ public class DuplicateStringLiteralInspection extends BaseLocalInspectionTool {
return myText;
}
@Override
public boolean startInWriteAction() {
return true;
}
@Override
public void invoke(@NotNull Project project,
@NotNull PsiFile file,
@@ -56,10 +56,6 @@ public abstract class XmlSuppressableInspectionTool extends LocalInspectionTool
public void invoke(final Project project, final Editor editor, final PsiElement element) throws IncorrectOperationException {
XmlSuppressionProvider.getProvider(element.getContainingFile()).suppressForTag(element, getID());
}
public boolean startInWriteAction() {
return true;
}
}
public static class SuppressForFile extends SuppressIntentionAction {
@@ -86,11 +82,6 @@ public abstract class XmlSuppressableInspectionTool extends LocalInspectionTool
public boolean isAvailable(@NotNull final Project project, final Editor editor, @NotNull final PsiElement element) {
return element.isValid() && element.getContainingFile() instanceof XmlFile;
}
public boolean startInWriteAction() {
return true;
}
}
public static class SuppressAllForFile extends SuppressForFile {