summaryrefslogtreecommitdiff
path: root/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters')
-rw-r--r--plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerClassFilterProvider.java41
-rw-r--r--plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettings.java66
-rw-r--r--plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.form53
-rw-r--r--plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.java106
4 files changed, 0 insertions, 266 deletions
diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerClassFilterProvider.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerClassFilterProvider.java
deleted file mode 100644
index 34830b9a8988..000000000000
--- a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerClassFilterProvider.java
+++ /dev/null
@@ -1,41 +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 org.jetbrains.plugins.groovy.debugger.filters;
-
-import com.intellij.ui.classFilter.ClassFilter;
-import com.intellij.ui.classFilter.DebuggerClassFilterProvider;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author ilyas
- */
-public class GroovyDebuggerClassFilterProvider implements DebuggerClassFilterProvider {
- private static final List<ClassFilter> FILTERS = Arrays.asList(new ClassFilter("org.codehaus.groovy.*"), new ClassFilter("groovy.*"));
-
- @Override
- public List<ClassFilter> getFilters() {
- GroovyDebuggerSettings settings = GroovyDebuggerSettings.getInstance();
- Boolean flag = settings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS;
- if (flag == null || flag.booleanValue()) {
- return FILTERS;
- }
- return Collections.emptyList();
- }
-
-}
diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettings.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettings.java
deleted file mode 100644
index dbadd515c140..000000000000
--- a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettings.java
+++ /dev/null
@@ -1,66 +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 org.jetbrains.plugins.groovy.debugger.filters;
-
-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.util.registry.Registry;
-import com.intellij.util.xmlb.XmlSerializerUtil;
-import com.intellij.xdebugger.settings.XDebuggerSettings;
-import org.jetbrains.annotations.NotNull;
-
-/**
- * @author ilyas
- */
-@State(
- name = "GroovyDebuggerSettings",
- storages = {
- @Storage(
- file = StoragePathMacros.APP_CONFIG + "/groovy_debug.xml"
- )}
-)
-public class GroovyDebuggerSettings extends XDebuggerSettings<GroovyDebuggerSettings> {
-
- public Boolean DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS = true;
- public boolean ENABLE_GROOVY_HOTSWAP = Registry.is("enable.groovy.hotswap");
-
- public GroovyDebuggerSettings() {
- super("groovy_debugger");
- }
-
- @Override
- @NotNull
- public Configurable createConfigurable() {
- return new GroovyDebuggerSettingsConfigurable(this);
- }
-
- @Override
- public GroovyDebuggerSettings getState() {
- return this;
- }
-
- @Override
- public void loadState(final GroovyDebuggerSettings state) {
- XmlSerializerUtil.copyBean(state, this);
- }
-
- public static GroovyDebuggerSettings getInstance() {
- return getInstance(GroovyDebuggerSettings.class);
- }
-
-}
diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.form b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.form
deleted file mode 100644
index a91ac8c1dae7..000000000000
--- a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.form
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.plugins.groovy.debugger.filters.GroovyDebuggerSettingsConfigurable">
- <grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <xy x="20" y="20" width="661" height="400"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <component id="84a2f" class="javax.swing.JCheckBox" binding="myIgnoreGroovyMethods">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text resource-bundle="org/jetbrains/plugins/groovy/GroovyBundle" key="groovy.debug.disable.specific.methods"/>
- </properties>
- </component>
- <vspacer id="30909">
- <constraints>
- <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
- </constraints>
- </vspacer>
- <component id="908a2" class="com.intellij.ui.components.JBLabel">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="3" use-parent-layout="false"/>
- </constraints>
- <properties>
- <componentStyle value="SMALL"/>
- <text value="May cause serialization issues in the debugged application"/>
- </properties>
- </component>
- <grid id="bd4f0" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="2" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <component id="ac312" class="javax.swing.JCheckBox" binding="myEnableHotSwap">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Enable &amp;hot-swap agent for Groovy code"/>
- </properties>
- </component>
- </children>
- </grid>
- </children>
- </grid>
-</form>
diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.java
deleted file mode 100644
index 4638aca4bdc9..000000000000
--- a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/filters/GroovyDebuggerSettingsConfigurable.java
+++ /dev/null
@@ -1,106 +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 org.jetbrains.plugins.groovy.debugger.filters;
-
-import com.intellij.openapi.options.ConfigurationException;
-import com.intellij.openapi.options.SearchableConfigurable;
-import org.jetbrains.annotations.Nls;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.plugins.groovy.GroovyBundle;
-
-import javax.swing.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-/**
- * @author ilyas
- */
-public class GroovyDebuggerSettingsConfigurable implements SearchableConfigurable {
- private JCheckBox myIgnoreGroovyMethods;
- private JPanel myPanel;
- private JCheckBox myEnableHotSwap;
- private boolean isModified = false;
- private final GroovyDebuggerSettings mySettings;
-
- public GroovyDebuggerSettingsConfigurable(final GroovyDebuggerSettings settings) {
- mySettings = settings;
- final Boolean flag = settings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS;
- myIgnoreGroovyMethods.setSelected(flag == null || flag.booleanValue());
- myIgnoreGroovyMethods.setSelected(mySettings.ENABLE_GROOVY_HOTSWAP);
-
- ActionListener listener = new ActionListener() {
- @Override
- public void actionPerformed(final ActionEvent e) {
- isModified = mySettings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS.booleanValue() != myIgnoreGroovyMethods.isSelected() ||
- mySettings.ENABLE_GROOVY_HOTSWAP != myEnableHotSwap.isSelected();
- }
- };
- myIgnoreGroovyMethods.addActionListener(listener);
- myEnableHotSwap.addActionListener(listener);
- }
-
- @Override
- @Nls
- public String getDisplayName() {
- return GroovyBundle.message("groovy.debug.caption");
- }
-
- @Override
- public String getHelpTopic() {
- return "reference.idesettings.debugger.groovy";
- }
-
- @Override
- @NotNull
- public String getId() {
- return getHelpTopic();
- }
-
- @Override
- public Runnable enableSearch(String option) {
- return null;
- }
-
- @Override
- public JComponent createComponent() {
- return myPanel;
- }
-
- @Override
- public boolean isModified() {
- return isModified;
- }
-
- @Override
- public void apply() throws ConfigurationException {
- if (isModified) {
- mySettings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS = myIgnoreGroovyMethods.isSelected();
- mySettings.ENABLE_GROOVY_HOTSWAP = myEnableHotSwap.isSelected();
- }
- isModified = false;
- }
-
- @Override
- public void reset() {
- final Boolean flag = mySettings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS;
- myIgnoreGroovyMethods.setSelected(flag == null || flag.booleanValue());
- myEnableHotSwap.setSelected(mySettings.ENABLE_GROOVY_HOTSWAP);
- }
-
- @Override
- public void disposeUIResources() {
- }
-}