Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Jul 20, 2024
1 parent 7551ad0 commit e06a197
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ final class BldProjectEditMainAction extends AnAction implements DumbAware {
private final Project project_;

public BldProjectEditMainAction(Project project) {
super(BldBundle.messagePointer("edit.bld.command.action.name"),
BldBundle.messagePointer("edit.bld.command.action.description"), AllIcons.Actions.Edit);
super(BldBundle.messagePointer("bld.action.edit.name"),
BldBundle.messagePointer("bld.action.edit.description"), AllIcons.Actions.Edit);

project_ = project;
}
Expand All @@ -35,7 +35,7 @@ public void actionPerformed(@NotNull AnActionEvent e) {
@Override
public void update(@NotNull AnActionEvent event) {
final var presentation = event.getPresentation();
presentation.setText(BldBundle.messagePointer("edit.bld.command.action.name"));
presentation.setText(BldBundle.messagePointer("bld.action.edit.name"));
presentation.setEnabled(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.psi.JavaPsiFacade;
import com.intellij.psi.search.GlobalSearchScope;
import org.jetbrains.annotations.NotNull;
import rife.bld.idea.execution.BldExecution;
import rife.bld.idea.utils.BldBundle;
Expand All @@ -17,8 +15,8 @@ final class BldProjectEditPropertiesAction extends AnAction implements DumbAware
private final Project project_;

public BldProjectEditPropertiesAction(Project project) {
super(BldBundle.messagePointer("properties.bld.command.action.name"),
BldBundle.messagePointer("properties.bld.command.action.description"), AllIcons.Actions.EditScheme);
super(BldBundle.messagePointer("bld.action.properties.name"),
BldBundle.messagePointer("bld.action.properties.description"), AllIcons.Actions.EditScheme);

project_ = project;
}
Expand All @@ -34,7 +32,7 @@ public void actionPerformed(@NotNull AnActionEvent e) {
@Override
public void update(@NotNull AnActionEvent event) {
final var presentation = event.getPresentation();
presentation.setText(BldBundle.messagePointer("properties.bld.command.action.name"));
presentation.setText(BldBundle.messagePointer("bld.action.properties.name"));
presentation.setEnabled(BldExecution.getInstance(project_).hasBldProperties());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ final class BldProjectOfflineAction extends ToggleAction implements DumbAware {
private final Project project_;

public BldProjectOfflineAction(Project project) {
super(BldBundle.messagePointer("offline.bld.command.action.name"),
BldBundle.messagePointer("offline.bld.command.action.description"), AllIcons.Actions.OfflineMode);
super(BldBundle.messagePointer("bld.action.offline.name"),
BldBundle.messagePointer("bld.action.offline.description"), AllIcons.Actions.OfflineMode);
project_ = project;
}

Expand All @@ -38,7 +38,7 @@ public void setSelected(@NotNull AnActionEvent e, boolean state) {
@Override
public void update(@NotNull AnActionEvent event) {
final var presentation = event.getPresentation();
presentation.setText(BldBundle.messagePointer("offline.bld.command.action.name"));
presentation.setText(BldBundle.messagePointer("bld.action.offline.name"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ final class BldProjectRefreshAction extends AnAction implements DumbAware {
private final Project project_;

public BldProjectRefreshAction(Project project) {
super(BldBundle.messagePointer("refresh.bld.command.action.name"),
BldBundle.messagePointer("refresh.bld.command.action.description"), AllIcons.Actions.Refresh);
super(BldBundle.messagePointer("bld.action.refresh.name"),
BldBundle.messagePointer("bld.action.refresh.description"), AllIcons.Actions.Refresh);
project_ = project;
}

Expand All @@ -41,7 +41,7 @@ public void run(@NotNull ProgressIndicator indicator) {
@Override
public void update(@NotNull AnActionEvent event) {
final var presentation = event.getPresentation();
presentation.setText(BldBundle.messagePointer("refresh.bld.command.action.name"));
presentation.setText(BldBundle.messagePointer("bld.action.refresh.name"));
presentation.setEnabled(true);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/rife/bld/idea/project/BldProjectRunAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ final class BldProjectRunAction extends AnAction implements DumbAware {
private final BldProjectWindow projectWindow_;

public BldProjectRunAction(BldProjectWindow projectWindow) {
super(BldBundle.messagePointer("run.bld.command.action.name"),
BldBundle.messagePointer("run.bld.command.action.description"), AllIcons.Actions.Execute);
super(BldBundle.messagePointer("bld.action.run.name"),
BldBundle.messagePointer("bld.action.run.description"), AllIcons.Actions.Execute);

projectWindow_ = projectWindow;
}
Expand All @@ -26,7 +26,7 @@ public void actionPerformed(@NotNull AnActionEvent e) {
@Override
public void update(@NotNull AnActionEvent event) {
final var presentation = event.getPresentation();
presentation.setText(BldBundle.messagePointer("run.bld.command.action.name"));
presentation.setText(BldBundle.messagePointer("bld.action.run.name"));
presentation.setEnabled(true);
presentation.setEnabled(projectWindow_.canRunSelection());
}
Expand Down
20 changes: 10 additions & 10 deletions src/main/resources/messages/BldBundle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name=bld
bld.command.terminated=\nbld command was terminated\!\n
refresh.bld.command.action.name=Refresh
refresh.bld.command.action.description=Refresh the bld commands
run.bld.command.action.name=Run
run.bld.command.action.description=Run the selected command(s) with bld
edit.bld.command.action.name=Edit Main
edit.bld.command.action.description=Edit the bld main class
offline.bld.command.action.name=Toggle Offline Mode
offline.bld.command.action.description=Work with or without internet
properties.bld.command.action.name=Edit Properties
properties.bld.command.action.description=Edit the bld wrapper properties
bld.action.refresh.name=Refresh
bld.action.refresh.description=Refresh the bld commands
bld.action.run.name=Run
bld.action.run.description=Run the selected command(s) with bld
bld.action.edit.name=Edit Main
bld.action.edit.description=Edit the bld main class
bld.action.offline.name=Toggle Offline Mode
bld.action.offline.description=Work with or without internet
bld.action.properties.name=Edit Properties
bld.action.properties.description=Edit the bld wrapper properties
progress.text.loading.bld.config=Loading bld configuration...
bld.empty.text=No bld commands found.
bld.project.commands=Commands
Expand Down

0 comments on commit e06a197

Please sign in to comment.