Skip to content

Commit

Permalink
Cleanup and conversion to Java
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Jun 23, 2024
1 parent 6e7a2f7 commit e180455
Show file tree
Hide file tree
Showing 18 changed files with 78 additions and 197 deletions.
38 changes: 1 addition & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps:
# - Validate Gradle Wrapper.
# - Run 'test' and 'verifyPlugin' tasks.
# - Run Qodana inspections.
# - Run the 'buildPlugin' task and prepare artifact for further tests.
# - Run the 'runPluginVerifier' task.
# - Create a draft release.
Expand Down Expand Up @@ -139,41 +138,6 @@ jobs:
with:
files: ${{ github.workspace }}/build/reports/kover/report.xml

# Run Qodana inspections and provide report
inspectCode:
name: Inspect code
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/[email protected]
with:
cache-default-branch-only: true

# Run plugin structure verification along with IntelliJ Plugin Verifier
verify:
name: Verify plugin
Expand Down Expand Up @@ -229,7 +193,7 @@ jobs:
releaseDraft:
name: Release draft
if: github.event_name != 'pull_request'
needs: [ build, test, inspectCode, verify ]
needs: [ build, test, verify ]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Keep a Changelog guide -> https://keepachangelog.com -->

# bld-idea Changelog
# bld Changelog

## [Unreleased]
### Added
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,27 @@

## Template ToDo list
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
- [ ] Get familiar with the [template documentation][template].
- [ ] Adjust the [pluginGroup](./gradle.properties) and [pluginName](./gradle.properties), as well as the [id](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin).
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
- [x] Get familiar with the [template documentation][template].
- [x] Adjust the [pluginGroup](./gradle.properties) and [pluginName](./gradle.properties), as well as the [id](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin).
- [x] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
- [x] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to the marketplace.
- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables).
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.

<!-- Plugin description -->
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
Support for the `bld` build tool: https://rife2.com/bld

This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process.

To keep everything working, do not remove `<!-- ... -->` sections.
This is a preliminary scaffold, nothing is intended to work yet.
<!-- Plugin description end -->

## Installation

- Using the IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "bld-idea"</kbd> >
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "bld"</kbd> >
<kbd>Install</kbd>

- Manually:
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = com.github.gbevin.bldidea
pluginName = bld-idea
pluginGroup = bld.idea
pluginName = bld
pluginRepositoryUrl = https://github.com/rife2/bld-idea
# SemVer format -> https://semver.org
pluginVersion = 0.0.1
pluginVersion = 0.1.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 232
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package rife.bld.idea.listeners;

import com.intellij.openapi.application.ApplicationActivationListener;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.wm.IdeFrame;
import org.jetbrains.annotations.NotNull;

public class BldApplicationActivationListener implements ApplicationActivationListener {
@Override
public void applicationActivated(@NotNull IdeFrame ideFrame) {
Logger.getInstance(BldApplicationActivationListener.class).info("bld application activated");
}
}
31 changes: 31 additions & 0 deletions src/main/java/rife/bld/idea/toolWindow/BldToolWindowFactory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package rife.bld.idea.toolWindow;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.ui.components.JBLabel;
import com.intellij.ui.components.JBPanel;
import com.intellij.ui.content.ContentFactory;
import org.jetbrains.annotations.NotNull;

import java.awt.*;

public class BldToolWindowFactory implements ToolWindowFactory {
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
var window = new BldToolWindow(toolWindow);
var content = ContentFactory.getInstance().createContent(window.getContent(), null, false);
toolWindow.getContentManager().addContent(content);
}

static class BldToolWindow {
public BldToolWindow(ToolWindow toolWindow) {
}

public JBPanel<?> getContent() {
var panel = new JBPanel<>(new BorderLayout());
panel.add(new JBLabel("This is the bld tool window"));
return panel;
}
}
}
20 changes: 0 additions & 20 deletions src/main/kotlin/com/github/gbevin/bldidea/MyBundle.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 5 additions & 5 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<id>com.github.gbevin.bldidea</id>
<name>bld-idea</name>
<id>rife.bld.idea</id>
<name>bld</name>
<vendor>gbevin</vendor>

<depends>com.intellij.modules.platform</depends>

<resource-bundle>messages.MyBundle</resource-bundle>
<resource-bundle>messages.BldBundle</resource-bundle>

<extensions defaultExtensionNs="com.intellij">
<toolWindow factoryClass="com.github.gbevin.bldidea.toolWindow.MyToolWindowFactory" id="MyToolWindow"/>
<toolWindow factoryClass="rife.bld.idea.toolWindow.BldToolWindowFactory" id="MyToolWindow"/>
</extensions>

<applicationListeners>
<listener class="com.github.gbevin.bldidea.listeners.MyApplicationActivationListener" topic="com.intellij.openapi.application.ApplicationActivationListener"/>
<listener class="rife.bld.idea.listeners.BldApplicationActivationListener" topic="com.intellij.openapi.application.ApplicationActivationListener"/>
</applicationListeners>
</idea-plugin>
13 changes: 13 additions & 0 deletions src/main/resources/META-INF/pluginIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/messages/BldBundle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name=bld
applicationService=Application service
projectService=Project service: {0}
3 changes: 0 additions & 3 deletions src/main/resources/messages/MyBundle.properties

This file was deleted.

39 changes: 0 additions & 39 deletions src/test/kotlin/com/github/gbevin/bldidea/MyPluginTest.kt

This file was deleted.

3 changes: 0 additions & 3 deletions src/test/testData/rename/foo.xml

This file was deleted.

3 changes: 0 additions & 3 deletions src/test/testData/rename/foo_after.xml

This file was deleted.

0 comments on commit e180455

Please sign in to comment.