|
1 | 1 | package com.checkmarx.eclipse.views; |
2 | 2 |
|
3 | | -import java.io.IOException; |
4 | | -import java.net.MalformedURLException; |
5 | | -import java.net.URL; |
6 | | -import java.util.ArrayList; |
7 | | -import java.util.Arrays; |
8 | | -import java.util.Collections; |
9 | | -import java.util.HashSet; |
10 | | -import java.util.List; |
11 | | -import java.util.Optional; |
12 | | -import java.util.Set; |
13 | | -import java.util.UUID; |
14 | | -import javax.inject.Inject; |
| 3 | +import com.checkmarx.ast.codebashing.CodeBashing; |
| 4 | +import com.checkmarx.ast.learnMore.LearnMore; |
| 5 | +import com.checkmarx.ast.learnMore.Sample; |
| 6 | +import com.checkmarx.ast.predicate.Predicate; |
| 7 | +import com.checkmarx.ast.project.Project; |
| 8 | +import com.checkmarx.ast.results.result.Node; |
| 9 | +import com.checkmarx.ast.results.result.PackageData; |
| 10 | +import com.checkmarx.ast.results.result.Result; |
| 11 | +import com.checkmarx.ast.scan.Scan; |
| 12 | +import com.checkmarx.ast.wrapper.CxException; |
| 13 | +import com.checkmarx.eclipse.Activator; |
| 14 | +import com.checkmarx.eclipse.enums.ActionName; |
| 15 | +import com.checkmarx.eclipse.enums.Severity; |
| 16 | +import com.checkmarx.eclipse.utils.CxLogger; |
| 17 | +import com.checkmarx.eclipse.utils.NotificationPopUpUI; |
| 18 | +import com.checkmarx.eclipse.utils.PluginConstants; |
| 19 | +import com.checkmarx.eclipse.utils.PluginUtils; |
| 20 | +import com.checkmarx.eclipse.views.actions.ToolBarActions; |
| 21 | +import com.checkmarx.eclipse.views.filters.FilterState; |
| 22 | +import com.checkmarx.eclipse.views.provider.ColumnProvider; |
| 23 | +import com.checkmarx.eclipse.views.provider.TreeContentProvider; |
| 24 | +import com.google.common.base.Strings; |
| 25 | +import com.google.common.eventbus.EventBus; |
| 26 | +import com.google.common.eventbus.Subscribe; |
15 | 27 | import org.apache.commons.lang3.StringUtils; |
16 | 28 | import org.eclipse.core.resources.IFile; |
17 | 29 | import org.eclipse.core.resources.IMarker; |
18 | | -import org.eclipse.core.runtime.CoreException; |
19 | | -import org.eclipse.core.runtime.IProgressMonitor; |
20 | | -import org.eclipse.core.runtime.IStatus; |
21 | 30 | import org.eclipse.core.runtime.Path; |
22 | | -import org.eclipse.core.runtime.Status; |
| 31 | +import org.eclipse.core.runtime.*; |
23 | 32 | import org.eclipse.core.runtime.jobs.Job; |
24 | | -import org.eclipse.e4.ui.di.UISynchronize; |
25 | 33 | import org.eclipse.jface.action.Action; |
26 | 34 | import org.eclipse.jface.preference.PreferenceDialog; |
27 | | -import org.eclipse.jface.viewers.ArrayContentProvider; |
28 | | -import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; |
29 | | -import org.eclipse.jface.viewers.ComboViewer; |
30 | | -import org.eclipse.jface.viewers.ISelectionChangedListener; |
31 | | -import org.eclipse.jface.viewers.IStructuredSelection; |
32 | | -import org.eclipse.jface.viewers.LabelProvider; |
33 | | -import org.eclipse.jface.viewers.SelectionChangedEvent; |
34 | | -import org.eclipse.jface.viewers.StructuredSelection; |
35 | | -import org.eclipse.jface.viewers.TreeViewer; |
36 | | -import org.eclipse.jface.viewers.TreeViewerColumn; |
| 35 | +import org.eclipse.jface.viewers.*; |
37 | 36 | import org.eclipse.jgit.events.RefsChangedEvent; |
38 | 37 | import org.eclipse.jgit.events.RefsChangedListener; |
39 | 38 | import org.eclipse.jgit.lib.Repository; |
|
44 | 43 | import org.eclipse.swt.events.SelectionAdapter; |
45 | 44 | import org.eclipse.swt.events.SelectionEvent; |
46 | 45 | import org.eclipse.swt.events.SelectionListener; |
47 | | -import org.eclipse.swt.graphics.Color; |
48 | | -import org.eclipse.swt.graphics.Font; |
49 | | -import org.eclipse.swt.graphics.FontData; |
50 | | -import org.eclipse.swt.graphics.Image; |
51 | | -import org.eclipse.swt.graphics.ImageData; |
52 | | -import org.eclipse.swt.graphics.RGB; |
| 46 | +import org.eclipse.swt.graphics.*; |
53 | 47 | import org.eclipse.swt.layout.FillLayout; |
54 | 48 | import org.eclipse.swt.layout.GridData; |
55 | 49 | import org.eclipse.swt.layout.GridLayout; |
56 | | -import org.eclipse.swt.widgets.Button; |
57 | | -import org.eclipse.swt.widgets.Combo; |
58 | | -import org.eclipse.swt.widgets.Composite; |
59 | | -import org.eclipse.swt.widgets.Control; |
60 | | -import org.eclipse.swt.widgets.Display; |
61 | | -import org.eclipse.swt.widgets.Event; |
62 | | -import org.eclipse.swt.widgets.Label; |
63 | | -import org.eclipse.swt.widgets.Link; |
64 | | -import org.eclipse.swt.widgets.Listener; |
65 | | -import org.eclipse.swt.widgets.Shell; |
66 | | -import org.eclipse.swt.widgets.TabFolder; |
67 | | -import org.eclipse.swt.widgets.TabItem; |
68 | | -import org.eclipse.swt.widgets.Text; |
69 | | -import org.eclipse.swt.widgets.TreeColumn; |
| 50 | +import org.eclipse.swt.widgets.*; |
70 | 51 | import org.eclipse.ui.IActionBars; |
71 | 52 | import org.eclipse.ui.IWorkbenchPage; |
72 | 53 | import org.eclipse.ui.PartInitException; |
|
76 | 57 | import org.eclipse.ui.part.ViewPart; |
77 | 58 | import org.osgi.service.event.EventHandler; |
78 | 59 |
|
79 | | -import com.checkmarx.ast.codebashing.CodeBashing; |
80 | | -import com.checkmarx.ast.learnMore.LearnMore; |
81 | | -import com.checkmarx.ast.learnMore.Sample; |
82 | | -import com.checkmarx.ast.predicate.Predicate; |
83 | | -import com.checkmarx.ast.project.Project; |
84 | | -import com.checkmarx.ast.results.result.Node; |
85 | | -import com.checkmarx.ast.results.result.PackageData; |
86 | | -import com.checkmarx.ast.results.result.Result; |
87 | | -import com.checkmarx.ast.scan.Scan; |
88 | | -import com.checkmarx.ast.wrapper.CxException; |
89 | | -import com.checkmarx.eclipse.Activator; |
90 | | -import com.checkmarx.eclipse.enums.ActionName; |
91 | | -import com.checkmarx.eclipse.enums.Severity; |
92 | | -import com.checkmarx.eclipse.utils.CxLogger; |
93 | | -import com.checkmarx.eclipse.utils.NotificationPopUpUI; |
94 | | -import com.checkmarx.eclipse.utils.PluginConstants; |
95 | | -import com.checkmarx.eclipse.utils.PluginUtils; |
96 | | -import com.checkmarx.eclipse.views.actions.ToolBarActions; |
97 | | -import com.checkmarx.eclipse.views.filters.FilterState; |
98 | | -import com.checkmarx.eclipse.views.provider.ColumnProvider; |
99 | | -import com.checkmarx.eclipse.views.provider.TreeContentProvider; |
100 | | -import com.google.common.base.Strings; |
101 | | -import com.google.common.eventbus.EventBus; |
102 | | -import com.google.common.eventbus.Subscribe; |
| 60 | +import java.io.IOException; |
| 61 | +import java.net.MalformedURLException; |
| 62 | +import java.net.URL; |
| 63 | +import java.util.List; |
| 64 | +import java.util.*; |
103 | 65 |
|
104 | 66 | public class CheckmarxView extends ViewPart implements EventHandler { |
105 | 67 |
|
@@ -160,9 +122,7 @@ public class CheckmarxView extends ViewPart implements EventHandler { |
160 | 122 |
|
161 | 123 | Font boldFont, titleFont; |
162 | 124 |
|
163 | | - @Inject |
164 | | - UISynchronize sync; |
165 | | - |
| 125 | + UISynchronizeImpl sync; |
166 | 126 | private Composite resultViewComposite; |
167 | 127 | private Composite attackVectorCompositePanel; |
168 | 128 | private Composite titleComposite; |
@@ -200,7 +160,7 @@ public class CheckmarxView extends ViewPart implements EventHandler { |
200 | 160 |
|
201 | 161 | public CheckmarxView() { |
202 | 162 | super(); |
203 | | - |
| 163 | + sync = new UISynchronizeImpl(PlatformUI.getWorkbench().getDisplay()); |
204 | 164 | rootModel = new DisplayModel.DisplayModelBuilder(PluginConstants.EMPTY_STRING).build(); |
205 | 165 | globalSettings.loadSettings(); |
206 | 166 | currentProjectId = globalSettings.getProjectId(); |
|
0 commit comments