mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move common code to EditorOptionsTopHitProviderBase
This commit is contained in:
@@ -15,19 +15,14 @@
|
||||
*/
|
||||
package org.intellij.images.options.impl;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.application.options.editor.EditorOptionsTopHitProviderBase;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
public class ImagesOptionsTopHitProvider extends ConfigurableOptionsTopHitProvider {
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
public class ImagesOptionsTopHitProvider extends EditorOptionsTopHitProviderBase {
|
||||
@Override
|
||||
protected Configurable getConfigurable(Project project) {
|
||||
return new OptionsConfigurabe();
|
||||
|
||||
+1
-7
@@ -15,19 +15,13 @@
|
||||
*/
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
public class AutoImportOptionsTopHitProvider extends ConfigurableOptionsTopHitProvider {
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
public class AutoImportOptionsTopHitProvider extends EditorOptionsTopHitProviderBase {
|
||||
@Override
|
||||
protected Configurable getConfigurable(Project project) {
|
||||
return new AutoImportOptionsConfigurable();
|
||||
|
||||
+1
-12
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
@@ -24,25 +23,15 @@ import javax.swing.*;
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
public class CodeFoldingOptionsTopHitProvider extends ConfigurableOptionsTopHitProvider {
|
||||
public class CodeFoldingOptionsTopHitProvider extends EditorOptionsTopHitProviderBase.NoPrefix {
|
||||
private int myCount;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Configurable getConfigurable(Project project) {
|
||||
myCount = 0;
|
||||
return new CodeFoldingConfigurable();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getName(Configurable configurable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getOptionName(JCheckBox checkbox) {
|
||||
String name = super.getOptionName(checkbox);
|
||||
|
||||
+1
-12
@@ -15,26 +15,15 @@
|
||||
*/
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
public class EditorOptionsTopHitProvider extends ConfigurableOptionsTopHitProvider {
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
public class EditorOptionsTopHitProvider extends EditorOptionsTopHitProviderBase.NoPrefix {
|
||||
@Override
|
||||
protected Configurable getConfigurable(Project project) {
|
||||
return new EditorOptions();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getName(Configurable configurable) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2000-2015 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
|
||||
/**
|
||||
* @author Konstantin Bulenkov
|
||||
*/
|
||||
public abstract class EditorOptionsTopHitProviderBase extends ConfigurableOptionsTopHitProvider {
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
public static abstract class NoPrefix extends EditorOptionsTopHitProviderBase {
|
||||
@Override
|
||||
protected String getName(Configurable configurable) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-7
@@ -15,19 +15,13 @@
|
||||
*/
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
public class EditorSmartKeysOptionsTopHitProvider extends ConfigurableOptionsTopHitProvider {
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
public class EditorSmartKeysOptionsTopHitProvider extends EditorOptionsTopHitProviderBase {
|
||||
@Override
|
||||
protected Configurable getConfigurable(Project project) {
|
||||
return new EditorSmartKeysConfigurable();
|
||||
|
||||
+1
-12
@@ -15,26 +15,15 @@
|
||||
*/
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
public class EditorTabsOptionsTopHitProvider extends ConfigurableOptionsTopHitProvider {
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
public class EditorTabsOptionsTopHitProvider extends EditorOptionsTopHitProviderBase.NoPrefix {
|
||||
@Override
|
||||
protected Configurable getConfigurable(Project project) {
|
||||
return new EditorTabsConfigurable();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getName(Configurable configurable) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-7
@@ -15,19 +15,14 @@
|
||||
*/
|
||||
package com.intellij.uiDesigner;
|
||||
|
||||
import com.intellij.ide.ui.ConfigurableOptionsTopHitProvider;
|
||||
import com.intellij.application.options.editor.EditorOptionsTopHitProviderBase;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
public class GuiDesignerOptionsTopHitProvider extends ConfigurableOptionsTopHitProvider {
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editor";
|
||||
}
|
||||
|
||||
public class GuiDesignerOptionsTopHitProvider extends EditorOptionsTopHitProviderBase {
|
||||
@Override
|
||||
protected Configurable getConfigurable(Project project) {
|
||||
return new GuiDesignerConfigurable(project);
|
||||
|
||||
Reference in New Issue
Block a user