Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import com.checkmarx.eclipse.enums.ActionName;
import com.checkmarx.eclipse.enums.Severity;
import com.checkmarx.eclipse.utils.PluginConstants;
import com.checkmarx.eclipse.views.actions.ActionName;
import com.checkmarx.eclipse.views.actions.ToolBarActions;
import com.checkmarx.eclipse.views.filters.Severity;

import checkmarx.ast.eclipse.plugin.tests.common.Environment;

Expand Down
1 change: 1 addition & 0 deletions checkmarx-ast-eclipse-plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime;bundle-version="3.22.0",
org.eclipse.jdt.core;bundle-version="3.26.0",
org.eclipse.ui.ide;bundle-version="3.18.300",
org.eclipse.jgit,
com.google.guava
Automatic-Module-Name: com.checkmarx.eclipse
Bundle-RequiredExecutionEnvironment: JavaSE-11
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.checkmarx.eclipse.views.actions;
package com.checkmarx.eclipse.enums;

public enum ActionName {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.checkmarx.eclipse.views;
package com.checkmarx.eclipse.enums;

public enum PluginListenerType {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.checkmarx.eclipse.views.filters;
package com.checkmarx.eclipse.enums;

public enum Severity {

CRITICAL,
HIGH,
MEDIUM,
LOW,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.checkmarx.eclipse.utils;

public class PluginConstants {
public static final String EMPTY_STRING = "";
public static final String SAST = "sast";
public static final String SCA_DEPENDENCY = "dependency";
public static final String KICS_INFRASTRUCTURE = "infrastructure";
public static final String RETRIEVING_RESULTS_FOR_SCAN = "Retrieving results for scan id %s...";
public static final String COMBOBOX_SCAND_ID_PLACEHOLDER = "Select project or paste a Scan Id here and hit Enter.";
public static final String COMBOBOX_SCAND_ID_PLACEHOLDER = "Select a project or paste a Scan Id here and hit Enter.";
public static final String COMBOBOX_SCAND_ID_GETTING_SCANS = "Getting scans for the project...";
public static final String COMBOBOX_SCAND_ID_NO_SCANS_AVAILABLE = "No scans available.";
public static final String COMBOBOX_SCAND_ID_NO_SCANS_AVAILABLE = "No scans available. Select a project or paste a Scan Id here and hit Enter.";
public static final String COMBOBOX_BRANCH_CHANGING = "Changing branch...";

/******************************** LOG VIEW: ERRORS ********************************/
public static final String ERROR_AUTHENTICATING_AST = "An error occurred while trying to authenticate to AST: %s";
Expand All @@ -18,6 +20,7 @@ public class PluginConstants {
public static final String ERROR_GETTING_RESULTS = "An error occurred while getting results for scan id %s: %s";
public static final String ERROR_OPENING_FILE = "An error occurred while opening file: %s";
public static final String ERROR_FINDING_FILE = "An error occurred while finding file in workspace: %s";
public static final String ERROR_GETTING_GIT_BRANCH = "An error occurred while getting git branch: %s";

/******************************** LOG VIEW: INFO ********************************/
public static final String INFO_AUTHENTICATION_STATUS = "Authentication Status: %s";
Expand All @@ -32,4 +35,5 @@ public class PluginConstants {
/******************************** TREE MESSAGES ********************************/
public static final String TREE_PROVIDED_SCAN_ID_DOES_NOT_EXIST = "Provided scan id %s does not exist";
public static final String TREE_INVALID_SCAN_ID_FORMAT = "Invalid scan id format.";
public static final String TREE_NO_RESULTS = "No results.";
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.TreeViewer;

import com.checkmarx.eclipse.enums.ActionName;
import com.checkmarx.eclipse.views.DataProvider;
import com.checkmarx.eclipse.views.DisplayModel;
import com.checkmarx.eclipse.views.actions.ActionName;
import com.checkmarx.eclipse.views.filters.FilterState;

public class PluginUtils {
Expand Down Expand Up @@ -82,7 +82,7 @@ public static void updateFiltersEnabledAndCheckedState(List<Action> filterAction
for (Action action : filterActions) {
// avoid to disable group by severity and group by query name actions
if (!action.getId().equals(ActionName.GROUP_BY_SEVERITY.name()) && !action.getId().equals(ActionName.GROUP_BY_QUERY_NAME.name())) {
action.setEnabled(DataProvider.getInstance().getCurrentScanId() != null);
action.setEnabled(DataProvider.getInstance().containsResults());
}

action.setChecked(FilterState.isSeverityEnabled(action.getId()));
Expand Down
Loading