aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2014-02-13 16:09:27 (EST)
committerMike Rennie2014-02-13 16:09:27 (EST)
commitd4649484ee4000714f673b5f272aeb14ed781f7e (patch)
treed9b7946334dc89bc4932fe22f94a6f6d35adb8b6
parent944a95dc0a0f3667ce1e6cb90be15f18b5a5b2b8 (diff)
downloadeclipse.jdt.debug-d4649484ee4000714f673b5f272aeb14ed781f7e.zip
eclipse.jdt.debug-d4649484ee4000714f673b5f272aeb14ed781f7e.tar.gz
eclipse.jdt.debug-d4649484ee4000714f673b5f272aeb14ed781f7e.tar.bz2
Bug 427075 - [1.8] Unable to set breakpoint in interface methodsP20140219-1600P20140218-1600P20140217-1600P20140216-1600P20140215-1600
Change-Id: Ic291be9d89f0a5555b8663fdeedbfac8db985a25 Signed-off-by: Sarika Sinha <sarika.sinha@in.ibm.com>
-rw-r--r--org.eclipse.jdt.debug.tests/JDT Debug Test Suite.launch88
-rw-r--r--org.eclipse.jdt.debug.tests/java8/EvalTestIntf18.java36
-rw-r--r--org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java9
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java8
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java134
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java102
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java127
-rw-r--r--org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.java3
-rw-r--r--org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.properties5
-rw-r--r--org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java56
10 files changed, 402 insertions, 166 deletions
diff --git a/org.eclipse.jdt.debug.tests/JDT Debug Test Suite.launch b/org.eclipse.jdt.debug.tests/JDT Debug Test Suite.launch
index b30c1ed..4114f71 100644
--- a/org.eclipse.jdt.debug.tests/JDT Debug Test Suite.launch
+++ b/org.eclipse.jdt.debug.tests/JDT Debug Test Suite.launch
@@ -1,44 +1,44 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../debug-junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jdt.debug.tests.AutomatedSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jdt.debug.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx384m -XX:MaxPermSize=128M"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.team.cvs.core@default:default,com.jcraft.jsch@default:default,org.eclipse.core.commands@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.apache.jasper@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.jsch.core@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.help@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.help.base@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.mortbay.jetty.util@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.core.filesystem.linux.x86@default:false,org.sat4j.pb@default:default,org.eclipse.platform@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.pde.ds.ui@default:default,org.apache.commons.logging@default:default,org.eclipse.equinox.common@default:default,org.eclipse.pde@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.core.net@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.rcp@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.update.scheduler@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.sdk@default:default,org.eclipse.swt@default:default,org.eclipse.ui.views@default:default,org.apache.commons.codec@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.compare.core@default:default,org.eclipse.update.core@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.core.expressions@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.osgi.services@default:default,org.eclipse.help.appserver@default:default,org.eclipse.update.ui@default:default,org.eclipse.core.runtime.compatibility@default:default,org.mortbay.jetty.server@default:default,org.junit@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.cvs@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jface.text@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.ide.application@default:default,org.eclipse.team.core@default:default,org.eclipse.equinox.registry@default:default,org.junit4@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.frameworkadmin@default:default,com.api.tools.buildnotes.nl@default:false,org.eclipse.team.cvs.ssh@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.pde.ds.core@default:default,org.apache.ant@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.search@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.apache.commons.httpclient@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ui.intro@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.resources@default:default,javax.servlet@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.ui@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.core.net.linux.x86@default:false,javax.servlet.jsp@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,com.ibm.icu@default:default,org.eclipse.core.boot@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.osgi.util@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.equinox.launcher@default:default,org.apache.lucene.analysis@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.jetty@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.ui.presentations.r21@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.update.configurator@default:default,org.eclipse.osgi@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.ui@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.team.ui@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ecf@default:default,org.eclipse.update.core.linux@default:false,org.eclipse.jdt@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.metadata@default:default,org.apache.lucene@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.jobs@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.simpleconfigurator@default:default,org.eclipse.equinox.p2.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.jdt.core.tests.compiler@default:default,org.eclipse.example.mixedmode@default:default,org.eclipse.debug.examples.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.ant.ui@default:default,org.eclipse.jdt.core.tests.builder@default:default,org.eclipse.debug.util@default:default,org.eclipse.platform.doc.user@default:default,com.api.tools.buildnotes.nl@default:false,org.eclipse.jdt.doc.isv@default:default,org.eclipse.ui.console@default:default,org.eclipse.debug.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.jdt.ui.examples.javafamily@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.debug.tests@default:default,org.eclipse.debug.examples.core@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.launching@default:default,refproject@default:default,org.eclipse.ant.tests.ui@default:default,org.eclipse.debug.core@default:default,org.eclipse.ant.tests.core@default:default,org.eclipse.core.variables@default:default,Testing@default:default,com.api.tools.buildnotes@default:default,org.eclipse.test.performance@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.pde.api.tools.ui@default:default,usagetests@default:default,org.eclipse.pde.api.tools.tests@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../debug-junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jdt.debug.tests.AutomatedSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jdt.debug.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx384m -XX:MaxPermSize=128M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.team.cvs.core@default:default,com.jcraft.jsch@default:default,org.eclipse.core.commands@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.apache.jasper@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.jsch.core@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.help@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.help.base@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.mortbay.jetty.util@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.core.filesystem.linux.x86@default:false,org.sat4j.pb@default:default,org.eclipse.platform@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.pde.ds.ui@default:default,org.apache.commons.logging@default:default,org.eclipse.equinox.common@default:default,org.eclipse.pde@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.core.net@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.rcp@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.update.scheduler@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.sdk@default:default,org.eclipse.swt@default:default,org.eclipse.ui.views@default:default,org.apache.commons.codec@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.compare.core@default:default,org.eclipse.update.core@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.core.expressions@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.osgi.services@default:default,org.eclipse.help.appserver@default:default,org.eclipse.update.ui@default:default,org.eclipse.core.runtime.compatibility@default:default,org.mortbay.jetty.server@default:default,org.junit@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.cvs@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jface.text@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.ide.application@default:default,org.eclipse.team.core@default:default,org.eclipse.equinox.registry@default:default,org.junit4@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.frameworkadmin@default:default,com.api.tools.buildnotes.nl@default:false,org.eclipse.team.cvs.ssh@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.pde.ds.core@default:default,org.apache.ant@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.search@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.apache.commons.httpclient@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ui.intro@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.resources@default:default,javax.servlet@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.ui@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.core.net.linux.x86@default:false,javax.servlet.jsp@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,com.ibm.icu@default:default,org.eclipse.core.boot@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.osgi.util@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.equinox.launcher@default:default,org.apache.lucene.analysis@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.jetty@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.ui.presentations.r21@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.update.configurator@default:default,org.eclipse.osgi@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.ui@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.team.ui@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ecf@default:default,org.eclipse.update.core.linux@default:false,org.eclipse.jdt@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.metadata@default:default,org.apache.lucene@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.jobs@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.simpleconfigurator@default:default,org.eclipse.equinox.p2.core@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.jdt.core.tests.compiler@default:default,org.eclipse.example.mixedmode@default:default,org.eclipse.debug.examples.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.ant.ui@default:default,org.eclipse.jdt.core.tests.builder@default:default,org.eclipse.debug.util@default:default,org.eclipse.platform.doc.user@default:default,com.api.tools.buildnotes.nl@default:false,org.eclipse.jdt.doc.isv@default:default,org.eclipse.ui.console@default:default,org.eclipse.debug.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.jdt.ui.examples.javafamily@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.debug.tests@default:default,org.eclipse.debug.examples.core@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.launching@default:default,refproject@default:default,org.eclipse.ant.tests.ui@default:default,org.eclipse.debug.core@default:default,org.eclipse.ant.tests.core@default:default,org.eclipse.core.variables@default:default,Testing@default:default,com.api.tools.buildnotes@default:default,org.eclipse.test.performance@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.pde.api.tools.ui@default:default,usagetests@default:default,org.eclipse.pde.api.tools.tests@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/org.eclipse.jdt.debug.tests/java8/EvalTestIntf18.java b/org.eclipse.jdt.debug.tests/java8/EvalTestIntf18.java
new file mode 100644
index 0000000..af8a9cc
--- /dev/null
+++ b/org.eclipse.jdt.debug.tests/java8/EvalTestIntf18.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+public class EvalTestIntf18 {
+ public static void main(String[] args) {
+ IntfImpl intf18 = new IntfImpl();
+ intf18.test2();
+ System.out.println("main");
+ }
+ }
+
+ interface Intf18 {
+ public void test1();
+ default int test2() {
+ int a = 1;
+ System.out.println("a+2 = " + a + 2);
+ return a + 2;
+ }
+ static void test3() {
+ System.out.println("test3");
+ }
+ }
+
+ class IntfImpl implements Intf18 {
+ public void test1(){
+ System.out.println("test1");
+ }
+ }
+
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
index e47d0b8..7f4303f 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
@@ -88,6 +88,15 @@ public class JavaProjectHelper {
public static final String JRE_CONTAINER_NAME = "org.eclipse.jdt.launching.JRE_CONTAINER";
+
+ /**
+ * Returns if the currently running VM is version compatible with Java 8
+ *
+ * @return <code>true</code> if a Java 8 (or greater) VM is running <code>false</code> otherwise
+ */
+ public static boolean isJava8Compatible() {
+ return isCompatible(8);
+ }
/**
* Returns if the currently running VM is version compatible with Java 7
*
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
index cbc900c..4736318 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ import org.eclipse.jdt.debug.testplugin.JavaProjectHelper;
import org.eclipse.jdt.debug.tests.breakpoints.BreakpointListenerTests;
import org.eclipse.jdt.debug.tests.breakpoints.BreakpointLocationVerificationTests;
import org.eclipse.jdt.debug.tests.breakpoints.BreakpointWorkingSetTests;
-import org.eclipse.jdt.debug.tests.breakpoints.ConditionalBreakpointsWithGenerics;
import org.eclipse.jdt.debug.tests.breakpoints.ConditionalBreakpointsTests;
+import org.eclipse.jdt.debug.tests.breakpoints.ConditionalBreakpointsWithGenerics;
import org.eclipse.jdt.debug.tests.breakpoints.DeferredBreakpointTests;
import org.eclipse.jdt.debug.tests.breakpoints.ExceptionBreakpointTests;
import org.eclipse.jdt.debug.tests.breakpoints.HitCountBreakpointsTests;
@@ -38,6 +38,7 @@ import org.eclipse.jdt.debug.tests.breakpoints.RunToLineTests;
import org.eclipse.jdt.debug.tests.breakpoints.SuspendVMBreakpointsTests;
import org.eclipse.jdt.debug.tests.breakpoints.TargetPatternBreakpointTests;
import org.eclipse.jdt.debug.tests.breakpoints.TestToggleBreakpointsTarget;
+import org.eclipse.jdt.debug.tests.breakpoints.TestToggleBreakpointsTarget8;
import org.eclipse.jdt.debug.tests.breakpoints.ThreadFilterBreakpointsTests;
import org.eclipse.jdt.debug.tests.breakpoints.WatchpointTests;
import org.eclipse.jdt.debug.tests.console.IOConsoleTests;
@@ -182,6 +183,9 @@ public class AutomatedSuite extends DebugSuite {
addTest(new TestSuite(BreakpointLocationVerificationTests.class));
addTest(new TestSuite(RunToLineTests.class));
addTest(new TestSuite(TestToggleBreakpointsTarget.class));
+ if (JavaProjectHelper.isJava8Compatible()) {
+ addTest(new TestSuite(TestToggleBreakpointsTarget8.class));
+ }
if (JavaProjectHelper.isJava5Compatible()) {
addTest(new TestSuite(MethodBreakpointTests15.class));
addTest(new TestSuite(TestIntegerAccessUnboxing15.class));
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java
new file mode 100644
index 0000000..7e8ac86
--- /dev/null
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.debug.tests.breakpoints;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.core.IBreakpointListener;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
+import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
+import org.eclipse.jdt.debug.testplugin.JavaTestPlugin;
+import org.eclipse.jdt.debug.tests.AbstractDebugTest;
+import org.eclipse.jdt.internal.debug.ui.LocalFileStorageEditorInput;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Tests the Java debugger's 'toggle breakpoints target'.
+ */
+public abstract class AbstractToggleBreakpointsTarget extends AbstractDebugTest {
+
+ class Listener implements IBreakpointListener {
+
+ List<IBreakpoint> added = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> removed = new ArrayList<IBreakpoint>();
+
+ public void breakpointAdded(IBreakpoint breakpoint) {
+ synchronized (added) {
+ added.add(breakpoint);
+ added.notifyAll();
+ }
+ }
+
+ public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
+ synchronized (removed) {
+ removed.add(breakpoint);
+ removed.notifyAll();
+ }
+ }
+
+ public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
+ }
+
+ public IBreakpoint getAdded() throws Exception {
+ synchronized (added) {
+ if (added.isEmpty()) {
+ added.wait(DEFAULT_TIMEOUT);
+ }
+ }
+ assertFalse("Breakpoint not added", added.isEmpty());
+ return added.get(0);
+ }
+
+ public boolean isEmpty() throws Exception{
+ synchronized (added) {
+ if (added.isEmpty()) {
+ added.wait(DEFAULT_TIMEOUT);
+ return true;
+ }
+ }
+ return false;
+
+ }
+
+ public IBreakpoint getRemoved() throws Exception {
+ synchronized (removed) {
+ if (removed.isEmpty()) {
+ removed.wait(DEFAULT_TIMEOUT);
+ }
+ }
+ assertFalse("Breakpoint not removed", removed.isEmpty());
+ return removed.get(0);
+ }
+
+
+ }
+
+ public AbstractToggleBreakpointsTarget(String name) {
+ super(name);
+ }
+
+
+ /**
+ * Opens an editor on the given external file and toggles a breakpoint.
+ *
+ * @param externalFile path to external file in the test plug-in
+ * @param line line number (1 based)
+ * @throws Exception on failure
+ */
+ protected void toggleBreakpoint(final IPath externalFile, final int line) throws Exception {
+ final Exception[] exs = new Exception[1];
+ DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() {
+ public void run() {
+ try {
+ File file = JavaTestPlugin.getDefault().getFileInPlugin(externalFile);
+ LocalFileStorage storage = new LocalFileStorage(file);
+ IEditorPart editor = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage().openEditor(new LocalFileStorageEditorInput(storage), JavaUI.ID_CU_EDITOR);
+ ITextEditor textEditor = (ITextEditor) editor;
+ IEditorInput editorInput = textEditor.getEditorInput();
+ IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ IDocument document = documentProvider.getDocument(editorInput);
+ int offset = document.getLineOffset(line);
+ IToggleBreakpointsTargetExtension toggle = (IToggleBreakpointsTargetExtension) editor.getAdapter(IToggleBreakpointsTarget.class);
+ toggle.toggleBreakpoints(editor, new TextSelection(document, offset, 0));
+ } catch (Exception e) {
+ exs[0] = e;
+ }
+ }
+ });
+ if (exs[0] != null) {
+ throw exs[0];
+ }
+ }
+
+}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java
index 5afdf2d..5099803 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,83 +10,17 @@
*******************************************************************************/
package org.eclipse.jdt.debug.tests.breakpoints;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.IBreakpointListener;
import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
import org.eclipse.jdt.debug.core.IJavaWatchpoint;
-import org.eclipse.jdt.debug.testplugin.JavaTestPlugin;
-import org.eclipse.jdt.debug.tests.AbstractDebugTest;
-import org.eclipse.jdt.internal.debug.ui.LocalFileStorageEditorInput;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
/**
* Tests the Java debugger's 'toggle breakpoints target'.
*/
-public class TestToggleBreakpointsTarget extends AbstractDebugTest {
-
- class Listener implements IBreakpointListener {
-
- List<IBreakpoint> added = new ArrayList<IBreakpoint>();
- List<IBreakpoint> removed = new ArrayList<IBreakpoint>();
-
- public void breakpointAdded(IBreakpoint breakpoint) {
- synchronized (added) {
- added.add(breakpoint);
- added.notifyAll();
- }
- }
-
- public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
- synchronized (removed) {
- removed.add(breakpoint);
- removed.notifyAll();
- }
- }
-
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
- }
-
- public IBreakpoint getAdded() throws Exception {
- synchronized (added) {
- if (added.isEmpty()) {
- added.wait(DEFAULT_TIMEOUT);
- }
- }
- assertFalse("Breakpoint not added", added.isEmpty());
- return added.get(0);
- }
-
- public IBreakpoint getRemoved() throws Exception {
- synchronized (removed) {
- if (removed.isEmpty()) {
- removed.wait(DEFAULT_TIMEOUT);
- }
- }
- assertFalse("Breakpoint not removed", removed.isEmpty());
- return removed.get(0);
- }
-
-
- }
+public class TestToggleBreakpointsTarget extends AbstractToggleBreakpointsTarget {
public TestToggleBreakpointsTarget(String name) {
super(name);
@@ -167,36 +101,4 @@ public class TestToggleBreakpointsTarget extends AbstractDebugTest {
}
}
- /**
- * Opens an editor on the given external file and toggles a breakpoint.
- *
- * @param externalFile path to external file in the test plug-in
- * @param line line number (1 based)
- * @throws Exception on failure
- */
- protected void toggleBreakpoint(final IPath externalFile, final int line) throws Exception {
- final Exception[] exs = new Exception[1];
- DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- try {
- File file = JavaTestPlugin.getDefault().getFileInPlugin(externalFile);
- LocalFileStorage storage = new LocalFileStorage(file);
- IEditorPart editor = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage().openEditor(new LocalFileStorageEditorInput(storage), JavaUI.ID_CU_EDITOR);
- ITextEditor textEditor = (ITextEditor) editor;
- IEditorInput editorInput = textEditor.getEditorInput();
- IDocumentProvider documentProvider = textEditor.getDocumentProvider();
- IDocument document = documentProvider.getDocument(editorInput);
- int offset = document.getLineOffset(line);
- IToggleBreakpointsTargetExtension toggle = (IToggleBreakpointsTargetExtension) editor.getAdapter(IToggleBreakpointsTarget.class);
- toggle.toggleBreakpoints(editor, new TextSelection(document, offset, 0));
- } catch (Exception e) {
- exs[0] = e;
- }
- }
- });
- if (exs[0] != null) {
- throw exs[0];
- }
- }
-
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java
new file mode 100644
index 0000000..59394df
--- /dev/null
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.debug.tests.breakpoints;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
+
+/**
+ * Tests the Java debugger's 'toggle breakpoints target'.
+ */
+public class TestToggleBreakpointsTarget8 extends AbstractToggleBreakpointsTarget {
+
+
+
+
+ public TestToggleBreakpointsTarget8(String name) {
+ super(name);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * Tests that qualified names get created for method breakpoints in default method of Java 8 interface
+ * files.
+ *
+ * @throws Exception
+ */
+ public void testInterfaceDefaultMethodBreakpoint() throws Exception {
+ Listener listener = new Listener();
+ IBreakpointManager manager = getBreakpointManager();
+ manager.addBreakpointListener(listener);
+ try {
+ Path path = new Path("java8/EvalTestIntf18.java");
+ toggleBreakpoint(path, 20); // 0 based offset in document line numbers
+ IBreakpoint added = listener.getAdded();
+ assertTrue("Should be a method breakpoint", added instanceof IJavaMethodBreakpoint);
+ IJavaMethodBreakpoint breakpoint = (IJavaMethodBreakpoint) added;
+ assertEquals("Wrong type name", "Intf18", breakpoint.getTypeName());
+ assertEquals("Wrong method name", "test2", breakpoint.getMethodName());
+ assertEquals("Wrong signature", "()I", breakpoint.getMethodSignature());
+ } finally {
+ manager.removeBreakpointListener(listener);
+ removeAllBreakpoints();
+ }
+ }
+
+ /**
+ * Tests that qualified names get created for method breakpoints in Static method of Java 8 interface
+ * files.
+ *
+ * @throws Exception
+ */
+ public void testInterfaceStaticMethodBreakpoint() throws Exception {
+ Listener listener = new Listener();
+ IBreakpointManager manager = getBreakpointManager();
+ manager.addBreakpointListener(listener);
+ try {
+ Path path = new Path("java8/EvalTestIntf18.java");
+ toggleBreakpoint(path, 25); // 0 based offset in document line numbers
+ IBreakpoint added = listener.getAdded();
+ assertTrue("Should be a method breakpoint", added instanceof IJavaMethodBreakpoint);
+ IJavaMethodBreakpoint breakpoint = (IJavaMethodBreakpoint) added;
+ assertEquals("Wrong type name", "Intf18", breakpoint.getTypeName());
+ assertEquals("Wrong method name", "test3", breakpoint.getMethodName());
+ assertEquals("Wrong signature", "()V", breakpoint.getMethodSignature());
+ } finally {
+ manager.removeBreakpointListener(listener);
+ removeAllBreakpoints();
+ }
+ }
+
+
+ /**
+ * Tests that qualified names does get created for method breakpoints in unimplemented method of Java 8 interface
+ * files.
+ *
+ * @throws Exception
+ */
+ public void testInterfaceUnimplementedMethodBreakpoint() throws Exception {
+ Listener listener = new Listener();
+ IBreakpointManager manager = getBreakpointManager();
+ manager.addBreakpointListener(listener);
+ try {
+ Path path = new Path("java8/EvalTestIntf18.java");
+ toggleBreakpoint(path, 19); // 0 based offset in document line numbers
+ assertTrue(listener.isEmpty());
+ } finally {
+ manager.removeBreakpointListener(listener);
+ removeAllBreakpoints();
+ }
+ }
+
+ /**
+ * Tests that qualified names get created for line breakpoints in Interface implemented method
+ * files.
+ *
+ * @throws Exception
+ */
+ public void testInterfaceLineBreakpoint() throws Exception {
+ Listener listener = new Listener();
+ IBreakpointManager manager = getBreakpointManager();
+ manager.addBreakpointListener(listener);
+ try {
+ Path path = new Path("java8/EvalTestIntf18.java");
+ toggleBreakpoint(path, 21); // 0 based offset in document line numbers
+ IBreakpoint added = listener.getAdded();
+ assertTrue("Should be a line breakpoint", added instanceof IJavaLineBreakpoint);
+ IJavaLineBreakpoint breakpoint = (IJavaLineBreakpoint) added;
+ assertEquals("Wrong line number", 22, breakpoint.getLineNumber());
+ assertEquals("Wrong type name", "Intf18", breakpoint.getTypeName());
+ } finally {
+ manager.removeBreakpointListener(listener);
+ removeAllBreakpoints();
+ }
+ }
+
+}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.java
index 24e43b4..bb570c1 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -126,7 +126,6 @@ public class ActionMessages extends NLS {
public static String ToggleBreakpointAdapter_4;
public static String ToggleBreakpointAdapter_5;
public static String ToggleBreakpointAdapter_6;
- public static String ToggleBreakpointAdapter_7;
public static String ToggleBreakpointAdapter_9;
public static String ToggleBreakpointAdapter_confirmDeleteTitle;
public static String ToggleBreakpointAdapter_confirmDeleteMessage;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.properties b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.properties
index bea840a..7e7f03d 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.properties
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ActionMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2013 IBM Corporation and others.
+# Copyright (c) 2000, 2014 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -100,8 +100,7 @@ PopupDisplayAction_2=Move to Display View
ToggleBreakpointAdapter_9=Selection does not contain a method
ToggleBreakpointAdapter_10=Selection does not contain a field
-ToggleBreakpointAdapter_7=You cannot set method breakpoints in interfaces.
-ToggleBreakpointAdapter_6=You cannot set breakpoints in interfaces.
+ToggleBreakpointAdapter_6=Cannot set a breakpoint on an unimplemented interface method
ToggleBreakpointAdapter_5=You cannot set watchpoints in interfaces.
ToggleBreakpointAdapter_4=The current editor selection does not contain a valid method declaration.
ToggleBreakpointAdapter_3=A breakpoint cannot be set at the selected editor location.
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
index ae0528d..8ab615c 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -245,14 +245,14 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
if(!(selection instanceof IStructuredSelection)) {
selection = translateToMembers(part, selection);
}
- if(isInterface(selection, part)) {
- report(ActionMessages.ToggleBreakpointAdapter_7, part);
- return Status.OK_STATUS;
- }
+ boolean isInterface = isInterface(selection, part);
if (selection instanceof IStructuredSelection) {
- IMethod[] members = getMethods((IStructuredSelection) selection);
+ IMethod[] members = getMethods((IStructuredSelection) selection, isInterface);
if (members.length == 0) {
- report(ActionMessages.ToggleBreakpointAdapter_9, part);
+ if(isInterface)
+ report(ActionMessages.ToggleBreakpointAdapter_6, part);
+ else
+ report(ActionMessages.ToggleBreakpointAdapter_9, part);
return Status.OK_STATUS;
}
IJavaBreakpoint breakpoint = null;
@@ -336,11 +336,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
if(!(selection instanceof IStructuredSelection)) {
sel = translateToMembers(part, selection);
}
- if(isInterface(sel, part)) {
- report(ActionMessages.ToggleBreakpointAdapter_6, part);
- return Status.OK_STATUS;
- }
- if(sel instanceof IStructuredSelection) {
+ if(sel instanceof IStructuredSelection) {
IMember member = (IMember) ((IStructuredSelection)sel).getFirstElement();
IType type = null;
if(member.getElementType() == IJavaElement.TYPE) {
@@ -613,7 +609,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
}
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss = (IStructuredSelection) selection;
- return getMethods(ss).length > 0;
+ return getMethods(ss, isInterface(selection, part)).length > 0;
}
return (selection instanceof ITextSelection) && isMethod((ITextSelection) selection, part);
}
@@ -663,7 +659,37 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
* @param selection the selection to get the methods from
* @return an array of the methods from the selection or an empty array
*/
- protected IMethod[] getMethods(IStructuredSelection selection) {
+ protected IMethod[] getMethods(IStructuredSelection selection, boolean isInterace) {
+ if (selection.isEmpty()) {
+ return new IMethod[0];
+ }
+ List<IMethod> methods = new ArrayList<IMethod>(selection.size());
+ Iterator<?> iterator = selection.iterator();
+ while (iterator.hasNext()) {
+ Object thing = iterator.next();
+ try {
+ if (thing instanceof IMethod) {
+ IMethod method = (IMethod) thing;
+ if(isInterace){
+ if (Flags.isDefaultMethod(method.getFlags()) || Flags.isStatic(method.getFlags()))
+ methods.add(method);
+ }
+ else if (!Flags.isAbstract(method.getFlags())) {
+ methods.add(method);
+ }
+ }
+ }
+ catch (JavaModelException e) {}
+ }
+ return methods.toArray(new IMethod[methods.size()]);
+ }
+
+ /**
+ * Returns the methods from the selection, or an empty array
+ * @param selection the selection to get the methods from
+ * @return an array of the methods from the selection or an empty array
+ */
+ protected IMethod[] getInterfaceMethods(IStructuredSelection selection) {
if (selection.isEmpty()) {
return new IMethod[0];
}
@@ -674,7 +700,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
try {
if (thing instanceof IMethod) {
IMethod method = (IMethod) thing;
- if (!Flags.isAbstract(method.getFlags())) {
+ if (Flags.isDefaultMethod(method.getFlags())) {
methods.add(method);
}
}