Use lobok yooo 😆💙

This commit is contained in:
Anas Elgarhy 2022-08-24 16:11:46 +02:00
parent 13d2fa7102
commit a60dc48180
9 changed files with 34 additions and 87 deletions

View file

@ -16,6 +16,12 @@ dependencies {
implementation("com.miglayout:miglayout-swing:11.0")
// implementation("com.github.goxr3plus:java-stream-player:10.0.2")
implementation("com.googlecode.soundlibs:jlayer:1.0.1.4")
compileOnly("org.projectlombok:lombok:1.18.24")
annotationProcessor("org.projectlombok:lombok:1.18.24")
testImplementation("org.projectlombok:lombok:1.18.24")
testAnnotationProcessor("org.projectlombok:lombok:1.18.24")
}
java {
sourceCompatibility = JavaVersion.VERSION_11

View file

@ -1,6 +1,7 @@
package com.anas.intellij.plugins.ayah.settings;
import com.anas.intellij.plugins.ayah.NotificationTimer;
import com.anas.intellij.plugins.ayah.settings.userinterface.SettingsComponent;
import com.intellij.openapi.options.Configurable;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.Nullable;

View file

@ -7,15 +7,18 @@ import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import lombok.Getter;
import lombok.Setter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
/**
* @author: <a href="https://github.com/anas-elgarhy">Anas Elgarhy</a>
* @date: 8/19/22
*/
@Getter
@Setter
@State(
name = "com.anas.intellij.plugins.ayah.settings.AyahSettingsState",
storages = @Storage("ayah.xml")
@ -47,36 +50,4 @@ public class AyahSettingsState implements PersistentStateComponent<AyahSettingsS
public void loadState(@NotNull final AyahSettingsState state) {
XmlSerializerUtil.copyBean(state, this);
}
public BasmalhOnStart getBasmalhOnStart() {
return basmalhOnStart;
}
public void setBasmalhOnStart(final BasmalhOnStart basmalhOnStart) {
this.basmalhOnStart = basmalhOnStart;
}
public int getIntervalTimeBetweenNotifications() {
return intervalTimeBetweenNotifications;
}
public void setIntervalTimeBetweenNotifications(final int intervalTimeBetweenNotifications) {
this.intervalTimeBetweenNotifications = intervalTimeBetweenNotifications;
}
public boolean isAutoPlayAudio() {
return autoPlayAudio;
}
public void setAutoPlayAudio(final boolean autoPlayAudio) {
this.autoPlayAudio = autoPlayAudio;
}
public SelectedEdition getEdition() {
return edition;
}
public void setEdition(final SelectedEdition edition) {
this.edition = edition;
}
}

View file

@ -1,14 +1,14 @@
package com.anas.intellij.plugins.ayah.settings;
import com.anas.alqurancloudapi.edition.Edition;
import com.anas.alqurancloudapi.edition.EditionFormat;
import java.io.IOException;
import lombok.Getter;
import lombok.Setter;
/**
* @author: <a href="https://github.com/anas-elgarhy">Anas Elgarhy</a>
* @date: 8/19/22
*/
@Getter
@Setter
public class BasmalhOnStart {
private boolean isActive;
private boolean isSoundActive;
@ -19,28 +19,4 @@ public class BasmalhOnStart {
isSoundActive = false;
edition = new SelectedEdition();
}
public boolean isActive() {
return isActive;
}
public void setActive(final boolean active) {
isActive = active;
}
public boolean isSoundActive() {
return isSoundActive;
}
public void setSoundActive(final boolean soundActive) {
isSoundActive = soundActive;
}
public SelectedEdition getEdition() {
return edition;
}
public void setEdition(final SelectedEdition edition) {
this.edition = edition;
}
}

View file

@ -2,6 +2,9 @@ package com.anas.intellij.plugins.ayah.settings;
import com.anas.alqurancloudapi.edition.Edition;
import com.anas.alqurancloudapi.edition.EditionFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import java.io.IOException;
@ -9,6 +12,9 @@ import java.io.IOException;
* @author: <a href="https://github.com/anas-elgarhy">Anas Elgarhy</a>
* @date: 8/21/22
*/
@AllArgsConstructor
@Getter
@Setter
public class SelectedEdition {
private String editionIdentifier;
private int index;
@ -22,27 +28,4 @@ public class SelectedEdition {
}
index = 0;
}
public SelectedEdition(final String editionIdentifier, final int index) {
this.editionIdentifier = editionIdentifier;
this.index = index;
}
public String getEditionIdentifier() {
return editionIdentifier;
}
// For XML serialization
public void setEditionIdentifier(final String editionIdentifier) {
this.editionIdentifier = editionIdentifier;
}
public int getIndex() {
return index;
}
// For XML serialization
public void setIndex(final int index) {
this.index = index;
}
}

View file

@ -1,4 +1,4 @@
package com.anas.intellij.plugins.ayah.settings;
package com.anas.intellij.plugins.ayah.settings.userinterface;
import javax.swing.*;
import javax.swing.border.Border;

View file

@ -1,4 +1,4 @@
package com.anas.intellij.plugins.ayah.settings;
package com.anas.intellij.plugins.ayah.settings.userinterface;
import com.anas.alqurancloudapi.edition.Edition;

View file

@ -1,8 +1,11 @@
package com.anas.intellij.plugins.ayah.settings;
package com.anas.intellij.plugins.ayah.settings.userinterface;
import com.anas.alqurancloudapi.edition.Edition;
import com.anas.alqurancloudapi.edition.EditionFormat;
import com.anas.intellij.plugins.ayah.settings.AyahSettingsState;
import com.anas.intellij.plugins.ayah.settings.BasmalhOnStart;
import com.anas.intellij.plugins.ayah.settings.SelectedEdition;
import com.intellij.ui.components.JBCheckBox;
import com.intellij.ui.components.JBLabel;
import com.intellij.util.ui.FormBuilder;

View file

@ -3,6 +3,8 @@
<!-- Unique identifier of the plugin. It should be FQN. It cannot be changed between the plugin versions. -->
<id>com.anas.intellij.plugins.ayah</id>
<depends>com.intellij.modules.platform</depends>
<!-- Public plugin name should be written in Title Case.
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-name -->
<name>Ayah</name>
@ -39,6 +41,11 @@
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
<depends>com.intellij.modules.platform</depends>
<applicationListeners>
<listener class="com.anas.intellij.plugins.ayah.listeners.AyahExecutionListener"
topic="com.intellij.execution.ExecutionListener" />
</applicationListeners>
<!-- Extension points defined by the plugin.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html -->
<extensions defaultExtensionNs="com.intellij">