Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
*Bundle: use delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
YannCebron committed Apr 9, 2024
1 parent b1ccdcc commit e20dc26
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 The Authors
* Copyright 2024 The Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,22 +16,21 @@

package com.yanncebron.m68kplugin;

import com.intellij.AbstractBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;

import java.util.function.Supplier;

public class M68kApiBundle extends AbstractBundle {
public final class M68kApiBundle {

@NonNls
private static final String PATH_TO_BUNDLE = "messages.M68kApiBundle";

private static final M68kApiBundle INSTANCE = new M68kApiBundle();
private static final DynamicBundle INSTANCE = new DynamicBundle(M68kApiBundle.class, PATH_TO_BUNDLE);

private M68kApiBundle() {
super(PATH_TO_BUNDLE);
}

public static String message(@NotNull @PropertyKey(resourceBundle = PATH_TO_BUNDLE) String key, Object @NotNull ... params) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 The Authors
* Copyright 2024 The Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,22 +16,21 @@

package com.yanncebron.m68kplugin.amiga;

import com.intellij.AbstractBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;

import java.util.function.Supplier;

public class M68kAmigaBundle extends AbstractBundle {
public final class M68kAmigaBundle {

@NonNls
private static final String PATH_TO_BUNDLE = "messages.M68kAmigaBundle";

private static final M68kAmigaBundle INSTANCE = new M68kAmigaBundle();
private static final DynamicBundle INSTANCE = new DynamicBundle(M68kAmigaBundle.class, PATH_TO_BUNDLE);

private M68kAmigaBundle() {
super(PATH_TO_BUNDLE);
}

public static String message(@NotNull @PropertyKey(resourceBundle = PATH_TO_BUNDLE) String key, Object @NotNull ... params) {
Expand Down
9 changes: 4 additions & 5 deletions src/com/yanncebron/m68kplugin/M68kBundle.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 The Authors
* Copyright 2024 The Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,22 +16,21 @@

package com.yanncebron.m68kplugin;

import com.intellij.AbstractBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;

import java.util.function.Supplier;

public class M68kBundle extends AbstractBundle {
public final class M68kBundle {

@NonNls
private static final String PATH_TO_BUNDLE = "messages.M68kBundle";

private static final M68kBundle INSTANCE = new M68kBundle();
private static final DynamicBundle INSTANCE = new DynamicBundle(M68kBundle.class, PATH_TO_BUNDLE);

private M68kBundle() {
super(PATH_TO_BUNDLE);
}

public static String message(@NotNull @PropertyKey(resourceBundle = PATH_TO_BUNDLE) String key, Object @NotNull ... params) {
Expand Down

0 comments on commit e20dc26

Please sign in to comment.