cleanup (default impl of getHelpTopic)

This commit is contained in:
Vladimir Krivosheev
2017-05-11 13:14:10 +02:00
parent eb94f556b5
commit d334579104
9 changed files with 29 additions and 54 deletions
@@ -370,18 +370,22 @@ public class CaptureConfigurable implements SearchableConfigurable {
capturePointsFromAnnotations.add(capturePoint);
}
@Override
public String getColumnName(int column) {
return COLUMN_NAMES[column];
}
@Override
public int getRowCount() {
return myCapturePoints.size();
}
@Override
public int getColumnCount() {
return COLUMN_NAMES.length;
}
@Override
public Object getValueAt(int row, int col) {
CapturePoint point = myCapturePoints.get(row);
switch (col) {
@@ -403,10 +407,12 @@ public class CaptureConfigurable implements SearchableConfigurable {
return null;
}
@Override
public boolean isCellEditable(int row, int column) {
return true;
}
@Override
public void setValueAt(Object value, int row, int col) {
CapturePoint point = myCapturePoints.get(row);
switch (col) {
@@ -435,6 +441,7 @@ public class CaptureConfigurable implements SearchableConfigurable {
fireTableCellUpdated(row, col);
}
@Override
public Class getColumnClass(int columnIndex) {
switch (columnIndex) {
case ENABLED_COLUMN:
@@ -477,6 +484,7 @@ public class CaptureConfigurable implements SearchableConfigurable {
add(new CapturePoint());
}
@Override
public void removeRow(final int row) {
myCapturePoints.remove(row);
fireTableRowsDeleted(row, row);
@@ -508,10 +516,4 @@ public class CaptureConfigurable implements SearchableConfigurable {
public String getDisplayName() {
return DebuggerBundle.message("async.stacktraces.configurable.display.name");
}
@Nullable
@Override
public String getHelpTopic() {
return null;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -198,12 +198,6 @@ public class ErrorPaneConfigurable extends JPanel implements Configurable, Dispo
return "Problems";
}
@Nullable
@Override
public String getHelpTopic() {
return null;
}
@Nullable
@Override
public JComponent createComponent() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,11 +29,6 @@ public class RunConfigurationConfigurableAdapter<T extends RunConfiguration> ex
return getSettings().getName();
}
@Override
public String getHelpTopic() {
return null;
}
public T getConfiguration() {
return getSettings();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@ public abstract class SettingsEditorConfigurable<Settings> extends BaseConfigura
myEditor = editor;
mySettings = settings;
myListener = new SettingsEditorListener<Settings>() {
@Override
public void stateChanged(SettingsEditor<Settings> settingsEditor) {
setModified(true);
}
@@ -37,20 +38,24 @@ public abstract class SettingsEditorConfigurable<Settings> extends BaseConfigura
myComponent = myEditor.getComponent();
}
@Override
public JComponent createComponent() {
return myComponent;
}
@Override
public void apply() throws ConfigurationException {
myEditor.applyTo(mySettings);
setModified(false);
}
@Override
public void reset() {
myEditor.resetFrom(mySettings);
setModified(false);
}
@Override
public void disposeUIResources() {
if (myEditor != null) {
myEditor.removeSettingsEditorListener(myListener);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,31 +25,33 @@ import javax.swing.*;
public class ActionMacroConfigurable implements Configurable {
private ActionMacroConfigurationPanel myPanel;
@Override
public String getDisplayName() {
return IdeBundle.message("title.edit.macros");
}
public String getHelpTopic() {
return null;
}
@Override
public JComponent createComponent() {
myPanel = new ActionMacroConfigurationPanel();
return myPanel.getPanel();
}
@Override
public void apply() throws ConfigurationException {
myPanel.apply();
}
@Override
public void reset() {
myPanel.reset();
}
@Override
public boolean isModified() {
return myPanel.isModified();
}
@Override
public void disposeUIResources() {
Disposer.dispose(myPanel);
myPanel = null;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,12 +77,6 @@ class VcsUpdateInfoScopeFilterConfigurable implements Configurable, NamedScopesH
return VcsBundle.getString("settings.filter.update.project.info.by.scope");
}
@Nullable
@Override
public String getHelpTopic() {
return null;
}
@Nullable
@Override
public JComponent createComponent() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -102,18 +102,13 @@ public class AppEngineCloudConfigurable extends RemoteServerConfigurable impleme
return "Google App Engine Account";
}
@Nullable
@Override
public String getHelpTopic() {
return null;
}
@Nullable
@Override
public JComponent createComponent() {
return myMainPanel;
}
@Override
public void reset() {
String email = myConfiguration.getEmail();
if (email == null) {
@@ -151,6 +146,7 @@ public class AppEngineCloudConfigurable extends RemoteServerConfigurable impleme
}
}
@Override
public void apply() {
String email = getEmail();
if (email != null) {
@@ -176,6 +172,7 @@ public class AppEngineCloudConfigurable extends RemoteServerConfigurable impleme
return new String(myPasswordField.getPassword());
}
@Override
public boolean isModified() {
return !Comparing.strEqual(getEmail(), myConfiguration.getEmail()) || myConfiguration.isOAuth2() != isOAuth2()
|| myRememberPasswordCheckBox.isSelected() != myConfiguration.isPasswordStored()
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,12 +73,6 @@ public class GroovyCodeStyleGenerationConfigurable implements Configurable {
return ApplicationBundle.message("title.code.generation");
}
@Nullable
@Override
public String getHelpTopic() {
return null;
}
public static class MembersOrderList extends JBList {
private static abstract class PropertyManager {
@@ -23,7 +23,6 @@ import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.ui.RawCommandLineEditor;
import com.intellij.ui.components.JBCheckBox;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.incremental.groovy.GreclipseSettings;
@@ -47,18 +46,11 @@ public class GreclipseConfigurable implements Configurable {
myJarPath.addBrowseFolderListener(null, "Select path to groovy-eclipse-batch-*.jar with version matching your Groovy distribution", null, descriptor);
}
@Nls
@Override
public String getDisplayName() {
return null;
}
@Nullable
@Override
public String getHelpTopic() {
return null;
}
@Nullable
@Override
public JComponent createComponent() {