getScope() {
49 | return scope;
50 | }
51 |
52 | public void requestDump(boolean reset) throws CoreException {
53 | agentServer.requestDump(reset);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 | /target
3 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.mountainminds.eclemma.debug.ui.compatibility
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: EclEmma debug.ui API fix
4 | Bundle-SymbolicName: com.mountainminds.eclemma.debug.ui.compatibility;singleton:=true
5 | Bundle-Version: 2.3.4.qualifier
6 | Bundle-Vendor: Mountainminds GmbH & Co. KG
7 | Bundle-RequiredExecutionEnvironment: J2SE-1.5
8 | Export-Package: org.eclipse.debug.ui.actions
9 | Require-Bundle: org.eclipse.debug.ui,
10 | org.eclipse.core.runtime,
11 | org.eclipse.ui
12 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | About
5 |
6 |
7 |
8 | About This Content
9 |
10 |
11 | EclEmma is a free Java code coverage tool for Eclipse implemented by Marc R.
12 | Hoffmann et al. Check http://www.eclemma.org/
13 | for updates, documentation and support.
14 |
15 |
16 | License
17 |
18 |
19 | Copyright © 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
20 |
21 |
22 |
23 | All rights reserved. This program and the accompanying materials are made
24 | available under the terms of the Eclipse Public License v1.0 which accompanies
25 | this distribution. A copy of the EPL is available at
26 | http://www.eclipse.org/legal/epl-v10.html .
27 |
28 |
29 |
30 | The user documentation contains example code taken from the Apache Jakarta
31 | Commons project, provided under the terms and conditions of the
32 | Apache License Version 2.0. A copy of this license is available at
33 | http://jakarta.apache.org/commons/license.html .
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = META-INF/,\
4 | .,\
5 | about.html
6 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 | 4.0.0
15 |
16 |
17 | com.mountainminds.eclemma
18 | com.mountainminds.eclemma.build
19 | 2.3.4-SNAPSHOT
20 | ../com.mountainminds.eclemma.build
21 |
22 |
23 | com.mountainminds.eclemma.debug.ui.compatibility
24 | eclipse-plugin
25 |
26 |
27 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.debug.ui.compatibility/src/org/eclipse/debug/ui/actions/RelaunchLastAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package org.eclipse.debug.ui.actions;
13 |
14 | /**
15 | * This class is an org.eclipse.debug.ui API since Eclipse 3.8. For previous
16 | * versions this bridge is provided.
17 | */
18 | @SuppressWarnings("restriction")
19 | public abstract class RelaunchLastAction extends
20 | org.eclipse.debug.internal.ui.actions.RelaunchLastAction {
21 | }
22 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.mountainminds.eclemma.doc
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.ManifestBuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.SchemaBuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.pde.PluginNature
21 |
22 |
23 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: %pluginName
4 | Bundle-SymbolicName: com.mountainminds.eclemma.doc; singleton:=true
5 | Bundle-Version: 2.3.4.qualifier
6 | Bundle-Vendor: %providerName
7 | Bundle-Localization: plugin
8 | Require-Bundle: org.eclipse.help
9 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | About
5 |
6 |
7 |
8 | About This Content
9 |
10 |
11 | EclEmma is a free Java code coverage tool for Eclipse implemented by Marc R.
12 | Hoffmann et al. Check http://www.eclemma.org/
13 | for updates, documentation and support.
14 |
15 |
16 | License
17 |
18 |
19 | Copyright © 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
20 |
21 |
22 |
23 | All rights reserved. This program and the accompanying materials are made
24 | available under the terms of the Eclipse Public License v1.0 which accompanies
25 | this distribution. A copy of the EPL is available at
26 | http://www.eclipse.org/legal/epl-v10.html .
27 |
28 |
29 |
30 | The user documentation contains example code taken from the Apache Jakarta
31 | Commons project, provided under the terms and conditions of the
32 | Apache License Version 2.0. A copy of this license is available at
33 | http://jakarta.apache.org/commons/license.html .
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/book.css:
--------------------------------------------------------------------------------
1 | @import "../PRODUCT_PLUGIN/book.css";
a.extern {
background-image:url(pages/images/extern.gif);
background-repeat:no-repeat;
background-position:left center;
padding-left:15px;
}
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = META-INF/,\
2 | plugin.xml,\
3 | book.css,\
4 | pages/,\
5 | toc.xml,\
6 | plugin.properties,\
7 | about.html,\
8 | contexts_ui.xml
9 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/contexts_ui.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | This view allows drilling-down coverage data along the Java element hierarchy.
7 |
8 |
9 |
10 |
11 | Shows all coverage counters for the selected Java element.
12 |
13 |
14 |
15 | Adjust the behaviour of the code coverage functionality.
16 |
17 |
18 |
19 | Launches this application type in coverage mode.
20 |
21 |
22 |
23 | This tab specifies the scope of the coverage analysis.
24 |
25 |
26 |
27 | Dump execution data from a running coverage launch.
28 |
29 |
30 |
31 |
32 | Select the coverage session that should be displayed.
33 |
34 |
35 |
36 | Merge selected coverage sessions into a single session.
37 |
38 |
39 |
40 | Export a code coverage session as HTML report or EMMA data file.
41 |
42 |
43 |
44 | Import code coverage data for analysis within the IDE.
45 |
46 |
47 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/coverageproperties.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Coverage Properties
8 |
9 |
10 |
11 |
12 | Coverage Properties
13 |
14 |
15 | For each Java element (Java project, source folder, package, type or method)
16 | EclEmma provides a Coverage property page summarizing all coverage
17 | counters:
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | The Properties dialog can be activated from the context menu of for
26 | example the Package Explorer or Coverage view. The figures are
27 | only available if there is a active coverage
28 | session , e.g. after a coverage launch .
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/decorators.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Coverage Decorators
8 |
9 |
10 |
11 |
12 | Coverage Decorators
13 |
14 |
15 | Note: This is an optional feature not enabled by default.
16 |
17 |
18 |
19 | The Eclipse workbench has the concept of so called decorators which
20 | add graphical and textual information to elements shown in the workbench
21 | views. EclEmma provides coverage decorators for the currently active
22 | coverage session : A little green/red bar on the
23 | elements' icons and a percentage value next to the names.
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | The percentage shown is calculated based upon the instruction counters.
32 | Coverage decorators are only visible if there is an active
33 | coverage session and only shown for elements
34 | containing executable code, therefore e.g. not for abstract methods.
35 |
36 |
37 |
38 | This optional feature can be enabled in the Eclipse
39 | preferences dialog:
40 |
41 |
42 |
43 | Open the preferences dialog from Window → Preferences...
44 | Navigate to page General → Appearance → Label Decorators
45 | Select Java Code Coverage and press OK
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/annotations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/annotations.png
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/coverageproperties.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/coverageproperties.png
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/coverageview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/coverageview.png
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/coverageviewmenu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/coverageviewmenu.png
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/coverageviewtools.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/coverageviewtools.png
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/decorators.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/decorators.png
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/extern.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/extern.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/launchdialog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/launchdialog.png
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/images/launchtoolbar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.doc/pages/images/launchtoolbar.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/sessions.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Managing Coverage Sessions
8 |
9 |
10 |
11 |
12 | Managing Coverage Sessions
13 |
14 |
15 | A coverage session is the code coverage information of particular
16 | program run. It contains the list of considered Java classes along with the
17 | recorded coverage details.
18 |
19 |
20 | Session Lifecycle
21 |
22 |
23 | A coverage session is automatically created at the end of each
24 | coverage launch or whenever an intermediate
25 | execution data has been trigger by the user. Alternatively, sessions can be
26 | imported from external launches. The
27 | coverage view allows removing sessions.
28 |
29 |
30 |
31 | All coverage sessions are deleted when the workbench is closed.
32 |
33 |
34 | The Active Session
35 |
36 |
37 | Even if there can be multiple coverage sessions, only one session can be the
38 | active coverage session. The active session can be selected from a
39 | drop-down list in the coverage view and defines
40 | the input of this view as well as the
41 | Java source highlighting .
42 |
43 |
44 | Merging Sessions
45 |
46 |
47 | If the overall test set consists of multiple test launches, they will result in
48 | multiple different coverage session. For analysis it may make sense to combine
49 | these sessions to a single session. If there is more than one session the
50 | coverage view provides the Merge Sessions
51 | command. This command allows selecting a subset from the existing sessions
52 | and combining it to a single coverage session.
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/support.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Support
8 |
9 |
10 |
11 | Support and Updates
12 |
13 |
14 | The official home page of EclEmma is
15 | www.eclemma.org .
16 | Please visit this site to
17 |
18 |
19 |
20 | download the latest version,
21 | get user support,
22 | report bugs,
23 | request new features and
24 | find developer information.
25 |
26 |
27 |
28 | The quality of EclEmma strongly depends on your feedback! Please get in
29 | contact if you
30 | encounter a problem with EclEmma that has not been reported before or you miss
31 | functionality that is not yet on the feature request list. Thanks.
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pages/userguide.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | User Guide
8 |
9 |
10 |
11 |
12 | User Guide
13 |
14 |
15 | EclEmma records which parts of your Java code are executed during a particular
16 | program launch. Therefore coverage analysis always involves two steps:
17 |
18 |
19 |
20 | Run the program
21 | Analyze coverage data
22 |
23 |
24 |
25 | For reproducible results the launched programs are typically automated tests
26 | like JUnit tests.
27 |
28 |
29 |
30 | Running a coverage analysis is as simple as
31 | pressing a single button like the existing Run and Debug
32 | buttons. The coverage results are automatically summarized in the
33 | Coverage view and highlighted in the
34 | Java editors .
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/plugin.properties:
--------------------------------------------------------------------------------
1 | #*******************************************************************************
2 | # Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | # This software is provided under the terms of the Eclipse Public License v1.0
4 | # See http://www.eclipse.org/legal/epl-v10.html.
5 | #
6 | #*******************************************************************************
7 |
8 | providerName = Mountainminds GmbH & Co. KG
9 | pluginName = EclEmma Documentation
10 |
11 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
9 |
10 |
12 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 | 4.0.0
15 |
16 |
17 | com.mountainminds.eclemma
18 | com.mountainminds.eclemma.build
19 | 2.3.4-SNAPSHOT
20 | ../com.mountainminds.eclemma.build
21 |
22 |
23 | com.mountainminds.eclemma.doc
24 | eclipse-plugin
25 |
26 |
27 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.doc/toc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.feature/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.feature/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.mountainminds.eclemma.feature
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.FeatureBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.FeatureNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.feature/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | About
5 |
6 |
7 |
8 | About This Content
9 |
10 |
11 | EclEmma is a free Java code coverage tool for Eclipse implemented by Marc R.
12 | Hoffmann et al. Check http://www.eclemma.org/
13 | for updates, documentation and support.
14 |
15 |
16 | License
17 |
18 |
19 | Copyright © 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
20 |
21 |
22 |
23 | All rights reserved. This program and the accompanying materials are made
24 | available under the terms of the Eclipse Public License v1.0 which accompanies
25 | this distribution. A copy of the EPL is available at
26 | http://www.eclipse.org/legal/epl-v10.html .
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.feature/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = feature.xml,\
2 | feature.properties,\
3 | about.html
4 |
5 |
6 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.feature/feature.properties:
--------------------------------------------------------------------------------
1 | #*******************************************************************************
2 | # Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | # This software is provided under the terms of the Eclipse Public License v1.0
4 | # See http://www.eclipse.org/legal/epl-v10.html.
5 | #
6 | #*******************************************************************************
7 |
8 | providerName = Mountainminds GmbH & Co. KG
9 | featureName = EclEmma Java Code Coverage
10 |
11 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.feature/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 | 4.0.0
15 |
16 |
17 | com.mountainminds.eclemma
18 | com.mountainminds.eclemma.build
19 | 2.3.4-SNAPSHOT
20 | ../com.mountainminds.eclemma.build
21 |
22 |
23 | com.mountainminds.eclemma.feature
24 | eclipse-feature
25 |
26 |
27 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.site/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.site/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.mountainminds.eclemma.site
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.site/category.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License. It is based on the JaCoCo library and brings code coverage analysis directly into the Eclipse workbench.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.site/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 | 4.0.0
15 |
16 |
17 | com.mountainminds.eclemma
18 | com.mountainminds.eclemma.build
19 | 2.3.4-SNAPSHOT
20 | ../com.mountainminds.eclemma.build
21 |
22 |
23 | EclEmma
24 | eclipse-repository
25 |
26 |
27 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.target/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.mountainminds.eclemma.target
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.target/eclemma-e3.5.target:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.target/eclemma-e3.6.target:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.target/eclemma-e3.7.target:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.target/eclemma-e3.8.target:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.target/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 | 4.0.0
15 |
16 |
17 | com.mountainminds.eclemma
18 | com.mountainminds.eclemma.build
19 | 2.3.4-SNAPSHOT
20 | ../com.mountainminds.eclemma.build
21 |
22 |
23 | com.mountainminds.eclemma.target
24 | pom
25 |
26 |
27 |
28 |
29 | org.codehaus.mojo
30 | build-helper-maven-plugin
31 |
32 |
33 | attach-artifacts
34 | package
35 |
36 | attach-artifact
37 |
38 |
39 |
40 |
41 | eclemma-e3.5.target
42 | target
43 | eclemma-e3.5
44 |
45 |
46 | eclemma-e3.6.target
47 | target
48 | eclemma-e3.6
49 |
50 |
51 | eclemma-e3.7.target
52 | target
53 | eclemma-e3.7
54 |
55 |
56 | eclemma-e3.8.target
57 | target
58 | eclemma-e3.8
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 | /target
3 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.mountainminds.eclemma.ui
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: %pluginName
4 | Bundle-SymbolicName: com.mountainminds.eclemma.ui; singleton:=true
5 | Bundle-Version: 2.3.4.qualifier
6 | Bundle-Vendor: %providerName
7 | Bundle-Localization: plugin
8 | Require-Bundle: com.mountainminds.eclemma.core,
9 | org.jacoco.core;bundle-version="[0.7.7,0.7.8)",
10 | org.eclipse.core.expressions,
11 | org.eclipse.core.runtime,
12 | org.eclipse.debug.ui,
13 | org.eclipse.jdt.core,
14 | org.eclipse.jdt.ui,
15 | org.eclipse.jface.text,
16 | org.eclipse.ui,
17 | org.eclipse.ui.forms,
18 | org.eclipse.ui.ide,
19 | org.eclipse.ui.workbench.texteditor,
20 | com.mountainminds.eclemma.debug.ui.compatibility
21 | Bundle-Activator: com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin
22 | Export-Package: com.mountainminds.eclemma.internal.ui;x-internal:=true,
23 | com.mountainminds.eclemma.internal.ui.actions;x-internal:=true,
24 | com.mountainminds.eclemma.internal.ui.annotation;x-internal:=true,
25 | com.mountainminds.eclemma.internal.ui.coverageview;x-internal:=true,
26 | com.mountainminds.eclemma.internal.ui.decorators;x-internal:=true,
27 | com.mountainminds.eclemma.internal.ui.dialogs;x-internal:=true,
28 | com.mountainminds.eclemma.internal.ui.launching;x-internal:=true,
29 | com.mountainminds.eclemma.internal.ui.wizards;x-internal:=true,
30 | com.mountainminds.eclemma.ui.launching
31 | Bundle-ActivationPolicy: lazy
32 | Bundle-RequiredExecutionEnvironment: J2SE-1.5
33 |
34 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | About
5 |
6 |
7 |
8 | About This Content
9 |
10 |
11 | EclEmma is a free Java code coverage tool for Eclipse implemented by Marc R.
12 | Hoffmann et al. Check http://www.eclemma.org/
13 | for updates, documentation and support.
14 |
15 |
16 | License
17 |
18 |
19 | Copyright © 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
20 |
21 |
22 |
23 | All rights reserved. This program and the accompanying materials are made
24 | available under the terms of the Eclipse Public License v1.0 which accompanies
25 | this distribution. A copy of the EPL is available at
26 | http://www.eclipse.org/legal/epl-v10.html .
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/about.ini:
--------------------------------------------------------------------------------
1 | #*******************************************************************************
2 | # Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # Marc R. Hoffmann - initial API and implementation
10 | #
11 | #*******************************************************************************
12 |
13 | aboutText=%aboutText
14 | featureImage=eclemma32.gif
15 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/about.properties:
--------------------------------------------------------------------------------
1 | #*******************************************************************************
2 | # Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # Marc R. Hoffmann - initial API and implementation
10 | #
11 | #*******************************************************************************
12 |
13 | aboutText=EclEmma {featureVersion}\n\
14 | \n\
15 | Free Java code coverage for Eclipse implemented by Marc R. Hoffmann at al.,\n\
16 | distributed under the terms of the Eclipse Public License 1.0\n\
17 | \n\
18 | Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors\n\
19 | \n\
20 | Check http://www.eclemma.org/ for updates, documentation and support.
21 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = META-INF/,\
4 | .,\
5 | plugin.xml,\
6 | icons/,\
7 | plugin.properties,\
8 | about.html,\
9 | about.ini,\
10 | about.properties,\
11 | eclemma32.gif
12 | javacSource = 1.5
13 | javacTarget = 1.5
14 | jre.compilation.profile = J2SE-1.5
15 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/eclemma32.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/eclemma32.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dgm/greenbar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dgm/greenbar.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dgm/redbar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dgm/redbar.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/dump.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/dump.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/export.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/export.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/import.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/import.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/mergesessions.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/mergesessions.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/relaunch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/relaunch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/remove.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/remove.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/removeall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/removeall.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/runcoverage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/runcoverage.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/dlcl16/session.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/dlcl16/session.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/collapseall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/collapseall.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/dump.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/dump.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/export.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/export.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/import.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/import.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/java_ovr.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/java_ovr.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/linked.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/linked.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/mergesessions.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/mergesessions.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/relaunch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/relaunch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/remove.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/remove.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/removeall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/removeall.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/runcoverage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/runcoverage.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/session.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/session.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/showpackageroots.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/showpackageroots.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/showpackages.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/showpackages.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/showprojects.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/showprojects.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/elcl16/showtypes.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/elcl16/showtypes.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/eclipse_launch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/eclipse_launch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/java_launch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/java_launch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/junit_launch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/junit_launch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/junitplugin_launch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/junitplugin_launch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/scala_launch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/scala_launch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/session_export.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/session_export.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/session_import.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/session_import.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/swtbot_launch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/swtbot_launch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/etool16/testng_launch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/etool16/testng_launch.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/eview16/coverage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/eview16/coverage.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/eview16/exec.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/eview16/exec.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/obj16/markerfull.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/obj16/markerfull.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/obj16/markerno.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/obj16/markerno.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/obj16/markerpartial.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/obj16/markerpartial.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/obj16/session.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/obj16/session.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage00.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage00.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage01.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage01.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage02.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage02.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage03.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage03.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage04.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage04.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage05.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage05.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage06.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage06.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage07.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/ovr16/coverage07.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/wizban/export_session.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/wizban/export_session.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/wizban/import_session.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/wizban/import_session.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/icons/full/wizban/run_coverage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacoco/eclemma/797c5a0068df8c2e42cf1bec279db30acba7083b/com.mountainminds.eclemma.ui/icons/full/wizban/run_coverage.gif
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 | 4.0.0
15 |
16 |
17 | com.mountainminds.eclemma
18 | com.mountainminds.eclemma.build
19 | 2.3.4-SNAPSHOT
20 | ../com.mountainminds.eclemma.build
21 |
22 |
23 | com.mountainminds.eclemma.ui
24 | eclipse-plugin
25 |
26 |
27 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/ContextHelp.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui;
13 |
14 | import org.eclipse.swt.widgets.Control;
15 | import org.eclipse.ui.PlatformUI;
16 |
17 | /**
18 | * Constants and utility methods for context help.
19 | */
20 | public final class ContextHelp {
21 |
22 | private static final String PREFIX = EclEmmaUIPlugin.ID + "."; //$NON-NLS-1$
23 |
24 | public static final String COVERAGE_VIEW = PREFIX + "coverage_view_context"; //$NON-NLS-1$
25 |
26 | public static final String COVERAGE_PROPERTIES = PREFIX
27 | + "coverage_properties_context"; //$NON-NLS-1$
28 |
29 | public static final String COVERAGE_PREFERENCES = PREFIX
30 | + "coverage_preferences_context"; //$NON-NLS-1$
31 |
32 | public static final String COVERAGE_LAUNCH = PREFIX
33 | + "coverage_launch_context"; //$NON-NLS-1$
34 |
35 | public static final String COVERAGE_LAUNCH_TAB = PREFIX
36 | + "coverage_launch_tab_context"; //$NON-NLS-1$
37 |
38 | public static final String DUMP_EXECUTION_DATA = PREFIX
39 | + "dump_execution_data"; //$NON-NLS-1$
40 |
41 | public static final String SELECT_ACTIVE_SESSION = PREFIX
42 | + "select_active_session_context"; //$NON-NLS-1$
43 |
44 | public static final String MERGE_SESSIONS = PREFIX + "merge_sessions_context"; //$NON-NLS-1$
45 |
46 | public static final String SESSION_EXPORT = PREFIX + "session_export_context"; //$NON-NLS-1$
47 |
48 | public static final String SESSION_IMPORT = PREFIX + "session_import_context"; //$NON-NLS-1$
49 |
50 | /**
51 | * Assigns the given context help id to a SWT control.
52 | *
53 | * @param control
54 | * control for this help context
55 | * @param id
56 | * context help id
57 | */
58 | public static void setHelp(Control control, String id) {
59 | PlatformUI.getWorkbench().getHelpSystem().setHelp(control, id);
60 | }
61 |
62 | private ContextHelp() {
63 | // no instances
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/RedGreenBar.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui;
13 |
14 | import java.text.DecimalFormat;
15 |
16 | import org.eclipse.swt.widgets.Event;
17 | import org.jacoco.core.analysis.ICounter;
18 |
19 | /**
20 | * Utility methods to draw red/green bars into table cells.
21 | */
22 | public final class RedGreenBar {
23 |
24 | private static final int BORDER_LEFT = 2;
25 | private static final int BORDER_RIGHT = 10;
26 | private static final int BORDER_TOP = 3;
27 | private static final int BORDER_BOTTOM = 4;
28 |
29 | private static final String MAX_PERCENTAGE_STRING = new DecimalFormat(
30 | UIMessages.CoverageView_columnCoverageValue).format(1.0);
31 |
32 | private RedGreenBar() {
33 | }
34 |
35 | public static void draw(Event event, int columnWith, ICounter counter) {
36 | draw(event, columnWith, counter, counter.getTotalCount());
37 | }
38 |
39 | public static void draw(Event event, int columnWith, ICounter counter,
40 | int maxTotal) {
41 | if (maxTotal == 0) {
42 | return;
43 | }
44 | final int maxWidth = getMaxWidth(event, columnWith);
45 | final int redLength = maxWidth * counter.getMissedCount() / maxTotal;
46 | bar(event, EclEmmaUIPlugin.DGM_REDBAR, 0, redLength);
47 | final int greenLength = maxWidth * counter.getCoveredCount() / maxTotal;
48 | bar(event, EclEmmaUIPlugin.DGM_GREENBAR, redLength, greenLength);
49 | }
50 |
51 | private static void bar(Event event, String image, int xOffset, int width) {
52 | final int height = event.getBounds().height - BORDER_TOP - BORDER_BOTTOM;
53 | event.gc.drawImage(EclEmmaUIPlugin.getImage(image), 0, 0, 1, 10, event.x
54 | + xOffset + BORDER_LEFT, event.y + BORDER_TOP, width, height);
55 | }
56 |
57 | private static int getMaxWidth(Event event, int columnWith) {
58 | final int textWidth = event.gc.textExtent(MAX_PERCENTAGE_STRING).x;
59 | final int max = columnWith - BORDER_LEFT - BORDER_RIGHT - textWidth;
60 | return Math.max(0, max);
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/WorkbenchAdapterFactory.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui;
13 |
14 | import org.eclipse.core.runtime.IAdapterFactory;
15 | import org.eclipse.jface.resource.ImageDescriptor;
16 | import org.eclipse.ui.model.IWorkbenchAdapter;
17 |
18 | import com.mountainminds.eclemma.core.ICoverageSession;
19 |
20 | /**
21 | * Factory for IWorkbenchAdapter
s for coverage model elements.
22 | */
23 | public class WorkbenchAdapterFactory implements IAdapterFactory {
24 |
25 | private static final IWorkbenchAdapter SESSIONADAPTER = new IWorkbenchAdapter() {
26 |
27 | public ImageDescriptor getImageDescriptor(Object object) {
28 | return EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.OBJ_SESSION);
29 | }
30 |
31 | public String getLabel(Object o) {
32 | return ((ICoverageSession) o).getDescription();
33 | }
34 |
35 | public Object[] getChildren(Object o) {
36 | return new Object[0];
37 | }
38 |
39 | public Object getParent(Object o) {
40 | return null;
41 | }
42 |
43 | };
44 |
45 | public Object getAdapter(Object adaptableObject,
46 | @SuppressWarnings("rawtypes") Class adapterType) {
47 | if (adaptableObject instanceof ICoverageSession) {
48 | return SESSIONADAPTER;
49 | }
50 | return null;
51 | }
52 |
53 | @SuppressWarnings("rawtypes")
54 | public Class[] getAdapterList() {
55 | return new Class[] { IWorkbenchAdapter.class };
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/actions/CoverageAsAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.actions;
13 |
14 | import org.eclipse.debug.ui.actions.LaunchShortcutsAction;
15 |
16 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
17 |
18 | /**
19 | * Action implementation for "Coverage as" menu.
20 | */
21 | public class CoverageAsAction extends LaunchShortcutsAction {
22 |
23 | public CoverageAsAction() {
24 | super(EclEmmaUIPlugin.ID_COVERAGE_LAUNCH_GROUP);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/actions/CoverageContextualLaunchAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Brock Janiczak - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.actions;
13 |
14 | import org.eclipse.debug.ui.actions.ContextualLaunchAction;
15 |
16 | import com.mountainminds.eclemma.core.CoverageTools;
17 |
18 | /**
19 | * An action delegate for the "Coverage As" context menu entry.
20 | */
21 | public class CoverageContextualLaunchAction extends ContextualLaunchAction {
22 |
23 | public CoverageContextualLaunchAction() {
24 | super(CoverageTools.LAUNCH_MODE);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/actions/CoverageHistoryAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.actions;
13 |
14 | import org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction;
15 |
16 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
17 |
18 | /**
19 | * History pull-down menu for recent coverage launches.
20 | */
21 | public class CoverageHistoryAction extends AbstractLaunchHistoryAction {
22 |
23 | public CoverageHistoryAction() {
24 | super(EclEmmaUIPlugin.ID_COVERAGE_LAUNCH_GROUP);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/actions/CoverageLastAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.actions;
13 |
14 | import org.eclipse.debug.ui.actions.RelaunchLastAction;
15 |
16 | import com.mountainminds.eclemma.core.CoverageTools;
17 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
18 | import com.mountainminds.eclemma.internal.ui.UIMessages;
19 |
20 | /**
21 | * Action to re-launch the last launch in coverage mode.
22 | */
23 | public class CoverageLastAction extends RelaunchLastAction {
24 |
25 | @Override
26 | public String getMode() {
27 | return CoverageTools.LAUNCH_MODE;
28 | }
29 |
30 | @Override
31 | public String getLaunchGroupId() {
32 | return EclEmmaUIPlugin.ID_COVERAGE_LAUNCH_GROUP;
33 | }
34 |
35 | @Override
36 | protected String getText() {
37 | return UIMessages.CoverageLastAction_label;
38 | }
39 |
40 | @Override
41 | protected String getTooltipText() {
42 | return UIMessages.CoverageLastAction_label;
43 | }
44 |
45 | @Override
46 | protected String getDescription() {
47 | return UIMessages.CoverageLastAction_label;
48 | }
49 |
50 | @Override
51 | protected String getCommandId() {
52 | return "com.mountainminds.eclemma.ui.commands.CoverageLast"; //$NON-NLS-1$
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/actions/CoverageToolbarAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.actions;
13 |
14 | import org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction;
15 |
16 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
17 |
18 | /**
19 | * Action for the coverage mode in the toolbar.
20 | */
21 | public class CoverageToolbarAction extends AbstractLaunchToolbarAction {
22 |
23 | public CoverageToolbarAction() {
24 | super(EclEmmaUIPlugin.ID_COVERAGE_LAUNCH_GROUP);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/actions/OpenCoverageConfigurations.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.actions;
13 |
14 | import org.eclipse.debug.ui.actions.OpenLaunchDialogAction;
15 |
16 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
17 |
18 | /**
19 | * Action to open the coverage launch configuration.
20 | */
21 | public class OpenCoverageConfigurations extends OpenLaunchDialogAction {
22 |
23 | public OpenCoverageConfigurations() {
24 | super(EclEmmaUIPlugin.ID_COVERAGE_LAUNCH_GROUP);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/annotation/CoverageAnnotationImageProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.annotation;
13 |
14 | import org.eclipse.jface.resource.ImageDescriptor;
15 | import org.eclipse.jface.text.source.Annotation;
16 | import org.eclipse.swt.graphics.Image;
17 | import org.eclipse.ui.texteditor.IAnnotationImageProvider;
18 | import org.jacoco.core.analysis.ICounter;
19 |
20 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
21 |
22 | /**
23 | * The annotation image is calculated dynamically as it depends on the branch
24 | * coverage status.
25 | */
26 | public class CoverageAnnotationImageProvider implements
27 | IAnnotationImageProvider {
28 |
29 | public String getImageDescriptorId(Annotation annotation) {
30 | if (annotation instanceof CoverageAnnotation) {
31 | final ICounter branches = ((CoverageAnnotation) annotation).getLine()
32 | .getBranchCounter();
33 | switch (branches.getStatus()) {
34 | case ICounter.FULLY_COVERED:
35 | return EclEmmaUIPlugin.OBJ_MARKERFULL;
36 | case ICounter.PARTLY_COVERED:
37 | return EclEmmaUIPlugin.OBJ_MARKERPARTIAL;
38 | case ICounter.NOT_COVERED:
39 | return EclEmmaUIPlugin.OBJ_MARKERNO;
40 | }
41 | }
42 | return null;
43 | }
44 |
45 | public ImageDescriptor getImageDescriptor(String imageDescritporId) {
46 | return EclEmmaUIPlugin.getImageDescriptor(imageDescritporId);
47 | }
48 |
49 | public Image getManagedImage(Annotation annotation) {
50 | // we don't manage images ourself
51 | return null;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/coverageview/CoveredElementsContentProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.coverageview;
13 |
14 | import org.eclipse.ui.model.WorkbenchContentProvider;
15 |
16 | import com.mountainminds.eclemma.core.analysis.IJavaModelCoverage;
17 |
18 | /**
19 | * Specialized workbench content provider that selects entry elements depending
20 | * on the view setting (projects, package roots, packages or types).
21 | */
22 | class CoveredElementsContentProvider extends WorkbenchContentProvider {
23 |
24 | private final ViewSettings settings;
25 |
26 | public CoveredElementsContentProvider(ViewSettings settings) {
27 | this.settings = settings;
28 | }
29 |
30 | public Object[] getElements(Object element) {
31 | IJavaModelCoverage coverage = (IJavaModelCoverage) element;
32 | if (coverage == IJavaModelCoverage.LOADING) {
33 | return new Object[] { CoverageView.LOADING_ELEMENT };
34 | }
35 | if (coverage != null) {
36 | switch (settings.getRootType()) {
37 | case GROUP:
38 | return coverage.getProjects();
39 | case BUNDLE:
40 | return coverage.getPackageFragmentRoots();
41 | case PACKAGE:
42 | return coverage.getPackageFragments();
43 | case CLASS:
44 | return coverage.getTypes();
45 | }
46 | }
47 | return new Object[0];
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/coverageview/HideUnusedElementsHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.coverageview;
13 |
14 | import java.util.Map;
15 |
16 | import org.eclipse.core.commands.AbstractHandler;
17 | import org.eclipse.core.commands.ExecutionEvent;
18 | import org.eclipse.core.commands.ExecutionException;
19 | import org.eclipse.ui.commands.IElementUpdater;
20 | import org.eclipse.ui.menus.UIElement;
21 |
22 | /**
23 | * Handler to toggle hide unused types in the coverage tree.
24 | */
25 | class HideUnusedElementsHandler extends AbstractHandler implements
26 | IElementUpdater {
27 |
28 | public static final String ID = "com.mountainminds.eclemma.ui.hideUnusedElements"; //$NON-NLS-1$
29 |
30 | private final ViewSettings settings;
31 | private final CoverageView view;
32 |
33 | public HideUnusedElementsHandler(ViewSettings settings, CoverageView view) {
34 | this.settings = settings;
35 | this.view = view;
36 | }
37 |
38 | public Object execute(ExecutionEvent event) throws ExecutionException {
39 | settings.setHideUnusedElements(!settings.getHideUnusedElements());
40 | view.refreshViewer();
41 | return null;
42 | }
43 |
44 | public void updateElement(UIElement element,
45 | @SuppressWarnings("rawtypes") Map parameters) {
46 | element.setChecked(settings.getHideUnusedElements());
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/coverageview/LinkWithSelectionHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | * Brock Janiczak - link with selection option (SF #1774547)
11 | *
12 | ******************************************************************************/
13 | package com.mountainminds.eclemma.internal.ui.coverageview;
14 |
15 | import java.util.Map;
16 |
17 | import org.eclipse.core.commands.AbstractHandler;
18 | import org.eclipse.core.commands.ExecutionEvent;
19 | import org.eclipse.core.commands.ExecutionException;
20 | import org.eclipse.ui.commands.IElementUpdater;
21 | import org.eclipse.ui.menus.UIElement;
22 |
23 | /**
24 | * Handle to toggle linking of the coverage view's selection with the current
25 | * selection in the workbench.
26 | */
27 | class LinkWithSelectionHandler extends AbstractHandler implements
28 | IElementUpdater {
29 |
30 | public static final String ID = "com.mountainminds.eclemma.ui.linkWithSelection"; //$NON-NLS-1$
31 |
32 | private final ViewSettings settings;
33 | private final SelectionTracker tracker;
34 |
35 | LinkWithSelectionHandler(ViewSettings settings, SelectionTracker tracker) {
36 | this.settings = settings;
37 | this.tracker = tracker;
38 | }
39 |
40 | public Object execute(ExecutionEvent event) throws ExecutionException {
41 | final boolean flag = !settings.isLinked();
42 | settings.setLinked(flag);
43 | tracker.setEnabled(flag);
44 | return null;
45 | }
46 |
47 | public void updateElement(UIElement element,
48 | @SuppressWarnings("rawtypes") Map parameters) {
49 | element.setChecked(settings.isLinked());
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/coverageview/MaxTotalCache.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.coverageview;
13 |
14 | import java.util.HashMap;
15 | import java.util.Map;
16 |
17 | import org.eclipse.jdt.core.IJavaElement;
18 | import org.eclipse.jface.viewers.ITreeContentProvider;
19 | import org.eclipse.ui.model.WorkbenchContentProvider;
20 | import org.jacoco.core.analysis.ICoverageNode;
21 |
22 | import com.mountainminds.eclemma.core.CoverageTools;
23 |
24 | /**
25 | * Internal cache to calculate and keep the maximum total amount within a group.
26 | */
27 | class MaxTotalCache {
28 |
29 | private final ViewSettings settings;
30 | private final ITreeContentProvider contentProvider;
31 |
32 | private Map maxTotals;
33 |
34 | MaxTotalCache(ViewSettings settings) {
35 | this.settings = settings;
36 | this.contentProvider = new WorkbenchContentProvider();
37 | this.maxTotals = new HashMap();
38 | }
39 |
40 | int getMaxTotal(Object element) {
41 | final IJavaElement parent = ((IJavaElement) element).getParent();
42 | Integer max = maxTotals.get(parent);
43 | if (max == null) {
44 | max = Integer.valueOf(calculateMaxTotal(parent));
45 | maxTotals.put(parent, max);
46 | }
47 | return max.intValue();
48 | }
49 |
50 | private int calculateMaxTotal(IJavaElement parent) {
51 | int max = 0;
52 | for (Object sibling : contentProvider.getChildren(parent)) {
53 | final ICoverageNode coverage = CoverageTools.getCoverageInfo(sibling);
54 | if (coverage != null) {
55 | max = Math.max(max, coverage.getCounter(settings.getCounters())
56 | .getTotalCount());
57 | }
58 | }
59 | return max;
60 | }
61 |
62 | void reset() {
63 | maxTotals.clear();
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/coverageview/RefreshSessionHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.coverageview;
13 |
14 | import org.eclipse.core.commands.ExecutionEvent;
15 | import org.eclipse.core.commands.ExecutionException;
16 |
17 | import com.mountainminds.eclemma.core.ISessionManager;
18 | import com.mountainminds.eclemma.internal.ui.handlers.AbstractSessionManagerHandler;
19 |
20 | /**
21 | * This handler reloads the active coverage session.
22 | */
23 | class RefreshSessionHandler extends AbstractSessionManagerHandler {
24 |
25 | public RefreshSessionHandler(ISessionManager sessionManager) {
26 | super(sessionManager);
27 | }
28 |
29 | public boolean isEnabled() {
30 | return sessionManager.getActiveSession() != null;
31 | }
32 |
33 | public Object execute(ExecutionEvent event) throws ExecutionException {
34 | sessionManager.refreshActiveSession();
35 | return null;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/coverageview/SelectCountersHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.coverageview;
13 |
14 | import java.util.Map;
15 |
16 | import org.eclipse.core.commands.AbstractHandler;
17 | import org.eclipse.core.commands.ExecutionEvent;
18 | import org.eclipse.core.commands.ExecutionException;
19 | import org.eclipse.ui.commands.IElementUpdater;
20 | import org.eclipse.ui.menus.UIElement;
21 | import org.jacoco.core.analysis.ICoverageNode.CounterEntity;
22 |
23 | /**
24 | * Handler to selects the counter entities shown in the coverage tree.
25 | */
26 | class SelectCountersHandler extends AbstractHandler implements IElementUpdater {
27 |
28 | public static final String ID = "com.mountainminds.eclemma.ui.selectCounters"; //$NON-NLS-1$
29 |
30 | private static final String TYPE_PARAMETER = "type"; //$NON-NLS-1$
31 |
32 | private final ViewSettings settings;
33 | private final CoverageView view;
34 |
35 | public SelectCountersHandler(ViewSettings settings, CoverageView view) {
36 | this.settings = settings;
37 | this.view = view;
38 | }
39 |
40 | public Object execute(ExecutionEvent event) throws ExecutionException {
41 | final CounterEntity type = getType(event.getParameters());
42 | settings.setCounters(type);
43 | view.refreshViewer();
44 | return null;
45 | }
46 |
47 | public void updateElement(UIElement element,
48 | @SuppressWarnings("rawtypes") Map parameters) {
49 | final CounterEntity type = getType(parameters);
50 | element.setChecked(settings.getCounters().equals(type));
51 | }
52 |
53 | private CounterEntity getType(Map, ?> parameters) {
54 | return CounterEntity.valueOf((String) parameters.get(TYPE_PARAMETER));
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/coverageview/SelectRootElementsHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.coverageview;
13 |
14 | import java.util.Map;
15 |
16 | import org.eclipse.core.commands.AbstractHandler;
17 | import org.eclipse.core.commands.ExecutionEvent;
18 | import org.eclipse.core.commands.ExecutionException;
19 | import org.eclipse.ui.commands.IElementUpdater;
20 | import org.eclipse.ui.menus.UIElement;
21 | import org.jacoco.core.analysis.ICoverageNode.ElementType;
22 |
23 | /**
24 | * Handler to selects the root elements shown in the coverage tree.
25 | */
26 | class SelectRootElementsHandler extends AbstractHandler implements
27 | IElementUpdater {
28 |
29 | public static final String ID = "com.mountainminds.eclemma.ui.selectRootElements"; //$NON-NLS-1$
30 |
31 | private static final String TYPE_PARAMETER = "type"; //$NON-NLS-1$
32 |
33 | private final ViewSettings settings;
34 | private final CoverageView view;
35 |
36 | public SelectRootElementsHandler(ViewSettings settings, CoverageView view) {
37 | this.settings = settings;
38 | this.view = view;
39 | }
40 |
41 | public Object execute(ExecutionEvent event) throws ExecutionException {
42 | final ElementType type = getType(event.getParameters());
43 | settings.setRootType(type);
44 | view.refreshViewer();
45 | return null;
46 | }
47 |
48 | public void updateElement(UIElement element,
49 | @SuppressWarnings("rawtypes") Map parameters) {
50 | final ElementType type = getType(parameters);
51 | element.setChecked(settings.getRootType().equals(type));
52 | }
53 |
54 | private ElementType getType(Map, ?> parameters) {
55 | return ElementType.valueOf((String) parameters.get(TYPE_PARAMETER));
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/editors/AbstractExecutionDataContentProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.editors;
13 |
14 | import org.eclipse.jface.viewers.IStructuredContentProvider;
15 | import org.eclipse.jface.viewers.Viewer;
16 | import org.eclipse.ui.IPropertyListener;
17 |
18 | /**
19 | * Base class for content providers for {@link ExecutionDataContent}. It handles
20 | * the viewer update.
21 | */
22 | abstract class AbstractExecutionDataContentProvider implements
23 | IStructuredContentProvider, IPropertyListener {
24 |
25 | private Viewer viewer;
26 |
27 | public final Object[] getElements(Object inputElement) {
28 | final ExecutionDataContent content = (ExecutionDataContent) inputElement;
29 | return getElements(content);
30 | }
31 |
32 | public final void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
33 | this.viewer = viewer;
34 | if (oldInput != null) {
35 | ((ExecutionDataContent) oldInput).removePropertyListener(this);
36 | }
37 | if (newInput != null) {
38 | ((ExecutionDataContent) newInput).addPropertyListener(this);
39 | }
40 | }
41 |
42 | public final void dispose() {
43 | }
44 |
45 | public final void propertyChanged(Object source, int propId) {
46 | viewer.refresh();
47 | }
48 |
49 | protected abstract Object[] getElements(ExecutionDataContent content);
50 |
51 | }
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/editors/CoverageSessionInput.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.editors;
13 |
14 | import org.eclipse.core.runtime.PlatformObject;
15 | import org.eclipse.jface.resource.ImageDescriptor;
16 | import org.eclipse.ui.IEditorInput;
17 | import org.eclipse.ui.IPersistableElement;
18 |
19 | import com.mountainminds.eclemma.core.ICoverageSession;
20 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
21 |
22 | /**
23 | * Wrapper for a {@link ICoverageSession} instance to serve as an
24 | * {@link IEditorInput}.
25 | */
26 | public class CoverageSessionInput extends PlatformObject implements
27 | IEditorInput {
28 |
29 | private final ICoverageSession session;
30 |
31 | public CoverageSessionInput(ICoverageSession session) {
32 | this.session = session;
33 | }
34 |
35 | public ICoverageSession getSession() {
36 | return session;
37 | }
38 |
39 | public ImageDescriptor getImageDescriptor() {
40 | return EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.EVIEW_EXEC);
41 | }
42 |
43 | public String getName() {
44 | return session.getDescription();
45 | }
46 |
47 | public String getToolTipText() {
48 | return session.getDescription();
49 | }
50 |
51 | @Override
52 | public int hashCode() {
53 | return session.hashCode();
54 | }
55 |
56 | @Override
57 | public boolean equals(Object obj) {
58 | if (!(obj instanceof CoverageSessionInput)) {
59 | return false;
60 | }
61 | final CoverageSessionInput other = (CoverageSessionInput) obj;
62 | return session.equals(other.session);
63 | }
64 |
65 | public boolean exists() {
66 | return false;
67 | }
68 |
69 | public IPersistableElement getPersistable() {
70 | return null;
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/editors/ExecutionDataEditor.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Brock Janiczak - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.editors;
13 |
14 | import org.eclipse.core.runtime.IProgressMonitor;
15 | import org.eclipse.ui.IEditorInput;
16 | import org.eclipse.ui.PartInitException;
17 | import org.eclipse.ui.forms.editor.FormEditor;
18 |
19 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
20 |
21 | /**
22 | * Editor implementation for JaCoCo execution data files.
23 | */
24 | public class ExecutionDataEditor extends FormEditor {
25 |
26 | public static final String ID = "com.mountainminds.eclemma.ui.editors.executiondata"; //$NON-NLS-1$
27 |
28 | private final ExecutionDataContent content = new ExecutionDataContent();
29 |
30 | @Override
31 | protected void addPages() {
32 | try {
33 | addPage(new ExecutedClassesPage(this, content));
34 | addPage(new SessionDataPage(this, content));
35 | } catch (PartInitException e) {
36 | EclEmmaUIPlugin.log(e);
37 | }
38 | }
39 |
40 | @Override
41 | protected void setInput(IEditorInput input) {
42 | super.setInput(input);
43 | setPartName(getEditorInput().getName());
44 | content.load(getEditorInput());
45 | firePropertyChange(PROP_INPUT);
46 | }
47 |
48 | @Override
49 | public boolean isSaveAsAllowed() {
50 | return false;
51 | }
52 |
53 | @Override
54 | public void doSave(IProgressMonitor monitor) {
55 | }
56 |
57 | @Override
58 | public void doSaveAs() {
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/AbstractSessionManagerHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.core.commands.AbstractHandler;
15 | import org.eclipse.core.commands.HandlerEvent;
16 |
17 | import com.mountainminds.eclemma.core.ICoverageSession;
18 | import com.mountainminds.eclemma.core.ISessionListener;
19 | import com.mountainminds.eclemma.core.ISessionManager;
20 |
21 | /**
22 | * Abstract base for handlers that need a {@link ISessionManager} instance.
23 | */
24 | public abstract class AbstractSessionManagerHandler extends AbstractHandler
25 | implements ISessionListener {
26 |
27 | protected final ISessionManager sessionManager;
28 |
29 | protected AbstractSessionManagerHandler(ISessionManager sessionManager) {
30 | this.sessionManager = sessionManager;
31 | sessionManager.addSessionListener(this);
32 | }
33 |
34 | @Override
35 | public void dispose() {
36 | sessionManager.removeSessionListener(this);
37 | }
38 |
39 | public void sessionAdded(ICoverageSession addedSession) {
40 | fireEnabledChanged();
41 | }
42 |
43 | public void sessionRemoved(ICoverageSession removedSession) {
44 | fireEnabledChanged();
45 | }
46 |
47 | public void sessionActivated(ICoverageSession session) {
48 | fireEnabledChanged();
49 | }
50 |
51 | private void fireEnabledChanged() {
52 | fireHandlerChanged(new HandlerEvent(this, true, false));
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/DumpExecutionDataItems.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.jface.action.ContributionItem;
15 | import org.eclipse.swt.SWT;
16 | import org.eclipse.swt.events.SelectionAdapter;
17 | import org.eclipse.swt.events.SelectionEvent;
18 | import org.eclipse.swt.widgets.Menu;
19 | import org.eclipse.swt.widgets.MenuItem;
20 |
21 | import com.mountainminds.eclemma.core.CoverageTools;
22 | import com.mountainminds.eclemma.core.launching.ICoverageLaunch;
23 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
24 |
25 | /**
26 | * Dynamically created menu items for selecting the coverage launch to dump
27 | * execution data from.
28 | */
29 | public class DumpExecutionDataItems extends ContributionItem {
30 |
31 | @Override
32 | public boolean isDynamic() {
33 | return true;
34 | }
35 |
36 | @Override
37 | public void fill(final Menu menu, int index) {
38 | for (ICoverageLaunch launch : CoverageTools.getRunningCoverageLaunches()) {
39 | createItem(menu, index++, launch);
40 | }
41 | }
42 |
43 | private void createItem(final Menu parent, final int index,
44 | final ICoverageLaunch launch) {
45 | final MenuItem item = new MenuItem(parent, SWT.PUSH, index);
46 | item.setImage(EclEmmaUIPlugin.getImage(EclEmmaUIPlugin.ELCL_DUMP));
47 | item.setText(LaunchLabelProvider.getLaunchText(launch));
48 | item.addSelectionListener(new SelectionAdapter() {
49 | @Override
50 | public void widgetSelected(SelectionEvent e) {
51 | DumpExecutionDataHandler.requestDump(launch);
52 | }
53 | });
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/ExportSessionHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import java.util.Collections;
15 |
16 | import org.eclipse.core.commands.Command;
17 | import org.eclipse.core.commands.ExecutionEvent;
18 | import org.eclipse.core.commands.ExecutionException;
19 | import org.eclipse.core.commands.common.CommandException;
20 | import org.eclipse.ui.IWorkbenchCommandConstants;
21 | import org.eclipse.ui.commands.ICommandService;
22 | import org.eclipse.ui.handlers.HandlerUtil;
23 |
24 | import com.mountainminds.eclemma.core.CoverageTools;
25 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
26 | import com.mountainminds.eclemma.internal.ui.wizards.SessionExportWizard;
27 |
28 | /**
29 | * Handler to export a JaCoCo coverage session.
30 | *
31 | * Unlike the default handler for the export command, this implementation does
32 | * not overwrite menu icons and labels.
33 | */
34 | public class ExportSessionHandler extends AbstractSessionManagerHandler {
35 |
36 | public ExportSessionHandler() {
37 | super(CoverageTools.getSessionManager());
38 | }
39 |
40 | @Override
41 | public boolean isEnabled() {
42 | return !sessionManager.getSessions().isEmpty();
43 | }
44 |
45 | public Object execute(ExecutionEvent event) throws ExecutionException {
46 | final ICommandService cs = (ICommandService) HandlerUtil.getActiveSite(
47 | event).getService(ICommandService.class);
48 | final Command command = cs
49 | .getCommand(IWorkbenchCommandConstants.FILE_EXPORT);
50 | final ExecutionEvent importEvent = new ExecutionEvent(command,
51 | Collections.singletonMap("exportWizardId", SessionExportWizard.ID), //$NON-NLS-1$
52 | event.getTrigger(), event.getApplicationContext());
53 | try {
54 | command.executeWithChecks(importEvent);
55 | } catch (CommandException e) {
56 | EclEmmaUIPlugin.log(e);
57 | }
58 | return null;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/ImportSessionHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import java.util.Collections;
15 |
16 | import org.eclipse.core.commands.Command;
17 | import org.eclipse.core.commands.ExecutionEvent;
18 | import org.eclipse.core.commands.ExecutionException;
19 | import org.eclipse.core.commands.common.CommandException;
20 | import org.eclipse.ui.IWorkbenchCommandConstants;
21 | import org.eclipse.ui.commands.ICommandService;
22 | import org.eclipse.ui.handlers.HandlerUtil;
23 |
24 | import com.mountainminds.eclemma.core.CoverageTools;
25 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
26 | import com.mountainminds.eclemma.internal.ui.wizards.SessionImportWizard;
27 |
28 | /**
29 | * Handler to import a JaCoCo coverage session.
30 | *
31 | * Unlike the default handler for the import command, this implementation does
32 | * not overwrite menu icons and labels.
33 | */
34 | public class ImportSessionHandler extends AbstractSessionManagerHandler {
35 |
36 | public ImportSessionHandler() {
37 | super(CoverageTools.getSessionManager());
38 | }
39 |
40 | public Object execute(ExecutionEvent event) throws ExecutionException {
41 | final ICommandService cs = (ICommandService) HandlerUtil.getActiveSite(
42 | event).getService(ICommandService.class);
43 | final Command command = cs
44 | .getCommand(IWorkbenchCommandConstants.FILE_IMPORT);
45 | final ExecutionEvent importEvent = new ExecutionEvent(command,
46 | Collections.singletonMap("importWizardId", SessionImportWizard.ID), //$NON-NLS-1$
47 | event.getTrigger(), event.getApplicationContext());
48 | try {
49 | command.executeWithChecks(importEvent);
50 | } catch (CommandException e) {
51 | EclEmmaUIPlugin.log(e);
52 | }
53 | return null;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/LaunchLabelProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.core.runtime.CoreException;
15 | import org.eclipse.debug.core.ILaunch;
16 | import org.eclipse.debug.core.ILaunchConfiguration;
17 | import org.eclipse.jface.viewers.LabelProvider;
18 | import org.eclipse.swt.graphics.Image;
19 |
20 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
21 | import com.mountainminds.eclemma.internal.ui.UIMessages;
22 |
23 | /**
24 | * Internal label provider for {@link ILaunch} objects.
25 | */
26 | class LaunchLabelProvider extends LabelProvider {
27 |
28 | @Override
29 | public String getText(Object element) {
30 | return getLaunchText((ILaunch) element);
31 | }
32 |
33 | @Override
34 | public Image getImage(Object element) {
35 | return EclEmmaUIPlugin.getImage(EclEmmaUIPlugin.ELCL_DUMP);
36 | }
37 |
38 | public static String getLaunchText(ILaunch launch) {
39 | // new launch configuration
40 | final ILaunchConfiguration config = launch.getLaunchConfiguration();
41 | if (config == null) {
42 | return UIMessages.DumpExecutionDataUnknownLaunch_value;
43 | }
44 | StringBuilder sb = new StringBuilder(config.getName());
45 | sb.append(" ["); //$NON-NLS-1$
46 | try {
47 | sb.append(config.getType().getName());
48 | } catch (CoreException e) {
49 | EclEmmaUIPlugin.log(e);
50 | }
51 | sb.append("]"); //$NON-NLS-1$
52 | return sb.toString();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/OpenSessionExecutionDataHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.core.commands.ExecutionEvent;
15 | import org.eclipse.core.commands.ExecutionException;
16 | import org.eclipse.ui.IEditorInput;
17 | import org.eclipse.ui.IWorkbenchWindow;
18 | import org.eclipse.ui.PartInitException;
19 | import org.eclipse.ui.handlers.HandlerUtil;
20 |
21 | import com.mountainminds.eclemma.core.CoverageTools;
22 | import com.mountainminds.eclemma.core.ICoverageSession;
23 | import com.mountainminds.eclemma.internal.ui.UIMessages;
24 | import com.mountainminds.eclemma.internal.ui.editors.CoverageSessionInput;
25 | import com.mountainminds.eclemma.internal.ui.editors.ExecutionDataEditor;
26 |
27 | /**
28 | * Handler to open the execution data of the current session in an editor.
29 | */
30 | public class OpenSessionExecutionDataHandler extends
31 | AbstractSessionManagerHandler {
32 |
33 | public OpenSessionExecutionDataHandler() {
34 | super(CoverageTools.getSessionManager());
35 | }
36 |
37 | @Override
38 | public boolean isEnabled() {
39 | return sessionManager.getActiveSession() != null;
40 | }
41 |
42 | public Object execute(ExecutionEvent event) throws ExecutionException {
43 | final ICoverageSession session = sessionManager.getActiveSession();
44 | final IEditorInput input = new CoverageSessionInput(session);
45 | final IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
46 | try {
47 | window.getActivePage().openEditor(input, ExecutionDataEditor.ID);
48 | } catch (PartInitException e) {
49 | throw new ExecutionException(
50 | UIMessages.ExecutionDataEditorOpeningError_message, e);
51 | }
52 | return null;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/RelaunchSessionHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.core.commands.ExecutionEvent;
15 | import org.eclipse.core.commands.ExecutionException;
16 | import org.eclipse.debug.core.ILaunchConfiguration;
17 | import org.eclipse.debug.ui.DebugUITools;
18 |
19 | import com.mountainminds.eclemma.core.CoverageTools;
20 | import com.mountainminds.eclemma.core.ICoverageSession;
21 |
22 | /**
23 | * Handler to re-launch the currently active coverage session.
24 | */
25 | public class RelaunchSessionHandler extends AbstractSessionManagerHandler {
26 |
27 | public RelaunchSessionHandler() {
28 | super(CoverageTools.getSessionManager());
29 | }
30 |
31 | @Override
32 | public boolean isEnabled() {
33 | final ICoverageSession session = sessionManager.getActiveSession();
34 | return session != null && session.getLaunchConfiguration() != null;
35 | }
36 |
37 | public Object execute(ExecutionEvent event) throws ExecutionException {
38 | final ICoverageSession session = sessionManager.getActiveSession();
39 | final ILaunchConfiguration config = session.getLaunchConfiguration();
40 | DebugUITools.launch(config, CoverageTools.LAUNCH_MODE);
41 | return null;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/RemoveActiveSessionHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.core.commands.ExecutionEvent;
15 | import org.eclipse.core.commands.ExecutionException;
16 |
17 | import com.mountainminds.eclemma.core.CoverageTools;
18 | import com.mountainminds.eclemma.core.ICoverageSession;
19 |
20 | /**
21 | * Handler to remove the currently active coverage session.
22 | */
23 | public class RemoveActiveSessionHandler extends AbstractSessionManagerHandler {
24 |
25 | public RemoveActiveSessionHandler() {
26 | super(CoverageTools.getSessionManager());
27 | }
28 |
29 | @Override
30 | public boolean isEnabled() {
31 | return sessionManager.getActiveSession() != null;
32 | }
33 |
34 | public Object execute(ExecutionEvent event) throws ExecutionException {
35 | final ICoverageSession session = sessionManager.getActiveSession();
36 | sessionManager.removeSession(session);
37 | return null;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/RemoveAllSessionsHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.core.commands.ExecutionEvent;
15 | import org.eclipse.core.commands.ExecutionException;
16 |
17 | import com.mountainminds.eclemma.core.CoverageTools;
18 |
19 | /**
20 | * Handler to remove all coverage sessions.
21 | */
22 | public class RemoveAllSessionsHandler extends AbstractSessionManagerHandler {
23 |
24 | public RemoveAllSessionsHandler() {
25 | super(CoverageTools.getSessionManager());
26 | }
27 |
28 | @Override
29 | public boolean isEnabled() {
30 | return !sessionManager.getSessions().isEmpty();
31 | }
32 |
33 | public Object execute(ExecutionEvent event) throws ExecutionException {
34 | sessionManager.removeAllSessions();
35 | return null;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/ResetOnDumpHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import java.util.Map;
15 |
16 | import org.eclipse.core.commands.AbstractHandler;
17 | import org.eclipse.core.commands.ExecutionEvent;
18 | import org.eclipse.core.commands.ExecutionException;
19 | import org.eclipse.jface.preference.IPreferenceStore;
20 | import org.eclipse.ui.commands.IElementUpdater;
21 | import org.eclipse.ui.menus.UIElement;
22 |
23 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
24 | import com.mountainminds.eclemma.internal.ui.UIPreferences;
25 |
26 | /**
27 | * Handler to toggle the "reset on dump" option.
28 | */
29 | public class ResetOnDumpHandler extends AbstractHandler implements
30 | IElementUpdater {
31 |
32 | private final IPreferenceStore preferenceStore;
33 |
34 | public ResetOnDumpHandler() {
35 | preferenceStore = EclEmmaUIPlugin.getInstance().getPreferenceStore();
36 | }
37 |
38 | public Object execute(ExecutionEvent event) throws ExecutionException {
39 | final boolean flag = preferenceStore
40 | .getBoolean(UIPreferences.PREF_RESET_ON_DUMP);
41 | preferenceStore.setValue(UIPreferences.PREF_RESET_ON_DUMP, !flag);
42 | return null;
43 | }
44 |
45 | public void updateElement(UIElement element,
46 | @SuppressWarnings("rawtypes") Map parameters) {
47 | element.setChecked(preferenceStore
48 | .getBoolean(UIPreferences.PREF_RESET_ON_DUMP));
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/handlers/SelectActiveSessionsItems.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.handlers;
13 |
14 | import org.eclipse.jface.action.ContributionItem;
15 | import org.eclipse.osgi.util.NLS;
16 | import org.eclipse.swt.SWT;
17 | import org.eclipse.swt.events.SelectionAdapter;
18 | import org.eclipse.swt.events.SelectionEvent;
19 | import org.eclipse.swt.widgets.Menu;
20 | import org.eclipse.swt.widgets.MenuItem;
21 |
22 | import com.mountainminds.eclemma.core.CoverageTools;
23 | import com.mountainminds.eclemma.core.ICoverageSession;
24 | import com.mountainminds.eclemma.core.ISessionManager;
25 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
26 | import com.mountainminds.eclemma.internal.ui.UIMessages;
27 |
28 | /**
29 | * Dynamically created menu items for selecting the current coverage session.
30 | */
31 | public class SelectActiveSessionsItems extends ContributionItem {
32 |
33 | @Override
34 | public boolean isDynamic() {
35 | return true;
36 | }
37 |
38 | @Override
39 | public void fill(final Menu menu, int index) {
40 | final ISessionManager sm = CoverageTools.getSessionManager();
41 | final ICoverageSession activeSession = sm.getActiveSession();
42 | int position = 1;
43 | for (ICoverageSession session : sm.getSessions()) {
44 | createItem(menu, index++, session, session == activeSession, position++,
45 | sm);
46 | }
47 | }
48 |
49 | private void createItem(final Menu parent, final int index,
50 | final ICoverageSession session, final boolean selected,
51 | final int position, final ISessionManager sm) {
52 | final MenuItem item = new MenuItem(parent, SWT.RADIO, index);
53 | item.setImage(EclEmmaUIPlugin.getImage(EclEmmaUIPlugin.ELCL_SESSION));
54 | item.setText(getLabel(session, position));
55 | item.setSelection(selected);
56 | item.addSelectionListener(new SelectionAdapter() {
57 | @Override
58 | public void widgetSelected(SelectionEvent e) {
59 | sm.activateSession(session);
60 | }
61 | });
62 | }
63 |
64 | private String getLabel(ICoverageSession session, int idx) {
65 | return NLS.bind(UIMessages.CoverageViewSelectSessionMenu_label,
66 | Integer.valueOf(idx), session.getDescription());
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/com.mountainminds.eclemma.ui/src/com/mountainminds/eclemma/internal/ui/launching/NoCoverageDataHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2006, 2016 Mountainminds GmbH & Co. KG and Contributors
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Marc R. Hoffmann - initial API and implementation
10 | *
11 | ******************************************************************************/
12 | package com.mountainminds.eclemma.internal.ui.launching;
13 |
14 | import org.eclipse.core.runtime.CoreException;
15 | import org.eclipse.core.runtime.IStatus;
16 | import org.eclipse.debug.core.IStatusHandler;
17 | import org.eclipse.jface.dialogs.MessageDialog;
18 | import org.eclipse.swt.widgets.Shell;
19 |
20 | import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
21 | import com.mountainminds.eclemma.internal.ui.UIMessages;
22 |
23 | /**
24 | * Status handler that issues an error message when no coverage data has been
25 | * found.
26 | */
27 | public class NoCoverageDataHandler implements IStatusHandler {
28 |
29 | public Object handleStatus(IStatus status, Object source)
30 | throws CoreException {
31 |
32 | Shell parent = EclEmmaUIPlugin.getInstance().getShell();
33 | String title = UIMessages.NoCoverageDataError_title;
34 | String message = UIMessages.NoCoverageDataError_message;
35 |
36 | MessageDialog.openError(parent, title, message);
37 | return Boolean.FALSE;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | com.mountainminds.eclemma
5 | eclemma
6 | 2.1.5-SNAPSHOT
7 | pom
8 |
9 |
10 | com.mountainminds.eclemma.build
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------