Skip to content

Commit

Permalink
Merge pull request #95 from edgafner/release_aug_2023
Browse files Browse the repository at this point in the history
Rename Plugin
  • Loading branch information
Jonatha1983 committed Aug 22, 2023
2 parents 7d7444c + ca8c279 commit 1c9c3af
Show file tree
Hide file tree
Showing 17 changed files with 114 additions and 93 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Fixed
- Remove deprecated `org.jetbrains.intellij` dependency

## [1.0.43] - 2023-07-31

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GIB

![Build](https://github.com/Jonatha1983/GIB/workflows/Build/badge.svg)
[![Build](https://github.com/edgafner/GIdeaBrowser/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/edgafner/GIdeaBrowser/actions/workflows/build.yml)
[![codecov](https://codecov.io/github/edgafner/GIdeaBrowser/branch/main/graph/badge.svg?token=FNLVYK2SJY)](https://codecov.io/github/edgafner/GIdeaBrowser)
[![Version](https://img.shields.io/jetbrains/plugin/v/14458-gideabrowser.svg)](https://plugins.jetbrains.com/plugin/14458-gideabrowser)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/14458-gideabrowser.svg)](https://plugins.jetbrains.com/plugin/14458-gideabrowser)
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
# IntelliJ Platform Artifacts Repositories
# -> https://www.jetbrains.org/intellij/sdk/docs/reference_guide/intellij_artifacts.html
pluginGroup=com.github.jonatha1983.gib
pluginName=GIdeaBrowser
pluginName=GBrowser
pluginRepositoryUrl=https://github.com/edgafner/GIdeaBrowser
pluginVersion=1.0.43
pluginVersion=1.0.44
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=231
pluginSinceBuild=232.1
pluginUntilBuild=232.*
platformType=IC
platformVersion=2023.1
platformVersion=2023.2
# Plugin Dependencies -> https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins=com.intellij.java
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
gradleVersion=8.2.1
gradleVersion=8.3
# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
# suppress inspection "UnusedProperty"
kotlin.stdlib.default.dependency=false
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = "GIdeaBrowser"
rootProject.name = "GBrowser"
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import org.jetbrains.annotations.NonNls
import org.jetbrains.annotations.PropertyKey

@NonNls
private const val BUNDLE = "messages.GIdeaBrowserBundle"
private const val BUNDLE = "messages.GBrowserBundle"

@Suppress("unused")
object GIdeaBrowserBundle : AbstractBundle(BUNDLE) {
object GBrowserBundle : AbstractBundle(BUNDLE) {

@Suppress("SpreadOperator")
@JvmStatic
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/github/gib/GivToolWindowFactory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GivToolWindowFactory : ToolWindowFactory, DumbAware {

companion object{
@Suppress("unused")
const val GIDEA_BROWSER_TOOL_WINDOW_ID = "GIdeaBrowser"
const val GBROWSER_TOOL_WINDOW_ID = "GBrowser"
}

}
6 changes: 3 additions & 3 deletions src/main/kotlin/com/github/gib/actions/GMoreAction.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.github.gib.actions

import com.github.gib.GCookieManagerDialog
import com.github.gib.GIdeaBrowserBundle
import com.github.gib.GBrowserBundle
import com.github.gib.GivMainPanel
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
Expand All @@ -13,7 +13,7 @@ import javax.swing.Icon
var zoomLevel = 0.0

class GZoomOutAction(private val jbCefBrowser: JBCefBrowser, icon: Icon) :
AnAction(GIdeaBrowserBundle.message("actions.zoom.out.text"), "", icon), DumbAware {
AnAction(GBrowserBundle.message("actions.zoom.out.text"), "", icon), DumbAware {

override fun update(e: AnActionEvent) {
e.presentation.isEnabled = true
Expand All @@ -27,7 +27,7 @@ class GZoomOutAction(private val jbCefBrowser: JBCefBrowser, icon: Icon) :
}

class GZoomInAction(private val jbCefBrowser: JBCefBrowser, icon: Icon) :
AnAction(GIdeaBrowserBundle.message("actions.zoom.in.text"), "", icon), DumbAware {
AnAction(GBrowserBundle.message("actions.zoom.in.text"), "", icon), DumbAware {


override fun update(e: AnActionEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class GSearchFieldAction(text: String, description: String, icon: Icon, private
val border = urlTextField.border
val emptyBorder: Border = JBUI.Borders.empty(3, 0, 2, 0)
if (border is CompoundBorder) {
if (!StartupUiUtil.isUnderDarcula()) {
if (!StartupUiUtil.isUnderDarcula) {
urlTextField.border = CompoundBorder(emptyBorder, border.insideBorder)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.intellij.openapi.components.State
import com.intellij.openapi.components.Storage
import com.intellij.openapi.diagnostic.logger

@State(name = "GivServiceSettings", storages = [Storage(value = "gidea_browser.xml")], category = SettingsCategory.TOOLS)
@State(name = "GivServiceSettings", storages = [Storage(value = "gbrowser.xml")], category = SettingsCategory.TOOLS)
class GivServiceSettings : PersistentStateComponent<GivServiceSettings.State> {

private val lock = Any()
Expand Down
44 changes: 32 additions & 12 deletions src/main/kotlin/com/github/gib/settings/ProjectSettingsComponent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import com.intellij.ui.ToolbarDecorator
import com.intellij.ui.components.JBLabel
import com.intellij.ui.components.JBScrollPane
import com.intellij.ui.components.JBTextField
import com.intellij.ui.dsl.builder.Align
import com.intellij.ui.dsl.builder.LabelPosition.TOP
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.table.TableView
import com.intellij.util.ui.*
import javax.swing.JComponent
Expand Down Expand Up @@ -39,10 +42,20 @@ class ProjectSettingsComponent {
favoritesWebScrollPanel.preferredSize = JBUI.size(400, 200)
favoritesWebScrollPanel.putClientProperty(UIUtil.KEEP_BORDER_SIDES, SideBorder.ALL)

val favoritesWebTablePanel =
UI.PanelFactory.panel(favoritesWebScrollPanel).withLabel("Bookmarks").withComment("Add and Remove favorites web pages")
.resizeY(true).moveLabelOnTop()
.createPanel()
val favoritesWebTablePanel = panel {
row {
cell(favoritesWebScrollPanel)
.label("Bookmarks", TOP)
.comment("Add and Remove favorites web pages")
.align(Align.FILL)
}
}.apply {
// Border is required to have more space - otherwise there could be issues with focus ring.
// `getRegularPanelInsets()` is used to simplify border calculation for dialogs where this panel is used.
border = JBEmptyBorder(UIUtil.getRegularPanelInsets())

}



val uriRegex = UriRegexColumnInfo()
Expand All @@ -60,16 +73,23 @@ class ProjectSettingsComponent {
headersOverwriteScrollPanel.preferredSize = JBUI.size(400, 200)
headersOverwriteScrollPanel.putClientProperty(UIUtil.KEEP_BORDER_SIDES, SideBorder.ALL)

val headersOverwriteTablePanel =
UI.PanelFactory.panel(headersOverwriteScrollPanel)
.withLabel("Headers")
.withComment("Add and Remove headers. The overwrite column is used to overwrite the header if it already exists in the request.",
false)
.resizeY(true).moveLabelOnTop()
.createPanel()
val headersOverwriteTablePanel = panel {
row {
cell(headersOverwriteScrollPanel)
.label("Headers", TOP)
.comment("Add and Remove headers. The overwrite column is used to overwrite the header if it already exists in the request.")
.align(Align.FILL)
}.resizableRow()
}.apply {
// Border is required to have more space - otherwise there could be issues with focus ring.
// `getRegularPanelInsets()` is used to simplify border calculation for dialogs where this panel is used.
border = JBEmptyBorder(UIUtil.getRegularPanelInsets())

}


myMainPanel = FormBuilder.createFormBuilder()
.addLabeledComponent(JBLabel("GIdea default home page"), homePageText, 1, false)
.addLabeledComponent(JBLabel("GBrowser default home page"), homePageText, 1, false)
.addComponent(favoritesWebTablePanel)
.addComponent(headersOverwriteTablePanel)
.addComponentFillVertically(JPanel(), 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ProjectSettingsConfigurable : SearchableConfigurable {
}

override fun getDisplayName(): String {
return "GIdea Embedded Browser"
return "GBrowser"
}

override fun getId(): String {
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<idea-plugin>
<id>com.gafner.giv</id>
<name>GIdeaBrowser</name>
<name>GBrowser</name>
<vendor email="jgafner@dorkag.com">Dorkag</vendor>

<description><![CDATA[
Expand All @@ -12,7 +12,7 @@
on how to target different products -->
<depends>com.intellij.modules.platform</depends>

<resource-bundle>messages.GIdeaBrowserBundle</resource-bundle>
<resource-bundle>messages.GBrowserBundle</resource-bundle>

<extensions defaultExtensionNs="com.intellij">
<!-- Add your extensions here -->
Expand All @@ -22,11 +22,11 @@
<applicationService serviceImplementation="com.github.gib.services.GivServiceSettings"/>
<projectConfigurable parentId="tools" instance="com.github.gib.settings.ProjectSettingsConfigurable"
id="com.github.gib.settings.ProjectSettingsConfigurable"
displayName="GIdea Embedded Browser"
displayName="GBrowser"
/>


<toolWindow id="GIdeaBrowser" icon="/icons/youtube.svg" anchor="left"
<toolWindow id="GBrowser" icon="/icons/gbrowser.svg" anchor="left"
factoryClass="com.github.gib.GivToolWindowFactory"/>

</extensions>
Expand Down
3 changes: 1 addition & 2 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.
Binary file removed src/main/resources/icons/cookie.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name=GIdeaBrowser
name=GBrowser
actions.zoom.in.text=Zoom In
actions.zoom.out.text=Zoom Out

0 comments on commit 1c9c3af

Please sign in to comment.