diff --git a/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerLaunchingConfigurable.java b/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerLaunchingConfigurable.java index 490f99bb5461..b0748cfd336d 100644 --- a/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerLaunchingConfigurable.java +++ b/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerLaunchingConfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 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. @@ -16,24 +16,23 @@ package com.intellij.debugger.settings; import com.intellij.debugger.DebuggerBundle; -import com.intellij.openapi.options.Configurable; -import com.intellij.openapi.options.OptionsBundle; +import com.intellij.openapi.options.ConfigurableUi; import com.intellij.openapi.util.SystemInfo; import com.intellij.ui.StateRestoringCheckBox; import com.intellij.ui.components.panels.VerticalBox; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; -public class DebuggerLaunchingConfigurable implements Configurable { +class DebuggerLaunchingConfigurable implements ConfigurableUi { private JRadioButton myRbSocket; private JRadioButton myRbShmem; private StateRestoringCheckBox myCbForceClassicVM; private JCheckBox myCbDisableJIT; @Override - public void reset() { - final DebuggerSettings settings = DebuggerSettings.getInstance(); + public void reset(@NotNull DebuggerSettings settings) { if (!SystemInfo.isWindows) { myRbSocket.setSelected(true); myRbShmem.setEnabled(false); @@ -52,8 +51,8 @@ public class DebuggerLaunchingConfigurable implements Configurable { } @Override - public void apply() { - getSettingsTo(DebuggerSettings.getInstance()); + public void apply(@NotNull DebuggerSettings settings) { + getSettingsTo(settings); } private void getSettingsTo(DebuggerSettings settings) { @@ -68,25 +67,15 @@ public class DebuggerLaunchingConfigurable implements Configurable { } @Override - public boolean isModified() { - final DebuggerSettings currentSettings = DebuggerSettings.getInstance(); - final DebuggerSettings debuggerSettings = currentSettings.clone(); + public boolean isModified(@NotNull DebuggerSettings currentSettings) { + DebuggerSettings debuggerSettings = currentSettings.clone(); getSettingsTo(debuggerSettings); return !debuggerSettings.equals(currentSettings); } + @NotNull @Override - public String getDisplayName() { - return OptionsBundle.message("options.java.display.name"); - } - - @Override - public String getHelpTopic() { - return "reference.idesettings.debugger.launching"; - } - - @Override - public JComponent createComponent() { + public JComponent getComponent() { myCbForceClassicVM = new StateRestoringCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.force.classic.vm")); myCbDisableJIT = new JCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.disable.jit")); myRbSocket = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.socket")); @@ -110,12 +99,6 @@ public class DebuggerLaunchingConfigurable implements Configurable { JPanel result = new JPanel(new BorderLayout()); result.add(panel, BorderLayout.NORTH); - return result; } - - - @Override - public void disposeUIResources() { - } } \ No newline at end of file diff --git a/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerSteppingConfigurable.java b/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerSteppingConfigurable.java index cec458ccbb70..cf7e367f1ce8 100644 --- a/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerSteppingConfigurable.java +++ b/java/debugger/impl/src/com/intellij/debugger/settings/DebuggerSteppingConfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 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. @@ -17,10 +17,7 @@ package com.intellij.debugger.settings; import com.intellij.debugger.DebuggerBundle; import com.intellij.debugger.ui.JavaDebuggerSupport; -import com.intellij.openapi.options.Configurable; -import com.intellij.openapi.options.OptionsBundle; -import com.intellij.openapi.options.SearchableConfigurable; -import com.intellij.openapi.project.Project; +import com.intellij.openapi.options.ConfigurableUi; import com.intellij.ui.classFilter.ClassFilterEditor; import org.jetbrains.annotations.NotNull; @@ -29,18 +26,16 @@ import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -public class DebuggerSteppingConfigurable implements SearchableConfigurable, Configurable.NoScroll { +class DebuggerSteppingConfigurable implements ConfigurableUi { private JCheckBox myCbStepInfoFiltersEnabled; private JCheckBox myCbSkipSyntheticMethods; private JCheckBox myCbSkipConstructors; private JCheckBox myCbSkipClassLoaders; private ClassFilterEditor mySteppingFilterEditor; private JCheckBox myCbSkipSimpleGetters; - private Project myProject; @Override - public void reset() { - final DebuggerSettings settings = DebuggerSettings.getInstance(); + public void reset(@NotNull DebuggerSettings settings) { myCbSkipSimpleGetters.setSelected(settings.SKIP_GETTERS); myCbSkipSyntheticMethods.setSelected(settings.SKIP_SYNTHETIC_METHODS); myCbSkipConstructors.setSelected(settings.SKIP_CONSTRUCTORS); @@ -50,13 +45,11 @@ public class DebuggerSteppingConfigurable implements SearchableConfigurable, Con mySteppingFilterEditor.setFilters(settings.getSteppingFilters()); mySteppingFilterEditor.setEnabled(settings.TRACING_FILTERS_ENABLED); - - } @Override - public void apply() { - getSettingsTo(DebuggerSettings.getInstance()); + public void apply(@NotNull DebuggerSettings settings) { + getSettingsTo(settings); } private void getSettingsTo(DebuggerSettings settings) { @@ -71,39 +64,16 @@ public class DebuggerSteppingConfigurable implements SearchableConfigurable, Con } @Override - public boolean isModified() { - final DebuggerSettings currentSettings = DebuggerSettings.getInstance(); - final DebuggerSettings debuggerSettings = currentSettings.clone(); + public boolean isModified(@NotNull DebuggerSettings currentSettings) { + DebuggerSettings debuggerSettings = currentSettings.clone(); getSettingsTo(debuggerSettings); return !debuggerSettings.equals(currentSettings); } - @Override - public String getDisplayName() { - return OptionsBundle.message("options.java.display.name"); - } - @Override @NotNull - public String getHelpTopic() { - return "reference.idesettings.debugger.stepping"; - } - - @Override - @NotNull - public String getId() { - return getHelpTopic(); - } - - @Override - public Runnable enableSearch(String option) { - return null; - } - - @Override - public JComponent createComponent() { + public JComponent getComponent() { final JPanel panel = new JPanel(new GridBagLayout()); - myProject = JavaDebuggerSupport.getContextProjectForEditorFieldsInDebuggerConfigurables(); myCbSkipSyntheticMethods = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.synthetic.methods")); myCbSkipConstructors = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.constructors")); myCbSkipClassLoaders = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.classLoaders")); @@ -115,7 +85,7 @@ public class DebuggerSteppingConfigurable implements SearchableConfigurable, Con panel.add(myCbSkipSimpleGetters, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0),0, 0)); panel.add(myCbStepInfoFiltersEnabled, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 0, 0, 0),0, 0)); - mySteppingFilterEditor = new ClassFilterEditor(myProject, null, "reference.viewBreakpoints.classFilters.newPattern"); + mySteppingFilterEditor = new ClassFilterEditor(JavaDebuggerSupport.getContextProjectForEditorFieldsInDebuggerConfigurables(), null, "reference.viewBreakpoints.classFilters.newPattern"); panel.add(mySteppingFilterEditor, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 0, 0),0, 0)); myCbStepInfoFiltersEnabled.addActionListener(new ActionListener() { @@ -126,11 +96,4 @@ public class DebuggerSteppingConfigurable implements SearchableConfigurable, Con }); return panel; } - - @Override - public void disposeUIResources() { - mySteppingFilterEditor = null; - myProject = null; - } - -} +} \ No newline at end of file diff --git a/java/debugger/impl/src/com/intellij/debugger/settings/JavaDebuggerSettings.java b/java/debugger/impl/src/com/intellij/debugger/settings/JavaDebuggerSettings.java index 7151cb9f650e..533748ff8a08 100644 --- a/java/debugger/impl/src/com/intellij/debugger/settings/JavaDebuggerSettings.java +++ b/java/debugger/impl/src/com/intellij/debugger/settings/JavaDebuggerSettings.java @@ -16,6 +16,9 @@ package com.intellij.debugger.settings; import com.intellij.openapi.options.Configurable; +import com.intellij.openapi.options.OptionsBundle; +import com.intellij.openapi.options.SimpleConfigurable; +import com.intellij.openapi.util.Getter; import com.intellij.xdebugger.settings.XDebuggerSettings; import org.jdom.Element; import org.jetbrains.annotations.NotNull; @@ -36,13 +39,21 @@ class JavaDebuggerSettings extends XDebuggerSettings { @Nullable @Override public Configurable createConfigurable(@NotNull Category category) { + final Getter debuggerSettingsGetter = new Getter() { + @Override + public DebuggerSettings get() { + return DebuggerSettings.getInstance(); + } + }; + switch (category) { case ROOT: - return new DebuggerLaunchingConfigurable(); + return SimpleConfigurable.create("reference.idesettings.debugger.launching", OptionsBundle.message("options.java.display.name"), + DebuggerLaunchingConfigurable.class, debuggerSettingsGetter); case DATA_VIEWS: return new DebuggerDataViewsConfigurable(null); case STEPPING: - return new DebuggerSteppingConfigurable(); + return SimpleConfigurable.create("reference.idesettings.debugger.stepping", OptionsBundle.message("options.java.display.name"), DebuggerSteppingConfigurable.class, debuggerSettingsGetter); } return null; } diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java index 53dd21b8e061..af88eaa9a062 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java @@ -831,6 +831,7 @@ public class SingleInspectionProfilePanel extends JPanel { final ToolbarDecorator wrappedTable = ToolbarDecorator.createDecorator(scopesAndScopesAndSeveritiesTable); final JPanel panel = wrappedTable.createPanel(); + panel.setMinimumSize(new Dimension(getMinimumSize().width, 3 * scopesAndScopesAndSeveritiesTable.getRowHeight())); severityPanel.add(new JBLabel("Scopes & Severities"), new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 10), 0, 0)); diff --git a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java index 1bbd74984fcc..c8699c083ef4 100644 --- a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java +++ b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java @@ -952,25 +952,18 @@ public class IdeEventQueue extends EventQueue { } private static class WindowsAltSupressor implements EventDispatcher { - - private boolean myPureAltWasPressed; private boolean myWaitingForAltRelease; - private boolean myWaiterScheduled; - private Robot myRobot; @Override public boolean dispatch(AWTEvent e) { boolean dispatch = true; - if (!Registry.is("actionSystem.win.suppressAlt.new") && e instanceof KeyEvent) { + if (e instanceof KeyEvent) { KeyEvent ke = (KeyEvent)e; final Component component = ke.getComponent(); - final Window window = component == null ? null : SwingUtilities.windowForComponent(component); boolean pureAlt = ke.getKeyCode() == KeyEvent.VK_ALT && (ke.getModifiers() | InputEvent.ALT_MASK) == InputEvent.ALT_MASK; if (!pureAlt) { - myPureAltWasPressed = false; myWaitingForAltRelease = false; - myWaiterScheduled = false; } else { if (ApplicationManager.getApplication() == null || @@ -978,28 +971,25 @@ public class IdeEventQueue extends EventQueue { !SystemInfo.isWindows || !Registry.is("actionSystem.win.suppressAlt") || !(UISettings.getInstance().HIDE_TOOL_STRIPES || UISettings.getInstance().PRESENTATION_MODE)) { - return !dispatch; + return true; } if (ke.getID() == KeyEvent.KEY_PRESSED) { - myPureAltWasPressed = true; dispatch = !myWaitingForAltRelease; } else if (ke.getID() == KeyEvent.KEY_RELEASED) { if (myWaitingForAltRelease) { - myPureAltWasPressed = false; myWaitingForAltRelease = false; - myWaiterScheduled = false; dispatch = false; } - else { - myWaiterScheduled = true; + else if (component != null) { //noinspection SSBasedInspection SwingUtilities.invokeLater(new Runnable() { @Override public void run() { try { - if (SystemInfo.isWindows || window == null || !window.isActive()) { + final Window window = component instanceof Window ? (Window)component : SwingUtilities.windowForComponent(component); + if (window == null || !window.isActive()) { return; } myWaitingForAltRelease = true; diff --git a/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableBase.java b/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableBase.java index 104dc7b30ec7..d7c7dca2f19b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableBase.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableBase.java @@ -1,18 +1,64 @@ +/* + * Copyright 2000-2014 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.openapi.options; +import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; public abstract class ConfigurableBase, S> implements SearchableConfigurable, Configurable.NoScroll { + private final String id; + private final String displayName; + private final String helpTopic; + private UI ui; + protected ConfigurableBase(@NotNull String id, @NotNull String displayName, @Nullable String helpTopic) { + this.id = id; + this.displayName = displayName; + this.helpTopic = helpTopic; + } + + @NotNull + @Override + public final String getId() { + return id; + } + + @Nls + @Override + public final String getDisplayName() { + return displayName; + } + + @Nullable + @Override + public final String getHelpTopic() { + return helpTopic; + } + @Nullable @Override public Runnable enableSearch(String option) { return null; } + @NotNull protected abstract S getSettings(); @Override diff --git a/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableUi.java b/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableUi.java index e454099318ea..0ecb19a7ce8e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableUi.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableUi.java @@ -1,3 +1,18 @@ +/* + * Copyright 2000-2014 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.openapi.options; import org.jetbrains.annotations.NotNull; diff --git a/platform/platform-impl/src/com/intellij/openapi/options/SimpleConfigurable.java b/platform/platform-impl/src/com/intellij/openapi/options/SimpleConfigurable.java new file mode 100644 index 000000000000..9812165932a2 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/openapi/options/SimpleConfigurable.java @@ -0,0 +1,52 @@ +/* + * Copyright 2000-2014 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.openapi.options; + +import com.intellij.openapi.util.Getter; +import com.intellij.util.ReflectionUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public final class SimpleConfigurable, S> extends ConfigurableBase { + private final Class uiClass; + private final Getter settingsGetter; + + private SimpleConfigurable(@NotNull String id, @NotNull String displayName, @Nullable String helpTopic, @NotNull Class uiClass, @NotNull Getter settingsGetter) { + super(id, displayName, helpTopic); + + this.uiClass = uiClass; + this.settingsGetter = settingsGetter; + } + + public static , S> SimpleConfigurable create(@NotNull String id, @NotNull String displayName, @Nullable String helpTopic, @NotNull Class uiClass, @NotNull Getter settingsGetter) { + return new SimpleConfigurable(id, displayName, helpTopic, uiClass, settingsGetter); + } + + public static , S> SimpleConfigurable create(@NotNull String id, @NotNull String displayName, @NotNull Class uiClass, @NotNull Getter settingsGetter) { + return create(id, displayName, id, uiClass, settingsGetter); + } + + @NotNull + @Override + protected S getSettings() { + return settingsGetter.get(); + } + + @Override + protected UI createUi() { + return ReflectionUtil.newInstance(uiClass); + } +} \ No newline at end of file diff --git a/platform/util/src/com/intellij/util/ReflectionUtil.java b/platform/util/src/com/intellij/util/ReflectionUtil.java index a4bf4318a76e..1e3f8425ad46 100644 --- a/platform/util/src/com/intellij/util/ReflectionUtil.java +++ b/platform/util/src/com/intellij/util/ReflectionUtil.java @@ -426,6 +426,25 @@ public class ReflectionUtil { } } + /** + * {@link Class#newInstance()} cannot instantiate private classes + */ + public static T newInstance(@NotNull Class aClass) { + try { + Constructor constructor = aClass.getDeclaredConstructor(); + try { + constructor.setAccessible(true); + } + catch (SecurityException e) { + return aClass.newInstance(); + } + return constructor.newInstance(); + } + catch (Exception e) { + throw new RuntimeException(e); + } + } + @NotNull public static T createInstance(@NotNull Constructor constructor, @NotNull Object... args) { try { diff --git a/platform/util/src/com/intellij/util/xmlb/XmlSerializerImpl.java b/platform/util/src/com/intellij/util/xmlb/XmlSerializerImpl.java index c25ea4eda084..6cc2124c695a 100644 --- a/platform/util/src/com/intellij/util/xmlb/XmlSerializerImpl.java +++ b/platform/util/src/com/intellij/util/xmlb/XmlSerializerImpl.java @@ -16,13 +16,13 @@ package com.intellij.util.xmlb; import com.intellij.openapi.util.Pair; +import com.intellij.util.ReflectionUtil; import org.jdom.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.lang.annotation.Annotation; import java.lang.ref.SoftReference; -import java.lang.reflect.Constructor; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.*; @@ -184,16 +184,9 @@ class XmlSerializerImpl { /** * {@link Class#newInstance()} cannot instantiate private classes */ - static T newInstance(Class aClass) { + static T newInstance(@NotNull Class aClass) { try { - Constructor constructor = aClass.getDeclaredConstructor(); - try { - constructor.setAccessible(true); - } - catch (SecurityException e) { - return aClass.newInstance(); - } - return constructor.newInstance(); + return ReflectionUtil.newInstance(aClass); } catch (Exception e) { throw new XmlSerializationException(e); diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/GeneralConfigurable.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/GeneralConfigurable.java deleted file mode 100644 index 466279bce977..000000000000 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/GeneralConfigurable.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2000-2014 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.xdebugger.impl.settings; - -import com.intellij.openapi.options.ConfigurableBase; -import org.jetbrains.annotations.Nls; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -class GeneralConfigurable extends ConfigurableBase { - @Override - protected XDebuggerGeneralSettings getSettings() { - return XDebuggerSettingsManager.getInstanceImpl().getGeneralSettings(); - } - - @Override - protected GeneralConfigurableUi createUi() { - return new GeneralConfigurableUi(); - } - - @NotNull - @Override - public String getId() { - return "debugger.general"; - } - - @Nls - @Override - public String getDisplayName() { - return ""; - } - - @Nullable - @Override - public String getHelpTopic() { - return null; - } -} \ No newline at end of file diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/XDebuggerSettingsPanelProviderImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/XDebuggerSettingsPanelProviderImpl.java index 2e20230198c6..bfc4194a3e02 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/XDebuggerSettingsPanelProviderImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/XDebuggerSettingsPanelProviderImpl.java @@ -16,6 +16,8 @@ package com.intellij.xdebugger.impl.settings; import com.intellij.openapi.options.Configurable; +import com.intellij.openapi.options.SimpleConfigurable; +import com.intellij.openapi.util.Getter; import com.intellij.util.SmartList; import com.intellij.util.containers.ContainerUtil; import com.intellij.xdebugger.settings.XDebuggerSettings; @@ -43,7 +45,12 @@ public class XDebuggerSettingsPanelProviderImpl extends DebuggerSettingsPanelPro public Collection getConfigurable(@NotNull XDebuggerSettings.Category category) { List list; if (category == XDebuggerSettings.Category.ROOT) { - list = new SmartList(new GeneralConfigurable()); + list = new SmartList(SimpleConfigurable.create("debugger.general", "", GeneralConfigurableUi.class, new Getter() { + @Override + public XDebuggerGeneralSettings get() { + return XDebuggerSettingsManager.getInstanceImpl().getGeneralSettings(); + } + })); } else { list = null; diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyDebuggerSettings.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyDebuggerSettings.java index 273fd4cb8531..5c4faa54a46e 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyDebuggerSettings.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyDebuggerSettings.java @@ -19,11 +19,14 @@ import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.openapi.components.StoragePathMacros; import com.intellij.openapi.options.Configurable; +import com.intellij.openapi.options.SimpleConfigurable; +import com.intellij.openapi.util.Getter; import com.intellij.openapi.util.registry.Registry; import com.intellij.util.xmlb.XmlSerializerUtil; import com.intellij.xdebugger.settings.XDebuggerSettings; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.plugins.groovy.GroovyBundle; /** * @author ilyas @@ -35,7 +38,7 @@ import org.jetbrains.annotations.Nullable; file = StoragePathMacros.APP_CONFIG + "/groovy_debug.xml" )} ) -public class GroovyDebuggerSettings extends XDebuggerSettings { +public class GroovyDebuggerSettings extends XDebuggerSettings implements Getter { public Boolean DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS = true; public boolean ENABLE_GROOVY_HOTSWAP = Registry.is("enable.groovy.hotswap"); @@ -53,7 +56,7 @@ public class GroovyDebuggerSettings extends XDebuggerSettings { - @Override - protected GroovyDebuggerSettings getSettings() { - return GroovyDebuggerSettings.getInstance(); - } - - @Override - protected GroovySteppingConfigurableUi createUi() { - return new GroovySteppingConfigurableUi(); - } - - @NotNull - @Override - public String getId() { - return "debugger.stepping.groovy"; - } - - @Nls - @Override - public String getDisplayName() { - return GroovyBundle.message("groovy.debug.caption"); - } - - @Nullable - @Override - public String getHelpTopic() { - return "reference.idesettings.debugger.groovy"; - } -} \ No newline at end of file diff --git a/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurationModel.java b/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurationModel.java index fe5a13181ab9..9f04e6ac30bf 100644 --- a/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurationModel.java +++ b/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurationModel.java @@ -172,7 +172,7 @@ public class JUnitConfigurationModel { final JUnitConfiguration.Data data = configuration.getPersistentData(); setTestType(data.TEST_OBJECT); setJUnitTextValue(ALL_IN_PACKAGE, data.getPackageName()); - setJUnitTextValue(CLASS, data.getMainClassName().replaceAll("\\$", "\\.")); + setJUnitTextValue(CLASS, data.getMainClassName() != null ? data.getMainClassName().replaceAll("\\$", "\\.") : ""); setJUnitTextValue(METHOD, data.getMethodName()); setJUnitTextValue(PATTERN, data.getPatternPresentation()); setJUnitTextValue(DIR, data.getDirName()); diff --git a/plugins/tasks/tasks-tests/test/com/intellij/tasks/integration/live/TrelloIntegrationTest.java b/plugins/tasks/tasks-tests/test/com/intellij/tasks/integration/live/TrelloIntegrationTest.java index 3da6ad3d82d7..2f93b83bef09 100644 --- a/plugins/tasks/tasks-tests/test/com/intellij/tasks/integration/live/TrelloIntegrationTest.java +++ b/plugins/tasks/tasks-tests/test/com/intellij/tasks/integration/live/TrelloIntegrationTest.java @@ -29,16 +29,20 @@ public class TrelloIntegrationTest extends LiveIntegrationTestCase