Skip to content

Commit

Permalink
Removed obsolete API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Oct 19, 2024
1 parent ead9d26 commit c16395b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static boolean isValidDataType(@NotNull AutomateConstants.AttributeDataTy
if (value == null) {
return false;
}
return NumberUtils.isNumber(value);
return NumberUtils.isCreatable(value);

case DATETIME:
if (value == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.actionSystem.ex.ComboBoxAction;
import jezzsantos.automate.plugin.application.IAutomateApplication;
Expand Down Expand Up @@ -55,11 +56,11 @@ public void update(@NotNull AnActionEvent e) {
}

@Override
protected @NotNull DefaultActionGroup createPopupActionGroup(JComponent component) {
protected @NotNull DefaultActionGroup createPopupActionGroup(@NotNull JComponent button, @NotNull DataContext dataContext) {

final var actions = new DefaultActionGroup();

var project = DataManager.getInstance().getDataContext(component).getData(CommonDataKeys.PROJECT);
var project = DataManager.getInstance().getDataContext(button).getData(CommonDataKeys.PROJECT);
if (project != null) {
var application = IAutomateApplication.getInstance(project);
if (application.isCliInstalled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.actionSystem.ex.ComboBoxAction;
import jezzsantos.automate.plugin.application.IAutomateApplication;
Expand Down Expand Up @@ -58,11 +59,11 @@ public void update(@NotNull AnActionEvent e) {
}

@Override
protected @NotNull DefaultActionGroup createPopupActionGroup(JComponent component) {
protected @NotNull DefaultActionGroup createPopupActionGroup(@NotNull JComponent button, @NotNull DataContext dataContext) {

final var actions = new DefaultActionGroup();

var project = DataManager.getInstance().getDataContext(component).getData(CommonDataKeys.PROJECT);
var project = DataManager.getInstance().getDataContext(button).getData(CommonDataKeys.PROJECT);
if (project != null) {
var application = IAutomateApplication.getInstance(project);
if (application.isCliInstalled()) {
Expand Down

0 comments on commit c16395b

Please sign in to comment.